This entry point is used to insert additional logic during the end of the controls on the selection of an order line to be invoiced.
It is also possible to add to the invoice a non selected line and conversely to omit a selected lines.
It is called during the execution of the "Invoice" button in order management.
There is no transaction in process.
There is no open log file.
This entry point is called for each line in the order, after the running of the selection conditions for the line.
The WLIG variable contains the number of lines to be integrated in the invoice.
The order header screen classes are filled:
[M:SOH0], [M:SOH1], [M:SOH2] and [M:SOH3]
The screen class [M:SOH4] for the order lines is on-line :
It is indexed by the variable I that therefore corresponds to nolign-1
The value of [M:SOH4]GRPFLG(I) signifies : ( 1 = line not invoiced, 2 = line to be invoiced )
To add the order line currently being to invoiced : [M:SOH4]GRPFLG(I)=2 and WLIG +=1
To omit the order line being invoiced : [M:SOH4]GRPFLG(I)=1 and WLIG -=1
In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...
Table | Significant content | Table Title |
SORDER | No | Order headers |
SORDERQ | No | Order line quantities |
SORDERP | No | Order line prices |
ITMMASTER | No | Products |
ITMSALES | No | Sales product |
|
|
|