details:   /erp/devel/pi/rev/df19a7878309
changeset: 8226:df19a7878309
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Wed Aug 25 13:50:27 2010 +0200
summary:   Fixed issue 14222.Set BPs default purchase payment method on order 
header if it is available.

diffstat:

 src-db/database/model/functions/MRP_PURCHASEORDER.xml |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r bffebb0adafd -r df19a7878309 
src-db/database/model/functions/MRP_PURCHASEORDER.xml
--- a/src-db/database/model/functions/MRP_PURCHASEORDER.xml     Thu Aug 26 
09:36:09 2010 +0200
+++ b/src-db/database/model/functions/MRP_PURCHASEORDER.xml     Wed Aug 25 
13:50:27 2010 +0200
@@ -93,7 +93,7 @@
     FOR Cur_workproposal IN (
       SELECT rp.*, bp.PO_PRICELIST_ID, pl.C_Currency_ID,
              BP.PAYMENTRULEPO as paymentrule, BP.PO_PAYMENTTERM_ID AS 
C_PAYMENTTERM_ID,
-             bp.DeliveryViaRule, p.C_UOM_ID
+             bp.DeliveryViaRule, p.C_UOM_ID, bp.po_paymentmethod_id
       FROM MRP_RUN_PURCHASELINE rp,
            C_BPartner bp,
            M_PriceList pl,
@@ -142,7 +142,8 @@
            C_BPARTNER_LOCATION_ID, C_CURRENCY_ID, PAYMENTRULE, 
C_PAYMENTTERM_ID,
            INVOICERULE, DELIVERYRULE, FREIGHTCOSTRULE, DELIVERYVIARULE,
            PRIORITYRULE, TOTALLINES, GRANDTOTAL,
-           M_WAREHOUSE_ID, M_PRICELIST_ID, ISTAXINCLUDED, DATEPROMISED)
+           M_WAREHOUSE_ID, M_PRICELIST_ID, ISTAXINCLUDED, DATEPROMISED,
+           FIN_PAYMENTMETHOD_ID)
         VALUES
          (v_COrder_ID, v_Client_ID, v_Org_ID,'Y',
          now(), v_User_ID, now(), v_User_ID,
@@ -152,7 +153,8 @@
           v_BPartner_Location_ID, Cur_workproposal.C_Currency_ID, 
Cur_workproposal.paymentrule, Cur_workproposal.C_PAYMENTTERM_ID,
           'D', 'A', 'I',COALESCE(Cur_workproposal.DeliveryViaRule,'D'),
           '5',0,0,
-          v_M_Warehouse_ID, Cur_workproposal.PO_PRICELIST_ID, 'N', v_DateDoc
+          v_M_Warehouse_ID, Cur_workproposal.PO_PRICELIST_ID, 'N', v_DateDoc,
+          cur_workproposal.po_paymentmethod_id
           );
       end if; --header
       LastCBPartner_ID := Cur_workproposal.C_BPartner_ID;

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to