details: https://code.openbravo.com/erp/devel/pi/rev/9ec41af386ae changeset: 30539:9ec41af386ae user: Mark <markmm82 <at> gmail.com> date: Thu Oct 13 13:35:09 2016 -0400 summary: Fixes issue 34195: No error in copy lines if sales invoices have different orgs
When the Copy Lines process is executed, the new created lines of the current invoice will take the organization defined in the header as the line's organization. It avoid the possible scenario when the lines were created from have a different organization than defined in the current invoice's header. diffstat: src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java | 7 ++++--- src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diffs (46 lines): diff -r c824d425f341 -r 9ec41af386ae src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java --- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java Tue Oct 25 11:34:43 2016 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java Thu Oct 13 13:35:09 2016 -0400 @@ -206,9 +206,10 @@ dataInvoice[0].cBpartnerLocationId); } CopyFromInvoiceData.insert(conn, this, strSequence, strKey, dataInvoice[0].adClientId, - vars.getUser(), priceList.toString(), priceActual.toString(), priceLimit.toString(), - lineNetAmt.toString(), strCTaxID, priceGross.toString(), lineGrossAmt.toString(), - priceListGross.toString(), priceStdGross.toString(), data[i].cInvoicelineId); + dataInvoice[0].adOrgId, vars.getUser(), priceList.toString(), priceActual.toString(), + priceLimit.toString(), lineNetAmt.toString(), strCTaxID, priceGross.toString(), + lineGrossAmt.toString(), priceListGross.toString(), priceStdGross.toString(), + data[i].cInvoicelineId); // Copy accounting dimensions CopyFromInvoiceData.insertAcctDimension(conn, this, dataInvoice[0].adClientId, diff -r c824d425f341 -r 9ec41af386ae src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql --- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql Tue Oct 25 11:34:43 2016 +0200 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice_data.xsql Thu Oct 13 13:35:09 2016 -0400 @@ -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-2015 Openbravo SLU + * All portions are Copyright (C) 2001-2016 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -69,7 +69,7 @@ isdeferred, defplantype, periodnumber, c_period_id, C_PROJECT_ID, A_ASSET_ID, C_COSTCENTER_ID, USER1_ID, USER2_ID ) - SELECT ?, ?, ?, l.AD_ORG_ID, 'Y', now(), ?, now(), ?, + SELECT ?, ?, ?, ?, 'Y', now(), ?, now(), ?, (SELECT COALESCE(MAX(LINE),0)+10 FROM C_InvoiceLine WHERE C_Invoice_ID = ?), l.DESCRIPTION, l.M_PRODUCT_ID, l.QTYINVOICED, TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), l.C_CHARGE_ID, l.CHARGEAMT, l.C_UOM_ID, ?, l.S_RESOURCEASSIGNMENT_ID, l.TAXAMT, l.M_ATTRIBUTESETINSTANCE_ID, l.ISDESCRIPTION, l.QUANTITYORDER, l.M_PRODUCT_UOM_ID, @@ -89,6 +89,7 @@ <Parameter name="cNewInvoiceId"/> <Parameter name="cInvoiceId"/> <Parameter name="adClientId"/> + <Parameter name="adOrgId"/> <Parameter name="adUserId"/> <Parameter name="adUserId"/> <Parameter name="cInvoiceId"/> ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits