This commit is contained in:
VE10-Sanjeev 2025-04-24 09:09:34 +00:00
parent 71e2c4b856
commit dbb94ce103

View File

@ -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);
@ -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')