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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0044457
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2020-06-23 15:012020-07-17 13:04
ReportergorkaionView Statuspublic 
Assigned Toinigo_lerga 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
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

0044457: Wrong accounting dates on Landed Cost when Reference Date is before the documents being adjusted

DescriptionWhen a Landed Cost is posted the Reference Date is used as accounting date.

If the Receipts added to the landed cost have a movement date after the reference date they have adjustments posted before the receipt.

This is wrong as you are adjusting the accounting of a document before it is posted to the ledger.

The same happen when the invoices are matched with the costs and the matching is posted. In this case it is used the accounting date in the cost tab, this date is defaulted to the Reference Date of the Landed Cost. If the invoice has a later accounting date you are posting the matching journal on a date before the invoice is posted.
Steps To Reproduce1. Create a Landed Cost Type:
- Org: F&B España
- Product: Electricidad.
2. Create a Purchase Invoice
- Org: España Norte
- Accounting date: 23-04-2020
- Product Electricidad
- Amount of 320000 EUR
3. Create a Landed Cost:
- Org: España Norte
- Reference Date 01-10-2019
4. Add a Cost:
- Landed Cost Type the one created on step 1.
- Amount 300000EUR.
- Accounting Date 01-01-2020 (change default value based on header)
5. Add a Receipt:
- Select one with movement date after 1-10-2019 (for example 10000629 - 10-03-2020 - Bebidas Alegres, S.L.)
6. Process Landed Cost.
7. Post the Landed Cost.
8. Check the dates in the accounting tab under header are 01-10-2019.
-- KO! They should be the date of the receipt
9. Go to created purchase invoice line.
10. Click on March LC Costs and select created Landed Cost. Match the full amount of hte invoice line 320000.
11. Process it checking the create adjustment flag.
12. Go to Landed Cost Cost tab. If matching is not processed process it and check the create adjustment flag.
13. Post it.
14. Check the dates in the accounting tab under Cost tab are 01-01-2020.
-- KO! They should be the date of the invoice.
14. Check the dates in the accounting tab
Proposed Solution It should follow the same logic than in Cost Adjustment document.

- On the case of the Landed Cost accounting. It has to use the latest date form Receipts accounting date and Landed Cost Reference date.

- On the case of the Matching Cost accounting. It has to use the latest date from Matched Invoice accounting date and Landed Cost Cost accounting date.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0121260)
inigo_lerga (reporter)
2020-07-06 11:06

--Test Plan Mantis HQL--

As the F&B International Group Admin role in Backend:
  - Go to Landed Cost Type window and create a new record with
    "F&B España, S.A" as Organization and "Electricidad" as Product.
    Set any name desired and save the record.

  - Go to Purchase Invoice window and create a new record with
    "F&B España - Región Norte" as Organization and "Bebidas Alegres, S.L."
    as Business Partner. Set the Accounting Date to "23-04-2020".
    Go to Lines Tab and create a new Line with "Electricidad" as Product and
    320000 units as Invoiced Quantity.
    Save the record and press the Complete button in the header of the Purchase Invoice.

  - Go to Landed Cost window and create a new record with
    "F&B España - Región Norte" as Organization and "01-10-2019" as Reference Date.
    Go to Cost Tab and create a new Cost with 320000 as Amount and "01-01-2020" as
    Accounting Date.
    Go to Receipt Tab and choose the following Goods Receipt
    "10000629 - 10-03-2020 - Bebidas Alegres, S.L.".
    Go back to the header of the Landed Cost and press the Process and Done buttons.
    Now press the Post and OK button.
    #In this moment you can see that in Accounting Tab the Accouting Date used
    is the correct one "10-03-2020"#

  - Go to back to Purchase Invoice window, to Lines Tab and select the
    previously created one. Press the Match LC Costs button and select
    the only one available setting 320000 as Matched Amt.

  - Go back to Landed Cost window to Cost Tab and press the Process Matching
    button, enable the "Is Matching adjusted" checkbox and Post and OK button.
    #In this moment, in the Accounting Cost Subtab of Cost Tab, that the correct
    date "23-04-2020" is being used#
(0121487)
hgbot (developer)
2020-07-16 10:11

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/105 [^]
(0121500)
hgbot (developer)
2020-07-17 10:15

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 0566d5705d87a00feb2f9e3d085ed45601dae0df
Author: inigo_lerga <inigo.lerga@openbravo.com>
Date: 2020-07-17T08:10:28+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/0566d5705d87a00feb2f9e3d085ed45601dae0df [^]

fixes BUG-44457:Proper dates used in Landed Costs

- In the case of the Landed Cost accounting. It now uses the
latest date form Receipts accounting date and
Landed Cost Reference date.

- In the case of the Matching Cost accounting:
It now uses the latest date from Matched Invoice accounting date
and Landed Cost Cost accounting date.

---
M src/org/openbravo/erpCommon/ad_forms/DocLCCost.java
M src/org/openbravo/erpCommon/ad_forms/DocLandedCost.java
M src/org/openbravo/erpCommon/ad_forms/DocLineLCCost_data.xsql
M src/org/openbravo/erpCommon/ad_forms/DocLineLandedCost_data.xsql
---
(0121501)
hgbot (developer)
2020-07-17 10:15

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/105 [^]
(0121507)
hgbot (developer)
2020-07-17 13:04

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/107 [^]
(0121508)
hgbot (developer)
2020-07-17 13:04

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b9b0d75f281959bf958a63c15ddab368cd2bfc1b
Author: david.miguelez <david.miguelez@openbravo.com>
Date: 2020-07-17T13:01:27+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b9b0d75f281959bf958a63c15ddab368cd2bfc1b [^]

Related to ISSUE-44457. Fixes Costing Automated Tests

---
M src-test/src/org/openbravo/test/costing/utils/TestCostingUtils.java
---
(0121509)
hgbot (developer)
2020-07-17 13:04

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/107 [^]

- Issue History
Date Modified Username Field Change
2020-06-23 15:01 gorkaion New Issue
2020-06-23 15:01 gorkaion Assigned To => Triage Finance
2020-06-23 15:01 gorkaion Modules => Core
2020-06-23 15:01 gorkaion Resolution time => 1594677600
2020-06-23 15:01 gorkaion Triggers an Emergency Pack => No
2020-06-23 17:17 dmiguelez Assigned To Triage Finance => inigo_lerga
2020-06-24 09:15 inigo_lerga Status new => scheduled
2020-07-06 11:06 inigo_lerga Note Added: 0121260
2020-07-16 10:11 hgbot Note Added: 0121487
2020-07-17 10:15 hgbot Resolution open => fixed
2020-07-17 10:15 hgbot Status scheduled => closed
2020-07-17 10:15 hgbot Note Added: 0121500
2020-07-17 10:15 hgbot Note Added: 0121501
2020-07-17 13:04 hgbot Note Added: 0121507
2020-07-17 13:04 hgbot Note Added: 0121508
2020-07-17 13:04 hgbot Note Added: 0121509


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker