From 00f1a98071da370652be4717b3bfb68dc513b9b5 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 22 Nov 2024 17:23:54 +0530 Subject: [PATCH] changes in amendment purchase order vadivel J 21-11-2024 --- app/Controllers/Amendmentpurchaseorder.php | 11 +- app/Views/editRevenueAmendPO.php | 841 ++++++++++++--------- app/Views/userListing.php | 2 +- 3 files changed, 505 insertions(+), 349 deletions(-) diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php index 86406d99..70787293 100755 --- a/app/Controllers/Amendmentpurchaseorder.php +++ b/app/Controllers/Amendmentpurchaseorder.php @@ -231,6 +231,7 @@ class Amendmentpurchaseorder extends BaseController { $NewPO = ''; $MAD = ''; + $changeStatus = $this->request->getPost('changeStatus'); $PONO = $this->request->getPost('txtPONO'); $POdt = $this->request->getPost('PODate'); $PODate = get_date_time_format($POdt); @@ -306,7 +307,7 @@ class Amendmentpurchaseorder extends BaseController } $AmendmentNewPoNo = generate_amendment_po_number($PONO); - $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); + $POMaster = array('PONO' => $AmendmentNewPoNo, 'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'POType' => $POType, 'PORange' => $PoRange, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $changeStatus == 1 ? PO_RELEASED : PO_DRAFT, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Reference' => $supplierreference, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $revenuetype, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpecialInstruction, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'UpdatedOn' => $updateddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, 'IsQualityChkReqired' => $qtycheckresult); $file = $this->request->getFile('POFile'); $requestfilename = $file->getName(); $PrePOFile = $this->request->getPost('PrePOFile'); @@ -329,9 +330,12 @@ class Amendmentpurchaseorder extends BaseController } else { $POMaster['POFile'] = $PrePOFile ? $PrePOFile : null; } - // print_r($POMaster);die; - $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); + // print_r($POMaster); + // echo 'end'; + // die; + + $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO); if(!empty($LastPO)){ if (count($LastPO) > 0) { @@ -578,6 +582,7 @@ class Amendmentpurchaseorder extends BaseController echo 'Purchase Order Amended Successfully! PO Number Is: ' . $PONO . '- New PO Number is' . $NewPO; + } /** diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index a923975d..a42302c3 100755 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -1,7 +1,7 @@ format('d-m-Y'); +$CurrentDate = $dt->format('d-m-Y'); $MaxPoDate = ''; $AvlAmount = 0; $DeliverSchedule = ''; @@ -37,20 +37,20 @@ $Address = ''; $PODate = ''; $Deliverydt = ''; $DeliveryAddress = ''; -$POStatus = ''; -$PONO = ''; -$totBasicAmt = 0; -$totDiscountAmt = 0.0; -$totPackagingAmt = 0.0; -$totExciseAmt = 0.0; -$totVATAmt = 0.0; //FOR SGST -$totCSTAmt = 0.0; //FOR CGST -$totGSTAmt = 0.0; //FOR IGST +$POStatus = ''; +$PONO = ''; +$totBasicAmt = 0; +$totDiscountAmt = 0.0; +$totPackagingAmt = 0.0; +$totExciseAmt = 0.0; +$totVATAmt = 0.0; //FOR SGST +$totCSTAmt = 0.0; //FOR CGST +$totGSTAmt = 0.0; //FOR IGST -$totOtherTaxAmt = 0.0; -$totFreightAmt = 0.0; -$totInsuranceAmt = 0.0; -$totOrderSummaryAmt = 0.0; +$totOtherTaxAmt = 0.0; +$totFreightAmt = 0.0; +$totInsuranceAmt = 0.0; +$totOrderSummaryAmt = 0.0; $PaymentOtherDescription = ''; $ServiceDescription = ''; $taxrange = ""; @@ -74,19 +74,19 @@ if (!empty($POMaster)) { $SupName = $Req->SupplierName; $Address = $Req->MSME ? "MSME : " . $Req->MSME . "\n" . $Req->Address : $Req->Address; - $Pdt = new DateTime($Req->PODate); - $PODate = $Pdt->format('d-m-Y'); + $Pdt = new DateTime($Req->PODate); + $PODate = $Pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; - $Ddt = new DateTime($Req->DeliveryDate); + $Ddt = new DateTime($Req->DeliveryDate); //echo $Req->DeliveryDate."
"; - $Deliverydt = $Ddt->format('d-m-Y'); + $Deliverydt = $Ddt->format('d-m-Y'); //echo $Deliverydt; $PaymentOtherDescription = $Req->PaymentOtherDescription; //echo $PaymentOtherDescription; $DeliveryAddress = $Req->DeliveryAddress; - $POStatus = $Req->StatusName; - $PONO = $Req->PONO; + $POStatus = $Req->StatusName; + $PONO = $Req->PONO; $taxrange = $Req->PORange; //echo $taxrange . "t"; $ServiceDescription = $Req->ServiceDescription; @@ -131,14 +131,17 @@ if (!empty($INRSYMBOL)) { @@ -169,7 +172,7 @@ if (!empty($INRSYMBOL)) { var DelDt = ''; var insurancestatus = ''; var InsuranceNumber = ''; - $(document).ready(function() { + $(document).ready(function () { // $('#RequistionNo').attr("style", "pointer-events: none;"); $('#drpSupplier').attr("style", "pointer-events: none;"); @@ -233,7 +236,7 @@ if (!empty($INRSYMBOL)) { Mat: [] }; // alert(new Date(year,month,day)); - $(function() { + $(function () { $("#PODate").datepicker({ minDate: d, @@ -255,7 +258,7 @@ if (!empty($INRSYMBOL)) { maxDate : 'now', dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' }); */ - $('#drpSupplier').change(function() { + $('#drpSupplier').change(function () { var cd = $("#drpSupplier option:selected").text(); //alert(cd); $("#changeSup").val(cd); @@ -265,7 +268,7 @@ if (!empty($INRSYMBOL)) { if (id != '0') { var y = ; - $.each(y, function(idx, obj) { + $.each(y, function (idx, obj) { if (obj.SupplierID === id) { if (obj.MSME) { $("#SupAddress").val("MSME : " + obj.MSME + "\n" + obj.Address); @@ -282,7 +285,7 @@ if (!empty($INRSYMBOL)) { }); - $('#EditDiscountType').change(function() { + $('#EditDiscountType').change(function () { selValue = $("#EditDiscountType").val(); $('#txtEditDiscount').val(''); $('#txtEditAfterDiscount').val(''); @@ -303,7 +306,7 @@ if (!empty($INRSYMBOL)) { }); - $('#EditPackagingType').change(function() { + $('#EditPackagingType').change(function () { $('#txtEditPackaging').val(''); $('#txtEditAfterPackaging').val(''); selValue = $("#EditPackagingType").val(); @@ -328,16 +331,16 @@ if (!empty($INRSYMBOL)) { - $('#drpEditFreight').change(function() { + $('#drpEditFreight').change(function () { var FreightType = $("#drpEditFreight").val(); if (FreightType == "PER TRIP") { $('#EditTripsValue').show(); - + } else { $('#EditTripsValue').hide(); - + } selValue = $("#drpEditFreight").val(); $('#txtEditFreight').val(''); @@ -345,12 +348,12 @@ if (!empty($INRSYMBOL)) { if (selValue == PercentageType) { var PackagingCalculation = ''; - $('#freightmodel').modal('show'); - $('#freightmodel').modal({ - backdrop: true, - keyboard: true - }); - + $('#freightmodel').modal('show'); + $('#freightmodel').modal({ + backdrop: true, + keyboard: true + }); + $('#txtEditFreight').removeAttr('readonly', 'true'); } else if (selValue == NilType) { @@ -684,9 +687,7 @@ if (!empty($INRSYMBOL)) { //alert((FreightValue/100) * (basicValue-AfterDiscount)); //alert(((FreightValue/100) * basicValue)); //alert(FreightCalculation); - if (FreightCalculation == 0) - - { + if (FreightCalculation == 0) { AfterFreight = ; } else { AfterFreight = ; @@ -752,7 +753,7 @@ if (!empty($INRSYMBOL)) { FreightCalculation = $("input:radio[name='optfreight']:checked").val(); // alert("this is value taken as before after radio value"+FreightCalculation); $('#freightmodel').modal('hide'); - + // $('#EDITREVENUE').modal('show'); calculateFreight(); } @@ -847,30 +848,30 @@ if (!empty($INRSYMBOL)) { //alert('tot:'+tot); return tot; } - $(document).ready(function() { + $(document).ready(function () { $("#PaymentTerms").select2(); - $('#Date').click(function() { + $('#Date').click(function () { //for Date range selection $('#Schedulediv').hide(); $('#Deliverydtdiv').show(); }); - $('#Schedule').click(function() { + $('#Schedule').click(function () { //for schedule range selection $('#Deliverydtdiv').hide(); $('#Schedulediv').show(); }); SetVatorCST(); }); - $(document).ready(function() { - $('#Local').click(function() { + $(document).ready(function () { + $('#Local').click(function () { //for Date range selection $('#IGSTShow').hide(); $('#SGSTShow').show(); $('#SGSTModel').show(); // SGST Fields in Modal Show $('#IGSTModel').hide(); // IGST Fields in Modal Hide }); - $('#Inter_state').click(function() { + $('#Inter_state').click(function () { //for schedule range selection $('#SGSTShow').hide(); $('#IGSTShow').show(); @@ -931,7 +932,8 @@ if (!empty($INRSYMBOL)) {

- Back + Back
@@ -942,7 +944,7 @@ if (!empty($INRSYMBOL)) {
'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO'); + $attributes = array('class' => 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO'); echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> @@ -952,10 +954,10 @@ if (!empty($INRSYMBOL)) { 'Selected Requisition Numbers'); if (!empty($ReqList)) { - foreach ($ReqList as $SID) : + foreach ($ReqList as $SID): $options[$SID->ReqNo] = $SID->ReqNo; - //$ReqType = $SID->ReqType; + //$ReqType = $SID->ReqType; endforeach; } echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); @@ -964,7 +966,7 @@ if (!empty($INRSYMBOL)) {
'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + $data = array('name' => 'POType', 'value' => set_value('POType', REVENUE), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); echo form_input($data); ?>
@@ -973,9 +975,9 @@ if (!empty($INRSYMBOL)) { 'Select Supplier'); //print_r( $options); - + if (!empty($Suplist)) { - foreach ($Suplist as $SID) : + foreach ($Suplist as $SID): $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; endforeach; } @@ -988,7 +990,7 @@ if (!empty($INRSYMBOL)) {
'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); + $data = array('name' => 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); ?>
@@ -1021,16 +1023,17 @@ if (!empty($INRSYMBOL)) {
'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'min' => date('d-m-Y'),); + $data = array('name' => 'Deliverydt', 'value' => set_value('Deliverydt', $Deliverydt), 'id' => 'Deliverydt', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'min' => date('d-m-Y'), ); echo form_input($data); ?>
@@ -1038,9 +1041,10 @@ if (!empty($INRSYMBOL)) {
'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); + $data = array('name' => 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); echo Form_textarea($data); - ?> + ?>
@@ -1048,7 +1052,7 @@ if (!empty($INRSYMBOL)) {
'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'readonly' => 'true'); + $data = array('name' => 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;', 'readonly' => 'true'); echo form_input($data); ?>
@@ -1057,7 +1061,7 @@ if (!empty($INRSYMBOL)) {
'addmodeofshipment', 'value' => set_value('addmodeofshipment', $modeofshipment), 'id' => 'addmodeofshipment', 'class' => 'form-control', 'readonly' => 'readonly'); + $data = array('name' => 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $modeofshipment), 'id' => 'addmodeofshipment', 'class' => 'form-control', 'readonly' => 'readonly'); echo form_input($data); ?>
@@ -1070,7 +1074,7 @@ if (!empty($INRSYMBOL)) {
'amendsupplierreference', 'value' => set_value('amendsupplierreference', $supplierref), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'readonly' => 'readonly', 'maxlength' => '40'); + $data = array('name' => 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $supplierref), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'readonly' => 'readonly', 'maxlength' => '40'); echo form_input($data); ?>
@@ -1080,7 +1084,7 @@ if (!empty($INRSYMBOL)) {
'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $suppofferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control', 'readonly' => 'readonly'); + $data = array('name' => 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $suppofferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control', 'readonly' => 'readonly'); echo form_input($data); ?>
@@ -1093,7 +1097,7 @@ if (!empty($INRSYMBOL)) {
'amendotherreference', 'value' => set_value('amendotherreference', $otherref), 'id' => 'amendotherreference', 'class' => 'form-control', 'readonly' => 'readonly'); + $data = array('name' => 'amendotherreference', 'value' => set_value('amendotherreference', $otherref), 'id' => 'amendotherreference', 'class' => 'form-control', 'readonly' => 'readonly'); echo form_input($data); ?>
@@ -1105,13 +1109,13 @@ if (!empty($INRSYMBOL)) { 'Select Work Status'); - + if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $POpt) : + foreach ($PoTypeOptions as $POpt): - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; endforeach; } @@ -1142,19 +1146,20 @@ if (!empty($INRSYMBOL)) { if ($Terms == $pay2->PaymentID) { //echo "$Terms"; //echo "$pay2->PaymentTerms"; + + ?> + + - - PaymentID] = $pay2->PaymentTerms; + $optionsPay[$pay2->PaymentID] = $pay2->PaymentTerms; } - foreach ($Payment as $pay1) : + foreach ($Payment as $pay1): if ($Terms != $pay1->PaymentID) { - $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; + $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; } endforeach; } @@ -1168,7 +1173,7 @@ if (!empty($INRSYMBOL)) { 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true'); + $data = array('name' => 'Otherpayment', 'Otherpayment' => set_value('Otherpayment'), 'id' => 'Otherpayment', 'class' => 'form-control', 'required' => 'true'); echo form_input($data); ?> @@ -1185,7 +1190,7 @@ if (!empty($INRSYMBOL)) {
'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); + $data = array('name' => 'InsuranceNumber', 'InsuranceNumber' => set_value('InsuranceNumber', $insurenceno), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); echo form_input($data); ?>
@@ -1214,7 +1219,8 @@ if (!empty($INRSYMBOL)) {
- +
@@ -1239,7 +1245,7 @@ if (!empty($INRSYMBOL)) { foreach ($POItem as $record) { //print_r($POItem); $index = $index + 1; - ?> + ?> @@ -1248,94 +1254,203 @@ if (!empty($INRSYMBOL)) { - + - - - - - - - - - + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - --> - BasicValue; - $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; - $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; - $totExciseAmt = isset($record->AfterExciseDuty) ? $totExciseAmt + $record->AfterExciseDuty : ""; - $totVATAmt = $totVATAmt + $record->AfterSGST; + $totBasicAmt = $totBasicAmt + $record->BasicValue; + $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; + $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; + $totExciseAmt = isset($record->AfterExciseDuty) ? $totExciseAmt + $record->AfterExciseDuty : ""; + $totVATAmt = $totVATAmt + $record->AfterSGST; //$totCSTAmt = $totCSTAmt + $record->AfterCST; - $totGSTAmt = $totGSTAmt + $record->AfterCGST; + $totGSTAmt = $totGSTAmt + $record->AfterCGST; - $totOtherTaxAmt = $totOtherTaxAmt + $record->AfterIGST; - $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; - $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; - $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; + $totOtherTaxAmt = $totOtherTaxAmt + $record->AfterIGST; + $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; + $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; + $totOrderSummaryAmt = $totOrderSummaryAmt + $record->TotalValue; } ?> - @@ -1348,7 +1463,7 @@ if (!empty($INRSYMBOL)) { 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount', number_format($totBasicAmt, 2, '.', '')), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -1358,7 +1473,7 @@ if (!empty($INRSYMBOL)) { 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($totDiscountAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -1367,7 +1482,7 @@ if (!empty($INRSYMBOL)) { 'txtTotalVat', 'value' => set_value('txtTotalVat', number_format($totVATAmt, 2, '.', '')), 'id' => 'txtTotalVat', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalVat', 'value' => set_value('txtTotalVat', number_format($totVATAmt, 2, '.', '')), 'id' => 'txtTotalVat', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -1376,7 +1491,7 @@ if (!empty($INRSYMBOL)) { 'txtTotalOtherTaxes', 'value' => set_value('txtTotalOtherTaxes', number_format($totOtherTaxAmt, 2, '.', '')), 'id' => 'txtTotalOtherTaxes', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalOtherTaxes', 'value' => set_value('txtTotalOtherTaxes', number_format($totOtherTaxAmt, 2, '.', '')), 'id' => 'txtTotalOtherTaxes', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -1385,7 +1500,7 @@ if (!empty($INRSYMBOL)) { 'txtTotalGST', 'value' => set_value('txtTotalGST', number_format($totGSTAmt, 2, '.', '')), 'id' => 'txtTotalGST', 'readonly' => 'true', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(0);'); + $data = array('name' => 'txtTotalGST', 'value' => set_value('txtTotalGST', number_format($totGSTAmt, 2, '.', '')), 'id' => 'txtTotalGST', 'readonly' => 'true', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' calculateGST(0);'); echo form_input($data); ?> @@ -1396,7 +1511,7 @@ if (!empty($INRSYMBOL)) { 'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalPackaing', 'value' => set_value('txtTotalPackaing', number_format($totPackagingAmt, 2, '.', '')), 'id' => 'txtTotalPackaing', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -1405,7 +1520,7 @@ if (!empty($INRSYMBOL)) { 'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalInsurance', 'value' => set_value('txtTotalInsurance', number_format($totInsuranceAmt, 2, '.', '')), 'id' => 'txtTotalInsurance', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -1414,16 +1529,17 @@ if (!empty($INRSYMBOL)) { 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($totFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
- + 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalOrderValueSummary', 'value' => set_value('txtTotalOrderValueSummary', number_format($totOrderSummaryAmt, 2, '.', '')), 'id' => 'txtTotalOrderValueSummary', 'class' => 'form-control num', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
@@ -1431,9 +1547,9 @@ if (!empty($INRSYMBOL)) {
'txtSpcialInstruction', 'id' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'rows' => '8', 'class' => 'form-control'); - echo form_textarea($data); - ?> + $data = array('name' => 'txtSpcialInstruction', 'id' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'rows' => '8', 'class' => 'form-control'); + echo form_textarea($data); + ?>
@@ -1442,21 +1558,29 @@ if (!empty($INRSYMBOL)) {
- + -
+
- + - + - -   Submit + +   Draft +   Approve
@@ -1473,23 +1597,23 @@ if (!empty($INRSYMBOL)) {
'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($POStatus) && !empty($POStatus)) { - if (isset($statusMappings[$POStatus])) { - echo $statusMappings[$POStatus]; - } else { - echo $POStatus; - } - } else { - echo "Status not provided"; - } - ?> + if (isset($POStatus) && !empty($POStatus)) { + if (isset($statusMappings[$POStatus])) { + echo $statusMappings[$POStatus]; + } else { + echo $POStatus; + } + } else { + echo "Status not provided"; + } + ?> @@ -1501,51 +1625,52 @@ if (!empty($INRSYMBOL)) { - +
ReqNo ?>UOM ?> Rate ?>BasicValue, 2, '.', '') ?> + BasicValue, 2, '.', '') ?> Taxamount ?> TotalValue ?> + + ?> - Click here to view Requistion details">   
FirstName ?> EmailId ?>