2 require_once 'Pman/Roo.php';
4 class Pman_Xtuple_VoidSalesAndPurchaseOrders extends Pman_Roo
6 static $cli_desc = "Void ALL the Sales Order / Voucher / Purchase Order";
8 static $cli_opts = array(
20 if (HTML_FlexyFramework::get()->cli) {
27 function get($v = '', $opts)
30 $this->jerr('die');exit;
31 $this->transObj = DB_DataObject::Factory('cohead');
33 $this->transObj->query('BEGIN');
35 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
37 DB_DataObject::factory('cohead')->lockTables();
39 $cohead = DB_DataObject::factory('cohead');
45 while ($cohead->fetch()){
46 $cohead->clear($this);
50 $pohead = DB_DataObject::factory('pohead');
53 while ($pohead->fetch()){
54 $pohead->clear($this);