details: https://code.openbravo.com/erp/devel/pi/rev/595d854767a2 changeset: 31732:595d854767a2 user: Miguel <martencobasmiguel <at> gmail.com> date: Mon Mar 20 14:07:23 2017 -0400 summary: Fixes issue 35539: Delivered Sales Order Report is not showing business partner
The problem is that the link between c_order and c_bpartner tables is made by the c_project table and in cases where the sales order is not related to a project, the relationship between c_project and c_bpartner is going to return null, causing it to be impossible to obtain the information of the business partner. To solve this problem the union is established between the tables c_order and c_bdpartner. details: https://code.openbravo.com/erp/devel/pi/rev/defaa5739e3f changeset: 31733:defaa5739e3f user: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Thu Mar 23 17:54:38 2017 +0100 summary: Related to issue 35539: Code review improvements Join with C_BPARTNER_LOCATION table done using C_ORDER table instead of C_PROJECT table. diffstat: src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (23 lines): diff -r b1948c9bd671 -r defaa5739e3f src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql --- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql Thu Mar 23 17:37:27 2017 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvided_data.xsql Thu Mar 23 17:54:38 2017 +0100 @@ -12,7 +12,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2016 Openbravo SLU + * All portions are Copyright (C) 2001-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -45,8 +45,8 @@ C_ORDERLINE.AD_CLIENT_ID AS TRANSCLIENTID, C_ORDERLINE.AD_ORG_ID AS TRANSORGID, '' AS NAME FROM C_PROJECT right join C_ORDER on C_ORDER.C_PROJECT_ID = C_PROJECT.C_PROJECT_ID - left join C_BPARTNER on C_PROJECT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID - left join C_BPARTNER_LOCATION on C_PROJECT.C_BPARTNER_LOCATION_ID = C_BPARTNER_LOCATION.C_BPARTNER_LOCATION_ID + left join C_BPARTNER on C_ORDER.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID + left join C_BPARTNER_LOCATION on C_ORDER.C_BPARTNER_LOCATION_ID = C_BPARTNER_LOCATION.C_BPARTNER_LOCATION_ID left join C_LOCATION on C_BPARTNER_LOCATION.C_LOCATION_ID = C_LOCATION.C_LOCATION_ID, C_ORDERLINE, M_PRODUCT, C_UOM WHERE C_ORDER.C_ORDER_ID = C_ORDERLINE.C_ORDER_ID ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits