@@ -545,6 +543,10 @@ if (empty($Status)) {
\ No newline at end of file
diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php
index e6a6733f..2e17f5b2 100755
--- a/app/Views/rawmaterialListing.php
+++ b/app/Views/rawmaterialListing.php
@@ -80,7 +80,7 @@
-
+
diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php
index bea4707d..09015242 100755
--- a/app/Views/servicePurchaseorder.php
+++ b/app/Views/servicePurchaseorder.php
@@ -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();