ShuanghongS 3 semanas atrás
pai
commit
19d5dd961e
2 arquivos alterados com 8 adições e 18 exclusões
  1. 5 15
      service/destination_delivery.class.php
  2. 3 3
      utils/common.class.php

+ 5 - 15
service/destination_delivery.class.php

@@ -1127,10 +1127,9 @@ class destination_delivery {
             $status = common::check_input($_POST['status']);
             $notes = common::check_input($_POST['notes']);
             $action_user = _getLoginName();
-            error_log("review: 1");
+
             //前端按钮 后台权限拦截
             common::checkedActionLegal($serial_no,$operate);
-            error_log("review: 1.1");
             global $db;
             $db->StartTrans();
             try {
@@ -1146,15 +1145,12 @@ class destination_delivery {
                     $delivery_address_detail = json_decode($delivery_booking["delivery_address_detail"],true);
                     $onine_address = common::excuteListSql("select * from public.contacts_address_online 
                         where (delivery_serial_no = '$serial_no' or sync_key = '".$delivery_address_detail['sync_key']."')");
-                    error_log("review: 1.2");
+
                     //$sql .= "delete from public.contacts_address_online where delivery_serial_no = '$serial_no';";
                     $sql .=common::returnDAddressRecord($delivery_booking["address_country"],$onine_address,$delivery_address_detail);
-                    error_log("review: 1.3");
 
                     //Booking自動同步到Ksmart WO 的逻辑   保存在do_header和do_details表里
-                    error_log("review: 1.4");
                     $sql .=common::saveWorkOrder($delivery_booking);
-                    error_log("review: 1.5");
                 }
                 if ($status == "Reject" || $status == "Cancel") {
                     //这种情况,清除当前用户对这一票的修改和添加的信息
@@ -1165,9 +1161,7 @@ class destination_delivery {
                 $sql .= "INSERT INTO public.kln_destination_delivery_operation_log(
                                 serial_no, action,notes, create_by, created_time, created_zone)
                         VALUES ('$serial_no', '$status','$notes', '$action_user', now(), ''); ";
-
-                error_log("review: sql:".$sql);  
-
+ 
                 $db->Execute($sql) or ((!$db->ErrorMsg()) or error_log(common::dbLog($db, $sql), 0));
                 $rs = $db->CompleteTrans();
             } catch (Exception $e) {
@@ -1176,11 +1170,9 @@ class destination_delivery {
             } 
 
             if ($rs === FALSE){
-                error_log("review: 2");
                 $data = array("msg" => "Update Error");
                 common::echo_json_encode(200,$data);
             } else{
-                error_log("review: 3");
                 //状态变更时,发送邮件提醒 
                 $data = common::excuteObjectSql("select *, 
                             TO_CHAR(delivery_date, 'Mon-DD-YYYY HH24:MI') as _delivery_date,
@@ -1188,12 +1180,10 @@ class destination_delivery {
                             TO_CHAR(update_time, 'Mon-DD-YYYY') as _update_time 
                         from public.kln_destination_delivery where serial_no = '$serial_no'");
                 $shipmentsData = $this->search_shipment_with_booking($data['serial_no'],$data['h_serial_no'],$data['ctnr']);
-                $email_sql = common::sendDestinationDeliveryReminder($data,$shipmentsData,$status);     
-                error_log("review: email_sql:".$email_sql);  
+                $email_sql = common::sendDestinationDeliveryReminder($data,$shipmentsData,$status);    
                 if(!empty($email_sql)){
                     common::excuteUpdateSql($email_sql);
-                } 
-                error_log("review: 4");       
+                }     
                 $data = array("msg" =>"success");
                 common::echo_json_encode(200,$data);
             }       

+ 3 - 3
utils/common.class.php

@@ -4383,11 +4383,11 @@ class common {
 
             $ctnrs = common::excuteListSql("select * FROM $_schema.oc_container oc where oc.serial_no::text = '".$serial_no."' 
                     and oc.ctnr in (select regexp_split_to_table('".$ctnr_db."', ','))" );
-            $total_pcs = "";
+            $total_pcs = 0;
             $total_pcs_unit = "";
-            $total_weight = "";
+            $total_weight = 0;
             $total_weight_unit = "KGS";
-            $total_volume = "";
+            $total_volume = 0;
             $total_volume_unit = "CBM";
 
             $detail_row_count = 0;