Fifo/ProcessValues.php
authorEdward <edward@roojs.com>
Tue, 11 Feb 2014 08:59:34 +0000 (16:59 +0800)
committerEdward <edward@roojs.com>
Tue, 11 Feb 2014 08:59:34 +0000 (16:59 +0800)
Fifo/ProcessValues.php

index 80b9692..f5da435 100644 (file)
@@ -101,41 +101,41 @@ class Pman_Xtuple_Fifo_ProcessValues extends  Pman_Xtuple_Fifo_ProcessBase
             $id->query("invfifo_fill_all({$bad['location_id']}, {$bad['itemsite_id']})");
             
         }
-        
-        $id->query("
-                SELECT
-                    invfifo_fill_all(invdetail_location_id, invhist_itemsite_id)
-                FROM
-                    (SELECT
-                         distinct(invhist_itemsite_id) as invhist_itemsite_id,  invdetail_location_id
-                         FROM
-                          invdetailview
-                            where
-                                 ( 
-                                         invfifo_cost_before > invfifo_cost_after
-                                     OR
-                                         invfifo_cost_before < 0
-                                     OR
-                                         (
-                                             invfifo_cost_before = 0
-                                             and
-                                             invfifo_qty_before > 0
-                                         )
-                                     OR
-                                         (
-                                             -- landed unit cost is zero or negative -- when it's not void..
-                                             
-                                            invfifo_landedunitcost <= 0.0
-                                           
-                                         )
-                                 )
-                                 and
-                                     invfifo_void = 0
-                        GROUP BY invhist_itemsite_id, invdetail_location_id
-                    ) x
-                ");
-        
-         
+//        
+//        $id->query("
+//                SELECT
+//                    invfifo_fill_all(invdetail_location_id, invhist_itemsite_id)
+//                FROM
+//                    (SELECT
+//                         distinct(invhist_itemsite_id) as invhist_itemsite_id,  invdetail_location_id
+//                         FROM
+//                          invdetailview
+//                            where
+//                                 ( 
+//                                         invfifo_cost_before > invfifo_cost_after
+//                                     OR
+//                                         invfifo_cost_before < 0
+//                                     OR
+//                                         (
+//                                             invfifo_cost_before = 0
+//                                             and
+//                                             invfifo_qty_before > 0
+//                                         )
+//                                     OR
+//                                         (
+//                                             -- landed unit cost is zero or negative -- when it's not void..
+//                                             
+//                                            invfifo_landedunitcost <= 0.0
+//                                           
+//                                         )
+//                                 )
+//                                 and
+//                                     invfifo_void = 0
+//                        GROUP BY invhist_itemsite_id, invdetail_location_id
+//                    ) x
+//                ");
+//        
+//         
         if ($v == 'BAD') {
             //DB_DAtaObject::debugLevel(1);
             $this->efforts =10;