예제 #1
0
     $trans_det_id = $_REQUEST['trans_id'];
     $object_id = $_REQUEST['obj_id'];
     DeleteLog($trans_det_id);
     DeleteProduct($trans_det_id);
     if (CheckTransStatus($object_id)) {
         DeleteTransaction($object_id);
     }
     break;
 case 'save_transaction':
     $object_id = $_REQUEST['obj_id'];
     $car_number = $_REQUEST['car_number'];
     $status = CheckObjectStatus($object_id);
     if (!$status) {
         $error = 'პროდუქციის სია ცარიელია!';
     } else {
         SaveTransaction($object_id, $car_number);
     }
     break;
 case 'abort_transaction':
     $object_id = $_REQUEST['obj_id'];
     AbortTransaction($object_id);
     break;
 case 'get_prod_count':
     $object_id = $_REQUEST['obj_id'];
     $data = array('prod_count' => GetProdCount($object_id));
     break;
 case 'get_sum_price':
     $object_id = $_REQUEST['obj_id'];
     $data = array('sum_price' => GetSumPrice($object_id));
     break;
 case 'get_prod_count_2':
     DeleteProduct($trans_det_id);
     if (CheckTransStatus($object_id)) {
         DeleteTransaction($object_id);
     }
     break;
 case 'get_sub_menu':
     $category_id = $_REQUEST['id'];
     $data = array('page' => getSubMenu($category_id));
     break;
 case 'save_transaction':
     $object_id = $_REQUEST['obj_id'];
     $status = CheckObjectStatus($object_id);
     if (!$status) {
         $error = 'პროდუქციის სია ცარიელია!';
     } else {
         SaveTransaction($object_id);
     }
     break;
 case 'abort_transaction':
     $object_id = $_REQUEST['obj_id'];
     AbortTransaction($object_id);
     break;
 case 'save_vew_price':
     $sale_id = $_REQUEST['id'];
     $prod_new_price = $_REQUEST['prod_new_price'];
     $prod_new_count = $_REQUEST['prod_new_count'];
     save_new_price($sale_id, $prod_new_price, $prod_new_count);
     break;
 case 'get_prod_count':
     $object_id = $_REQUEST['obj_id'];
     $data = array('prod_count' => GetProdCount($object_id));