| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- DEFINITION MODULE Invoice;
- FROM GenLists IMPORT GenList;
- FROM ScrnTypes IMPORT DisplayFrame;
- FROM DBFInvoice IMPORT InvoiceRec;
- FROM DBFInvtry IMPORT InvtryRec;
- FROM DBFOrder IMPORT OrderRec;
- FROM NumTypes IMPORT Real8;
- FROM SYSTEM IMPORT ADDRESS;
- (* these types and variables were moved here to split the invoice module *)
- TYPE
- FInvoice = RECORD (* used with a group of invoices *)
- Invoice : InvoiceRec;
- LI : LONGINT
- END;
- InvoiceItem = RECORD
- InventoryItem : InvtryRec;
- InventoryFilePos : LONGINT;
- ItemOrderRec : OrderRec;
- BeenAdded : BOOLEAN; (* once added - do not re-add the items*)
- OldQuant : Real8; (* used for update of items only *)
- GasPriced : BOOLEAN;
- P1,P2,P3,P4 : Real8; (* price table prices *)
- Q1,Q2,Q3,Q4 : CARDINAL; (* price table quantities *)
- END;
- CONST
- Credit = 'CR';
- GasOut = 'G0';
- GasIn = 'G1';
- SpecialOrd ='S';
- VAR
- HeaderChanged : BOOLEAN;
- InvoiceHeadDF : DisplayFrame;
- OrderItemDF : DisplayFrame;
- CurrentInvoice : InvoiceRec;
- CurrInvOldAmt : Real8; (* used if a printed invoice is
- re-printed to compte ytd*)
- OrderItemLst : GenList; (* list of ordered items*)
- CurrentItem : POINTER TO InvoiceItem;
- SummaryDF : DisplayFrame;
- PROCEDURE ReadHeader();
- PROCEDURE Recompute();
- PROCEDURE ControlInvoice(Ctl : CHAR);
- PROCEDURE PayInvoice();
- PROCEDURE Special(Item:ARRAY OF CHAR) : BOOLEAN;
- PROCEDURE InvoiceHistory();
- PROCEDURE GetOutstanding(CustID : ARRAY OF CHAR; VAR TheList : GenList);
- (* given a customer number -get a list of open invoices *)
- PROCEDURE InvoiceDaysLate(Invoice : ADDRESS) : CARDINAL;
- PROCEDURE MakeInvoicePrintLine(InvAddr : ADDRESS; VAR Line : ARRAY OF CHAR);
- END Invoice.
|