Openbravo Issue Tracking System - Retail Modules
View Issue Details
0025975Retail ModulesWeb POSpublic2014-03-12 18:182014-05-16 12:44
jecharri 
malsasua 
urgentmajoralways
closedfixed 
5
RMP31.2 
RR14Q3RR14Q3 
marvintm
No
0025975: Some business partners are not synchronized when they have 2 addresses
Some business partners are not synchronized when they have 2 addresses
-go to https://livebuilds.openbravo.com/retail_pi_pgsql [^]
-select BP "VBS Customer" and go to tab "Location"
-add a location with checkbox shipping address to 'Y' and invoice 'N'
-modify existing address and uncheck shipping address

Verify that BP is not synchronized with Web POS

It happens the same If you uncheck only the shipping address when you have only one address. However this it can be considered as wrong configuration
No tags attached.
Issue History
2014-03-12 18:18jecharriNew Issue
2014-03-12 18:18jecharriAssigned To => marvintm
2014-03-12 18:18jecharriResolution time => 1397599200
2014-03-12 18:18jecharriTriggers an Emergency Pack => No
2014-03-12 18:21jecharriSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5566#r5566
2014-03-17 00:11eintelauIssue Monitored: eintelau
2014-03-17 00:45eintelauNote Added: 0065204
2014-03-17 10:52malsasuaAssigned Tomarvintm => malsasua
2014-03-31 16:24jonalegriaesarteTarget VersionRR14Q2 => RR14Q3
2014-04-22 11:45hgbotCheckin
2014-04-22 11:45hgbotNote Added: 0066526
2014-04-22 11:45hgbotStatusnew => resolved
2014-04-22 11:45hgbotResolutionopen => fixed
2014-04-22 11:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31364003833b1005a319710ab6979ce9a47604d7 [^]
2014-05-01 17:44hgbotCheckin
2014-05-01 17:44hgbotNote Added: 0066743
2014-05-01 17:44hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31364003833b1005a319710ab6979ce9a47604d7 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.unstablenetworks/rev/31364003833b1005a319710ab6979ce9a47604d7 [^]
2014-05-16 12:44marvintmReview Assigned To => marvintm
2014-05-16 12:44marvintmStatusresolved => closed
2014-05-16 12:44marvintmFixed in Version => RR14Q3

Notes
(0065204)
eintelau   
2014-03-17 00:45   
We also just found this issue at a customer. I believe the problem is with the query that retrieves the business partner data. It is filtering for addresses that are invoice to, but has a subquery (selecting max location id) that does not have the same filter.

When a customer has an address which is not invoiceable then the subquery can select that address, but the main query excludes it and hence the partner data is not returned

The particular subquery is

 bpl.id in (select max(bpls.id) as bpLocId from BusinessPartnerLocation AS bpls where bpls.$readableClientCriteria AND "
                + " bpls.$naturalOrgCriteria group by bpls.businessPartner.id)"

and it needs to be changed to

 bpl.id in (select max(bpls.id) as bpLocId from BusinessPartnerLocation AS bpls where bpls.invoiceToAddress = true and bpls.$readableClientCriteria AND "
                + " bpls.$naturalOrgCriteria group by bpls.businessPartner.id)"

(Note addition of bpls.invoiceToAddress = true clause)
This change fixed the problem for us
(0066526)
hgbot   
2014-04-22 11:45   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 31364003833b1005a319710ab6979ce9a47604d7
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Apr 22 11:45:25 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31364003833b1005a319710ab6979ce9a47604d7 [^]

fixed issue 0025975: Some business partners are not synchronized when they have 2 addresses

---
M src/org/openbravo/retail/posterminal/master/BPLocation.java
M src/org/openbravo/retail/posterminal/master/BusinessPartner.java
---
(0066743)
hgbot   
2014-05-01 17:44   
Repository: erp/pmods/org.openbravo.retail.posterminal.unstablenetworks
Changeset: 31364003833b1005a319710ab6979ce9a47604d7
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Apr 22 11:45:25 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal.unstablenetworks/rev/31364003833b1005a319710ab6979ce9a47604d7 [^]

fixed issue 0025975: Some business partners are not synchronized when they have 2 addresses

---
M src/org/openbravo/retail/posterminal/master/BPLocation.java
M src/org/openbravo/retail/posterminal/master/BusinessPartner.java
---