From 9f4e1b740f1ca91ca2b5b75846734e86e5ce85c0 Mon Sep 17 00:00:00 2001 From: velz2020 Date: Thu, 17 Aug 2017 21:31:43 +0530 Subject: [PATCH] ALL PO PDF MERGERD --- .../controllers/amendmentpurchaseorder.php | 459 +----------- application/controllers/purchaseorder.php | 363 +--------- application/logs/log-2017-08-17.php | 20 + application/models/purchaseorder_model.php | 94 +-- .../third_party/dompdf/lib/fonts/log.htm | 2 +- application/views/AmendPOlist.php | 2 +- application/views/Amendedimportpopdf.php | 408 ----------- application/views/Amendervicepopdf.php | 387 ---------- application/views/Amendrevenuepopdf.php | 428 ----------- application/views/amendcapitalpopdf.php | 355 --------- application/views/capitalpopdf.php | 419 ++++++----- application/views/importpopdf.php | 222 ++++-- application/views/mrircapitalpopdf.php | 352 --------- application/views/mririmportpopdf.php | 369 ---------- application/views/mrirrevenuepopdf.php | 401 ----------- application/views/mrirservicepopdf.php | 501 ------------- application/views/revenuepopdf.php | 456 +++++++----- application/views/servicepopdf.php | 678 ++++++++---------- application/views/viewmrirforbilling.php | 2 +- 19 files changed, 1011 insertions(+), 4907 deletions(-) create mode 100644 application/logs/log-2017-08-17.php delete mode 100755 application/views/Amendedimportpopdf.php delete mode 100755 application/views/Amendervicepopdf.php delete mode 100755 application/views/Amendrevenuepopdf.php delete mode 100755 application/views/amendcapitalpopdf.php delete mode 100755 application/views/mrircapitalpopdf.php delete mode 100755 application/views/mririmportpopdf.php delete mode 100755 application/views/mrirrevenuepopdf.php delete mode 100755 application/views/mrirservicepopdf.php diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index 5f749f71..c907569a 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -1431,464 +1431,7 @@ function UpdateAmendServicePurchaseOrder() echo 'Purchase Order is'.$PONO.'Amended Successfully! New PO Number is: '.$NewPO ; } -function CreateAmendPOPrint() - { - $PONO = $_GET['PONO']; - $ReqType = $_GET['ReqType']; - - 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 importpoprint($PONO) - { - - //$this->load->view('includes/pdfheader'); - - // Load the pdf page with multiviews - $Requester=''; - $Depcode=''; - $Currencycode=''; - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO); - //print_r($data['POItem']); - //die(); - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - //print_r( $data['releasedetails']); - foreach ($data['POItem'] as $Reqdby) - { - $Requester=$Reqdby->Requestedby; - - } - - foreach ($data['POItem'] as $CURTYPE) - { - $Currencycode=$CURTYPE->CurrencyType; - } - - $data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester); - - foreach ($data['Requestername'] as $ReqDep) - { - $Depcode=$ReqDep->Departmentcode; - } - - $data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode); - //print_r($data['Requestername']); - $data['Currencytype']=$this->purchaseorder_model->GerCurrencyCodeName($Currencycode); - $ProductPrice=''; - $TotalOrderValue = ''; - foreach ($data['POItem'] as $PO ) - { - $TotalOrderValue=$PO->TotalOrderValue; - } - - //$totalAmt=sprintf("%.2f", $ProductPrice); - //$data['TotalAmountInWords']= $this->convertNumber($totalAmt); - //print_r($data['TotalAmountInWords']); - - //$this->load->View("importpopdf", $data); - - - $CurrencyType=''; - if(!empty($data['POItem'])){ - $CurrencyType=$data['POItem'][0]->CurrencyType; - } - //echo $CurrencyType; - - if($CurrencyType=='') - { - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - } - else - { - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); - } - - // $TotalOrderValue=$data['POItem'][0]->$TotalOrderValue; - //print_r($data['POItem'][0]); - - $totalAmt=sprintf("%.2f", $TotalOrderValue); - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - - - - - $SymbolCurrency = ''; - $SymbolCurrencyName =''; - $PaiseVal = ''; - if(!empty($data['CurrencySymbol']) >0) - { - $SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000; - $SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency; - $PaiseVal=$data['CurrencySymbol'][0]->PaiseVal; - } - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - - $totalAmt=sprintf("%.2f", $TotalOrderValue); - - $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal); - - - $this->load->View("Amendedimportpopdf", $data); - - - // Add header to pdf - //s $this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - //$this->dompdf->set_paper(array(0, 0, 841.89, 1190.55), 'landscape'); - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("ImportPOReport.pdf",$data,$php); - -} - - - public function revenuepoprint($PONO) - { - // Load all views as normal - - - - - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForAmendPDF($PONO); - //print_r($data['POItem']); - - //die(); - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - - $Currencycode=''; - - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - - $totalAmt=sprintf("%.2f", $TotalOrderValue); - - // die(); - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - - $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - - // Add header to pdf - //$this->load->view('includes/pdfheader'); - - // Load the pdf page with multiviews - $this->load->View("Amendrevenuepopdf", $data); - - // Add header to pdf - //$this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // // Load library - $this->load->library('dompdf_gen'); - - // // Convert to PDF - $this->dompdf->load_html($php); - - $this->dompdf->render(); - - $data['Attachment'] = FALSE; - - $this->dompdf->stream("Amendrevenuepopdf.pdf",$data,$php); - -} -public function servicepoprint($PONO) - { - - // $this->load->view('includes/pdfheader'); - - // Load the pdf page with multiviews - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderAmendDetailsforPdfprint($PONO); - - - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - - //print_r( $data['CurrencySymbol']); - - $TotalOrderValue=0; - $Currencycode=''; - foreach ($data['POItem'] as $POValue) - { - - $TotalOrderValue=$TotalOrderValue + $POValue->TotalValue; - - - } - - - - $totalAmt=sprintf("%.2f", $TotalOrderValue); - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - - $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - - $this->load->View("Amendervicepopdf", $data); - - // Add header to pdf - //$this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("Amendservicepopdf.pdf",$data,$php); - -} - -public function CapitalPoPrint($PONO) - { - - - - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - //print_r($data['CompanyDetails']); - $data['POItem'] = $this->purchaseorder_model->GetCapitalAmendPurchaseOrderDetailsForprintPDF($PONO); - //print_r($data['POItem']); - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - //print_r($data['releasedetails']); - - $CurrencyType=''; - if(!empty($data['POItem'])){ - $CurrencyType=$data['POItem'][0]->CurrencyType; - // echo $CurrencyType; - } - - - if($CurrencyType=='' OR $CurrencyType=='0'){ - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - // echo "

"; - //print_r($data['CurrencySymbol']); - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - //echo $TotalOrderValue; - $totalAmt=sprintf("%.2f", $TotalOrderValue); - //echo $totalAmt; - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - //print_r($data['TotalAmountInWords']); - } - - - else{ - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); - //echo "

"; - // print_r($data['CurrencySymbol']); - $SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000; - $SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency; - $PaiseVal=$data['CurrencySymbol'][0]->PaiseVal; - - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - // echo $TotalOrderValue; - $totalAmt=sprintf("%.2f", $TotalOrderValue); - //echo "
" . $totalAmt; - - $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal); - //print_r($data['TotalAmountInWords']); - } - - - - - - - $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - - - - $this->load->View("amendcapitalpopdf", $data); - - - - - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("capitalamenpo.pdf",$data,$php); - -} - - public 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) ? 's' : 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 = "Rupee " . $result." Only"; -} -else{ - -$amountInWords = "Rupee " . $result ." Paise ". $points." Only"; -} - - - return $amountInWords; - } - -public function convertNumberSymbol($amt,$symbol,$name,$paise){ -$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) ? 's' : 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 = $name." " . $result." Only"; -} -else{ -$amountInWords = $name." " . $result.$paise ." ". $points." Only"; -} - - - return $amountInWords; - } + function getDateformat($Val) { diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 2362e173..d2f919a9 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -276,33 +276,7 @@ class purchaseorder extends BaseController } - function CreateMRIRPOPrint() - { - $PONO = $_GET['PONO']; - $POType = $_GET['POType']; - - if($POType == SERVICE) - { - $this ->mrirservicepoprint($PONO); - - } - else if($POType == REVENUE) - { - $this ->mrirrevenuepoprint($PONO); - - } - - else if($POType == IMPORT) - { - $this ->mririmportpoprint($PONO); - - } - else if($POType == CAPITAL) - { - $this ->mrirCapitalPoPrint($PONO); - - } - } + function CreaterevenuePOPrint() { @@ -1026,6 +1000,9 @@ class purchaseorder extends BaseController // Load library $this->load->library('dompdf_gen'); + $paper_orientation = 'portrait'; + $customPaper = array(0,0,750,950); + $this->dompdf->set_paper($customPaper,$paper_orientation); // Convert to PDF $this->dompdf->load_html($php); @@ -1037,60 +1014,7 @@ class purchaseorder extends BaseController -public function mrirrevenuepoprint($PONO) - { - // Load all views as normal - - - //$PONO = $_GET['PO']; - - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO); - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - - $Currencycode=''; - - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - $AdvanceAmount=0.00; - foreach ($data['POItem'] as $POI) - { - $AdvanceAmount=$POI->AdvanceAmount; - } - - //echo "total $TotalOrderValue"; - //echo "Advance $TotaltoPay"; - $TotaltoPay=0.00; - $TotaltoPay=$TotalOrderValue-$AdvanceAmount; - // echo "$TotaltoPay"; - - $totalAmt=sprintf("%.2f",$TotaltoPay); - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - // Add header to pdf - //$this->load->view('includes/pdfheader'); - - // Load the pdf page with multiviews - $this->load->View("mrirrevenuepopdf", $data); - - // Add header to pdf - //$this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("RevenuePOReport.pdf",$data,$php); - -} public function servicepoprint($PONO) { @@ -1135,6 +1059,9 @@ public function mrirrevenuepoprint($PONO) // Load library $this->load->library('dompdf_gen'); + $paper_orientation = 'portrait'; + $customPaper = array(0,0,750,950); + $this->dompdf->set_paper($customPaper,$paper_orientation); // Convert to PDF $this->dompdf->load_html($php); @@ -1147,66 +1074,7 @@ public function mrirrevenuepoprint($PONO) -public function mrirservicepoprint($PONO) - { - - // $this->load->view('includes/pdfheader'); - - // Load the pdf page with multiviews - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetailsForPrint($PONO); - - - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - - //print_r( $data['CurrencySymbol']); - - $TotalOrderValue=0; - $Currencycode=''; - foreach ($data['POItem'] as $POValue) - { - - $TotalOrderValue=$TotalOrderValue + $POValue->TotalValue; - - } - - $Advance=0.00; - foreach ($data['POItem'] as $PO) - { - $Advance=$PO->AdvanceAmount; - } - - $TotaltoPay=0.00; - $TotaltoPay=$TotalOrderValue-$Advance; - //echo $TotaltoPay; - - - $totalAmt=sprintf("%.2f", $TotaltoPay); - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - - $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - - $this->load->View("mrirservicepopdf", $data); - - // Add header to pdf - //$this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("ServicePOReport.pdf",$data,$php); - -} + public function importpoprint($PONO) { @@ -1310,6 +1178,9 @@ public function importpoprint($PONO) // Load library $this->load->library('dompdf_gen'); + $paper_orientation = 'portrait'; + $customPaper = array(0,0,750,950); + $this->dompdf->set_paper($customPaper,$paper_orientation); // Convert to PDF //$this->dompdf->set_paper(array(0, 0, 841.89, 1190.55), 'landscape'); @@ -1322,128 +1193,7 @@ public function importpoprint($PONO) -public function mririmportpoprint($PONO) - { - - //$this->load->view('includes/pdfheader'); - - // Load the pdf page with multiviews - $Requester=''; - $Depcode=''; - $Currencycode=''; - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO); - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - //print_r( $data['POItem']); - foreach ($data['POItem'] as $Reqdby) - { - $Requester=$Reqdby->Requestedby; - } - - foreach ($data['POItem'] as $CURTYPE) - { - $Currencycode=$CURTYPE->CurrencyType; - } - - $data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester); - - foreach ($data['Requestername'] as $ReqDep) - { - $Depcode=$ReqDep->Departmentcode; - } - - $data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode); - //print_r($data['Requestername']); - $data['Currencytype']=$this->purchaseorder_model->GerCurrencyCodeName($Currencycode); - $ProductPrice=''; - $TotalOrderValue = ''; - foreach ($data['POItem'] as $PO ) - { - $TotalOrderValue=$PO->TotalOrderValue; - } - - foreach ($data['POItem'] as $POI) - { - $AdvanceAmount=$POI->AdvanceAmount; - } - - //echo "Total $TotalOrderValue"; - //echo "Advance $AdvanceAmount"; - //$TotaltoPay=0.00; - $TotaltoPay=$TotalOrderValue-$AdvanceAmount; - //echo "Total to pay $TotaltoPay"; - //$totalAmt=sprintf("%.2f", $ProductPrice); - //$data['TotalAmountInWords']= $this->convertNumber($totalAmt); - //print_r($data['TotalAmountInWords']); - - //$this->load->View("importpopdf", $data); - - - $CurrencyType=''; - if(!empty($data['POItem'])){ - $CurrencyType=$data['POItem'][0]->CurrencyType; - } - //echo $CurrencyType; - - if($CurrencyType=='') - { - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - } - else - { - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); - } - - // $TotalOrderValue=$data['POItem'][0]->$TotalOrderValue; - //print_r($data['POItem'][0]); - - $totalAmt=sprintf("%.2f", $TotaltoPay); - //echo $totalAmt; - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - - - - - $SymbolCurrency = ''; - $SymbolCurrencyName =''; - $PaiseVal = ''; - if(!empty($data['CurrencySymbol']) >0) - { - $SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000; - $SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency; - $PaiseVal=$data['CurrencySymbol'][0]->PaiseVal; - } - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - - $totalAmt=sprintf("%.2f", $TotaltoPay); - - $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal); - - - // $this->load->View("importpopdf", $data); - - $this->load->View("mririmportpopdf", $data); - - - // Add header to pdf - //s $this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - //$this->dompdf->set_paper(array(0, 0, 841.89, 1190.55), 'landscape'); - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("ImportPOReport.pdf",$data,$php); - -} /** * This function used to load the Delete the Requistion Items @@ -2554,6 +2304,9 @@ function addNewImportPurchaseOrder() // Load library $this->load->library('dompdf_gen'); + $paper_orientation = 'portrait'; + $customPaper = array(0,0,750,950); + $this->dompdf->set_paper($customPaper,$paper_orientation); // Convert to PDF $this->dompdf->load_html($php); @@ -2566,93 +2319,7 @@ function addNewImportPurchaseOrder() - public function mrirCapitalPoPrint($PONO) - { - - - // Load the pdf page with multiviews - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - - $data['POItem'] = $this->purchaseorder_model->GetCapitalPurchaseOrderDetailsForPDF($PONO); - $AdvanceAmount=''; - $TotaltoPay=''; - $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - - $CurrencyType=''; - if(!empty($data['POItem'])){ - $CurrencyType=$data['POItem'][0]->CurrencyType; - } - - - if($CurrencyType=='' OR $CurrencyType=='0'){ - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - - - - foreach ($data['POItem'] as $POI) - { - $AdvanceAmount=$POI->AdvanceAmount; - } - - - $TotaltoPay=$TotalOrderValue-$AdvanceAmount; - - $totalAmt=sprintf("%.2f", $TotaltoPay); - - $data['TotalAmountInWords']= $this->convertNumber($totalAmt); - } - - - else{ - $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); - $SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000; - $SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency; - $PaiseVal=$data['CurrencySymbol'][0]->PaiseVal; - - $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; - - foreach ($data['POItem'] as $POI) - { - $AdvanceAmount=$POI->AdvanceAmount; - } - - - $TotaltoPay=$TotalOrderValue-$AdvanceAmount; - - $totalAmt=sprintf("%.2f", $TotaltoPay); - - $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal); - } - - - - - - - $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - - - - $this->load->View("mrircapitalpopdf", $data); - - // Add header to pdf - //$this->load->view('includes/pdffooter'); - - // Get output html - $php = $this->output->get_output(); - - // Load library - $this->load->library('dompdf_gen'); - - // Convert to PDF - $this->dompdf->load_html($php); - $this->dompdf->render(); - $data['Attachment'] = FALSE; - $this->dompdf->stream("CapitalPOReport.pdf",$data,$php); - -} + diff --git a/application/logs/log-2017-08-17.php b/application/logs/log-2017-08-17.php new file mode 100644 index 00000000..694426b1 --- /dev/null +++ b/application/logs/log-2017-08-17.php @@ -0,0 +1,20 @@ + + +ERROR - 2017-08-17 17:54:06 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\system\database\drivers\mysqli\mysqli_result.php 38 +ERROR - 2017-08-17 17:54:43 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\system\database\drivers\mysqli\mysqli_result.php 38 +ERROR - 2017-08-17 17:55:05 --> Severity: Warning --> mysqli_connect(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. + C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\system\database\drivers\mysqli\mysqli_driver.php 77 +ERROR - 2017-08-17 17:55:05 --> Unable to connect to the database +ERROR - 2017-08-17 17:55:19 --> Severity: Warning --> mysqli_connect(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. + C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\system\database\drivers\mysqli\mysqli_driver.php 77 +ERROR - 2017-08-17 17:55:19 --> Unable to connect to the database +ERROR - 2017-08-17 17:55:31 --> Severity: Notice --> Undefined index: ReqType C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\controllers\purchaseorder.php 253 +ERROR - 2017-08-17 17:56:42 --> Severity: Notice --> Undefined index: ReqType C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\controllers\purchaseorder.php 253 +ERROR - 2017-08-17 17:57:39 --> Severity: Notice --> Undefined offset: 0 C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\controllers\purchaseorder.php 1161 +ERROR - 2017-08-17 17:57:39 --> Severity: Notice --> Trying to get property of non-object C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\controllers\purchaseorder.php 1161 +ERROR - 2017-08-17 17:57:39 --> Severity: Notice --> Undefined variable: Import_DispatchDetails C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\views\importpopdf.php 159 +ERROR - 2017-08-17 17:57:39 --> Severity: Notice --> Undefined variable: ReqNo C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\views\importpopdf.php 180 +ERROR - 2017-08-17 17:57:39 --> Severity: Notice --> Undefined variable: CostCenterCode C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\views\importpopdf.php 184 +ERROR - 2017-08-17 17:57:39 --> Severity: Warning --> number_format() expects parameter 1 to be double, string given C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\views\importpopdf.php 373 +ERROR - 2017-08-17 18:00:01 --> Severity: Notice --> Undefined variable: Placeoforigin C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\views\capitalpopdf.php 144 +ERROR - 2017-08-17 18:00:28 --> Severity: Notice --> Undefined variable: Placeoforigin C:\5.6\xampp\htdocs\SIA\SIANEW\siddharth_application\application\views\capitalpopdf.php 144 diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index e17272ad..700803b0 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -603,38 +603,15 @@ function purchaseorderListing($forwhat='') } // This Method to get the Service PO Child Details for Edit the Item - function GetServicePurchaseOrderDetailsForPrint($PONO = '') - { - - $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Mat.HSNCODE, - LineItem.Quantity,LineItem.Rate,(LineItem.Quantity *LineItem.Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount - ,TotalValue,CGST,SGST,IGST,After_CGST,After_SGST,After_IGST,otherallowance,LineItem.CostCenterCode,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,POMaster.PaymentOtherDescription,POMaster.DeliveryOption,POMaster.DeliverySchedule,ReqMat.NumberOfService,ReqMat.Service_Period,ReqMat.Schedule_Type,Payment.PaymentID,Payment.PaymentTerms,AdvanceAmount,HSNCODE FROM - T_PurchaseOrder_LineItem LineItem - join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode - join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo - join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO - join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID - join T_Requestion_Master ReqMat on ReqMat.ReqNo = LineItem.ReqNo - join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms - left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO - where LineItem.PONO =?'; - - $query = $this->db->query($subQuery,array($PONO)); - - return $query->result(); - - - } - - function GetServicePurchaseOrderAmendDetailsforPdfprint($PONO = '') + function GetServicePurchaseOrderDetailsforPdf($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName, + $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,POMaster.ParentPO, Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue,POMaster.AmendedDetails,LineItem.AmendedDetails as lineamenddetails, ROUND(( Tax.After_SGST + Tax.After_CGST + Tax.After_IGST ) ,2)as Taxamount,ReqMat.NumberOfService,ReqMat.Schedule_Type,ReqMat.Service_Period, - TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentTerms + TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentTerms,AdvanceAmount FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo @@ -642,6 +619,7 @@ function purchaseorderListing($forwhat='') join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms join T_Requestion_Master ReqMat on ReqMat.ReqNo = LineItem.ReqNo + left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO where LineItem.PONO =?'; $query = $this->db->query($subQuery,array($PONO)); @@ -651,6 +629,8 @@ function purchaseorderListing($forwhat='') } + + // This Method to get the Revenue PO Child Details for Edit the Item function GetRevenuePurchaseOrderDetails($PONO = '') { @@ -676,19 +656,18 @@ function purchaseorderListing($forwhat='') function GetRevenuePurchaseOrderDetailsForPDF($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, - Mat.UOM,Mat.HSNCODE,Quantity,Rate,(Quantity *Rate) as BasicValue , - (AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST + - AfterIGST + Insurance) as Taxamount,AdvanceAmount, - TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentID,Payment.PaymentTerms,HSNCODE + $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,POMaster.PaymentOtherDescription, + Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , + ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST + + AfterIGST + Insurance)) ,2)as Taxamount,AdvanceAmount, + TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID - - join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms - left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO + join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms + left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO where LineItem.PONO =?'; $query = $this->db->query($subQuery,array($PONO)); @@ -698,28 +677,7 @@ function purchaseorderListing($forwhat='') } // This Method to get the Revenue PO Child Details for Edit the Item - function GetRevenuePurchaseOrderDetailsForAmendPDF($PONO = '') - { - - $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,POMaster.PaymentOtherDescription, - Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , - ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST + - AfterIGST + Insurance)) ,2)as Taxamount, - TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend,Payment.PaymentTerms - FROM T_PurchaseOrder_LineItem LineItem - join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode - join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo - join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO - join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID - join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms - where LineItem.PONO =?'; - - $query = $this->db->query($subQuery,array($PONO)); - - return $query->result(); - - - } + function GetImportPurchaseOrderDetailsForPDF($PONO = '') { @@ -882,27 +840,7 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty, } - function GetCapitalAmendPurchaseOrderDetailsForprintPDF($PONO = '') - { - //echo $PONO; - - $subQuery ='SELECT distinct LineItem.PONO,LineItem.AmendedDetails as lineamd,LineItem.LineItemNo,SUP.SupplierName,SUP.Address,POMast.DeliveryAddress,POMast.DeliveryDate,POMast.PODate,POMast.DeliveryOption,POMast.ServiceDescription,POMast.ServiceDescription,POMast.Import_DispatchDetails,POMast.Import_PlaceofOrgin,POMast.AmendedDetails,POMast.DeliverySchedule,POMast.TotalOrderValue,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency, -Mat.UOM,Quantity,Rate,POMast.Status,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.PaymentOtherDescription,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,POMast.CurrencyType,Payment.PaymentTerms, - Req.CostCenterCode FROM T_PurchaseOrder_LineItem LineItem - join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO - join T_SupplierDetailsN SUP on SUP.SupplierID=POMast.SupplierID -join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode - join T_Service_Tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo - join T_Import_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo - join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo - join T_PaymentTerms Payment on Payment.PaymentID = POMast.PaymentTerms - join T_Employee_Details emp on Req.Requestedby = emp.EmpID where LineItem.PONO =?'; - $query = $this->db->query($subQuery,array($PONO)); - //print_r ($query->result()); - return $query->result(); - - - } + @@ -1338,7 +1276,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode function GetCapitalPurchaseOrderDetailsForPDF($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, + $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.AmendedDetails as lineamd,ReqNo,Mat.MaterialCode,Mat.MaterialName, Mat.UOM,Mat.HSNCODE,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentID,Payment.PaymentTerms,AdvanceAmount,HSNCODE FROM T_PurchaseOrder_LineItem LineItem diff --git a/application/third_party/dompdf/lib/fonts/log.htm b/application/third_party/dompdf/lib/fonts/log.htm index fef6681f..bc2b9fe7 100755 --- a/application/third_party/dompdf/lib/fonts/log.htm +++ b/application/third_party/dompdf/lib/fonts/log.htm @@ -1 +1 @@ -8,192 KB 183.2461 ms
\ No newline at end of file +12,800 KB 897.1789 ms
\ No newline at end of file diff --git a/application/views/AmendPOlist.php b/application/views/AmendPOlist.php index 11176a94..8df6beda 100755 --- a/application/views/AmendPOlist.php +++ b/application/views/AmendPOlist.php @@ -73,7 +73,7 @@     -         +         diff --git a/application/views/Amendedimportpopdf.php b/application/views/Amendedimportpopdf.php deleted file mode 100755 index 8c0ce0c9..00000000 --- a/application/views/Amendedimportpopdf.php +++ /dev/null @@ -1,408 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - } - } - - $TotalOrderValue1=''; - $PlaceofOrigin=''; - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - $ReqNo=$PO->ReqNo; - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $ServiceDescription =$PO->ServiceDescription; - $CostCenterCode=$PO->CostCenterCode; - //$ReqBy=$PO->Requestedby; - $TotalOrderValue1=$PO->TotalOrderValue; - - $PaymentTerms = $PO->Pay; - //$PaymentDays=$PO->PaymentDays; - //$PayableAT=$PO->PayableAT; - $PlaceofOrigin=$PO->Import_PlaceofOrgin; - - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - $Import_DispatchDetails=''; - } - else{ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - $Import_DispatchDetails=$PO->Import_DispatchDetails; - } - } - } -//echo $SuplierName; - - if(!empty($Requestername)) - - { - foreach ($Requestername as $Reqname) - { - $ReqBy=$Reqname->FirstName; - } - } - - $CurrencyCode=''; - $CurrencyName=''; - - if(!empty($Currencytype)) - { - foreach ($Currencytype as $CURRE) - { - $CurrencyCode=$CURRE->Currency_Code; - $CurrencyName=$CURRE->FontCode2000; - } - - } - - // echo $CurrencyCode; - - $DEPNAME=''; - - if(!empty($DEPCODE)) - { - foreach ($DEPCODE as $DEP) - { - $DEPNAME=$DEP->DepartmentName; - } - } - - - - - -?> - - - -
-
- DRAFT
'; - - } - - ?> -
-
 
-
PURCHASE ORDER - PO NO:/I
- - - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE : DISPATCH INSTRUCTION/ SCHEDULE BY :  PLACE OF ORIGIN: 
- - - - -
- - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center
03/08/2017
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AfterLandingCharge; - $AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ; - $AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ; - $AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ; - $AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ; - $AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ; - $AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ; - $AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ; - $Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ; - $AvailableModvat = $AvailableModvat+$record->AvailableModvat ; - $Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ; - $purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ; - $CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ; - $RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ; - $AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ; - $TotalOrderValue = $TotalOrderValue+$record->BasicPriceInMTon; - } - } - - ?> - -
#Item and DescriptionHSN CodeUOMQtyRate per unit in Basic Price in
MaterialName ; ?>HSNCODE;?>UOM ; ?>Quantity ; ?>Rate ; ?>Quantity*$record->Rate); - echo number_format($BasicValue,2,'.','') ; ?>
-

 

- -

Payment Terms: 

- -
Special Instructions :
- - - - - - - - - - - - - - - - - LineAmend ; - } - } ?> - -
-

Amended Details

-
-" . $v->AmendedDetails . ""; - break; - } -}?> -
Item DescriptionPrevious DetailsCurrent Details
- - -

 

- - - - - - - - - - - - -
Total Amount In Words

Total Amount In
- - - - ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - -

 

-
 Released By : FirstName;?>
-
 Released On : format('d-m-Y');?>
- - - - -
-

Certified that the particulars given above are true and correct

-

-

 

-

Authorized Signatory

-
- - - - - - -
\ No newline at end of file diff --git a/application/views/Amendervicepopdf.php b/application/views/Amendervicepopdf.php deleted file mode 100755 index dcdc598a..00000000 --- a/application/views/Amendervicepopdf.php +++ /dev/null @@ -1,387 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - - } - } - - $currencyName='INR'; - $currencyCode =''; - if(!empty($CurrencySymbol)) - { - foreach ($CurrencySymbol as $Curr) - { - - $currencyCode = $Curr->FontCode2000; - //$currencyName = $currencyName; - - - } - - } - - - - - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - if($PO->DeliveryOption==1){ - $DeliverySchedule=$PO->DeliverySchedule; - $DeliveryDate=null; - - }else if($PO->DeliveryOption==0) - { - - if(!empty($PO->DeliveryDate)){ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule=''; - } - } - // if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';} - $ServiceDescription =$PO->ServiceDescription; - $PaymentTerms = $PO->PaymentTerms; - if($PaymentTerms=='Others'){ - $PaymentOtherDescription=$PO->PaymentOtherDescription; - } - - - } -} - - ?> - - - -
-
- DRAFT
'; - - } - - ?> -
-
 
-
PURCHASE ORDER - PO NO:/S
- - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE :  DELIVERY DATE / SCHEDULE BY :  
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateFrequencyRequested ByRequested DepartmentCost Center
format("d-m-Y"); echo $date; ?>
-
- - - - - - - - - - - - - - - Schedule_Type=="One Time"){ - $TotalAmount = ($record->BasicValue) + $record->Taxamount ;//+ $record->otherallowance; - }else if($record->Schedule_Type=="Recurring"){ - $TotalAmount = ($record->BasicValue * $record->NumberOfService) + $record->Taxamount ;//+ $record->otherallowance; - } - ?> - - - - - - - - - - - - - After_SGST; - $AfterCGST =$AfterCGST + $record->After_CGST; - $AfterIGST = $AfterIGST + $record->After_IGST; - $otherallowances =$otherallowances + $record->otherallowance; - $totaltaxamount=$totaltaxamount+$record->Taxamount; - - } - $OrderValue = $SubTotalAmount+ $otherallowances; - } - - ?> -
#Service DescriptionHSN CodeUOMQtyRate In INRBasic Amount In INR
ServiceMaterialDescription ; ?>HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";}?>UOM ; ?>Quantity ; ?>Rate ; ?>Schedule_Type == "One Time"){echo number_format(($record->Quantity * $record->Rate),2,'.','');}else if($record->Schedule_Type == "Recurring"){echo number_format((($record->Quantity * $record->Rate) * $record->NumberOfService),2,'.','');} ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HSN CodeCGST

SGST

IGST

Total Tax AmtOther Allow In INRTotal Amt In INR
ValueAmtValueAmtValueAmt
HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";}?>CGST?>%After_CGST?>SGST?>%After_SGST?>IGST?>%After_IGST?>Taxamount?>otherallowance?>Schedule_Type == "One Time"){echo number_format(($l->Taxamount + $l->otherallowance + ($l->Rate * $l->Quantity)),2,'.','');}else if($record->Schedule_Type == "Recurring"){echo number_format(($l->Taxamount + $l->otherallowance + ($l->Rate * $l->Quantity * $l->NumberOfService)),2,'.','');}?>
- -

 

- - - - - - - - - - - - - - - - - lineamenddetails ; - } - } ?> - -
-

