From cb9de30f6f50dc6923abd0e41c20261eaa66c8dc Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 16 Dec 2024 14:12:27 +0530 Subject: [PATCH] GWM - live issue --- app/Views/po_pdf.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Views/po_pdf.php b/app/Views/po_pdf.php index 31978d44..0c0ef00d 100755 --- a/app/Views/po_pdf.php +++ b/app/Views/po_pdf.php @@ -161,6 +161,7 @@ $modShp = (!empty($POItem) && !empty($POItem[0]->Mode_Of_Shipment)) ? $POItem[0]->Mode_Of_Shipment : "-"; $insNo = (!empty($POItem) && !empty($POItem[0]->InsuranceNumber)) ? $POItem[0]->InsuranceNumber : 'No'; $PaymentTerms = (!empty($POItem) && !empty($POItem[0]->PaymentTerms)) ? ($POItem[0]->PaymentTerms == 'Others' ? $POItem[0]->PaymentOtherDescription : $POItem[0]->PaymentTerms) : ""; + $CurrencyType = (!empty($POItem) && !empty($POItem[0]->CurrencyType)) ? $POItem[0]->CurrencyType : ""; $purchaseorderDate = (!empty($POItem) && !empty($POItem[0]->PODate)) ? new DateTime($POItem[0]->PODate, new DateTimeZone('Asia/Kolkata')) : ""; $poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-"; $IsOpenOrder = (!empty($POItem) && !empty($POItem[0]->IsOpenOrder)) ? $POItem[0]->IsOpenOrder : ""; @@ -212,7 +213,7 @@ $invoiceTotalAmountInWords = '-'; // For Converting number to words - function convertNumber($amt) + function convertNumber($amt,$CurrencyType) { $ShowPaise = '0'; $totalAmt = explode(".", $amt); @@ -271,10 +272,10 @@ if ($ShowPaise == '0') { - $amountInWords = "Rupees " . $result . " Only"; + $amountInWords = $CurrencyType ." ". $result . " Only"; } else { - $amountInWords = "Rupees " . $result . " Paise " . $points . " Only"; + $amountInWords = $CurrencyType ." ". $result . " Paise " . $points . " Only"; } @@ -737,7 +738,7 @@ 0) { - $invoiceTotalAmountInWords = convertNumber(abs(round($invoiceTotalAmount))); + $invoiceTotalAmountInWords = convertNumber(abs(round($invoiceTotalAmount)) , $CurrencyType); } echo $invoiceTotalAmountInWords; ?>