update_stock_move_pid commented out for same date.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 15 Mar 2011 15:30:41 +0000 (16:30 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 15 Mar 2011 15:30:41 +0000 (16:30 +0100)
purchasing/includes/db/invoice_db.inc

index c95e5de4a994d8006eab52d3513d94e00fe0fd99..9373d888a64c3752dfb3b36549a05a45036d49e8 100644 (file)
@@ -290,9 +290,10 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b
                                                "The general ledger transaction could not be added for the price variance of the inventory item");
                                }               
                                update_stock_move_pid(ST_CUSTDELIVERY, $entered_grn->item_code, $old_date, $date_, 0, $mat_cost);
-                       } */
+                       } 
                        if (is_inventory_item($entered_grn->item_code))
                                update_stock_move_pid(ST_SUPPRECEIVE, $entered_grn->item_code, $old_date, $old_date, $supp_trans->supplier_id, $mat_cost);
+                       */      
                //}
                }
        // ----------------------------------------------------------------------
@@ -523,12 +524,13 @@ function void_supp_invoice($type, $type_no)
                                        $mat_cost = update_average_material_cost(null, $details_row["stock_id"],
                                                $diff, -$details_row["quantity"], $old_date, true);
                                }
-                               $deliveries = get_deliveries_between($details_row["stock_id"], $old_date, $date_);
+                               /*$deliveries = get_deliveries_between($details_row["stock_id"], $old_date, $date_);
                                if ($deliveries[0] != 0) // have deliveries been done during the period?
                                {
                                        update_stock_move_pid(ST_CUSTDELIVERY, $details_row["stock_id"], $old_date, $date_, 0, $mat_cost);
                                }
                                update_stock_move_pid(ST_SUPPRECEIVE, $details_row["stock_id"], $old_date, $old_date, $grn['supplier_id'], $mat_cost);
+                               */
                }
         }
        }