POS/CashOperation
This section contains POS cash operation journal APIs.
GetPrinted takes the operation id returned as new_id by IncomeAdd or OutcomeAdd and returns HTML in result.print_data. It requires an accepted cashier and the corresponding cash-in or cash-out permission. Only nondeleted operations of the accepted register can be printed. Repeat printing is available after shift closure and uses the stored operation date, author, amount and comment. It does not change balances or create operations. Other journal types, including PaymentAdd, are not supported.
Receipts use template type 4. Retrieve it through OperatingCash/GetChequeTemplate and edit its id through OperatingCash/EditChequeTemplate; the type comes from the stored record. Configure the logo using logo, logo_width and logo_height.
The JSON template contains width (80 mm by default), margin_left, margin_right, variables with nonempty cash_in and cash_out captions, and a nonempty body array. Rows use the same font, alignment, interval and barcode/QR settings as other receipts. Local image paths are not supported.
Standard templates follow the sale receipt formatting, including fonts, margins, row spacing, logos and date/amount formatting.
Markers: <doc.id>, <doc.cash_id>, <doc.date>, <doc.time>, <doc.cashier_name>, <doc.description>, <cash_type> and <cash_value>. The direction caption comes from the stored operation type; cash-in and cash-out amounts are positive. Rows containing <doc.description> wrap long comments. <SF> follows the shared receipt column rules; <DF>, <EF>, <AF>, <UF> and <PF> are the standard line fillers.