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');
|
||||
@ -313,7 +315,3 @@ $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');
|
||||
|
||||
@ -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);
|
||||
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,8 +136,7 @@ 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',
|
||||
@ -148,6 +144,24 @@ if (!empty($getlogpodtl)) {
|
||||
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);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1150,16 +1156,21 @@ if (!empty($getlogpodtl)) {
|
||||
<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 == 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>
|
||||
<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>
|
||||
|
||||
<?php endif; ?>
|
||||
</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>
|
||||
<?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,10 +1875,6 @@ 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');
|
||||
@ -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,10 +7586,6 @@ $('#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)
|
||||
// {
|
||||
@ -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,26 +200,8 @@ 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); ?>;
|
||||
@ -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>
|
||||
|
||||
@ -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="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>
|
||||
<?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,11 +5888,9 @@ 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; ?>';
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -1,33 +1,117 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
.text-center {text-align: center;}
|
||||
.text-right{text-align:right}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a{color:#375bc8;text-decoration:underline}
|
||||
.text-right {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
body{position:relative;width:100%;height:29.7cm;margin:0 auto;color:#3A3A3A;background:#FFFFFF;font-family:sans-serif;font-size:0.8em}
|
||||
header{padding:0px 0;margin-right:-30px;margin-bottom:0px}
|
||||
footer{color:#878686;width:100%;border-top:2px solid #878686;padding:5px 0}
|
||||
a {
|
||||
color: #375bc8;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
main{padding:0px 0;margin-right:-30px;margin-bottom:0px}
|
||||
body {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 29.7cm;
|
||||
margin: 0 auto;
|
||||
color: #3A3A3A;
|
||||
background: #FFFFFF;
|
||||
font-family: sans-serif;
|
||||
font-size: 0.8em
|
||||
}
|
||||
|
||||
table.item-table{width:100%;border-spacing:0;margin-bottom:0px;font-size:1em}
|
||||
table.item-table tr:nth-child(2n-1) th{background:#ddd}
|
||||
table.item-table th{padding:10px 5px;border-bottom:1px solid #606060;white-space:nowrap;text-align:left}
|
||||
table.item-table th.text-right{text-align:right}
|
||||
table.item-table td{padding:10px 5px;font-size:1em;}
|
||||
header {
|
||||
padding: 0px 0;
|
||||
margin-right: -30px;
|
||||
margin-bottom: 0px
|
||||
}
|
||||
|
||||
#logo{text-align:right;}
|
||||
#invoice-logo{max-width: 14em !important;max-height: 10em !important;margin-bottom: 1em;text-align:right}
|
||||
#client{float:left;width:100%; font-size:1em}
|
||||
#logo img{display: block !important;margin: 60px auto !important;}
|
||||
footer {
|
||||
color: #878686;
|
||||
width: 100%;
|
||||
border-top: 2px solid #878686;
|
||||
padding: 5px 0
|
||||
}
|
||||
|
||||
</style>
|
||||
main {
|
||||
padding: 0em 0;
|
||||
margin-right: -30px;
|
||||
margin-bottom: 0em
|
||||
}
|
||||
|
||||
table.item-table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
margin-bottom: 0em;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
table.item-table tr:nth-child(2n-1) th {
|
||||
background: #ddd
|
||||
}
|
||||
|
||||
table.item-table th {
|
||||
padding: 0.625em 0.3125em;
|
||||
border-bottom: 0.0625em solid #606060;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
table.item-table th.text-right {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
table.item-table td {
|
||||
padding: 0.625em 0.3125em;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
table.item-table tr td,
|
||||
table.item-table tr th {
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
|
||||
.no-border {
|
||||
border-top: none !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
#logo {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#invoice-logo {
|
||||
max-width: 14em !important;
|
||||
max-height: 10em !important;
|
||||
margin-bottom: 1em;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
#client {
|
||||
float: left;
|
||||
width: 100%;
|
||||
font-size: 1em
|
||||
}
|
||||
|
||||
#logo img {
|
||||
display: block !important;
|
||||
margin: 3.75em auto !important;
|
||||
}
|
||||
@media print{
|
||||
/* .GST-table table { page-break-inside: avoid !important;} */
|
||||
/* .item-table { page-break-after: auto !important; } */
|
||||
} </style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
|
||||
@ -47,15 +131,16 @@ $CompanyStateCode = (!empty($CompanyDetails) && !empty($CompanyDetails[0]->State
|
||||
$companyMsme = (!empty($CompanyDetails) && !empty($CompanyDetails[0]->MSME)) ? $CompanyDetails[0]->MSME : "-";
|
||||
$address = preg_replace('/SURVEY\s*:\s*[^,]+,/', '', $CompanyAddress);
|
||||
|
||||
$currencyName = 'INR';
|
||||
$currencyCode = (!empty($CurrencySymbol) && !empty($CurrencySymbol[0]->FontCode2000)) ? $CurrencySymbol[0]->FontCode2000 : "-";
|
||||
$PONO = (!empty($GetPoFormat) && !empty($GetPoFormat[0]->PONO)) ? $GetPoFormat[0]->PONO : "-";
|
||||
$POType = (!empty($POItem) && !empty($POItem[0]->POType)) ? $POItem[0]->POType : "-";
|
||||
|
||||
|
||||
$postatus = (!empty($POItem) && !empty($POItem[0]->Status)) ? $POItem[0]->Status : "-";
|
||||
$SuplierName = (!empty($POItem) && !empty($POItem[0]->SupplierName)) ? $POItem[0]->SupplierName : "-";
|
||||
$SuplierAddress = (!empty($POItem) && !empty($POItem[0]->Address)) ? $POItem[0]->Address : "-";
|
||||
$DeliveryAddress = (!empty($POItem) && !empty($POItem[0]->DeliveryAddress)) ? $POItem[0]->DeliveryAddress : "-";
|
||||
$ServiceDescription = (!empty($POItem) && !empty($POItem[0]->ServiceDescription)) ? $POItem[0]->ServiceDescription : "-";
|
||||
$SplserviceDescription = (!empty($POItem) && !empty($POItem[0]->ServiceDescription)) ? $POItem[0]->ServiceDescription : "-";
|
||||
$supRef = (!empty($POItem) && !empty($POItem[0]->Supplier_Reference)) ? $POItem[0]->Supplier_Reference : "-";
|
||||
$supOfferNo = (!empty($POItem) && !empty($POItem[0]->Supplier_Offer_No)) ? $POItem[0]->Supplier_Offer_No : "-";
|
||||
$supplierEmail = (!empty($POItem) && !empty($POItem[0]->EmailAddress)) ? $POItem[0]->EmailAddress : "-";
|
||||
@ -71,13 +156,15 @@ $advance = (!empty($POItem) && !empty($POItem[0]->AdvanceAmount)) ? $POItem[0]->
|
||||
$finCap = (!empty($POItem) && !empty($POItem[0]->Fincap)) ? $POItem[0]->Fincap : "-";
|
||||
$modShp = (!empty($POItem) && !empty($POItem[0]->Mode_Of_Shipment)) ? $POItem[0]->Mode_Of_Shipment : "-";
|
||||
$insNo = (!empty($POItem) && !empty($POItem[0]->InsuranceNumber)) ? $POItem[0]->InsuranceNumber : 'No';
|
||||
$PaymentTerms = (!empty($POItem) && !empty($POItem[0]->PaymentTerms)) ? ($POItem[0]->PaymentTerms == 'Others' ? $POItem[0]->PaymentOtherDescription : $POItem[0]->PaymentTerms ): "-";
|
||||
$PaymentTerms = (!empty($POItem) && !empty($POItem[0]->PaymentTerms)) ? ($POItem[0]->PaymentTerms == 'Others' ? $POItem[0]->PaymentOtherDescription : $POItem[0]->PaymentTerms) : "";
|
||||
$purchaseorderDate = (!empty($POItem) && !empty($POItem[0]->PODate)) ? new DateTime($POItem[0]->PODate, new DateTimeZone('Asia/Kolkata')) : "";
|
||||
$poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-";
|
||||
$VaildUpto = (!empty($POItem) && !empty($POItem[0]->VaildUpto)) ? new DateTime($POItem[0]->VaildUpto, new DateTimeZone('Asia/Kolkata')) : "";
|
||||
$VaildUptoDate = $VaildUpto ? $VaildUpto->format('d-m-Y') : "";
|
||||
|
||||
if (!empty($POItem) && !empty($POItem[0]->DeliveryOption)) {
|
||||
if ($POItem[0]->DeliveryOption == 1) {
|
||||
$DeliverySchedule = $PO->DeliverySchedule;
|
||||
$DeliverySchedule = $POItem[0]->DeliverySchedule;
|
||||
$DeliveryDate = "";
|
||||
} else if ($POItem[0]->DeliveryOption == 0 && !empty($POItem[0]->DeliveryDate)) {
|
||||
$dtDe = new DateTime($POItem[0]->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
@ -103,6 +190,16 @@ $poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-";
|
||||
$invoice_discount_percent = '0.00';
|
||||
$invoice_discount_amount = '0.00';
|
||||
|
||||
$rowCount = count($POItem);
|
||||
$minTableHeightEm = 100;
|
||||
|
||||
if ($rowCount <= 5) {
|
||||
$rowHeightEm = $minTableHeightEm / $rowCount;
|
||||
} else {
|
||||
$rowHeightEm = 100 / 16;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?php $parent_invoice_number = "testing001"; ?>
|
||||
<?php
|
||||
@ -114,82 +211,13 @@ $invoiceTotalAmount=0;
|
||||
$invoiceTotalAmountInWords = '-';
|
||||
|
||||
// For Converting number to words
|
||||
function convertNumber($amt){
|
||||
function convertNumber($amt)
|
||||
{
|
||||
$ShowPaise = '0';
|
||||
$totalAmt = explode(".", $amt);
|
||||
$number = $totalAmt[0];
|
||||
$no = $number;
|
||||
|
||||
if(!empty($totalAmt[1]) && $totalAmt[1]!=0){
|
||||
$point = $totalAmt[1];
|
||||
$ShowPaise='1';
|
||||
}
|
||||
else{
|
||||
$point=0;
|
||||
$ShowPaise='0';
|
||||
}
|
||||
|
||||
|
||||
$hundred = null;
|
||||
$digits_1 = strlen($no);
|
||||
|
||||
$i = 0;
|
||||
$str = array();
|
||||
$words = array('0' => '', '1' => 'One', '2' => 'Two',
|
||||
'3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six',
|
||||
'7' => 'Seven', '8' => 'Eight', '9' => 'Nine',
|
||||
'10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve',
|
||||
'13' => 'Thirteen', '14' => 'Fourteen',
|
||||
'15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen',
|
||||
'18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty',
|
||||
'30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty',
|
||||
'60' => 'Sixty', '70' => 'Seventy',
|
||||
'80' => 'Eighty', '90' => 'Ninety');
|
||||
$digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore');
|
||||
while ($i < $digits_1) {
|
||||
$divider = ($i == 2) ? 10 : 100;
|
||||
$number = floor($no % $divider);
|
||||
$no = floor($no / $divider);
|
||||
$i += ($divider == 10) ? 1 : 2;
|
||||
if ($number) {
|
||||
$plural = (($counter = count($str)) && $number > 9) ? '' : null;
|
||||
$hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
|
||||
$str [] = ($number < 21) ? $words[$number] .
|
||||
" " . $digits[$counter] . $plural . " " . $hundred
|
||||
:
|
||||
$words[floor($number / 10) * 10]
|
||||
. " " . $words[$number % 10] . " "
|
||||
. $digits[$counter] . $plural . " " . $hundred;
|
||||
} else $str[] = null;
|
||||
}
|
||||
$str = array_reverse($str);
|
||||
$result = implode('', $str);
|
||||
|
||||
$points = ($point) ?
|
||||
" " . $words[$point / 10] . " " .
|
||||
$words[$point = $point % 10] : '';
|
||||
|
||||
if($ShowPaise=='0'){
|
||||
|
||||
$amountInWords = "Rupees " . $result." Only";
|
||||
}
|
||||
else{
|
||||
|
||||
$amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
}
|
||||
|
||||
|
||||
return $amountInWords;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
function convertNumbersforextra($amt){
|
||||
$ShowPaise='0';
|
||||
$totalAmt=explode(".",$amt);
|
||||
|
||||
$number = $totalAmt[0];
|
||||
$no = $number;
|
||||
|
||||
if (!empty($totalAmt[1]) && $totalAmt[1] != 0) {
|
||||
$point = $totalAmt[1];
|
||||
$ShowPaise = '1';
|
||||
@ -198,21 +226,24 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
$ShowPaise = '0';
|
||||
}
|
||||
|
||||
|
||||
$hundred = null;
|
||||
$digits_1 = strlen($no);
|
||||
|
||||
$i = 0;
|
||||
$str = array();
|
||||
$words = array('0' => '', '1' => 'One', '2' => 'Two',
|
||||
'3' => 'Three', '4' => 'Four', '5' => 'Five',
|
||||
'6' => 'Six', '7' => 'Seven', '8' => 'Eight',
|
||||
'9' => 'Nine', '10' => 'Ten', '11' => 'Eleven',
|
||||
'12' => 'Twelve', '13' => 'Thirteen', '14' => 'Fourteen',
|
||||
$words = array(
|
||||
'0' => '', '1' => 'One', '2' => 'Two',
|
||||
'3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six',
|
||||
'7' => 'Seven', '8' => 'Eight', '9' => 'Nine',
|
||||
'10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve',
|
||||
'13' => 'Thirteen', '14' => 'Fourteen',
|
||||
'15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen',
|
||||
'18' => 'Eighteen', '19' => 'Nineteen', '20' => 'Twenty',
|
||||
'30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty',
|
||||
'60' => 'Sixty', '70' => 'Seventy',
|
||||
'80' => 'Eighty', '90' => 'Ninety');
|
||||
'80' => 'Eighty', '90' => 'Ninety'
|
||||
);
|
||||
$digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore');
|
||||
while ($i < $digits_1) {
|
||||
$divider = ($i == 2) ? 10 : 100;
|
||||
@ -240,8 +271,7 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
if ($ShowPaise == '0') {
|
||||
|
||||
$amountInWords = "Rupees " . $result . " Only";
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
|
||||
$amountInWords = "Rupees " . $result . " Paise " . $points . " Only";
|
||||
}
|
||||
@ -249,9 +279,16 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
|
||||
return $amountInWords;
|
||||
}
|
||||
|
||||
?>
|
||||
<header class="clearfix">
|
||||
<table width="100%" class="text-center"><tr><td><b><h1><?= $pdftitle; ?></h1></b> </td></tr></table>
|
||||
<table width="100%" class="text-center">
|
||||
<tr>
|
||||
<td><b>
|
||||
<h1><?= $pdftitle; ?></h1>
|
||||
</b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="text-align: right;"><small>RI/PUR/R 02</small></div>
|
||||
<table border="1" style="border-collapse: collapse;" width="100%">
|
||||
<tr>
|
||||
@ -259,7 +296,7 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
<div id="logo"><?php echo invoice_logo_pdf(); ?></div>
|
||||
</td>
|
||||
<td rowspan="5" style="border-left: none; border-right: none;" width="50%">
|
||||
<p style="font-size:16px;"><b><?php _htmlsc($CompanyName); ?></b></p>
|
||||
<p style="font-size:1em;"><b><?php _htmlsc($CompanyName); ?></b></p>
|
||||
|
||||
<?php if ($CompanyAddress) {
|
||||
echo '<div>' . htmlsc($CompanyAddress) . ' ' . '</div>';
|
||||
@ -286,16 +323,20 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
if ($companyPan !== '' && $companyPan !== '-') {
|
||||
echo '<div><b>' . trans('PAN') . '</b> : ' . htmlsc($companyPan) . '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</td>
|
||||
<td colspan="2" style="border-left: none;">
|
||||
<td colspan="2" style="border-left: none; text-align: center; vertical-align: middle;">
|
||||
<?php if ($postatus == PO_DRAFT) { ?>
|
||||
<p style="font-size:0.8em; text-align : right"><b><?php _htmlsc("DRAFT"); ?></b></p> <?php } ?>
|
||||
<p style="font-size:1.2em;"><b><?php _htmlsc("DRAFT"); ?></b></p>
|
||||
<?php } ?>
|
||||
<?php if ($VaildUptoDate) { ?>
|
||||
<p style="font-size:1.2em;"><b><?php _htmlsc("OPEN ORDER"); ?></b></p>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
@ -307,176 +348,221 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
<td width="50%">
|
||||
<table border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Purchase Order No'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo htmlsc($PONO); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Purchase Order No'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo htmlsc($PONO); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Purchase Order Date'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; $poDate; ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Purchase Order Date'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo $poDate; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Supplier`s Offer No'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($supOfferNo); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Supplier`s Offer No'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($supOfferNo); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Our Reference'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($ourRef); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Our Reference'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($ourRef); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Delivery/Schedule By'); ?></td>
|
||||
<td style="border:0px;"><?php echo (empty($DeliveryDate) && empty($DeliverySchedule) && empty($dispatch)) ? ': -' : ': '.$DeliveryDate . $DeliverySchedule . $dispatch; ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Delivery/Schedule By'); ?></td>
|
||||
<td style="border:0em;"><?php echo (empty($DeliveryDate) && empty($DeliverySchedule) && empty($dispatch)) ? ': -' : ': ' . $DeliveryDate . $DeliverySchedule . $dispatch; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Contact'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($supRef); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Contact'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($supRef); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Email'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($supplierEmail); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Insurance'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($insNo); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Email'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($supplierEmail); ?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<table border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Req Number'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($RequistionNo); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Req Number'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($RequistionNo); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Date of Supply'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo $ReqDate; ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Date of Supply'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo $ReqDate; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('State Code'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($CompanyStateCode); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('State Code'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($CompanyStateCode); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Mode of Shipment'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($modShp); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Mode of Shipment'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($modShp); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Payment Terms'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($PaymentTerms); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Insurance'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($insNo); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Released By'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($releasedBy); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Released By'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($releasedBy); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Released On'); ?></td>
|
||||
<td style="border:0px;"><?php echo ': '; echo _htmlsc($releasedOn); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Released On'); ?></td>
|
||||
<td style="border:0em;"><?php echo ': ';
|
||||
echo _htmlsc($releasedOn); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tablepadding" border="1" style="border-collapse: collapse; font-size: 1em; width: 100%;">
|
||||
<table border="1" style="border-collapse: collapse; font-size: 1em; width: 100%;">
|
||||
<tr style="background: #ddd; border-top: none; border-bottom: none;">
|
||||
<td colspan="3" width="50%"><b>Shipped From</b></td>
|
||||
<td colspan="3" width="50%"><b>Shipped To</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" width="50%">
|
||||
<table id="client" class="tablepadding" border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<table id="client" border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Name'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo '<b>' . htmlsc($SuplierName) . '</b>'; ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Name'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo '<b>' . htmlsc($SuplierName) . '</b>'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px; vertical-align: top;"><?php echo trans('Address'); ?></td>
|
||||
<td style="border:0px; vertical-align: top;" class="text-right">:</td>
|
||||
<td style="border:0px;"><p><?php echo nl2br(htmlsc($SuplierAddress)); ?></p></td>
|
||||
<td style="border:0em; vertical-align: top;"><?php echo trans('Address'); ?></td>
|
||||
<td style="border:0em; vertical-align: top;" class="text-right">:</td>
|
||||
<td style="border:0em;">
|
||||
<p><?php echo nl2br(htmlsc($SuplierAddress)); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('GST'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($supplierGst); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('GST'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($supplierGst); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('MSME'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($supplierMsme); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('MSME'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($supplierMsme); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('PAN'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($supplierPan); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('PAN'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($supplierPan); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Vendor Code'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($supplierVendor); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Vendor Code'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($supplierVendor); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td colspan="3" width="50%">
|
||||
<table id="client" class="tablepadding" border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<table id="client" border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('Name'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo '<b>' . htmlsc($CompanyName) . '</b>'; ?></td>
|
||||
<td style="border:0em;"><?php echo trans('Name'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo '<b>' . htmlsc($CompanyName) . '</b>'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px; vertical-align: top;"><?php echo trans('Address'); ?></td>
|
||||
<td style="border:0px; vertical-align: top;" class="text-right">:</td>
|
||||
<td style="border:0px;"><?php echo nl2br(htmlsc($address)); ?></td>
|
||||
<td style="border:0em; vertical-align: top;"><?php echo trans('Address'); ?></td>
|
||||
<td style="border:0em; vertical-align: top;" class="text-right">:</td>
|
||||
<td style="border:0em;"><?php echo nl2br(htmlsc($address)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('GST'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($companyGst); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('GST'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($companyGst); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('MSME'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($companyMsme); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('MSME'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($companyMsme); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('PAN'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($companyPan); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('PAN'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($companyPan); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0px;"><?php echo trans('State Code'); ?></td>
|
||||
<td class="text-right" style="border:0px;">:</td>
|
||||
<td style="border:0px;"><?php echo htmlsc($CompanyStateCode); ?></td>
|
||||
<td style="border:0em;"><?php echo trans('State Code'); ?></td>
|
||||
<td class="text-right" style="border:0em;">:</td>
|
||||
<td style="border:0em;"><?php echo htmlsc($CompanyStateCode); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="item-table" style="border-collapse: collapse;" border="1" width="100%" style="min-height: 60.25em !important;">
|
||||
<table class="item-table" style="border-collapse: collapse;" border="1" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" class="item-name"><center><?php _trans('S.No'); ?></center></th>
|
||||
<th rowspan="2" colspan="2" class="item-name" style="width: 200px;"><center><?php _trans('Name of Product /'); ?><br/><?php _trans('Service'); ?></center></th>
|
||||
<th rowspan="2" class="item-name"><center><?php _trans('HSN'); ?></center></th>
|
||||
<!-- <th rowspan="2" class="item-amount"><center><?php _trans('UOM'); ?></center></th> -->
|
||||
<th rowspan="2" class="item-amount"><center><?php _trans('Qty'); ?></center></th>
|
||||
<th rowspan="2" class="item-price"><center><?php _trans('Rate'); ?><br/> ₹</center></th>
|
||||
<th rowspan="2" class="item-amount"><center><?php _trans('Total'); ?><br/> ₹</center></th>
|
||||
<th colspan="2" class="item-price"><center><?php _trans('CGST'); ?></center></th>
|
||||
<th colspan="2" class="item-price"><center><?php _trans('SGST'); ?></center></th>
|
||||
<th colspan="2" class="item-price"><center><?php _trans('IGST'); ?></center></th>
|
||||
<th rowspan="2" class="item-total"><center><?php _trans('Total Tax'); ?><br/> ₹</center></th>
|
||||
<th rowspan="2" style="width: 1.5625em; text-align: center; vertical-align: middle;">
|
||||
<center><?php _trans('S.No'); ?></center>
|
||||
</th>
|
||||
<th rowspan="2" colspan="2" style="text-align: center; vertical-align: middle;">
|
||||
<center><?php _trans('Name of Product /'); ?><br /><?php _trans('Service'); ?></center>
|
||||
</th>
|
||||
<th rowspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('HSN'); ?></center>
|
||||
</th>
|
||||
<!-- <th rowspan="2" style="white-space: nowrap;"><center><?php _trans('UOM'); ?></center></th> -->
|
||||
<th rowspan="2" style="width: 3.125em; text-align: center; vertical-align: middle;">
|
||||
<center><?php _trans('Qty'); ?></center>
|
||||
</th>
|
||||
<th rowspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('Rate'); ?><br /> <?php echo $currencyCode; ?></center>
|
||||
</th>
|
||||
<th rowspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('Total'); ?><br /> <?php echo $currencyCode; ?></center>
|
||||
</th>
|
||||
<th colspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('CGST'); ?></center>
|
||||
</th>
|
||||
<th colspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('SGST'); ?></center>
|
||||
</th>
|
||||
<th colspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('IGST'); ?></center>
|
||||
</th>
|
||||
<th rowspan="2" style="white-space: nowrap;">
|
||||
<center><?php _trans('Total Tax'); ?><br /> <?php echo $currencyCode; ?></center>
|
||||
</th>
|
||||
</tr>
|
||||
<tr style="background: #ddd;">
|
||||
<th><center><?php _trans('Rate'); ?><br/><?php _trans('%'); ?></center></th>
|
||||
<th><center><?php _trans('Amount'); ?><br/> ₹</center></th>
|
||||
<th><center><?php _trans('Rate'); ?><br/><?php _trans('%'); ?></center></th>
|
||||
<th><center><?php _trans('Amount'); ?><br/> ₹</center></th>
|
||||
<th><center><?php _trans('Rate'); ?><br/><?php _trans('%'); ?></center></th>
|
||||
<th><center><?php _trans('Amount'); ?><br/> ₹</center></th>
|
||||
<th>
|
||||
<center><?php _trans('Rate'); ?><br /><?php _trans('%'); ?></center>
|
||||
</th>
|
||||
<th>
|
||||
<center><?php _trans('Amount'); ?><br /> <?php echo $currencyCode; ?></center>
|
||||
</th>
|
||||
<th>
|
||||
<center><?php _trans('Rate'); ?><br /><?php _trans('%'); ?></center>
|
||||
</th>
|
||||
<th>
|
||||
<center><?php _trans('Amount'); ?><br /> <?php echo $currencyCode; ?></center>
|
||||
</th>
|
||||
<th>
|
||||
<center><?php _trans('Rate'); ?><br /><?php _trans('%'); ?></center>
|
||||
</th>
|
||||
<th>
|
||||
<center><?php _trans('Amount'); ?><br /> <?php echo $currencyCode; ?></center>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 1;
|
||||
|
||||
$basic = [];
|
||||
$cgst = [];
|
||||
$sgst = [];
|
||||
@ -484,45 +570,85 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
$tax = [];
|
||||
|
||||
if (!empty($POItem)) {
|
||||
//print_r($POItem);die;
|
||||
foreach ($POItem as $item) { ?>
|
||||
<tr>
|
||||
<td class="text-center"><?php echo $i++; ?></td>
|
||||
<td colspan="2" style="width: 200px;" ><?php _htmlsc($item->MaterialCode.' - ') ._htmlsc($item->MaterialName . $item->ServiceMaterialDescription); ?></td>
|
||||
<td class="text-right"><?php echo $item->HSNCODE ?? 'N/A'; ?></td>
|
||||
<td class="text-right"><?php echo number_alignment($item->Quantity); if ($item->UOM) : ?>
|
||||
<small><?php _htmlsc($item->UOM); ?></small>
|
||||
<?php endif; ?></td>
|
||||
<td class="text-right"><?php echo number_alignment($item->Rate); ?></td>
|
||||
<td class="text-right"><?php echo number_alignment(abs($item->BasicValue)); ?></td>
|
||||
<td class="text-right"><?php _htmlsc($item->CGST); ?></td>
|
||||
<td class="text-right"><?php if ($item->AfterCGST != '') {
|
||||
<td class="text-center no-border"><?php echo $i++; ?></td>
|
||||
<td colspan="2" class="no-border" style="width:12.5em">
|
||||
<?php if ($POType == REVENUE) {
|
||||
echo ($item->MaterialCode . ' - ') . ($item->MaterialName . $item->ServiceMaterialDescription);
|
||||
} ?>
|
||||
<?php if ($POType == SERVICE && ($serviceDescription != '')) {
|
||||
echo ($serviceDescription);
|
||||
} ?>
|
||||
</td>
|
||||
<td class="text-right no-border"><?php echo $item->HSNCODE ?? 'N/A'; ?></td>
|
||||
<td class="text-right no-border"><?php if ((int)$item->Quantity > 0) {
|
||||
echo number_alignment($item->Quantity);
|
||||
if ($item->Per) : ?>
|
||||
<small><?php _htmlsc($item->Per); ?></small>
|
||||
<?php endif;
|
||||
} else if ((int)$item->Quantity == 0) {
|
||||
echo "xxx";
|
||||
} ?>
|
||||
</td>
|
||||
<td class="text-right no-border"><?php echo number_alignment($item->Rate); ?></td>
|
||||
<td class="text-right no-border"><?php echo number_alignment(abs($item->BasicValue)); ?></td>
|
||||
<td class="text-right no-border"><?php _htmlsc($item->CGST); ?></td>
|
||||
<td class="text-right no-border"><?php if (isset($item->AfterCGST) && $item->AfterCGST != '') {
|
||||
echo number_alignment(abs($item->AfterCGST));
|
||||
} else {
|
||||
echo '0.00';
|
||||
} ?></td>
|
||||
<td class="text-right"><?php _htmlsc($item->SGST); ?></td>
|
||||
<td class="text-right"><?php if ($item->AfterSGST != '') {
|
||||
<td class="text-right no-border"><?php _htmlsc($item->SGST); ?></td>
|
||||
<td class="text-right no-border"><?php if (isset($item->AfterSGST) && $item->AfterSGST != '') {
|
||||
echo number_alignment(abs($item->AfterSGST));
|
||||
} else {
|
||||
echo '0.00';
|
||||
} ?></td>
|
||||
<td class="text-right"><?php _htmlsc($item->IGST); ?></td>
|
||||
<td class="text-right"><?php if ($item->AfterIGST != '') {
|
||||
<td class="text-right no-border"><?php _htmlsc($item->IGST); ?></td>
|
||||
<td class="text-right no-border"><?php if (isset($item->AfterIGST) && $item->AfterIGST != '') {
|
||||
echo number_alignment(abs($item->AfterIGST));
|
||||
} else {
|
||||
echo '0.00';
|
||||
} ?></td>
|
||||
<td class="text-right"><?php echo number_alignment(abs($item->Taxamount)); ?></td>
|
||||
|
||||
|
||||
<td class="text-right no-border" style="vertical-align: middle;"><?php
|
||||
$totalwithtax = $item->Taxamount + $item->BasicValue;
|
||||
echo number_alignment(abs($totalwithtax));
|
||||
?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$basic[] = $item->BasicValue;
|
||||
$cgst[] = $item->AfterCGST;
|
||||
$sgst[] = $item->AfterSGST;
|
||||
$igst[] = $item->AfterIGST;
|
||||
$tax[] = $item->Taxamount;
|
||||
$cgst[] = isset($item->AfterCGST) ? $item->AfterCGST : 0.00;
|
||||
$sgst[] = isset($item->AfterSGST) ? $item->AfterSGST : 0.00;
|
||||
$igst[] = isset($item->AfterIGST) ? $item->AfterIGST : 0.00;
|
||||
$tax[] = $totalwithtax;
|
||||
$invoiceTotalAmount = round($item->TotalOrderValue);
|
||||
?>
|
||||
<?php }
|
||||
}
|
||||
else {
|
||||
echo "<tr><td colspan='14' class='text-center'>No items available.</td></tr>";
|
||||
} ?>
|
||||
// else {
|
||||
// echo "<tr><td colspan='14' class='text-center'>No items available.</td></tr>";
|
||||
// }
|
||||
$remaining_rows = max(15 - count($POItem), 0);
|
||||
for ($j = 0; $j < $remaining_rows; $j++) { ?>
|
||||
<tr>
|
||||
<td class="text-center no-border"></td>
|
||||
<td colspan="2" style="width:12.5em" class="no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
<td class="text-right no-border"></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
@ -544,52 +670,109 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<table class="tablepadding" border="1" style="border-collapse: collapse; font-size: 1em; width: 100%;">
|
||||
<table class="GST-table" border="1" style="border-collapse: collapse; font-size: 1em; width: 100%; page-break-inside: avoid !important;">
|
||||
<tr>
|
||||
<td colspan="6" style="border-bottom: none;">
|
||||
<p style="text-align: center;"><strong>TOTAL AMOUNT IN WORDS:</strong> </p>
|
||||
<?php
|
||||
$k = 0;
|
||||
if (!empty($POItem)) {
|
||||
foreach ($POItem as $x) {
|
||||
if ($x->ParentPO != '' && isset($record->lineamenddetails) && count($record->lineamenddetails) > 1) {
|
||||
// if ($x->ParentPO != '') {
|
||||
$k++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($k > 0) { ?>
|
||||
<table style="border-collapse: collapse;border-left-style:hidden;border-right-style:hidden;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">
|
||||
<p>Amended Details</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<?php
|
||||
if (!empty($POItem)) {
|
||||
foreach ($POItem as $v) {
|
||||
echo "<b>" . $v->AmendedDetails . "</b>";
|
||||
break;
|
||||
}
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center"><strong>Item Description</strong></td>
|
||||
<td class="text-center" rowspan="2"><strong>Current Details</strong></td>
|
||||
<td class="text-center" rowspan="2"><strong>Revised Details</strong></td>
|
||||
</tr>
|
||||
<?php if (!empty($POItem)) {
|
||||
foreach ($POItem as $record) {
|
||||
echo $record->lineamenddetails ;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align: center;"><strong>Total</strong></td>
|
||||
<td style="text-align: center;" rowspan="2"><b>Current Total Order :<?php echo $AmendmentPDF[0]->partenttotalorder ?></b></td>
|
||||
<td style="text-align: center;" rowspan="2"><b>Revised Total Order :<?php echo $AmendmentPDF[0]->TotalOrderValue ?></b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo "</br>"; } ?>
|
||||
|
||||
<p style="text-align: center; margin: 0;"><strong>TOTAL AMOUNT IN WORDS :</strong> </p>
|
||||
<p style="text-align: center; margin: 0;">
|
||||
<?php
|
||||
$invoiceTotalBasic = array_sum($basic);
|
||||
if($invoiceTotalAmount>0)
|
||||
{
|
||||
if ($invoiceTotalAmount > 0) {
|
||||
$invoiceTotalAmountInWords = convertNumber(abs(round($invoiceTotalAmount)));
|
||||
}
|
||||
echo $invoiceTotalAmountInWords; ?>
|
||||
</p>
|
||||
<?php if($PaymentTerms) { ?>
|
||||
<br>
|
||||
<p style="text-align: left; margin: 0;"><strong>Payment Terms :</strong> <?php echo $PaymentTerms; ?></p>
|
||||
<?php } ?>
|
||||
<br>
|
||||
<p style="text-align: left; margin: 0;"><strong>Special Instructions :</strong> <?php echo $SplserviceDescription; ?></p>
|
||||
</td>
|
||||
</td>
|
||||
<td colspan="9">
|
||||
<table id="client" class="tablepadding" border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<table id="client" border="1" style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td class="text-right" style="border:0px;"><?php _trans('Total Amount Before Tax '); ?></td>
|
||||
<td class="text-right" style="border:0px;">₹</td>
|
||||
<td class="text-right" style="border:0px;"><?php echo number_alignment(abs($invoiceTotalBasic)); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php _trans('Total Amount Before Tax '); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo $currencyCode; ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs($invoiceTotalBasic)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="border:0px;"><?php _trans('CGST '); ?></td>
|
||||
<td class="text-right" style="border:0px;">₹</td>
|
||||
<td class="text-right" style="border:0px;"><?php echo number_alignment(abs(array_sum($cgst))); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php _trans('CGST '); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo $currencyCode; ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs(array_sum($cgst))); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="border:0px;"><?php _trans('SGST '); ?></td>
|
||||
<td class="text-right" style="border:0px;">₹</td>
|
||||
<td class="text-right" style="border:0px;"><?php echo number_alignment(abs(array_sum($sgst))); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php _trans('SGST '); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo $currencyCode; ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs(array_sum($sgst))); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="border:0px;"><?php _trans('IGST '); ?></td>
|
||||
<td class="text-right" style="border:0px;">₹</td>
|
||||
<td class="text-right" style="border:0px;"><?php echo number_alignment(abs(array_sum($igst))); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php _trans('IGST '); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo $currencyCode; ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs(array_sum($igst))); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php $invoiceTotalGST = array_sum($cgst) + array_sum($sgst) + array_sum($igst); ?>
|
||||
<?php $differences = ($invoiceTotalGST + $invoiceTotalBasic) - $invoiceTotalAmount; ?>
|
||||
|
||||
<td class="text-right" style="border:0px;"><?php _trans('Round Off'); ?></td>
|
||||
<td class="text-right" style="border:0px;">₹</td>
|
||||
<td class="text-right" style="border:0px;"><?php echo number_format($differences, 2);?></td>
|
||||
<td class="text-right" style="border:0em;"><?php _trans('Round Off'); ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo $currencyCode; ?></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo number_format($differences, 2); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="border:0px;"><b><?php _trans('Total Amount'); ?></b></td>
|
||||
<td class="text-right" style="border:0px;">₹</td>
|
||||
<td class="text-right" style="border:0px;"><b><?php echo number_alignment(abs($invoiceTotalAmount));?></b></td>
|
||||
<td class="text-right" style="border:0em;"><b><?php _trans('Total Amount'); ?></b></td>
|
||||
<td class="text-right" style="border:0em;"><?php echo $currencyCode; ?></td>
|
||||
<td class="text-right" style="border:0em;"><b><?php echo number_alignment(abs($invoiceTotalAmount)); ?></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@ -602,14 +785,21 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
|
||||
</td>
|
||||
<td style="text-align:center;" colspan="9">
|
||||
<div style="text-align:center;"><?php echo authorized_signatory(); ?></div>
|
||||
<div><h6 style="text-align:center;">Authorized Signatory</h6></div>
|
||||
<div>
|
||||
<h6 style="text-align:center;">Authorized Signatory</h6>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="15" style="text-align:center;">Declaration: We Declare that this invoice shows the actual price of the goods described and that all particulars are true and correct</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" class="text-center"><tr><td><b><small>This is a system generated purchase order</small></b> </td></tr></table>
|
||||
<table width="100%" class="text-center">
|
||||
<tr>
|
||||
<td><b><small>This is a system generated purchase order</small></b> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -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);
|
||||
|
||||
@ -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,11 +793,13 @@ 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() != '') {
|
||||
|
||||
var editMaterialCode = $("#EditMaterialCode").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