details: https://code.openbravo.com/erp/devel/pi/rev/90f6105a394e changeset: 30609:90f6105a394e user: Rafael Queralta Pozo <rqueralta <at> nauta.cu> date: Tue Nov 08 13:07:05 2016 +0100 summary: Fixes issue 34332: Purchase Order field is empty in Purchase Invoice header
Purchase Order field was empty in Purchase Invoice header when selecting the Goods Receipt in Create Lines From process, because the Purchase Order Id of Goods Receipt was not take into account to fill Purchase Order field in Purchase Invoice header. Now the Purchase Order Id of Goods Receipt is retrieved to fill this field. diffstat: src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diffs (42 lines): diff -r 0be9fca7e995 -r 90f6105a394e src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java --- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java Mon Nov 07 20:40:24 2016 +0100 +++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java Tue Nov 08 13:07:05 2016 +0100 @@ -11,7 +11,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): Cheli Pineda__________________________. ************************************************************************ @@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.StringUtils; import org.openbravo.base.filter.IsIDFilter; import org.openbravo.base.secureApp.HttpSecureAppServlet; import org.openbravo.base.secureApp.VariablesSecureApp; @@ -47,6 +48,7 @@ import org.openbravo.erpCommon.utility.Utility; import org.openbravo.financial.FinancialUtils; import org.openbravo.model.common.invoice.Invoice; +import org.openbravo.model.common.order.Order; import org.openbravo.model.common.order.OrderLine; import org.openbravo.model.materialmgmt.transaction.ShipmentInOut; import org.openbravo.model.pricing.pricelist.PriceList; @@ -1489,6 +1491,13 @@ conn = this.getTransactionConnection(); for (int k = 0; k < ids.length; k++) { if (strType.equals("SHIPMENT")) { + String strShipment = vars.getStringParameter("inpShipmentReciept"); + if (StringUtils.isNotEmpty(strShipment)) { + Order order = OBDal.getInstance().get(ShipmentInOut.class, strShipment).getSalesOrder(); + if (order != null) { + strPO = order.getId(); + } + } if (isSOTrx.equals("Y")) data = CreateFromInvoiceData.selectFromShipmentUpdateSOTrx(conn, this, vars.getLanguage(), ids[k]); ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits