details: https://code.openbravo.com/erp/devel/pi/rev/85f5f008873a changeset: 28636:85f5f008873a user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed Feb 24 18:05:08 2016 +0530 summary: Fixes Issue 32323:"Generate invoice from receipt" button is not working
In case tax not included in price list, gross std price and list price was set will null value which is not allowed by db table. now they are initiated to value zero first. diffstat: src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diffs (40 lines): diff -r 689c4b6505ea -r 85f5f008873a src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml --- a/src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml Thu Feb 25 11:22:36 2016 +0100 +++ b/src-db/database/model/functions/M_INOUT_CREATEINVOICE.xml Wed Feb 24 18:05:08 2016 +0530 @@ -19,7 +19,7 @@ * parts created by ComPiere are Copyright (C) ComPiere, Inc.; * All Rights Reserved. * Contributor(s): Openbravo SLU - * Contributions are Copyright (C) 2001-2015 Openbravo, S.L.U. + * Contributions are Copyright (C) 2001-2016 Openbravo, S.L.U. * * Specifically, this derivative work is based upon the following Compiere * file and version. @@ -105,10 +105,10 @@ v_PriceList NUMBER; v_PriceActual NUMBER; v_PriceLimit NUMBER; - v_gross_unit_price NUMBER; - v_line_gross_amount NUMBER; - v_grosspricestd NUMBER; - v_grosspricelist NUMBER; + v_gross_unit_price NUMBER:=0; + v_line_gross_amount NUMBER:=0; + v_grosspricestd NUMBER:=0; + v_grosspricelist NUMBER:=0; v_priceprecision NUMBER; v_stdprecision NUMBER; -- @@ -316,8 +316,12 @@ v_C_Tax_ID:=C_Gettax(CUR_ShipmentLines.M_Product_ID, CUR_Shipment.MovementDate, CUR_Shipment.AD_Org_ID, CUR_Shipment.M_Warehouse_ID, CUR_Shipment.C_BPartner_Location_ID, CUR_Shipment.C_BPartner_Location_ID, CUR_Shipment.C_Project_ID, 'N') ; IF (v_istaxincluded = 'Y') THEN v_gross_unit_price:= v_PriceActual; + v_grosspricestd:= v_PriceActual; + v_grosspricelist:= v_PriceList; v_line_gross_amount:= ROUND(v_gross_unit_price * CUR_ShipmentLines.MovementQty, v_stdprecision); v_PriceActual:= C_GET_NET_PRICE_FROM_GROSS(v_C_Tax_ID, v_PriceActual, 0, v_priceprecision, 1); + v_PriceList:= C_GET_NET_PRICE_FROM_GROSS(v_C_Tax_ID, v_PriceList, 0, v_priceprecision, 1); + v_PriceLimit:= C_GET_NET_PRICE_FROM_GROSS(v_C_Tax_ID, v_PriceLimit, 0, v_priceprecision, 1); v_LineNetAmt:= ROUND(v_PriceActual * CUR_ShipmentLines.MovementQty, v_stdprecision); ELSE v_PriceActual:=M_Get_Offers_Price(now(), CUR_Shipment.C_BPartner_ID, CUR_ShipmentLines.M_Product_ID, v_PriceActual, CUR_ShipmentLines.MovementQty, v_M_PriceList_ID); ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits