Ga naar inhoud

Form PrintCommercialInvoice

  • Unit name: Forms.PrintCommercialInvoice
  • Form name: TPrintCommercialInvoiceForm
  • Old form name: form214 (unit214)

Synopsis

Form to display print commercial invoices.

Functionalities

  1. Selection criteria : "From" Date/time Edit. Default: today, 00.
  2. Selection criteria : "To" Date/time Edit. Default: from date value, 23:59:59.
  3. Selection criteria : "Status": All/Printed/Not printed
  4. On change: execute DisplayRecords action.
  5. Button to execute DisplayRecords action.
  6. Multi-select (checkboxes), read-only Grid with result of CommercialInvoices view. (only show 255 chars of OrdersList field)
  7. Select all/none checkbox for grid.
  8. Grid Popup menu with items for CalcWeights and ChangeWeights actions.
  9. Second read-only Grid with result of CommercialInvoicesDetail view. Shows current order details.
  10. Read-only listbox with contents of OrdersList field.
  11. Button to execute CalcWeights action.
  12. Button to execute ChangeWeight action.
  13. Button to execute ExcelExport action.

  14. Report: CommercialInvoices

Actions

DisplayRecords

  1. Always enabled.
  2. collects filter criteria:
  3. Date filter
    (RSYSTEMDATE between :FromDate and :ToDate)
    
    (take date and time into account)
  4. Status filter, one of
    (empty)
    PrintingDate is Null
    PrintingDate is Not Null
    
  5. Open CommercialInvoices view with filter.

Calcweights

  1. Enabled when at least 1 invoice is selected.
  2. Collects IDS of selected invoices, and executes service call CommercialInvoiceControl.CalcInvoiceWeights
  3. Refresg display.

ChangeWeight

  1. Enabled when there is a current invoice.
  2. Asks a new weight for the current invoice, passing as default the current weight.
  3. On confirm (must be weight >=0), changes the current record and pushes the changes to the server.

ExcelExport

  1. Enabled when at least 1 invoice is selected.
  2. Ask for a filename.
  3. When confirmed, for each of the selected invoices, the contents of CommercialInvoiceDetail for the invoice are exported to excel. If there are multiple invoices, the filename is appended with the InvoiceNumber field for that invoice.

Tables/Views

  • CommercialInvoices
     SELECT A.* from NRW_CI A
    
  • CommercialInvoiceDetail
     SELECT A.* from NRW_CI_DET A
    

Needed Service Calls

CommercialInvoiceControl.CalcInvoiceWeights

called from CalcWeights action.

CommercialInvoiceControl.MarkInvoicesAsPrinted

Called before printing CommercialInvoices report.

Reports

  1. CommercialInvoice passes IDS of selected invocies as IDS macro. Before printing, calls CommercialInvoiceControl.MarkInvoicesAsPrinted with the same IDS as passed to the report.