Post tax document upon delivery of goods function
Function Post Invoice on Delivery of Goods It is used in particular for posting calculation inputs to VAT that have arisen during the Recalculation of the payment calendar After the contract is activated:
after a change in the contract with an impact on the taxable supply, e.g. after a technical improvement or after an extension of the contract
after cancelling the initial VAT invoice and creating a new calculation input
If the function is run on a contract that does not have unposted calculation inputs for VAT upon delivery of goods, the error message "There are no unposted calculation inputs with code type %! There's nothing to charge!"
If there is an unposted calculation input with VAT variant - delivery of goods on the contract, the payment is blocked and cannot be posted! An error message is displayed: There is a non-posted calculation input with VAT variant - delivery of goods and Contract No. %.
The function processes the VAT calculation inputs that have not yet been posted, generates and posts the sales document according to the rules described in chapter https://iao.atlassian.net/wiki/x/HIBYC
if there is no other posted non-cancelled calculation input with VAT variant - supply of goods (e.g. the original VAT invoice has been cancelled and a new calculation input with VAT variant - supply of goods is posted),
An initial tax document (invoice) is created
on the header of the Financing Contract
The document number is entered into the field Document No. - Tax Invoice upon Delivery of Goods
The flags Tax Invoice on Delivery of Goods Posted = Yes and Tax Invoice on Delivery Cancelled = No are set
if there is already another posted non-cancelled calculation input with VAT variant - supply of goods,
A corrective tax document is created
on the header of the Financing Contract
Document No. - the tax document does not change when the goods are delivered
Flags Tax Invoice on Delivery of Goods Posted = Yes and Tax Invoice Cancelled = No does not change