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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-dev message

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


Subject: Re: UBL 2 Invoice Calculation Model Draft 1 Suggested Rules


Note: these rules do not even attempt to cover all of the
calculations and totals and amounts in a UBL invoice,
just the main ones which affect the most important, legal,
tax, etc substantial calculations.

Notable omissions:

# rounding amounts,
# multiple currencies (eg use of TransactionCurrencyTaxAmount)
# whether AllowanceCharge/BaseAmount and AllowanceCharge/
    MultiplierFactorNumeric should both be positive or both negative
    (either would work with these rules)

There are other areas not covered: even in the example I have
found that changing some apparently important amounts does
not result in breeches of these rules. I will look into whether
this is significant but it might not be. There could be incorrect
totals which are not breaking rules. There always will be with
something as complex as UBL and customisation would add
to the likelihood of coverage being incomplete. Maybe further
rules do need to be added and maybe some rules changed or
elaborated. I think these rules do clarify/arbitrate some of the
key problem areas though so I think they have much value.


---
Stephen D Green




2009/10/6 Stephen Green <stephengreenubl@gmail.com>:
> 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]