Amended Details

-
-" . $v->AmendedDetails . ""; - break; - } -}?> -
Item DescriptionPrevious DetailsCurrent Details
-

 

- - -

Payment Terms: 

- -
Scope Of Work As Annixture :
- - -
-   - - - - - - - - - - - - - - - - - - - - - -
Total Amount In Words

Total Amount Before Tax In INR  
Total Tax Amount In INR  
Total Amount After Tax In INR  
- ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - -

 

-
 Released By : FirstName;?>
-
 Released On : format('d-m-Y');?>
- - - - -
-

Certified that the particulars given above are true and correct

-

-

 

-

Authorized Signatory

-
- -
-
- - - \ No newline at end of file diff --git a/application/views/Amendrevenuepopdf.php b/application/views/Amendrevenuepopdf.php deleted file mode 100755 index c38a097a..00000000 --- a/application/views/Amendrevenuepopdf.php +++ /dev/null @@ -1,428 +0,0 @@ - CompanyName; - $CompanyAddress = $CO->Address; - - } - } - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $postatus= $PO->Status; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - } - else{ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - } - - - $ServiceDescription =$PO->ServiceDescription; - $PaymentTerms = $PO->PaymentTerms; - if($PaymentTerms=='Others'){ - $PaymentOtherDescription=$PO->PaymentOtherDescription; - } - - - - - - - } -} - - - $currencyName='INR'; - $currencyCode =''; - if(!empty($CurrencySymbol)) - { - foreach ($CurrencySymbol as $Curr) - { - - $currencyCode = $Curr->FontCode2000; - //$currencyName = $currencyName; - - - } - - } - - if(!empty($ParentMaster)){ - foreach($ParentMaster as $pm){ - $PPaymentTerms = $pm->PaymentTerms; - - $PDeliverydate= $pm->DeliveryDate; - $dtDe = new DateTime($PDeliverydate, new DateTimeZone('Asia/Kolkata')); - $PDeliverydate = $dtDe->format('d-m-Y'); - $PDeliverySchedule=$pm->DeliverySchedule; - } - - } - - - ?> - - - -
-
- DRAFT
'; - - } - - ?> -
-
 
-
PURCHASE ORDER - PO NO:/R
- - - - - - - - - - - - - - - - - - -
-

-

-
- Vendor Address : -
-
-

Delivery To :

-

-
PO DATE :  DELIVERY DATE / SCHEDULE BY :  
- - -
- -
- - - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center
format("Y-m-d"); echo $date; ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BasicValue; - - $AfterCGST =$AfterCGST + $record->AfterCGST; - $AfterSGST =$AfterSGST + $record->AfterSGST; - $AfterIGST =$AfterIGST + $record->AfterIGST; - - $Insurance =$Insurance + $record->Insurance; - $AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue; - $AfterDiscount = $AfterDiscount + $record->AfterDiscount ; - $AfterPackaging=$AfterPackaging+$record->AfterPackagingValue; - $totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST+$Insurance+$AfterFreightValue+$AfterPackaging); - } - -$OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insurance +$AfterFreightValue+$AfterPackaging) - $AfterDiscount) ; -}?> - - - -
#Item CodeItem DescriptionHSN CodeUOMQtyRate In INRBasic Value In INR
MaterialCode ; ?>MaterialName ; ?>HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";} ; ?>UOM ; ?>Quantity ; ?>Rate ; ?>BasicValue ; ?>
- - 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HSN Code

Discount In INR

SGST 

CGST  

IGST

Packaging In INR  Insurance In INR    Freight In INR Total Tax   Total Amount In INR 
ValueAmtValueAmtValueAmtValueAmtValueAmtValueAmt
HSNCODE)){echo $l->HSNCODE;}else{echo "NIL";} ; ?>DiscountType == 'PERCENTAGE'){$type="%";}else if($l->DiscountType == 'LUMP SUM'){$type="LS";}else if($l->DiscountType == 'NIL'){$type='';} echo $l->DiscountValue . $type;?>AfterDiscount;?>SGST."%";?>AfterSGST;?>CGST."%";?>AfterCGST;?>IGST."%";?>AfterIGST;?>PackagingType == 'PERCENTAGE'){$type="%";}else if($l->PackagingType == 'LUMP SUM'){$type="LS";}else if($l->PackagingType == 'NIL'){$type='';} echo $l->PackagingValue . $type;?>AfterPackagingValue;?>Insurance;?>FreightType == 'PER TRIP'){$type="TRIP"; echo $l->FreightValue ."*" . $l->NoOfTrip . $type;}else{ if($l->FreightType == 'LUMP SUM'){$type="LS";}else if($l->FreightType == 'NIL'){$type='';}else if($l->FreightType == 'PER UOM'){$type='UOM';}else if($l->FreightType == 'PERCENTAGE'){$type='%';} echo $l->PackagingValue . $type;}?>AfterFreightValue;?>AfterSGST+$l->AfterCGST+$l->AfterIGST+$l->AfterPackagingValue+$l->Insurance+$l->AfterFreightValue;echo number_format($tax,2);?>BasicValue + $tax)-($l->AfterDiscount)),2);?>


