Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023066Openbravo ERP03. Procurement managementpublic2013-02-13 11:232013-02-20 04:50
mirurita 
eduardo_Argal 
normalmajoralways
closedfixed 
20Community Appliance
pi 
pi 
mirurita
Core
No
0023066: Matched Invoices accounting not using breakdown information
Matched Invoices accounting not using breakdown information.
The price difference between order and invoice should be distributed taking in account the breakdown of the invoice (which has been inherited from the order).
1) Login as System Administrator
2) Go to Purchase Order || Accounting dimension tab and change:
  - UI Pattern: Standard
  - Active: true
3) Login as F&B International Group Admin
4) Create 2 projects
  - MyProject1
  - MyProject2
5) Enable project dimension to be displayed at purchase order line breakdown
6) Go to Product window and update
     - Cerveza Ale 0,5L
          - Product Type: expense type
          - Sale: false
          - Book Using Purchase Order Price: true
7) Create new Purchase Order
  Header
   - Organization: F&B España - Región Norte
   - Business Partner: Bebidas Alegres, S.L.

   * Line
     - Line No: 10
     - Product: Cerveza Ale 0,5L
     - Ordered Quantity: 100
     - Net Unit Price: 1.36
     - Tax: Compras exentas

      * Accounting dimension 1
        - Line: 10
        - Amount: 100
        - Project: MyProject1
      * Accounting dimension
        - Line: 20
        - Amount: 36
        - Project: MyProject2
8) Post the Purchase Order
100 debit (MyProject1)
 36 debit (MyProject1)

9) Go to Pending Goods receipts and receive the full order
10) Enable goods receipt accounting (General Ledger Configuration || Active Tables) for Spain
11) Go to created Goods Receipt document and post
12) Fully invoice the previous order as follows:
   * Line
     - Line No: 10
     - Product: Cerveza Ale 0,5L
     - Ordered Quantity: 100
     - Net Unit Price: 1.4 (prices has changed!!!!)
     - Tax: Compras exentas
      * Accounting dimension 1
        - Line: 10
        - Amount: 102,94
        - Project: MyProject1
      * Accounting dimension
        - Line: 20
        - Amount: 37,06
        - Project: MyProject2

13) Post the invoice
102.94 debit (MyProject1)
37.06 debit (MyProject2)

14) Enable matched invoices accounting (General Ledger Configuration || Active Tables) for Spain
15) Post the matched invoice
Realize that the difference it is not taking in account the breakdown.
See attached screenshot.

----------------------------------
4 debit (the assigned project is wrong)
                                          140 credit (the assigned project is wrong)
----------------------------------

it should be:

----------------------------------
1.06 debit (MyProject1)
2.94 debit (MyProject2)
                          102.94 credit (MyProject1)
                          37.06 credit (MyProject2)
----------------------------------
No tags attached.
related to defect 0031354 closed vmromanos Wrong amtsourcedr and amtsourcecr when posting a Matched Invoice document 
png MathedInvoices_breakdown_accounting.png (14,528) 2013-02-13 11:23
https://issues.openbravo.com/file_download.php?file_id=5977&type=bug
png
Issue History
2013-02-13 11:23miruritaNew Issue
2013-02-13 11:23miruritaAssigned To => dmiguelez
2013-02-13 11:23miruritaFile Added: MathedInvoices_breakdown_accounting.png
2013-02-13 11:23miruritaModules => Core
2013-02-13 11:23miruritaTriggers an Emergency Pack => No
2013-02-13 13:06eduardo_ArgalAssigned Todmiguelez => eduardo_Argal
2013-02-13 17:26eduardo_ArgalStatusnew => scheduled
2013-02-13 17:26eduardo_Argalfix_in_branch => pi
2013-02-14 12:32hgbotCheckin
2013-02-14 12:32hgbotNote Added: 0056439
2013-02-14 12:32hgbotStatusscheduled => resolved
2013-02-14 12:32hgbotResolutionopen => fixed
2013-02-14 12:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/82031a01853c9878faf812a2e049b5782b44e2e9 [^]
2013-02-15 18:05miruritaReview Assigned To => mirurita
2013-02-15 18:05miruritaNote Added: 0056496
2013-02-15 18:05miruritaStatusresolved => closed
2013-02-15 18:05miruritaFixed in Version => pi
2013-02-20 04:50hudsonbotCheckin
2013-02-20 04:50hudsonbotNote Added: 0056601
2015-11-16 12:42vmromanosRelationship addedrelated to 0031354

Notes
(0056439)
hgbot   
2013-02-14 12:32   
Repository: erp/devel/pi
Changeset: 82031a01853c9878faf812a2e049b5782b44e2e9
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Thu Feb 14 12:32:14 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/82031a01853c9878faf812a2e049b5782b44e2e9 [^]

Fixes bug 23066

---
M src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java
M src/org/openbravo/erpCommon/ad_forms/DocMatchInv_data.xsql
---
(0056496)
mirurita   
2013-02-15 18:05   
code review + testing OK

Testing Plan
1) Create new Purchase Order
  Header
   - Organization: F&B España - Región Norte
   - Business Partner: Refrescos Naturales S.A.
   * Line
     - Line No: 10
     - Product: Agua sin Gas 1L
     - Ordered Quantity: 100
     - Net Unit Price: 1.02
     - Tax: Compras exentas

2) Go to Pending Goods receipts and receive the full order
3) Enable goods receipt accounting (General Ledger Configuration || Active Tables)
4) Go to created Goods Receipt document and post
5) Create a purchase invoice from purchase order of step 3
6) Update the unit price to 1.03. The total of the invoice will be 103
7) Complete and post the invoice
8) Enable matched invoices accounting (General Ledger Configuration || Active Tables)
9) Configure invoice price variance account for "Agua sin Gas 1L" product.
10) Got o Matched Invoices window and post the record generated for previous invoice.
11) Go to "Accounting Transactions Details" window and apply filters to check if the 1€ of difference has been posted.
(0056601)
hudsonbot   
2013-02-20 04:50   
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/d828167a9e83 [^]

Maturity status: Test