Removed sparse update_stock_move_pid function.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 13 Feb 2015 10:04:24 +0000 (11:04 +0100)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 28 Feb 2015 17:04:10 +0000 (18:04 +0100)
includes/db/inventory_db.inc
purchasing/includes/db/invoice_db.inc

index 1c4d8d0740dcb866d441b2585abc49e1698be803..225499d4bfc3d0371590abffc4ad136b35278ce5 100644 (file)
@@ -381,16 +381,6 @@ function update_stock_move($type, $trans_no, $stock_id, $cost)
        db_query($sql, "The stock movement standard_cost cannot be updated");
 }
 
-function update_stock_move_pid($type, $type_no, $stock_id, $pid, $cost)
-{
-       $sql = "UPDATE ".TB_PREF."stock_moves SET standard_cost=".db_escape($cost)
-               ." WHERE type=".db_escape($type)
-               ."      AND trans_no=".db_escape($type_no)
-               ."      AND stock_id=".db_escape($stock_id)
-               ."  AND person_id = ".db_escape($pid);
-       db_query($sql, "The stock movement standard_cost cannot be updated");
-}
-
 //--------------------------------------------------------------------------------------------------
 
 function get_stock_moves($type, $type_no, $visible=false)
index 8193f0ddb573c6fd15a852225c7e4fbc4035dc36..dd172395ef803e21ff414aaa1807d79634bb987b 100644 (file)
@@ -610,16 +610,9 @@ function void_supp_invoice($type, $type_no)
                                                
                                                add_audit_trail(ST_JOURNAL, $id, $old_date);
                                                add_comments(ST_JOURNAL, $id, $old_date, $memo);
-                                               $Refs->save(ST_JOURNAL, $id, $ref);                                             
-                                       }       
-                               }
-                               /*$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);
+                                               $Refs->save(ST_JOURNAL, $id, $ref);
+                                       }
                                }
-                               update_stock_move_pid(ST_SUPPRECEIVE, $details_row["stock_id"], $old_date, $old_date, $grn['supplier_id'], $mat_cost);
-                               */
                }
         }
        }