- - - - - - -

- AmendedDetails)){$i++;}}} if($i<0){ ?> - - - - - - - - - - - - - - - - LineAmend ; - } - } ?> - -
-

Amended Details

-
-" . $v->AmendedDetails . ""; - break; - } -}?> -
Item DescriptionPrevious DetailsCurrent Details
- -  -

Payment Terms :  

- -
Special Instruction:
- - - - - - - - - - - - - - - - - - - - - -
Total Amount In Words :

 Total Amount Before Tax In INR : 
 Total Tax Amount In INR : 
 Total Amount After Tax In INR : 
- - - - ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - -

 

-
Released By : FirstName;?>
-
Released On : format('d-m-Y');?>
- - - - -
-

 Certified that the particulars given above are true and correct

-

-

 

-

Authorized Signatory

-
-

 

- - - -
- - - - \ No newline at end of file diff --git a/application/views/amendcapitalpopdf.php b/application/views/amendcapitalpopdf.php deleted file mode 100755 index 9975189d..00000000 --- a/application/views/amendcapitalpopdf.php +++ /dev/null @@ -1,355 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - } - } - - - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - - $ReqNo=$PO->ReqNo; - $PONO = $PO->PONO; - $postatus= $PO->Status; - - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - $dispatch=""; - } - else if($PO->DeliveryOption=='0'){ - $dispatch=""; - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - }else if($PO->DeliveryOption=='2'){ - $DeliveryDate=''; - $DeliverySchedule = ''; - $dispatch=$PO->Import_DispatchDetails; - } - $ServiceDescription =$PO->ServiceDescription; - $CostCenterCode=$PO->CostCenterCode; - - $PaymentTerms=$PO->PaymentTerms; - if($PaymentTerms=='Others'){ - $PaymentOtherDescription=$PO->PaymentOtherDescription; - } - - - } - } - - - $currencyCode =''; - $currencyName=''; - if(!empty($CurrencySymbol)) - { - foreach ($CurrencySymbol as $Curr) - { - - $currencyCode = $Curr->FontCode2000; - $currencyName = $Curr->Currency_Code; - - - } - - } - - - - -?> - - - - -
-
- DRAFT
'; - - } - - ?> -
-
 
-
PURCHASE ORDER - PO NO:/C
- - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE :DELIVERY DATE / SCHEDULE BY :
- - -
- - - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center
format("Y-m-d"); echo $date; ?>

 

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Item and DescriptionHSN CodeUOMQtyRate Per Unit in Rate Per Unit in Total Amount in Total Amount in
MaterialCode;?> - MaterialName ; ?>HSNCODE)){echo $record->HSNCODE;}else {echo "NIL";}?>UOM; ?>Quantity ; ?>Rate ; ?>Quantity*$record->Rate); - echo number_format($BasicValue,2) ; ?>
-

 

- -

Payment Terms: 

- - -
Special Instruction:
- - - - - - - - - - - - - - - - - - lineamd)){ - echo $record->lineamd ; - } - } - } ?> - -
-

Amended Details

-
-AmendedDetails)) - { - echo "" . $v->AmendedDetails . ""; - break; - } - } -}?> -
Item DescriptionPrevious DetailsCurrent Details
-
- -

 

- - - - - - - - - - - - -
Total Amount In Words

- Total Order Amount in Total Order Amount in
- - ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - - -

 

-
Released By : FirstName;?>
-
Released On : format('d-m-Y');?>
- - - - - - - -
-

Certified that the particulars given above are true and correct

-

-

 

-

Authorized Signatory

-
- - - - - - - - -
-
- - - \ No newline at end of file diff --git a/application/views/capitalpopdf.php b/application/views/capitalpopdf.php index 0e3f769b..44061c7c 100755 --- a/application/views/capitalpopdf.php +++ b/application/views/capitalpopdf.php @@ -1,6 +1,8 @@ CompanyName; - $CompanyAddress = $CO->Address; - - } + foreach ($CompanyDetails as $CO) + { + $CompanyName = $CO->CompanyName; + $CompanyAddress = $CO->Address; + } } + + if(!empty($POItem)) { - - foreach ($POItem as $PO) - { - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $postatus= $PO->Status; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - $Import_DispatchDetails=''; - } - else{ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - $Import_DispatchDetails=$PO->Import_DispatchDetails; - } + foreach ($POItem as $PO) + { + + $ReqNo=$PO->ReqNo; + $PONO = $PO->PONO; + $postatus= $PO->Status; + + $SuplierName = $PO->SupplierName; + $SuplierAddress = $PO->Address; + $DeliveryAddress = $PO->DeliveryAddress; + $advance=$PO->AdvanceAmount; + $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); + $Podt = $dt->format('d-m-Y'); + if($PO->DeliveryOption=='1'){ + $DeliveryDate = ''; + $DeliverySchedule = $PO->DeliverySchedule; + $dispatch=""; + } + else if($PO->DeliveryOption=='0'){ + $dispatch=""; + $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); + $DeliveryDate = $dtDe->format('d-m-Y'); + $DeliverySchedule = ''; + }else if($PO->DeliveryOption=='2'){ + $DeliveryDate=''; + $DeliverySchedule = ''; + $dispatch=$PO->Import_DispatchDetails; + } + $ServiceDescription =$PO->ServiceDescription; + $CostCenterCode=$PO->CostCenterCode; + + $PaymentTerms=$PO->PaymentTerms; + if($PaymentTerms=='Others'){ + $PaymentOtherDescription=$PO->PaymentOtherDescription; + } + + + } + } + - $ServiceDescription =$PO->ServiceDescription; - if($PO->PaymentID!='PT08'){ - $PaymentTerms = $PO->PaymentTerms; - } - else{ - $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) '; - } - $Placeoforigin=$PO->Import_PlaceofOrgin; - $ExchangeRate = $PO->ExchangeRate; - $CapitalRange = $PO->CapitalRange; - } -} - $currencyName='INR'; $currencyCode =''; - if(!empty($CurrencySymbol)) + $currencyName=''; + if(!empty($CurrencySymbol)) { foreach ($CurrencySymbol as $Curr) { @@ -80,9 +88,12 @@ } } + + + + +?> - - ?> +
- -
PURCHASE ORDER - PO NO:/C
+
 
+
PURCHASE ORDER - PO NO:/C
- - +
- @@ -120,43 +131,34 @@ - - - - - - - - - - - - + + + +
+

Vendor Address :

-


+


+

Delivery To :

-

+

PO DATE :  DISPATCH / SCHEDULE BY :  PLACE OF ORIGIN:
PO DATE :  DELIVERY DATE/ SCHEDULE BY :  
PO DATE :DELIVERY DATE / SCHEDULE BY :
- -
-
- - +
+ +
- - - - - - - - + + + + + + + - - - - - + + + + + -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center  
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center
format("Y-m-d"); echo $date; ?>
-

 

- - - - - - - - - - +
#Item CodeItem NameHSN CodeQtyUOM

 

+
+ + + + + + + - - - + + - - - - - + + + + - + - - -Quantity*$record->Rate; - ?> - - - - - + + + + + - - - - + + + + + + +
#Item and DescriptionHSN CodeUOMQty Rate Per Unit in Rate Per Unit in Rate Per Unit in Rate Per Unit in Total Amount in Total Amount in Total Amount in
Total Amount in
MaterialCode ; ?>MaterialName ; ?>HSNCODE ; ?>
MaterialCode;?> - MaterialName ; ?>HSNCODE)){echo $record->HSNCODE;}else {echo "NIL";}?>UOM; ?> Quantity ; ?>UOM ; ?>Rate),2, '.', '') ; ?>Quantity * $record->Rate),2, '.', '');?>Rate ; ?>Quantity * $record->Rate); + echo number_format($BasicValue,2) ; ?>
+

 

+ +

Payment Terms: 

+ + +
Special Instruction:
+ ParentPO != ''){ + $i++; + } + } + } + + if($i>0){ + ?> + + + + + + + + + + + + + + - -
+

Amended Details

+
+ - - + foreach($POItem as $v) + { + if(!empty($v->AmendedDetails)) + { + echo "" . $v->AmendedDetails . ""; + break; + } + } +}?> +
Item DescriptionPrevious DetailsCurrent Details
-

 

- -

Payment Terms: 

- -

Special Instruction:

-

