OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Draft 3 of UBL 2 Invoice Calculation Model Rules


For a kind of reference implementation of this calculation model (and
TAML 0.8.2)
(using the OASIS TAG TC test assertion methodology as it stands at
present Oct '09)
see
http://www.oasis-open.org/committees/document.php?document_id=34585

Note that there are clearly corner cases such as

1. there could be more than one currency in the document (e.g. tax
requirement) which
    would make some tests invalid (the invoice would then not qualify
for the tests)

2. the only mandatory total in the invoice is the PayableAmount so if
there are missing
    totals (e.g. TaxInclusiveAmount which is missing in the official
example) then the
    invoice would not qualify for some of the tests, unless the tests
take this into account

---
Stephen D Green




2009/10/8 Stephen Green <stephengreenubl@gmail.com>:
> Draft 3 of UBL 2 Invoice Calculation Model Rules
> ---------------------------------------------------------------------
>
> (corrects error in draft 2 rule 8)
>
>
>    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
>     NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
>     "OPTIONAL" in this document are to be interpreted as described in
>     RFC 2119.
>
>     http://www.ietf.org/rfc/rfc2119.txt
>
>
> -------
> U2ICMDraft3Rule1:
>
> "To be a conforming UBL 2 invoice the document MUST be valid according
> to a standard UBL 2 Invoice schema."
>
> U2ICMDraft3Rule2:
>
> "The document level line extension total SHOULD be the sum of all line
> extension amounts at line level."
>
> U2ICMDraft3Rule3:
>
> "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."
>
> U2ICMDraft3Rule4:
>
> "The 'AllowanceTotalAmount' in the invoice 'LegalMonetaryTotal' SHOULD
> be equal to the the sum of the invoice 'AllowanceCharge' allowances."
>
> U2ICMDraft3Rule5:
>
> "The 'ChargeTotalAmount' in the invoice 'LegalMonetaryTotal' SHOULD
> be equal to the the sum of the invoice 'AllowanceCharge' charges."
>
> U2ICMDraft3Rule6:
>
> "In the invoice 'LegalMonetaryTotal' the 'LineExtensionAmount' SHOULD
> be equal to the 'TaxExclusiveAmount' plus any 'AllowanceTotalAmount'
> minus any 'ChargeTotalAmount'."
>
> U2ICMDraft3Rule7:
>
> "The 'TaxInclusiveAmount' 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)."
>
> U2ICMDraft3Rule8:
>
> "The 'PayableAmount' in the invoice 'LegalMonetaryTotal' SHOULD be
> equal to the 'TaxInclusiveAmount' (in the invoice 'LegalMonetaryTotal')
> minus the sum of any 'PrepaidPayment' amounts (at invoice document level)."
>
> U2ICMDraft3Rule9:
>
> "The sum of invoice document level tax total amounts SHOULD equal the sum of
> all document level subtotal tax amounts."
>
> ------
>
> ---
> Stephen D Green
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]