CHANGES_mpdf , openorder flag : ps
This commit is contained in:
parent
ca8083bef9
commit
f2ffe5dc9e
@ -164,6 +164,8 @@ $routes->post('getMaterialDetails', 'Requisitionform::getMaterialDetails');
|
||||
$routes->post('DeleteRequistionForm', 'Requisitionform::DeleteRequistionForm'); // recheck it used or not.
|
||||
$routes->post('requisitionform/ApproveRequest', 'Requisitionform::ApproveRequest');
|
||||
$routes->post('requisitionform/DeleteReqNo', 'Requisitionform::DeleteReqNo');
|
||||
$routes->post('requisitionform/ViewRequest', 'Requisitionform::ViewRequest');
|
||||
|
||||
|
||||
// Application PO Flow Routes
|
||||
$routes->match(['get', 'post', 'put', 'delete'],'addPO', 'Purchaseorder::addPO');
|
||||
@ -312,8 +314,4 @@ $routes->match(['get', 'post', 'put', 'delete'],'Empperform', 'Report::per');
|
||||
|
||||
$routes->get('qualityreportlist', 'Quality::reportList');
|
||||
$routes->get('qualityreportlistinward', 'Quality::reportListInward');
|
||||
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');
|
||||
|
||||
$routes->get('/pdf', 'PdfController::index');
|
||||
$routes->match(['get', 'post', 'put', 'delete'],'pdf/preview', 'PdfController::preview');
|
||||
$routes->match(['get', 'post', 'put', 'delete'],'pdf/download', 'PdfController::download');
|
||||
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');
|
||||
@ -202,11 +202,12 @@ class Emergencypurchaseorder extends BaseController
|
||||
if (count($Req) > 0) {
|
||||
$RegNo = $Req[0]['ReqNo'];
|
||||
}
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
// 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' => $ServiceWorkStatus, '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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'VaildUpto'=>$VaildUpto);
|
||||
$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' => $ServiceWorkStatus, '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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $ServiceTypeOptions);
|
||||
@ -457,10 +458,11 @@ class Emergencypurchaseorder extends BaseController
|
||||
$RegNo = $Req[0]['ReqNo'];
|
||||
}
|
||||
// PO Master
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? get_date_time_format($this->request->getPost('VaildUpto')) : null;
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Supplier_Reference' => $supplierreference, 'Other_Reference' => $otherreference, 'InsuranceNumber' => $insuranceno, 'InsuranceStatus' => $insurancestatus, 'Fincap' => $fincap, 'POSubType' => $revenuetype, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'VaildUpto'=>$VaildUpto);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Supplier_Reference' => $supplierreference, 'Other_Reference' => $otherreference, 'InsuranceNumber' => $insuranceno, 'InsuranceStatus' => $insurancestatus, 'Fincap' => $fincap, 'POSubType' => $revenuetype, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
//print_r($POList);
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype);
|
||||
$PONO = $POMaster ? $newPONO : "";
|
||||
@ -1181,14 +1183,14 @@ class Emergencypurchaseorder extends BaseController
|
||||
|
||||
$createddt = get_current_date_time();
|
||||
$Local_Interstate = $this->request->getPost('Range');
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
// PO Master
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'CapitalRange' => $Local_Interstate,'VaildUpto'=>$VaildUpto);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'Status' => $POStatus, 'PORange' => $PoRange, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'CapitalRange' => $Local_Interstate,'IsOpenOrder'=>$IsOpenOrder);
|
||||
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,'advance');
|
||||
|
||||
@ -286,42 +286,48 @@ class Purchaseorder extends BaseController
|
||||
return true;
|
||||
}
|
||||
|
||||
function CreatePOPrint()
|
||||
function CreatePOPrint_old()
|
||||
{
|
||||
$PONO = $this->request->getVar('PONO');
|
||||
|
||||
|
||||
$ReqType = $this->request->getVar('ReqType');
|
||||
|
||||
|
||||
$this->poprint($PONO);
|
||||
|
||||
// if ($ReqType == SERVICE) {
|
||||
// $this->servicepoprint($PONO);
|
||||
// } else if ($ReqType == REVENUE) {
|
||||
// $this->revenuepoprint($PONO);
|
||||
// } else if ($ReqType == IMPORT) {
|
||||
// $this->importpoprint($PONO);
|
||||
// } else if ($ReqType == CAPITAL) {
|
||||
// $this->CapitalPoPrint($PONO);
|
||||
// }
|
||||
if ($ReqType == SERVICE) {
|
||||
$this->servicepoprint($PONO);
|
||||
} else if ($ReqType == REVENUE) {
|
||||
$this->revenuepoprint($PONO);
|
||||
} else if ($ReqType == IMPORT) {
|
||||
$this->importpoprint($PONO);
|
||||
} else if ($ReqType == CAPITAL) {
|
||||
$this->CapitalPoPrint($PONO);
|
||||
}
|
||||
}
|
||||
public function poprint($PONO)
|
||||
public function CreatePOPrint()
|
||||
{
|
||||
|
||||
// Load all views as normal
|
||||
|
||||
$PONO = $this->request->getVar('PONO');
|
||||
$ReqType = $this->request->getVar('ReqType');
|
||||
|
||||
//$PONO = $this->request->getVar('PO');
|
||||
$PoStatus = '';
|
||||
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
|
||||
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
|
||||
if ($ReqType == SERVICE) {
|
||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetailsForpdf($PONO);
|
||||
$data['serviceTaxList'] = $this->purchaseorder_model->GetServiceTaxDetails($PONO);
|
||||
} else if ($ReqType == REVENUE) {
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
|
||||
$data['reveuetax'] = $this->purchaseorder_model->getRevenueTaxinforforpdf($PONO);
|
||||
} else if ($ReqType == IMPORT) {
|
||||
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO);
|
||||
} else if ($ReqType == CAPITAL) {
|
||||
$data['POItem'] = $this->purchaseorder_model->GetCapitalPurchaseOrderDetailsForPDF($PONO);
|
||||
}
|
||||
// print_r($data['POItem']);die;
|
||||
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
||||
$data['CurrencySymbol'] = $this->purchaseorder_model->GerCurrencyCodeName('INR');
|
||||
$data['reveuetax'] = $this->purchaseorder_model->getRevenueTaxinforforpdf($PONO);
|
||||
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
||||
$Currencycode = '';
|
||||
$TotalOrderValue = $data['POItem'][0]->TotalOrderValue;
|
||||
$AdvanceAmount = 0.00;
|
||||
@ -342,6 +348,130 @@ class Purchaseorder extends BaseController
|
||||
$mpdf = new \Mpdf\Mpdf(['mode' => 'utf-8',
|
||||
'format' => 'A4',
|
||||
'default_font' => 'sans-serif',
|
||||
'margin_header' => 0,
|
||||
'margin_top' => -30,
|
||||
'margin_right' => 14,
|
||||
'margin_left' => 5,
|
||||
'margin_footer' => -30,
|
||||
'orientation' => 'P']);
|
||||
// Set PDF properties
|
||||
$mpdf->SetTitle('Invoice');
|
||||
$mpdf->SetAuthor($data['CompanyDetails'][0]->CompanyName);
|
||||
$mpdf->SetCreator('Venba');
|
||||
|
||||
|
||||
// Generate the PDF content (HTML)
|
||||
// if ($PoStatus == PO_RELEASED || $PoStatus == PO_SERVICE_COMPLETED || $PoStatus == MRIR_APPROVED || $PoStatus == MRIR_REJECTED || $PoStatus == IGR_CREATED || $PoStatus == '' || $PoStatus == SPECIAL_PO) {
|
||||
// $mpdf->SetWatermarkText('');
|
||||
// } else {
|
||||
// $mpdf->SetWatermarkText('DRAFT');
|
||||
// }
|
||||
|
||||
|
||||
// Set auto margins
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->use_kwt = true;
|
||||
// Set HTML header
|
||||
// $HtmlHeading = view('includes/pdfheader', $data);
|
||||
// $mpdf->SetHTMLHeader($HtmlHeading);
|
||||
|
||||
// Set HTML body
|
||||
// $html = view('pdf_view', $data);
|
||||
// $mpdf->WriteHTML($html); // Use WriteHTML() method to add body content
|
||||
$html = view('po_pdf', $data);
|
||||
//echo $html;die;
|
||||
$mpdf->WriteHTML($html); // Use WriteHTML() method to add body content
|
||||
|
||||
// Set HTML footer
|
||||
// $HTMLFooter = view('includes/pdffooter', $data);
|
||||
// $mpdf->setFooter('' . "Page {PAGENO} of {nb}");
|
||||
|
||||
// Output PDF
|
||||
$mpdf->Output('POReport' . $PONO . '.pdf', 'D');
|
||||
}
|
||||
public function poprint2($PONO,$ReqType)
|
||||
{
|
||||
|
||||
// Load all views as normal
|
||||
|
||||
|
||||
//$PONO = $this->request->getVar('PO');
|
||||
$Requester = '';
|
||||
$Depcode = '';
|
||||
$Currencycode = '';
|
||||
$PoStatus = '';
|
||||
$PaiseVal = '';
|
||||
$SymbolCurrency = '';
|
||||
$SymbolCurrencyName = '';
|
||||
$TotalOrderValue = 0.00;
|
||||
$AdvanceAmount = 0.00;
|
||||
$ProductPrice = '';
|
||||
$TotaltoPay = 0.00;
|
||||
|
||||
|
||||
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
||||
|
||||
$data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO);
|
||||
|
||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
|
||||
|
||||
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
|
||||
|
||||
$data['DEPCODE'] = $this->purchaseorder_model->GerRequesterDep($Depcode);
|
||||
|
||||
|
||||
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
||||
$data['CurrencySymbol'] = $this->purchaseorder_model->GerCurrencyCodeName($Currencycode);
|
||||
$data['Requestername'] = $this->purchaseorder_model->GerRequesterName($Requester);
|
||||
|
||||
|
||||
|
||||
|
||||
// print_r($data['POItem']);die;
|
||||
$CapitalRange = 1;
|
||||
|
||||
|
||||
if (!empty($data['CurrencySymbol']) > 0) {
|
||||
$SymbolCurrency = $data['CurrencySymbol'][0]->FontCode2000;
|
||||
$SymbolCurrencyName = $data['CurrencySymbol'][0]->Currency;
|
||||
$PaiseVal = $data['CurrencySymbol'][0]->PaiseVal;
|
||||
}
|
||||
|
||||
if (!empty($data['POItem'])) {
|
||||
foreach ($data['POItem'] as $POI) {
|
||||
$Currencycode = $POI->CurrencyType;
|
||||
$CapitalRange = $POI->CapitalRange;
|
||||
$AdvanceAmount = $POI->AdvanceAmount;
|
||||
$TotalOrderValue = $POI->TotalOrderValue;
|
||||
$PoStatus = $POI->Status;
|
||||
$Requester = isset($POI->Requestedby) ? $POI->Requestedby : "";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($CapitalRange != '') {
|
||||
$data['TaxListDetails'] = $this->purchaseorder_model->GetCapitalTaxListDetails($PONO, $CapitalRange);
|
||||
}
|
||||
|
||||
foreach ($data['Requestername'] as $ReqDep) {
|
||||
$Depcode = $ReqDep->Departmentcode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$mpdf = new \Mpdf\Mpdf(['mode' => 'utf-8',
|
||||
'format' => 'A4',
|
||||
'default_font' => 'sans-serif',
|
||||
'margin_header' => 0,
|
||||
'margin_top' => -30,
|
||||
'margin_right' => 14,
|
||||
'margin_left' => 5,
|
||||
'margin_footer' => -30,
|
||||
'orientation' => 'P']);
|
||||
// Set PDF properties
|
||||
$mpdf->SetTitle('Invoice');
|
||||
@ -377,7 +507,7 @@ class Purchaseorder extends BaseController
|
||||
// $mpdf->setFooter('' . "Page {PAGENO} of {nb}");
|
||||
|
||||
// Output PDF
|
||||
$mpdf->Output('POReport' . $PONO . '.pdf', 'D');
|
||||
$mpdf->Output($ReqType.'_' . $PONO . '.pdf', 'D');
|
||||
}
|
||||
|
||||
|
||||
@ -981,12 +1111,13 @@ class Purchaseorder extends BaseController
|
||||
|
||||
$Qualitycheck = 1;
|
||||
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
// PO Master
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'Status' => $POStatus, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $supplierreference, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'POSubType' => $revenuetype, 'InsuranceNumber' => $insuranceno, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'VaildUpto'=>$VaildUpto);
|
||||
$POList = array('PONO'=>$newPONO,'SupplierID' => $SupplierID, 'TotalOrderValue' => $TotalOrderValueSummary, 'PODate' => $PODate, 'DeliverySchedule' => $DeliverySchedule, 'DeliveryOption' => $DeliveryOption, 'Status' => $POStatus, 'PORange' => $Local_Interstate, 'ServiceDescription' => $SpcialInstruction, 'CreatedBy' => $CreateBy, 'DeliveryAddress' => $DeliveryAddr, 'DeliveryDate' => $Deliverydt, 'CreatedDate' => $createddt, 'PaymentTerms' => $PaymentTerms, 'POType' => $POType, 'CapitalRange' => $Local_Interstate, 'PaymentOtherDescription' => $OtherPayment, 'Supplier_Reference' => $supplierreference, 'Mode_Of_Shipment' => $Modeofshipment, 'Supplier_Offer_No' => $supplieroffno, 'Other_Reference' => $otherreference, 'Fincap' => $fincap, 'InsuranceStatus' => $insurancestatus, 'POSubType' => $revenuetype, 'InsuranceNumber' => $insuranceno, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList, $POType, $revenuetype);
|
||||
// echo "@1100 i have pomaster = ".'<pre>'.print_r($POMaster,true).'</pre>'."<br>";die();
|
||||
$PONO = $POMaster ? $newPONO : "";
|
||||
@ -1524,7 +1655,7 @@ class Purchaseorder extends BaseController
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
// Output PDF
|
||||
$mpdf->Output('ServicePOReport' . $PONO . '.pdf', 'I');
|
||||
$mpdf->Output('ServicePOReport' . $PONO . '.pdf', 'D');
|
||||
}
|
||||
|
||||
|
||||
@ -1791,11 +1922,12 @@ class Purchaseorder extends BaseController
|
||||
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType);
|
||||
|
||||
$Qualitycheck = 1;
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
$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,'VaildUpto'=>$VaildUpto);
|
||||
$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);
|
||||
|
||||
//print_r($POList);
|
||||
//die();
|
||||
@ -2433,11 +2565,12 @@ class Purchaseorder extends BaseController
|
||||
|
||||
$Qualitycheck = 1;
|
||||
|
||||
$VaildUpto = ($this->request->getPost('VaildUpto') !== null && !empty($this->request->getPost('VaildUpto'))) ? $this->request->getPost('VaildUpto') : null;
|
||||
$IsOpenOrder = ($this->request->getPost('IsOpenOrder') !== null && !empty($this->request->getPost('IsOpenOrder')) && $this->request->getPost('IsOpenOrder') === '1') ? $this->request->getPost('IsOpenOrder') : null;
|
||||
|
||||
$lastPONO = $this->purchaseorder_model->lastPONO();
|
||||
$newPONO = generate_po_number($lastPONO);
|
||||
|
||||
$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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'VaildUpto'=>$VaildUpto);
|
||||
$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' => $InsuranceNo, 'POSubType' => $ServiceTypeOptions, 'IsQualityChkReqired' => $Qualitycheck, 'BudgetType' => $BudgetType,'IsOpenOrder'=>$IsOpenOrder);
|
||||
|
||||
// $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);
|
||||
|
||||
|
||||
@ -1054,7 +1054,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
ROUND(((AfterSGST + AfterCGST +
|
||||
AfterIGST)) ,2)as Taxamount,AdvanceAmount,
|
||||
TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,sup.SupplierID,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,sup.Cert_MSME,
|
||||
LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms
|
||||
LineItem.AmendedDetails as LineAmend,LineItem.AmendedDetails as lineamenddetails,Payment.PaymentTerms
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
left join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
left join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
@ -1104,7 +1104,7 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
|
||||
$subQuery = 'SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Import_DispatchDetails,LineItem.Per,LineItem.ServiceMaterialDescription,
|
||||
Mat.UOM,Quantity,ReqMas.Requestedby,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount ,
|
||||
ProductPrice,Tax.*,LineItem.CostCenterCode ,Date(ReqMast.ReqDate) as ReqDate,POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend,AdvanceAmount, Pay.PaymentTerms as Pay,ROUND((Quantity *Rate),2 ) as BasicValue,HSNCODE,sup.EmailAddress,sup.SupplierID,sup.PAN,sup.ContactNumber,sup.GSTNO
|
||||
ProductPrice,Tax.*,LineItem.CostCenterCode ,Date(ReqMast.ReqDate) as ReqDate,POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend,LineItem.AmendedDetails as lineamenddetails,AdvanceAmount, Pay.PaymentTerms as Pay,ROUND((Quantity *Rate),2 ) as BasicValue,HSNCODE,sup.EmailAddress,sup.SupplierID,sup.PAN,sup.ContactNumber,sup.GSTNO
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo
|
||||
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
@ -1651,7 +1651,7 @@ left join T_Employee_Details emp on Req.Requestedby = emp.EmpID
|
||||
function GetCapitalPurchaseOrderDetailsForPDF($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery = 'SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.AmendedDetails as lineamd,ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,
|
||||
$subQuery = 'SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.AmendedDetails as lineamd,LineItem.AmendedDetails as lineamenddetails,ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,
|
||||
Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,
|
||||
LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.SupplierID,sup.Address,sup.ContactNumber,sup.EmailAddress,sup.PAN,sup.GSTNO,Payment.PaymentID,Payment.PaymentTerms,AdvanceAmount,HSNCODE
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
|
||||
@ -7,7 +7,6 @@ $SupId = '';
|
||||
$SupName = '';
|
||||
$Address = '';
|
||||
$PODate = '';
|
||||
$VaildUpto = '';
|
||||
$DeliveryAddress = '';
|
||||
$PONOStatus = '';
|
||||
$PONO = '';
|
||||
@ -83,13 +82,11 @@ if (!empty($POMaster)) {
|
||||
$DescriptionOfPo = $Req->Description_Of_Service;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
$Vdt = isset($Req->VaildUpto) ? $Req->VaildUpto : null;
|
||||
if ($Vdt !== null && $Vdt !== "0000-00-00 00:00:00") {
|
||||
$IsOpenOrder = isset($Req->IsOpenOrder) ? $Req->IsOpenOrder : null;
|
||||
if ($IsOpenOrder !== null && $IsOpenOrder !== "") {
|
||||
$isChecked = true;
|
||||
$VaildUptodt = format_date($Req->VaildUpto,0,'d-m-Y');
|
||||
} else {
|
||||
$isChecked = false;
|
||||
$VaildUptodt = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -139,16 +136,33 @@ if (!empty($getlogpodtl)) {
|
||||
<script src="<?php echo base_url(); ?>public/assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var isChecked = <?php echo $isChecked; ?>;
|
||||
isChecked ? $('#VaildUptodiv').show() : $('#VaildUptodiv').hide();
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
$("#VaildUpto").datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-1:+1', // Adjust as needed
|
||||
minDate: PODate
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
$("#VaildUpto").datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-1:+1', // Adjust as needed
|
||||
minDate: PODate
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$("#PODate").on("change", function() {
|
||||
var minDate = $(this).datepicker("getDate");
|
||||
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
|
||||
$("#VaildUpto").datepicker("option", "minDate", minDate);
|
||||
$("#VaildUpto").datepicker("option", "maxDate", maxDate);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#PODate").on("change", function() {
|
||||
@ -1126,15 +1140,7 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" id="VaildUptodiv" style="display:none;">
|
||||
<label>Valid upto <span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VaildUpto', 'value' => set_value('VaildUpto', $VaildUptodt), 'id' => 'VaildUpto', 'class' => 'form-control', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1149,17 +1155,22 @@ if (!empty($getlogpodtl)) {
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div style="padding-right:10px">
|
||||
<div align="right">
|
||||
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == PO_APPROVED || $PONOStatus == REQITEM_Emergency_PO_CREATED) : ?>
|
||||
<?php if($PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<div align="right">
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == PO_APPROVED || $PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<div class="col-md-12">
|
||||
<?php if($PONOStatus == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:5px">
|
||||
<input type="checkbox" id="openOrderFormat" name="openOrderFormat" value="1" <?php echo $isChecked ? 'checked' : ''; ?>> IS THIS OPEN ORDER FORMAT
|
||||
</div>
|
||||
<?php } ?>
|
||||
<a data-toggle="modal"><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
|
||||
|
||||
<?php endif; ?>
|
||||
<div class="col-md-1" align="right">
|
||||
<?php }else{ ?>
|
||||
<div class="col-md-12" align="right">
|
||||
<?php } ?>
|
||||
<a data-toggle="modal"><button type="submit" onclick="myFunction();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- Model for servicepo -->
|
||||
<div class="modal fade" id="SERVICE" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@ -2233,7 +2244,7 @@ if (!empty($getlogpodtl)) {
|
||||
<label>Description Of Service <span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'editdescofpo', 'value' => set_value('editdescofpo', $DescriptionOfPo), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
||||
$data = array('name' => 'editdescofpo', 'value' => set_value('editdescofpo', strip_tags($DescriptionOfPo)), 'id' => 'editdescofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
@ -2242,7 +2253,8 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="col-md-12" style="padding: 0px;">
|
||||
<div class="col-md-12">
|
||||
<label>Scope Of Work</label> <?php
|
||||
$data = array('name' => 'ScopeofWork', 'value' => set_value('ScopeofWork', $ServiceDescription), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40');
|
||||
|
||||
$data = array('name' => 'ScopeofWork', 'value' => set_value('ScopeofWork', strip_tags($ServiceDescription)), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40');
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
@ -2463,18 +2475,19 @@ if (!empty($getlogpodtl)) {
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == REQITEM_Emergency_PO_CREATED) {
|
||||
if ($PONOStatus == PO_DRAFT) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Draft</span></a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Approve</span></a>
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED) {
|
||||
if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a> <?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php } else if ($PONOStatus == SPECIAL_PO) { ?>
|
||||
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(3)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(3)"> <span class="bold">Submit</span></a>
|
||||
<?php } else { ?>
|
||||
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -2484,8 +2497,8 @@ if (!empty($getlogpodtl)) {
|
||||
<label>Request By : </label><?php echo $RequesterName; ?><br />
|
||||
<?php
|
||||
} ?>
|
||||
<!-- <label>Status : </label><?php //echo $StatusName; ?> -->
|
||||
<label>Status : </label><?php
|
||||
<label>Status : </label><?php echo $StatusName; ?>
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -2502,7 +2515,7 @@ if (!empty($getlogpodtl)) {
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
?> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3133,13 +3146,13 @@ if (!empty($getlogpodtl)) {
|
||||
if (status == '0') {
|
||||
stat = '<?php echo PO_DRAFT; ?>';
|
||||
} else if (status == '1') {
|
||||
// stat = '<?php // echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
} else if (status == '2') {
|
||||
// stat = '<?php // echo PO_AWAITING_RELEASE; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_AWAITING_RELEASE; ?>';
|
||||
} else if (status == '3') {
|
||||
stat = '<?php echo SPECIAL_PO; ?>';
|
||||
} else if (status == '4'){
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
@ -3808,18 +3821,16 @@ if (!empty($getlogpodtl)) {
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#openOrderFormat').change(function() {
|
||||
$('#IsOpenOrder').change(function() {
|
||||
if (this.checked) {
|
||||
$('#ServiceQuantity').val(0);
|
||||
$('#ServiceQuantity').removeAttr('required');
|
||||
$('#ServiceQuantity').attr('readonly', true);
|
||||
$('#VaildUptodiv').show();
|
||||
} else {
|
||||
$('#ServiceQuantity').val('');
|
||||
$('#ServiceQuantity').removeAttr('readonly');
|
||||
$('#ServiceQuantity').attr('required', true);
|
||||
|
||||
$('#VaildUptodiv').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -6,6 +6,8 @@ $ReqType = '';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$CurrentDateNextYear = $dt->modify('+1 year')->format('d-m-Y');
|
||||
|
||||
$MaxPoDate = '';
|
||||
if (!empty($MaxPODate)) {
|
||||
foreach ($MaxPODate as $date) {
|
||||
@ -205,26 +207,10 @@ if (!empty($INRSYMBOL)) {
|
||||
yearRange: '0:+10'
|
||||
});
|
||||
|
||||
$("#VaildUpto").datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-1:+1', // Adjust as needed
|
||||
minDate: 0 // Set minDate to today
|
||||
});
|
||||
|
||||
var SelectedMaterialList = {
|
||||
Mat: []
|
||||
};
|
||||
|
||||
// Set minDate of VaildUpto field based on dateofbirth field
|
||||
$("#PODate").on("change", function() {
|
||||
var minDate = $(this).datepicker("getDate");
|
||||
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
|
||||
$("#VaildUpto").datepicker("option", "minDate", minDate);
|
||||
$("#VaildUpto").datepicker("option", "maxDate", maxDate);
|
||||
});
|
||||
|
||||
/* $('#drpSupplier').change(function() {
|
||||
|
||||
var id = $('#drpSupplier').val();
|
||||
@ -1832,8 +1818,9 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
|
||||
function showsubmit() {
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
// alert("isChecked: " + isChecked);
|
||||
var PO = $('#POType').val();
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
|
||||
if (isChecked) {
|
||||
if (PO == 'REVENUE') {
|
||||
@ -1858,7 +1845,7 @@ if (!empty($INRSYMBOL)) {
|
||||
var getLocal = document.getElementById('Local').value;
|
||||
StateTaxCheck = $("input:radio[name='Range']:checked").val();
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
// $('#txtPoRange').val(StateTaxCheck) ;
|
||||
//alert('Radio clicke:'+StateTaxCheck);
|
||||
|
||||
@ -1888,11 +1875,7 @@ if (!empty($INRSYMBOL)) {
|
||||
$('#Scheduleby').focus();
|
||||
return false;
|
||||
|
||||
} else if (isChecked && $('#VaildUpto').val() === '') {
|
||||
alert('Please select the valid date');
|
||||
$('#VaildUpto').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$("#" + input).modal('show');
|
||||
$('#isEdit').val(0);
|
||||
@ -2509,15 +2492,6 @@ if (!empty($INRSYMBOL)) {
|
||||
echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType"', 'required="true"', 'class="form-control select2');
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-2" id="VaildUptodiv" style="display:none;">
|
||||
<label>Valid upto <span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VaildUpto', 'value' => set_value('VaildUpto', ''), 'id' => 'VaildUpto', 'class' => 'form-control', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--End new fields 1 sep-->
|
||||
|
||||
@ -2528,7 +2502,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:10px">
|
||||
<input type="checkbox" id="openOrderFormat" name="openOrderFormat" value="1"> IS THIS OPEN ORDER FORMAT
|
||||
<input type="checkbox" id="IsOpenOrder" name="IsOpenOrder" value="1"> IS THIS OPEN ORDER FORMAT
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<a data-toggle="modal" onclick="showmodel();" class=" btn btn-success"> Select Line Item </a>
|
||||
@ -5723,7 +5697,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
function clearRevenueModalFields() {
|
||||
// To reset the Modal controls
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
isChecked ? $('#Quantity').val(0).prop('readonly', true).prop('required', false)
|
||||
: $('#Quantity').val('').prop('readonly', false).prop('required', true);
|
||||
|
||||
@ -6524,7 +6498,7 @@ if (!empty($INRSYMBOL)) {
|
||||
* validate fields when clicking add service button
|
||||
*/
|
||||
function validateServiceTax() {
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
|
||||
if ($('#ServiceMaterialCode').val() == "0") {
|
||||
alert('Please select the Material Code');
|
||||
@ -6550,10 +6524,6 @@ if (!empty($INRSYMBOL)) {
|
||||
alert('Please Enter the Service Description');
|
||||
$('#txtSpcialInstructionSingle').focus();
|
||||
return false;
|
||||
} else if (isChecked && $('#VaildUpto').val() === '') {
|
||||
alert('Please select the valid date');
|
||||
$('#VaildUpto').focus();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
@ -6611,7 +6581,7 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
// To reset the Modal controls
|
||||
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
isChecked ? $('#ServiceQuantity').val(0).prop('readonly', true).prop('required', false) : $('#ServiceQuantity').val('').prop('readonly', false).prop('required', true);
|
||||
|
||||
$('#ServiceMaterialCode').val("0");
|
||||
@ -6874,7 +6844,7 @@ $('#content').loader('hide');
|
||||
* This function is used for validate while update
|
||||
*/
|
||||
function validateEditServiceTax() {
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
|
||||
if ($('#EditQuantity').val() == '') {
|
||||
alert('Please Enter the Quantity value');
|
||||
@ -6896,10 +6866,6 @@ $('#content').loader('hide');
|
||||
alert('Please Enter the Service Description');
|
||||
$('#EdittxtSpcialInstructionSingle').focus();
|
||||
return false;
|
||||
} else if (isChecked && $('#VaildUpto').val() === '') {
|
||||
alert('Please select the valid date');
|
||||
$('#VaildUpto').focus();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
@ -7549,13 +7515,7 @@ $('#content').loader('hide');
|
||||
|
||||
function validateAddRevenueTax()
|
||||
{
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
if (isChecked && $('#VaildUpto').val() === '') {
|
||||
alert('Please select the valid date');
|
||||
$('#VaildUpto').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
if($('#ReqNo').val() == "0")
|
||||
{
|
||||
alert('Please select the Requisition Number');
|
||||
@ -7604,7 +7564,7 @@ $('#content').loader('hide');
|
||||
}
|
||||
}
|
||||
function validateEditRevenueTax() {
|
||||
var isChecked = $('#openOrderFormat').is(':checked');
|
||||
var isChecked = $('#IsOpenOrder').is(':checked');
|
||||
|
||||
if ($('#EditRevenueCostCenter').val() == "0") {
|
||||
alert('Please select the Cost center');
|
||||
@ -7626,11 +7586,7 @@ $('#content').loader('hide');
|
||||
alert('Please Enter the Rate of the Item');
|
||||
$('#EditRevenueRate').focus();
|
||||
return false;
|
||||
} else if (isChecked && $('#VaildUpto').val() === '') {
|
||||
alert('Please select the valid date');
|
||||
$('#VaildUpto').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// else if($('#EditRevenueRate').val() == 0)
|
||||
// {
|
||||
// alert('Please Enter the Valid Rate of the Item');
|
||||
@ -8606,11 +8562,11 @@ $('#content').loader('hide');
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#openOrderFormat').change(function() {
|
||||
$('#IsOpenOrder').change(function() {
|
||||
var input = document.getElementById('purpose').value;
|
||||
|
||||
// alert("openOrderFormat");
|
||||
// alert("IsOpenOrder");
|
||||
if (this.checked) {
|
||||
|
||||
if (input == 'REVENUE') {
|
||||
$('#Quantity').val(0);
|
||||
$('#Quantity').removeAttr('required');
|
||||
@ -8622,7 +8578,6 @@ $('#content').loader('hide');
|
||||
$('#ServiceQuantity').removeAttr('required');
|
||||
$('#ServiceQuantity').attr('readonly', true);
|
||||
}
|
||||
$('#VaildUptodiv').show();
|
||||
} else {
|
||||
if (input == 'REVENUE') {
|
||||
$('#Quantity').val('');
|
||||
@ -8634,7 +8589,6 @@ $('#content').loader('hide');
|
||||
$('#ServiceQuantity').removeAttr('readonly');
|
||||
$('#ServiceQuantity').attr('required', true);
|
||||
}
|
||||
$('#VaildUptodiv').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -4711,8 +4711,8 @@ if(status == '0')
|
||||
}
|
||||
else
|
||||
{
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
// stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
|
||||
@ -2308,8 +2308,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
$UpdatedOn=$UpdatedOn->format('d-m-Y');?>
|
||||
<label>Request On :</label><?php echo $UpdatedOn;?><br/>
|
||||
<label>Request By :</label><?php echo $requestedBy;?><br/>
|
||||
<!-- <label>Status :</label><?php // echo $PoStatusName;?> -->
|
||||
<label>Status : </label><?php
|
||||
<label>Status :</label><?php echo $PoStatusName;?>
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -2327,7 +2327,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
|
||||
-->
|
||||
<br/>
|
||||
|
||||
</div>
|
||||
|
||||
@ -3912,6 +3912,7 @@ $("#PaymentMethod").select2();
|
||||
}?>
|
||||
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
|
||||
<?php }
|
||||
@ -3956,8 +3957,8 @@ $("#PaymentMethod").select2();
|
||||
|
||||
<label>Request On :</label><?php echo $UpdatedOn;?><br/>
|
||||
<label>Request By :</label><?php echo $requestedBy;?><br/>
|
||||
<!-- <label>Status :</label><?php // echo $PoStatusName;?> -->
|
||||
<label>Status : </label><?php
|
||||
<label>Status :</label><?php echo $PoStatusName;?>
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -3974,7 +3975,7 @@ $("#PaymentMethod").select2();
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
?> -->
|
||||
|
||||
</div>
|
||||
|
||||
@ -6302,11 +6303,12 @@ if(status == '0')
|
||||
else if(status == '2'){
|
||||
stat = '<?php echo $POStatus; ?>';
|
||||
}
|
||||
|
||||
else if(status == '4'){
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
}
|
||||
var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||
tinyMCE.triggerSave();
|
||||
|
||||
@ -1940,8 +1940,8 @@ echo form_textarea($data);
|
||||
|
||||
<label>Request On :</label><?php echo $Reqon;?><br/>
|
||||
<label>Request By :</label><?php echo $RequesterName;?><br/>
|
||||
<!-- <label>Status :</label><?php echo $StatusName;?> -->
|
||||
<label>Status : </label><?php
|
||||
<label>Status :</label><?php echo $StatusName;?>
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -1958,7 +1958,7 @@ echo form_textarea($data);
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
?> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -78,13 +78,11 @@ if (!empty($POMaster)) {
|
||||
|
||||
|
||||
|
||||
$Vdt = isset($Req->VaildUpto) ? $Req->VaildUpto : null;
|
||||
if ($Vdt !== null && $Vdt !== "0000-00-00 00:00:00") {
|
||||
$IsOpenOrder = isset($Req->IsOpenOrder) ? $Req->IsOpenOrder : null;
|
||||
if ($IsOpenOrder !== null && $IsOpenOrder !== "0000-00-00 00:00:00") {
|
||||
$isChecked = true;
|
||||
$VaildUptodt = format_date($Req->VaildUpto,0,'d-m-Y');
|
||||
} else {
|
||||
$isChecked = false;
|
||||
$VaildUptodt = null;
|
||||
}
|
||||
|
||||
$DeliveryAddress = $Req->DeliveryAddress;
|
||||
@ -202,27 +200,9 @@ if (!empty($getlogpodtl)) {
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var isChecked = <?php echo $isChecked; ?>;
|
||||
isChecked ? $('#VaildUptodiv').show() : $('#VaildUptodiv').hide();
|
||||
var PODate = '<?php echo $PODate; ?>';
|
||||
$("#VaildUpto").datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-1:+1', // Adjust as needed
|
||||
minDate: PODate
|
||||
});
|
||||
});
|
||||
$("#PODate").on("change", function() {
|
||||
var minDate = $(this).datepicker("getDate");
|
||||
var maxDate = new Date(minDate.getFullYear() + 1, minDate.getMonth(), minDate.getDate());
|
||||
$("#VaildUpto").datepicker("option", "minDate", minDate);
|
||||
$("#VaildUpto").datepicker("option", "maxDate", maxDate);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = <?php echo json_encode($DeliverSchedule); ?>;
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
@ -2170,15 +2150,7 @@ if (!empty($getlogpodtl)) {
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" id="VaildUptodiv" style="display:none;">
|
||||
<label>Valid upto <span class="badge" style="color:red;text-align:right;background-color: #fff ;">*</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VaildUpto', 'value' => set_value('VaildUpto', $VaildUptodt), 'id' => 'VaildUpto', 'class' => 'form-control', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2377,12 +2349,12 @@ if (!empty($getlogpodtl)) {
|
||||
<div class="col-md-3 col-md-offset-7" align="right" style="padding:5px">
|
||||
<input type="checkbox" id="openOrderFormat" name="openOrderFormat" value="1" <?php echo $isChecked ? 'checked' : ''; ?>> IS THIS OPEN ORDER FORMAT
|
||||
</div>
|
||||
<div class="col-md-1" align="right">
|
||||
<div class="col-md-1" align="right">
|
||||
<?php }else{ ?>
|
||||
<div class="col-md-12" align="right">
|
||||
<div class="col-md-12" align="right">
|
||||
<?php } ?>
|
||||
<a data-toggle="modal" onclick="showmodel();" class=" btn btn-success"> Select Line Item </a>
|
||||
</div>
|
||||
<a data-toggle="modal" onclick="showmodel();" class=" btn btn-success"> Select Line Item </a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
@ -3989,14 +3961,15 @@ if (!empty($getlogpodtl)) {
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
<?php if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED) {
|
||||
if ($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a> <?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php } else if ($PONOStatus == SPECIAL_PO) { ?>
|
||||
<a class="btn btn-success" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
<?php } else { ?>
|
||||
|
||||
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
<a class="btn btn-success" ID="OK" href="<?php echo base_url() . 'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
@ -4008,7 +3981,9 @@ if (!empty($getlogpodtl)) {
|
||||
<label>Request By : </label><?php echo $RequesterName; ?><br />
|
||||
<?php
|
||||
} ?>
|
||||
<label>Status : </label><?php
|
||||
<label>Status : </label><?php echo $StatusName; ?>
|
||||
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -4025,7 +4000,7 @@ if (!empty($getlogpodtl)) {
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
?> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -4795,8 +4770,8 @@ if (!empty($getlogpodtl)) {
|
||||
stat = '<?php echo PO_DRAFT; ?>';
|
||||
} else if (status == '1') {
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
// stat = '<?php echo PO_RELEASED; ?>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
stat = '<?php echo $PONOStatus; ?>';
|
||||
}
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
@ -5501,12 +5476,10 @@ if (!empty($getlogpodtl)) {
|
||||
$('#Quantity').val(0);
|
||||
$('#Quantity').removeAttr('required');
|
||||
$('#Quantity').attr('readonly', true);
|
||||
$('#VaildUptodiv').show();
|
||||
} else {
|
||||
$('#Quantity').val('');
|
||||
$('#Quantity').removeAttr('readonly');
|
||||
$('#Quantity').attr('required', true);
|
||||
$('#VaildUptodiv').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -1601,8 +1601,8 @@ foreach ($PaymentTerms as $TER) {
|
||||
$Reqon = $Reqon->format('d-m-Y'); ?>
|
||||
<label>Request On :</label><?php echo $Reqon; ?><br />
|
||||
<label>Request By :</label><?php echo $RequesterName; ?><br />
|
||||
<!-- <label>Status :</label><?php //echo $StatusName; ?> -->
|
||||
<label>Status : </label><?php
|
||||
<label>Status :</label><?php echo $StatusName; ?>
|
||||
<!-- <label>Status : </label><?php
|
||||
$statusMappings = [
|
||||
'PO APPROVED' => 'AWAITING APPROVE',
|
||||
'AWAITING RELEASE' => 'AWAITING APPROVE',
|
||||
@ -1619,7 +1619,7 @@ foreach ($PaymentTerms as $TER) {
|
||||
} else {
|
||||
echo "Status not provided";
|
||||
}
|
||||
?>
|
||||
?> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -2158,8 +2158,8 @@ foreach ($PaymentTerms as $TER) {
|
||||
<script>
|
||||
function Save() {
|
||||
//alert("worked");
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
// stat = '<?php echo PO_RELEASED; ?>';
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#ScopeofWork').val();
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
|
||||
@ -3175,6 +3175,8 @@ echo form_textarea($data);
|
||||
if($PONOStatus == PO_DRAFT){?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(4)" > <span class="bold">Release</span></a>
|
||||
|
||||
<!-- <input type="reset" class="btn btn-success" value="Reset"> -->
|
||||
<a class="btn btn-success Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php }else {?>
|
||||
@ -5886,13 +5888,11 @@ if(status == '0')
|
||||
}
|
||||
else if(status=='1')
|
||||
{
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
}
|
||||
|
||||
else
|
||||
else if(status=='4')
|
||||
{
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
|
||||
$('#txtStatus').val(stat);
|
||||
|
||||
@ -286,7 +286,7 @@ if (!empty($ReqPOType)) {
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20');
|
||||
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -366,7 +366,7 @@ if (!empty($ReqPOType)) {
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20');
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20' , 'min' => '1');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -451,15 +451,16 @@ if (!empty($ReqPOType)) {
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount; ?>" />
|
||||
<?php if ($Status == REQ_DRAFT) { ?>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Draft</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(1)"> <span class="bold">Approve</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<a class="btn btn-primary submit" ID="submit" onclick="Save(1)"> <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(2)"> <span class="bold">Update & Approve</span></a>
|
||||
|
||||
<input type="reset" class="btn btn-success">
|
||||
<?php } else if ($Status == REQ_PENDING_APPROVAL) { ?>
|
||||
<!--<a class="btn btn-success" ID="update" onclick="update()" > <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success" href="<?php echo base_url(); ?>Requisition" ID="cancel"> <span class="bold">Cancel</span></a> -->
|
||||
<a class="btn btn-success Save" ID="submit" onclick="Save(1)"> <span class="bold">Update & Approve</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(2)"> <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success Save" ID="submit" onclick="Save(1)"> <span class="bold">Update</span></a>
|
||||
<a class="btn btn-success submit" ID="submit" onclick="Save(2)"> <span class="bold">Update & Approve</span></a>
|
||||
<input type="reset" class="btn btn-success">
|
||||
<?php } ?>
|
||||
|
||||
@ -677,10 +678,10 @@ if (!empty($ReqPOType)) {
|
||||
stat = '<?php echo REQ_DRAFT; ?>';
|
||||
}
|
||||
if (status == '1') {
|
||||
stat = '<?php echo REQ_APPROVED; ?>'
|
||||
stat = '<?php echo REQ_PENDING_APPROVAL; ?>';
|
||||
}
|
||||
if (status == '2') {
|
||||
stat = '<?php echo REQ_PENDING_APPROVAL; ?>';
|
||||
stat = '<?php echo REQ_APPROVED; ?>'
|
||||
}
|
||||
//alert($('#MaterialCode4').val());
|
||||
|
||||
@ -827,11 +828,15 @@ if (!empty($ReqPOType)) {
|
||||
if ($("#drpMaterial option:selected").val() == '-1') {
|
||||
alert('Please Select the MaterialCode ');
|
||||
}
|
||||
|
||||
if (document.getElementById('Quantity').value == '') {
|
||||
var qty = parseInt(document.getElementById('Quantity').value);
|
||||
if (isNaN(qty) || qty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
|
||||
return false;
|
||||
}
|
||||
// if (document.getElementById('Quantity').value == '') {
|
||||
// alert('Please Enter the Quantity');
|
||||
|
||||
// }
|
||||
|
||||
if ($("#drpMaterial option:selected").val() != '-1' && $('#Quantity').val() != '') {
|
||||
var temp = parseInt(index) + 1;
|
||||
@ -979,10 +984,14 @@ if (!empty($ReqPOType)) {
|
||||
});
|
||||
|
||||
$('.EditClick').click(function() {
|
||||
|
||||
if (document.getElementById('EditQuantity').value == '') {
|
||||
var editqty = parseInt(document.getElementById('EditQuantity').value);
|
||||
if (isNaN(editqty) || editqty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
return false;
|
||||
}
|
||||
// if (document.getElementById('EditQuantity').value == '') {
|
||||
// alert('Please Enter the Quantity');
|
||||
// }
|
||||
|
||||
if ($('#EditQuantity').val() != '') {
|
||||
|
||||
|
||||
@ -2013,8 +2013,8 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" />
|
||||
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Draft</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Approve</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<input type="reset" class="btn btn-success" value="Reset" onclick="window.location.reload()">
|
||||
|
||||
</div>
|
||||
@ -4292,8 +4292,8 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
|
||||
if (status == '0') {
|
||||
stat = '<?php echo PO_DRAFT; ?>';
|
||||
} else {
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
// stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
|
||||
$('#txtStatus').val(stat);
|
||||
|
||||
1032
app/Views/po_pdf.php
1032
app/Views/po_pdf.php
File diff suppressed because it is too large
Load Diff
@ -3201,8 +3201,8 @@ if (!empty($INRSYMBOL)) {
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<input type="hidden" name="Budget" id="Budget" />
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Draft</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Approve</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" onclick="Reset();"> <span class="bold">Reset</span></a>
|
||||
|
||||
|
||||
@ -3271,7 +3271,7 @@ if (!empty($INRSYMBOL)) {
|
||||
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
alert("**");
|
||||
// alert("**");
|
||||
$('#isEdit').val(1);
|
||||
//alert(userid);
|
||||
var tr = document.getElementById(userid);
|
||||
@ -3378,7 +3378,7 @@ if (!empty($INRSYMBOL)) {
|
||||
$('.AddRevenue').click(function() {
|
||||
tinyMCE.triggerSave();
|
||||
if (validateRevenueTax() && ExceedQuantityCheck()) {
|
||||
console.log(index);
|
||||
// console.log(index);
|
||||
var temp = index;
|
||||
var Reqnumber = $('#ReqNo').val();
|
||||
var departmentName = $('#deptName').val();
|
||||
@ -3868,8 +3868,7 @@ if (!empty($INRSYMBOL)) {
|
||||
if (status == '0') {
|
||||
stat = '<?php echo PO_DRAFT; ?>';
|
||||
} else {
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
}
|
||||
|
||||
$('#txtStatus').val(stat);
|
||||
@ -4170,4 +4169,4 @@ if (!empty($INRSYMBOL)) {
|
||||
location.reload();
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@ -239,7 +239,7 @@ if (!empty($Emp)) {
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20');
|
||||
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'min' => '1','maxlength' => '20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -315,7 +315,7 @@ if (!empty($Emp)) {
|
||||
<label>Quantity</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)', 'maxlength' => '20');
|
||||
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event)','min' => '1', 'maxlength' => '20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -358,7 +358,7 @@ if (!empty($Emp)) {
|
||||
<div align="right" style="padding-right:10px">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save()"> <span class="bold">Draft</span></a> -->
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save()"> <span class="bold">Save</span></a>
|
||||
<input type="submit" value="Approved" class="btn btn-success">
|
||||
<input type="reset" value="Reset" class="btn btn-success" onclick="window.location.reload();">
|
||||
|
||||
@ -696,11 +696,10 @@ if (!empty($Emp)) {
|
||||
alert('Please Select the MaterialCode ');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById('Quantity').value == '') {
|
||||
var qty = parseInt(document.getElementById('Quantity').value);
|
||||
if (isNaN(qty) || qty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
if ($("#MaterialCode option:selected").val() != '-1' && $('#Quantity').val() != '') {
|
||||
@ -794,10 +793,12 @@ if (!empty($Emp)) {
|
||||
</script>
|
||||
<script>
|
||||
$('.EditClick').click(function() {
|
||||
|
||||
if (document.getElementById('EditQuantity').value == '') {
|
||||
var editqty = parseInt(document.getElementById('EditQuantity').value);
|
||||
if (isNaN(editqty) || editqty < 1) {
|
||||
alert('Please Enter the Quantity');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ($('#EditQuantity').val() != '') {
|
||||
|
||||
|
||||
@ -1685,8 +1685,8 @@ if (!empty($INRSYMBOL)) {
|
||||
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction">
|
||||
<input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress">
|
||||
<input type="hidden" name="Budget" id="Budget" />
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Draft</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Approve</span></a>
|
||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-success Save" ID="Cancel" onclick="Reset();"> <span class="bold">Reset</span></a>
|
||||
</div><br />
|
||||
</div>
|
||||
@ -2346,8 +2346,8 @@ if (!empty($INRSYMBOL)) {
|
||||
if (status == '0') {
|
||||
stat = '<?php echo PO_DRAFT; ?>';
|
||||
} else {
|
||||
// stat = '<?php echo PO_CREATED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
// stat = '<?php echo PO_RELEASED; ?>';
|
||||
}
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#ScopeOfWork').val();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user