- - + + lineamd)){ + echo $record->lineamd ; + } + } + } ?> + +
+ +
+ +

 

+ - - + + + + + + - -
Total Amount In Words

+ Total Amount In Words

+ Total Order Amount in Total Order Amount in - Total Order Amount in Total Order Amount in
Advance Paid In    
Balance amount needs to pay   
- ReleasedOn, new DateTimeZone('Asia/Kolkata')); - + ?> @@ -299,16 +345,16 @@ } } else { - ?> - + + +

Certified that the particulars given above are true and correct

 

@@ -316,10 +362,17 @@
-

 

+ + + + + + + + + +
+
- -

 

-
\ No newline at end of file + \ No newline at end of file diff --git a/application/views/importpopdf.php b/application/views/importpopdf.php index ba64286e..27cbd0b5 100755 --- a/application/views/importpopdf.php +++ b/application/views/importpopdf.php @@ -13,13 +13,8 @@ $DeliverySchedule=''; $ServiceDescription = ''; $ReqBy=''; - $PaymentTerms=''; - $PaymentDays=''; - $PayableAT=''; - $Placeoforigin=''; - $Import_DispatchDetails=''; - $ReqDate=''; - + $PaymentTerms=''; + $advance=0; $index=0; @@ -32,20 +27,20 @@ } } - + $TotalOrderValue1=''; + $PlaceofOrigin=''; if(!empty($POItem)) { foreach ($POItem as $PO) { $ReqNo=$PO->ReqNo; - $ReqDate=$PO->ReqDate; $PONO = $PO->PONO; $postatus= $PO->Status; $SuplierName = $PO->SupplierName; $SuplierAddress = $PO->Address; $DeliveryAddress = $PO->DeliveryAddress; - + $advance=$PO->AdvanceAmount; $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $Podt = $dt->format('d-m-Y'); $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); @@ -53,18 +48,28 @@ $ServiceDescription =$PO->ServiceDescription; $CostCenterCode=$PO->CostCenterCode; //$ReqBy=$PO->Requestedby; + $TotalOrderValue1=$PO->TotalOrderValue; - $PaymentTerms = $PO->Pay; + $PaymentTerms = $PO->Pay; + //$PaymentDays=$PO->PaymentDays; + //$PayableAT=$PO->PayableAT; + $PlaceofOrigin=$PO->Import_PlaceofOrgin; - $Placeoforigin=$PO->Import_PlaceofOrgin; - $Import_DispatchDetails=$PO->Import_DispatchDetails; - // $PaymentDays=$PO->PaymentDays; - // $PayableAT=$PO->PayableAT; - $DeliverySchedule=$PO->DeliverySchedule; + if($PO->DeliveryOption=='1'){ + $DeliveryDate = ''; + $DeliverySchedule = $PO->DeliverySchedule; + $Import_DispatchDetails=''; + } + else{ + $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); + $DeliveryDate = $dtDe->format('d-m-Y'); + $DeliverySchedule = ''; + $Import_DispatchDetails=$PO->Import_DispatchDetails; + } } } +//echo $SuplierName; -//echo $DeliverySchedule; if(!empty($Requestername)) { @@ -115,7 +120,7 @@
-PO DATE :   +PO DATE :  DISPATCH INSTRUCTION/ SCHEDULE BY :   -PLACE OF ORIGIN:   +PLACE OF ORIGIN:  @@ -164,35 +169,36 @@ - - - - - + + + + + - - - - - + + + + +
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center CodeRequistion NumberRequistion DateRequested ByRequested DepartmentCost Center
03/08/2017
+

 

- - - - + + + + + - - - + + + @@ -230,18 +236,19 @@ - - - - + + + + + - - - - - + + + + + @@ -263,7 +270,7 @@ $CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ; $RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ; $AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ; - $TotalOrderValue = $TotalOrderValue+$record->BasicValue; + $TotalOrderValue = $TotalOrderValue+$record->BasicPriceInMTon; } } @@ -271,27 +278,109 @@
#Item and DescriptionHSN CodeQty#Item and DescriptionHSN CodeUOMQtyUOM

-
Rate per unit in  Basic Price in  Total Amount in  Rate per unit in Basic Price in
MaterialName ; ?>HSNCODE;?>Quantity ; ?>MaterialName ; ?>HSNCODE;?>UOM ; ?>Quantity ; ?>UOM ; ?>Rate),2, '.', '') ; ?>Quantity*$record->Rate); - echo number_format($BasicValue,2, '.', '') ; ?>Quantity*$record->Rate); - echo number_format($BasicValue,2, '.', '') ; ?>Rate ; ?>Quantity*$record->Rate); + echo number_format($BasicValue,2,'.','') ; ?>

 

- -

Payment Terms: 

- -
Special Instructions :
- +

Payment Terms: 

+ +
Special Instructions :
+ ParentPO != ''){ + $i++; + } + } + } + if($i>0){ + ?> + + + + + + + + + + + + + + + + + LineAmend ; + } + } ?> + +
+

Amended Details

+
+" . $v->AmendedDetails . ""; + break; + } +}?> +
Item DescriptionPrevious DetailsCurrent Details
+ + +

 

- - + + + + -
Total Amount In Words

Total Amount In Total Amount In Words

Total Amount In   
Advance Paid In    
Balance amount needs to pay   
- - - - - + +

Certified that the particulars given above are true and correct

 

@@ -323,9 +412,10 @@
- - - + + + +
\ No newline at end of file diff --git a/application/views/mrircapitalpopdf.php b/application/views/mrircapitalpopdf.php deleted file mode 100755 index 2c67b390..00000000 --- a/application/views/mrircapitalpopdf.php +++ /dev/null @@ -1,352 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - - } - } - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $postatus= $PO->Status; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - if($PO->DeliveryOption=='1') - { - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - $Import_DispatchDetails=''; - } - else - { - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - $Import_DispatchDetails=$PO->Import_DispatchDetails; - } - - - $ServiceDescription =$PO->ServiceDescription; - $PaymentTerms = $PO->PaymentTerms; - $Placeoforigin=$PO->Import_PlaceofOrgin; - $ExchangeRate = $PO->ExchangeRate; - $CapitalRange = $PO->CapitalRange; - $AdvanceAmount=$PO->AdvanceAmount; - } -} - -echo $AdvanceAmount; - - if($AdvanceAmount>0) - { - $color="green"; - } - else - { - $color="black"; - } - - - - $currencyName='INR'; - $currencyCode =''; - if(!empty($CurrencySymbol)) - { - foreach ($CurrencySymbol as $Curr) - { - - $currencyCode = $Curr->FontCode2000; - //$currencyName = $currencyName; - - - } - - } - - - ?> - - -
-
- DRAFT
'; - - // } - - ?> -
- -
PURCHASE ORDER - PO NO:/C
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE :DISPATCH / SCHEDULE BY : PLACE OF ORIGIN:
PO DATE :DELIVERY DATE/ SCHEDULE BY :
- - -
- - - - - - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center  
-

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Quantity*$record->Rate; - ?> - - - - - - - - - - - - - - - - - -
#Item CodeItem NameHSN CodeUOM

-
QtyRate Per Unit in Rate Per Unit in Total Amount in Total Amount in
MaterialCode ; ?>MaterialName ; ?>HSNCODE ;?>UOM ; ?>Quantity ; ?>Rate),2, '.', '') ; ?>Quantity * $record->Rate),2, '.', '');?>
-

Payment Terms

-

- -

Special Instruction:

-

-

 

- - - - - - - - - - - - - - - - - - - - - - - - - -
Total Amount In Words

- - Total Order Amount in Total Order Amount in
Advance Amount Paid
Total Amount To Pay In INR
- ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - -

 

-
Released By : FirstName;?>
-
Released On : format('d-m-Y');?>
- - - - -
-

Certified that the particulars given above are true and correct

-

-

 

-

Authorized Signatory

-
-

 

- - - diff --git a/application/views/mririmportpopdf.php b/application/views/mririmportpopdf.php deleted file mode 100755 index c73ca66e..00000000 --- a/application/views/mririmportpopdf.php +++ /dev/null @@ -1,369 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - } - } - - - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - $ReqNo=$PO->ReqNo; - $ReqD=new DateTime($PO->ReqDate,new DateTimeZone('Asia/Kolkata')); - $ReqDate=$ReqD->format('d-m-Y'); - //$ReqDate=$PO->ReqDate; - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $ServiceDescription =$PO->ServiceDescription; - $CostCenterCode=$PO->CostCenterCode; - //$ReqBy=$PO->Requestedby; - - $PaymentTerms = $PO->Pay; - - $Placeoforigin=$PO->Import_PlaceofOrgin; - $Import_DispatchDetails=$PO->Import_DispatchDetails; - // $PaymentDays=$PO->PaymentDays; - // $PayableAT=$PO->PayableAT; - $DeliverySchedule=$PO->DeliverySchedule; - $AdvanceAmount=$PO->AdvanceAmount; - $Total=$PO->TotalOrderValue; - - } - } - -//echo $DeliverySchedule; - if(!empty($Requestername)) - - { - foreach ($Requestername as $Reqname) - { - $ReqBy=$Reqname->FirstName; - } - } - - $CurrencyCode=''; - $CurrencyName=''; - - if(!empty($Currencytype)) - { - foreach ($Currencytype as $CURRE) - { - $CurrencyCode=$CURRE->Currency_Code; - $CurrencyName=$CURRE->FontCode2000; - } - - } - - // echo $CurrencyCode; - - $DEPNAME=''; - - if(!empty($DEPCODE)) - { - foreach ($DEPCODE as $DEP) - { - $DEPNAME=$DEP->DepartmentName; - } - } - - - - - -?> - - - -
-
- DRAFT
'; - - // } - - ?> -
-
 
