Exemplo n.º 1
0
 function delete_id_handler()
 {
     global $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_OP_DB);
     $order = new PurchaseOrderModel($dbc);
     $order->orderID($this->id);
     $order->delete();
     $items = new PurchaseOrderItemsModel($dbc);
     $items->orderID($this->id);
     foreach ($items->find() as $item) {
         $item->delete();
     }
     echo 'deleted';
     return false;
 }