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->get('purchaseorder/CreatePOPrint', 'Purchaseorder::CreatePOPrint');
|
||||||
$routes->post('purchaseorder/ReleasePO', 'Purchaseorder::ReleasePO');
|
$routes->post('purchaseorder/ReleasePO', 'Purchaseorder::ReleasePO');
|
||||||
$routes->post('purchaseorder/EditRevenuePurchaseOrder', 'Purchaseorder::EditRevenuePurchaseOrder');
|
$routes->post('purchaseorder/EditRevenuePurchaseOrder', 'Purchaseorder::EditRevenuePurchaseOrder');
|
||||||
|
$routes->post('purchaseorder/deletePurchaseOrderFile' , 'Purchaseorder::deletePurchaseOrderFile');
|
||||||
|
|
||||||
$routes->post('VerifyWithSupplierForPendingPO', 'Purchaseorder::VerifyWithSupplierForPendingPO');
|
$routes->post('VerifyWithSupplierForPendingPO', 'Purchaseorder::VerifyWithSupplierForPendingPO');
|
||||||
|
|
||||||
|
|||||||
@ -139,6 +139,8 @@ class Purchaseorder extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function CreatePurchaseOrder()
|
public function CreatePurchaseOrder()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$validation = \Config\Services::validation();
|
$validation = \Config\Services::validation();
|
||||||
$validation->setRule('txtReqNo', 'Requisition Number', ['Req_validate[txtReqNo]'], ['Req_validate' => 'Please Select Requisition Number to Create PO.']);
|
$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';
|
$ViewName = 'servicePurchaseorder';
|
||||||
|
|
||||||
} else if ($ReqType == IMPORT) {
|
} else if ($ReqType == IMPORT) {
|
||||||
|
|
||||||
$data['staticspecialinstruction'] = $this->purchaseorder_model->getConfigValue('C027');
|
$data['staticspecialinstruction'] = $this->purchaseorder_model->getConfigValue('C027');
|
||||||
|
|
||||||
$ViewName = 'importpo';
|
$ViewName = 'importpo';
|
||||||
|
|
||||||
} else if ($ReqType == CAPITAL) {
|
} else if ($ReqType == CAPITAL) {
|
||||||
$data['staticspecialinstruction'] = $this->purchaseorder_model->getConfigValue('C027');
|
$data['staticspecialinstruction'] = $this->purchaseorder_model->getConfigValue('C027');
|
||||||
$CapitalAvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode, $FYdt, $ReqType);
|
$CapitalAvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode, $FYdt, $ReqType);
|
||||||
@ -536,6 +540,7 @@ class Purchaseorder extends BaseController
|
|||||||
{
|
{
|
||||||
view("capitalpopdf");
|
view("capitalpopdf");
|
||||||
}
|
}
|
||||||
|
|
||||||
//To View/Update Purchase Order
|
//To View/Update Purchase Order
|
||||||
|
|
||||||
function EditPurchaseOrder()
|
function EditPurchaseOrder()
|
||||||
@ -640,6 +645,7 @@ class Purchaseorder extends BaseController
|
|||||||
// print_r($data);die;
|
// print_r($data);die;
|
||||||
$this->global['pageTitle'] = 'Edit Service Purchase order form';
|
$this->global['pageTitle'] = 'Edit Service Purchase order form';
|
||||||
$this->loadViews("EditservicePurchaseorder", $this->global, $data, NULL);
|
$this->loadViews("EditservicePurchaseorder", $this->global, $data, NULL);
|
||||||
|
|
||||||
} else if ($ReqType == REVENUE) {
|
} else if ($ReqType == REVENUE) {
|
||||||
|
|
||||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||||
@ -650,6 +656,7 @@ class Purchaseorder extends BaseController
|
|||||||
$data['WorkStatus'] = $this->purchaseorder_model->getStatus(7);
|
$data['WorkStatus'] = $this->purchaseorder_model->getStatus(7);
|
||||||
$this->global['pageTitle'] = 'Edit Revenue Purchase order form';
|
$this->global['pageTitle'] = 'Edit Revenue Purchase order form';
|
||||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||||
|
|
||||||
} else if ($ReqType == IMPORT) {
|
} else if ($ReqType == IMPORT) {
|
||||||
$AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode, $FYdt, $ReqType);
|
$AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode, $FYdt, $ReqType);
|
||||||
|
|
||||||
@ -661,10 +668,12 @@ class Purchaseorder extends BaseController
|
|||||||
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
||||||
// print_r($data['POItem']);
|
// print_r($data['POItem']);
|
||||||
$data['Currency'] = $this->purchaseorder_model->GetCurrencytype();
|
$data['Currency'] = $this->purchaseorder_model->GetCurrencytype();
|
||||||
|
|
||||||
foreach ($data['POMaster'] as $CUR) {
|
foreach ($data['POMaster'] as $CUR) {
|
||||||
//print_r($CUR->CurrencyType);
|
//print_r($CUR->CurrencyType);
|
||||||
$Currency = $CUR->CurrencyType;
|
$Currency = $CUR->CurrencyType;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
||||||
$data['CurrencyDetail'] = $this->purchaseorder_model->GetCurrencyDetail($Currency);
|
$data['CurrencyDetail'] = $this->purchaseorder_model->GetCurrencyDetail($Currency);
|
||||||
$data['PaymentTerms'] = $this->purchaseorder_model->GetPaymentTerms($PONO);
|
$data['PaymentTerms'] = $this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||||
@ -682,7 +691,10 @@ class Purchaseorder extends BaseController
|
|||||||
$data['unicode'] = $unicode;
|
$data['unicode'] = $unicode;
|
||||||
$data['currencycode'] = $currencycode;
|
$data['currencycode'] = $currencycode;
|
||||||
$this->global['pageTitle'] = 'Edit Import Purchase order form';
|
$this->global['pageTitle'] = 'Edit Import Purchase order form';
|
||||||
|
|
||||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
|
||||||
} else if ($ReqType == CAPITAL) {
|
} else if ($ReqType == CAPITAL) {
|
||||||
$CapitalRange = $this->request->getVar('CapitalRange');
|
$CapitalRange = $this->request->getVar('CapitalRange');
|
||||||
|
|
||||||
@ -690,8 +702,6 @@ class Purchaseorder extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
if (count($CapitalAvlBudget) > 0) {
|
if (count($CapitalAvlBudget) > 0) {
|
||||||
|
|
||||||
|
|
||||||
$data['AvlCapitalBudAmt'] = $CapitalAvlBudget[0]['BudgetAmount'] - $CapitalAvlBudget[0]['Totalvalue'];
|
$data['AvlCapitalBudAmt'] = $CapitalAvlBudget[0]['BudgetAmount'] - $CapitalAvlBudget[0]['Totalvalue'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1068,6 +1078,7 @@ class Purchaseorder extends BaseController
|
|||||||
function addNewPurchaseOrder()
|
function addNewPurchaseOrder()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Extract POST data
|
// Extract POST data
|
||||||
$POdt = $this->request->getPost('PODate');
|
$POdt = $this->request->getPost('PODate');
|
||||||
$PODate = get_date_time_format($POdt);
|
$PODate = get_date_time_format($POdt);
|
||||||
@ -1118,7 +1129,11 @@ class Purchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||||
log_message('error', 'File already exists in the database' . $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 {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
}
|
}
|
||||||
@ -1300,8 +1315,11 @@ class Purchaseorder extends BaseController
|
|||||||
if (!is_dir($path)) {
|
if (!is_dir($path)) {
|
||||||
mkdir($path, 0777, true);
|
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);
|
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||||
|
$POList['POFile'] = $requestfilename;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
$POList['POFile'] = $requestfilename;
|
$POList['POFile'] = $requestfilename;
|
||||||
@ -1991,7 +2009,11 @@ class Purchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||||
log_message('error', 'File already exists in the database' . $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 {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
}
|
}
|
||||||
@ -2214,8 +2236,10 @@ class Purchaseorder extends BaseController
|
|||||||
if (!is_dir($path)) {
|
if (!is_dir($path)) {
|
||||||
mkdir($path, 0777, true);
|
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);
|
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||||
|
$POList['POFile'] = $requestfilename;
|
||||||
} else {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
$POList['POFile'] = $requestfilename;
|
$POList['POFile'] = $requestfilename;
|
||||||
@ -2655,7 +2679,11 @@ class Purchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||||
log_message('error', 'File already exists in the database' . $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 {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
}
|
}
|
||||||
@ -2937,8 +2965,10 @@ class Purchaseorder extends BaseController
|
|||||||
if (!is_dir($path)) {
|
if (!is_dir($path)) {
|
||||||
mkdir($path, 0777, true);
|
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);
|
log_message('error', 'File already exists in the database' . $requestfilename);
|
||||||
|
$POList['POFile'] = $requestfilename;
|
||||||
} else {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
$POList['POFile'] = $requestfilename;
|
$POList['POFile'] = $requestfilename;
|
||||||
@ -2946,7 +2976,7 @@ class Purchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
log_message('error', 'File Upload not Done' . $requestfilename);
|
log_message('error', 'File Upload not Done' . $requestfilename);
|
||||||
return json_encode($this->requestr);
|
|
||||||
}
|
}
|
||||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
$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*/
|
/*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))) {
|
if (!empty($this->purchaseorder_model->isFileExists($requestfilename))) {
|
||||||
log_message('error', 'File already exists in the database' . $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 {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
}
|
}
|
||||||
@ -420,8 +424,10 @@ class Servicepurchaseorder extends BaseController
|
|||||||
if (!is_dir($path)) {
|
if (!is_dir($path)) {
|
||||||
mkdir($path, 0777, true);
|
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);
|
log_message('error', 'File already exists in the database: ' . $requestfilename);
|
||||||
|
$POList['POFile'] = $requestfilename;
|
||||||
} else {
|
} else {
|
||||||
$file->move($path, $requestfilename);
|
$file->move($path, $requestfilename);
|
||||||
$POList['POFile'] = $requestfilename;
|
$POList['POFile'] = $requestfilename;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1312,7 +1312,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row ">
|
||||||
<div class="form-group col-md-12" id="splpodiv">
|
<div class="form-group col-md-12" id="splpodiv">
|
||||||
<label>Special po Table List</label>
|
<label>Special po Table List</label>
|
||||||
<table id="table2" class="table table-striped table-hover mb-0" style="font-size:12px;">
|
<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>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-12 px-4">
|
|
||||||
|
|
||||||
<div align="left">
|
<div class="form-group col-md-12 px-4" align="left">
|
||||||
<label>Select File</label>
|
|
||||||
|
<label>Select Purchase Order File</label>
|
||||||
<br>
|
<br>
|
||||||
<input type="file" name="POFile" id="POFile">
|
<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>
|
<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 } ?>
|
<?php } ?>
|
||||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" />
|
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" />
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-md-12 px-4">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div align="right"><br />
|
<div align="right"><br />
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -1884,7 +1884,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( $('#Otherpayment').val() == ''){
|
else if( $('#Otherpayment').length > 0 && $('#Otherpayment').is(':visible') && $('#Otherpayment').val() == ''){
|
||||||
|
|
||||||
alert('Please Enter the Description of payable terms');
|
alert('Please Enter the Description of payable terms');
|
||||||
$('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -835,8 +835,17 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
<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="txtPoRange" id="txtPoRange" />
|
||||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||||
@ -1149,7 +1158,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6" align="right">
|
<div class="form-group col-md-6" align="right">
|
||||||
CGST In %
|
<label> CGST In % </label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
|
|
||||||
@ -1169,7 +1178,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6" align="right">
|
<div class="form-group col-md-6" align="right">
|
||||||
SGST In %
|
<label> SGST In %</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<?php
|
<?php
|
||||||
@ -1187,8 +1196,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6" align="right">
|
<div class="form-group col-md-6" align="right">
|
||||||
|
<label> IGST In %</label>
|
||||||
|
|
||||||
IGST In %
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
|
|
||||||
@ -1787,8 +1796,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6" align="right">
|
<div class="form-group col-md-6" align="right">
|
||||||
|
<label> CGST In % </label>
|
||||||
|
|
||||||
CGST In %
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
@ -1815,8 +1824,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6" align="right">
|
<div class="form-group col-md-6" align="right">
|
||||||
|
<label> SGST In % </label>
|
||||||
|
|
||||||
SGST In %
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
@ -1843,8 +1852,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6" align="right">
|
<div class="form-group col-md-6" align="right">
|
||||||
|
<label> IGST In % </label>
|
||||||
|
|
||||||
IGST In %
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
@ -5097,14 +5106,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$('#txtTotalFreight').val(parseFloat(TotFreight).toFixed(2));
|
$('#txtTotalFreight').val(parseFloat(TotFreight).toFixed(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#CurrencySymbol").val('');
|
$("#CurrencySymbol").val('');
|
||||||
var DisplayCurrencySymbol = '';
|
var DisplayCurrencySymbol = '';
|
||||||
$('#currencytype').change(function() {
|
$('#currencytype').change(function() {
|
||||||
|
|||||||
@ -1493,12 +1493,30 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
</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 align="right" style="padding:3% 2%;">
|
||||||
<div>
|
<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>
|
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||||
@ -5800,9 +5818,18 @@ if (!empty($getlogpodtl)) {
|
|||||||
formData.append('txtPONO', $('#txtPONO').val());
|
formData.append('txtPONO', $('#txtPONO').val());
|
||||||
formData.append('capitalType', $('#capitalType').val());
|
formData.append('capitalType', $('#capitalType').val());
|
||||||
const fileInput = document.getElementById('POFile');
|
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]);
|
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.');
|
console.error('No file selected.');
|
||||||
}
|
}
|
||||||
$('input, select, textarea').each(function() {
|
$('input, select, textarea').each(function() {
|
||||||
@ -8464,3 +8491,4 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -2625,15 +2625,37 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
<?php } else {
|
<?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-row">
|
||||||
<div class="form-group col-md-12" align="left"><br />
|
<div class="form-group col-md-12" align="left"><br />
|
||||||
<div>
|
<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>
|
</div>
|
||||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||||
@ -2664,6 +2686,12 @@ if (!empty($getlogpodtl)) {
|
|||||||
|
|
||||||
</div><br />
|
</div><br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,6 @@ if (!empty($POMaster)) {
|
|||||||
$SupplierRef = $Req->Supplier_Reference;
|
$SupplierRef = $Req->Supplier_Reference;
|
||||||
$SupOfferno = $Req->Supplier_Offer_No;
|
$SupOfferno = $Req->Supplier_Offer_No;
|
||||||
$Otherref = $Req->Other_Reference;
|
$Otherref = $Req->Other_Reference;
|
||||||
|
|
||||||
$Insurance = $Req->InsuranceStatus;
|
$Insurance = $Req->InsuranceStatus;
|
||||||
$InsuranceNumber = $Req->InsuranceNumber;
|
$InsuranceNumber = $Req->InsuranceNumber;
|
||||||
$Importoption = $Req->POSubType;
|
$Importoption = $Req->POSubType;
|
||||||
@ -1164,20 +1163,33 @@ if (!empty($getlogpodtl)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row px-4">
|
<div class="form-row px-4">
|
||||||
|
<label>Select Purchase Order File</label>
|
||||||
|
<div class="form-group col-md-12" align="left">
|
||||||
|
|
||||||
<div class="form-group col-md-3" align="left">
|
<input type="file" class="" name="POFile" id="POFile">
|
||||||
|
|
||||||
<label>Select Purchase Order File</label>
|
</div>
|
||||||
<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>
|
</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">
|
<div class="form-row px-4">
|
||||||
|
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
|
|||||||
@ -151,6 +151,51 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</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>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@ -3879,6 +3879,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var formData = new FormData($('.CreatePO')[0]);
|
var formData = new FormData($('.CreatePO')[0]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder",
|
url: "<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder",
|
||||||
|
|||||||
@ -2296,6 +2296,10 @@ if (!empty($INRSYMBOL)) {
|
|||||||
} else {
|
} else {
|
||||||
var formData = new FormData($('.ServicePO')[0]);
|
var formData = new FormData($('.ServicePO')[0]);
|
||||||
|
|
||||||
|
console.log("inside add service purchase order view page");
|
||||||
|
|
||||||
|
console.log(formData);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// data: $('.ServicePO').serialize(),
|
// data: $('.ServicePO').serialize(),
|
||||||
type: "POST",
|
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