4 * fill in any fifo basic entries that have not been processed..
5 * -- does not fill in values.. - just qty's
8 require_once 'ProcessBase.php';
10 class Pman_Xtuple_Fifo_ProcessCoheadVoids extends Pman_Xtuple_Fifo_ProcessBase
12 static $cli_desc = "Flag voids for coheads.";
14 static $permitError = false;
19 // set up the failure code..
20 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
22 // we have to have a pointer to work out where we left off..
23 // this process can go by invdetail_id ASC..
25 $co = DB_DataObject::Factory('invfifo');
28 $co->selecTAdd('distinct(invfifo_cohead_id) as cohead_id');
34 $locs = $co->fetchAll('cohead_id');
37 die("no changed needed\n");
40 $co = DB_DataObject::Factory('invfifo');
48 invfifo_cohead_id IN (
49 ' . implode(',', $locs) .'
54 //$id = DB_DataObject::Factory('cohead');
55 //$id->query('SELECT invfifo_cohead_void_flag_order(cohead_id) FROM cohead where cohead_id IN (
56 // ' . implode(',', $locs) .'
70 foreach($locs as $n=>$cohead_id) {
72 $id = DB_DataObject::Factory('invdetail');
73 $id->query("SELECT invfifo_cohead_void_flag_order($cohead_id)");