From 05b764886ec3f9210f3051e7e8fb738c10dc3109 Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Sat, 31 Aug 2024 14:41:46 +0530 Subject: [PATCH 1/3] CHANGE_EMERGE_PO --- app/Controllers/Emergencypurchaseorder.php | 60 +- app/Controllers/Purchaseorder.php | 3 +- app/Models/Purchaseorder_model.php | 1 + app/Views/alterpurchaseorder.php | 1664 +++++++++----------- system/Helpers/form_helper.php | 2 + 5 files changed, 826 insertions(+), 904 deletions(-) diff --git a/app/Controllers/Emergencypurchaseorder.php b/app/Controllers/Emergencypurchaseorder.php index df4d8f5c..38cf1975 100644 --- a/app/Controllers/Emergencypurchaseorder.php +++ b/app/Controllers/Emergencypurchaseorder.php @@ -122,7 +122,7 @@ class Emergencypurchaseorder extends BaseController //This used to Create Service Purchase Order function addNewServicePurchaseOrder() { - + // print_r($this->request->getPost());die; $txtRowCount = $this->request->getPost('txtRowCount'); $POdt = $this->request->getPost('PODate'); $PODate = get_date_time_format($POdt); @@ -130,7 +130,7 @@ class Emergencypurchaseorder extends BaseController $DeliveryAddr = $this->request->getPost('DeliveryAddr'); $CostCenterName = $this->request->getPost('CostCenterName'); $DeliveryOption = $this->request->getPost('DateRange'); - $DeliverySchedule = ''; + $DeliverySchedule = $this->request->getPost('Scheduleby'); $Deliverydt = get_date_time_format($POdt); $txtsplservice = $this->request->getPost('txtSpecialservice'); @@ -141,9 +141,9 @@ class Emergencypurchaseorder extends BaseController $SpcialInstruction = $this->request->getPost('ScopeOfWork'); $RequistionComments = "Created Emergency Service PO"; - // $TotalOrderValueSummary = $this->request->getPost('TextTotalOrderValueSummaryService'); + $TotalOrderValueSummary = $this->request->getPost('TextTotalOrderValueSummaryService'); - $TotalOrderValueSummary = $this->request->getPost('txtTotalOrderValueSummaryService'); + // $TotalOrderValueSummary = $this->request->getPost('txtTotalOrderValueSummaryService'); //$POStatus = $this->request->getPost('TextStatus'); $CreateBy = $this->session->get('userId'); @@ -161,7 +161,7 @@ class Emergencypurchaseorder extends BaseController $comma_separated = explode(':', (string)$DeletedRow); - $BudgetType = $this->request->getPost('Budget'); + $BudgetType = $this->request->getPost('BudgetType'); $createddt = get_current_date_time(); //$PaymentTerms=$this->request->getPost('PaymentMethod'); @@ -209,6 +209,7 @@ class Emergencypurchaseorder extends BaseController // PO Master $POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'ServiceWorkStatus' => $ServiceWorkStatus, 'POType' => $POType, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'Description_Of_Service' => $DescriptionOfPo, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder); $file = $this->request->getFile('POFile'); + if($file !== null){ $requestfilename = $file->getName(); if (!empty($requestfilename)) { @@ -228,7 +229,7 @@ class Emergencypurchaseorder extends BaseController } - + } $POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $ServiceTypeOptions); $PONO = $POMaster ? $newPONO : ""; // if (count($POMaster) > 0) { @@ -376,7 +377,8 @@ class Emergencypurchaseorder extends BaseController } else { $this->session->setFlashdata('success', 'You Have Successfully Created the Purchase order! '.$PONO); } - return redirect()->route('purchaseorderListing'); + return true; + // return redirect()->route('purchaseorderListing'); } @@ -385,7 +387,7 @@ class Emergencypurchaseorder extends BaseController function addNewRevenuePurchaseOrder() { - + // print_r($this->request->getPost());die; $txtspl = $this->request->getPost('txtSpecial'); @@ -421,7 +423,7 @@ class Emergencypurchaseorder extends BaseController $SpcialInstruction = $this->request->getPost('txtSpcialInstruction'); $RequistionComments = "Created Emergency Revenue PO"; - $TotalOrderValueSummary = $this->request->getPost('txtTotalOrderValueSummary'); + $TotalOrderValueSummary = $this->request->getPost('TextTotalOrderValueSummaryService'); if ($txtspl == 0) { $POStatus = REQITEM_Emergency_PO_CREATED; @@ -436,7 +438,7 @@ class Emergencypurchaseorder extends BaseController $RowCount = $this->request->getPost('txtRowCount1'); - $BudgetType = $this->request->getPost('Budget'); + $BudgetType = $this->request->getPost('BudgetType'); //echo $RowCount; // $DeletedRow = $this->request->getPost('TextDeletedRowCount'); @@ -483,24 +485,29 @@ class Emergencypurchaseorder extends BaseController $newPONO = generate_po_number($lastPONO); $POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Supplier_Reference' => $supplierreference, 'Other_Reference' => $otherreference, 'InsuranceNumber' => $InsuranceNumber, 'InsuranceStatus' => $insurancestatus, 'Fincap' => $fincap, 'POSubType' => $revenuetype, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder); $file = $this->request->getFile('POFiles'); - $requestfilename = $file->getName(); - if (!empty($requestfilename)) { - - if ($file->isValid() && !$file->hasMoved()) { - $path = ROOTPATH.'public/uploads/POfiles/'; - if(!is_dir($path)) { mkdir($path, 0777, true); } - if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { - log_message('error', 'File already exists in the database'.$requestfilename); - $POList['POFile'] = NULL; + if($file !== null){ + $requestfilename = $file->getName(); + if (!empty($requestfilename)) { + + if ($file->isValid() && !$file->hasMoved()) { + $path = ROOTPATH.'public/uploads/POfiles/'; + if(!is_dir($path)) { mkdir($path, 0777, true); } + if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) { + log_message('error', 'File already exists in the database'.$requestfilename); + $POList['POFile'] = NULL; + }else{ + $file->move($path, $requestfilename); + $POList['POFile'] = $requestfilename; + } }else{ - $file->move($path, $requestfilename); - $POList['POFile'] = $requestfilename; + $POList['POFile'] = NULL; } - }else{ - $POList['POFile'] = NULL; + } - - } + }else{ + + } + print_r($POList);die; $POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype); $PONO = $POMaster ? $newPONO : ""; // $PONO = ''; @@ -862,7 +869,8 @@ class Emergencypurchaseorder extends BaseController $this->session->setFlashdata('success', 'You Have Successfully Created the Purchase order! '.$PONO); - return redirect()->route('purchaseorderListing'); + // return redirect()->route('purchaseorderListing'); + return true; // echo ""; // redirect('purchaseorder/PurchaseOrderList', 'refresh'); diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index d24b205c..f763a120 100644 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -114,7 +114,8 @@ class Purchaseorder extends BaseController $this->purchaseorder_model->UpdateRequistionStatus(); $data['POData'] = $this->purchaseorder_model->purchaseorderListing(); - + // echo "
";
+    // print_r($data['POData']);die;
     $this->global['pageTitle'] = 'Purchase Orders';
 
 
diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php
index a0f828cf..9126f9ca 100644
--- a/app/Models/Purchaseorder_model.php
+++ b/app/Models/Purchaseorder_model.php
@@ -788,6 +788,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
 	 */
 	function addPOMaster($POMaster, $POType, $revenuetype)
 		{
+			// print_r($POMaster);die;
 			try {
 				$this->db->transStart();
 				$builder = $this->db->table('t_purchaseorder_master');
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php
index 886e6b22..7b2496d3 100644
--- a/app/Views/alterpurchaseorder.php
+++ b/app/Views/alterpurchaseorder.php
@@ -32,6 +32,7 @@ if (!empty($INRSYMBOL)) {
 
 
 ?>
+
 
 
 
 
 
 
-
- -
- -
-
-
-

+
+ +
+ +
+
+
+

Back -
-
-
- - -
-
-
-
- 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data'); - echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> - - - -
-
-
-
-
- - 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : - $options[$SID->ReqNo] = $SID->ReqNo; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); - ?> -
-
- -
- - 'POType', 'value' => set_value('POType', IMPORT), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- - - 'Select Supplier'); - //print_r( $options); - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; - endforeach; - } - - //echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2'); - - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier', $SupId), 'id="drpSupplier"', 'required="true"', 'class="form-control select2'); - - ?> -
-
- -
- 'SupAddress', 'value' => set_value('SupAddress', $Address), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); ?> -
-
-
-
-
- - +
+ + +
+
+
+
$Cur); + $attributes = array('class' => 'form-label-left ImportPO ', 'name' => 'ImportPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data'); + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> - if (!empty($Currency)) { - foreach ($Currency as $CUR) : - $options[$CUR->Currency_Code] = $CUR->Currency_Code . ' ' . ' - ' . ' ' . $CUR->Country_and_Currency; - endforeach; - } +
+
+ + 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : + $options[$SID->ReqNo] = $SID->ReqNo; + endforeach; + } + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"', 'height="400px"'); + ?> +
+
+ +
- echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype"', 'required="true"', 'class="form-control select2'); ?> + 'POType', 'value' => set_value('POType', IMPORT), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ -
-
- Select Delivery By*
- - - -
- "DateRange", "id" => "Date", "value" => "2", 'checked' => 'checked')); ?>     - "DateRange", "id" => "Schedule", "value" => "1")); ?> -
- -
- -
- - - - - - 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); - // echo form_input($data); - - $data = array('name' => 'Dispatch', 'value' => set_value('Dispatch', $Import_DispatchDetails), 'id' => 'Dispatch', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); - echo Form_textarea($data); - ?> - -
-
- -
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
-
-
-
-
- Check Today's Foreign Exchange value (Click here) -
-
- -
- 'Exchangerateon', 'value' => set_value('Exchangerateon', $ExchangeRateCalculatedon), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- - - -
- 'ExchangeRate', 'value' => set_value('ExchangeRate', $ExchangeRate), 'id' => 'ExchangeRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'USRate()'); - echo form_input($data); - ?> -
-
-
- -
- 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - // echo form_input($data); - - $data = array('name' => 'PlaceOforigin', 'value' => set_value('PlaceOforigin', $Import_PlaceofOrgin), 'id' => 'PlaceOforigin', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - - - - ?> -
- - - - - -
-
-
-
-
-
- -
- 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- -
- - 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $Shipmentmode), 'id' => 'addmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $SupplierRef), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
-
-
- -
- - 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SupOfferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
-
-
-
-
- -
- - 'amendotherreference', 'value' => set_value('amendotherreference', $Otherref), 'id' => 'amendotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- - - 'Select Import Option'); - if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $payment) : - - if ($Importoption == $payment->ConfigValue) { - - $options2[$payment->ConfigValue] = $payment->ConfigValue; + 'Select Supplier'); + //print_r( $options); + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; } - endforeach; - foreach ($PoTypeOptions as $payment) : - - if ($Importoption != $payment->ConfigValue) { - - $options2[$payment->ConfigValue] = $payment->ConfigValue; - } - endforeach; - } - - echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption"', 'class="form-control"'); ?> - -
-
- - - - - PaymentID) { - //echo "$Terms"; - //echo "$pay2->PaymentTerms"; - - ?> - - PaymentID] = $pay2->PaymentTerms; - } - - foreach ($Payment as $pay1) : - - if ($Terms != $pay1->PaymentID) { - - $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; - } - endforeach; - } - echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms"', 'required="true"', 'class="form-control select2'); ?> - -
- -
-
-
-
-
- - - - - - - 'Insurance', 'Insurance' => set_value('Insurance', $opt1), 'id' => 'Insurance', 'class' => 'form-control', 'required' => 'true', 'readonly' => true); - echo form_input($data); - ?> - -
- -
- - -
-
-
-
-
- -
- -
-
- - - - - - - - - - +
+
+ + $Cur); + + if (!empty($Currency)) { + foreach ($Currency as $CUR) : + $options[$CUR->Currency_Code] = $CUR->Currency_Code . ' ' . ' - ' . ' ' . $CUR->Country_and_Currency; + endforeach; + } + + echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype" required="true" class="form-control select2"'); ?> + +
+
+ Select Delivery By*
+ + + +
+ "DateRange", "id" => "Date", "value" => "2", 'checked' => 'checked')); ?>     + "DateRange", "id" => "Schedule", "value" => "1")); ?> +
+ +
+ +
+ + + + + + 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); + // echo form_input($data); + + $data = array('name' => 'Dispatch', 'value' => set_value('Dispatch', $Import_DispatchDetails), 'id' => 'Dispatch', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); + echo Form_textarea($data); + ?> + +
+
+ +
+ 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $DeliveryAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+ +
+
+
+ Check Today's Foreign Exchange value (Click here) +
+
+ +
+ 'Exchangerateon', 'value' => set_value('Exchangerateon', $ExchangeRateCalculatedon), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ +
+ 'PlaceOforigin', 'value' => set_value('PlaceOforigin', $Import_PlaceofOrgin), 'id' => 'PlaceOforigin', 'class' => 'form-control', 'required' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + +
+ 'ExchangeRate', 'value' => set_value('ExchangeRate', $ExchangeRate), 'id' => 'ExchangeRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'USRate()'); + echo form_input($data); + ?> +
+
+
+
+
+ +
+ 'PODate', 'value' => set_value('PODate', $PODate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'addmodeofshipment', 'value' => set_value('addmodeofshipment', $Shipmentmode), 'id' => 'addmodeofshipment', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'amendsupplierreference', 'value' => set_value('amendsupplierreference', $SupplierRef), 'id' => 'amendsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); + echo form_input($data); + ?> +
+
+
+ +
+ + 'amendsupplierofferno', 'value' => set_value('amendsupplierofferno', $SupOfferno), 'id' => 'amendsupplierofferno', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+
+
+ +
+ + 'amendotherreference', 'value' => set_value('amendotherreference', $Otherref), 'id' => 'amendotherreference', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+ + + 'Select Import Option'); + if (!empty($PoTypeOptions)) { + foreach ($PoTypeOptions as $payment) : + + if ($Importoption == $payment->ConfigValue) { + + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } + + endforeach; + foreach ($PoTypeOptions as $payment) : + + if ($Importoption != $payment->ConfigValue) { + + $options2[$payment->ConfigValue] = $payment->ConfigValue; + } + endforeach; + } + + echo form_dropdown('Importoption', $options2, set_value('Importoption'), 'id="Importoption" class="form-control"'); ?> + +
+
+ + + + + PaymentID) { + //echo "$Terms"; + //echo "$pay2->PaymentTerms"; + + ?> + + PaymentID] = $pay2->PaymentTerms; + } + + foreach ($Payment as $pay1) : + + if ($Terms != $pay1->PaymentID) { + + $optionsPay[$pay1->PaymentID] = $pay1->PaymentTerms; + } + endforeach; + } + echo form_dropdown('PaymentTerms', $optionsPay, set_value('PaymentTerms'), 'id="PaymentTerms" required="true" class="form-control select2"'); ?> + +
+ +
+
+
+ + + + + + + 'Insurance', 'Insurance' => set_value('Insurance', $opt1), 'id' => 'Insurance', 'class' => 'form-control', 'required' => 'true', 'readonly' => true); + echo form_input($data); + ?> + +
+ +
+ + +
+
+
+ +
+ + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
SNoRequisition NoItem NameQuantityUOMRateBasic AmountAction
ReqNo ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue ?>     +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -     + + AfterLandingCharge; + $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge; + $totcustom = $totcustom + $record->AfterCustomDuty; + $totexciseduty = $totexciseduty + $record->AfterExciseDuty; + $totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess; + $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess; + $totcustomED = $totcustomED + $record->AfterCustomEdCess; + $totcustomSH = $totcustomSH + $record->AfterCustomSHCess; + $totaddtnlexcise = $totaddtnlexcise + $record->AfterAddlExciseDuty; + //$totgrossduty = $totgrossduty + $record->Grossdutypayable; + //$totavlmodvat = $totavlmodvat +$record->AvailableModvat; + $totgrossduty = $totgrossduty + $record->Grossdutypayable; + $totavlmodvat = $totavlmodvat + $record->AvailableModvat; + $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; + $ExchangeRate = $record->ExchangeRate; + $totorder = $totorder + $record->BasicValue; + $totfreight = $totfreight + $record->AfterFreightValue; + //alert($totorder); + $totassesable = $totassesable + $record->AssessableValue; + $totSubtotal = $totSubtotal + $record->SubTotal; + $totigst = $totigst + $record->AfterIGST; + } + $Rowcount = $index; + ?> + AfterLandingCharge; - $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge; - $totcustom = $totcustom + $record->AfterCustomDuty; - $totexciseduty = $totexciseduty + $record->AfterExciseDuty; - $totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess; - $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess; - $totcustomED = $totcustomED + $record->AfterCustomEdCess; - - $totcustomSH = $totcustomSH + $record->AfterCustomSHCess; - $totaddtnlexcise = $totaddtnlexcise + $record->AfterAddlExciseDuty; - //$totgrossduty = $totgrossduty + $record->Grossdutypayable; - //$totavlmodvat = $totavlmodvat +$record->AvailableModvat; - $totgrossduty = $totgrossduty + $record->Grossdutypayable; - $totavlmodvat = $totavlmodvat + $record->AvailableModvat; - $totgrossexpense = $totgrossexpense + $record->Grossexpensesduetocustomduty; - $ExchangeRate = $record->ExchangeRate; - $totorder = $totorder + $record->BasicValue; - $totfreight = $totfreight + $record->AfterFreightValue; - //alert($totorder); - - - $totassesable = $totassesable + $record->AssessableValue; - $totSubtotal = $totSubtotal + $record->SubTotal; - $totigst = $totigst + $record->AfterIGST; - } - $Rowcount = $index; - ?> - - -
SNoRequisition NoItem NameQuantityUOMRateBasic AmountAction
ReqNo ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue ?> - -
+ +
+ $totalhidden = $totorder; + $totorder = number_format($totorder, 2, '.', ''); + //echo $to; + $TotalLanding = number_format($TotalLanding, 2, '.', ''); + $tothighseas = number_format($tothighseas, 2, '.', ''); + $totcustom = number_format($totcustom, 2, '.', ''); + $totexciseduty = number_format($totexciseduty, 2, '.', ''); + $totexcisedutyED = number_format($totexcisedutyED, 2, '.', ''); + $totexciseSH = number_format($totexciseSH, 2, '.', ''); + $totcustomED = number_format($totcustomED, 2, '.', ''); + $totcustomSH = number_format($totcustomSH, 2, '.', ''); + $totaddtnlexcise = number_format($totaddtnlexcise, 2, '.', ''); + $totgrossduty = number_format($totgrossduty, 2, '.', ''); + $totavlmodvat = number_format($totavlmodvat, 2, '.', ''); + $totgrossexpense = number_format($totgrossexpense, 2, '.', ''); + $totfreight = number_format($totfreight, 2, '.', ''); + $totassesable = number_format($totassesable, 2, '.', ''); + $totSubtotal = number_format($totSubtotal, 2, '.', ''); + $totigst = number_format($totigst, 2, '.', ''); + } + ?> +
+
-
- -
-
- - - 'txttotallanding', 'value' => set_value('txttotallanding', $TotalLanding), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalAssessable', 'value' => set_value('txttotalAssessable', $totassesable), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustom', 'value' => set_value('txttotalcustom', $totcustom), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
-
- +
+
+ - 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal', $totSubtotal), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - -
- - - 'txttotalIgst', 'value' => set_value('txttotalIgst', $totigst), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - -
- - - 'txttotalcustomED', 'value' => set_value('txttotalcustomED', $totcustomED), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH', $totcustomSH), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty', $totgrossduty), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - - - -
- 'txtTotalFreight', 'value' => set_value('txtTotalFreight', $totfreight), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- - - - > -
- 'txtToatlOrder', 'value' => set_value('txtToatlOrder', $totorder), 'id' => 'txtToatlOrder', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
+ 'txttotallanding', 'value' => set_value('txttotallanding', $TotalLanding), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?>
+
+ + + 'txttotalAssessable', 'value' => set_value('txttotalAssessable', $totassesable), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalcustom', 'value' => set_value('txttotalcustom', $totcustom), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal', $totSubtotal), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalIgst', 'value' => set_value('txttotalIgst', $totigst), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + 'txttotalcustomED', 'value' => set_value('txttotalcustomED', $totcustomED), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH', $totcustomSH), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ + + 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty', $totgrossduty), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ +
+ 'txtTotalFreight', 'value' => set_value('txtTotalFreight', $totfreight), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?> +
+ + > > - - -
-
- 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); - echo form_textarea($data); - ?> -
+
+ 'txtToatlOrder', 'value' => set_value('txtToatlOrder', $totorder), 'id' => 'txtToatlOrder', 'class' => 'form-control', 'required' => 'true', 'readonly' => 'true', 'style' => 'text-align:right;'); + echo form_input($data); + ?>
-
+
-