-
PURCHASE ORDER - PO NO:/I
- - - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE :  DELIVERY DATE / SCHEDULE BY :  PLACE OF ORIGIN:  
- - -
- -
- - - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center Code
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AfterLandingCharge; - $AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ; - $AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ; - $AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ; - $AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ; - $AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ; - $AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ; - $AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ; - $Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ; - $AvailableModvat = $AvailableModvat+$record->AvailableModvat ; - $Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ; - $purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ; - $CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ; - $RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ; - $AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ; - $TotalOrderValue = $TotalOrderValue+$record->ProductPrice; - } - } - - ?> - -
#Item and DescriptionHSN CodeQtyUOM

-
Rate per unit in  Basic Price in  Total Amount in 
MaterialName ; ?>HSNCODE;?>Quantity ; ?>UOM ; ?>Rate),2, '.', '') ; ?>Quantity*$record->Rate); - echo number_format($BasicValue,2, '.', '') ; ?>Quantity*$record->Rate); - echo number_format($BasicValue,2, '.', '') ; ?>
-

 

- -

Payment Terms: 

- -
Special Instructions :
- - -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Total Amount In Words 


- -

Total Amount In   
Advance Paid   
Balance amount needs to pay   
- - - - - ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - -

 

-
 Released By : FirstName;?>
-
 Released On : format('d-m-Y');?>
- - - - -
-

Certified that the particulars given above are true and correct

-

-

 

-

Authorized Signatory

-
- - - - - -
\ No newline at end of file diff --git a/application/views/mrirrevenuepopdf.php b/application/views/mrirrevenuepopdf.php deleted file mode 100755 index f7da79e3..00000000 --- a/application/views/mrirrevenuepopdf.php +++ /dev/null @@ -1,401 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - - } - } - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $postatus= $PO->Status; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - } - else{ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - } - - - $ServiceDescription =$PO->ServiceDescription; - if($PO->PaymentID!='PT08'){ - $PaymentTerms = $PO->PaymentTerms; - } - else{ - $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) '; - } - $AdvanceAmount=$PO->AdvanceAmount; - - - } -} - $currencyName='INR'; - $currencyCode =''; - if(!empty($CurrencySymbol)) - { - foreach ($CurrencySymbol as $Curr) - { - - $currencyCode = $Curr->FontCode2000; - //$currencyName = $currencyName; - - - } - - } - - - ?> - - -
-
- DRAFT
'; - - // } - - ?> -
- -
PURCHASE ORDER - PO NO:/R
- - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE :   DELIVERY DATE / SCHEDULE BY :   
- - - - -
- - - - - - - - - - - - - - - - - - - -
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center  
-

 

- - - - - - - - - - - - - - -BasicValue+$record->Taxamount; - ?> - - - - - - - - - - - - - BasicValue-$record->AfterDiscount; - $TotalTax = $TotalTax+$record->Taxamount; - $OrderValue = $SubTotalAmount + $TotalTax; - - } - - - - } - - ?> - - -
#Item CodeItem  NameHSN CodeUOMQtyRate In INRBasic Value In INR
MaterialCode ; ?>MaterialName ; ?>HSNCODE ; ?> - UOM ; ?>Quantity ; ?>Rate ; ?>BasicValue, 2, '.', '') ;?>
- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -FreightType=='PER TRIP'){ ?> - - -FreightType!='PER TRIP'){ ?> - - - - - - - - - -
HSN Code

Discount In INR

SGST 

CGST  

IGST

Packaging In INR  Insurance In INR    Freight In INR Tax Amt In INR
 Total Amount In INR 
TypeAmtTypeAmtTypeAmtTypeAmtTypeAmtTypeAmt
HSNCODE ; ?>DiscountType.'-'.$record1->DiscountValue; ?>AfterDiscount, 2, '.', ''); ?>SGST ; ?>AfterSGST, 2, '.', ''); ?>CGST ; ?>AfterCGST, 2, '.', ''); ?>IGST ; ?>AfterIGST, 2, '.', ''); ?>PackagingType.'-'. $record1->PackagingValue ; ?>AfterPackagingValue, 2, '.', ''); ?>Insurance, 2, '.', ''); ?>FreightType.'('.$record1->NoOfTrip.')-'. $record1->FreightValue;?>FreightType.'-'. $record1->FreightValue;?>AfterFreightValue, 2, '.', ''); ?>Taxamount, 2, '.', ''); ?>BasicValue+$record1->Taxamount-$record1->AfterDiscount), 2, '.', ''); ?>
-

 

-

Payment Terms: 

- - - -

Special Instructions:

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Total Amount In Words 


- -

- -
Total Amount Before Tax In INR   
Total Tax Amount In INR   
Total Amount After Tax In INR   
Advance Paid   
Balance amount needs to pay   
- -ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - - -

 

-
 Released By : FirstName;?>
-
 Released On : format('d-m-Y');?>
- - - - - -
- -

Certified that the particulars given above are true and correct

- -

- -

 

- -

Authorized Signatory

-
-
-
- - -
\ No newline at end of file diff --git a/application/views/mrirservicepopdf.php b/application/views/mrirservicepopdf.php deleted file mode 100755 index b04aba62..00000000 --- a/application/views/mrirservicepopdf.php +++ /dev/null @@ -1,501 +0,0 @@ -CompanyName; - $CompanyAddress = $CO->Address; - - } - } - - $currencyName='INR'; - $currencyCode =''; - if(!empty($CurrencySymbol)) - { - foreach ($CurrencySymbol as $Curr) - { - - $currencyCode = $Curr->FontCode2000; - //$currencyName = $currencyName; - - - } - - } - - - - - if(!empty($POItem)) - { - - foreach ($POItem as $PO) - { - - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - } - else{ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - } - $ServiceDescription =$PO->ServiceDescription; - if($PO->PaymentID!='PT08'){ - $PaymentTerms = $PO->PaymentTerms; - } - else{ - $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) '; - } - $AdvanceAmount=$PO->AdvanceAmount; - - } -} - - - ?> - - - - -
-
- DRAFT
'; - - // } - - ?> -
- -
PURCHASE ORDER - PO NO:/S
- - - - - - - - - - - - - - - - - - -
-

-

-
-

Vendor Address :

-


-
-

Delivery To :

-

-
PO DATE :  DELIVERY DATE / SCHEDULE BY :  
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Requistion NumberFrequencyRequistion DateRequested ByRequested DepartmentCost Center Code
- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - After_SGST; - $Cgst =$Cgst + $record->After_CGST; - $Igst = $Igst + $record->After_IGST; - - - } - - $TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst; - $OrderValue = $OrderValue + $SubTotalAmount + $TotalTax; - } - - ?> - - - -
#Item DescriptionHSN CodeUOMQtyRate In INRBasic Value In INR
ServiceMaterialDescription ; ?>HSNCODE ; ?>UOM ; ?>Quantity ; ?>Rate, 2, '.', ''); ?>NumberOfService==0 || $record->NumberOfService==''){ - echo number_format($record->BasicValue, 2, '.', ''); - $TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance; - $SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance; - } - else{ - echo number_format($record->BasicValue * $record->NumberOfService, 2, '.', ''); - $TotalAmount = $record->BasicValue * $record->NumberOfService + $record->Taxamount + $record->otherallowance; - $SubTotalAmount = $SubTotalAmount + $record->BasicValue * $record->NumberOfService + $record->otherallowance; - } - ?>
- -

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HSN
CGST

SGST

IGST

Tax Amt In INR
Other Allow In INR
Total Amount In INR
IN%AmtIN%AmtIN%Amt
HSNCODE ; ?>CGST ; ?>After_CGST, 2, '.', ''); ?>SGST ; ?>After_SGST, 2, '.', ''); ?>IGST ; ?>After_IGST, 2, '.', ''); ?>Taxamount, 2, '.', ''); ?>otherallowance, 2, '.', ''); ?>NumberOfService==0 || $record->NumberOfService==''){ - echo number_format($record->BasicValue + $record1->Taxamount + $record1->otherallowance, 2, '.', ''); - - } - else{ - echo number_format($record->BasicValue * $record->NumberOfService + $record1->Taxamount + $record1->otherallowance, 2, '.', ''); - - } - ?>
-

 

- - -

Payment Terms:

- - -
- -

Scope Of Work As Per Annexure:

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Total Amount In Words


- - - -

- - - -
Total Amount Before Tax In INR   
Total Tax Amount In INR   
Total Amount After Tax In INR   
Advance Paid   
Balance amount needs to pay   
-

 

- ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - -
 Released By : FirstName;?>
