Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008367Openbravo ERP09. Financial managementpublic2009-03-31 18:202009-04-25 00:00
networkb 
sathiyan 
immediateminoralways
closedfixed 
5
2.40MP1 
2.50MP1 
Core
No
0008367: Wrong Sales Representative in business partner multiple selector
Open a business partner multiple selector, for instance the one in Payment Report.

Please notice that the sales representative assigned to the business partner in this selector does not correspond to the one define in business partner window.
1) Go to Financial Management || Receivables & Payables || Analysis Tools || Payment Report
2) Open the Business Partner multiple selector.
3) Take a look at Millman's sales representative.
4) Go to Master Data Management || Business Partner and select Millman
5) Go to Customer tab.

Please notice that the sales representative there does not correspond with the one in the business partner multiple selector.
Fix the business partner multiple selector in order to show the sales representative defined in Customer tab of business partner window.
main
depends on backport 0008435 closed sathiyan Wrong Sales Representative in business partner multiple selector 
Issue History
2009-03-31 18:20networkbNew Issue
2009-03-31 18:20networkbAssigned To => rafaroda
2009-03-31 18:20networkbRegression testing => No
2009-04-01 09:54pjuvaraNote Added: 0015100
2009-04-01 09:54pjuvaraStatusnew => feedback
2009-04-03 16:30rafarodaPrioritynormal => immediate
2009-04-03 16:30rafarodaDescription Updated
2009-04-03 16:31networkbStatusfeedback => new
2009-04-03 16:31networkbversion => 2.40MP1
2009-04-03 17:11rafarodaAssigned Torafaroda => sathiyan
2009-04-03 17:11rafarodaSummaryWrong Sales Representative when looking for the business partner in the payment report => Wrong Sales Representative in business partner multiple selector
2009-04-03 17:11rafarodaDescription Updated
2009-04-03 17:11rafarodaProposed Solution updated
2009-04-03 17:11rafarodaSteps to Reproduce Updated
2009-04-03 17:12rafarodaStatusnew => scheduled
2009-04-03 17:12rafarodafix_in_branch => pi
2009-04-07 09:20sathiyanNote Added: 0015238
2009-04-07 11:15rafarodaNote Added: 0015246
2009-04-08 13:21hgbotCheckin
2009-04-08 13:21hgbotNote Added: 0015282
2009-04-08 13:21hgbotStatusscheduled => resolved
2009-04-08 13:21hgbotResolutionopen => fixed
2009-04-08 13:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6a109c6954425c3037622804512335c8c2201599 [^]
2009-04-22 11:23psarobeTag Attached: main
2009-04-24 11:12sureshbabuStatusresolved => closed
2009-04-24 11:12sureshbabuNote Added: 0015678
2009-04-24 11:12sureshbabuFixed in Version => main
2009-04-25 00:00anonymoussf_bug_id0 => 2780813

Notes
(0015100)
pjuvara   
2009-04-01 09:54   
Please specify a product version.
(0015238)
sathiyan   
2009-04-07 09:20   
Yes. I do agree that there are two different data shown on two different places for same sales representative id for given business partner.

Place 1:
Master Data Management || Business Partner Setup || Business Partner Info  ||  Partner Selection
It has shown the sales representative as BBAdmin for Millman Ltd.

Place 2:
Financial Management || Receivables & Payables || Analysis Tools || Payment Report  ||  Payment Report (at Business Partner Selector screen - all Business Partner Selector screen behave same)
It has shown the sales representative as BBuser

Cause for inconsistency:

Two different of queries are fired in above said places. The query of place 1 has assumption of sales representative id is nothing but the self reference in C_BPARTNER table. The query of place 2 has assumption of sales representative id is nothing but the foreign key relationship of AD_USER.

Query in Place 1(I didn't give the exact query to avoid confusion...I just gave the trim of given query):
Select a.c_bpartner_id,a.name, b.c_bpartner_id as sales_rep_id,b.name as sales_rep_name from C_BPARTNER a, C_BPARTNER b where a.salesrep_id = b.c_bpartner_id and a.name like 'Millman Ltd.'

Query in Place2:
Select a.c_bpartner_id,a.name, b.ad_User_id as sales_rep_id,b.name as sales_rep_name from C_BPARTNER a, AD_USER b where a.salesrep_id = b.ad_User_id and a.name like 'Millman Ltd.'

My stand:
I am not completely aware of the database design. I have to make sure with Rafa or DBA which is the right reference of sales representative. I'll let you know the feedback in day or two days time. According to the feedback I have to choose where to fix.
(0015246)
rafaroda   
2009-04-07 11:15   
The sales representative that has to be shown in the business partner multiple selector is the one defined inside 'Master Data Management || Business Partner || Business Partner >> Customer' which is the same shown in 'Master Data Management || Business Partner Setup || Business Partner Info || Partner Selection'.
(0015282)
hgbot   
2009-04-08 13:21   
Repository: erp/devel/pi
Changeset: 6a109c6954425c3037622804512335c8c2201599
Author: Sathiyan Sivaprakasam <sathiyan.sivaprakasam <at> openbravo.com>
Date: Wed Apr 08 16:50:14 2009 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/6a109c6954425c3037622804512335c8c2201599 [^]

Fixes bug 8367 Wrong Sales Representative in business partner selector window

---
M src/org/openbravo/erpCommon/info/BusinessPartnerMultiple_data.xsql
---
(0015678)
sureshbabu   
2009-04-24 11:12   
Tested working fine