Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2024-12-16 23:55:18 +05:30
commit f7ea0c9eae

View File

@ -161,6 +161,7 @@
$modShp = (!empty($POItem) && !empty($POItem[0]->Mode_Of_Shipment)) ? $POItem[0]->Mode_Of_Shipment : "-"; $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'; $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) : ""; $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')) : ""; $purchaseorderDate = (!empty($POItem) && !empty($POItem[0]->PODate)) ? new DateTime($POItem[0]->PODate, new DateTimeZone('Asia/Kolkata')) : "";
$poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-"; $poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-";
$IsOpenOrder = (!empty($POItem) && !empty($POItem[0]->IsOpenOrder)) ? $POItem[0]->IsOpenOrder : ""; $IsOpenOrder = (!empty($POItem) && !empty($POItem[0]->IsOpenOrder)) ? $POItem[0]->IsOpenOrder : "";
@ -212,7 +213,7 @@
$invoiceTotalAmountInWords = '-'; $invoiceTotalAmountInWords = '-';
// For Converting number to words // For Converting number to words
function convertNumber($amt) function convertNumber($amt,$CurrencyType)
{ {
$ShowPaise = '0'; $ShowPaise = '0';
$totalAmt = explode(".", $amt); $totalAmt = explode(".", $amt);
@ -271,10 +272,10 @@
if ($ShowPaise == '0') { if ($ShowPaise == '0') {
$amountInWords = "Rupees " . $result . " Only"; $amountInWords = $CurrencyType ." ". $result . " Only";
} else { } else {
$amountInWords = "Rupees " . $result . " Paise " . $points . " Only"; $amountInWords = $CurrencyType ." ". $result . " Paise " . $points . " Only";
} }
@ -737,7 +738,7 @@
<?php <?php
$invoiceTotalBasic = array_sum($basic); $invoiceTotalBasic = array_sum($basic);
if ($invoiceTotalAmount > 0) { if ($invoiceTotalAmount > 0) {
$invoiceTotalAmountInWords = convertNumber(abs(round($invoiceTotalAmount))); $invoiceTotalAmountInWords = convertNumber(abs(round($invoiceTotalAmount)) , $CurrencyType);
} }
echo $invoiceTotalAmountInWords; ?> echo $invoiceTotalAmountInWords; ?>
</p> </p>