mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/ARCHIVED-IZYIM.git
synced 2026-08-19 04:14:01 +00:00
temporary remove messenger and notice
This commit is contained in:
@@ -102,7 +102,7 @@ var Script = function() {
|
||||
};
|
||||
};
|
||||
$(function() {
|
||||
startRefresh();
|
||||
//startRefresh();
|
||||
// getSide();
|
||||
});
|
||||
|
||||
|
||||
@@ -196,13 +196,13 @@ var FormWizard = function () {
|
||||
$("#wait").hide();
|
||||
$("#suksesupdate").show();
|
||||
//$("#gagalupdate").hide();
|
||||
location.reload();
|
||||
//location.reload();
|
||||
}else{
|
||||
$("#finish").show();
|
||||
$("#wait").hide();
|
||||
//$("#suksesupdate").show();
|
||||
$("#gagalupdate").show();
|
||||
location.reload();
|
||||
//location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,13 +227,13 @@ var FormWizard = function () {
|
||||
$("#wait").hide();
|
||||
$("#suksesupdate").show();
|
||||
//$("#gagalupdate").hide();
|
||||
location.reload();
|
||||
//location.reload();
|
||||
}else{
|
||||
$("#finish").show();
|
||||
$("#wait").hide();
|
||||
//$("#suksesupdate").show();
|
||||
$("#gagalupdate").show();
|
||||
location.reload();
|
||||
//location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ var Script = function() {
|
||||
|
||||
};
|
||||
$(function() {
|
||||
startRefresh();
|
||||
//startRefresh();
|
||||
});
|
||||
|
||||
}();
|
||||
@@ -98,7 +98,7 @@ var Script = function() {
|
||||
|
||||
};
|
||||
$(function() {
|
||||
startRefresh();
|
||||
//startRefresh();
|
||||
});
|
||||
|
||||
}();
|
||||
@@ -243,7 +243,7 @@ var Script = function() {
|
||||
|
||||
};
|
||||
$(function() {
|
||||
startRefresh();
|
||||
//startRefresh();
|
||||
});
|
||||
|
||||
}();
|
||||
|
||||
+1
-1
@@ -356,7 +356,7 @@ var Script = function() {
|
||||
};
|
||||
|
||||
$(function() {
|
||||
startRefresh();
|
||||
//startRefresh();
|
||||
});
|
||||
|
||||
}();
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
timeout();
|
||||
}, 3000);
|
||||
}
|
||||
timeout();
|
||||
//timeout();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
@@ -200,6 +200,8 @@ function the_warehouse_arrangement(){
|
||||
$warehousearrangementsCreate = $db->query("INSERT INTO warehouse_arrangements (receive_on, transport_company_name, consignment_note_no, warehouse_receive_note_no, receiving_person, remarks, status, so_id, user_id, company_id) VALUES (:receive_on, :transport_company_name, :consignment_note_no, :warehouse_receive_note_no, :receiving_person, :remarks, :status, :so_id, :user_id, :company_id);");
|
||||
$warehouse_arrangement_id = $db->lastInsertId();
|
||||
$unmatch_count = 0;
|
||||
|
||||
|
||||
if($warehousearrangementsCreate){
|
||||
foreach ($warehouse_arrangement_items as $key => $warehouse_arrangement_item) {
|
||||
$db->bind("actual_ctn", $warehouse_arrangement_item['actual_ctn']);
|
||||
@@ -214,25 +216,30 @@ function the_warehouse_arrangement(){
|
||||
$db->bind("so_item_id", $warehouse_arrangement_item['so_item_id']);
|
||||
$db->bind("warehouse_arrangement_id", $warehouse_arrangement_id);
|
||||
|
||||
|
||||
|
||||
|
||||
$warehouse_arrangement_itemsCreate = $db->query("INSERT INTO warehouse_arrangement_items (actual_ctn, actual_measurement_ctn, actual_weight_ctn, actual_height_ctn, actual_width_ctn, actual_depth_ctn, status, isDamaged, image, so_item_id, warehouse_arrangement_id) VALUES (:actual_ctn, :actual_measurement_ctn, :actual_weight_ctn, :actual_height_ctn, :actual_width_ctn, :actual_depth_ctn, :status, :isDamaged, :image, :so_item_id, :warehouse_arrangement_id);");
|
||||
|
||||
|
||||
if($warehouse_arrangement_item['status'] == 1 || $warehouse_arrangement_item['isDamaged'] == 1){
|
||||
$unmatch_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else{
|
||||
return new Response("Warehouse arrangement create failed", 201);
|
||||
}
|
||||
|
||||
|
||||
// ** HOW DO YOU CHECK FOREACH USING THIS IF ELSE **
|
||||
if ($warehouse_arrangement_itemsCreate) {
|
||||
|
||||
//update so status
|
||||
$db->bind("status", "1");
|
||||
$db->bind("so_id", $so_id);
|
||||
$soUpdate = $db->query("UPDATE `shipping_orders` SET `status`=:status WHERE so_id = :so_id");
|
||||
$soUpdate = $db->query("UPDATE `shipping_orders` SET `status`=:status WHERE so_id = :so_id");
|
||||
|
||||
return new Response('UPDATE `shipping_orders` SET `status`='.$status.' WHERE so_id = '.$so_id.'"', 201);
|
||||
|
||||
//create messages
|
||||
$db->bind("message", "Your Warehouse Receive Note have been created.");
|
||||
@@ -278,10 +285,10 @@ function the_warehouse_arrangement(){
|
||||
if($soUpdate){
|
||||
return new Response("SUCCESS", 200);
|
||||
}else{
|
||||
return new Response('FAILED', 201);
|
||||
return new Response('Shipping order update failed', 201);
|
||||
}
|
||||
} else {
|
||||
return new Response('FAILED', 201);
|
||||
return new Response('Warehouse arrangement item update failed', 201);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -49,6 +49,7 @@ function getItemBalanceFromSOID($so_id){
|
||||
}
|
||||
}
|
||||
|
||||
// get shipping order if warehouse not received
|
||||
function getAllSOWithoutWarehouse(){
|
||||
global $db;
|
||||
|
||||
@@ -57,11 +58,10 @@ function getAllSOWithoutWarehouse(){
|
||||
|
||||
$PO = "";
|
||||
foreach ($data as $key => $value) {
|
||||
// Fix display all shipping order
|
||||
// if(getItemBalanceFromSOID($value['so_id']) <> 0){
|
||||
// $PO .= "<option value='" . $value['so_id'] . "'>" . $value['order_no'] . " (" . $value['marking'] . ')</option>';
|
||||
// }
|
||||
$PO .= "<option value='" . $value['so_id'] . "'>" . $value['order_no'] . " (" . $value['marking'] . ')</option>';
|
||||
if(getItemBalanceFromSOID($value['so_id']) <> 0){
|
||||
$PO .= "<option value='" . $value['so_id'] . "'>" . $value['order_no'] . " (" . $value['marking'] . ')</option>';
|
||||
}
|
||||
//$PO .= "<option value='" . $value['so_id'] . "'>" . $value['order_no'] . " (" . $value['marking'] . ')</option>';
|
||||
|
||||
}
|
||||
return $PO;
|
||||
|
||||
@@ -39,6 +39,9 @@ function getGeneralStatus($so_id){
|
||||
}elseif($daStatus == 5){
|
||||
return "Delivery Request Rejected";
|
||||
}
|
||||
elseif($soStatus == 4 ){
|
||||
return "Order Canceled";
|
||||
}
|
||||
}else{
|
||||
return "Order Created";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user