diff --git a/src/app/cashier/transaction-entry/transaction-entry.component.ts b/src/app/cashier/transaction-entry/transaction-entry.component.ts index 577c9805d..1e7fb31e2 100644 --- a/src/app/cashier/transaction-entry/transaction-entry.component.ts +++ b/src/app/cashier/transaction-entry/transaction-entry.component.ts @@ -1671,12 +1671,21 @@ export class TransactionEntryComponent implements OnInit, OnDestroy { { value: 'DD', label: 'DD (Demand Draft)' } ]; - /** A cashier only ever takes cash in (Receipt) or pays cash out (Payment) — Cheque, DD, - * Disbursement and Bank Transfer are clerk/back-office instruments with their own approval - * flows and never appear at the cashier counter. */ + /** + * A cashier takes cash in (Receipt), pays cash out (Payment), or collects the cash for a Demand + * Draft (DD). Cheque, Disbursement and Bank Transfer stay clerk/back-office instruments with their + * own approval flows and never appear at the cashier counter. + * + * DD belongs here because the whole DD-against-cash path is the cashier's: isDdCashGlRow() gates on + * a cash payment type against a GL account, onSave() makes the cashier count Face Value + Charges + * + GST exactly and enforces the admin DD limit at intake, and buildDepositPayload() persists that + * breakdown so the Sponsor DD issuance screen can read it back after approval. All of that was + * already written and reachable only by a cashier — it was just impossible to select. + */ private readonly cashierTypOptions: { value: string; label: string }[] = [ { value: 'Receipt', label: 'Receipt' }, - { value: 'Payment', label: 'Payment' } + { value: 'Payment', label: 'Payment' }, + { value: 'DD', label: 'DD (Demand Draft)' } ]; get typOptions(): { value: string; label: string }[] { @@ -2112,6 +2121,17 @@ export class TransactionEntryComponent implements OnInit, OnDestroy { row.chequeNo = ''; row.cheqDate = ''; break; + // A DD is bought with cash: the customer hands over Face Value + Charges + GST, so it is money + // coming IN (Cr) against the GL the draft is drawn on. All three of Cr, a cash payment type and + // AC.TP = GL are what isDdCashGlRow() looks for -- without them the DD Charges & GST panel never + // appears and the row would post as an ordinary entry with the charges silently dropped. + case 'DD': + row.dbCr = 'Cr'; + row.paymentTypeId = this.findCashPaymentTypeId(); + row.acTyp = 'GL'; + row.chequeNo = ''; + row.cheqDate = ''; + break; } }