mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/ARCHIVED-IZYIM.git
synced 2026-08-19 04:14:01 +00:00
Tried to fix the Finish for Warehouse-Note
This commit is contained in:
@@ -178,6 +178,22 @@ var FormWizard = function () {
|
||||
$('#form_wizard_1').find('.button-previous').hide();
|
||||
|
||||
$('#form_wizard_1 .button-submit').click(function () {
|
||||
// check if item is empty
|
||||
// if ($(".dataTables_empty")[0]){
|
||||
// alert("There is no order item, please contact importer");
|
||||
// //return false;
|
||||
// }
|
||||
var rowCount = $('#shipping_order_items tr').length;
|
||||
|
||||
// check if all field in item is empty
|
||||
for (let i = 1; i < rowCount+1; i++)
|
||||
{
|
||||
if($('.warehouse_arrangement_items_' + i).val() == ''){
|
||||
alert('please input quantity');
|
||||
return;
|
||||
}
|
||||
}
|
||||
//this is the test finish button
|
||||
var dataString = $('#submit_form').serialize() + '&submit_type=no_decision_request';
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -188,7 +204,7 @@ var FormWizard = function () {
|
||||
$("#finish").hide();
|
||||
$("#wait").show();
|
||||
$("#suksesupdate").hide();
|
||||
$("#gagalupdate").hide();
|
||||
$("#gagalupdate").hide();
|
||||
},
|
||||
complete: function(e, xhr, settings){
|
||||
if(e.status === 200){
|
||||
@@ -202,7 +218,7 @@ var FormWizard = function () {
|
||||
$("#wait").hide();
|
||||
//$("#suksesupdate").show();
|
||||
$("#gagalupdate").show();
|
||||
location.reload();
|
||||
//location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,14 +226,14 @@ var FormWizard = function () {
|
||||
}).hide();
|
||||
$('#decision_request .submit').click(function () {
|
||||
|
||||
// check if item is empty
|
||||
// check if item is empty
|
||||
var rowCount = $('#shipping_order_items tr').length;
|
||||
if ($(".dataTables_empty")[0]){
|
||||
alert("There is no order item, please contact importer");
|
||||
//return false;
|
||||
}
|
||||
|
||||
// check if all field in item is empty
|
||||
// check if all field in item is empty
|
||||
for (let i = 1; i < rowCount+1; i++)
|
||||
{
|
||||
if($('.warehouse_arrangement_items_' + i).val() == ''){
|
||||
@@ -263,22 +279,22 @@ var FormWizard = function () {
|
||||
jQuery("#form_decision_reject").modal('show');
|
||||
});
|
||||
$('#decision_reject .submit').click(function () {
|
||||
// check if item is empty
|
||||
// check if item is empty
|
||||
var rowCount = $('#shipping_order_items tr').length;
|
||||
if ($(".dataTables_empty")[0]){
|
||||
alert("There is no order item, please contact importer");
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if all field in item is empty
|
||||
// check if all field in item is empty
|
||||
for (let i = 1; i < rowCount+1; i++)
|
||||
{
|
||||
if($('#warehouse_arrangement_items[1][actual_weight_ctn]').val() == ''){
|
||||
alert('please input quantity');
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
var dataString = $('#submit_form').serialize() + '&' + $('#decision_reject').serialize() + '&type=decision_reject';
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -289,7 +305,7 @@ var FormWizard = function () {
|
||||
$("#finish").hide();
|
||||
$("#wait").show();
|
||||
$("#suksesupdate").hide();
|
||||
$("#gagalupdate").hide();
|
||||
$("#gagalupdate").hide();
|
||||
},
|
||||
complete: function(e, xhr, settings){
|
||||
if(e.status === 200){
|
||||
|
||||
@@ -96,7 +96,7 @@ function the_warehouse_arrangement(){
|
||||
."<td>". $shipping_order_item['packaging_height']. " x ". $shipping_order_item['packaging_width']. " x ". $shipping_order_item['packaging_depth']. "</td>"
|
||||
."<td><input placeholder='Height' name='warehouse_arrangement_items[".$count."][actual_height_ctn]' id='warehouse_arrangement_items[".$count."][actual_height_ctn]' class='form-control input-sm warehouse_arrangement_items height' required /> x <input placeholder='Width' name='warehouse_arrangement_items[".$count."][actual_width_ctn]' id='warehouse_arrangement_items[".$count."][actual_width_ctn]' class='form-control input-sm warehouse_arrangement_items width' required/> x <input placeholder='Depth' name='warehouse_arrangement_items[".$count."][actual_depth_ctn]' id='warehouse_arrangement_items[".$count."][actual_depth_ctn]' class='form-control input-sm warehouse_arrangement_items depth' required/></td>"
|
||||
."<td>". $shipping_order_item['packaging_nett']. "</td>"
|
||||
."<td><input type='number' name='warehouse_arrangement_items[".$count."][actual_weight_ctn]' id='warehouse_arrangement_items[".$count."][actual_weight_ctn]' class='form-control input-sm warehouse_arrangement_items weight' /></td>"
|
||||
."<td><input type='number' name='warehouse_arrangement_items[".$count."][actual_weight_ctn]' id='warehouse_arrangement_items[".$count."][actual_weight_ctn]' class='form-control input-sm warehouse_arrangement_items weight' min='0' style='width:80px;' /></td>"
|
||||
."<td>".getItemBalance($shipping_order_item['id'], $so_id)."</td>"
|
||||
."<td></td>"
|
||||
."<td><label class='mt-checkbox mt-checkbox-single mt-checkbox-outline'><input name='warehouse_arrangement_items[".$count."][isDamaged]' id='warehouse_arrangement_items[".$count."][isDamaged]' type='checkbox' class='checkboxes' onchange='toggleCheckbox(this)' value='1'><span></span></label></td>"
|
||||
|
||||
Reference in New Issue
Block a user