Direct GRN, GRN to PO, Direct Purchase Invoice: added exchange rate edition/storage...
[fa-stable.git] / purchasing / includes / db / grn_db.inc
index 2bfa00dcf3f337abc80a8d1c2e120526f55fc571..6c684cff4cb838d799c157fb8bac0f1f4b1dd54d 100644 (file)
@@ -98,6 +98,8 @@ function add_grn(&$po)
        begin_transaction();
        hook_db_prewrite($po, ST_SUPPRECEIVE);
 
+       add_new_exchange_rate(get_supplier_currency($po->supplier_id), $date_, $po->ex_rate);
+
        $grn = add_grn_batch($po->order_no, $po->supplier_id, $po->reference, $po->Location, $date_);
 
     $clearing_act = get_company_pref('grn_clearing_act');