Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
723ddb3336
@ -239,6 +239,7 @@ $routes->get('EditPO', 'Purchaseorder::EditPurchaseOrder');
|
||||
$routes->get('purchaseorder/CreatePOPrint', 'Purchaseorder::CreatePOPrint');
|
||||
$routes->post('purchaseorder/ReleasePO', 'Purchaseorder::ReleasePO');
|
||||
$routes->post('purchaseorder/EditRevenuePurchaseOrder', 'Purchaseorder::EditRevenuePurchaseOrder');
|
||||
$routes->post('purchaseorder/deletePurchaseOrderFile' , 'Purchaseorder::deletePurchaseOrderFile');
|
||||
|
||||
$routes->post('VerifyWithSupplierForPendingPO', 'Purchaseorder::VerifyWithSupplierForPendingPO');
|
||||
|
||||
|
||||
@ -139,6 +139,8 @@ class Purchaseorder extends BaseController
|
||||
*/
|
||||
public function CreatePurchaseOrder()
|
||||
{
|
||||
|
||||
|
||||
$validation = \Config\Services::validation();
|
||||
$validation->setRule('txtReqNo', 'Requisition Number', ['Req_validate[txtReqNo]'], ['Req_validate' => 'Please Select Requisition Number to Create PO.']);
|
||||
|
||||
@ -253,11 +255,13 @@ class Purchaseorder extends BaseController
|
||||
|
||||
|
||||
$ViewName = 'servicePurchaseorder';
|
||||
|
||||
} else if ($ReqType == IMPORT) {
|
||||
|
||||
$data['staticspecialinstruction'] = $this->purchaseorder_model->getConfigValue('C027');
|
||||
|
||||
$ViewName = 'importpo';
|
||||
|
||||
} else if ($ReqType == CAPITAL) {
|
||||
$data['staticspecialinstruction'] = $this->purchaseorder_model->getConfigValue('C027');
|
||||
$CapitalAvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode, $FYdt, $ReqType);
|
||||
@ -536,6 +540,7 @@ class Purchaseorder extends BaseController
|
||||
{
|
||||
view("capitalpopdf");
|
||||
}
|
||||
|
||||
//To View/Update Purchase Order
|
||||
|
||||
function EditPurchaseOrder()
|
||||
@ -640,6 +645,7 @@ class Purchaseorder extends BaseController
|
||||
// print_r($data);die;
|
||||
$this->global['pageTitle'] = 'Edit Service Purchase order form';
|
||||
$this->loadViews("EditservicePurchaseorder", $this->global, $data, NULL);
|
||||
|
||||
} else if ($ReqType == REVENUE) {
|
||||
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||
@ -650,6 +656,7 @@ class Purchaseorder extends BaseController
|
||||
$data['WorkStatus'] = $this->purchaseorder_model->getStatus(7);
|
||||
$this->global['pageTitle'] = 'Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||
|
||||
} else if ($ReqType == IMPORT) {
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode, $FYdt, $ReqType);
|
||||
|
||||
@ -661,10 +668,12 @@ class Purchaseorder extends BaseController
|
||||
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
||||
// print_r($data['POItem']);
|
||||
$data['Currency'] = $this->purchaseorder_model->GetCurrencytype();
|
||||
|
||||
foreach ($data['POMaster'] as $CUR) {
|
||||
//print_r($CUR->CurrencyType);
|
||||
$Currency = $CUR->CurrencyType;
|
||||
}
|
||||
}
|
||||
|
||||
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
||||
$data['CurrencyDetail'] = $this->purchaseorder_model->GetCurrencyDetail($Currency);
|
||||
$data['PaymentTerms'] = $this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
@ -682,7 +691,10 @@ class Purchaseorder extends BaseController
|
||||
$data['unicode'] = $unicode;
|
||||
$data['currencycode'] = $currencycode;
|
||||
$this->global['pageTitle'] = 'Edit Import Purchase order form';
|
||||
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
|
||||
|
||||
} else if ($ReqType == CAPITAL) {
|
||||
$CapitalRange = $this->request->getVar('CapitalRange');
|
||||
|
||||
@ -690,8 +702,6 @@ class Purchaseorder extends BaseController
|
||||
|
||||
|
||||
if (count($CapitalAvlBudget) > 0) {
|
||||
|
||||
|
||||
$data['AvlCapitalBudAmt'] = $CapitalAvlBudget[0]['BudgetAmount'] - $CapitalAvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
@ -1068,6 +1078,7 @@ class Purchaseorder extends BaseController
|
||||
function addNewPurchaseOrder()
|
||||
{
|
||||
try {
|
||||
|
||||
// Extract POST data
|
||||
$POdt = $this->request->getPost('PODate');
|
||||
$PODate = get_date_time_format($POdt);
|
||||
@ -1096,7 +1107,7 @@ class Purchaseorder extends BaseController
|
||||
$TotalOrderValueSummary = $this->request->getPost('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->request->getPost('txtStatus');
|
||||
$CreateBy = $this->session->get('userId');
|
||||
$RowCount = $this->request->getPost('txtRowCount');
|
||||
$RowCount = $this->request->getPost('txtRowCount');
|
||||
$DeletedRow = $this->request->getPost('txtDeletedRow');
|
||||
$comma_separated = ($DeletedRow !== null && is_string($DeletedRow)) ? explode(':', $DeletedRow) : [];
|
||||
$createddt = get_current_date_time();
|
||||
@ -1118,7 +1129,11 @@ class Purchaseorder extends BaseController
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$requestfilename = "";
|
||||
|
||||
//$requestfilename = "";
|
||||
//the above line is commented due to the fact that same file can exist in the database
|
||||
//for different po
|
||||
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
}
|
||||
@ -1300,8 +1315,11 @@ class Purchaseorder extends BaseController
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))
|
||||
&& file_exists($path .$requestfilename)) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
@ -1991,7 +2009,11 @@ class Purchaseorder extends BaseController
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$requestfilename = "";
|
||||
|
||||
//$requestfilename = "";
|
||||
//the above line is commented due to the fact that same file can exist in the database
|
||||
//for different po
|
||||
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
}
|
||||
@ -2214,8 +2236,10 @@ class Purchaseorder extends BaseController
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))
|
||||
&& file_exists($path .$requestfilename)) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
@ -2655,7 +2679,11 @@ class Purchaseorder extends BaseController
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$requestfilename = "";
|
||||
|
||||
//$requestfilename = "";
|
||||
//the above line is commented due to the fact that same file can exist in the database
|
||||
//for different po
|
||||
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
}
|
||||
@ -2937,8 +2965,10 @@ class Purchaseorder extends BaseController
|
||||
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);
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))
|
||||
&& file_exists($path .$requestfilename)) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
@ -2946,7 +2976,7 @@ class Purchaseorder extends BaseController
|
||||
}
|
||||
}else{
|
||||
log_message('error', 'File Upload not Done' . $requestfilename);
|
||||
return json_encode($this->requestr);
|
||||
|
||||
}
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
||||
|
||||
@ -3385,9 +3415,48 @@ class Purchaseorder extends BaseController
|
||||
|
||||
|
||||
|
||||
/* delete purchase order file */
|
||||
|
||||
function deletePurchaseOrderFile(){
|
||||
|
||||
$PONO=$this->request->getPost('PONO');
|
||||
|
||||
$filename=$this->request->getPost('POFile');
|
||||
|
||||
$result= $this->purchaseorder_model->deletePurchaseOrderFile($PONO);
|
||||
|
||||
$result2=$this->purchaseorder_model->findPurchaseOrderFile($filename);
|
||||
|
||||
|
||||
|
||||
if ($result && empty($result2)) {
|
||||
|
||||
$path = ROOTPATH . 'public/uploads/POfiles/' . $filename;
|
||||
|
||||
if (file_exists($path)) {
|
||||
|
||||
if (unlink($path)) {
|
||||
|
||||
return $this->response->setJSON(['success' => 'File removed successfully !!!']);
|
||||
} else {
|
||||
|
||||
return $this->response->setJSON(['error' => 'Failed to delete the file from the server.']);
|
||||
}
|
||||
} else {
|
||||
|
||||
return $this->response->setJSON(['error' => 'File not found on the server.']);
|
||||
}
|
||||
|
||||
} else if($result){
|
||||
|
||||
return $this->response->setJSON(['success' => 'File removed successfully !!']);
|
||||
}
|
||||
else {
|
||||
|
||||
return $this->response->setJSON(['error' => 'File deletion from database failed or file still exists in database.']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*This function is used to convert amount(digit) into words*/
|
||||
|
||||
@ -246,7 +246,11 @@ class Servicepurchaseorder extends BaseController
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||
$requestfilename = "";
|
||||
|
||||
//$requestfilename = "";
|
||||
//the above line is commented due to the fact that same file can exist in the database
|
||||
//for different po
|
||||
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
}
|
||||
@ -420,8 +424,10 @@ class Servicepurchaseorder extends BaseController
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))
|
||||
&& file_exists($path .$requestfilename)) {
|
||||
log_message('error', 'File already exists in the database: ' . $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
} else {
|
||||
$file->move($path, $requestfilename);
|
||||
$POList['POFile'] = $requestfilename;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1312,7 +1312,7 @@ if (!empty($getlogpodtl)) {
|
||||
<br>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-row ">
|
||||
<div class="form-group col-md-12" id="splpodiv">
|
||||
<label>Special po Table List</label>
|
||||
<table id="table2" class="table table-striped table-hover mb-0" style="font-size:12px;">
|
||||
@ -1447,18 +1447,30 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 px-4">
|
||||
|
||||
<div align="left">
|
||||
<label>Select File</label>
|
||||
<div class="form-group col-md-12 px-4" align="left">
|
||||
|
||||
<label>Select Purchase Order File</label>
|
||||
<br>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 px-4" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<?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>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" />
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12 px-4">
|
||||
|
||||
|
||||
|
||||
<div align="right"><br />
|
||||
<div>
|
||||
|
||||
@ -1884,7 +1884,8 @@ if (!empty($INRSYMBOL)) {
|
||||
return false;
|
||||
|
||||
}
|
||||
else if( $('#Otherpayment').val() == ''){
|
||||
else if( $('#Otherpayment').length > 0 && $('#Otherpayment').is(':visible') && $('#Otherpayment').val() == ''){
|
||||
|
||||
alert('Please Enter the Description of payable terms');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
|
||||
@ -835,8 +835,17 @@ if (!empty($INRSYMBOL)) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div align="right" style="padding:1% 0%;">
|
||||
<br>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<input type="file" name="POFile" id="POFile"><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div align="right" style="padding:1% 0%;">
|
||||
|
||||
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
@ -1149,7 +1158,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" align="right">
|
||||
CGST In %
|
||||
<label> CGST In % </label>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
|
||||
@ -1169,7 +1178,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" align="right">
|
||||
SGST In %
|
||||
<label> SGST In %</label>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<?php
|
||||
@ -1187,8 +1196,8 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" align="right">
|
||||
|
||||
IGST In %
|
||||
<label> IGST In %</label>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
|
||||
@ -1787,8 +1796,8 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" align="right">
|
||||
|
||||
CGST In %
|
||||
<label> CGST In % </label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
@ -1815,8 +1824,8 @@ if (!empty($INRSYMBOL)) {
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" align="right">
|
||||
|
||||
SGST In %
|
||||
<label> SGST In % </label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
@ -1843,8 +1852,8 @@ if (!empty($INRSYMBOL)) {
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6" align="right">
|
||||
|
||||
IGST In %
|
||||
<label> IGST In % </label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
@ -5097,14 +5106,6 @@ if (!empty($INRSYMBOL)) {
|
||||
$('#txtTotalFreight').val(parseFloat(TotFreight).toFixed(2));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$("#CurrencySymbol").val('');
|
||||
var DisplayCurrencySymbol = '';
|
||||
$('#currencytype').change(function() {
|
||||
|
||||
@ -1493,12 +1493,30 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<label> Select Purchase Order File </label>
|
||||
<div class="form-row" align="left">
|
||||
<div class="form-group col-md-12">
|
||||
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-row" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<div class="form-group col-md-12">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<label for="deletePreviousPurchaseOrderFile"><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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" />
|
||||
@ -5800,9 +5818,18 @@ if (!empty($getlogpodtl)) {
|
||||
formData.append('txtPONO', $('#txtPONO').val());
|
||||
formData.append('capitalType', $('#capitalType').val());
|
||||
const fileInput = document.getElementById('POFile');
|
||||
if (fileInput.files.length > 0) {
|
||||
const prePOFileInput= document.getElementById('PrePOFile');
|
||||
|
||||
console.log(fileInput.vlaue);
|
||||
console.log(prePOFileInput.value);
|
||||
|
||||
if (fileInput && fileInput.vlaue &&fileInput.files.length > 0) {
|
||||
formData.append('POFile', fileInput.files[0]);
|
||||
} else {
|
||||
} else if(prePOFileInput && prePOFileInput.files && prePOFileInput.files.length > 0) {
|
||||
formData.append('PrePOFile', prePOFileInput.files[0]);
|
||||
|
||||
}else{
|
||||
formData.append('POFile', " ");
|
||||
console.error('No file selected.');
|
||||
}
|
||||
$('input, select, textarea').each(function() {
|
||||
@ -8463,4 +8490,5 @@ if (!empty($getlogpodtl)) {
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
@ -2625,15 +2625,37 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
<?php } else {
|
||||
} ?>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left"><br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button>
|
||||
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" align="left"><br />
|
||||
<div>
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<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" />
|
||||
@ -2664,6 +2686,12 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
</div><br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
|
||||
|
||||
@ -153,7 +153,6 @@ if (!empty($POMaster)) {
|
||||
$SupplierRef = $Req->Supplier_Reference;
|
||||
$SupOfferno = $Req->Supplier_Offer_No;
|
||||
$Otherref = $Req->Other_Reference;
|
||||
|
||||
$Insurance = $Req->InsuranceStatus;
|
||||
$InsuranceNumber = $Req->InsuranceNumber;
|
||||
$Importoption = $Req->POSubType;
|
||||
@ -1164,18 +1163,31 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-row px-4">
|
||||
<label>Select Purchase Order File</label>
|
||||
<div class="form-group col-md-12" align="left">
|
||||
|
||||
<input type="file" class="" name="POFile" id="POFile">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3" align="left">
|
||||
|
||||
<label>Select Purchase Order File</label>
|
||||
<input type="file" class="" 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; ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-row px-4">
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<div>
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>Previously Uploaded Purchase Order File- </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row px-4">
|
||||
|
||||
@ -151,6 +151,51 @@
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
$('#deletePreviousPurchaseOrderFile').click(function(){
|
||||
|
||||
var PONO = $('#txtPONO').val();
|
||||
|
||||
let confirmTrue=confirm(`Do you confirm to delete the Purchase order file for the PONO ${PONO} ?`);
|
||||
|
||||
|
||||
if(confirmTrue){
|
||||
|
||||
var filename = $('#PrePOFile').val();
|
||||
|
||||
$.ajax({
|
||||
url: "<?php echo base_url('/purchaseorder/deletePurchaseOrderFile') ?>",
|
||||
type: 'POST',
|
||||
data: {
|
||||
PONO :PONO,
|
||||
POFile:filename
|
||||
|
||||
},
|
||||
success: function(response) {
|
||||
|
||||
|
||||
|
||||
$('#deletePreviousPurchaseOrderFileDiv').hide();
|
||||
|
||||
|
||||
if (response)
|
||||
alert(response.success);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}else{
|
||||
return ;
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -3878,6 +3878,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
var formData = new FormData($('.CreatePO')[0]);
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
|
||||
@ -2296,6 +2296,10 @@ if (!empty($INRSYMBOL)) {
|
||||
} else {
|
||||
var formData = new FormData($('.ServicePO')[0]);
|
||||
|
||||
console.log("inside add service purchase order view page");
|
||||
|
||||
console.log(formData);
|
||||
|
||||
$.ajax({
|
||||
// data: $('.ServicePO').serialize(),
|
||||
type: "POST",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 107 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 107 KiB |
Loading…
Reference in New Issue
Block a user