Live service po issue related changes : GWM
This commit is contained in:
parent
c4276fb215
commit
a70c655ab1
@ -341,6 +341,7 @@ class Servicepurchaseorder extends BaseController
|
|||||||
//update service po
|
//update service po
|
||||||
function UpdateServicePurchaseOrder()
|
function UpdateServicePurchaseOrder()
|
||||||
{
|
{
|
||||||
|
// print_r($this->request->getPost());die;
|
||||||
$PONO = $this->request->getPost('txtPONO');
|
$PONO = $this->request->getPost('txtPONO');
|
||||||
$newsup = $this->request->getPost('newsup');
|
$newsup = $this->request->getPost('newsup');
|
||||||
// $newSupId = split("[ - ]+", $newsup);
|
// $newSupId = split("[ - ]+", $newsup);
|
||||||
@ -408,23 +409,30 @@ class Servicepurchaseorder extends BaseController
|
|||||||
$POList['ReleasedOn'] = get_current_date_time();
|
$POList['ReleasedOn'] = get_current_date_time();
|
||||||
$POList['ReleasedBy'] = $this->session->get('userId');
|
$POList['ReleasedBy'] = $this->session->get('userId');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$file = $this->request->getFile('POFile');
|
$file = $this->request->getFile('POFile');
|
||||||
$requestfilename = $file->getName();
|
if ($file !== null) {
|
||||||
if (!empty($requestfilename)) {
|
$requestfilename = $file->getName();
|
||||||
if ($file && $file->isValid() && !$file->hasMoved()) {
|
if (!empty($requestfilename)) {
|
||||||
$path = ROOTPATH . 'public/uploads/POfiles/';
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
if (!is_dir($path)) {
|
$path = ROOTPATH . 'public/uploads/POfiles/';
|
||||||
mkdir($path, 0777, true);
|
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))) {
|
||||||
} else {
|
log_message('error', 'File already exists in the database: ' . $requestfilename);
|
||||||
$file->move($path, $requestfilename);
|
} else {
|
||||||
$POList['POFile'] = $requestfilename;
|
$file->move($path, $requestfilename);
|
||||||
|
$POList['POFile'] = $requestfilename;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log_message('error', 'No file was uploaded');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO, $POList);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2995,16 +2995,16 @@ if (!empty($getlogpodtl)) {
|
|||||||
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||||
|
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
if (document.getElementById('ServiceTable').rows.length < 2) {
|
if (document.getElementById('ServiceTable').rows.length < 2)
|
||||||
|
{
|
||||||
alert('Please Select Line item to Create PO');
|
alert('Please Select Line item to Create PO');
|
||||||
$('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
// else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||||
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
// alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||||
|
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
else if ($('#Otherpayment').val() == '' && $('#PaymentTerms').val() == 'PT08') {
|
||||||
alert('Please Enter Payable Terms');
|
alert('Please Enter Payable Terms');
|
||||||
$('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
@ -3025,7 +3025,16 @@ if (!empty($getlogpodtl)) {
|
|||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
// console.log(data);
|
|
||||||
|
|
||||||
|
|
||||||
|
// var newWindow = window.open("", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768");
|
||||||
|
// newWindow.document.write("<html><head><title>Response</title></head><body>");
|
||||||
|
// newWindow.document.write("<pre>" + data + "</pre>"); // Using <pre> to preserve formatting
|
||||||
|
// newWindow.document.write("</body></html>");
|
||||||
|
// newWindow.document.close();
|
||||||
|
// newWindow.moveTo(0, 0);
|
||||||
|
// newWindow.resizeTo(screen.width, screen.height);
|
||||||
if (data) {
|
if (data) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
alert(data);
|
alert(data);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user