|
@@ -4096,7 +4096,11 @@ class common {
|
|
|
$total_weight += $_ctnr_info['grs_kgs'];
|
|
$total_weight += $_ctnr_info['grs_kgs'];
|
|
|
$total_volume += $_ctnr_info['cbm'];
|
|
$total_volume += $_ctnr_info['cbm'];
|
|
|
$detail_row_count +=1;
|
|
$detail_row_count +=1;
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $total_pcs = empty($total_pcs) ? "null" : "'".$total_pcs."'";
|
|
|
|
|
+ $total_weight = empty($total_weight) ? "null" : "'".$total_weight."'";
|
|
|
|
|
+ $total_volume = empty($total_volume) ? "null" : "'".$total_volume."'";
|
|
|
|
|
|
|
|
$do_serial_no = common::uuid();
|
|
$do_serial_no = common::uuid();
|
|
|
$sql .="INSERT INTO public.do_header(
|
|
$sql .="INSERT INTO public.do_header(
|
|
@@ -4111,7 +4115,7 @@ class common {
|
|
|
consignee, consignee_name, consignee_exp,delivery_to_address_sync_key)
|
|
consignee, consignee_name, consignee_exp,delivery_to_address_sync_key)
|
|
|
VALUES ('".$do_serial_no."','".$detail_row_count."','Ocean', '".$oceanInfo['agent']."','".$biztype."','Awaiting Confirmation','".$mode_type."',
|
|
VALUES ('".$do_serial_no."','".$detail_row_count."','Ocean', '".$oceanInfo['agent']."','".$biztype."','Awaiting Confirmation','".$mode_type."',
|
|
|
'".$serial_no."','".$oceanInfo['m_bol']."','".$oceanInfo['h_bol']."','".$oceanInfo['job_no']."',now(),
|
|
'".$serial_no."','".$oceanInfo['m_bol']."','".$oceanInfo['h_bol']."','".$oceanInfo['job_no']."',now(),
|
|
|
- '".$total_pcs."','".$total_pcs_unit."','".$total_weight."','".$total_weight_unit."','".$total_volume."','".$total_volume_unit."',
|
|
|
|
|
|
|
+ ".$total_pcs.",'".$total_pcs_unit."',".$total_weight.",'".$total_weight_unit."',".$total_volume.",'".$total_volume_unit."',
|
|
|
'".$delivery_booking['_delivery_date']."','".$delivery_booking['_delivery_time']."',
|
|
'".$delivery_booking['_delivery_date']."','".$delivery_booking['_delivery_time']."',
|
|
|
'".$delivery_booking['special_requirements']."',
|
|
'".$delivery_booking['special_requirements']."',
|
|
|
'KLN_Online',now(),'Subcontractor','Diesel','".$consignee."','".$consignee_name."','".$consignee_exp."','".$consignee_sync_key."');";
|
|
'KLN_Online',now(),'Subcontractor','Diesel','".$consignee."','".$consignee_name."','".$consignee_exp."','".$consignee_sync_key."');";
|
|
@@ -4124,15 +4128,16 @@ class common {
|
|
|
$l4_width = empty($ctnr['l4_width']) ? "null" : "'".$ctnr['l4_width']."'";
|
|
$l4_width = empty($ctnr['l4_width']) ? "null" : "'".$ctnr['l4_width']."'";
|
|
|
$l4_height = empty($ctnr['l4_height']) ? "null" : "'".$ctnr['l4_height']."'";
|
|
$l4_height = empty($ctnr['l4_height']) ? "null" : "'".$ctnr['l4_height']."'";
|
|
|
|
|
|
|
|
|
|
+ $serial_no_sync_key = common::uuid();
|
|
|
$sql .="INSERT INTO public.do_detail(
|
|
$sql .="INSERT INTO public.do_detail(
|
|
|
do_serial_no, pcs, pcs_unit, weight, weight_unit, volume,
|
|
do_serial_no, pcs, pcs_unit, weight, weight_unit, volume,
|
|
|
marks, description, create_user, create_time,
|
|
marks, description, create_user, create_time,
|
|
|
ctnr, size, seal_no, is_lcl,
|
|
ctnr, size, seal_no, is_lcl,
|
|
|
- length,width,height)
|
|
|
|
|
|
|
+ length,width,height,serial_no_sync_key)
|
|
|
VALUES ('".$do_serial_no."',$qty, '".$ctnr['unit']."',$grs_kgs,'KGS',$cbm,
|
|
VALUES ('".$do_serial_no."',$qty, '".$ctnr['unit']."',$grs_kgs,'KGS',$cbm,
|
|
|
'".$ctnr['marks']."','".$ctnr['description']."','KLN_Online',now(),
|
|
'".$ctnr['marks']."','".$ctnr['description']."','KLN_Online',now(),
|
|
|
'".$ctnr['ctnr']."','".$ctnr['size']."','".$ctnr['seal_no']."','".$ctnr['is_lcl']."',
|
|
'".$ctnr['ctnr']."','".$ctnr['size']."','".$ctnr['seal_no']."','".$ctnr['is_lcl']."',
|
|
|
- $l4_length,$l4_width,$l4_height);";
|
|
|
|
|
|
|
+ $l4_length,$l4_width,$l4_height,'$serial_no_sync_key');";
|
|
|
}
|
|
}
|
|
|
$db->Execute($sql) or ( (!$db->ErrorMsg()) or error_log(common::dbLog($db, $sql), 0));
|
|
$db->Execute($sql) or ( (!$db->ErrorMsg()) or error_log(common::dbLog($db, $sql), 0));
|
|
|
}
|
|
}
|