-
 Released On : format('d-m-Y');?>
- - - - - - - - - - -
- - - -

Certified that the particulars given above are true and correct

- - - -

- - - -

 

- - - -

Authorized Signatory

- -
- -
\ No newline at end of file diff --git a/application/views/revenuepopdf.php b/application/views/revenuepopdf.php index 7ae3286e..f218f824 100755 --- a/application/views/revenuepopdf.php +++ b/application/views/revenuepopdf.php @@ -1,4 +1,4 @@ -Address; $DeliveryAddress = $PO->DeliveryAddress; $postatus= $PO->Status; + $advance=$PO->AdvanceAmount; $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $Podt = $dt->format('d-m-Y'); if($PO->DeliveryOption=='1'){ @@ -49,17 +54,21 @@ $ServiceDescription =$PO->ServiceDescription; - if($PO->PaymentID!='PT08'){ $PaymentTerms = $PO->PaymentTerms; - } - else{ - $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) '; - } - + if($PaymentTerms=='Others'){ + $PaymentOtherDescription=$PO->PaymentOtherDescription; + } + + + + + } } - $currencyName='INR'; + + + $currencyName='INR'; $currencyCode =''; if(!empty($CurrencySymbol)) { @@ -73,20 +82,33 @@ } } + + if(!empty($ParentMaster)){ + foreach($ParentMaster as $pm){ + $PPaymentTerms = $pm->PaymentTerms; + + $PDeliverydate= $pm->DeliveryDate; + $dtDe = new DateTime($PDeliverydate, new DateTimeZone('Asia/Kolkata')); + $PDeliverydate = $dtDe->format('d-m-Y'); + $PDeliverySchedule=$pm->DeliverySchedule; + } + + } ?> +
- +
 
PURCHASE ORDER - PO NO:/R
- +
- + - + - - - + + +

@@ -110,47 +132,48 @@
-

Vendor Address :

-


+ Vendor Address : +

Delivery To :

-

+

PO DATE :   DELIVERY DATE / SCHEDULE BY :   
PO DATE :  DELIVERY DATE / SCHEDULE BY :  
- -
- +

 

+
+ +
- - - - - - - - + + + + + + + - + - + @@ -158,72 +181,82 @@
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center  
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center
format("Y-m-d"); echo $date; ?>
-

 

- - - - - - - - - - - - - - - 

--> +
#Item CodeItem  NameHSN CodeUOMQtyRate In INRBasic Value In INR
+ + + + + + + + + + + + + + BasicValue+$record->Taxamount; + ?> - + - - - - - + + + + + BasicValue; - BasicValue-$record->AfterDiscount; - $TotalTax = $TotalTax+$record->Taxamount; - $OrderValue = $SubTotalAmount + $TotalTax; + $AfterCGST =$AfterCGST + $record->AfterCGST; + $AfterSGST =$AfterSGST + $record->AfterSGST; + $AfterIGST =$AfterIGST + $record->AfterIGST; + $Insurance =$Insurance + $record->Insurance; + $AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue; + $AfterDiscount = $AfterDiscount + $record->AfterDiscount ; + $AfterPackaging=$AfterPackaging+$record->AfterPackagingValue; + $totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST+$Insurance+$AfterFreightValue+$AfterPackaging); } + +$OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insurance +$AfterFreightValue+$AfterPackaging) - $AfterDiscount) ; +}?> - - - } - ?> - - -
#Item CodeItem DescriptionHSN CodeUOMQtyRate In INRBasic Value In INR
MaterialCode ; ?> MaterialName ; ?>HSNCODE ; ?> + HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";} ; ?> UOM ; ?> Quantity ; ?>Rate ; ?>BasicValue, 2, '.', '') ;?>Rate ; ?>BasicValue,2,'.','') ; ?>
- -

 

- + + + 

@@ -232,153 +265,186 @@ + - + - - + + - + - + - + - + - + - - - - - - - - - - - - - - -FreightType=='PER TRIP'){ ?> - - -FreightType!='PER TRIP'){ ?> - - - - - - + + + + + + + + + + + + + + + + + + + - + + + -
SGST 

CGST  

IGST

Packaging In INR   Insurance In INR     Freight In INR Tax Amt In INR
Total Tax    Total Amount In INR 
Type
Value AmtTypeValue AmtTypeValue AmtTypeValue AmtTypeValue AmtTypeValue Amt
HSNCODE ; ?>DiscountType.'-'.$record1->DiscountValue; ?>AfterDiscount, 2, '.', ''); ?>SGST ; ?>AfterSGST, 2, '.', ''); ?>CGST ; ?>AfterCGST, 2, '.', ''); ?>IGST ; ?>AfterIGST, 2, '.', ''); ?>PackagingType.'-'. $record1->PackagingValue ; ?>AfterPackagingValue, 2, '.', ''); ?>Insurance, 2, '.', ''); ?>FreightType.'('.$record1->NoOfTrip.')-'. $record1->FreightValue;?>FreightType.'-'. $record1->FreightValue;?>AfterFreightValue, 2, '.', ''); ?>Taxamount, 2, '.', ''); ?>BasicValue+$record1->Taxamount-$record1->AfterDiscount), 2, '.', ''); ?>
HSNCODE)){echo $l->HSNCODE;}else{echo "NIL";} ; ?>DiscountType == 'PERCENTAGE'){$type="%";}else if($l->DiscountType == 'LUMP SUM'){$type="LS";}else if($l->DiscountType == 'NIL'){$type='';} echo $l->DiscountValue . $type;?>AfterDiscount;?>SGST."%";?>AfterSGST;?>CGST."%";?>AfterCGST;?>IGST."%";?>AfterIGST;?>PackagingType == 'PERCENTAGE'){$type="%";}else if($l->PackagingType == 'LUMP SUM'){$type="LS";}else if($l->PackagingType == 'NIL'){$type='';} echo $l->PackagingValue . $type;?>AfterPackagingValue;?>Insurance;?>FreightType == 'PER TRIP'){$type="TRIP"; echo $l->FreightValue ."*" . $l->NoOfTrip . $type;}else{ if($l->FreightType == 'LUMP SUM'){$type="LS";}else if($l->FreightType == 'NIL'){$type='';}else if($l->FreightType == 'PER UOM'){$type='UOM';}else if($l->FreightType == 'PERCENTAGE'){$type='%';} echo $l->PackagingValue . $type;}?>AfterFreightValue;?>AfterSGST+$l->AfterCGST+$l->AfterIGST+$l->AfterPackagingValue+$l->Insurance+$l->AfterFreightValue;echo number_format($tax,2);?>BasicValue + $tax)-($l->AfterDiscount)),2,'.','');?>
-

 

-

Payment Terms: 

+

+ + -

Special Instructions:

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

Total Amount In Words 


- -

- -
Total Amount Before Tax In INR   
Total Tax Amount In INR   
Total Amount After Tax In INR   
- -

+ ParentPO != ''){ + $i++; + } + } + } + if($i>0){ + ?> + + + + + + + + + + + + + + + + LineAmend ; + } + } ?> + +
+

Amended Details

+
+" . $v->AmendedDetails . ""; + break; + } +}?> +
Item DescriptionPrevious DetailsCurrent Details
+ +  +

Payment Terms :  

+ +
Special Instruction:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Total Amount In Words :

 Total Amount Before Tax In INR  
 Total Tax Amount In INR  
 Total Amount After Tax In INR  
Advance Amount Paid In INR  
Balance Needs to be pay In INR  
+ + + + ReleasedOn, new DateTimeZone('Asia/Kolkata')); - + ?> - - - +

 

-
 Released By : FirstName;?>
-
 Released On : format('d-m-Y');?>
+
Released By : FirstName;?>
+
Released On : format('d-m-Y');?>
- + +
+

 Certified that the particulars given above are true and correct

+

+

 

+

Authorized Signatory

+
+

 

+ + + + -
- -

Certified that the particulars given above are true and correct

- -

- -

 

- -

Authorized Signatory

-
-
-
- - -
\ No newline at end of file + + \ No newline at end of file diff --git a/application/views/servicepopdf.php b/application/views/servicepopdf.php index 2700c552..b5e9be69 100755 --- a/application/views/servicepopdf.php +++ b/application/views/servicepopdf.php @@ -1,5 +1,6 @@ DeliveryAddress; $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $Podt = $dt->format('d-m-Y'); + if($PO->DeliveryOption==1){ + $DeliverySchedule=$PO->DeliverySchedule; + $DeliveryDate=null; + $advance=$PO->AdvanceAmount; + }else if($PO->DeliveryOption==0) + { + + if(!empty($PO->DeliveryDate)){ $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; - $DeliverySchedule = $PO->DeliverySchedule; - } - else{ - $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - } + $DeliverySchedule=''; + } + } + // if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';} $ServiceDescription =$PO->ServiceDescription; - if($PO->PaymentID!='PT08'){ $PaymentTerms = $PO->PaymentTerms; - } - else{ - $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) '; - } + if($PaymentTerms=='Others'){ + $PaymentOtherDescription=$PO->PaymentOtherDescription; + } } } - ?> -