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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0015539
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementtrivialalways2010-12-29 04:252012-04-21 14:24
ReporterchelipfView Statuspublic 
Assigned ToSandrahuguet 
PrioritylowResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revisionf179cd5a8223
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0015539: C_INVOICE_POST code clean up

Descriptionv_granttotal variable is set twice.

....
        SELECT c_getwithholding(v_record_id) INTO withholdamount FROM dual;
      ELSE
        withholdamount:=0;
      END IF;

1192>>>1> v_GrandTotal:=C_Currency_Round(v_GrandTotal+v_TaxNoRecalculable, v_Currency_ID, NULL) ;
1193>>>2> SELECT COALESCE(SUM(TAXAMT), 0) INTO v_GrandTotal
      FROM C_INVOICETAX
      WHERE C_INVOICE_ID = v_Record_ID;
      v_GrandTotal:=v_GrandTotal+ v_TotalLines;
      UPDATE C_INVOICE
      SET TotalLines=v_TotalLines,
          GrandTotal=v_GrandTotal,

....
Proposed SolutionDelete the first sentence.
TagsVMA-Reviewed
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0033421)
jpabloae (reporter)
2010-12-29 08:52

Moving to the Openbravo ERP project.
(0047713)
Sandrahuguet (developer)
2012-04-18 17:29

Test Plan:
-Debug C_INVOICE_POST
-Notice that v_GrandTotal:=C_Currency_Round(v_GrandTotal+v_TaxNoRecalculable, v_Currency_ID, NULL) ; is not necessary, because the following line set v_GrandTotal to.
(0047799)
hgbot (developer)
2012-04-20 15:34

Repository: erp/devel/pi
Changeset: f179cd5a82239bf40125b3d9d81845d1782ac678
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri Apr 20 12:16:11 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f179cd5a82239bf40125b3d9d81845d1782ac678 [^]

Fixed issue 15539 Delete not necessary lines in C_INVOICE_POST

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0047804)
mirurita (developer)
2012-04-20 15:40

code review + testing OK

Postgresql
If STRICT is not specified in SELECT INTO statement, then target will be set to the first row returned by the query, or to nulls if the query returned no rows.
The value is always overwritten because you have a coalesce(value, 0)

Oracle
SELECT INTO statement must return at least one row. In the select does not return any value you get the following exception
ORA-01403: no data found
(0047855)
hudsonbot (developer)
2012-04-21 14:24

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/2eb57286c1fc [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2010-12-29 04:25 chelipf New Issue
2010-12-29 04:25 chelipf Assigned To => staffrm
2010-12-29 08:51 jpabloae Project Openbravo Deployment Options => Openbravo ERP
2010-12-29 08:52 jpabloae Modules => Core
2010-12-29 08:52 jpabloae Note Added: 0033421
2010-12-29 08:52 jpabloae Assigned To staffrm => dalsasua
2010-12-29 08:52 jpabloae Category Appliance stack => 09. Financial management
2010-12-29 08:52 jpabloae version 2.50-17-4 =>
2011-07-20 18:17 dalsasua Assigned To dalsasua => jonalegriaesarte
2011-09-27 16:53 psarobe Status new => scheduled
2011-09-27 16:53 psarobe fix_in_branch => pi
2012-02-15 19:04 iciordia Assigned To jonalegriaesarte => vmromanos
2012-02-16 16:29 vmromanos Tag Attached: VMA-Reviewed
2012-04-18 16:17 Sandrahuguet Assigned To vmromanos => Sandrahuguet
2012-04-18 17:29 Sandrahuguet Note Added: 0047713
2012-04-20 15:34 hgbot Checkin
2012-04-20 15:34 hgbot Note Added: 0047799
2012-04-20 15:34 hgbot Status scheduled => resolved
2012-04-20 15:34 hgbot Resolution open => fixed
2012-04-20 15:34 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f179cd5a82239bf40125b3d9d81845d1782ac678 [^]
2012-04-20 15:40 mirurita Note Added: 0047804
2012-04-20 15:40 mirurita Status resolved => closed
2012-04-21 14:24 hudsonbot Checkin
2012-04-21 14:24 hudsonbot Note Added: 0047855


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker