diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php index dc0673e7..739846b3 100755 --- a/app/Controllers/Amendmentpurchaseorder.php +++ b/app/Controllers/Amendmentpurchaseorder.php @@ -337,13 +337,10 @@ class Amendmentpurchaseorder extends BaseController // die; $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); - if(!empty($LastPO)){ if (count($LastPO) > 0) { $NewPO = $LastPO[0]['PONO']; } - }else{ - $NewPO = ""; } if( $changeStatus == "ST026" || $changeStatus == "ST014"){ @@ -1026,6 +1023,7 @@ class Amendmentpurchaseorder extends BaseController $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO); + $NewPO =''; if (count($LastPO) > 0) { $NewPO = $LastPO[0]['PONO']; } @@ -1418,8 +1416,8 @@ class Amendmentpurchaseorder extends BaseController $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO); - $NewPO = ''; + $NewPO = ''; if (count($LastPO) > 0) { $NewPO = $LastPO[0]['PONO']; } diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php index cf09bb3d..7aae0ab3 100755 --- a/app/Views/alterpurchaseorder.php +++ b/app/Views/alterpurchaseorder.php @@ -36,14 +36,12 @@ if (!empty($INRSYMBOL)) { - + - +
- +
@@ -2232,10 +2236,17 @@ if (!empty($getlogpodtl)) { - - - - + + + + @@ -2249,7 +2260,7 @@ if (!empty($getlogpodtl)) { foreach ($POItem as $record) { $index = $index + 1; - ?> + ?> @@ -2259,79 +2270,183 @@ if (!empty($getlogpodtl)) { - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - BasicValue; - $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; - $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; - $totCgst = $totCgst + $record->AfterCGST; - $totSgst = $totSgst + $record->AfterSGST; - $totIgst = $totIgst + $record->AfterIGST; + $totBasicAmt = $totBasicAmt + $record->BasicValue; + $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; + $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; + $totCgst = $totCgst + $record->AfterCGST; + $totSgst = $totSgst + $record->AfterSGST; + $totIgst = $totIgst + $record->AfterIGST; - $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; - $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; - $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; + $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; + $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; + $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; } ?> - @@ -2347,7 +2462,7 @@ if (!empty($getlogpodtl)) { 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2357,7 +2472,7 @@ if (!empty($getlogpodtl)) { 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2366,7 +2481,7 @@ if (!empty($getlogpodtl)) { 'txtTotalSGST', 'value' => set_value('txtTotalSGST', number_format($totSgst, 2, '.', '')), 'id' => 'txtTotalSGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalSGST', 'value' => set_value('txtTotalSGST', number_format($totSgst, 2, '.', '')), 'id' => 'txtTotalSGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2375,7 +2490,7 @@ if (!empty($getlogpodtl)) { 'txtTotalIGST', 'value' => set_value('txtTotalIGST', number_format($totIgst, 2, '.', '')), 'id' => 'txtTotalIGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalIGST', 'value' => set_value('txtTotalIGST', number_format($totIgst, 2, '.', '')), 'id' => 'txtTotalIGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2384,7 +2499,7 @@ if (!empty($getlogpodtl)) { 'txtTotalCGST', 'value' => set_value('txtTotalCGST', number_format($totCgst, 2, '.', '')), 'id' => 'txtTotalCGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalCGST', 'value' => set_value('txtTotalCGST', number_format($totCgst, 2, '.', '')), 'id' => 'txtTotalCGST', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2398,7 +2513,7 @@ if (!empty($getlogpodtl)) { 'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2407,7 +2522,7 @@ if (!empty($getlogpodtl)) { 'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2417,7 +2532,7 @@ if (!empty($getlogpodtl)) { 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -2425,7 +2540,7 @@ if (!empty($getlogpodtl)) {
'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
@@ -2437,9 +2552,9 @@ if (!empty($getlogpodtl)) {
'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control'); - echo form_textarea($data); - ?> + $data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control'); + echo form_textarea($data); + ?>
@@ -2449,8 +2564,9 @@ if (!empty($getlogpodtl)) {
Item Description Quantity UOMRate Basic Amount Tax Amount Total Order Amount Rate + Basic Amount + + Tax Amount + + Total Order Amount + +
ReqNo ?>UOM ?> Rate ?>BasicValue, 2, '.', ''); ?> + BasicValue, 2, '.', ''); ?> + Taxamount ?> TotalValue ?> + - +     +    
+ +
@@ -2470,31 +2586,39 @@ if (!empty($getlogpodtl)) { if (!empty($getdata)) { foreach ($getdata as $row => $gd) { - ?> + ?> + echo $date->format('d-m-Y'); ?> + echo $date->format('d-m-Y'); ?> - "> - "> - - - - - + "> + "> + + + + + - - @@ -2504,21 +2628,24 @@ if (!empty($getlogpodtl)) {

-
DeliveryChellanOrInvoiceNo ?> DeliveryChellanDate); - echo $date->format('d-m-Y'); ?> MaterialRcvdDate); - echo $date->format('d-m-Y'); ?> VehicleNo ?> CourierNo ?> +
+
- -
+ +
- - - + + +
@@ -2530,19 +2657,22 @@ if (!empty($getlogpodtl)) { $gd) { - if (!empty($gd->BillNo)) { - $index = $row + 1; - ?> + foreach ($billfile as $row => $gd) { + if (!empty($gd->BillNo)) { + $index = $row + 1; + ?> - + - - + + @@ -2553,14 +2683,18 @@ if (!empty($getlogpodtl)) { - - -
BillNo ?>FilePath)) ? $gd->FilePath : "No File"; ?>FilePath)) ? $gd->FilePath : "No File"; ?> + + FilePath)) { ?>    - +
+
@@ -2596,7 +2731,7 @@ if (!empty($getlogpodtl)) { $inde = 0; foreach ($getlogpodtl as $oldpo) { $inde = $inde + 1; - ?> + ?> @@ -2620,11 +2755,11 @@ if (!empty($getlogpodtl)) { + echo $date->format('d-m-Y'); ?> - @@ -2635,65 +2770,76 @@ if (!empty($getlogpodtl)) { -
+
-
- +
+
- -
- - - + +

- - + +
+ echo $index; + } ?>"> @@ -2702,9 +2848,9 @@ if (!empty($getlogpodtl)) {

- - + +
@@ -2715,23 +2861,23 @@ if (!empty($getlogpodtl)) {
'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; + $statusMappings = [ + 'PO APPROVED' => 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; - if (isset($StatusName) && !empty($StatusName)) { - if (isset($statusMappings[$StatusName])) { - echo $statusMappings[$StatusName]; - } else { - echo $StatusName; - } - } else { - echo "Status not provided"; - } - ?> + if (isset($StatusName) && !empty($StatusName)) { + if (isset($statusMappings[$StatusName])) { + echo $statusMappings[$StatusName]; + } else { + echo $StatusName; + } + } else { + echo "Status not provided"; + } + ?>
@@ -2743,14 +2889,13 @@ if (!empty($getlogpodtl)) {
-
Sno
FirstName ?> UpdatedOn); - echo $date->format('d-m-Y'); ?>