Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
ff3a85de2a
@ -460,7 +460,7 @@ class Inwardgateregister extends BaseController
|
||||
$igr = array('IGRNO'=>$newIGRNO,'PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'TransporterId'=>$TransporterId,'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus, 'Remark'=>$MasterRemarks);
|
||||
$igr['MasterFile'] = $requestMasterFileName;
|
||||
#Step 4 Calling DB to Save IGR Master
|
||||
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
|
||||
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
|
||||
|
||||
if($IGRNO){
|
||||
|
||||
@ -689,7 +689,6 @@ class Inwardgateregister extends BaseController
|
||||
// Escape newlines and quotes for the JavaScript alert
|
||||
$finalstatement = json_encode($finalstatement);
|
||||
|
||||
|
||||
echo "<script>
|
||||
alert('$finalstatement');
|
||||
window.location.href = 'ViewIGR';
|
||||
|
||||
@ -195,7 +195,7 @@ class Inwardgateregister_model extends Model
|
||||
function viewpurchaseorder($PO)
|
||||
{
|
||||
|
||||
$subQuery = 'SELECT distinct POM.PONO, POL.MaterialCode, POL.Quantity, POL.ReceivedQuantity, (POL.Quantity - POL.ReceivedQuantity) as PendingQty, QuantityRejected, POL.PONO, MM.MaterialName, MM.UOM,MM.HSNCODE,POL.Rate
|
||||
$subQuery = 'SELECT distinct POM.PONO, POL.LineItemNo,POL.MaterialCode, POL.Quantity, POL.ReceivedQuantity, (POL.Quantity - POL.ReceivedQuantity) as PendingQty, QuantityRejected, POL.PONO, MM.MaterialName, MM.UOM,MM.HSNCODE,POL.Rate
|
||||
FROM t_purchaseorder_master POM
|
||||
LEFT JOIN t_purchaseorder_lineitem POL ON POL.PONO = POM.PONO
|
||||
LEFT JOIN t_igr_master IGM ON IGM.PONO = POL.PONO
|
||||
|
||||
@ -334,7 +334,7 @@
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Invoice Number <span class="text-danger">*</span></label>
|
||||
<?php $data = array('name' => 'InvoiceNO', 'value' => set_value('InvoiceNO'), 'id' => 'Invoice_No', 'class' => 'form-control', 'required=>"true"');
|
||||
<?php $data = array('name' => 'InvoiceNO', 'value' => set_value('InvoiceNO'), 'id' => 'Invoice_No', 'class' => 'form-control', 'required' =>true);
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -343,7 +343,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Invoice Date <span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'InvoiceDate', 'value' => set_value('InvoiceDate'), 'id' => 'Invoice_Date', 'class' => 'form-control', 'required=>"true"');
|
||||
$data = array('name' => 'InvoiceDate', 'value' => set_value('InvoiceDate'), 'id' => 'Invoice_Date', 'class' => 'form-control', 'required' =>true);
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -352,7 +352,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Material Received Date <span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'MaterialRcvdDate', 'value' => set_value('MaterialRcvdDate'), 'id' => 'MaterialRcvdDate', 'class' => 'form-control');
|
||||
$data = array('name' => 'MaterialRcvdDate', 'value' => set_value('MaterialRcvdDate'), 'id' => 'MaterialRcvdDate', 'class' => 'form-control' ,'required' =>true);
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -408,9 +408,9 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Remark</label>
|
||||
<label class="col-form-label">Remark<span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'MasterRemarks', 'value' => set_value('MasterRemarks'), 'id' => 'MasterRemarks', 'class' => 'form-control', 'autocomplete' => 'off','rows' => 3);
|
||||
$data = array('name' => 'MasterRemarks', 'value' => set_value('MasterRemarks'), 'id' => 'MasterRemarks', 'class' => 'form-control', 'autocomplete' => 'off','rows' => 3,'required' =>true);
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
@ -972,6 +972,16 @@
|
||||
});
|
||||
});
|
||||
$('#draftIGR').click(function() {
|
||||
let remarks = $('#MasterRemarks').val().trim();
|
||||
let rcvdDate = $('#MaterialRcvdDate').val().trim();
|
||||
let invoiceDate = $('#InvoiceDate').val().trim();
|
||||
let invoiceNo = $('#Invoice_No').val().trim();
|
||||
|
||||
// any are empty
|
||||
if (!remarks || !rcvdDate || !invoiceDate || !invoiceNo) {
|
||||
alert("Please fill all the required fields");
|
||||
return; // Stop
|
||||
}
|
||||
// $('#content').loader('show');
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var pono = $("#PONO1").val();
|
||||
@ -1035,7 +1045,16 @@
|
||||
});
|
||||
});
|
||||
$('#generateIGR').click(function() {
|
||||
|
||||
let remarks = $('#MasterRemarks').val().trim();
|
||||
let rcvdDate = $('#MaterialRcvdDate').val().trim();
|
||||
let invoiceDate = $('#InvoiceDate').val().trim();
|
||||
let invoiceNo = $('#Invoice_No').val().trim();
|
||||
|
||||
// any are empty
|
||||
if (!remarks || !rcvdDate || !invoiceDate || !invoiceNo) {
|
||||
alert("Please fill all the required fields");
|
||||
return; // Stop
|
||||
}
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var pono = $("#PONO1").val();
|
||||
var status = 1;
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
|
||||
<td><?= $record->isActive == 1 ? 'Active' : 'InActive'; ?></td>
|
||||
<td>
|
||||
<a
|
||||
<a class="edit-btn"
|
||||
onclick="editConfig(event)"
|
||||
href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"
|
||||
data-toggle="tooltip"
|
||||
@ -231,6 +231,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#config_list_table').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
|
||||
// Ensure the saved page is a valid number
|
||||
let savedPage =<?= $page ?? 0 ?>; // Default to 1 if not set
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
<i class="fa fa-key" style="color:#02a8b5;"></i>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a data-toggle="modal" href="#ccwizard" data-id="<?php echo $record->id; ?>"
|
||||
<a data-toggle="modal" class="edit-btn" href="#ccwizard" data-id="<?php echo $record->id; ?>"
|
||||
data-name="<?php echo $record->CostCenterName; ?>"><i
|
||||
class="fas fa-edit"></i> </a>
|
||||
<a onclick="confirmDelete(event)" style="cursor:pointer;" class="auditor-restricted-btn"
|
||||
@ -314,6 +314,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#cost_listing').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
|
||||
// Date range filter function
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function (settings, data, dataIndex) {
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<a
|
||||
<a class="edit-btn"
|
||||
href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>"
|
||||
data-toggle="tooltip"
|
||||
title="<?php echo $record->DEPCode ?> - Click here to View Department Details"><i
|
||||
@ -236,6 +236,19 @@
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#department_list_table').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
|
||||
// Date range filter function
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function (settings, data, dataIndex) {
|
||||
|
||||
@ -196,7 +196,7 @@ if (!empty($master)) {
|
||||
<!-- edit section -->
|
||||
|
||||
<a
|
||||
class="editConfigurationBtn"
|
||||
class="editConfigurationBtn edit-btn"
|
||||
|
||||
data-id="<?php echo $index; ?>"
|
||||
data-key="<?php echo $con->Key; ?>"
|
||||
@ -840,10 +840,22 @@ if (!empty($master)) {
|
||||
<!-- data table added for the config value table -->
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
new DataTable("#configtable", {
|
||||
var table = new DataTable("#configtable", {
|
||||
paging: true, // Enable Pagination
|
||||
ordering: true, // Enable Sorting
|
||||
searching: true // Enable Search
|
||||
});
|
||||
|
||||
// $('#datatable').on('click', '.edit-btn', function () {
|
||||
// const pageInfo = table.page.info(); // Now this works
|
||||
// sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
// });
|
||||
|
||||
// // Restore page
|
||||
// let startPage = sessionStorage.getItem("datatablePage");
|
||||
// if (startPage !== null) {
|
||||
// table.page(parseInt(startPage)).draw('page');
|
||||
// sessionStorage.removeItem("datatablePage");
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
@ -170,7 +170,7 @@
|
||||
<?php } else { ?>
|
||||
|
||||
|
||||
<a data-toggle="tooltip"
|
||||
<a data-toggle="tooltip" class="edit-btn"
|
||||
href="<?php echo base_url() ?>loadView_updateFactoryMachineMasterDetail?id=<?php echo $record['id'] ?>">
|
||||
<i class="fa fa-edit" data-toggle="tooltip"
|
||||
title="Click here to Edit machine detail "></i>
|
||||
@ -241,6 +241,18 @@
|
||||
e.preventDefault();
|
||||
table.draw();
|
||||
});
|
||||
|
||||
$('#datatable').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label class="col-form-label">Remark</label>
|
||||
<label class="col-form-label">Remark<span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'MasterRemarks', 'value' => set_value('MasterRemarks'), 'id' => 'MasterRemarks', 'class' => 'form-control', 'autocomplete' => 'off','rows' => 3);
|
||||
echo form_textarea($data);
|
||||
@ -167,7 +167,7 @@
|
||||
<th>Received Quantity</th>
|
||||
<th>Balance Quantity</th>
|
||||
<th>Invoice Quantity<span class="text-danger">*</span></th>
|
||||
<th>Remarks<span class="text-danger">*</span></th>
|
||||
<th>Remarks</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -307,6 +307,19 @@
|
||||
}
|
||||
|
||||
$('#IGRLink, #IGRDraftLink').on('click', function(e) {
|
||||
let remarks = $('#MasterRemarks').val().trim();
|
||||
let rcvdDate = $('#MaterialRcvdDate').val().trim();
|
||||
let invoiceDate = $('#InvoiceDate').val().trim();
|
||||
let invoiceNo = $('#InvoiceNo').val().trim();
|
||||
let pono = $('#PONO').val().trim();
|
||||
|
||||
|
||||
// any are empty
|
||||
if (!pono || !remarks || !rcvdDate || !invoiceDate || !invoiceNo) {
|
||||
alert("Please fill all the required fields");
|
||||
return; // Stop
|
||||
}
|
||||
console.log("All fields filled. Proceeding...");
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const strMsg = $btn.is('#IGRLink')
|
||||
@ -517,7 +530,12 @@
|
||||
value: item.MaterialCode,
|
||||
name: 'MaterialCode' + i
|
||||
}).appendTo('form');
|
||||
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'LineItemNo' + i,
|
||||
value: item.LineItemNo,
|
||||
name: 'LineItemNo' + i
|
||||
}).appendTo('form');
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
id: 'txtQuantityAsPerInvoice' + i,
|
||||
@ -639,17 +657,10 @@
|
||||
}
|
||||
|
||||
function validateReceivedQuantity(Rowid) {
|
||||
//alert(Rowid);
|
||||
var InvoiceQty = parseFloat($('#QuantityAsPerInvoice' + Rowid).val() == '' ? '0.00' : $('#QuantityAsPerInvoice' + Rowid).val());
|
||||
var PendingQty = parseFloat($('#PendingQuantity' + Rowid).text() == '' ? '0.00' : $('#PendingQuantity' + Rowid).text());
|
||||
var RecQty = parseFloat($('#txtReceivedQuantity' + Rowid).val() == '' ? '0.00' : $('#txtReceivedQuantity' + Rowid).val());
|
||||
var OrderedQty = parseFloat($("#Quantity_1" + Rowid).text());
|
||||
var r = $("#Remark" + Rowid).val();
|
||||
if (r == '') {
|
||||
alert("Please Enter the Remark")
|
||||
$("#Remark" + Rowid).focus();
|
||||
return false;
|
||||
}
|
||||
var isOpenOrder = parseInt($("#hiddenIsOpenOrder").val(), 2);
|
||||
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? 0 : 1;
|
||||
if (formatted_IsOpenOrder == 0) {
|
||||
|
||||
@ -155,7 +155,7 @@
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<a class="a-tag-link"
|
||||
<a class="a-tag-link edit-btn"
|
||||
href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>"
|
||||
data-toggle="tooltip"
|
||||
title="<?= $record->SupplierID ?> - Click here to edit Supplier details"><i
|
||||
@ -428,6 +428,18 @@ function formatNumberToIndianCurrency(number) {
|
||||
}
|
||||
});
|
||||
|
||||
$('#datatable').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
|
||||
// Date range filter function
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function (settings, data, dataIndex) {
|
||||
|
||||
@ -174,10 +174,10 @@
|
||||
href="<?php echo base_url() . 'reActivateTransporter?id=' . $record->id; ?>"><i
|
||||
class="fa fa-key" style="color:#02a8b5;"></i> </a>
|
||||
<?php } else { ?>
|
||||
<a data-toggle="modal" href="#transporterwizard"
|
||||
<a data-toggle="modal" href="#transporterwizard"
|
||||
data-id="<?php echo $record->id; ?>"
|
||||
data-name="<?php echo $record->name; ?>"><i
|
||||
class="fa fa-edit"></i> </a>
|
||||
class="fa fa-edit edit-btn"></i> </a>
|
||||
<a onclick="confirmDelete(event)"
|
||||
href="<?php echo base_url() . 'deleteTransporter?id=' . $record->id; ?>"><i
|
||||
class="fa fa-trash auditor-restricted-btn"></i> </a>
|
||||
@ -351,6 +351,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#transporter_list').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
|
||||
// Date range filter function
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function (settings, data, dataIndex) {
|
||||
|
||||
@ -151,7 +151,7 @@
|
||||
<td>
|
||||
<?php if ($record->isDeleted == 1) { ?>
|
||||
<span class="auditor-restricted">
|
||||
<a class="auditor-restricted-btn" onclick="confirmReActivateUser(event)"
|
||||
<a class="auditor-restricted-btn" onclick="confirmReActivateUser(event)"
|
||||
href="<?php echo base_url() . 'user/reActivateUser?UID=' . $record->userId . '&EMPID=' . $record->EmpID; ?>">
|
||||
<i class="fas fa-key"></i>
|
||||
</a>
|
||||
@ -160,7 +160,7 @@
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<a href="<?php echo base_url() . 'user/editOld?UID=' . $record->userId . '&EMPID=' . $record->EmpID; ?>">
|
||||
<a class="edit-btn" href="<?php echo base_url() . 'user/editOld?UID=' . $record->userId . '&EMPID=' . $record->EmpID; ?>">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
|
||||
@ -207,6 +207,8 @@
|
||||
var answer = confirm(" Do you want to delete the user from the List?")
|
||||
if (answer) {return;}else{event.preventDefault();}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||
@ -294,6 +296,19 @@
|
||||
toDateInput.value = fromDate;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#user_list_table').on('click', '.edit-btn', function () {
|
||||
const pageInfo = table.page.info(); // Now this works
|
||||
sessionStorage.setItem("datatablePage", pageInfo.page);
|
||||
});
|
||||
|
||||
// Restore page
|
||||
let startPage = sessionStorage.getItem("datatablePage");
|
||||
if (startPage !== null) {
|
||||
table.page(parseInt(startPage)).draw('page');
|
||||
sessionStorage.removeItem("datatablePage");
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -303,4 +318,6 @@
|
||||
console.log("Checkbox changed, submitting form...");
|
||||
$("#archiveFormId").submit();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -412,7 +412,7 @@
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Invoice Number <span class="text-danger">*</span></label>
|
||||
<?php $data = array('name' => 'InvoiceNO', 'value' => set_value('InvoiceNO'), 'id' => 'Invoice_No', 'class' => 'form-control', 'required=>"true"');
|
||||
<?php $data = array('name' => 'InvoiceNO', 'value' => set_value('InvoiceNO'), 'id' => 'Invoice_No', 'class' => 'form-control', 'required' =>true);
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -485,9 +485,9 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Remark</label>
|
||||
<label class="col-form-label">Remark<span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'MasterRemarks', 'value' => set_value('MasterRemarks'), 'id' => 'MasterRemarks', 'class' => 'form-control', 'autocomplete' => 'off','rows' => 3);
|
||||
$data = array('name' => 'MasterRemarks', 'value' => set_value('MasterRemarks'), 'id' => 'MasterRemarks', 'class' => 'form-control', 'autocomplete' => 'off','rows' => 3,'required' =>true);
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
@ -512,7 +512,7 @@
|
||||
<th style="width: 50px;">Tax (%)</th>
|
||||
<th style="width: 50px;">Taxable Amt</th>
|
||||
<th style="width: 50px;">Total Amt</th>
|
||||
<th style="width: 150px;">Remarks <span class="text-danger">*</span></th>
|
||||
<th style="width: 150px;">Remarks </th>
|
||||
<th style="width: 25px;">Net Weight</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -1450,6 +1450,17 @@
|
||||
});
|
||||
});
|
||||
$('#draftIGR').click(function() {
|
||||
let remarks = $('#MasterRemarks').val().trim();
|
||||
let rcvdDate = $('#MaterialRcvdDate').val().trim();
|
||||
let invoiceDate = $('#InvoiceDate').val().trim();
|
||||
let invoiceNo = $('#Invoice_No').val().trim();
|
||||
|
||||
// any are empty
|
||||
if (!remarks || !rcvdDate || !invoiceDate || !invoiceNo) {
|
||||
alert("Please fill all the required fields");
|
||||
return; // Stop
|
||||
}
|
||||
console.log("All fields filled. Proceeding...");
|
||||
// $('#content').loader('show');
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var pono = $("#PONO1").val();
|
||||
@ -1508,12 +1519,23 @@
|
||||
success: function(data) {
|
||||
|
||||
alert(data);
|
||||
// location.reload();
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#generateIGR').click(function() {
|
||||
|
||||
let remarks = $('#MasterRemarks').val().trim();
|
||||
let rcvdDate = $('#MaterialRcvdDate').val().trim();
|
||||
let invoiceDate = $('#InvoiceDate').val().trim();
|
||||
let invoiceNo = $('#Invoice_No').val().trim();
|
||||
|
||||
// any are empty
|
||||
if (!remarks || !rcvdDate || !invoiceDate || !invoiceNo) {
|
||||
alert("Please fill all the required fields");
|
||||
return; // Stop
|
||||
}
|
||||
console.log("All fields filled. Proceeding...");
|
||||
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var pono = $("#PONO1").val();
|
||||
var status = 1;
|
||||
@ -1964,9 +1986,9 @@
|
||||
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
|
||||
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
|
||||
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
|
||||
$('#amount' + Rowid).text(amount);
|
||||
$('#tax_amount' + Rowid).text(tax_amount);
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount);
|
||||
$('#amount' + Rowid).text(amount.toFixed(2));
|
||||
$('#tax_amount' + Rowid).text(tax_amount.toFixed(2));
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount.toFixed(2));
|
||||
return true;
|
||||
} else {
|
||||
if (parseInt(OrderedQty) !== 0) {
|
||||
@ -1977,18 +1999,18 @@
|
||||
} else if ((InvoiceQty) - OrderedQty > 0.00) {
|
||||
alert("Order is completed.");
|
||||
$("#QuantityAsPerInvoice" + Rowid).focus().val('');
|
||||
$('#amount' + Rowid).text(amount);
|
||||
$('#tax_amount' + Rowid).text(tax_amount);
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount);
|
||||
$('#amount' + Rowid).text(amount.toFixed(2));
|
||||
$('#tax_amount' + Rowid).text(tax_amount.toFixed(2));
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount.toFixed(2));
|
||||
return false;
|
||||
} else {
|
||||
var PendingQty = OrderedQty - (InvoiceQty);
|
||||
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
|
||||
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
|
||||
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
|
||||
$('#amount' + Rowid).text(amount);
|
||||
$('#tax_amount' + Rowid).text(tax_amount);
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount);
|
||||
$('#amount' + Rowid).text(amount.toFixed(2));
|
||||
$('#tax_amount' + Rowid).text(tax_amount.toFixed(2));
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount.toFixed(2));
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@ -1996,9 +2018,9 @@
|
||||
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
|
||||
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
|
||||
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
|
||||
$('#amount' + Rowid).text(amount);
|
||||
$('#tax_amount' + Rowid).text(tax_amount);
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount);
|
||||
$('#amount' + Rowid).text(amount.toFixed(2));
|
||||
$('#tax_amount' + Rowid).text(tax_amount.toFixed(2));
|
||||
$('#grand_total_amount' + Rowid).text(grand_total_amount.toFixed(2));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user