Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035715
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 07. Sales managementmajoralways2017-04-05 09:562017-04-11 10:10
ReporterngarciaView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityimmediateResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revision938c74e71d3e
ProjectionnoneETAnoneTarget Version3.0PR17Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2015-07-16
Regression introduced in release3.0PR15Q4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^]
Triggers an Emergency PackNo
Summary

0035715: Wrong total gross amount when reactivating an order or a invoice which includes a basic discount of 100%

DescriptionWrong total gross amount when reactivating an order or a invoice which includes a basic discount of 100%
Steps To ReproduceAs group admin role:
   Create a Basic Discount of 100%
   Assign it to Hoteles Buenas Noches, S.A. business partner
   Create a sales invoice to it
   Check the discount is shown in the Basic Discounts tab
   Add a product to it with a tax rate different from 0 and check the Total Net Amount and Total Gross Amounts are correct (Total Gross Amount = Total Net Amount + Tax Amount
   Complete it and check both Total Gross Amount and Total Net Amount are 0 (discount is applied)
   Reactivate it and check the Total Gross Amount is wrong, it does not include the tax amount (Total Gross Amount = Total Net Amount)
   If you now remove the discount and complete the invoice again, the total gross amount will remain wrong
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0035699 closedAtulOpenbravo Wrong total gross amount when reactivating an order or a invoice which includes a basic discount of 100% 

-  Notes
(0095913)
AtulOpenbravo (developer)
2017-04-07 14:07

Test Plan:-
- Login as Group Admin role.
- Create a Basic Discount of 100%.
- Assign it to Hoteles Buenas Noches, S.A. business partner.
- Create a sales invoice for above business partner.
- Add the discount of 100% in the Basic Discounts tab.
- Add a product to it with a tax rate different from 0
  for eg: Entregas IVA 21%, Unit Price = 10, Ordered Qty =1000
- Check the Total Net Amount and Total Gross Amounts are correct. (Total Gross Amount = Total Net Amount + Tax Amount.
  Total Gross Amount = 12100, Total Net Amount = 10000, Tax Amount = 2100.
- Complete it and check both Total Gross Amount and Total Net Amount are 0 (as discount is applied).
- Reactivate it and check the Total Gross Amount is correct, it does include the tax amount (Total Gross Amount = Total Net Amount).
  Total Gross Amount = 12100, Total Net Amount = 10000, Tax Amount = 2100.
- Remove the discount and complete the invoice again, check that total gross amount is set properly.
  Total Gross Amount = 12100, Total Net Amount = 10000, Tax Amount = 2100.
(0095914)
AtulOpenbravo (developer)
2017-04-07 14:14

Test Plan

- Login as Group Admin role.
- Create a Basic Discount of 100%.
- Create a Purchase Price List with price includes tax flag = Yes.
- Create a version for Purchase Price List.
- Add Product Price for product "Vino Blanco 0,75L" and Unit Price = List Price = 10.
- Create a Purchase Order for business partner "Bebidas Alegres, S.L." with pricelist "Purchase Price List".
- Add product "Vino Blanco 0,75L", Ordered Qty = 1000.
- As Price List Includes Tax, Unit Price is set as 8.26.
- Add 100% Discount in Basic Discount Tab.
- Check Gross Amount = 10000, Total Net Amount = 8264.46.
- Complete the Order.
- Check Gross Amount = 0, Total Net Amount = 0.
- Reactivate the Order.
- Check Gross Amount = 10000, Total Net Amount = 8264.46.
- Delete the Basic Discount record.
- Complete the Order again.
- Check Gross Amount = 10000, Total Net Amount = 8264.46.

Repeat same test plan for Purchase Invoice.
(0095915)
AtulOpenbravo (developer)
2017-04-07 14:15

Test Plan

- Login as Group Admin role.
- Create a Purchase Order for business partner "La Fruta es la Vida, S.L." with pricelist "Tarifa La Fruta es la Vida".
- Add product "Zumo de Pera 0,5L", Ordered Qty = 1000, Unit Price = 0.75
- Add product "Zumo de Pera 0,5L", Ordered Qty = 1000, Unit Price = 0.75
- Add 5% Discount in Basic Discount Tab.
- Check Gross Amount = 1815, Total Net Amount = 1500.
- Complete the Order.
- Check Gross Amount = 1724.25, Total Net Amount = 1425.
- Reactivate the Order.
- Check Gross Amount = 1815, Total Net Amount = 1500.
- Delete the Basic Discount record.
- Complete the Order again.
- Check Gross Amount = 1815, Total Net Amount = 1500.

Repeat same test plan for Purchase Invoice.
(0095955)
hgbot (developer)
2017-04-10 21:08

Repository: erp/backports/3.0PR17Q2
Changeset: 938c74e71d3ed3774b38655d167bb966b39f7703
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Apr 07 00:50:19 2017 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR17Q2/rev/938c74e71d3ed3774b38655d167bb966b39f7703 [^]

Fixes Issue 35715:Wrong total gross amount when reactivating an order or a
invoice which includes a basic discount of 100%

In PostgreSQL instance to achieve trigger execution in order to update
c_invoicetax, c_ordertax properly before deleting discount invoice and
order lines, c_invoicelinetax and c_orderlinetax lines are deleted.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0095965)
aferraz (manager)
2017-04-11 10:10

Code review + Testing OK

- Issue History
Date Modified Username Field Change
2017-04-06 16:59 AtulOpenbravo Type defect => backport
2017-04-06 16:59 AtulOpenbravo Target Version => 3.0PR17Q2
2017-04-06 17:03 AtulOpenbravo Regression level => Production - Confirmed Stable
2017-04-06 17:03 AtulOpenbravo Regression date => 2015-07-16
2017-04-06 17:03 AtulOpenbravo Regression introduced in release => 3.0PR15Q4
2017-04-06 17:03 AtulOpenbravo Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/8860b648abb2 [^]
2017-04-07 14:07 AtulOpenbravo Note Added: 0095913
2017-04-07 14:14 AtulOpenbravo Note Added: 0095914
2017-04-07 14:15 AtulOpenbravo Note Added: 0095915
2017-04-10 21:08 hgbot Checkin
2017-04-10 21:08 hgbot Note Added: 0095955
2017-04-10 21:08 hgbot Status scheduled => resolved
2017-04-10 21:08 hgbot Resolution open => fixed
2017-04-10 21:08 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q2/rev/938c74e71d3ed3774b38655d167bb966b39f7703 [^]
2017-04-11 10:10 aferraz Review Assigned To => aferraz
2017-04-11 10:10 aferraz Note Added: 0095965
2017-04-11 10:10 aferraz Status resolved => closed
2017-04-11 10:10 aferraz Fixed in Version => 3.0PR17Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker