[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: UBL 2 Invoice Calculation Model Draft 1 Suggested Rules
Here are draft rules which are behind my lastest draft of test assertions for UBL 2.0 Invoice Calculation Model (draft1). Comments, objections, etc welcome. Maybe these, once broadly agreed (or at least no longer receiving strong objections with alternative rules) can go to the UBL wiki as an example of a calculation model. {ID schema "U20ICMDraft1Rule#..." stands for "UBL 2 Invoice Calculation Model Draft 1 Rule #..."} ------ U20ICMDraft1Rule#1: "To be a conforming UBL 2 invoice the document must be valid according to a standard UBL 2 Invoice schema." U20ICMDraft1Rule#2: "The document level line extension total should be the sum of all line extension amounts at line level." U20ICMDraft1Rule#3: "The 'TaxExclusiveAmount' in the invoice 'LegalMonetaryTotal' should be equal to the sum of the 'LineExtensionAmount's in all of the invoice lines plus the sum of the invoice 'AllowanceCharge' charges minus the sum of the invoice 'AllowanceCharge' allowances." U20ICMDraft1Rule#4: "Provided there is no Prepayment, the 'AllowanceTotalAmount' in the invoice 'LegalMonetaryTotal' should be equal to the the sum of the invoice 'AllowanceCharge' allowances." U20ICMDraft1Rule#5: "Provided there is no Prepayment, the 'ChargeTotalAmount' in the invoice 'LegalMonetaryTotal' should be equal to the the sum of the invoice 'AllowanceCharge' charges." U20ICMDraft1Rule#6: "Provided there is no Prepayment, in the invoice 'LegalMonetaryTotal' the 'LineExtensionAmount' should be equal to the 'TaxExclusiveAmount' plus any 'AllowanceTotalAmount' minus any 'ChargeTotalAmount'." U20ICMDraft1Rule#7: "The 'PayableAmount' in the invoice 'LegalMonetaryTotal' should be equal to the TaxExclusiveAmount (in the invoice 'LegalMonetaryTotal') plus the sum of the invoice total tax amounts (at invoice document level)." U20ICMDraft1Rule#8: "The sum of document level tax total amounts should equal the sum of all document level subtotal tax amounts." ------ The test assertions which use these rules and interpret them as XPaths against the UBL 2.0 Invoice are publicly posted at http://www.oasis-open.org/committees/document.php?document_id=34533&wg_abbrev=tag --- Stephen D Green
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]