diff --git a/app/Controllers/Amendmentpurchaseorder.php b/app/Controllers/Amendmentpurchaseorder.php
index 32b602e8..b61ba103 100644
--- a/app/Controllers/Amendmentpurchaseorder.php
+++ b/app/Controllers/Amendmentpurchaseorder.php
@@ -290,6 +290,21 @@ 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);
+ $file = $this->request->getFile('POFile');
+ $requestfilename = $file->getName();
+ if (!empty($requestfilename)) {
+ if ($file && $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);
+ }
+ else{
+ $file->move($path, $requestfilename);
+ $POMaster['POFile'] = $requestfilename;
+ }
+ }
+ }
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
if (count($LastPO) > 0) {
$NewPO = $LastPO[0]['PONO'];
@@ -622,6 +637,21 @@ class Amendmentpurchaseorder extends BaseController
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'POType' => $POType, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'ServiceDescription' => $scopeofwork, 'CreatedBy' => $updatedBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $updateddt, 'PaymentTerms' => $PaymentTerms, 'PaymentOtherDescription' => $Otherpayment, 'ServiceWorkStatus' => $WorkStatus, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'AmendedDetails' => $MAD, '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, 'IsQualityChkReqired' => $qtycheckresult);
+ $file = $this->request->getFile('POFile');
+ $requestfilename = $file->getName();
+ if (!empty($requestfilename)) {
+ if ($file && $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);
+ }
+ else{
+ $file->move($path, $requestfilename);
+ $POMaster['POFile'] = $requestfilename;
+ }
+ }
+ }
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $updatedBy, $PONO);
@@ -921,6 +951,22 @@ class Amendmentpurchaseorder extends BaseController
$updatedBy = $this->session->get('userId');
$AmendmentNewPoNo = generate_amendment_po_number($PONO);
$POMaster = array('PONO' =>$AmendmentNewPoNo,'ParentPO' => $PONO, 'SupplierID' => $SupplierID, 'TotalOrderValue' => $FinalTotalOrder, 'POType' => $POType, 'PODate' => $PODate, 'Status' => PO_RELEASED, 'CapitalRange' => $PoRange, 'ExchangeRate' => $ExchangeRate, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'PaymentTerms' => $PaymentMethod, 'PaymentOtherDescription' => $Otherpayment, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'ReleasedBy' => $updatedBy, 'ReleasedOn' => $updateddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CurrencyType' => $currencytypeID, 'AmendedDetails' => $MAD, 'Import_DispatchDetails' => $curdispatch, 'Import_PlaceofOrgin' => $PlaceOforigin, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $qtycheckresult);
+ $file = $this->request->getFile('POFile');
+ $requestfilename = $file->getName();
+ if (!empty($requestfilename)) {
+ if ($file && $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);
+ }
+ else{
+ $file->move($path, $requestfilename);
+ $POMaster['POFile'] = $requestfilename;
+ }
+ }
+ }
+
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
diff --git a/app/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php
index 2aa070f2..4539a280 100644
--- a/app/Controllers/Purchaseorder.php
+++ b/app/Controllers/Purchaseorder.php
@@ -1904,8 +1904,28 @@ $mpdf->use_kwt = true;
$lastPONO = $this->purchaseorder_model->lastPONO();
$newPONO = generate_po_number($lastPONO);
-
+ $file = $this->request->getFile('POFile');
+ $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);
+ $requestfilename = "";
+ }
+ else{
+ $file->move($path, $requestfilename);
+ }
+ }else{
+ $requestfilename = "";
+ }
+
+ }
+
$POList = array('PONO' => $newPONO,'SupplierID' => $SupplierID,'TotalOrderValue' => $TotalOrder,'PODate' => $PODate,'Status' => $POStatus,'PORange' => $PoRange,'ServiceDescription' => $SpcialInstruction,'CreatedBy' => $CreateBy,'DeliveryAddress' => $DeliveryAddr,'Import_DispatchDetails' => $Dispatch,'CreatedDate' => $createddt,'DeliverySchedule' => $DeliverySchedule,'DeliveryOption' => $DeliveryOption,'ExchangeRate' => $Exchangerate,'ExchangeRateCalculatedon' => $ExchangeRateCalculatedon,'CurrencyType' => $CurrencyType,'PaymentTerms' => $PaymentTerms,'POType' => $POType,'Import_PlaceofOrgin' => $Palaceoforigin,'PaymentOtherDescription' => $OtherPayment,'Mode_Of_Shipment' => $Shipmentmode,'Supplier_Reference' => $SupplierRef,'Supplier_Offer_No' => $SupplierOffer,'Other_Reference' => $otherRef,'Fincap' => $finCap,'InsuranceStatus' => $Insurance,'InsuranceNumber' => $InsuranceNumber,'POSubType' => $importoption,'IsQualityChkReqired' => $Qualitycheck,'BudgetType' => $BudgetType,'IsOpenOrder' => $IsOpenOrder);
+ $POList['POFile'] = $requestfilename;
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $importoption);
$PONO = '';
if (count($POMaster) > 0) {
@@ -2110,6 +2130,22 @@ $mpdf->use_kwt = true;
$POList['ReleasedOn'] = get_current_date_time();
$POList['ReleasedBy'] = $this->session->get('userId');
}
+ $file = $this->request->getFile('POFile');
+ $requestfilename = $file->getName();
+ if (!empty($requestfilename)) {
+ if ($file && $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);
+ }
+ else{
+ $file->move($path, $requestfilename);
+ $POList['POFile'] = $requestfilename;
+ }
+ }
+ }
+
//echo $PONO;
//echo $TotalOrder;
//print_r($POList);
@@ -2524,9 +2560,28 @@ try{
$lastPONO = $this->purchaseorder_model->lastPONO();
$newPONO = generate_po_number($lastPONO);
+ $file = $this->request->getFile('POFile');
+ $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);
+ $requestfilename = "";
+ }
+ else{
+ $file->move($path, $requestfilename);
+ }
+ }else{
+ $requestfilename = "";
+ }
+
+ }
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrder, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ExchangeRateCalculatedon' => $ExchangeRateOn, 'ExchangeRate' => $ExchangeRate, 'PaymentTerms' => $PaymentMethod, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'CreatedDate' => $createddt, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'CapitalRange' => $CapitalRange, 'POType' => $POType, 'CurrencyType' => $currencytypeID, 'DeliverySchedule' => $DeliverySchedule, 'Import_PlaceofOrgin' => $Palaceoforigin, 'Import_DispatchDetails' => $Dispatch, 'DeliveryDate' => $Deliverydt, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $SupplierReference, 'Mode_Of_Shipment' => $ModeOfShipment, 'Supplier_Offer_No' => $SuppliersOfferNo, 'Other_Reference' => $OtherReferences, 'Fincap' => $Fincap, 'InsuranceStatus' => $InsuranceOptions, 'InsuranceNumber' => $InsuranceNumber, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
-
+ $POList['POFile'] = $requestfilename;
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
@@ -2792,6 +2847,21 @@ try{
$POList['ReleasedOn'] = get_current_date_time();
$POList['ReleasedBy'] = $this->session->get('userId');
}
+ $file = $this->request->getFile('POFile');
+ $requestfilename = $file->getName();
+ if (!empty($requestfilename)) {
+ if ($file && $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);
+ }
+ else{
+ $file->move($path, $requestfilename);
+ $POList['POFile'] = $requestfilename;
+ }
+ }
+ }
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
diff --git a/app/Controllers/Servicepurchaseorder.php b/app/Controllers/Servicepurchaseorder.php
index 490290e2..3384985b 100644
--- a/app/Controllers/Servicepurchaseorder.php
+++ b/app/Controllers/Servicepurchaseorder.php
@@ -235,10 +235,29 @@ class Servicepurchaseorder extends BaseController
$lastPONO = $this->purchaseorder_model->lastPONO();
$newPONO = generate_po_number($lastPONO);
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
-
+ $file = $this->request->getFile('POFile');
+ $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);
+ $requestfilename = "";
+ }
+ else{
+ $file->move($path, $requestfilename);
+ }
+ }else{
+ $requestfilename = "";
+ }
+
+ }
+
// 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' => $WorkStatus, '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);
-
+ $POList['POFile'] = $requestfilename;
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $ServiceTypeOptions);
$PONO = $POMaster ? $newPONO : "";
// $PONO = '';
@@ -389,7 +408,22 @@ class Servicepurchaseorder extends BaseController
$POList['ReleasedOn'] = get_current_date_time();
$POList['ReleasedBy'] = $this->session->get('userId');
}
-
+ $file = $this->request->getFile('POFile');
+ $requestfilename = $file->getName();
+ if (!empty($requestfilename)) {
+ if ($file && $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);
+ }
+ else{
+ $file->move($path, $requestfilename);
+ $POList['POFile'] = $requestfilename;
+ }
+ }
+ }
+
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php
index c53721cd..22399862 100644
--- a/app/Views/EditservicePurchaseorder.php
+++ b/app/Views/EditservicePurchaseorder.php
@@ -35,6 +35,7 @@ $InsuranceNumber = '';
$ServiceTypeOptions = '';
$DescriptionOfPo = '';
$BudgetType = '';
+$PrePOFile = '';
if (!empty($INRSYMBOL)) {
@@ -79,7 +80,8 @@ if (!empty($POMaster)) {
$ServiceTypeOptions = $Req->POSubType;
$DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
-
+ $PrePOFile = $Req->POFile;
+
$IsOpenOrder = isset($Req->IsOpenOrder) ? $Req->IsOpenOrder : null;
if ($IsOpenOrder !== null && (int)$IsOpenOrder !== 0) {
$isChecked = true;
@@ -717,7 +719,7 @@ if (!empty($getlogpodtl)) {
'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO');
+ $attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO','enctype' => 'multipart/form-data');
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
@@ -2427,6 +2429,7 @@ if (!empty($getlogpodtl)) {
+
@@ -3150,10 +3153,14 @@ if (!empty($getlogpodtl)) {
return false;
} else {
$('#content').loader('show');
+ var formData = new FormData($('.ServicePO')[0]);
$.ajax({
- data: $('.ServicePO').serialize(),
+ // data: $('.ServicePO').serialize(),
type: "POST",
url: "servicepurchaseorder/UpdateServicePurchaseOrder",
+ data: formData,
+ processData: false,
+ contentType: false,
success: function(data) {
if (data) {
$('#content').loader('hide');
diff --git a/app/Views/alterpurchaseorder.php b/app/Views/alterpurchaseorder.php
index ff6706a2..d9000f8e 100644
--- a/app/Views/alterpurchaseorder.php
+++ b/app/Views/alterpurchaseorder.php
@@ -5337,6 +5337,7 @@ if (!empty($INRSYMBOL)) {
+
@@ -5740,8 +5741,13 @@ if (!empty($INRSYMBOL)) {
$('#txtStatus').val('');
if (validate()) {
$('#content').loader('show');
+ var formData = new FormData($('.CreatePO')[0]);
+
$.ajax({
- data: $('.CreatePO').serialize(),
+ // data: $('.CreatePO').serialize(),
+ data: formData,
+ processData: false,
+ contentType: false,
type: "POST",
url: "purchaseorder/addNewPurchaseOrder",
success: function(data) {
@@ -5949,7 +5955,11 @@ if (!empty($INRSYMBOL)) {
var supPaymentTerms = '';
$.each(y, function(idx, obj) {
if (obj.SupplierID === id) {
- $("#SupAddress").val(obj.Address);
+ if (obj.MSME) {
+ $("#SupAddress").val("MSME :" + obj.MSME + "\n" + obj.Address);
+ } else {
+ $("#SupAddress").val(obj.Address);
+ }
supPaymentTerms = obj.PaymentID;
diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php
index e0686ce9..ca5bd3d6 100644
--- a/app/Views/capitalpurchaseorder.php
+++ b/app/Views/capitalpurchaseorder.php
@@ -304,7 +304,7 @@ function vaildateBeforeOpenModal()
'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO');
+ $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO','enctype' => 'multipart/form-data');
echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?>
@@ -2540,7 +2540,8 @@ function vaildateBeforeOpenModal()
-
+
+
@@ -4758,9 +4759,15 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
else
{
$('#content').loader('show');
-
+ var formData = new FormData($('.CapitalPO')[0]);
+ formData.append('ExchangeRateOn', ExchangeRateOn);
+ formData.append('PaymentMethod', PaymentMethod);
+
$.ajax({
- data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod,
+ data: formData,
+ processData: false,
+ contentType: false,
+ // data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod,
type:"POST",
url:"purchaseorder/addNewCapitalPurchaseOrder",
success:function(data) {
diff --git a/app/Views/editCapitalAmendPO.php b/app/Views/editCapitalAmendPO.php
index 801ae4b4..fff4fd18 100644
--- a/app/Views/editCapitalAmendPO.php
+++ b/app/Views/editCapitalAmendPO.php
@@ -88,6 +88,7 @@
$FinalTotalBasic = 0;
$BudgetType = '';
+ $PrePOFile = '';
$INR='';
@@ -175,6 +176,7 @@ if(!empty($POMaster))
$InsuranceNumber=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType;
$BudgetType = $Req->BudgetType;
+ $PrePOFile = $Req->POFile;
}
}
@@ -414,7 +416,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO');
- $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO');
+ $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO','enctype' => 'multipart/form-data');
@@ -2276,7 +2278,13 @@ document.getElementById('dispatchinternational').style.display = 'block';
-
+
@@ -3502,12 +3510,19 @@ basicamt=$('#txtTotalBasic').val() - $('#txtTotalDiscount').val();
$('#content').loader('show');
//salert('ss');
//alert('before Ajax');
- $.ajax({
+ var formData = new FormData($('.CapitalPO')[0]);
+ formData.append('ExchangeRateOn', ExchangeRateOn);
+ formData.append('PaymentMethod', PaymentMethod);
+ formData.append('PayableAT', PayableAT);
+ formData.append('PaymentDate', PaymentDate);
- data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
+ $.ajax({
+ // data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&PaymentDate="+PaymentDate,
type:"POST",
url:"amendmentpurchaseorder/EditAmendCapitalPurchaseOrder",
-
+ data: formData,
+ processData: false,
+ contentType: false,
success:function(data) {
if(data)
{
diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php
index 40bb3a39..1259c5c6 100644
--- a/app/Views/editCapitalPo.php
+++ b/app/Views/editCapitalPo.php
@@ -27,6 +27,7 @@
$TotalFreightvalue=0.0;
+ $PrePOFile = '';
$totassesable=0;
$totSubtotal=0;
@@ -167,6 +168,7 @@ if(!empty($POMaster))
$InsuranceNumber=$Req->InsuranceNumber;
$ServiceTypeOptions=$Req->POSubType;
$BudgetType = $Req->BudgetType;
+ $PrePOFile = $Req->POFile;
}
@@ -460,7 +462,7 @@ $("#PaymentMethod").select2();
'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO');
- $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO');
+ $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO','enctype' => 'multipart/form-data');
@@ -3882,7 +3884,13 @@ $("#PaymentMethod").select2();
-
+
@@ -6348,10 +6356,14 @@ var basicAmountRate = parseFloat($('#CapitalToatlOrder').val());
$('#content').loader('show');
//alert('ss');
-
+ var formData = new FormData($('.CapitalPO')[0]);
+ formData.append('ExchangeRateOn', ExchangeRateOn);
+ formData.append('PaymentMethod', PaymentMethod);
$.ajax({
-
- data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod,
+ data: formData,
+ processData: false,
+ contentType: false,
+ // data:$('.CapitalPO').serialize()+"&ExchangeRateOn="+ExchangeRateOn+"&PaymentMethod="+PaymentMethod,
type:"POST",
url:"purchaseorder/EditCapitalPurchaseOrder",
diff --git a/app/Views/editImportAmendPO.php b/app/Views/editImportAmendPO.php
index 22f459ec..9acb48b6 100644
--- a/app/Views/editImportAmendPO.php
+++ b/app/Views/editImportAmendPO.php
@@ -115,6 +115,7 @@ $Reqon = '';
$Requestedby='';
$RequesterName='';
$BudgetType = '';
+$PrePOFile = '';
if(!empty($POMaster))
@@ -164,6 +165,8 @@ if(!empty($POMaster))
$Importoption=$Req->POSubType;
$InsuranceStatus=$Req->InsuranceStatus;
$BudgetType = $Req->BudgetType;
+ $PrePOFile = $Req->POFile;
+
}
}
@@ -292,7 +295,7 @@ if(!empty($RequistionDetails))
'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO');
+ $attributes = array('class' => 'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO','enctype' => 'multipart/form-data');
echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?>
@@ -1898,6 +1901,13 @@ echo form_textarea($data);
+
@@ -3424,9 +3434,13 @@ if(validate()&&Budgetcheck())
{
$('#content').loader('show');
+ var formData = new FormData($('.ImportPO')[0]);
+
$.ajax({
- data:$('.ImportPO').serialize(),
-
+ // data:$('.ImportPO').serialize(),
+ data: formData,
+ processData: false,
+ contentType: false,
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
type:"POST",
url:"amendmentpurchaseorder/EditAmendImportPO",
diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php
index c834f9de..d500cf58 100644
--- a/app/Views/editRevenueAmendPO.php
+++ b/app/Views/editRevenueAmendPO.php
@@ -8,6 +8,8 @@ $AvlAmount = 0;
$DeliverSchedule='';
$DeliverOption='';
$RowCount = 0;
+$PrePOFile = '';
+
if(!empty($MaxPODate))
{
foreach ($MaxPODate as $date)
@@ -103,7 +105,7 @@ if(!empty($POMaster))
$insurencestatus = $Req->InsuranceStatus;
$insurenceno = $Req->InsuranceNumber;
$BudgetType = $Req->BudgetType;
-
+ $PrePOFile = $Req->POFile;
}
}
@@ -2146,6 +2148,13 @@ function calculateEditTaxValue()
+
@@ -2676,10 +2685,15 @@ var txtTotalDiscount = $('#txtTotalDiscount').val();
{
//alert('final else for store data');
$('.content').loader('show');
+ var formData = new FormData($('.CreatePO')[0]);
+
$.ajax({
- data:$('.CreatePO').serialize(),
+ // data:$('.CreatePO').serialize(),
type:"POST",
url:"amendmentpurchaseorder/EditRevenuePurchaseOrder",
+ data: formData,
+ processData: false,
+ contentType: false,
success:function(data) {
if(data)
{
diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php
index a4a9d8c6..db502bfd 100644
--- a/app/Views/editServiceAmendPO.php
+++ b/app/Views/editServiceAmendPO.php
@@ -38,7 +38,7 @@ $InsuranceNumber = '';
$ServiceTypeOptions = '';
$DescriptionOfPo = '';
$BudgetType = '';
-
+$PrePOFile = '';
if (!empty($INRSYMBOL)) {
@@ -85,6 +85,8 @@ if (!empty($POMaster)) {
$ServiceTypeOptions = $Req->POSubType;
$DescriptionOfPo = $Req->Description_Of_Service;
$BudgetType = $Req->BudgetType;
+ $PrePOFile = $Req->POFile;
+
}
}
@@ -645,7 +647,7 @@ foreach ($PaymentTerms as $TER) {
'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO');
+ $attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO','enctype' => 'multipart/form-data');
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
@@ -1568,6 +1570,13 @@ foreach ($PaymentTerms as $TER) {
+
@@ -2169,10 +2178,14 @@ foreach ($PaymentTerms as $TER) {
return false;
} else {
$('#content').loader('show');
+ var formData = new FormData($('.ServicePO')[0]);
$.ajax({
- data: $('.ServicePO').serialize(),
+ // data: $('.ServicePO').serialize(),
type: "POST",
url: "amendmentpurchaseorder/UpdateAmendServicePurchaseOrder",
+ data: formData,
+ processData: false,
+ contentType: false,
success: function(data) {
if (data) {
diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php
index 21c279cd..2a33712c 100644
--- a/app/Views/editimportpo.php
+++ b/app/Views/editimportpo.php
@@ -15,6 +15,8 @@ $Currencycode=$currencycode;
//echo $Currencycode;
$Terms='';
$DeliverySchedule='';
+$PrePOFile = '';
+
foreach ($CurrencyDetail as $Detail)
{
@@ -168,6 +170,8 @@ if(!empty($POMaster))
$InsuranceNumber=$Req->InsuranceNumber;
$Importoption=$Req->POSubType;
$BudgetType = $Req->BudgetType;
+ $PrePOFile = $Req->POFile;
+
}
}
@@ -360,7 +364,7 @@ else
'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO');
+ $attributes = array('class' => 'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO','enctype' => 'multipart/form-data');
echo form_open(base_url().'/purchaseorder/addPO/',$attributes); ?>
@@ -3145,6 +3149,13 @@ echo form_textarea($data);
+
@@ -5917,9 +5928,15 @@ if(validate()&&Budgetcheck())
{
//alert();
$('#content').loader('show');
+ var formData = new FormData($('.ImportPO')[0]);
+ formData.append('txtRowCount', Row);
+ formData.append('txtDeletedRow', txtDeletedRow);
+ formData.append('textStatus', stat);
$.ajax({
- data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
-
+ // data:$('.ImportPO').serialize()+"&txtRowCount="+Row+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
+ data: formData,
+ processData: false,
+ contentType: false,
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
type:"POST",
url:"purchaseorder/EditImportPurchaseOrder",
diff --git a/app/Views/importpo.php b/app/Views/importpo.php
index d7818630..06426380 100644
--- a/app/Views/importpo.php
+++ b/app/Views/importpo.php
@@ -2001,6 +2001,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
+
@@ -4323,12 +4324,18 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
} else {
$('#content').loader('show');
-
+ var formData = new FormData($('.ImportPO')[0]);
+ formData.append('txtRowCount', txtRowCount);
+ formData.append('txtDeletedRow', txtDeletedRow);
+ formData.append('textStatus', stat);
$.ajax({
- data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
+ // data:$('.ImportPO').serialize()+"&txtRowCount="+txtRowCount+"&txtDeletedRow="+txtDeletedRow+"&textStatus="+stat,
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
type: "POST",
url: "purchaseorder/addNewImportPurchaseOrder",
+ data: formData,
+ processData: false,
+ contentType: false,
success: function(data) {
if (data) {
$('#content').loader('hide');
diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php
index 67f411a4..53c5a401 100644
--- a/app/Views/servicePurchaseorder.php
+++ b/app/Views/servicePurchaseorder.php
@@ -604,7 +604,7 @@ if (!empty($INRSYMBOL)) {
'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO');
+ $attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO','enctype' => 'multipart/form-data');
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
@@ -1658,6 +1658,7 @@ if (!empty($INRSYMBOL)) {