details: https://code.openbravo.com/erp/devel/pi/rev/c22be97d3f66 changeset: 20456:c22be97d3f66 user: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com> date: Sun May 19 11:43:55 2013 +0530 summary: Fixes Issue 23649 : Generate invoices from order does not copy the accounting dimensions
details: https://code.openbravo.com/erp/devel/pi/rev/57b9468a475f changeset: 20457:57b9468a475f user: Sandra Huguet <sandra.huguet <at> openbravo.com> date: Tue May 21 12:05:37 2013 +0200 summary: Related to issue 23649 code review diffstat: src-db/database/model/functions/C_INVOICE_CREATE.xml | 41 ++++++++++++++----- 1 files changed, 29 insertions(+), 12 deletions(-) diffs (135 lines): diff -r ba62d08c2411 -r 57b9468a475f src-db/database/model/functions/C_INVOICE_CREATE.xml --- a/src-db/database/model/functions/C_INVOICE_CREATE.xml Thu May 23 11:07:17 2013 +0530 +++ b/src-db/database/model/functions/C_INVOICE_CREATE.xml Tue May 21 12:05:37 2013 +0200 @@ -25,7 +25,7 @@ * parts created by ComPiere are Copyright (C) ComPiere, Inc.; * All Rights Reserved. * Contributor(s): Openbravo SLU - * Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U. + * Contributions are Copyright (C) 2001-2013 Openbravo, S.L.U. * * Specifically, this derivative work is based upon the following Compiere * file and version. @@ -131,7 +131,13 @@ ol.gross_unit_price, ol.grosspricestd, ol.grosspricelist, - sl.explode + sl.explode, + ol.C_Project_ID, + ol.C_Bpartner_ID, + ol.A_Asset_ID, + ol.C_Costcenter_ID, + ol.User1_ID, + ol.User2_ID FROM M_INOUT s, M_INOUTLINE sl RIGHT JOIN C_ORDERLINE ol ON sl.C_OrderLine_ID=ol.C_OrderLine_ID @@ -508,7 +514,6 @@ ) ; -- - v_NoRecords:=v_NoRecords + 1; v_LineNo:=0; -- Insert Reference/Comment to Shipment for Warehouse Order/Pickup @@ -527,7 +532,9 @@ Description, M_Product_ID, QtyInvoiced, PriceList, PriceActual, PriceLimit, LineNetAmt, C_Charge_ID, ChargeAmt, C_UOM_ID, C_Tax_ID, PriceStd, - explode, bom_parent_id + explode, bom_parent_id, + C_Project_ID, C_Bpartner_ID, A_Asset_ID, + C_Costcenter_ID, User1_ID, User2_ID ) VALUES ( @@ -542,7 +549,9 @@ WHERE c_invoice_id=p_Invoice_ID and c_orderline_id = (SELECT BOM_parent_id FROM c_orderline - WHERE c_orderline_id = ptr_ol.c_orderline_id)) + WHERE c_orderline_id = ptr_ol.c_orderline_id)), + ptr_ol.C_Project_ID, ptr_ol.C_Bpartner_ID, ptr_ol.A_Asset_ID, + ptr_ol.C_Costcenter_ID, ptr_ol.User1_ID, ptr_ol.User2_ID ) ; END IF; @@ -620,7 +629,9 @@ gross_unit_price, line_gross_amount, grosspricestd, grosspricelist, isdeferred, defplantype, periodnumber, c_period_id, - explode, bom_parent_id + explode, bom_parent_id, + C_Project_ID, C_Bpartner_ID, A_Asset_ID, + C_Costcenter_ID, User1_ID, User2_ID ) VALUES ( @@ -641,7 +652,9 @@ WHERE c_invoice_id=p_Invoice_ID and c_orderline_id = (SELECT BOM_parent_id FROM c_orderline - WHERE c_orderline_id = ptr_ol.c_orderline_id)) + WHERE c_orderline_id = ptr_ol.c_orderline_id)), + ptr_ol.C_Project_ID, ptr_ol.C_BPartner_ID, ptr_ol.A_Asset_ID, + ptr_ol.C_Costcenter_ID, ptr_ol.User1_ID, ptr_ol.User2_ID ) ; END IF;--Next_O_Line @@ -717,7 +730,9 @@ gross_unit_price, line_gross_amount, grosspricestd, grosspricelist, isdeferred, defplantype, periodnumber, c_period_id, - explode, bom_parent_id + explode, bom_parent_id, + C_Project_ID, C_Bpartner_ID, A_Asset_ID, + C_Costcenter_ID, User1_ID, User2_ID ) VALUES ( @@ -738,7 +753,9 @@ WHERE c_invoice_id=p_Invoice_ID and c_orderline_id = (SELECT BOM_parent_id FROM c_orderline - WHERE c_orderline_id = ptr_sl.c_orderline_id)) + WHERE c_orderline_id = ptr_sl.c_orderline_id)), + ptr_sl.C_Project_ID, ptr_sl.C_BPartner_ID, ptr_sl.A_Asset_ID, + ptr_sl.C_Costcenter_ID, ptr_sl.User1_ID, ptr_sl.User2_ID ) ; END IF;--Next_S_Line @@ -826,6 +843,7 @@ ) AS DocumentNo, coalesce(sh.Description, o.Description) as description, coalesce(sh.C_BPartner_ID,o.c_bpartner_id) as c_bpartner_id, + ol.C_Bpartner_ID as line_c_bpartner_id, o.BillTo_ID, o.C_BPartner_Location_ID, sh.AD_User_ID, @@ -1173,7 +1191,6 @@ ) ; -- - v_NoRecords:=v_NoRecords + 1; v_LineNo:=0; v_InOut_ID:='-1'; @@ -1254,7 +1271,7 @@ grosspricestd, grosspricelist, isdeferred, defplantype, periodnumber, c_period_id, c_project_id, c_costcenter_id, a_asset_id, - user1_id, user2_id, + user1_id, user2_id, c_bpartner_id, explode, bom_parent_id ) VALUES @@ -1272,7 +1289,7 @@ COALESCE(Cur_InvoiceSchedule.grosspricestd,0), COALESCE(Cur_InvoiceSchedule.grosspricelist,0), v_isdeferred_inv, v_defplantype_inv, v_periodnumber_inv, v_period_inv, coalesce(Cur_InvoiceSchedule.line_c_project_id, Cur_InvoiceSchedule.c_project_id), coalesce(Cur_InvoiceSchedule.line_c_costcenter_id, Cur_InvoiceSchedule.c_costcenter_id), coalesce(Cur_InvoiceSchedule.line_a_asset_id,Cur_InvoiceSchedule.a_asset_id), - coalesce(Cur_InvoiceSchedule.line_user1_id, Cur_InvoiceSchedule.user1_id), coalesce(Cur_InvoiceSchedule.line_user2_id, Cur_InvoiceSchedule.user2_id), + coalesce(Cur_InvoiceSchedule.line_user1_id, Cur_InvoiceSchedule.user1_id), coalesce(Cur_InvoiceSchedule.line_user2_id, Cur_InvoiceSchedule.user2_id), coalesce(Cur_InvoiceSchedule.line_c_bpartner_id, Cur_InvoiceSchedule.c_bpartner_id), Cur_InvoiceSchedule.explode, (SELECT c_invoiceline_id FROM c_invoiceline WHERE c_invoice_id=p_Invoice_ID ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits