Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036148Openbravo ERP07. Sales managementpublic2017-05-31 10:382017-06-08 17:12
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0036148: Invoices from organizations that do not belong to the organization's tree are taken into account for calculating commissions
Invoices from organizations that do not belong to the organization's tree are taken into account for calculating commissions
As group admin role:
   Create a Business Partner for F&B International Group organization
   Set it as Employee and Sales Representative
   Create a User and assign the previously created business partner

   Create a sales invoice for F&B España, S.A
   Set the previously created BP as Sales Representative
   Add a product and complete it

   Create a sales invoice for F&B US, Inc.
   Set the previously created BP as Sales Representative
   Add a product and complete it

   Create a commission:
      Organization: for F&B España, S.A
      Business Partner / Sales Rep: <previously created one>
      Frequency Type: Monthly
      Basis Document: Invoice
      Basis Status: All documents
      Basis Amount: Net Amount
   Add a line to it
      Based on Sales Rep: Y
      Multiplier Amount: <set one>

   Launch the Generate Commission process
   Go to Commission Payment - Amounts- Details tab and check the invoice for
F&B US, Inc. is included and it should not
No tags attached.
Issue History
2017-05-31 10:38ngarciaNew Issue
2017-05-31 10:38ngarciaAssigned To => Triage Finance
2017-05-31 10:38ngarciaModules => Core
2017-05-31 10:38ngarciaResolution time => 1497996000
2017-05-31 10:38ngarciaTriggers an Emergency Pack => No
2017-05-31 10:38ngarciaIssue Monitored: networkb
2017-05-31 11:56aferrazAssigned ToTriage Finance => AtulOpenbravo
2017-05-31 13:14AtulOpenbravoStatusnew => scheduled
2017-06-01 06:59AtulOpenbravoNote Added: 0097065
2017-06-01 12:40hgbotCheckin
2017-06-01 12:40hgbotNote Added: 0097074
2017-06-01 12:40hgbotStatusscheduled => resolved
2017-06-01 12:40hgbotResolutionopen => fixed
2017-06-01 12:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/59898e805bfd1c29f21470c006be1221c6e8d467 [^]
2017-06-01 12:41aferrazReview Assigned To => aferraz
2017-06-01 12:41aferrazNote Added: 0097075
2017-06-01 12:41aferrazStatusresolved => closed
2017-06-01 12:41aferrazFixed in Version => 3.0PR17Q3
2017-06-08 17:12hudsonbotCheckin
2017-06-08 17:12hudsonbotNote Added: 0097228

Notes
(0097065)
AtulOpenbravo   
2017-06-01 06:59   
Test Plan

- Login as group admin role:
- Create a Business Partner for F&B International Group organization
   - Set it as Employee and Sales Representative
   - Create a User and assign the previously created business partner

- Create a sales invoice for F&B España, S.A
   - Set the previously created BP as Sales Representative
   - Add a product and complete it

- Create a sales invoice for F&B España, Region Sur Organization.
   - Set the previously created BP as Sales Representative
   - Add a product and complete it

- Create a sales invoice for F&B US, Inc.
   - Set the previously created BP as Sales Representative
   - Add a product and complete it

- Create a sales invoice for F&B España, Region Norte Organization
   - Set the previously created BP as Sales Representative
   - Add a product and complete it

- Create a commission:
   - Organization: for F&B España, S.A
   - Business Partner / Sales Rep: <previously created one>
   - Frequency Type: Monthly
   - Basis Document: Invoice
   - Basis Status: All documents
   - Basis Amount: Net Amount

- Add a line to it
   - Based on Sales Rep: Y
   - Multiplier Amount: <set one>

- Launch the Generate Commission process
   Go to Commission Payment - Amounts- Details tab and check that invoice for only F&B Espana, Region Norte and Region Sur are included.

- Go to Comission Window and edit above created record. Change Organization to F&B US Inc.

- - Launch the Generate Commission process and check that invoice for only F&B US Inc is included in it.
(0097074)
hgbot   
2017-06-01 12:40   
Repository: erp/devel/pi
Changeset: 59898e805bfd1c29f21470c006be1221c6e8d467
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Jun 01 10:20:15 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/59898e805bfd1c29f21470c006be1221c6e8d467 [^]

Fixes issue 36148: Wrong invoice organizations taken for calculating commission

When trx organization is not selected in commission line then consider only the invoices
in the organization of the Org tree of commission organization.

---
M src-db/database/model/functions/C_COMMISSION_PROCESS.xml
---
(0097075)
aferraz   
2017-06-01 12:41   
Code review + Testing OK
(0097228)
hudsonbot   
2017-06-08 17:12   
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/fda0f16ab470 [^]
Maturity status: Test