$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;