Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005628Openbravo ERP02. Master data managementpublic2008-10-23 12:362009-04-21 10:33
jtarbal 
rafaroda 
urgentmajoralways
closedfixed 
5
2.40 
2.502.50beta 
Core
No
0005628: POS order synchronization error creates as many payments as order lines
When importing the sales orders registered in a OB POS (v2.20) into OB ERP (v2.40), if the sales order has more than one line, the sales order created in Openbravo ERP has as many payments as lines in the sales order. The amount of each of these payments is the total sales order amount. That means that, the payments are duplicated and thus it is wrong.

In order to reproduce the error, follow the next steps:
1.- Configure the OB POS integration with OB ERP
2.- In the POS, synchronize the products catalog. The products from the ERP will be created into the POS.
3.- In the POS, register a new sales of more than one line.
4.- In the POS, synchronize the sales orders.
5.- In the ERP, go to Master Data Management > Import Data > Import Orders. Check that this window contains the sales order lines created before in the POS.
6.- Double click on any of the lines and import the sales orders.
7.- Go to Sales Management > Transactions > Sales Order. Search the sales order imported and go to Payment tab. Realize that there is as many payments as lines in the sales order.
8.- Complete the sales order. See the error when completing this document.
To reproduce this issue both in trunk and branch 2.40 without using Openbravo POS do the following via Openbravo ERP:

0) Only for 2.40: go to 'Application Dictionary || Tables and Columns || Table', select I_Order and click on 'Create Columns' (this will add from the database Paymentrule1 and Paymentamount1 which will be needed for the import process)

1) Go to 'Master Data Management || Import Data || Import Loader Format'

2) Follow the steps of http://wiki.openbravo.com/wiki/QA_test_plan_2.50/Test_cases [^]
* Do not include Currency column
* Include Paymentrule1 column with data type String
* Include Paymentamount1 column with data type Number

3) Create an OrdersPOS.txt that will simulate 1 incoming order from Openbravo POS with 2 lines (hence, 1 payment that will be payed in Cash):
AA8758758,Standard Order,bellphone,beer,100,10.5,B,6410
AA8758758,Standard Order,bellphone,shirts,400,13.4,B,6410

4) Go to 'Master Data Management || Import Data || Import File Loader' and import OrderPOS.txt with Format File = Orders

5) Go to 'Master Data Management || Import Data || Import Orders || Import Order' and see that there are to lines (that correspond to one single order imported from POS)

6) For each of the lines set an Order Date

7) Click on 'Import Orders'

Success message display saying: Orders not imported: 0; Orders inserted: 1; Orders line inserted: 2;

8) Navigate to the Sales Order created.

9) Check that the Summed Line Amount = 6410

10) Go to Lines and see that the two lines have been inserted correctly.

11) Go to Payment and you will see two payments with Cash payment rule and Amount 6410 each: WRONG

12) However, go to the Header and complete this order. The order is completed successfully.
Only one Payment line per Order header should be created.
comsup_sprint7
depends on backport 00077052.50 closed rafaroda POS order synchronization error creates as many payments as order lines 
Issue History
2008-10-23 12:36jtarbalNew Issue
2008-10-23 12:36jtarbalAssigned To => cromero
2008-10-23 12:36jtarbalsf_bug_id0 => 2189089
2008-10-24 12:25adrianromeroAssigned Tocromero => jarek_wozniak
2008-10-24 12:25adrianromeroStatusnew => acknowledged
2008-10-24 12:25adrianromeroTarget Version => 2.50
2008-10-24 12:26adrianromeroStatusacknowledged => scheduled
2008-10-24 12:26adrianromerofix_in_branch => trunk
2008-12-03 19:03pjuvaraPrioritynormal => high
2009-01-30 16:54jarek_wozniakAssigned Tojarek_wozniak => rafaroda
2009-02-12 16:10pjuvaraNote Added: 0013419
2009-02-12 16:10pjuvaraPriorityhigh => urgent
2009-02-12 16:10pjuvarafix_in_branchtrunk =>
2009-02-18 18:43rafarodaStatusscheduled => feedback
2009-02-18 18:43rafarodaSummaryPOS order synchronization error => POS order synchronization error creates as many payments as order lines
2009-02-18 18:43rafarodaProposed Solution updated
2009-02-18 18:43rafarodaSteps to Reproduce Updated
2009-02-20 09:17rafarodaStatusfeedback => scheduled
2009-02-20 09:17rafarodaNote Added: 0013790
2009-02-20 09:17rafarodafix_in_branch => trunk
2009-02-23 12:07svnbotCheckin
2009-02-23 12:07svnbotNote Added: 0013913
2009-02-23 12:07svnbotStatusscheduled => resolved
2009-02-23 12:07svnbotResolutionopen => fixed
2009-02-23 12:07svnbotsvn_revision => 13513
2009-02-23 18:39rafarodaTag Attached: comsup_sprint7
2009-04-21 10:33psarobeStatusresolved => closed

Notes
(0013419)
pjuvara   
2009-02-12 16:10   
Increasing priority as this is blocking development progress for the POS team.
(0013790)
rafaroda   
2009-02-20 09:17   
Info provided by Mikel Irurita:

I have validated the issue with POS and ERP synchronization.

The result was the same as Rafa described in the steps to reproduce.

If the sales order has more than one line, the sales order created in Openbravo ERP has as many payments as lines in the sales order.

When I complete the Sale Order I don't get any error, the process finish correctly.
(0013913)
svnbot   
2009-02-23 12:07   
Repository: openbravo
Revision: 13513
Author: rafaroda
Date: 2009-02-23 12:07:50 +0100 (Mon, 23 Feb 2009)

Fixes bug 0005628 Import of orders now only creates a payment per order.

---
U trunk/src/org/openbravo/erpCommon/ad_process/ImportOrder.java
U trunk/src/org/openbravo/erpCommon/ad_process/ImportOrder_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=13513&sc=1 [^]