VoidSalesAndPurchaseOrders.php
[Pman.Xtuple] / VoidSalesAndPurchaseOrders.php
1 <?php
2 require_once 'Pman/Roo.php';
3
4 class Pman_Xtuple_VoidSalesAndPurchaseOrders extends Pman_Roo
5 {   
6     function getAuth()
7     {
8         if (HTML_FlexyFramework::get()->cli) {
9             return false;
10         }
11         return parent::getAuth();
12     }
13    
14     function get()
15     {
16         $this->transObj = DB_DataObject::Factory('cohead');
17         
18         $this->transObj->query('BEGIN');
19         
20         PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($this, 'onPearError'));
21         
22 //        $cohead = DB_DataObject::factory('cohead');
23 //        $cohead->whereAdd("
24 //            cohead_status != 'X'
25 //        ");
26 //        $cohead->find();
27 //        
28 //        while ($cohead->fetch()){
29 //            $cohead->clear($this);
30 //        }
31         
32         
33         $pohead = DB_DataObject::factory('pohead');
34         $pohead->find();
35         
36         while ($pohead->fetch()){
37             
38         }
39         
40         
41         $this->jerr('ROLL BACK');
42         exit;
43     }
44     
45         
46 }