[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [ubl-dev] Modeling question re: multifaceted price calculation
Ken, You seem to have represented all of the elements of rental price calculation. Presumably the company creating and sending these rental bills will have no problem creating the require tags and associated payload. Where I still see a problem is what happens with respect to the various customer companies who start receiving these invoices. I think that you can send all the ingredients of invoice computation, but I also think that for "backward compatibility" (systems and people's mental habits) you should reconstruct the transaction to put the "real" quantity and real unit price in plain sight. Typically, the customer's invoice processing (manual or automated) will look at the line item quantity invoiced and unit price to compare them with invoiced extended amount. It will look to see whether the cumulative number of units and the unit price is consistent with the order. Often the tolerances for all these tests will be set to zero. For those doing invoicing, it is therefore a critical success factor to pass these tests. In your current example for the rental of ThingOnes, the field invoiced quantity (7) is not invoiced quantity, nor is rental rate (.025) the rental rate. <cbc:InvoicedQuantity>7</cbc:InvoicedQuantity> <cbc:Name>Monthly Rental Rate</cbc:Name> <cbc:Value>.025</cbc:Value> If one multiplies quantity 7 times 2.5 Canadian cents the extended price (line extension amount) to be $.175 Canadian dollars. In fact, the proper line extension amount is $29.17, so accounts payable will reject this line or, worse still, pay the $.175 CAD and mark the line closed. Instead, I suggest that you express the InvoicedQuantity and Monthly Rental Rate in a way that is "backward compatible" with the more normal use of invoice line item quantity and rate. For the item named Thing-One, the customer has rented 7 instances of Thing-One, each held for 5 days during the invoice period. Therefore, the invoiced quantity is 35 Thing-One days. The monetary rate per Thing-One day is ($1,000*2.5%)/30 or $.833 per day. If one multiplies 35 times $.8333 CAD the extended amount is indeed $29.17. Neither the 35 nor the $.8333 appear in your invoice, but I suggest that they not only appear, but appear pretty much as if the customer had bought 35 widgets for $.833 CAD each. Customers who want the additional information to replicate the computation of Thing-One days and the conversion of 2.5% and asset value into a daily rate can look in the additional, non-traditional tags. You therefore would need to move the ThingOne quantity of 7 and the rental as a percent of value to 2.5% to additional item property along with the ThingOne value. Fulton Wilcox Colts Neck Solutions LLC -----Original Message----- From: G. Ken Holman [mailto:gkholman@CraneSoftwrights.com] Sent: Monday, April 28, 2008 2:53 PM To: UBL-Dev Subject: RE: [ubl-dev] Modeling question re: multifaceted price calculation At 2008-04-26 09:07 -0400, I wrote: >So ... if I take a stab at this below using facets of the item >description, perhaps folks could comment collaboratively on how this >would work. I've received feedback off list and a revised suggestion for comment is at the end of this message. Here are the original requirements: >-----Original Message----- >From: G. Ken Holman [mailto:gkholman@CraneSoftwrights.com] >Sent: Friday, April 25, 2008 12:49 AM >To: UBL-Dev >Subject: [ubl-dev] Modeling question re: multifaceted price calculation >... >Invoice period: April 1, 2008 to April 30, 2008 > >Item: 1 >Description: Thing-one >Quantity: 7 >Base cost: $1000. >Rental rate each: 2.5% per month >Shipped to site: April 15, 2008 >Removed from site: April 20, 2008 >Days on site: 5 >Rental fee: $29.17 (=1000*.025/30*5*7) > >Item: 2 >Description: Thing-two >Quantity: 3 >Base cost each: $2000. >Rental rate: $30 per month >Shipped to site: April 10, 2008 >Removed from site: N/A (still on site) >Days on site: 20 >Rental fee: $60 (=30/30*20*3) > >Item: 3 >Description: Thing-three >Quantity: 1 >Base cost each: $5000. >Rental rate: .5% per day (was 1% per month, but changed for the example) >Shipped to site: N/A (was on site) >Removed from site: N/A (still on site) >Days on site: 30 >Rental fee: $750 (=5000*.005*30*1) >-----End Original Message----- >... >For those items with "Monthly Rental Rate", the unit price is calculated as: > > Base Cost Amount > * Monthly Rental Rate > / Monthly Days Applicable > * Monthly Rental Rate DurationMeasure in days > >For those items with "Monthly Rental Fee", the unit price is calculated as: > > Monthly Rental Fee > / Monthly Days Applicable > * Monthly Rental Fee DurationMeasure in days > >For those items with "Daily Rental Rate", the unit price is calculated as: > > Base Cost Amount > * Daily Rental Rate > * Daily Rental Rate DurationMeasure in days Based on the feedback I changed the following: - moved AdditionalItemProperty to Item instead of being a child of ItemInstance - indicated the BaseQuantity for the price determination is "each" indicating each unit counted in InvoicedQuantity - added cbc:PriceType as a property of the price to document how the price was calculated Would anyone disagree with these changes or think this instance is worse off than the earlier one? Thanks again for any feedback! . . . . . . . . . . . . . Ken <?xml version="1.0" encoding="UTF-8"?> <Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponent s-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateCompo nents-2" xmlns:udt="urn:un:unece:uncefact:data:draft:UnqualifiedDataTypesSchemaModule :2"> <cbc:ID>A123</cbc:ID> <cbc:CopyIndicator>false</cbc:CopyIndicator> <cbc:IssueDate>2008-04-30</cbc:IssueDate> <cbc:DocumentCurrencyCode>CAD</cbc:DocumentCurrencyCode> <cac:InvoicePeriod> <cbc:StartDate>2008-04-01</cbc:StartDate> <cbc:EndDate>2008-04-30</cbc:EndDate> </cac:InvoicePeriod> <cac:AccountingSupplierParty> <cac:Party> <cac:PartyName> <cbc:Name>The supplier</cbc:Name> </cac:PartyName> </cac:Party> </cac:AccountingSupplierParty> <cac:AccountingCustomerParty> <cac:Party> <cac:PartyName> <cbc:Name>The buyer</cbc:Name> </cac:PartyName> </cac:Party> </cac:AccountingCustomerParty> <cac:LegalMonetaryTotal> <cbc:PayableAmount currencyID="CAD">839.17</cbc:PayableAmount> </cac:LegalMonetaryTotal> <cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:InvoicedQuantity>7</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="CAD">29.17</cbc:LineExtensionAmount> <cac:Item> <cbc:Description>Thing-one</cbc:Description> <cac:AdditionalItemProperty> <cbc:Name>Base Cost Currency</cbc:Name> <cbc:Value>CAD</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Base Cost Amount</cbc:Name> <cbc:Value>1000</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Monthly Days Applicable</cbc:Name> <cbc:Value>30</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Monthly Rental Rate</cbc:Name> <cbc:Value>.025</cbc:Value> <cac:UsabilityPeriod> <cbc:StartDate>2008-04-15</cbc:StartDate> <cbc:EndDate>2008-04-20</cbc:EndDate> <cbc:DurationMeasure unitCode="DAY">5</cbc:DurationMeasure> </cac:UsabilityPeriod> </cac:AdditionalItemProperty> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="CAD">4.17</cbc:PriceAmount> <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity> <cbc:PriceType>Calculated as base * monthly rate / monthly days * days</cbc:PriceType> </cac:Price> </cac:InvoiceLine> <cac:InvoiceLine> <cbc:ID>2</cbc:ID> <cbc:InvoicedQuantity>3</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="CAD">60</cbc:LineExtensionAmount> <cac:Item> <cbc:Description>Thing-two</cbc:Description> <cac:AdditionalItemProperty> <cbc:Name>Base Cost Currency</cbc:Name> <cbc:Value>CAD</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Base Cost Amount</cbc:Name> <cbc:Value>2000</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Monthly Days Applicable</cbc:Name> <cbc:Value>30</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Monthly Rental Fee</cbc:Name> <cbc:Value>30</cbc:Value> <cac:UsabilityPeriod> <cbc:StartDate>2008-04-10</cbc:StartDate> <cbc:EndDate>2008-04-30</cbc:EndDate> <cbc:DurationMeasure unitCode="DAY">20</cbc:DurationMeasure> </cac:UsabilityPeriod> </cac:AdditionalItemProperty> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="CAD">20</cbc:PriceAmount> <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity> <cbc:PriceType>Calculated as monthly fee / monthly days * days</cbc:PriceType> </cac:Price> </cac:InvoiceLine> <cac:InvoiceLine> <cbc:ID>3</cbc:ID> <cbc:InvoicedQuantity>1</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="CAD">750</cbc:LineExtensionAmount> <cac:Item> <cbc:Description>Thing-one</cbc:Description> <cac:AdditionalItemProperty> <cbc:Name>Base Cost Currency</cbc:Name> <cbc:Value>CAD</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Base Cost Amount</cbc:Name> <cbc:Value>5000</cbc:Value> </cac:AdditionalItemProperty> <cac:AdditionalItemProperty> <cbc:Name>Daily Rental Rate</cbc:Name> <cbc:Value>.005</cbc:Value> <cac:UsabilityPeriod> <cbc:StartDate>2008-04-01</cbc:StartDate> <cbc:EndDate>2008-04-30</cbc:EndDate> <cbc:DurationMeasure unitCode="DAY">30</cbc:DurationMeasure> </cac:UsabilityPeriod> </cac:AdditionalItemProperty> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="CAD">750</cbc:PriceAmount> <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity> <cbc:PriceType>Calculated as base * daily rate * days</cbc:PriceType> </cac:Price> </cac:InvoiceLine> </Invoice> -- World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@CraneSoftwrights.com Crane Softwrights Ltd. http://www.CraneSoftwrights.com/u/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/u/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal --------------------------------------------------------------------- To unsubscribe, e-mail: ubl-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: ubl-dev-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]