Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008503Openbravo ERP02. Master data managementpublic2009-04-08 12:302009-04-29 00:00
sureshbabu 
vinothbabu 
highmajoralways
closedduplicate 
30
2.50beta 
 
Core
No
0008503: Difference in invoice amount generated through volume discount.(in decimal places)
when invoice is generated through volume discount(scaled), there is a difference in the invoice amount(in decimal places)

The scenario which i tried to test here is, creating a volume discount(with scaled option checked) where i have defined different discount for each scale of amount. After generating the invoice through volume discount i found difference in invoice amount (in decimal places)

(issue with precession)
steps which i used to reproduce the issue:

created a volume discount1 ( Master Data Management || Business Partner Setup || Volume Discount || Volume Discounts )
Name: <enter a valid name >
Scaled: Check
Included Product: All selected
Included Product categories: Not selected

Step 2: Move to Product tab and
product: Hammer



step 3: Move to volume discount parameters tab
Discount %: 5 (5%)
Min Amount : 1
Max amount : 9 999
Click save and click new

Discount %:10 (10%)
Min Amount : 10 000
Max amount : 14 999
 


Move to Business partners tab

Business partner: Red bunny
Valid from date: <today's date>
Sales Transaction: checked

*** Sales Management testing the range1 : 1 - 9999 (5%)****

Create sales order for Red Bunny supplies with product : Hammer and qyt : 1 (line net amount : 5.22)
Complete Goods Shipment for the above generated SO
Complete Sales invoice for the above generated SO

Move to Master data management and click Business partner
Edit the Red bunny BP and click volume discount tab and click 'Generate Invoice' button. "process completed successfully message appears and Invoice id will be generated : <INV1>
Check the invoice details under volume discount settlement tab.

Open the above created invoice <INV1> and verify the invoice details.
  Sales Management || Transactions || Sales Invoice || Header

in line tab in the description it is mentioned as
(5.22*(4.04214559386973180076628352490421455939/100)) - 0
and line net amount -0.21.

But when i calculated through excel i am getting line amount as (5.22*5/100 = 0.261)

Actual amount is -0.21 whereas expected is -0.261


*** Again i tried to test the range2 : 10 000 - 14 999 (10%)****

Create sales order for Red Bunny supplies with product : Hammer and qyt:2000 (line net amount : 10440.00)
Complete Goods Shipment for the above generated SO
Complete Sales invoice for the above generated SO

Move to Master data management and click Business partner
Edit the Red bunny BP and click volume discount tab and click 'Generate Invoice' button. "process completed successfully message appears and Invoice id will be generated : <INV2>
Check the invoice details under volume discount settlement tab.

Open the above created invoice <INV2> and verify the invoice details.
  Sales Management || Transactions || Sales Invoice || Header

in line tab in the description it is mentioned as
(10445.22*(5.21015354391769632425166726981336917748/100)) - 0
and line net amount -544.21.

But when i calculated through excel i am getting line amount as (9999*5/100) + (441*10/100) = 544.05

Expected amount is -544.05 whereas actual amount is -544.21
250 final review, 250MP1
duplicate of feature request 0006516 new rmorley Review Scaled Volume Discount 
Issue History
2009-04-08 12:30sureshbabuNew Issue
2009-04-08 12:30sureshbabuAssigned To => rafaroda
2009-04-08 12:30sureshbabuRegression testing => No
2009-04-08 12:31sureshbabuTag Attached: 250 final review
2009-04-14 12:17psarobeStatusnew => scheduled
2009-04-14 12:17psarobefix_in_branch => pi
2009-04-22 10:40psarobePrioritynormal => high
2009-04-22 10:40psarobefix_in_branchpi =>
2009-04-22 12:24rafarodaAssigned Torafaroda => sathiyan
2009-04-22 12:48sathiyanAssigned Tosathiyan => vinothbabu
2009-04-23 16:04psarobeTag Attached: 250MP1
2009-04-28 11:05rafarodaRelationship addedrelated to 0006516
2009-04-28 12:05rafarodaRelationship addedduplicate of 0000651
2009-04-28 12:05rafarodaStatusscheduled => closed
2009-04-28 12:05rafarodaNote Added: 0015835
2009-04-28 12:05rafarodaDuplicate ID0 => 651
2009-04-28 12:05rafarodaResolutionopen => duplicate
2009-04-28 12:06rafarodaRelationship deleted0000651
2009-04-28 12:06rafarodaRelationship replacedduplicate of 0006516
2009-04-29 00:00anonymoussf_bug_id0 => 2783263

Notes
(0015835)
rafaroda   
2009-04-28 12:05   
Hi Suresh,

The calculation of SCALED Volume Discounts has to be completely reviewed (0000651).

Thank you for your detailed feedback.