CHANGE_tracker issue

This commit is contained in:
Smart 2024-10-03 17:44:09 +05:30
parent 723ddb3336
commit 73c939ff91
4 changed files with 61 additions and 44 deletions

View File

@ -1100,12 +1100,12 @@ if (!empty($getlogpodtl)) {
<th>Requisition No</th>
<th>Item Code</th>
<th>Item Name</th>
<th>Quantity</th>
<th style="text-align: right;">Quantity</th>
<th>UOM</th>
<th>Rate <?php echo "($INRSYM)" ?></th>
<th>Basic Amount <?php echo "($INRSYM)" ?></th>
<th>Tax Amount <?php echo "($INRSYM)" ?></th>
<th>Total Order Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align: right;">Rate <?php echo "($INRSYM)" ?></th>
<th style="text-align: right;">Basic Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align: right;">Tax Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align: right;">Total Order Amount <?php echo "($INRSYM)" ?></th>
<!-- <th>Actual Quantity</th>
<th>Received Quantity</th>
<th>Pending Quantity</th> -->

View File

@ -2225,10 +2225,10 @@ if (!empty($getlogpodtl)) {
<th style="text-align:center !important">Item Description</th>
<th style="text-align:center !important">Quantity</th>
<th style="text-align:center !important">UOM</th>
<th style="text-align:center !important">Rate <?php echo "($INRSYM)" ?></th>
<th style="text-align:center !important">Basic Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align:center !important">Tax Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align:center !important">Total Order Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align:right !important">Rate <?php echo "($INRSYM)" ?></th>
<th style="text-align:right !important">Basic Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align:right !important">Tax Amount <?php echo "($INRSYM)" ?></th>
<th style="text-align:right !important">Total Order Amount <?php echo "($INRSYM)" ?></th>
<!-- <th>Actual Quantity</th>
<th>Received Quantity</th>
<th>Pending Quantity</th> -->

View File

@ -150,13 +150,13 @@ if (empty($Status)) {
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="po_release" class="table dt-responsive nowrap w-100">
<table id="po_release" class="table dt-responsive wrap w-100">
<thead>
<tr>
<th>PO Date</th>
<th>Purchase Order Number</th>
<th>Purchase Order Type</th>
<th>Cost Center Name</th>
<th>PONO</th>
<th>PO Type</th>
<th>Cost Center</th>
<th>Supplier Name</th>
<th>Created By</th>
<th>Department</th>
@ -206,7 +206,8 @@ if (empty($Status)) {
<td><?php echo $record->Approver ?></td>
<td><?php
<td>
<?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
@ -226,15 +227,12 @@ if (empty($Status)) {
?></td>
?>
</td>
<?php
// if($record->StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){
if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) {
?>
<td>
<td>
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?>
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
<option value="-1">Select Action</option>
@ -242,18 +240,18 @@ if (empty($Status)) {
<option value="1">Approve And Release</option>
<option value="2">OnHold</option>
</select>
</td>
<?php } else {
echo "<td><center>-</center></td>";
} ?>
<?php } ?>
</td>
<td contenteditable="true" id="remarks<?php echo $index; ?>"><?php
if ($record->Remarks == '') {
} else {
echo $record->Remarks;
} ?></td>
<td contenteditable="true" id="remarks<?php echo $index; ?>">
<?php
if ($record->Remarks == '') {
} else {
echo $record->Remarks;
} ?>
</td>
</tr>
@ -545,6 +543,10 @@ if (empty($Status)) {
<script>
$(document).ready(function() {
$(document).on('click', '.text-truncate', function() {
$(this).toggleClass('expanded');
});
// Initialize the DataTable
var table = $('#po_release').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
@ -558,13 +560,18 @@ if (empty($Status)) {
], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
columnDefs: [{
targets: '_all',
className: 'text-truncate'
},
],
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
},
autoWidth: true
}
});
// Date range filter function
@ -643,4 +650,7 @@ if (empty($Status)) {
}
});
});
$(document).ready(function() {
$('[data-toggle="tooltip"]').tooltip();
});
</script>

View File

@ -2378,8 +2378,8 @@ if (!empty($INRSYMBOL)) {
$('#PoTypeOptions').focus();
return false;
} else if ($('#Otherpayment').val() == '') {
alert('Please Enter the Payable Terms');
} else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
alert('Please Enter Other Payable Terms Description');
$('#Otherpayment').focus();
return false;
@ -2441,14 +2441,21 @@ if (!empty($INRSYMBOL)) {
}
//If others is the payment terms to display mandatory field
$("#PaymentTerms").change(function() {
if ($('#PaymentTerms').val().trim() == 'PT08') {
$('#otheroptiondiv').show();
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
}
});
$(document).ready(function () {
$("#PaymentTerms").change(function() {
console.log("Payment terms changed."); // Check if event is triggered.
var paymentValue = $('#PaymentTerms').val().trim();
console.log("Selected value:", paymentValue); // Check the selected value.
if (paymentValue === 'PT08') {
$('#otheroptiondiv').show();
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
}
});
});
function Reset() {
location.reload();