Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030073Openbravo ERP07. Sales managementpublic2015-06-02 12:392015-08-20 23:16
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
 
vmromanos
Core
No
0030073: Different Alternate Tax Base Amount in a partial invoice from order depending on the process used
Different Alternate Tax Base Amount in a partial invoice from order depending on the process used
As group admin role:
   Set the Entregas IVA 21% as Base Amount = Alternate Tax Base Amount
   Create a Sales Order with Invoice Terms = After Delivery
   Add two units of a product, change the Alternate Taxable Amount and book it
   Create a Goods Shipment from it and update the quantity received to 1
   Launch the Create Invoice From Orders process for that order and check the Alternate Taxable Amount is copied from the sales order (although quantity is different)
   In case you create the invoice with the Create Lines from process, the Alternate Taxable Amount is defaulted to the Line Net Amount
No tags attached.
causes defect 00306983.0PR15Q4 closed aferraz It is not possible to add the lines to a Reversal Sales Invoice 
Issue History
2015-06-02 12:39ngarciaNew Issue
2015-06-02 12:39ngarciaAssigned To => Triage Finance
2015-06-02 12:39ngarciaModules => Core
2015-06-02 12:39ngarciaResolution time => 1436738400
2015-06-02 12:39ngarciaTriggers an Emergency Pack => No
2015-06-02 12:40ngarciaIssue Monitored: networkb
2015-06-02 17:41AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2015-06-02 17:56AtulOpenbravoStatusnew => scheduled
2015-06-04 18:10AtulOpenbravoNote Added: 0078098
2015-07-06 18:42AtulOpenbravoNote Edited: 0078098bug_revision_view_page.php?bugnote_id=0078098#r8987
2015-07-08 09:21vmromanosNote Added: 0078728
2015-07-08 09:22hgbotCheckin
2015-07-08 09:22hgbotNote Added: 0078729
2015-07-08 09:22hgbotStatusscheduled => resolved
2015-07-08 09:22hgbotResolutionopen => fixed
2015-07-08 09:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/29b1d32b4ac50de247fe197aa64f7c5c2523c8e1 [^]
2015-07-08 09:22hgbotCheckin
2015-07-08 09:22hgbotNote Added: 0078730
2015-07-08 09:22vmromanosReview Assigned To => vmromanos
2015-07-08 09:22vmromanosNote Added: 0078731
2015-07-08 09:22vmromanosStatusresolved => closed
2015-07-16 11:56gorka_gilFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/29b1d32b4ac50de247fe197aa64f7c5c2523c8e1 [^] => http://code.openbravo.com/erp/devel/pi/rev/f893e3c2c041 [^]
2015-07-16 11:56gorka_gilNote Edited: 0078729bug_revision_view_page.php?bugnote_id=0078729#r9034
2015-07-16 11:56gorka_gilNote Edited: 0078730bug_revision_view_page.php?bugnote_id=0078730#r9036
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079483
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079484
2015-08-31 08:45aferrazRelationship addedcauses 0030698

Notes
(0078098)
AtulOpenbravo   
2015-06-04 18:10   
(edited on: 2015-07-06 18:42)
Test Plan
- Login as Group Admin role.
- Set the Entregas IVA 21% as Base Amount = Alternate Tax Base Amount.
- Create a Sales Order with Invoice Terms = After Delivery
- Add two units of a product, change the Alternate Taxable Amount and book it
- Create a Goods Shipment from it and update the quantity received to 1
- Launch the Create Invoice From Orders process for that order and check that Alternate Taxable Amount in Invoice is in proportion of Alternate Taxable Amount of Sales Order Line with respect to the quantity being invoiced.
- Check that if you create the invoice with the Create Lines from process, the Alternate Taxable Amount is same as in the previous step.

(0078728)
vmromanos   
2015-07-08 09:21   
Alternative Test Plan
- Login as Group Admin role.
- Set the Entregas IVA 21% as Base Amount = Alternate Tax Base Amount.
- Create a Sales Order with Invoice Terms = After Delivery
- Add two units of a product, change the Alternate Taxable Amount and book it
- Create a Goods Shipment from it and update the quantity received to 1
- Launch the Generate Invoices process for that order and check that Alternate Taxable Amount in Invoice is in proportion of Alternate Taxable Amount of Sales Order Line with respect to the quantity being invoiced.
- Check that if you create the invoice with the Create Lines from process, the Alternate Taxable Amount is same as in the previous step.
(0078729)
hgbot   
2015-07-08 09:22   
(edited on: 2015-07-16 11:56)
Repository: erp/devel/pi
Changeset: f893e3c2c041
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jul 07 16:04:14 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/f893e3c2c041 [^]

Fixes Issue 30073:Different Alternate Tax Base Amount in a partial invoice
from order depending on the process used

Fix takes care to copy proportionate alternate taxable amount as per qty
being invoiced of the sales order line alternate tax amount. It applies
for both Create Lines From process in Sales Invoice and Create Invoices
From Order process.

Divide by zero is taken care of and cur precision is used
while division operation for rounding purpose.

---
M src-db/database/model/functions/C_INVOICE_CREATE.xml
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
---

(0078730)
hgbot   
2015-07-08 09:22   
(edited on: 2015-07-16 11:56)
Repository: erp/devel/pi
Changeset: c82b3ab5e581
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Jul 07 18:49:21 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c82b3ab5e581 [^]

Related to issue 30073: code review improvements

CreateFrom.java:
1. Use admin mode to get order line
2. Avoid possible NPE when getting data[i].cOrderlineId

C_INVOICE_CREATE:
1. Added rounding to currency precission
2. Tax Base Amount pro-rating support when running Generate Invoices and we select a partially shipped order

---
M src-db/database/model/functions/C_INVOICE_CREATE.xml
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
---

(0078731)
vmromanos   
2015-07-08 09:22   
Code review + testing OK
(0079483)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test
(0079484)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test