INVOICE.DEF 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. DEFINITION MODULE Invoice;
  2. FROM GenLists IMPORT GenList;
  3. FROM ScrnTypes IMPORT DisplayFrame;
  4. FROM DBFInvoice IMPORT InvoiceRec;
  5. FROM DBFInvtry IMPORT InvtryRec;
  6. FROM DBFOrder IMPORT OrderRec;
  7. FROM NumTypes IMPORT Real8;
  8. FROM SYSTEM IMPORT ADDRESS;
  9. (* these types and variables were moved here to split the invoice module *)
  10. TYPE
  11. FInvoice = RECORD (* used with a group of invoices *)
  12. Invoice : InvoiceRec;
  13. LI : LONGINT
  14. END;
  15. InvoiceItem = RECORD
  16. InventoryItem : InvtryRec;
  17. InventoryFilePos : LONGINT;
  18. ItemOrderRec : OrderRec;
  19. BeenAdded : BOOLEAN; (* once added - do not re-add the items*)
  20. OldQuant : Real8; (* used for update of items only *)
  21. GasPriced : BOOLEAN;
  22. P1,P2,P3,P4 : Real8; (* price table prices *)
  23. Q1,Q2,Q3,Q4 : CARDINAL; (* price table quantities *)
  24. END;
  25. CONST
  26. Credit = 'CR';
  27. GasOut = 'G0';
  28. GasIn = 'G1';
  29. SpecialOrd ='S';
  30. VAR
  31. HeaderChanged : BOOLEAN;
  32. InvoiceHeadDF : DisplayFrame;
  33. OrderItemDF : DisplayFrame;
  34. CurrentInvoice : InvoiceRec;
  35. CurrInvOldAmt : Real8; (* used if a printed invoice is
  36. re-printed to compte ytd*)
  37. OrderItemLst : GenList; (* list of ordered items*)
  38. CurrentItem : POINTER TO InvoiceItem;
  39. SummaryDF : DisplayFrame;
  40. PROCEDURE ReadHeader();
  41. PROCEDURE Recompute();
  42. PROCEDURE ControlInvoice(Ctl : CHAR);
  43. PROCEDURE PayInvoice();
  44. PROCEDURE Special(Item:ARRAY OF CHAR) : BOOLEAN;
  45. PROCEDURE InvoiceHistory();
  46. PROCEDURE GetOutstanding(CustID : ARRAY OF CHAR; VAR TheList : GenList);
  47. (* given a customer number -get a list of open invoices *)
  48. PROCEDURE InvoiceDaysLate(Invoice : ADDRESS) : CARDINAL;
  49. PROCEDURE MakeInvoicePrintLine(InvAddr : ADDRESS; VAR Line : ARRAY OF CHAR);
  50. END Invoice.