FIX_Files Upload OPtion all another PO'S

This commit is contained in:
VE10-Sanjeev 2024-07-30 12:41:08 +00:00
parent ea38723b18
commit 2e5af50997
14 changed files with 311 additions and 39 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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)) {
</style>
<div class="content-wrapper">
<?php
$attributes = array('class' => '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)) {
<div class="col-md-12">
<div align="right"><br />
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index; ?>">
@ -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: "<?php echo base_url() ?>servicepurchaseorder/UpdateServicePurchaseOrder",
data: formData,
processData: false,
contentType: false,
success: function(data) {
if (data) {
$('#content').loader('hide');

View File

@ -5337,6 +5337,7 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="col-md-12">
<div class="col-md-3 col-md-offset-9"><br />
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus1" id="txtStatus1" />
@ -5740,8 +5741,13 @@ if (!empty($INRSYMBOL)) {
$('#txtStatus').val('<?php echo PO_DRAFT; ?>');
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: "<?php echo base_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;

View File

@ -304,7 +304,7 @@ function vaildateBeforeOpenModal()
</script>
<div class="content-wrapper">
<?php
$attributes = array('class' => '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()
</div>
<div align="right" style="padding:1% 0%;">
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -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:"<?php echo base_url() ?>purchaseorder/addNewCapitalPurchaseOrder",
success:function(data) {

View File

@ -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';
<?php
// $attributes = array('class' => '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';
<div class="row" align="right" style="padding:3%;">
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -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:"<?php echo base_url() ?>amendmentpurchaseorder/EditAmendCapitalPurchaseOrder",
data: formData,
processData: false,
contentType: false,
success:function(data) {
if(data)
{

View File

@ -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();
<?php
// $attributes = array('class' => '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();
<div align="right" style="padding:3% 2%;">
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -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:"<?php echo base_url() ?>purchaseorder/EditCapitalPurchaseOrder",

View File

@ -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))
<section class="content">
<div id="content"></div>
<?php
$attributes = array('class' => '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);
<div align="right" style="padding-right:10px">
<div class="col-md-5 col-md-offset-7" align="right"><br />
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
@ -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:"<?php echo base_url() ?>amendmentpurchaseorder/EditAmendImportPO",

View File

@ -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()
</div>
<div class="row" style="padding: 2% 0%">
<div class="col-md-5 col-md-offset-7" align="right"><br />
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -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:"<?php echo base_url() ?>amendmentpurchaseorder/EditRevenuePurchaseOrder",
data: formData,
processData: false,
contentType: false,
success:function(data) {
if(data)
{

View File

@ -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) {
</style>
<div class="content-wrapper">
<?php
$attributes = array('class' => '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) {
<div class="col-md-12">
<div class="row"><br />
<div align="right" style="padding-right:10px">
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
@ -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: "<?php echo base_url() ?>amendmentpurchaseorder/UpdateAmendServicePurchaseOrder",
data: formData,
processData: false,
contentType: false,
success: function(data) {
if (data) {

View File

@ -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
<section class="content">
<div id="content"></div>
<?php
$attributes = array('class' => '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);
<div align="right" style="padding-right:10px">
<div class="col-md-5 col-md-offset-7" align="right"><br />
<div>
<input type="file" name="POFile" id="POFile">
<?php if($PrePOFile){ ?>
<label><a title="previously uploaded PO File" href="<?php echo base_url().'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
<?php } ?>
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>"/><br>
</div>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -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:"<?php echo base_url() ?>purchaseorder/EditImportPurchaseOrder",

View File

@ -2001,6 +2001,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
<div align="right" style="padding-right:10px">
<div class="col-md-3 col-md-offset-9"><br />
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
@ -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: "<?php echo base_url() ?>purchaseorder/addNewImportPurchaseOrder",
data: formData,
processData: false,
contentType: false,
success: function(data) {
if (data) {
$('#content').loader('hide');

View File

@ -604,7 +604,7 @@ if (!empty($INRSYMBOL)) {
</style>
<div class="content-wrapper">
<?php
$attributes = array('class' => '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)) {
<div class="row">
<br />
<div align="right" style="padding-right:10px">
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
@ -2355,10 +2356,15 @@ if (!empty($INRSYMBOL)) {
} else {
$('#content').loader('show');
var formData = new FormData($('.ServicePO')[0]);
$.ajax({
data: $('.ServicePO').serialize(),
// data: $('.ServicePO').serialize(),
type: "POST",
url: "<?php echo base_url() ?>servicepurchaseorder/addNewServicePurchaseOrder",
data: formData,
processData: false,
contentType: false,
success: function(data) {
if (data) {
$('#content').loader('hide');