Example #1
0
 public function closeTableOrder($tableId, $userID)
 {
     if ($orderId = $this->isTableHaveOrder($tableId)) {
         // fiyatları güncelle
         $edit = $this->con->exec("update orders set total_amount=(select sum(product_price) from order_products where order_id={$orderId}),user_id={$userID} where id={$orderId}");
         // siparişi pasif yap
         $this->deactive($orderId);
         // tabloyu pasif yap
         $tableCont = new Table();
         $tableCont->deactive($tableId);
         if ($edit == 0) {
             return false;
         }
         return true;
     }
 }