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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027280
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2014-08-05 15:172015-01-26 16:22
ReporterngarciaView Statuspublic 
Assigned Toreinaldoguerra 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisione96f620e6758
ProjectionnoneETAnoneTarget Version3.0PR15Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Topramakrishnan
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027280: Commission payment details are duplicated if the invoice has fractionated payment terms

DescriptionCommission payment details are duplicated if the invoice has fractionated payment terms
Steps To ReproduceAs 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0030184 closedaferraz Wrong commission amount if the invoice has fractionated payment terms but it is paid in the same commission period 

-  Notes
(0071837)
reinaldoguerra (developer)
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 (developer)
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
---
(0072418)
pramakrishnan (developer)
2014-12-11 09:53

Code Review + Testing - OK.
(0072443)
hgbot (developer)
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
---
(0073207)
hudsonbot (developer)
2014-12-30 23:27

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/6525fe229e06 [^]
Maturity status: Test
(0073210)
hudsonbot (developer)
2014-12-30 23:27

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/6525fe229e06 [^]
Maturity status: Test

- 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 Modules => Core
2014-08-05 15:17 ngarcia Triggers an Emergency Pack => No
2014-08-05 15:18 ngarcia Issue Monitored: networkb
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 View Revisions
2014-12-06 05:05 reinaldoguerra Note Edited: 0071837 View Revisions
2014-12-11 00:15 reinaldoguerra Note Edited: 0071837 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker