ALL PO PDF MERGERD

This commit is contained in:
velz2020 2017-08-17 21:31:43 +05:30
parent 123f055b90
commit 9f4e1b740f
19 changed files with 1011 additions and 4907 deletions

View File

@ -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 "<br><br>";
//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 "<br><br>";
// 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 "<br>" . $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)
{

View File

@ -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);
}

View File

@ -0,0 +1,20 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
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

View File

@ -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

View File

@ -1 +1 @@
<span style='color: #900'>8,192 KB</span> <span style='color: #090'>183.2461 ms</span><br />
<span style='color: #900'>12,800 KB</span> <span style='color: #090'>897.1789 ms</span><br />

View File

@ -73,7 +73,7 @@
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditAmendPO?PONO='.$record->PONO.'&ReqType='.$record->ReqType.'&CapitalRange='.$record->CapitalRange; ?>" ><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" href="<?php echo base_url().'EditAmendPO?PONO='.$record->PONO.'&ReqType='.$record->ReqType.'&CapitalRange='.$record->CapitalRange; ?>"> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url().'amendmentpurchaseorder/CreateAmendPOPrint?PONO='.$record->PONO.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<a data-toggle="tooltip" href="<?php echo base_url().'EditAmendPO?PONO='.$record->PONO.'&ReqType='.$record->ReqType.'&CapitalRange='.$record->CapitalRange; ?>"> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url().'purchaseorder/CreatePOPrint?PONO='.$record->PONO.'&ReqType='.$record->ReqType; ?>"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<?php
}?>
</tr>

View File

@ -1,408 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$ServiceDescription = '';
$ReqBy='';
$PaymentTerms='';
$PaymentDays='';
$PayableAT='';
$index=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->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;
}
}
?>
<style>
@page { margin: 310px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -310px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == 'ST026')
{}
else
{
echo '<div><b>DRAFT</b> </div>';
}
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/I </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;<?php echo $Podt?></td>
<td>DISPATCH INSTRUCTION/ SCHEDULE BY :&nbsp;&nbsp;<?php echo $Import_DispatchDetails.$DeliverySchedule;?></td>
<td>PLACE OF ORIGIN:&nbsp; <?php echo $PlaceofOrigin;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<tr>
<td style="text-align: center;"><?php echo $ReqNo;?></td>
<td style="text-align: center;">03/08/2017</td>
<td style="text-align: center;"><?php echo $ReqBy;?></td>
<td style="text-align: center;"><?php echo $DEPNAME?></td>
<td style="text-align: center;"><?php echo $CostCenterCode?></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<tr bgcolor="#8c8c8c" color="#fff">
<th style="text-align: center;">#</th>
<th style="text-align: center;">Item and Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<th style="text-align: center;">Rate per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th style="text-align: center;">Basic Price in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<!-- <th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th> -->
</tr>
<?php
if(!empty($POItem))
{
$BasicValue=0;
$ProductPrice = 0;
$AfterLandingCharge= 0;
$AfterHighSeasSalesCharge= 0;
$AfterCustomDuty = 0;
$AfterCustomEdCess = 0;
$AfterCustomSHCess = 0;
$AfterExciseDuty = 0;
$AfterExciseDutyEdCess = 0;
$ExciseDutySHCess = 0;
$AfterAddlExciseDuty = 0;
$Grossdutypayable = 0;
$AvailableModvat = 0;
$Grossexpensesduetocustomduty = 0;
$purchaseratePerKG=0;
$CustomDutyExpensesPerKG=0;
$RMCIncludingCustomersPerKG=0;
$AfterExciseDutySHCess=0;
$TotalOrderValue=0;
$index=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr>
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php echo $record->HSNCODE;?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2,'.','') ; ?></td>
<!-- <td align="right"><?php echo $record->TotalOrderValue; ?></td> -->
<!-- <td align="right"><?php $TotalOrderValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td> -->
</tr>
<?php
$AfterLandingCharge= $AfterLandingCharge+$record->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;
}
}
?>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
<div align="Left"> <b>Special Instructions :</b><br/><?php echo $ServiceDescription;?></div>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: 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 style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
echo $record->LineAmend ;
}
} ?>
</tbody>
</table>
<!-- <table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" colspan="3">&nbsp;<strong>Amended Details</strong></td>
</tr>
<tr>
<td colspan="3"><strong>Amended Payment Terms&nbsp;:</strong></td>
</tr>
<tr>
<td style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;">Previous Details</td>
<td style="text-align: center;">Current Details</td>
</tr>
<tr>
<td style="text-align: center;" rowspan="3">&nbsp;RMT022</td>
<td>&nbsp;Amended Qty :20.00</td>
<td>&nbsp;Current Qty : 5.00</td>
</tr>
<tr>
<td>&nbsp;Amended Rate :200.00</td>
<td>&nbsp;Current rate:500.00</td>
</tr>
<tr>
<td>&nbsp;Amended Insurance value: 40:00</td>
<td>&nbsp;Current Insurance Value :50:00</td>
</tr>
</tbody>
</table> -->
<p>&nbsp;</p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." ";?></em></td>
<td style="text-align: center;" ><strong>Total Amount In <?php echo "$CurrencyCode ($CurrencyName)" ;?> <?php echo "$TotalOrderValue1";?> </strong></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,387 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$AfterSGST =0.00;
$AfterCGST =0.00;
$AfterIGST =0.00;
$otherallowances =0.00;
$TotalAmount =0.00;
$SubTotalAmount =0.00;
$TaxAmount =0.00;
$BasicAmount = 0.00;
$ServiceDescription = '';
$totaltaxamount=0.00;
$PaymentOtherDescription='';
$NoOfServices=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->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;
}
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == 'ST026')
{}
else
{
echo '<div><b>DRAFT</b> </div>';
}
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/S </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Frequency</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("d-m-Y"); echo $date; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['Frequency']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr bgcolor="#8c8c8c" color="#fff">
<th style="text-align: center;">#</th>
<!--<th style="text-align: center;">Item Code</th>-->
<th style="text-align: center;">Service Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<th style="text-align: center;">Rate In INR</th>
<th style="text-align: center;">Basic Amount In INR</th>
</tr>
<?php
if(!empty($POItem))
{
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
foreach($POItem as $record)
{
$index = $index + 1;
if($record->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;
}
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->ServiceMaterialDescription ; ?></td>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";}?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php if($record->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,'.','');} ?></td>
</tr>
<?php
$SubTotalAmount = $SubTotalAmount + $TotalAmount;
$AfterSGST =$AfterSGST + $record->After_SGST;
$AfterCGST =$AfterCGST + $record->After_CGST;
$AfterIGST = $AfterIGST + $record->After_IGST;
$otherallowances =$otherallowances + $record->otherallowance;
$totaltaxamount=$totaltaxamount+$record->Taxamount;
}
$OrderValue = $SubTotalAmount+ $otherallowances;
}
?>
</table>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="2"><strong>HSN Code</strong></td>
<td style="text-align: center;" colspan="2"><strong>CGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>SGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong> <br /><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Total Tax Amt</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Other Allow In INR</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Total Amt In INR</strong></td>
</tr>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $l){ ?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";}?></td>
<td style="text-align: right;"><?php echo $l->CGST?>%</td>
<td style="text-align: right;"><?php echo $l->After_CGST?></td>
<td style="text-align: right;"><?php echo $l->SGST?>%</td>
<td style="text-align: right;"><?php echo $l->After_SGST?></td>
<td style="text-align: right;"><?php echo $l->IGST?>%</td>
<td style="text-align: right;"><?php echo $l->After_IGST?></td>
<td style="text-align: right;"><?php echo $l->Taxamount?></td>
<td style="text-align: right;"><?php echo $l->otherallowance?></td>
<td style="text-align: right;"><?php if($l->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,'.','');}?></td>
</tr>
<?php }}?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: 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 style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
echo $record->lineamenddetails ;
}
} ?>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?></p>
<div align="Left"> <b>Scope Of Work As Annixture :</b><br/><?php echo $ServiceDescription;?></div>
<div align="right">
&nbsp;
<table style="border-collapse: collapse;font-size:14px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" rowspan="3"><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords;?></em></td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format(($OrderValue - $totaltaxamount),2,'.','')?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format($totaltaxamount,2,'.','');?> </td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format($OrderValue,2,'.','');?></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -1,428 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$postatus='';
$ServiceDescription = '';
$PaymentTerms = '';
$PaymentOtherDescription='';
$type='';
$value='';
$amt='';
$totaltaxonly=0;
if(!empty($CompanyDetails))
{
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;
}
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;
}
}
?>
<style>
@page { margin: 240px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -240px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == 'ST026')
{}
else
{
echo '<div><b>DRAFT</b> </div>';
}
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/R </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr style="">
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr style="">
<td>
<strong>Vendor Address :</strong>
<?php echo $SuplierName?><br /><?php echo $SuplierAddress ?>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr style="">
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr style="background:#8c8c8c;color:#fff;">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
//print_r($RequistionDetails);die();
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr style="">
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("Y-m-d"); echo $date; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<!-- <p>&nbsp;</p> -->
<table width="100%">
<tr style="background:#8c8c8c;color:#fff;">
<th style="text-align: center;">#</th>
<th style="text-align: center;">Item Code</th>
<th style="text-align: center;">Item Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<th style="text-align: center;">Rate In INR</th>
<th style="text-align: center;">Basic Value In INR</th>
</tr>
<?php
if(!empty($POItem))
{
$SubTotalAmount = 0;
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
$AfterSGST = 0;
$AfterCGST = 0;
$AfterIGST = 0;
$Insurance = 0;
$AfterFreightValue = 0;
$AfterDiscount = 0;
$AfterPackaging = 0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr style="">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialCode ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";} ; ?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php echo $record->BasicValue ; ?></td>
</tr>
<?php
$SubTotalAmount = $SubTotalAmount + $record->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) ;
}?>
</table>
&nbsp;<p></p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr style="line-height: 1.5em;">
<td style="text-align: center;" rowspan="2"><strong>HSN Code</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>Discount In INR</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>SGST</strong>&nbsp;<br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>CGST&nbsp;</strong>&nbsp;<br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>Packaging In INR</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" rowspan="2"><strong>Insurance In INR</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" colspan="2">&nbsp;&nbsp;<strong>Freight In INR&nbsp;</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Total Tax</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" rowspan="2"><strong>&nbsp;Total Amount In INR</strong>&nbsp;</td>
</tr>
<tr style="line-height: 2.5em;"">
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
<?php if(!empty($POItem)){
foreach($POItem as $l)
{
$tax=0;
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php if(!empty($l->HSNCODE)){echo $l->HSNCODE;}else{echo "NIL";} ; ?></td>
<td style="text-align: right;"><?php if($l->DiscountType == 'PERCENTAGE'){$type="%";}else if($l->DiscountType == 'LUMP SUM'){$type="LS";}else if($l->DiscountType == 'NIL'){$type='';} echo $l->DiscountValue . $type;?></td>
<td style="text-align: right;"><?php echo $l->AfterDiscount;?></td>
<td style="text-align: right;"><?php echo $l->SGST."%";?></td>
<td style="text-align: right;"><?php echo $l->AfterSGST;?></td>
<td style="text-align: right;"><?php echo $l->CGST."%";?></td>
<td style="text-align: right;"><?php echo $l->AfterCGST;?></td>
<td style="text-align: right;"><?php echo $l->IGST."%";?></td>
<td style="text-align: right;"><?php echo $l->AfterIGST;?></td>
<td style="text-align: right;"><?php if($l->PackagingType == 'PERCENTAGE'){$type="%";}else if($l->PackagingType == 'LUMP SUM'){$type="LS";}else if($l->PackagingType == 'NIL'){$type='';} echo $l->PackagingValue . $type;?></td>
<td style="text-align: right;"><?php echo $l->AfterPackagingValue;?></td>
<td style="text-align: right;"><?php echo $l->Insurance;?></td>
<td style="text-align: right;"><?php if($l->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;}?></td>
<td style="text-align: right;"><?php echo $l->AfterFreightValue;?></td>
<td style="text-align: right;"><?php $tax=$l->AfterSGST+$l->AfterCGST+$l->AfterIGST+$l->AfterPackagingValue+$l->Insurance+$l->AfterFreightValue;echo number_format($tax,2);?></td>
<td style="text-align: right;"><?php echo number_format((($l->BasicValue + $tax)-($l->AfterDiscount)),2);?></td>
</tr>
<?php }
}?>
</tbody>
</table><br><br>
<p></p>
<?php //s$i=0; if(!empty($POItem)){foreach($POItem as $v){if(!empty($v->AmendedDetails)){$i++;}}} if($i<0){ ?>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: 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 style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
echo $record->LineAmend ;
}
} ?>
</tbody>
</table>
<?php //} ?>
&nbsp;
<p> <b>Payment Terms :</b> &nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?> </p>
<div> <b>Special Instruction:</b><br/><?php echo $ServiceDescription;?></div>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" rowspan="3"><strong>Total Amount In Words :</strong><br /><br /><b><i><?php echo $TotalAmountInWords;?></i></b></td>
<td style="text-align: right;">&nbsp;<strong>Total Amount Before Tax In INR :&nbsp; </strong></td>
<td style="text-align: right;"><?php echo number_format(($SubTotalAmount-$AfterDiscount),2); ?></td>
</tr>
<tr>
<td style="text-align: right;">&nbsp;<strong>Total Tax Amount In INR :&nbsp;<strong></td>
<td style="text-align: right;"><?php echo number_format($totaltaxonly,2);?></td>
</tr>
<tr>
<td style="text-align: right;">&nbsp;<strong>Total Amount After Tax In INR :&nbsp;</strong></td>
<td style="text-align: right;"> <?php echo number_format($OrderValue,2);?></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p>&nbsp;Certified that the particulars given above are true and correct</p>
<p><b style="font-size: small;"><?php echo $CompanyName; ?></b></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
</div>

View File

@ -1,355 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$ServiceDescription = '';
$index=0;
$dispatch="";
$PaymentDays='';
$PayableAT='';
$PaymentTerms='';
$PaymentOtherDescription='';
$DeliverySchedule='';
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->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;
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == PO_RELEASED)
{}
else
{
echo '<div><b>DRAFT</b> </div>';
}
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/C</a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr>
<td>PO DATE :<?php echo $Podt?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule.$dispatch;?></td>
<!--<td>PLACE OF ORIGIN:<?php echo $Placeoforigin; ?></td> if u need this field uncommend it and remove colspan="2" in delivery date / schedule by-->
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("Y-m-d"); echo $date; ?></td><!--Requistion Date code should come from DB-->
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table><p>&nbsp;</p>
<div class="page" style="font-size:14px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr bgcolor="#8c8c8c" color="#fff">
<th style="text-align: center;">#</th>
<th style="text-align: center;">Item and Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<?php if($currencyName!='INR'){ ?>
<th style="text-align: center;">Rate Per Unit in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th style="text-align: center;">Rate Per Unit in <?php echo "$currencyName";?></th><?php } ?>
<?php if($currencyName!='INR'){ ?>
<th style="text-align: center;">Total Amount in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th style="text-align: center;">Total Amount in <?php echo "$currencyName"; ?></th> <?php } ?>
</tr>
<?php
if(!empty($POItem))
{
$TotalOrderValue=0;
$index=0;
$BasicValue=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr>
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialCode;?>&nbsp;-&nbsp;<?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else {echo "NIL";}?></td>
<td style="text-align: center;"><?php echo $record->UOM; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td>
</tr>
<?php
$TotalOrderValue = $TotalOrderValue+$BasicValue;
}
}
?>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?></p>
<div align="Left"> <b>Special Instruction:</b><br/><?php echo $ServiceDescription;?></div>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" colspan="3">
<p>Amended Details</p>
</td>
</tr>
<tr>
<td colspan="3">
<?php
if(!empty($POItem))
{
foreach($POItem as $v)
{
if(!empty($v->AmendedDetails))
{
echo "<b>" . $v->AmendedDetails . "</b>";
break;
}
}
}?>
</td>
</tr>
<tr>
<td style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
if(!empty($record->lineamd)){
echo $record->lineamd ;
}
}
} ?>
</tbody>
</table>
<div align="right">
<p>&nbsp;</p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." "."Only.";?></em></td>
<td style="text-align: center;" ><?php if($currencyName!='INR'){ ?>
Total Order Amount in <?php echo "$currencyName"."("."$currencyCode".")" ?><?php } else { ?><b>Total Order Amount in <?php echo "$currencyName"; ?><?php } ?> </b> <br/><?php if($currencyName!='INR'){ ?><?php echo number_format($TotalOrderValue,2); } else {?> <?php echo number_format($TotalOrderValue,2);}?></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -1,6 +1,8 @@
<?php
$PONO = '';
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
@ -9,66 +11,72 @@
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$postatus='';
$ServiceDescription = '';
$PaymentTerms = '';
$index=0;
$dispatch="";
$PaymentDays='';
$PayableAT='';
$DeliverySchedule='';
$Import_DispatchDetails='';
$Placeoforigin='';
$ExchangeRate='';
$CapitalRange='';
if(!empty($CompanyDetails))
$PayableAT='';
$PaymentTerms='';
$PaymentOtherDescription='';
$DeliverySchedule='';
$advance=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->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 @@
}
}
?>
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
@ -90,10 +101,11 @@
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == PO_RELEASED || $postatus == PO_SERVICE_COMPLETED || $postatus == MRIR_APPROVED || $postatus == MRIR_REJECTED || $postatus == IGR_CREATED)
if ($postatus == PO_RELEASED)
{}
else
{
@ -103,15 +115,14 @@
?>
</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/C </a></span></center>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/C</a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="3">
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
@ -120,43 +131,34 @@
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
<p><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?></p>
</td>
<td colspan="3">
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<?php if ($CapitalRange =='0') { ?>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt; ?></td>
<td colspan="2">DISPATCH / SCHEDULE BY :&nbsp;&nbsp;<?php echo $Import_DispatchDetails.$DeliverySchedule;?></td>
<td>PLACE OF ORIGIN:<?php echo $Placeoforigin; ?></td>
</tr><?php } else {?>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt; ?></td>
<td colspan="3">DELIVERY DATE/ SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr><?php }?>
<td>PO DATE :<?php echo $Podt?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :<?php echo $DeliveryDate.$DeliverySchedule.$dispatch;?></td>
<!--<td>PLACE OF ORIGIN:<?php echo $Placeoforigin; ?></td> if u need this field uncommend it and remove colspan="2" in delivery date / schedule by-->
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td>Requistion Number</td>
<td>Requistion Date</td>
<td>Requested By</td>
<td>Requested Department</td>
<td>Cost Center &nbsp;</td>
</tr>
<?php
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
@ -165,128 +167,172 @@
?>
<tr>
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
<td><?php echo $ReqDetails['ReqDate']; ?></td><!--Requistion Date code should come from DB-->
<td><?php echo $ReqDetails['RequestedName']; ?></td>
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("Y-m-d"); echo $date; ?></td><!--Requistion Date code should come from DB-->
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<th>#</th>
<th>Item Code</th>
<th>Item Name</th>
<th>HSN Code</th>
<th>Qty</th>
<th>UOM</th>
</table><p>&nbsp;</p>
<div class="page" style="font-size:14px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr bgcolor="#8c8c8c" color="#fff">
<th style="text-align: center;">#</th>
<th style="text-align: center;">Item and Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<?php if($currencyName!='INR'){ ?>
<th>Rate Per Unit in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<th style="text-align: center;">Rate Per Unit in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th style="text-align: center;">Rate Per Unit in <?php echo "$currencyName";?></th><?php } ?>
<th>Rate Per Unit in <?php echo "$currencyName";?></th><?php } ?>
<?php if($currencyName!='INR'){ ?>
<th>Total Amount in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php if($currencyName!='INR'){ ?>
<th style="text-align: center;">Total Amount in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th style="text-align: center;">Total Amount in <?php echo "$currencyName"; ?></th> <?php } ?>
</tr>
<th>Total Amount in <?php echo "$currencyName";?></th><?php } ?>
<?php
if(!empty($POItem))
{
$TotalOrderValue=0;
$index=0;
$BasicValue=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
</tr>
<?php
if(!empty($POItem))
{
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
foreach($POItem as $record)
{
$index = $index + 1;
$OrderValue= $OrderValue + $record->Quantity*$record->Rate;
?>
<tr style="line-height: 1.5em;">
<td><?php echo $index ; ?></td>
<td> <?php echo $record->MaterialCode ; ?></td>
<td><?php echo $record->MaterialName ; ?></td>
<td><?php echo $record->HSNCODE ; ?></td>
<tr>
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialCode;?>&nbsp;-&nbsp;<?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else {echo "NIL";}?></td>
<td style="text-align: center;"><?php echo $record->UOM; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo number_format(($record->Rate),2, '.', '') ; ?></td>
<td align="right"><?php echo number_format(($record->Quantity * $record->Rate),2, '.', '');?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity * $record->Rate);
echo number_format($BasicValue,2) ; ?></td>
</tr>
<?php
$TotalOrderValue = $TotalOrderValue+$BasicValue;
}
}
?>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?></p>
<div align="Left"> <b>Special Instruction:</b><br/><?php echo $ServiceDescription;?></div>
<?php
$i=0;
if(!empty($POItem))
{
foreach($POItem as $x){
if($x->ParentPO != ''){
$i++;
}
}
}
if($i>0){
?>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" colspan="3">
<p>Amended Details</p>
</td>
</tr>
<tr>
<td colspan="3">
<?php
if(!empty($POItem))
{
</tr>
<?php
}
}
?>
foreach($POItem as $v)
{
if(!empty($v->AmendedDetails))
{
echo "<b>" . $v->AmendedDetails . "</b>";
break;
}
}
}?>
</td>
</tr>
<tr>
<td style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
<p><strong>Special Instruction:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
if(!empty($record->lineamd)){
echo $record->lineamd ;
}
}
} ?>
</tbody>
</table>
<?php } ?>
<div align="right">
<p>&nbsp;</p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords.".";?></em></td>
<td style="text-align: center;" ><?php if($currencyName!='INR'){ ?>
<td style="text-align: right;" rowspan="3"><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords;?></em></td>
<?php if($currencyName!='INR'){ ?>
<td style="text-align: right;" >
<strong>Total Order Amount in</strong> </td><td style="text-align: right;"><?php echo "$currencyName"."("."$currencyCode".")" . number_format($TotalOrderValue,2,'.','');?><?php }
else {
?><b><strong>Total Order Amount in</strong> <?php echo "$currencyName" . number_format($TotalOrderValue,2); ?><?php
} ?>
Total Order Amount in <?php echo "$currencyName"."("."$currencyCode".")" ?><?php } else { ?><b>Total Order Amount in <?php echo "$currencyName"; ?><?php } ?> </b> <br/><?php if($currencyName!='INR'){ ?><?php echo number_format($OrderValue,2, '.', ''); } else {?> <?php echo number_format($OrderValue,2, '.', '');}?></td>
</td></tr>
<tr><td style="text-align: right;" ><strong>Advance Paid In &nbsp; </strong></td> <td style="text-align: right;"><?php echo "$currencyName ($currencyCode)" ;?>&nbsp;<?php echo number_format($advance,2,'.','');?> </strong></td></tr>
<tr><td style="text-align: right;" ><strong>Balance amount needs to pay&nbsp; </strong></td> <td style="text-align: right;"> <?php echo "$currencyName ($currencyCode)" ;?>&nbsp;<?php echo number_format(($TotalOrderValue - $advance),2,'.','');?> </strong></td>
</tr>
<tr>
<td>
<?php
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
@ -299,16 +345,16 @@
}
}
else {
?>
<?php } ?>
<?php } ?>
</td>
<td style="text-align: center;">
<td style="text-align: center;" colspan="2">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
@ -316,10 +362,17 @@
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
</table>
</div>
</div>
<p>&nbsp;</p>
</div>

View File

@ -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 @@
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == PO_RELEASED || $postatus == PO_SERVICE_COMPLETED || $postatus == MRIR_APPROVED || $postatus == MRIR_REJECTED || $postatus == IGR_CREATED)
if ($postatus == 'ST026')
{}
else
{
@ -150,9 +155,9 @@
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt?></td>
<td>PO DATE :&nbsp;<?php echo $Podt?></td>
<td>DISPATCH INSTRUCTION/ SCHEDULE BY :&nbsp;&nbsp;<?php echo $Import_DispatchDetails.$DeliverySchedule;?></td>
<td>PLACE OF ORIGIN:&nbsp;&nbsp;<?php echo $Placeoforigin; ?></td>
<td>PLACE OF ORIGIN:&nbsp; <?php echo $PlaceofOrigin;?></td>
</tr>
</tbody>
</table>
@ -164,35 +169,36 @@
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td>Requistion Number</td>
<td>Requistion Date</td>
<td>Requested By</td>
<td>Requested Department</td>
<td>Cost Center Code</td>
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<tr>
<td><?php echo $ReqNo;?></td>
<td><?php echo $ReqDate;?></td><!--Requistion Date code should come from DB-->
<td><?php echo $ReqBy;?></td>
<td><?php echo $DEPNAME?></td>
<td><?php echo $CostCenterCode?></td>
<td style="text-align: center;"><?php echo $ReqNo;?></td>
<td style="text-align: center;">03/08/2017</td>
<td style="text-align: center;"><?php echo $ReqBy;?></td>
<td style="text-align: center;"><?php echo $DEPNAME?></td>
<td style="text-align: center;"><?php echo $CostCenterCode?></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<tr bgcolor="#8c8c8c" color="#fff">
<th align="center">#</th>
<th align="center">Item and Description</th>
<th align="center">HSN Code</th>
<th align="center">Qty</th>
<th style="text-align: center;">#</th>
<th style="text-align: center;">Item and Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<th align="center">UOM</p>
<th align="center">Rate per unit in&nbsp; <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th align="center">Basic Price in&nbsp; <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th align="center">Total Amount in&nbsp; <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th style="text-align: center;">Rate per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th style="text-align: center;">Basic Price in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<!-- <th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th> -->
</tr>
@ -230,18 +236,19 @@
<tr>
<td align="center"><?php echo $index ; ?></td>
<td align="center"><?php echo $record->MaterialName ; ?></td>
<td align="center"><?php echo $record->HSNCODE;?></td><!--HSN code should come from DB-->
<td align="center"><?php echo $record->Quantity ; ?></td>
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php echo $record->HSNCODE;?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="center"><?php echo $record->UOM ; ?></td>
<td align="center"><?php echo number_format(($record->Rate),2, '.', '') ; ?></td>
<td align="center"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2, '.', '') ; ?></td>
<!-- <td align="right"><?php echo number_format(($record->TotalOrderValue),2); ?></td> -->
<td align="center"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2, '.', '') ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2,'.','') ; ?></td>
<!-- <td align="right"><?php echo $record->TotalOrderValue; ?></td> -->
<!-- <td align="right"><?php $TotalOrderValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td> -->
</tr>
@ -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 @@
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
<div align="Left"> <b>Special Instructions :</b><br/><?php echo $ServiceDescription;?></div>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
<div align="Left"> <b>Special Instructions :</b><br/><?php echo $ServiceDescription;?></div>
<?php
$i=0;
if(!empty($POItem))
{
foreach($POItem as $x){
if($x->ParentPO != ''){
$i++;
}
}
}
if($i>0){
?>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: 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 style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
echo $record->LineAmend ;
}
} ?>
</tbody>
</table>
<?php } ?>
<!-- <table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" colspan="3">&nbsp;<strong>Amended Details</strong></td>
</tr>
<tr>
<td colspan="3"><strong>Amended Payment Terms&nbsp;:</strong></td>
</tr>
<tr>
<td style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;">Previous Details</td>
<td style="text-align: center;">Current Details</td>
</tr>
<tr>
<td style="text-align: center;" rowspan="3">&nbsp;RMT022</td>
<td>&nbsp;Amended Qty :20.00</td>
<td>&nbsp;Current Qty : 5.00</td>
</tr>
<tr>
<td>&nbsp;Amended Rate :200.00</td>
<td>&nbsp;Current rate:500.00</td>
</tr>
<tr>
<td>&nbsp;Amended Insurance value: 40:00</td>
<td>&nbsp;Current Insurance Value :50:00</td>
</tr>
</tbody>
</table> -->
<p>&nbsp;</p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." ";?></em></td>
<td style="text-align: center;" ><strong>Total Amount In <?php echo "$CurrencyCode ($CurrencyName)" ;?> <?php echo $TotalOrderValue;?> </strong></td>
<td style="text-align: center;" rowspan="3"><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." ";?></em></td>
<td style="text-align: right;" ><strong>Total Amount In&nbsp; </strong></td> <td style="text-align: right;"><?php echo "$CurrencyCode ($CurrencyName)" ;?>&nbsp;<?php echo number_format($TotalOrderValue1,2,'.','');?> </strong></td></tr>
<tr><td style="text-align: right;" ><strong>Advance Paid In &nbsp; </strong></td> <td style="text-align: right;"><?php echo "$CurrencyCode ($CurrencyName)" ;?>&nbsp;<?php echo number_format($advance,2,'.','');?> </strong></td></tr>
<tr><td style="text-align: right;" ><strong>Balance amount needs to pay&nbsp; </strong></td> <td style="text-align: right;"> <?php echo "$CurrencyCode ($CurrencyName)" ;?>&nbsp;<?php echo number_format(($TotalOrderValue1 - $advance),2,'.','');?> </strong></td>
</tr>
<tr>
<td>
<?php
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
@ -312,9 +401,9 @@
?>
<?php } ?>
<?php } ?>
</td>
<td style="text-align: center;">
<td style="text-align: center;" colspan="2">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
@ -323,9 +412,10 @@
</tr>
</tbody>
</table>
</div>

View File

@ -1,352 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$postatus='';
$ServiceDescription = '';
$PaymentTerms = '';
$PaymentDays='';
$PayableAT='';
$DeliverySchedule='';
$Import_DispatchDetails='';
$Placeoforigin='';
$ExchangeRate='';
$CapitalRange='';
$AdvanceAmount=0.00;
$color='';
if(!empty($CompanyDetails))
{
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;
}
$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;
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
// if ($postatus == 'ST026')
// {}
// else
// {
// echo '<div><b>DRAFT</b> </div>';
// }
?>
</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/C </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="3">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
</td>
<td colspan="3">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
</td>
</tr>
<?php if ($CapitalRange =='0') { ?>
<tr>
<td>PO DATE :<?php echo $Podt; ?></td>
<td>DISPATCH / SCHEDULE BY : <?php echo $Import_DispatchDetails.$DeliverySchedule;?></td>
<td colspan="2">PLACE OF ORIGIN: <?php echo $Placeoforigin; ?></td>
<!--<td>EXCHANGE RATE:<?php echo $ExchangeRate; ?></td> -->
</tr><?php } else {?>
<tr>
<td>PO DATE :<?php echo $Podt; ?></td>
<td colspan="3">DELIVERY DATE/ SCHEDULE BY : <?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr><?php }?>
</tbody>
</table>
</div>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>Requistion Number</td>
<td>Requistion Date</td>
<td>Requested By</td>
<td>Requested Department</td>
<td>Cost Center &nbsp;</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<td><?php echo $ReqDetails['RequistionNo']; ?></td>
<!-- <td>2017/8/2</td> -->
<td><?php echo $ReqDetails['ReqDate'];?></td>
<td><?php echo $ReqDetails['RequestedName']; ?></td>
<td><?php echo $ReqDetails['RequestedDept']; ?></td>
<td><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th>#</th>
<th>Item Code</th>
<th>Item Name</th>
<th>HSN Code</th>
<th>UOM</p>
<th>Qty</th>
<?php if($currencyName!='INR'){ ?>
<th>Rate Per Unit in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th>Rate Per Unit in <?php echo "$currencyName";?></th><?php } ?>
<?php if($currencyName!='INR'){ ?>
<th>Total Amount in <?php echo "$currencyName"."("."$currencyCode".")"?></th>
<?php
} else{
?>
<th>Total Amount in <?php echo "$currencyName";?></th><?php } ?>
</tr>
<?php
if(!empty($POItem))
{
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
foreach($POItem as $record)
{
$index = $index + 1;
$OrderValue= $OrderValue + $record->Quantity*$record->Rate;
?>
<tr style="line-height: 1.5em;">
<td><?php echo $index ; ?></td>
<td> <?php echo $record->MaterialCode ; ?></td>
<td><?php echo $record->MaterialName ; ?></td>
<td><?php echo $record->HSNCODE ;?></td>
<td align="right"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo number_format(($record->Rate),2, '.', '') ; ?></td>
<td align="right"><?php echo number_format(($record->Quantity * $record->Rate),2, '.', '');?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p><strong>Payment Terms</strong></p>
<p><?php echo $PaymentTerms;?></p>
<p><strong>Special Instruction:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" rowspan="3" ><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords." ";?></em></td>
<td style="text-align: right;" ><strong><?php if($currencyName!='INR'){ ?>
Total Order Amount in <?php echo "$currencyName"."("."$currencyCode".")" ?><?php } else { ?><b>Total Order Amount in <?php echo "$currencyName"; ?><?php } ?> </b></strong></td>
<td align="right"><?php if($currencyName!='INR'){ ?><?php echo number_format($OrderValue,2); } else {?> <?php echo number_format($OrderValue,2, '.', '');}?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Advance Amount Paid </strong></td>
<td align="right"><?php echo $AdvanceAmount?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount To Pay In INR</strong></td>
<td align="right"><?php echo number_format(($OrderValue-$AdvanceAmount),2)?></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>

View File

@ -1,369 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$ServiceDescription = '';
$ReqBy='';
$PaymentTerms='';
$PaymentDays='';
$PayableAT='';
$Placeoforigin='';
$Import_DispatchDetails='';
$ReqDate='';
$AdvanceAmount=0.00;
$color='';
$ReqDate='';
$Total='';
$index=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->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;
}
}
?>
<style>
@page { margin: 310px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -310px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
// if ($postatus == 'ST026')
// {}
// else
// {
// echo '<div><b>DRAFT</b> </div>';
// }
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/I </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt?></td>
<td>DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $Import_DispatchDetails.$DeliverySchedule;?></td>
<td>PLACE OF ORIGIN:&nbsp;&nbsp;<?php echo $Placeoforigin; ?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td>Requistion Number</td>
<td>Requistion Date</td>
<td>Requested By</td>
<td>Requested Department</td>
<td>Cost Center Code</td>
</tr>
<tr>
<td><?php echo $ReqNo;?></td>
<!-- <td>01/08/2017</td> --><!--Requistion Date code should come from DB-->
<td><?php echo $ReqDate;?></td>
<td><?php echo $ReqBy;?></td>
<td><?php echo $DEPNAME?></td>
<td><?php echo $CostCenterCode?></td>
</tr>
</tbody>
</table>
<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="1" width="100%" >
<tr bgcolor="#8c8c8c" color="#fff">
<th align="center">#</th>
<th align="center">Item and Description</th>
<th align="center">HSN Code</th>
<th align="center">Qty</th>
<th align="center">UOM</p>
<th align="center">Rate per unit in&nbsp; <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th align="center">Basic Price in&nbsp; <?php echo "$CurrencyCode ($CurrencyName)"?></th>
<th align="center">Total Amount in&nbsp; <?php echo "$CurrencyCode ($CurrencyName)"?></th>
</tr>
<?php
if(!empty($POItem))
{
$BasicValue=0;
$ProductPrice = 0;
$AfterLandingCharge= 0;
$AfterHighSeasSalesCharge= 0;
$AfterCustomDuty = 0;
$AfterCustomEdCess = 0;
$AfterCustomSHCess = 0;
$AfterExciseDuty = 0;
$AfterExciseDutyEdCess = 0;
$ExciseDutySHCess = 0;
$AfterAddlExciseDuty = 0;
$Grossdutypayable = 0;
$AvailableModvat = 0;
$Grossexpensesduetocustomduty = 0;
$purchaseratePerKG=0;
$CustomDutyExpensesPerKG=0;
$RMCIncludingCustomersPerKG=0;
$AfterExciseDutySHCess=0;
$TotalOrderValue=0;
$index=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr>
<td align="center"><?php echo $index ; ?></td>
<td align="center"><?php echo $record->MaterialName ; ?></td>
<td align="center"><?php echo $record->HSNCODE;?></td><!--HSN code should come from DB-->
<td align="center"><?php echo $record->Quantity ; ?></td>
<td align="center"><?php echo $record->UOM ; ?></td>
<td align="center"><?php echo number_format(($record->Rate),2, '.', '') ; ?></td>
<td align="center"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2, '.', '') ; ?></td>
<!-- <td align="right"><?php echo number_format(($record->TotalOrderValue),2); ?></td> -->
<td align="center"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2, '.', '') ; ?></td>
</tr>
<?php
$AfterLandingCharge= $AfterLandingCharge+$record->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;
}
}
?>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
<div align="Left"> <b>Special Instructions :</b><br/><?php echo $ServiceDescription;?></div>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" rowspan="3">
<p><strong>Total Amount In Words&nbsp;</strong><br /><br /><br /></p>
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p></td>
<td style="text-align: right;"><strong>Total Amount In <?php echo "$CurrencyCode ($CurrencyName)" ;?> &nbsp;</strong></td>
<td style="text-align: right;" colspan="2"><strong><?php echo number_format($Total, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Advance Paid &nbsp;</strong></td>
<td style="text-align: right;" colspan="2"><strong><?php echo number_format($AdvanceAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Balance amount needs to pay &nbsp;</strong></td>
<td style="text-align: right;" colspan="2"><strong><?php echo number_format(($Total-$AdvanceAmount), 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="3">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,401 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$postatus='';
$ServiceDescription = '';
$PaymentTerms = '';
$PaymentDays='';
$PayableAT='';
$DeliverySchedule='';
$AdvanceAmount=0.00;
if(!empty($CompanyDetails))
{
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;
}
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;
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
// if ($postatus == 'ST026')
// {}
// else
// {
// echo '<div><b>DRAFT</b> </div>';
// }
?>
</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/R </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;&nbsp;<?php echo $Podt; ?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center &nbsp;</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['ReqDate']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">#</td>
<td style="text-align: center;">Item Code</td>
<td style="text-align: center;">Item &nbsp;Name</td>
<td style="text-align: center;">HSN Code</td>
<td style="text-align: center;">UOM</td>
<td style="text-align: center;">Qty</td>
<td style="text-align: center;">Rate In INR</td>
<td style="text-align: center;">Basic Value In INR</td>
</tr>
<?php
if(!empty($POItem))
{
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
$TotalTax = 0;
$SubTotalAmount = 0;
foreach($POItem as $record)
{
$index = $index + 1;
$TotalAmount = $record->BasicValue+$record->Taxamount;
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialCode ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php echo $record->HSNCODE ; ?>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php echo number_format($record->BasicValue, 2, '.', '') ;?></td>
</tr>
<?php
$SubTotalAmount = $SubTotalAmount + $record->BasicValue-$record->AfterDiscount;
$TotalTax = $TotalTax+$record->Taxamount;
$OrderValue = $SubTotalAmount + $TotalTax;
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr style="line-height: 1.5em;">
<td style="text-align: center;" rowspan="2"><strong>HSN Code</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>Discount In INR</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>SGST</strong>&nbsp;<br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>CGST&nbsp;</strong>&nbsp;<br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>Packaging In INR</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" rowspan="2"><strong>Insurance In INR</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" colspan="2">&nbsp;&nbsp;<strong>Freight In INR&nbsp;</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Tax Amt In INR</strong><br /></td>
<td style="text-align: center;" rowspan="2"><strong>&nbsp;Total Amount In INR</strong>&nbsp;</td>
</tr>
<tr style="line-height: 2.5em;">
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
<?php if(!empty($POItem)) {
foreach($POItem as $record1)
{
?>
<tr style="line-height: 1.5em;">
<td style="text-align: right;"><?php echo $record1->HSNCODE ; ?></td>
<td style="text-align: right;"><?php echo $record1->DiscountType.'-'.$record1->DiscountValue; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterDiscount, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->SGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterSGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->CGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterCGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->IGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterIGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->PackagingType.'-'. $record1->PackagingValue ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterPackagingValue, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->Insurance, 2, '.', ''); ?></td>
<?php if($record1->FreightType=='PER TRIP'){ ?>
<td style="text-align: right;"><?php echo $record1->FreightType.'('.$record1->NoOfTrip.')-'. $record1->FreightValue;?></td>
<?php } ?>
<?php if($record1->FreightType!='PER TRIP'){ ?>
<td style="text-align: right;"><?php echo $record1->FreightType.'-'. $record1->FreightValue;?></td>
<?php } ?>
<td style="text-align: right;"><?php echo number_format($record1->AfterFreightValue, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->Taxamount, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format(($record1->BasicValue+$record1->Taxamount-$record1->AfterDiscount), 2, '.', ''); ?></td>
</tr>
<?php }
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
<p><strong>Special Instructions:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="5">
<p><strong>Total Amount In Words&nbsp;</strong><br /><br /><br /></p>
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
</td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($SubTotalAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($TotalTax, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($OrderValue, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Advance Paid &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($AdvanceAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Balance amount needs to pay &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format(($OrderValue-$AdvanceAmount), 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p style="text-align: center;">Certified that the particulars given&nbsp;above are true and correct</p>
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
<p>&nbsp;</p>
<p style="text-align: center;">Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
</div>

View File

@ -1,501 +0,0 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$Cgst=0.00;
$Sgst =0.00;
$Igst =0.00;
$TotalAmount =0.00;
$SubTotalAmount =0.00;
$TaxAmount =0.00;
$BasicAmount = 0.00;
$OtherAllowance = 0.00;
$ServiceDescription = '';
$PaymentTerms='';
$TotalTax = 0.00;
$OrderValue = 0.00;
$AdvanceAmount=0.00;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->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;
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
// if ($postatus == 'ST026')
// { }
// else
// {
// echo '<div><b>DRAFT</b> </div>';
// }
?>
</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/S </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt; ?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Frequency</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center Code</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['Frequency']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['ReqDate']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">#</td>
<td style="text-align: center;">Item Description</td>
<td style="text-align: center;">HSN Code</td>
<td style="text-align: center;">UOM</td>
<td style="text-align: center;">Qty</td>
<td style="text-align: center;">Rate In INR</td>
<td style="text-align: center;">Basic Value In INR</td>
</tr>
<?php
if(!empty($POItem))
{
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
$TotalTax = 0;
$SubTotalAmount=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->ServiceMaterialDescription ; ?></td>
<td style="text-align: center;"><?php echo $record->HSNCODE ; ?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo number_format($record->Rate, 2, '.', ''); ?></td>
<td align="right"><?php if($record->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;
}
?></td>
</tr>
<?php
$Sgst =$Sgst + $record->After_SGST;
$Cgst =$Cgst + $record->After_CGST;
$Igst = $Igst + $record->After_IGST;
}
$TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst;
$OrderValue = $OrderValue + $SubTotalAmount + $TotalTax;
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="2"><strong>HSN</strong><br /></td>
<td style="text-align: center;" colspan="2"><strong>CGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>SGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong> <br /><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Tax Amt In INR</strong><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Other Allow In INR</strong><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Total Amount In INR</strong></td>
</tr>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><strong>IN%</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>IN%</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>IN%</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
<?php if(!empty($POItem)) {
foreach($POItem as $record1)
{
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $record1->HSNCODE ; ?></td>
<td style="text-align: right;"><?php echo $record1->CGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->After_CGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->SGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->After_SGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->IGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->After_IGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->Taxamount, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->otherallowance, 2, '.', ''); ?></td>
<td align="right"><?php if($record->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, '.', '');
}
?></td>
</tr>
<?php }
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong> <?php echo $PaymentTerms;?></p>
<br/>
<p><strong>Scope Of Work As Per Annexure:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="5">
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
</td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($SubTotalAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($TotalTax, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($OrderValue, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Advance Paid &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($AdvanceAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Balance amount needs to pay &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format(($OrderValue-$AdvanceAmount), 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td>
<p>&nbsp;</p>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p style="text-align: center;">Certified that the particulars given&nbsp;above are true and correct</p>
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
<p>&nbsp;</p>
<p style="text-align: center;">Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,4 +1,4 @@
<?php
<?php
$PONO = '';
$postatus ='';
@ -9,12 +9,16 @@
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$postatus='';
$ServiceDescription = '';
$PaymentTerms = '';
$PaymentDays='';
$PayableAT='';
$DeliverySchedule='';
$PaymentTerms = '';
$PaymentOtherDescription='';
$type='';
$value='';
$amt='';
$totaltaxonly=0;
$advance=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
@ -35,6 +39,7 @@
$SuplierAddress = $PO->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;
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
@page { margin: 240px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -240px; right: 0px; height: 550px;text-align: center; }
.footer { position: fixed; bottom: 0px; }
.pagenum:before { content: counter(page); }
</style>
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<?php
if ($postatus == PO_RELEASED || $postatus == PO_SERVICE_COMPLETED || $postatus == MRIR_APPROVED || $postatus == MRIR_REJECTED || $postatus == IGR_CREATED)
if ($postatus == 'ST026')
{}
else
{
@ -96,13 +118,13 @@
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/R </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<tr style="">
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
@ -110,47 +132,48 @@
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<tr style="">
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
<strong>Vendor Address :</strong>
<?php echo $SuplierName?><br /><?php echo $SuplierAddress ?>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;&nbsp;<?php echo $Podt; ?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
<tr style="">
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<p>&nbsp;</p>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center &nbsp;</td>
</tr>
<?php
<tr style="background:#8c8c8c;color:#fff;">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
//print_r($RequistionDetails);die();
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<tr style="">
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['ReqDate']; ?></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("Y-m-d"); echo $date; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
@ -158,72 +181,82 @@
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">#</td>
<td style="text-align: center;">Item Code</td>
<td style="text-align: center;">Item &nbsp;Name</td>
<td style="text-align: center;">HSN Code</td>
<td style="text-align: center;">UOM</td>
<td style="text-align: center;">Qty</td>
<td style="text-align: center;">Rate In INR</td>
<td style="text-align: center;">Basic Value In INR</td>
</tr>
<?php
<!-- <p>&nbsp;</p> -->
<table width="100%">
<tr style="background:#8c8c8c;color:#fff;">
<th style="text-align: center;">#</th>
<th style="text-align: center;">Item Code</th>
<th style="text-align: center;">Item Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<th style="text-align: center;">Rate In INR</th>
<th style="text-align: center;">Basic Value In INR</th>
</tr>
<?php
if(!empty($POItem))
{
$SubTotalAmount = 0;
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
$TotalTax = 0;
$SubTotalAmount = 0;
$AfterSGST = 0;
$AfterCGST = 0;
$AfterIGST = 0;
$Insurance = 0;
$AfterFreightValue = 0;
$AfterDiscount = 0;
$AfterPackaging = 0;
foreach($POItem as $record)
{
$index = $index + 1;
$TotalAmount = $record->BasicValue+$record->Taxamount;
?>
<tr style="line-height: 1.5em;">
<tr style="">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialCode ; ?></td>
<td style="text-align: center;"><?php echo $record->MaterialName ; ?></td>
<td style="text-align: center;"><?php echo $record->HSNCODE ; ?>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";} ; ?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php echo number_format($record->BasicValue, 2, '.', '') ;?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php echo number_format($record->BasicValue,2,'.','') ; ?></td>
</tr>
<?php
$SubTotalAmount = $SubTotalAmount + $record->BasicValue;
<?php
$SubTotalAmount = $SubTotalAmount + $record->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) ;
}?>
}
?>
</tbody>
</table>
<p>&nbsp;</p>
</table>
&nbsp;<p></p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr style="line-height: 1.5em;">
@ -232,153 +265,186 @@
<td style="text-align: center;" colspan="2"><strong>SGST</strong>&nbsp;<br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>CGST&nbsp;</strong>&nbsp;<br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong><br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>Packaging In INR</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" rowspan="2"><strong>Insurance In INR</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" colspan="2">&nbsp;&nbsp;<strong>Freight In INR&nbsp;</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Tax Amt In INR</strong><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Total Tax</strong>&nbsp;&nbsp;</td>
<td style="text-align: center;" rowspan="2"><strong>&nbsp;Total Amount In INR</strong>&nbsp;</td>
</tr>
<tr style="line-height: 2.5em;">
<td style="text-align: center;"><strong>Type</strong></td>
<tr style="line-height: 2.5em;"">
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Type</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
<?php if(!empty($POItem)) {
foreach($POItem as $record1)
{
?>
<tr style="line-height: 1.5em;">
<td style="text-align: right;"><?php echo $record1->HSNCODE ; ?></td>
<td style="text-align: right;"><?php echo $record1->DiscountType.'-'.$record1->DiscountValue; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterDiscount, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->SGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterSGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->CGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterCGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->IGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterIGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->PackagingType.'-'. $record1->PackagingValue ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->AfterPackagingValue, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->Insurance, 2, '.', ''); ?></td>
<?php if($record1->FreightType=='PER TRIP'){ ?>
<td style="text-align: right;"><?php echo $record1->FreightType.'('.$record1->NoOfTrip.')-'. $record1->FreightValue;?></td>
<?php } ?>
<?php if($record1->FreightType!='PER TRIP'){ ?>
<td style="text-align: right;"><?php echo $record1->FreightType.'-'. $record1->FreightValue;?></td>
<?php } ?>
<td style="text-align: right;"><?php echo number_format($record1->AfterFreightValue, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->Taxamount, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format(($record1->BasicValue+$record1->Taxamount-$record1->AfterDiscount), 2, '.', ''); ?></td>
<?php if(!empty($POItem)){
foreach($POItem as $l)
{
$tax=0;
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php if(!empty($l->HSNCODE)){echo $l->HSNCODE;}else{echo "NIL";} ; ?></td>
<td style="text-align: right;"><?php if($l->DiscountType == 'PERCENTAGE'){$type="%";}else if($l->DiscountType == 'LUMP SUM'){$type="LS";}else if($l->DiscountType == 'NIL'){$type='';} echo $l->DiscountValue . $type;?></td>
<td style="text-align: right;"><?php echo $l->AfterDiscount;?></td>
<td style="text-align: right;"><?php echo $l->SGST."%";?></td>
<td style="text-align: right;"><?php echo $l->AfterSGST;?></td>
<td style="text-align: right;"><?php echo $l->CGST."%";?></td>
<td style="text-align: right;"><?php echo $l->AfterCGST;?></td>
<td style="text-align: right;"><?php echo $l->IGST."%";?></td>
<td style="text-align: right;"><?php echo $l->AfterIGST;?></td>
<td style="text-align: right;"><?php if($l->PackagingType == 'PERCENTAGE'){$type="%";}else if($l->PackagingType == 'LUMP SUM'){$type="LS";}else if($l->PackagingType == 'NIL'){$type='';} echo $l->PackagingValue . $type;?></td>
<td style="text-align: right;"><?php echo $l->AfterPackagingValue;?></td>
<td style="text-align: right;"><?php echo $l->Insurance;?></td>
<td style="text-align: right;"><?php if($l->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;}?></td>
<td style="text-align: right;"><?php echo $l->AfterFreightValue;?></td>
<td style="text-align: right;"><?php $tax=$l->AfterSGST+$l->AfterCGST+$l->AfterIGST+$l->AfterPackagingValue+$l->Insurance+$l->AfterFreightValue;echo number_format($tax,2);?></td>
<td style="text-align: right;"><?php echo number_format((($l->BasicValue + $tax)-($l->AfterDiscount)),2,'.','');?></td>
</tr>
<?php }
}
?>
<?php }
}?>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms;?></p>
</table><br><br>
<p><strong>Special Instructions:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="3">
<p><strong>Total Amount In Words&nbsp;</strong><br /><br /><br /></p>
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
</td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($SubTotalAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($TotalTax, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR &nbsp;</strong></td>
<td style="text-align: right;"><strong><?php echo number_format($OrderValue, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
<p></p>
<?php
$i=0;
if(!empty($POItem))
{
foreach($POItem as $x){
if($x->ParentPO != ''){
$i++;
}
}
}
if($i>0){
?>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: 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 style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
echo $record->LineAmend ;
}
} ?>
</tbody>
</table>
<?php } ?>
&nbsp;
<p> <b>Payment Terms :</b> &nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?> </p>
<div> <b>Special Instruction:</b><br/><?php echo $ServiceDescription;?></div>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" rowspan="5"><strong>Total Amount In Words :</strong><br /><br /><b><i><?php echo $TotalAmountInWords;?></i></b></td>
<td style="text-align: right;">&nbsp;<strong>Total Amount Before Tax In INR &nbsp; </strong></td>
<td style="text-align: right;"><?php echo number_format(($SubTotalAmount-$AfterDiscount),2,'.',''); ?></td>
</tr>
<tr>
<td style="text-align: right;">&nbsp;<strong>Total Tax Amount In INR &nbsp;<strong></td>
<td style="text-align: right;"><?php echo number_format($totaltaxonly,2,'.','');?></td>
</tr>
<tr>
<td style="text-align: right;">&nbsp;<strong>Total Amount After Tax In INR &nbsp;</strong></td>
<td style="text-align: right;"> <?php echo number_format($OrderValue,2,'.','');?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Advance Amount Paid In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format($advance,2,'.','');?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Balance Needs to be pay In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format(($OrderValue-$advance),2,'.','');?></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<div align="Left"> <b>Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p>&nbsp;Certified that the particulars given above are true and correct</p>
<p><b style="font-size: small;"><?php echo $CompanyName; ?></b></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
</div>
</td>
<td style="text-align: center;" colspan="2">
<p style="text-align: center;">Certified that the particulars given&nbsp;above are true and correct</p>
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
<p>&nbsp;</p>
<p style="text-align: center;">Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
</div>

View File

@ -1,5 +1,6 @@
<?php
$PONO = '';
$postatus ='';
$CompanyAddress = '';
@ -10,19 +11,21 @@
$Podt = '';
$DeliveryDate ='';
$DeliverySchedule='';
$Cgst=0.00;
$Sgst =0.00;
$Igst =0.00;
$AfterSGST =0.00;
$AfterCGST =0.00;
$AfterIGST =0.00;
$otherallowances =0.00;
$TotalAmount =0.00;
$SubTotalAmount =0.00;
$TaxAmount =0.00;
$BasicAmount = 0.00;
$OtherAllowance = 0.00;
$ServiceDescription = '';
$PaymentTerms='';
$TotalTax = 0.00;
$OrderValue = 0.00;
$totaltaxamount=0.00;
$PaymentOtherDescription='';
$NoOfServices=0;
$advance=0;
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
@ -64,31 +67,31 @@
$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;
$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;
}
}
}
?>
<style>
@page { margin: 280px 50px 30px 50px; }
.header { position: fixed; left: 0px; top: -280px; right: 0px; height: 550px;text-align: center; }
@ -98,10 +101,10 @@
<div class="footer">Page: <span class="pagenum"></span></div>
<div class="header">
<div style="text-align:right;">
<div style="text-align:right;">
<?php
if ($postatus == PO_RELEASED || $postatus == PO_SERVICE_COMPLETED || $postatus == MRIR_APPROVED || $postatus == MRIR_REJECTED || $postatus == IGR_CREATED)
{ }
if ($postatus == 'ST026')
{}
else
{
echo '<div><b>DRAFT</b> </div>';
@ -110,373 +113,298 @@
?>
</div>
<div>&nbsp;</div>
<center> <span style="font-size:24px;">PURCHASE ORDER - <a style="color:#515151">PO NO:<?php echo $PONO?>/S </a></span></center>
<table style="border-collapse: collapse;font-size:12px;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName; ?><br /><?php echo $SuplierAddress; ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress; ?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt; ?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
<tbody>
<tr>
<td colspan="2">
<p style="color:#3c8dbc;font-size:16px;"><strong><?php echo $CompanyName; ?></strong></p>
<p> <?php echo $CompanyAddress; ?></p>
</td>
<td align="right"><img width="100" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></td>
</tr>
<tr>
<td>
<p><strong>Vendor Address :</strong></p>
<p><?php echo $SuplierName?><br /><?php echo $SuplierAddress ?></p>
</td>
<td colspan="2">
<p><strong>Delivery To :</strong></p>
<p><?php echo $DeliveryAddress?></p>
</td>
</tr>
<tr>
<td>PO DATE :&nbsp;&nbsp;<?php echo $Podt?></td>
<td colspan="2">DELIVERY DATE / SCHEDULE BY :&nbsp;&nbsp;<?php echo $DeliveryDate.$DeliverySchedule;?></td>
</tr>
</tbody>
</table>
</div>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Frequency</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center</td>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
{
?>
<tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php $date = new DateTime($ReqDetails['ReqDate'],new DateTimeZone('Asia/Kolkata')); $date=$date->format("d-m-Y"); echo $date; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['Frequency']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="page" style="font-size:12px;">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">Requistion Number</td>
<td style="text-align: center;">Frequency</td>
<td style="text-align: center;">Requistion Date</td>
<td style="text-align: center;">Requested By</td>
<td style="text-align: center;">Requested Department</td>
<td style="text-align: center;">Cost Center Code</td>
<th style="text-align: center;">#</th>
<!--<th style="text-align: center;">Item Code</th>-->
<th style="text-align: center;">Service Description</th>
<th style="text-align: center;">HSN Code</th>
<th style="text-align: center;">UOM</th>
<th style="text-align: center;">Qty</th>
<th style="text-align: center;">Rate In INR</th>
<th style="text-align: center;">Basic Amount In INR</th>
</tr>
<?php
if(!empty($RequistionDetails))
{
foreach($RequistionDetails as $ReqDetails)
<?php
if(!empty($POItem))
{
?>
<tr>
<td style="text-align: center;"><?php echo $ReqDetails['RequistionNo']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['Frequency']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['ReqDate']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedName']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['RequestedDept']; ?></td>
<td style="text-align: center;"><?php echo $ReqDetails['CostCenterCode']; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr bgcolor="#8c8c8c" color="#fff">
<td style="text-align: center;">#</td>
<td style="text-align: center;">Item Description</td>
<td style="text-align: center;">HSN Code</td>
<td style="text-align: center;">UOM</td>
<td style="text-align: center;">Qty</td>
<td style="text-align: center;">Rate In INR</td>
<td style="text-align: center;">Basic Value In INR</td>
</tr>
<?php
if(!empty($POItem))
{
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
$TotalTax = 0;
$SubTotalAmount=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->ServiceMaterialDescription ; ?></td>
<td style="text-align: center;"><?php echo $record->HSNCODE ; ?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo number_format($record->Rate, 2, '.', ''); ?></td>
<td align="right"><?php if($record->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;
}
?></td>
</tr>
<?php
$Sgst =$Sgst + $record->After_SGST;
$Cgst =$Cgst + $record->After_CGST;
$Igst = $Igst + $record->After_IGST;
}
$TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst;
$OrderValue = $OrderValue + $SubTotalAmount + $TotalTax;
$index = 0;
$TotalAmount = 0;
$OrderValue = 0;
foreach($POItem as $record)
{
$index = $index + 1;
if($record->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;
}
?>
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $index ; ?></td>
<td style="text-align: center;"><?php echo $record->ServiceMaterialDescription ; ?></td>
<td style="text-align: center;"><?php if(!empty($record->HSNCODE)){echo $record->HSNCODE;}else{echo "NIL";}?></td>
<td style="text-align: center;"><?php echo $record->UOM ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php if($record->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,'.','');} ?></td>
</tr>
<?php
$SubTotalAmount = $SubTotalAmount + $TotalAmount;
$AfterSGST =$AfterSGST + $record->After_SGST;
$AfterCGST =$AfterCGST + $record->After_CGST;
$AfterIGST = $AfterIGST + $record->After_IGST;
$otherallowances =$otherallowances + $record->otherallowance;
$totaltaxamount=$totaltaxamount+$record->Taxamount;
}
$OrderValue = $SubTotalAmount+ $otherallowances;
}
?>
</table>
</tbody>
</table>
<p>&nbsp;</p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="2"><strong>HSN</strong><br /></td>
<td style="text-align: center;" colspan="2"><strong>CGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>SGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong> <br /><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Tax Amt In INR</strong><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Other Allow In INR</strong><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Total Amount In INR</strong></td>
<tbody>
<tr>
<td style="text-align: center;" rowspan="2"><strong>HSN Code</strong></td>
<td style="text-align: center;" colspan="2"><strong>CGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>SGST</strong> <br /><br /></td>
<td style="text-align: center;" colspan="2"><strong>IGST</strong> <br /><br /></td>
<td style="text-align: center;" rowspan="2"><strong>Total Tax Amt</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Other Allow In INR</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Total Amt In INR</strong></td>
</tr>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>Value</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
</tr>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><strong>IN%</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>IN%</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
<td style="text-align: center;"><strong>IN%</strong></td>
<td style="text-align: center;"><strong>Amt</strong></td>
</tr>
<?php if(!empty($POItem)) {
foreach($POItem as $record1)
{
?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php echo $record1->HSNCODE ; ?></td>
<td style="text-align: right;"><?php echo $record1->CGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->After_CGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->SGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->After_SGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo $record1->IGST ; ?></td>
<td style="text-align: right;"><?php echo number_format($record1->After_IGST, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->Taxamount, 2, '.', ''); ?></td>
<td style="text-align: right;"><?php echo number_format($record1->otherallowance, 2, '.', ''); ?></td>
<td align="right"><?php if($record->NumberOfService==0 || $record->NumberOfService==''){
echo number_format($record1->BasicValue + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
}
else{
echo number_format($record1->BasicValue * $record1->NumberOfService + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
}
?></td>
</tr>
<?php }
}
?>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong> <?php echo $PaymentTerms;?></p>
<br/>
<p><strong>Scope Of Work As Per Annexure:</strong></p>
<p><?php echo $ServiceDescription;?></p>
<table style="border-collapse: collapse;" border="1" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align: center;" rowspan="3">
<p><strong>Total Amount In Words</strong><br /><br /><br /></p>
<p><em><strong><?php echo $TotalAmountInWords;?></strong></em></p>
</td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($SubTotalAmount, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($TotalTax, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR &nbsp;</strong></td>
<td align="right"><strong><?php echo number_format($OrderValue, 2, '.', '');?>&nbsp;</strong></td>
</tr>
<tr>
<td>
<p>&nbsp;</p>
<?php if(!empty($POItem))
{
foreach($POItem as $l){ ?>
<tr style="line-height: 1.5em;">
<td style="text-align: center;"><?php if(!empty($l->HSNCODE)){echo $l->HSNCODE;}else{echo "NIL";}?></td>
<td style="text-align: right;"><?php echo $l->CGST?>%</td>
<td style="text-align: right;"><?php echo $l->After_CGST?></td>
<td style="text-align: right;"><?php echo $l->SGST?>%</td>
<td style="text-align: right;"><?php echo $l->After_SGST?></td>
<td style="text-align: right;"><?php echo $l->IGST?>%</td>
<td style="text-align: right;"><?php echo $l->After_IGST?></td>
<td style="text-align: right;"><?php echo $l->Taxamount?></td>
<td style="text-align: right;"><?php echo $l->otherallowance?></td>
<td style="text-align: right;"><?php if($l->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,'.','');}?></td>
</tr>
<?php }}?>
</tbody>
</table>
<p>&nbsp;</p>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
$i=0;
if(!empty($POItem))
{
foreach($POItem as $x){
if($x->ParentPO != ''){
$i++;
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p style="text-align: center;">Certified that the particulars given&nbsp;above are true and correct</p>
<p style="text-align: center;"><strong><?php echo $CompanyName; ?></strong></p>
<p>&nbsp;</p>
<p style="text-align: center;">Authorized Signatory</p>
</td>
</tr>
</tbody>
}
}
if($i>0){
?>
<table style="border-collapse: collapse;font-size:12px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: 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 style="text-align: center;"><strong>Item Description</strong></td>
<td style="text-align: center;" rowspan="2"><strong>Previous Details</strong></td><td style="text-align: center;" rowspan="2" ><strong>Current Details</strong></td>
</tr>
<?php if(!empty($POItem))
{
foreach($POItem as $record)
{
echo $record->lineamenddetails ;
}
} ?>
</tbody>
</table>
</div>
<?php }?>
<p>&nbsp;</p>
<p><strong>Payment Terms:</strong>&nbsp;<?php echo $PaymentTerms ."&nbsp;&nbsp;".$PaymentOtherDescription;?></p>
<div align="Left"> <b>Scope Of Work As Annixture :</b><br/><?php echo $ServiceDescription;?></div>
<div align="right">
&nbsp;
<table style="border-collapse: collapse;font-size:14px;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tbody>
<tr>
<td style="text-align: center;" rowspan="5"><strong>Total Amount In Words</strong><br /><br /><em><?php echo $TotalAmountInWords;?></em></td>
<td style="text-align: right;"><strong>Total Amount Before Tax In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format(($OrderValue - $totaltaxamount),2,'.','')?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Tax Amount In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format($totaltaxamount,2,'.','');?> </td>
</tr>
<tr>
<td style="text-align: right;"><strong>Total Amount After Tax In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format($OrderValue,2,'.','');?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Advance Amount Paid In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format($advance,2,'.','');?></td>
</tr>
<tr>
<td style="text-align: right;"><strong>Balance Needs to be pay In INR&nbsp;&nbsp;</strong></td>
<td style="text-align: right;"><?php echo number_format(($OrderValue-$advance),2,'.','');?></td>
</tr>
<tr>
<td>
<?php
if(!empty($releasedetails)){
$releasedOn = '';
foreach($releasedetails as $detail){
$releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
?>
<p>&nbsp;</p>
<div align="Left"> <b>&nbsp;Released By : </b><?php echo $detail->FirstName;?></div>
<div align="Left"> <b>&nbsp;Released On : </b><?php echo $releasedOn->format('d-m-Y');?></div>
<?php
}
}
else {
?>
<?php } ?>
</td>
<td style="text-align: center;" colspan="2">
<p><font size="1">Certified that the particulars given above are true and correct</font></p>
<p><?php echo $CompanyName; ?></p>
<p>&nbsp;</p>
<p>Authorized Signatory</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -85,7 +85,7 @@ $color='';
<!-- <td><?php echo $d->PONO ?></td> -->
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreateMRIRPOPrint?PONO=<?php echo $d->PONO ?>&POType=<?php echo $d->POType ?>" data-id="<%=index%>" style="color:<?php echo $color?>" data-userid="<?php echo $d->PONO ?>" ><?php echo $d->PONO ?> </a></td>
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $d->PONO ?>&ReqType=<?php echo $d->POType ?>" data-id="<%=index%>" style="color:<?php echo $color?>" data-userid="<?php echo $d->PONO ?>" ><?php echo $d->PONO ?> </a></td>
<td><?php echo $d->POType ?></td><!-- Department -->
<td><?php echo $d->MaterialCode ?></td><!-- Material Code -->
<td><?php echo $d->MaterialName ?></td><!-- Material Name -->