Innfærslulistar
Reikningabunkar
Customer No.:
If a new line is detected, it creates a new invoice batch line.
It evaluates the customer number from the Excel buffer.
If the customer number is different from the last one (
cLastCustNo
), it inserts text at the top of the invoice.If the customer number is not found in the customer table (
rCustomer
), it initializes a new customer entry.It validates the customer number in the invoice batch line.
It sets up a loop to update all invoice batch lines with the same batch code but no customer number to the newly inserted customer number.
Description:
If a new line is detected and either the description or unit price is empty, it creates a new invoice batch line.
It validates the description from the Excel buffer or a default length of 50 characters if there's no specific description in the buffer.
It updates the
NameText
variable with the combined description.
Department:
If a new line is detected, it creates a new invoice batch line.
If the department value from the Excel buffer is greater than zero, it fetches additional information and validates the "Dimension 1 Code" in the invoice batch line.
Project:
Similar to department, it handles project information.
Property ID:
It validates the property ID from the Excel buffer.
Job No.:
It validates the job number from the Excel buffer.
Type:
It evaluates the type from the Excel buffer and validates it in the invoice batch line.
No.:
If a new line is detected and the last description is different from the current one, it creates a new invoice batch line.
It validates the "No." field from the Excel buffer.
Business Acc.:
If a new line is detected, it creates a new invoice batch line.
It validates the business account from the Excel buffer.
Unit Price:
If a new line is detected and the unit price is zero, it creates a new invoice batch line.
It updates the description, type, and number fields in the invoice batch line based on certain conditions.
It validates the unit price from the Excel buffer.
Quantity:
Similar to the unit price, it handles quantity information.
Discount%:
It validates the discount percentage from the Excel buffer.
Report 10025678