Form PrintCommercialInvoice
- Unit name: Forms.PrintCommercialInvoice
- Form name: TPrintCommercialInvoiceForm
- Old form name: form214 (unit214)
Synopsis
Form to display print commercial invoices.
Functionalities
- Selection criteria : "From" Date/time Edit. Default: today, 00.
- Selection criteria : "To" Date/time Edit. Default: from date value, 23:59:59.
- Selection criteria : "Status": All/Printed/Not printed
- On change: execute DisplayRecords action.
- Button to execute DisplayRecords action.
- Multi-select (checkboxes), read-only Grid with result of CommercialInvoices view. (only show 255 chars of OrdersList field)
- Select all/none checkbox for grid.
- Grid Popup menu with items for CalcWeights and ChangeWeights actions.
- Second read-only Grid with result of CommercialInvoicesDetail view. Shows current order details.
- Read-only listbox with contents of OrdersList field.
- Button to execute CalcWeights action.
- Button to execute ChangeWeight action.
-
Button to execute ExcelExport action.
-
Report: CommercialInvoices
Actions
DisplayRecords
- Always enabled.
- collects filter criteria:
- Date filter
(take date and time into account)
(RSYSTEMDATE between :FromDate and :ToDate)
- Status filter, one of
(empty) PrintingDate is Null PrintingDate is Not Null
- Open CommercialInvoices view with filter.
Calcweights
- Enabled when at least 1 invoice is selected.
- Collects IDS of selected invoices, and executes service call CommercialInvoiceControl.CalcInvoiceWeights
- Refresg display.
ChangeWeight
- Enabled when there is a current invoice.
- Asks a new weight for the current invoice, passing as default the current weight.
- On confirm (must be weight >=0), changes the current record and pushes the changes to the server.
ExcelExport
- Enabled when at least 1 invoice is selected.
- Ask for a filename.
- 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
- CommercialInvoice passes IDS of selected invocies as IDS macro. Before printing, calls CommercialInvoiceControl.MarkInvoicesAsPrinted with the same IDS as passed to the report.