- - - - - - - - - - - - - - - - -   Cancel -   Submit - - - -
+
+
+ + 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction', strip_tags($ServiceDescription)), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); + echo form_textarea($data); + ?> +
+
+
+

+ + + + + + + + + + + + + + + +   Cancel +   Submit + + + +
+
+
+ +
+
+
+
+ + '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"; + } + ?> +
-
-
- - '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"; - } - ?> -
-
- -
-
-
-
-
-
+
+
+
+
+
--> - @@ -3315,22 +3291,51 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) { index = parseInt(index) + 1; //alert('in'); - var template = jQuery("#ImportList").html(); - $('#ImportAppend').append(_.template(template, { - index: temp, - ReqNo: Reqnumber, - MaterialCode: materialCode, - Description: materialName, - Quantity: quantity, - UOM: uom, - Rate: itemRate, - BasicAmount: BasicAmt, - Taxvalue: taxexp, - TotalValue: totalexp, - ReceivedQty: receivedqty, - RejectedQty: rejectedqty, - PendingQty: pendingqty - })); + // var template = jQuery("#ImportList").html(); + // $('#ImportAppend').append(_.template(template, { + // index: temp, + // ReqNo: Reqnumber, + // MaterialCode: materialCode, + // Description: materialName, + // Quantity: quantity, + // UOM: uom, + // Rate: itemRate, + // BasicAmount: BasicAmt, + // Taxvalue: taxexp, + // TotalValue: totalexp, + // ReceivedQty: receivedqty, + // RejectedQty: rejectedqty, + // PendingQty: pendingqty + // })); + var rowHtml = ` + + ${temp} + ${Reqnumber} + ${materialCode} + ${materialName} + ${quantity} + ${uom} + ${itemRate} + ${BasicAmt} + ${taxexp} + ${totalexp} + ${receivedqty} + ${rejectedqty} + ${pendingqty} + + + +     + + + + + +`; + +// Append the generated row HTML to the target element +$('#ImportAppend').append(rowHtml); + //alert(JSON.strigify(BasicAmt)); diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index a15e6636..187f86d9 100644 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -2183,7 +2183,7 @@ if (!empty($INRSYMBOL)) {
-