Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0027280 | Openbravo ERP | 07. Sales management | public | 2014-08-05 15:17 | 2015-01-26 16:22 |
|
Reporter | ngarcia | |
Assigned To | reinaldoguerra | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR15Q1 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | pramakrishnan |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | 30125 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0027280: Commission payment details are duplicated if the invoice has fractionated payment terms |
Description | Commission payment details are duplicated if the invoice has fractionated payment terms |
Steps To Reproduce | As group admin role:
Create a Payment Term header:
Overdue Payment Days Rule: 30
Add a line to it:
Percentage due: 50
Overdue Payment Days Rule: 0
Create a Commission with:
Business Partner / Sales Rep.: define one
Frequency Type: Monthly
Basis Document: Invoice
Basis Status. Fully paid docuemnts
Basis Amount: Net amount
Add a line to it:
Based on Sales Rep. = Y
Multiplier amount: 0.5
Create a Sales Invoice and associate the previously created payment terms and the sales representative to it.
Complete it and pay the whole amount
Generate Commission
Go to the Commission Payment - Amounts - Details tab and check the invoice appears twice |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0030184 | | closed | aferraz | Wrong commission amount if the invoice has fractionated payment terms but it is paid in the same commission period |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2014-08-05 15:17 | ngarcia | New Issue | |
2014-08-05 15:17 | ngarcia | Assigned To | => jonalegriaesarte |
2014-08-05 15:17 | ngarcia | OBNetwork customer | => No |
2014-08-05 15:17 | ngarcia | Modules | => Core |
2014-08-05 15:17 | ngarcia | Support ticket | => 30125 |
2014-08-05 15:17 | ngarcia | Resolution time | => 1409608800 |
2014-08-05 15:17 | ngarcia | Triggers an Emergency Pack | => No |
2014-08-05 15:18 | ngarcia | Issue Monitored: networkb | |
2014-10-02 11:07 | ngarcia | OBNetwork customer | No => Yes |
2014-10-02 11:42 | jonalegriaesarte | Assigned To | jonalegriaesarte => AtulOpenbravo |
2014-10-02 11:42 | jonalegriaesarte | Target Version | => 3.0PR15Q1 |
2014-11-19 00:08 | reinaldoguerra | Assigned To | AtulOpenbravo => reinaldoguerra |
2014-11-19 00:08 | reinaldoguerra | Status | new => scheduled |
2014-11-20 01:54 | reinaldoguerra | Note Added: 0071837 | |
2014-11-20 01:56 | reinaldoguerra | Note Edited: 0071837 | bug_revision_view_page.php?bugnote_id=0071837#r7103 |
2014-12-06 05:05 | reinaldoguerra | Note Edited: 0071837 | bug_revision_view_page.php?bugnote_id=0071837#r7219 |
2014-12-11 00:15 | reinaldoguerra | Note Edited: 0071837 | bug_revision_view_page.php?bugnote_id=0071837#r7243 |
2014-12-11 09:51 | hgbot | Checkin | |
2014-12-11 09:51 | hgbot | Note Added: 0072417 | |
2014-12-11 09:51 | hgbot | Status | scheduled => resolved |
2014-12-11 09:51 | hgbot | Resolution | open => fixed |
2014-12-11 09:51 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e96f620e675872dff29917e9e2363d533592dc57 [^] |
2014-12-11 09:53 | pramakrishnan | Review Assigned To | => pramakrishnan |
2014-12-11 09:53 | pramakrishnan | Note Added: 0072418 | |
2014-12-11 09:53 | pramakrishnan | Status | resolved => closed |
2014-12-12 07:04 | hgbot | Checkin | |
2014-12-12 07:04 | hgbot | Note Added: 0072443 | |
2014-12-30 23:27 | hudsonbot | Checkin | |
2014-12-30 23:27 | hudsonbot | Note Added: 0073207 | |
2014-12-30 23:27 | hudsonbot | Checkin | |
2014-12-30 23:27 | hudsonbot | Note Added: 0073210 | |
2015-01-26 16:22 | ngarcia | Issue cloned | 0028772 |
2015-06-15 16:08 | ngarcia | Relationship added | causes 0030184 |
2015-06-16 19:31 | aferraz | Relationship deleted | causes 0030184 |
2015-06-16 19:31 | aferraz | Relationship added | related to 0030184 |
Notes |
|
(0071837)
|
reinaldoguerra
|
2014-11-20 01:54
(edited on: 2014-12-11 00:15) |
|
Test plan used:
1- Login into Openbravo ERP
2- Go to Payment Term window and create a new header record.
3- Set Overdue Payment Days Rule: 30
4- Add a new line to it
5- Set Percentage due: 50 and Overdue Payment Days Rule: 0
6- Go to Commission window and create a new header
7- Select a Business Partner / Sales Rep (create a new one if is required).
Set Frequency Type: Monthly
Basis Document: Invoice
Basis Status. Fully paid docuemnts
Basis Amount: Net amount
8- Go to lines tab and create a new record
9- Check Based on Sales Rep. flag and set Multiplier amount: 0.5
10- Go to Sales Invoice window and create a new one selecting the same sales representative and the previously created payment terms.
11- Add a line with a product
11- Complete it
12- Pay the whole amount by clicking add payment button, realize that two record are selected in the invoice grid as the invoice has fractionated payment terms. Complete the process.
13- Go back to Commission window, select previous commision record and click in Generate Commission button
14- Go to the Commission Payment window, select created record, go to Amounts tab and then select Details tab.
15- Realize that one record per invoice is shown.
16- Execute ant update.database and realize that duplicated data are deleted for other Commission Payments. Also quantities and amounts are correctly updated.
|
|
|
(0072417)
|
hgbot
|
2014-12-11 09:51
|
|
Repository: erp/devel/pi
Changeset: e96f620e675872dff29917e9e2363d533592dc57
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Dec 10 17:48:00 2014 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/e96f620e675872dff29917e9e2363d533592dc57 [^]
Fixed bug 27280: Commission payment details are duplicated in some cases.
Generate commision process was changed to exclude the same records when retrieving data to be inserted in the payment detail table. This information comes duplicated due to the payment is divided in two records as the invoice has fractionated payment terms.
Thus the stored procedure was changed only in those cases when the commission basis document is an invoice, and the information related with the payments and its products are joined in the same query, avoiding duplicated tuples.
Now there are not duplicated fields when processing commissions for invoices with fractionated payment terms. Also a module script was developed to correct inconsistent data. When executing an ant update database duplicated data in commission detail table will be deleted, also amounts and quantities will be updated in commission amount and commission payment tables with the correct information.
---
M src-db/database/model/functions/C_COMMISSION_PROCESS.xml
A src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateCommissionDetail.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateCommissionDetailData.class
A src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateCommissionDetail.java
A src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateCommissionDetail_data.xsql
---
|
|
|
|
Code Review + Testing - OK. |
|
|
(0072443)
|
hgbot
|
2014-12-12 07:04
|
|
Repository: erp/devel/pi
Changeset: 70a223e52c0844e430449ed1dd8655c31b19dc0d
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Thu Dec 11 12:43:38 2014 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/70a223e52c0844e430449ed1dd8655c31b19dc0d [^]
Related to issue 27280: Changes required in module script in order to improve it
Some changes were made in Delete Duplicate Commission Detail module script in order to improve it. A short comment indicating the issue to solve, was added in the java class and the dummy sql method was replaced for the really used selecting logic.
---
M src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateCommissionDetail.class
M src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateCommissionDetailData.class
M src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateCommissionDetail.java
M src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateCommissionDetail_data.xsql
---
|
|
|
|
|
|
|
|