Method ManualEinvoice():validateScenario() Professional
Validates the rules of the manual scenario.
:validateScenario( <oCtx> ) --> self
This method returns self.
Checks the invoice against the rules of the manual scenario. The method is called by :validate() as the last step of the rule catalog. The following rules are checked:
Every invoice line must have a resolved VAT category. A line for which no VAT category has been specified via EinvoiceLineItem():setVatCategory() is reported as a "MANUAL" error.
If the invoice has been created via ManualEinvoice():createFromString() or ManualEinvoice():createFromFile(), the totals and the VAT breakdown stated in the imported document are compared with the values recalculated from its invoice lines, allowances and charges. Every mismatch is reported under the corresponding EN 16931 rule BR-CO-10 to BR-CO-17.
Unlike the other scenarios, the manual scenario does not require the seller to be located in the EU. For this reason, :requireEuSeller() is not called.
Errors are reported via the code block in the member :Error of <oCtx>. The method does not raise a runtime error, so :validate() can report all problems at once.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.