Purchase order submit button : ps
This commit is contained in:
parent
bdcfe0c01e
commit
e6eb446a81
@ -266,7 +266,8 @@ class Amendmentpurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$POType = $this->request->getPost('POType');
|
$POType = $this->request->getPost('POType');
|
||||||
$PoRange = $this->request->getPost('Range');
|
$Local_Interstate = $this->request->getPost('Range');
|
||||||
|
|
||||||
$PaymentTermsText = $this->request->getPost('beforePaymentTermsText');
|
$PaymentTermsText = $this->request->getPost('beforePaymentTermsText');
|
||||||
$PaymentTerms = $this->request->getPost('PaymentTerms');
|
$PaymentTerms = $this->request->getPost('PaymentTerms');
|
||||||
$Otherpayment = $this->request->getPost('Otherpayment');
|
$Otherpayment = $this->request->getPost('Otherpayment');
|
||||||
@ -308,7 +309,7 @@ class Amendmentpurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
|
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
|
||||||
|
|
||||||
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult);
|
$POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $Local_Interstate, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus , 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult);
|
||||||
$file = $this->request->getFile('POFile');
|
$file = $this->request->getFile('POFile');
|
||||||
$requestfilename = $file->getName();
|
$requestfilename = $file->getName();
|
||||||
$PrePOFile = $this->request->getPost('PrePOFile');
|
$PrePOFile = $this->request->getPost('PrePOFile');
|
||||||
|
|||||||
@ -435,6 +435,7 @@ class Assetdetails extends BaseController
|
|||||||
$User = $this->request->getPost('User');
|
$User = $this->request->getPost('User');
|
||||||
$SupplierName = $this->request->getPost('SupplierName');
|
$SupplierName = $this->request->getPost('SupplierName');
|
||||||
$DateOfPurchase = $this->request->getPost('DateOfPurchase');
|
$DateOfPurchase = $this->request->getPost('DateOfPurchase');
|
||||||
|
$DOpurchase = "";
|
||||||
if ($DateOfPurchase != '') {
|
if ($DateOfPurchase != '') {
|
||||||
$DOpurchase = get_date_time_format($DateOfPurchase);
|
$DOpurchase = get_date_time_format($DateOfPurchase);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1251,8 +1251,8 @@ if (!empty($getlogpodtl)) {
|
|||||||
<th style="text-align:left !important; white-space: nowrap !important;">Item Code</th>
|
<th style="text-align:left !important; white-space: nowrap !important;">Item Code</th>
|
||||||
<th style="white-space: nowrap !important;">Item Description</th>
|
<th style="white-space: nowrap !important;">Item Description</th>
|
||||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||||
<th style="text-align: left; white-space: nowrap !important;">Quantity</th>
|
|
||||||
<th style="white-space: nowrap !important;">UOM</th>
|
<th style="white-space: nowrap !important;">UOM</th>
|
||||||
|
<th style="text-align: left; white-space: nowrap !important;">Quantity</th>
|
||||||
<th style="text-align: right; white-space: nowrap !important;">Rate <?php echo "($INRSYM)" ?></th>
|
<th style="text-align: right; white-space: nowrap !important;">Rate <?php echo "($INRSYM)" ?></th>
|
||||||
<th style="text-align: right; white-space: nowrap !important;">Basic Amount <?php echo "($INRSYM)" ?></th>
|
<th style="text-align: right; white-space: nowrap !important;">Basic Amount <?php echo "($INRSYM)" ?></th>
|
||||||
<th style="text-align: right; white-space: nowrap !important;">Tax Amount <?php echo "($INRSYM)" ?></th>
|
<th style="text-align: right; white-space: nowrap !important;">Tax Amount <?php echo "($INRSYM)" ?></th>
|
||||||
@ -1285,7 +1285,8 @@ if (!empty($getlogpodtl)) {
|
|||||||
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
|
<td style="text-align:left !important;"><?php echo $record->MaterialCode ?></td>
|
||||||
<td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
<td style="text-align:left !important;"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||||
echo $shortName; ?></td>
|
echo $shortName; ?></td>
|
||||||
<td style="text-align:left !important;"><?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
<td style="text-align:left !important;">
|
||||||
|
<?php if ($PONOStatus === PO_DRAFT || $PONOStatus === PO_CREATED) { ?>
|
||||||
<a href="#"
|
<a href="#"
|
||||||
class="editable-field"
|
class="editable-field"
|
||||||
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
||||||
@ -1296,9 +1297,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<button class="save-btn">✔</button>
|
<button class="save-btn">✔</button>
|
||||||
<button class="cancel-btn">✖</button>
|
<button class="cancel-btn">✖</button>
|
||||||
</div>
|
</div>
|
||||||
<?php } else {
|
<?php } else { echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; } ?>
|
||||||
echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-";
|
|
||||||
} ?>
|
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
|
<td style="text-align:left !important;"><?php echo $record->Quantity ?></td>
|
||||||
<td><?php echo $record->UOM ?></td>
|
<td><?php echo $record->UOM ?></td>
|
||||||
@ -1309,9 +1308,9 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
<td style="text-align:right !important;"><?php echo $record->Taxamount ?></td>
|
<td style="text-align:right !important;"><?php echo $record->Taxamount ?></td>
|
||||||
<td style="text-align:right !important;"><?php echo $record->TotalValue ?></td>
|
<td style="text-align:right !important;"><?php echo $record->TotalValue ?></td>
|
||||||
<!-- <td align="right"><?php echo $record->Quantity ?></td>
|
<!-- <td align="right"><?php // echo $record->Quantity ?></td> -->
|
||||||
<td align="right"><?php echo $record->ReceivedQuantity ?></td>
|
<!-- <td align="right"><?php // echo $record->ReceivedQuantity ?></td> -->
|
||||||
<td align="right"><?php echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td> -->
|
<!-- <td align="right"><?php // echo number_format($record->Quantity - $record->ReceivedQuantity, 2, '.', ''); ?></td> -->
|
||||||
|
|
||||||
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
|
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
|
||||||
|
|
||||||
@ -1660,7 +1659,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(3)"> <span class="bold">Submit</span></a>
|
<a class="btn btn-success Save" ID="Submit" onclick="Save(3)"> <span class="bold">Submit</span></a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
||||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
<!-- <a class="btn btn-success Save" ID="Submit" onclick="Save(2)"> <span class="bold">Submit</span></a> -->
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -2622,7 +2621,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
// Taxvalue: TotalTaxValue,
|
// Taxvalue: TotalTaxValue,
|
||||||
// TotalValue: TotalOrderValue
|
// TotalValue: TotalOrderValue
|
||||||
// }));
|
// }));
|
||||||
PONOStatus = <?php echo $PONOStatus; ?>
|
var PONOStatus = "<?php echo $PONOStatus; ?>";
|
||||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||||
var rowHtml = `
|
var rowHtml = `
|
||||||
<tr id="${temp}">
|
<tr id="${temp}">
|
||||||
@ -2917,8 +2916,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
$('#OtheritemDescription').val('');
|
$('#OtheritemDescription').val('');
|
||||||
}
|
}
|
||||||
var DeletedMaterialCode = '';
|
|
||||||
var DeletedMaterialName = '';
|
|
||||||
|
|
||||||
function DeleteRow(rowid) {
|
function DeleteRow(rowid) {
|
||||||
|
|
||||||
@ -3152,6 +3149,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function Save(status) {
|
function Save(status) {
|
||||||
|
console.log("serviceValidate",status);
|
||||||
if (status == '0') {
|
if (status == '0') {
|
||||||
stat = '<?php echo PO_DRAFT; ?>';
|
stat = '<?php echo PO_DRAFT; ?>';
|
||||||
} else if (status == '1') {
|
} else if (status == '1') {
|
||||||
@ -3179,71 +3177,72 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
if (serviceValidate()) {
|
if (serviceValidate()) {
|
||||||
if (document.getElementById('ServiceTable').rows.length < 2) {
|
console.log("serviceValidate");
|
||||||
alert('Atleast One Line needed');
|
if ($('#ServiceTable tbody tr').length < 1) {
|
||||||
return false;
|
alert('Atleast One Line needed');
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||||
// alert('Please Enter Payable Terms');
|
alert('Please Enter Payable Terms');
|
||||||
// $('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
// return false;
|
return false;
|
||||||
else if ($('#editdescofpo').val().trim() == '') {
|
} else if ($('#editdescofpo').val().trim() == '') {
|
||||||
alert('Please Enter Description Of Service');
|
alert('Please Enter Description Of Service');
|
||||||
$('#editdescofpo').focus();
|
$('#editdescofpo').focus();
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// $('#content').loader('show');
|
console.log("serviceValidate else");
|
||||||
var formData = new FormData($('.ServicePO')[0]);
|
// $('#content').loader('show');
|
||||||
$('#loader').show();
|
var formData = new FormData($('.ServicePO')[0]);
|
||||||
// disableButtons();
|
$('#loader').show();
|
||||||
$.ajax({
|
// disableButtons();
|
||||||
// data: $('.ServicePO').serialize(),
|
$.ajax({
|
||||||
type: "POST",
|
// data: $('.ServicePO').serialize(),
|
||||||
url: "<?php echo base_url() ?>servicepurchaseorder/UpdateServicePurchaseOrder",
|
type: "POST",
|
||||||
data: formData,
|
url: "<?php echo base_url() ?>servicepurchaseorder/UpdateServicePurchaseOrder",
|
||||||
processData: false,
|
data: formData,
|
||||||
contentType: false,
|
processData: false,
|
||||||
success: function(data) {
|
contentType: false,
|
||||||
|
success: function(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
|
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
|
||||||
// newWindow.document.write("<html><head><title>Response</title></head><body>");
|
// newWindow.document.write("<html><head><title>Response</title></head><body>");
|
||||||
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
|
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
|
||||||
// newWindow.document.write("</body></html>");
|
// newWindow.document.write("</body></html>");
|
||||||
// newWindow.document.close();
|
// newWindow.document.close();
|
||||||
// newWindow.moveTo(0, 0);
|
// newWindow.moveTo(0, 0);
|
||||||
// newWindow.resizeTo(screen.width, screen.height);
|
// newWindow.resizeTo(screen.width, screen.height);
|
||||||
if (data) {
|
if (data) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert(data);
|
alert(data);
|
||||||
$('#txtRowCount').val('');
|
$('#txtRowCount').val('');
|
||||||
$('#txtDeletedRow').val('');
|
$('#txtDeletedRow').val('');
|
||||||
$('#txtStatus').val('');
|
$('#txtStatus').val('');
|
||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('')
|
$('#txtDeliveryAddress').val('')
|
||||||
window.location = "purchaseorderListing";
|
window.location = "purchaseorderListing";
|
||||||
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
} else {
|
||||||
|
$('#loader').hide();
|
||||||
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
|
alert("Error");
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||||
|
alert("Error: " + textStatus);
|
||||||
// setTimeout(function() { enableButtons(); }, 2000);
|
// setTimeout(function() { enableButtons(); }, 2000);
|
||||||
} else {
|
|
||||||
$('#loader').hide();
|
|
||||||
// setTimeout(function() { enableButtons(); }, 2000);
|
|
||||||
alert("Error");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
});
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
}
|
||||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
|
||||||
alert("Error: " + textStatus);
|
|
||||||
// setTimeout(function() { enableButtons(); }, 2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this function is used to clear data changing schedule option
|
// this function is used to clear data changing schedule option
|
||||||
@ -3346,12 +3345,14 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
//ServiceTable
|
//ServiceTable
|
||||||
var rows = $('#ServiceTable tbody tr').length;
|
var rows = $('#ServiceTable tbody tr').length;
|
||||||
|
var DeletedMaterialCode = '';
|
||||||
|
var DeletedMaterialName = '';
|
||||||
|
|
||||||
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
|
if (DeletedMaterialCode != undefined && DeletedMaterialCode != '') {
|
||||||
|
|
||||||
$("#MaterialCode").append($('<option></option>').val(DeletedMaterialCode).html(DeletedMaterialCode + "-" + DeletedMaterialName));
|
$("#MaterialCode").append($('<option></option>').val(DeletedMaterialCode).html(DeletedMaterialCode + "-" + DeletedMaterialName));
|
||||||
DeletedMaterialCode = '';
|
DeletedMaterialCode = '';
|
||||||
DeletedMaterialCode = '';
|
DeletedMaterialName = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 2; i <= rows; i++) {
|
for (i = 2; i <= rows; i++) {
|
||||||
|
|||||||
@ -1839,14 +1839,18 @@ if (!empty($INRSYMBOL)) {
|
|||||||
function showsubmit() {
|
function showsubmit() {
|
||||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||||
console.log("Step 1 = SS");
|
console.log("Step 1 = SS");
|
||||||
var PO = $('#POType').val();
|
var POTy = $('#POType').val();
|
||||||
|
|
||||||
if (PO == 'SERVICE') {
|
if (POTy == 'SERVICE') {
|
||||||
if ($('#emergdescofpo').val().trim() == '') {
|
|
||||||
alert('Please Enter Description Of Service');
|
var descValue = tinymce.get('emergdescofpo').getContent().trim();
|
||||||
$('#emergdescofpo').focus();
|
descValue = $.trim(descValue);
|
||||||
return false;
|
|
||||||
}
|
if (descValue == '') {
|
||||||
|
alert('Please Enter Description Of Service');
|
||||||
|
$('#emergdescofpo').focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
@ -3026,10 +3030,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<label>Description Of Service <span
|
<label>Description Of Service <span
|
||||||
class="badge mandatory">*</span></label>
|
class="badge mandatory">*</span></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<textarea name="emergdescofpo" id="emergdescofpo" class="form-control" rows="3" cols="40">
|
||||||
$data = array('name' => 'emergdescofpo', 'value' => set_value('emergdescofpo'), 'id' => 'emergdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
<?php echo set_value('emergdescofpo'); ?>
|
||||||
echo form_textarea($data);
|
</textarea>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1583,17 +1583,12 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
|
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
|
||||||
<a class="btn btn-success Save" ID="Cancel"
|
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||||
href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span
|
<?php if ($PONOStatus == PO_DRAFT) { ?>
|
||||||
class="bold">Cancel</span></a>
|
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
||||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
|
|
||||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as
|
|
||||||
Draft</span></a>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span
|
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||||
class="bold">Submit</span></a>
|
<a class="btn btn btn-soft-primary waves-effect waves-light Save" ID="Submit" onclick="Save(4)"> <span class="bold">Approve</span></a>
|
||||||
<a class="btn btn btn-soft-primary waves-effect waves-light Save" ID="Submit"
|
|
||||||
onclick="Save(4)"> <span class="bold">Approve</span></a>
|
|
||||||
<?php } else {
|
<?php } else {
|
||||||
if ($DEPCode == FINANCE) { ?>
|
if ($DEPCode == FINANCE) { ?>
|
||||||
<a class="btn btn-success" ID="OK" onclick="PageRedirect()">OK</a>
|
<a class="btn btn-success" ID="OK" onclick="PageRedirect()">OK</a>
|
||||||
|
|||||||
@ -1202,11 +1202,6 @@ if (!empty($RequistionDetails)) {
|
|||||||
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
<table id="ImportTax" class="table nowrap table-bordered table-hover mb-0" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||||
@ -1215,7 +1210,7 @@ if (!empty($RequistionDetails)) {
|
|||||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo $INR ?></th>
|
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo $INR ?></th>
|
||||||
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo $INR ?></th>
|
<th style="white-space: nowrap !important; text-align:right !important">Basic Amount<?php echo $INR ?></th>
|
||||||
<!-- <th>Tax Amount</th>
|
<!-- <th>Tax Amount</th>
|
||||||
<th>Total Order Amount</th> -->
|
<th>Total Order Amount</th> -->
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -1239,7 +1234,7 @@ if (!empty($RequistionDetails)) {
|
|||||||
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
||||||
<td style="text-align:right !important"><?php echo $record->BasicValue ?></td>
|
<td style="text-align:right !important"><?php echo $record->BasicValue ?></td>
|
||||||
<!-- <td><?php echo $record->Taxamount ?></td>
|
<!-- <td><?php echo $record->Taxamount ?></td>
|
||||||
<td><?php echo $record->TotalOrderValue ?></td> -->
|
<td><?php echo $record->TotalOrderValue ?></td> -->
|
||||||
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
|
<input type="hidden" name="<?php echo 'Reqnumber' . $index ?>" id="<?php echo 'Reqnumber' . $index ?>" value="<?php echo $record->ReqNo; ?>" />
|
||||||
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
|
<input type="hidden" name="<?php echo 'departmentName' . $index ?>" id="<?php echo 'departmentName' . $index ?>" value="<?php echo $record->DepartmentName; ?>" />
|
||||||
<!-- <input type="hidden" name="<?php //echo 'AvlBudAmt'.$index
|
<!-- <input type="hidden" name="<?php //echo 'AvlBudAmt'.$index
|
||||||
@ -1352,7 +1347,7 @@ if (!empty($RequistionDetails)) {
|
|||||||
<?php
|
<?php
|
||||||
// } else {
|
// } else {
|
||||||
?>
|
?>
|
||||||
<td> <!-- <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td> -->
|
</td> <!-- <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td> -->
|
||||||
<?php
|
<?php
|
||||||
// }
|
// }
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -64,7 +64,7 @@ $insurenceno = '';
|
|||||||
$BudgetType = '';
|
$BudgetType = '';
|
||||||
|
|
||||||
if (!empty($POMaster)) {
|
if (!empty($POMaster)) {
|
||||||
// print_r($POMaster);
|
// dd($POMaster);
|
||||||
|
|
||||||
// print_r($Payment);
|
// print_r($Payment);
|
||||||
// echo "****";
|
// echo "****";
|
||||||
@ -1219,7 +1219,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<br>
|
<br>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="table-responsive" style="padding-bottom: 30px;">
|
<div class="table-responsive" style="padding-bottom: 30px;">
|
||||||
<table id="ServiceTable" class="table table-bordered table-hover" style="font-size:12px;">
|
<table id="revenueTax" class="table table-bordered table-hover" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -952,7 +952,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label>Insurance Options<span class="text-danger">*</span></label>
|
<label>Insurance Options<span class="text-danger">*</span></label>
|
||||||
<div class="form-group">
|
<div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -975,15 +975,19 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus" required="true" class="form-control select2');
|
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus" required="true" class="form-control select2"');
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3" id="insuranceTxtDiv" style="display:block;">
|
<div class="form-group col-md-3" id="insuranceTxtDiv" style="display:block;">
|
||||||
<label>Insurance No / Insurance Details<span class="text-danger">*</span></label>
|
<label>Insurance No / Insurance Details<span class="text-danger">*</span></label>
|
||||||
<div class="form-group">
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
$data = array('name' => 'InsuranceNumber', 'value' => set_value('InsuranceNumber', $InsuranceNumber), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
|
|||||||
@ -4277,7 +4277,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
|
|
||||||
//alert('in');
|
//alert('in');
|
||||||
PONOStatus = <?php echo $PONOStatus; ?>
|
var PONOStatus = "<?php echo $PONOStatus; ?>";
|
||||||
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
var shorten = materialName.length > 13 ? materialName.slice(0, 13) + "..." : materialName;
|
||||||
var rowHtml = `
|
var rowHtml = `
|
||||||
<tr id="${temp}">
|
<tr id="${temp}">
|
||||||
|
|||||||
@ -311,8 +311,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Save() {
|
function Save() {
|
||||||
|
$('#loader').show();
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
$('#IGRForm').submit();
|
// $('#IGRForm').submit();
|
||||||
|
$('#loader').hide();
|
||||||
|
alert("###");
|
||||||
|
}else{
|
||||||
|
$('#loader').hide();
|
||||||
|
alert("***");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -411,7 +417,7 @@
|
|||||||
var status = '';
|
var status = '';
|
||||||
var isOpenOrder = 0;
|
var isOpenOrder = 0;
|
||||||
if (id != '-1') {
|
if (id != '-1') {
|
||||||
$('#content').loader('show');
|
$('#loader').show();
|
||||||
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
|
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
|
||||||
$.each(y, function(idx, obj) {
|
$.each(y, function(idx, obj) {
|
||||||
if (id == obj.PONO) {
|
if (id == obj.PONO) {
|
||||||
@ -443,7 +449,7 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>GetIGRLineItemDetails",
|
url: "<?php echo base_url() ?>GetIGRLineItemDetails",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('#content').loader('hide');
|
$('#loader').hide();
|
||||||
//alert(data);
|
//alert(data);
|
||||||
var trHTML = '';
|
var trHTML = '';
|
||||||
var j = 0;
|
var j = 0;
|
||||||
|
|||||||
@ -2385,7 +2385,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||||
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||||
if (serviceValidate()) {
|
if (serviceValidate()) {
|
||||||
if (document.getElementById('ServiceTable').rows.length < 1) {
|
if ($('#ServiceTable tbody tr').length < 1) {
|
||||||
alert('Atleast One Line needed');
|
alert('Atleast One Line needed');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2397,7 +2397,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
// alert('Please Enter Other Payable Terms Description');
|
// alert('Please Enter Other Payable Terms Description');
|
||||||
// $('#Otherpayment').focus();
|
// $('#Otherpayment').focus();
|
||||||
// return false;
|
// return false;
|
||||||
} else if ($('#descofpo').val().trim() == '') {
|
else if ($('#descofpo').val().trim() == '') {
|
||||||
alert('Please Enter Description Of Service');
|
alert('Please Enter Description Of Service');
|
||||||
$('#descofpo').focus();
|
$('#descofpo').focus();
|
||||||
return false;
|
return false;
|
||||||
@ -2443,7 +2443,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function enableButtons() {
|
|||||||
|
|
||||||
function revenueValidate(){
|
function revenueValidate(){
|
||||||
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
||||||
|
var scheduleBy = $('#Scheduleby').val(); // Get the value
|
||||||
if ($('#drpSupplier').val() == "0") {
|
if ($('#drpSupplier').val() == "0") {
|
||||||
alert('Please Select the Supplier details');
|
alert('Please Select the Supplier details');
|
||||||
$('#drpSupplier').focus();
|
$('#drpSupplier').focus();
|
||||||
@ -60,13 +60,10 @@ function revenueValidate(){
|
|||||||
alert('Please Select the Delivery Date');
|
alert('Please Select the Delivery Date');
|
||||||
$('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if (radioValue == 1) {
|
}else if (radioValue == 1 && (!scheduleBy || scheduleBy.trim() == '')) {
|
||||||
var scheduleBy = $('#Scheduleby').val(); // Get the value
|
|
||||||
if (!scheduleBy || scheduleBy.trim() == '') { // Check if it's empty or undefined
|
|
||||||
alert('Please Enter the Schedule By');
|
alert('Please Enter the Schedule By');
|
||||||
$('#Scheduleby').focus();
|
$('#Scheduleby').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}else if($('#PODate').val() == ''){
|
}else if($('#PODate').val() == ''){
|
||||||
alert('Please Enter the Purchase Order date');
|
alert('Please Enter the Purchase Order date');
|
||||||
$('#PODate').focus();
|
$('#PODate').focus();
|
||||||
@ -97,54 +94,68 @@ function revenueValidate(){
|
|||||||
|
|
||||||
function serviceValidate(){
|
function serviceValidate(){
|
||||||
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
var radioValue = parseInt($("input[name='DateRange']:checked").val());
|
||||||
|
var scheduleBy = $('#Scheduleby').val(); // Get the value
|
||||||
|
|
||||||
if ($('#drpSupplier').val() == "0") {
|
if ($('#drpSupplier').val() == "0") {
|
||||||
|
console.log('Please Select the Supplier details');
|
||||||
alert('Please Select the Supplier details');
|
alert('Please Select the Supplier details');
|
||||||
$('#drpSupplier').focus();
|
$('#drpSupplier').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#workstatus').val() == "0") {
|
}else if ($('#workstatus').val() == "0") {
|
||||||
|
console.log('Please Select the Work Status');
|
||||||
alert('Please Select the Work Status');
|
alert('Please Select the Work Status');
|
||||||
$('#workstatus').focus();
|
$('#workstatus').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#PODate').val().trim() == '') {
|
}else if ($('#PODate').val().trim() == '') {
|
||||||
|
console.log('Please Enter the Purchase Order date');
|
||||||
alert('Please Enter the Purchase Order date');
|
alert('Please Enter the Purchase Order date');
|
||||||
$('#PODate').focus();
|
$('#PODate').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#DeliveryAddr').val().trim() == '') {
|
}else if ($('#DeliveryAddr').val().trim() == '') {
|
||||||
|
console.log('Please Enter the Delivery Address');
|
||||||
alert('Please Enter the Delivery Address');
|
alert('Please Enter the Delivery Address');
|
||||||
$('#DeliveryAddr').focus();
|
$('#DeliveryAddr').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if (radioValue === 0 && $('#Deliverydt').val() == '') {
|
}else if (radioValue === 0 && $('#Deliverydt').val() == '') {
|
||||||
|
console.log('Please Select the Delivery Date');
|
||||||
alert('Please Select the Delivery Date');
|
alert('Please Select the Delivery Date');
|
||||||
$('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if (radioValue == 1) {
|
}else if (radioValue == 1 && (!scheduleBy || scheduleBy.trim() == '')) {
|
||||||
var scheduleBy = $('#Scheduleby').val(); // Get the value
|
console.log('Please Enter the Schedule By');
|
||||||
if (!scheduleBy || scheduleBy.trim() == '') { // Check if it's empty or undefined
|
|
||||||
alert('Please Enter the Schedule By');
|
alert('Please Enter the Schedule By');
|
||||||
$('#Scheduleby').focus();
|
$('#Scheduleby').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}else if($('#PODate').val() == ''){
|
}else if($('#PODate').val() == ''){
|
||||||
|
console.log('Please Enter the Purchase Order date');
|
||||||
alert('Please Enter the Purchase Order date');
|
alert('Please Enter the Purchase Order date');
|
||||||
$('#PODate').focus();
|
$('#PODate').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#PoTypeOptions').val() == "0") {
|
}else if ($('#PoTypeOptions').val() == "0") {
|
||||||
|
console.log('Please Select Service Type');
|
||||||
alert('Please Select Service Type');
|
alert('Please Select Service Type');
|
||||||
$('#PoTypeOptions').focus();
|
$('#PoTypeOptions').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
}else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||||
|
console.log('Please Enter Payable Terms Description');
|
||||||
alert('Please Enter Payable Terms Description');
|
alert('Please Enter Payable Terms Description');
|
||||||
$('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
|
}else if($('#insuranceStatus').val() == "1" && $('#InsuranceNumber').val().trim() == ''){
|
||||||
|
console.log('Please Enter the Insurance No / Insurance Details');
|
||||||
alert('Please Enter the Insurance No / Insurance Details');
|
alert('Please Enter the Insurance No / Insurance Details');
|
||||||
$('#InsuranceNumber').focus();
|
$('#InsuranceNumber').focus();
|
||||||
return false;
|
return false;
|
||||||
}else if ($('#BudgetType').val() == "0") {
|
}else if ($('#BudgetType').val() == "0") {
|
||||||
|
console.log('Please Select Budget Type');
|
||||||
alert('Please Select Budget Type');
|
alert('Please Select Budget Type');
|
||||||
$('#BudgetType').focus();
|
$('#BudgetType').focus();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log("JS else part");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
// else if ($('#ServiceTable tbody tr').length < 1) {
|
// else if ($('#ServiceTable tbody tr').length < 1) {
|
||||||
// alert('Atleast One Line needed');
|
// alert('Atleast One Line needed');
|
||||||
@ -154,9 +165,7 @@ function serviceValidate(){
|
|||||||
// $('#descofpo').focus();
|
// $('#descofpo').focus();
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function capitalValidate(){
|
function capitalValidate(){
|
||||||
@ -332,21 +341,21 @@ function importValidate(){
|
|||||||
function validate()
|
function validate()
|
||||||
{
|
{
|
||||||
var radioValue = $("input[name='DateRange']:checked").val();
|
var radioValue = $("input[name='DateRange']:checked").val();
|
||||||
|
var PoType = $('#POType').val();
|
||||||
|
var currencyType = $('#currencytype').val();
|
||||||
|
|
||||||
var PoType = $('#POType').val();
|
if($('#drpSupplier').val() == "0")
|
||||||
var currencyType = $('#currencytype').val();
|
{
|
||||||
if($('#PODate').val() == '')
|
alert('Please Select the Supplier details');
|
||||||
|
$('#drpSupplier').focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if($('#PODate').val() == '')
|
||||||
{
|
{
|
||||||
alert('Please Enter the Purchase Order date');
|
alert('Please Enter the Purchase Order date');
|
||||||
$('#PODate').focus();
|
$('#PODate').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if($('#drpSupplier').val() == "0")
|
|
||||||
{
|
|
||||||
alert('Please Select the Supplier details');
|
|
||||||
$('#drpSupplier').focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
else if(radioValue==0 && $('#Deliverydate').val()==''){
|
||||||
alert('Please Select the Delivery Date');
|
alert('Please Select the Delivery Date');
|
||||||
$('#Deliverydate').focus();
|
$('#Deliverydate').focus();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user