init
This commit is contained in:
70
modules/templates/EcmReceiptOuts/e5/footer.php
Executable file
70
modules/templates/EcmReceiptOuts/e5/footer.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetY($this->fh-15);
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Rect(0, $this->getBreakLine(), $this->fw, $this->bMargin+1, "F");
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Cell(0, 10, $this->PageNo().'/{nb}');
|
||||
|
||||
$this->Ln(5);
|
||||
$this->AliasNbPages();
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->getBreakLine()-15,$this->fw-$this->rMargin,$this->fh-$this->bMargin-15+1);
|
||||
|
||||
|
||||
if($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) {
|
||||
// $this->bMargin = 3;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin);
|
||||
return;
|
||||
} else {
|
||||
// $this->bMargin = 19;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin+$this->tMarign+5);
|
||||
}
|
||||
|
||||
$this->SetXY($this->lMargin,$this->fh-$this->bMargin+3-15);
|
||||
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_account);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'KRS: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_krs,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_address);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'NIP: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_nip,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_phone);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'REGON: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_regon,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_fax);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'Bank: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_bankname,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,'www.e5.pl');
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'Numer konta: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->account_number,0,0,'L');
|
||||
$this->Ln();
|
||||
?>
|
||||
17
modules/templates/EcmReceiptOuts/e5/header.php
Executable file
17
modules/templates/EcmReceiptOuts/e5/header.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?
|
||||
if(!$this->blnShowHeader) return;
|
||||
|
||||
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
//from address
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetXY($this->lMargin,$this->tMargin+2);
|
||||
//$this->MultiCell(100,3.15,$this->edt->header_text.'
|
||||
//'.translate('LBL_PDF_NIP',$module_t).': '.$nip,0,'L');
|
||||
$this->MultiCell(100,4,$this->edt->header_text,0,'L');
|
||||
|
||||
//logo
|
||||
if(isset($this->edt->logo_path) && $this->edt->logo_path != '' && file_exists($this->edt->logo_path)){
|
||||
$this->Image($this->edt->logo_path,$this->lMargin+70,$this->tMargin,0,12.3);
|
||||
}
|
||||
?>
|
||||
61
modules/templates/EcmReceiptOuts/e5/subfooter.php
Executable file
61
modules/templates/EcmReceiptOuts/e5/subfooter.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?
|
||||
//payment conditions
|
||||
/*if(!empty($this->ecmpaymentcondition_text)) {
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->ecmpaymentcondition_text,0,'L');
|
||||
$pdf->Ln();
|
||||
}*/
|
||||
/*
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','12');
|
||||
$pdf->Ln(3);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_CORRECT_DIFFERENCE']." ".format_number(abs(unformat_number($this->total) + unformat_number($this->ecminvoiceout->total))).' '.$this->currency_symbol);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
*/
|
||||
$pdf->Ln(10);
|
||||
if($this->type=="correct"){
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$total=unformat_number($this->total) - unformat_number($this->ecminvoiceout->total);
|
||||
if($total>0)$string=$mod_strings['LBL_PDF_TO_PAID'];
|
||||
else $string=$mod_strings['LBL_PDF_TO_PAID_BACK'];
|
||||
$pdf->Cell(30,4,$string,0,0,'L',1);
|
||||
$pdf->SetFont('arialpl','B','8');
|
||||
$pdf->Cell(30,4,format_number(abs($total)).' '.$this->currency_symbol,0,0,'L',1);
|
||||
}
|
||||
else {
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$total=$calc['total'];
|
||||
$pdf->Cell(30,4,$mod_strings['LBL_PDF_TO_PAID'],0,0,'L',1);
|
||||
$pdf->SetFont('arialpl','B','8');
|
||||
$pdf->Cell(30,4,$total,0,0,'L',1);
|
||||
}
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->Cell(30,4,$mod_strings['LBL_PDF_TOTAL_BY_WORD'],0,0,'L',1);
|
||||
$pdf->SetFont('arialpl','B','8');
|
||||
$pdf->Cell(150,4,$this->slowniePL($total),0,0,'L',1);
|
||||
|
||||
$pdf->Ln(20);
|
||||
$pdf->SetFont('arialpl','','7');
|
||||
$pdf->Cell(85,1,"...............................................................",0,0,'L',1);
|
||||
$pdf->Cell(85,1,"...............................................................",0,0,'R',1);
|
||||
$pdf->Ln(4);
|
||||
$pdf->Cell(43,1,$mod_strings['LBL_PDF_OWNER_SIGNATURE'],0,0,'C',1);
|
||||
$pdf->SetX(155);
|
||||
$pdf->Cell(35,1,$mod_strings['LBL_PDF_RECEIVER_SIGNATURE'],0,0,'C',1);$pdf->Ln(4);
|
||||
$pdf->Cell(43,1,$this->setUser()->full_name,0,0,'C',1);
|
||||
|
||||
//footer text
|
||||
/* $pdf->Ln(18);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->footer_text,0,'J');
|
||||
|
||||
//header text
|
||||
$pdf->Ln(6);
|
||||
$pdf->SetFont('arialpl','B','8');
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
*/
|
||||
|
||||
?>
|
||||
249
modules/templates/EcmReceiptOuts/e5/subheader.php
Executable file
249
modules/templates/EcmReceiptOuts/e5/subheader.php
Executable file
@@ -0,0 +1,249 @@
|
||||
<?
|
||||
global $app_list_strings;
|
||||
//to address
|
||||
$old_x=$pdf->GetX();
|
||||
$old_y=$pdf->GetY();
|
||||
|
||||
$pdf->SetXY(140,$pdf->tMargin+1);
|
||||
|
||||
$address = $this->parent_name;
|
||||
if($this->parent_contact_name) {
|
||||
$address .= "\n".$this->parent_contact_name;
|
||||
if($this->parent_contact_title) {
|
||||
$address .= "\n".$this->parent_contact_title;
|
||||
}
|
||||
$personplus=5;
|
||||
}
|
||||
else $personplus=0;
|
||||
|
||||
if($this->parent_address_street) $address .= "\n".$this->parent_address_street;
|
||||
if($this->parent_address_postalcode) $address .= "\n".$this->parent_address_postalcode;
|
||||
if($this->parent_address_city) $address .= " ".$this->parent_address_city;
|
||||
if($this->to_vatid) $address .= "\n".$mod_strings['LBL_PDF_VATID']." ".$this->to_vatid;
|
||||
if($this->to_nip) $address .= "\n".$mod_strings['LBL_PDF_NIP'].": ".$this->to_nip;
|
||||
|
||||
|
||||
if($this->ecmpaymentcondition_id){
|
||||
require_once("modules/EcmPaymentConditions/EcmPaymentCondition.php");
|
||||
$pc=new EcmPaymentCondition();
|
||||
$pc->retrieve($this->ecmpaymentcondition_id);
|
||||
}
|
||||
|
||||
|
||||
$pdf->SetFont('arialpl', '', 8);
|
||||
$pdf->MultiCell(0,4,$address,0,'R');
|
||||
|
||||
$pdf->SetXY(160,$old_y+10+$personplus);
|
||||
|
||||
$pdf->SetFont('arialpl', 'B', 7);
|
||||
$pdf->Cell(35,1,$mod_strings['LBL_PDF_ORIGINAL_COPY'],0,0,'R',1);
|
||||
$pdf->Ln(6);
|
||||
$pdf->SetFont('arialpl', '', 7);
|
||||
|
||||
$table = array();
|
||||
|
||||
|
||||
$table [0]['date_reg'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_DATE_REGISTER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [0]['date_reg_value'] = array('width' => 36, 'value' => $this->register_date, 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
|
||||
$table [0]['place_of_register'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_PLACE_OF_REGISTER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [0]['place_of_register_value'] = array('width' => 25, 'value' => $this->template->place_of_register, 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
|
||||
$table [1]['date_sell'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_SELL_DATE'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [1]['date_sell_value'] = array('width' => 36, 'value' => $this->sell_date, 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
|
||||
|
||||
if($this->type == "normal") {
|
||||
if(file_exists("modules/EcmStockDocOuts/EcmStockDocOut.php")){
|
||||
require_once("modules/EcmStockDocOuts/EcmStockDocOut.php");
|
||||
$wz=new EcmStockDocOut();
|
||||
$wz->retrieve($this->wz_id);
|
||||
}
|
||||
$table [1]['wz'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_TO_WZ'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [1]['wz_value'] = array('width' => 25, 'value' => $wz->document_no, 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
}
|
||||
else{
|
||||
$this->loadEcmInvoiceOut();
|
||||
$this->ecminvoiceout->format_all_fields();
|
||||
$table [1]['wz'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT_TO'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [1]['wz_value'] = array('width' => 25, 'value' => $this->ecminvoiceout->document_no, 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
}
|
||||
|
||||
if($this->ecmpaymentcondition_id){
|
||||
$table [2]['payment_termin'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_PAYMENT_TERMIN'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [2]['payment_termin_value'] = array('width' => 36, 'value' => $pc->days." ".$mod_strings['LBL_PDF_DAYS'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
}
|
||||
|
||||
if($this->ecmpaymentcondition_id){
|
||||
$table [2]['payment_method'] = array('width' => 25, 'value' => $mod_strings['LBL_PDF_PAYMENT_METHOD'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 8);
|
||||
$table [2]['payment_method_value'] = array('width' => 25, 'value' => $app_list_strings['ecmpaymentconditions_payment_method_dom'][$pc->payment_method], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 8);
|
||||
}
|
||||
|
||||
|
||||
$pdf->DrawTable($table, null, 0.5, 0.5, 3);
|
||||
|
||||
|
||||
$pdf->Ln(9);
|
||||
|
||||
$pdf->SetFont('arialpl','','18');
|
||||
|
||||
if($this->type == "normal")
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME']." ".$this->document_no,0,'C');
|
||||
else if($this->type == "correct") {
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT']." ".$this->document_no,0,'C');
|
||||
/*$this->loadEcmInvoiceOut();
|
||||
$this->ecminvoiceout->format_all_fields();
|
||||
$pdf->Ln(5);
|
||||
$pdf->SetFont('arialpl','','14');
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT_TO'].' '.$this->ecminvoiceout->document_no,0,'C');*/
|
||||
}
|
||||
|
||||
$this->loadParser();
|
||||
$this->header_text = $this->template->mfp->parseText($this->header_text);
|
||||
$this->footer_text = $this->template->mfp->parseText($this->footer_text);
|
||||
$this->ads_text = $this->template->mfp->parseText($this->ads_text);
|
||||
|
||||
$pdf->Ln(6);
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_BEFORE_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
$this->ecminvoiceout->DrawPositions($pdf);
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->Ln(4);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_AFTER_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$pdf->SetFont('arialpl','','7');
|
||||
global $mod_strings;
|
||||
|
||||
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($this->currency_id);
|
||||
$this->currency_symbol=$currency->iso4217;
|
||||
|
||||
if(!isset($this->position_list) || !is_array($this->position_list))
|
||||
$this->position_list = $this->getPositionList(true);
|
||||
$calc = $this->calculate($this->position_list,true);
|
||||
//$this->position_list = $this->formatPositions($this->position_list);
|
||||
|
||||
$calc['total'] .= ' '.$this->currency_symbol;
|
||||
$calc['subtotal'] .= ' '.$this->currency_symbol;
|
||||
if($calc['discount']) {
|
||||
$calc['total2'] .= ' '.$this->currency_symbol;
|
||||
$calc['discount']['value'] .= ' '.$this->currency_symbol;
|
||||
}
|
||||
|
||||
if(isset($calc['vats']) && is_array($calc['vats']) && count($calc['vats']) > 0)
|
||||
foreach($calc['vats'] as $key => $value) $calc['vats'][$key] .= ' '.$this->currency_symbol;
|
||||
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_ORDER_NO'].": ".$this->order_no." ".$mod_strings['LBL_PDF_DELIVERY_PLACE'].": ".$this->delivery_place." ".$mod_strings['LBL_PDF_SUPPLIER_CODE'].": ".$this->supplier_code,0,'J');
|
||||
$pdf->Ln(4);
|
||||
|
||||
|
||||
$name_w = 17;
|
||||
//if($calc['draw_discount']) $name_w -= 8;
|
||||
//if($calc['draw_vat']) $name_w -= 8;
|
||||
$table = array();
|
||||
$table [0]['position'] = array('width' => 4, 'value' => $mod_strings['LBL_PDF_LIST_POSITION'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 8);
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['tax_code'] = array('width' => 7, 'value' => $mod_strings['LBL_PDF_LIST_TAX_CODE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['recipient_code'] = array('width' => 6, 'value' => $mod_strings['LBL_PDF_LIST_RECIPIENT_CODE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['quantity'] = array('width' => 7, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['unit'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 8);
|
||||
$table [0]['unit_price'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['unit_price_total'] = array('width' => 12, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//if($calc['draw_discount'])
|
||||
//$table [0]['discount'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//if($calc['draw_vat']) {
|
||||
$table [0]['vat_id'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_VAT'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['vat_value'] = array('width' => 13, 'value' => $mod_strings['LBL_PDF_LIST_VAT_VALUE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//}
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$pdf->Ln(0);
|
||||
|
||||
|
||||
$i = 1;
|
||||
|
||||
$table=array();
|
||||
|
||||
$lv=return_app_list_strings_language($this->ecmlanguage);
|
||||
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
$table [$i]['position'] = array('width' => 4, 'value' => $i, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$table [$i]['description'] = array('width' => $name_w."\n".$p['code'], 'value' => htmlspecialchars_decode($p['name']), 'border' => 1, 'align' => 'L', 'font-size' => 7 );
|
||||
$table [$i]['tax_code'] = array('width' => 7, 'value' => $p['tax_code'],'border' => 1, 'align' => 'C', 'font-size' => 7);
|
||||
$table [$i]['recipient_code'] = array('width' => 6, 'value' => $p['recipient_code'],'border' => 1, 'align' => 'C', 'font-size' => 7);
|
||||
$table [$i]['quantity'] = array('width' => 7, 'value' => $p['quantity'], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $lv['ecmproducts_unit_dom'][$p['unit_id']], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit_price'] = array('width' => 10, 'value' => format_number($p['price']).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$price_total=($p['price']-($p['price']*$p['discount']/100))*$p['quantity'];
|
||||
$table [$i]['unit_price_total'] = array('width' => 12, 'value' => format_number($price_total).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_discount'])
|
||||
//$table [$i]['discount'] = array('width' => 5, 'value' => $p['discount'], 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_vat']){
|
||||
$table [$i]['vat_id'] = array('width' => 5, 'value' => format_number($p['vat_value']), 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$vat_value=$p['vat_value']/100*$p['price']*$p['quantity'];
|
||||
$table [$i]['vat_value'] = array('width' => 13, 'value' => format_number($vat_value).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
|
||||
//}
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => format_number($price_total+$vat_value).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$totals[$p['vat_id']]['price']+=$price_total;
|
||||
$totals[$p['vat_id']]['total']+=$price_total+$vat_value;
|
||||
$totals[$p['vat_id']]['vat']+=$vat_value;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->DrawTable($table,array(0));
|
||||
//total, vat, subtotal
|
||||
|
||||
$pdf->Ln(4);
|
||||
$pr = ($pdf->fw-$pdf->lMargin-$pdf->rMargin)/100;
|
||||
//$pdf->SetX($pdf->fw-$pdf->rMargin-$pr*34);
|
||||
$table = array();
|
||||
|
||||
if($calc['vats']) {
|
||||
/*$table [] = array(
|
||||
'subtotal1' => array('width' => 42, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'subtotal2' => array('width' => 14, 'value' => $calc['subtotal'].' '.$this->currency_symbol, 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
*/
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select id,name,value from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 10, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'netto_total' => array('width' => 17, 'value' => format_number($totals[$r['id']]['price']).' '.$this->currency_symbol, 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_rate' => array('width' => 5, 'value' => format_number($r['value']), 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_total' => array('width' => 13, 'value' => format_number($totals[$r['id']]['vat']).' '.$this->currency_symbol, 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat2' => array('width' => 14, 'value' => format_number($totals[$r['id']]['total']).' '.$this->currency_symbol, 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($calc['discount'])) {
|
||||
$table [] = array(
|
||||
'total21' => array('width' => 45, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total22' => array('width' => 14, 'value' => $calc['total2'], 'border' => 1, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 45, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'discount2' => array('width' => 14, 'value' => $calc['discount']['value'], 'border' => 1, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
}
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 45, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total2' => array('width' => 14, 'value' => $calc['total'], 'border' => 1, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7, 'font-style' => 'b'), );
|
||||
$pdf->SetX(95);
|
||||
$pdf->DrawTable($table);
|
||||
$pdf->Ln(1);
|
||||
|
||||
//$table=array();
|
||||
|
||||
//$pdf->DrawTable($table);
|
||||
?>
|
||||
31
modules/templates/EcmReceiptOuts/invoice_01/footer.php
Executable file
31
modules/templates/EcmReceiptOuts/invoice_01/footer.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetY($this->fh-15);
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Rect(0, $this->getBreakLine(), $this->fw, $this->bMargin+1, "F");
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Cell(0, 10, $this->PageNo().'/{nb}');
|
||||
|
||||
$this->Ln(5);
|
||||
$this->AliasNbPages();
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->getBreakLine(),$this->fw-$this->rMargin,$this->fh-$this->bMargin+1);
|
||||
|
||||
|
||||
if($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) {
|
||||
// $this->bMargin = 3;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin);
|
||||
return;
|
||||
} else {
|
||||
// $this->bMargin = 19;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin+$this->tMarign+5);
|
||||
}
|
||||
|
||||
$this->SetFont('arialpl','','8');
|
||||
$this->SetXY($this->lMargin+10,$this->fh-$this->bMargin+3);
|
||||
$this->MultiCell($this->fw-$this->lMargin-$this->rMargin-20,4,$this->edt->footer_text,0,'C');
|
||||
|
||||
23
modules/templates/EcmReceiptOuts/invoice_01/header.php
Executable file
23
modules/templates/EcmReceiptOuts/invoice_01/header.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?
|
||||
if(!$this->blnShowHeader) return;
|
||||
|
||||
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
//from address
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetXY($this->fw-100-$this->rMargin,$this->tMargin);
|
||||
$this->MultiCell(100,3.15,$this->edt->header_text,0,'R');
|
||||
//logo
|
||||
if(isset($this->edt->logo_path) && $this->edt->logo_path != '')
|
||||
if(file_exists($this->edt->logo_path))
|
||||
$this->Image($this->edt->logo_path,$this->lMargin,$this->tMargin,0,22.3);
|
||||
|
||||
/*
|
||||
//line
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->tMargin-1,$this->fw-$this->rMargin,$this->tMargin-1);
|
||||
*/
|
||||
//if($this->GetY() < $this->tMargin) $this->SetY($this->tMargin); else
|
||||
|
||||
|
||||
35
modules/templates/EcmReceiptOuts/invoice_01/subfooter.php
Executable file
35
modules/templates/EcmReceiptOuts/invoice_01/subfooter.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?
|
||||
|
||||
|
||||
//payment conditions
|
||||
if(!empty($this->ecmpaymentcondition_text)) {
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->ecmpaymentcondition_text,0,'L');
|
||||
}
|
||||
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','12');
|
||||
$pdf->Ln(3);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_CORRECT_DIFFERENCE']." ".format_number(abs(unformat_number($this->total) + unformat_number($this->ecminvoiceout->total))).' '.$this->currency_symbol);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
//footer text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->footer_text,0,'J');
|
||||
|
||||
|
||||
|
||||
//header text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','B','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
266
modules/templates/EcmReceiptOuts/invoice_01/subheader.php
Executable file
266
modules/templates/EcmReceiptOuts/invoice_01/subheader.php
Executable file
@@ -0,0 +1,266 @@
|
||||
<?
|
||||
/*
|
||||
$pdf->Ln(10);
|
||||
|
||||
//$this->SetY($this->tMargin);
|
||||
|
||||
//from address
|
||||
$this->template->setAccount();
|
||||
$address = $this->template->account->name;
|
||||
if($this->template->account->billing_address_street) $address .= " - ".$this->template->account->billing_address_street;
|
||||
if($this->template->account->billing_address_postalcode) $address .= " - ".$this->template->account->billing_address_postalcode;
|
||||
|
||||
if($this->template->account->billing_address_city) $address .= " ".$this->template->account->billing_address_city;
|
||||
|
||||
$pdf->SetFont('arialpl', 'u', 8);
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->MultiCell(0,5,$address,0,'L');
|
||||
*/
|
||||
$y_tmp = $pdf->GetY();
|
||||
$pdf->SetLineWidth(0.5);
|
||||
$pdf->SetDrawColor(0,0,0);
|
||||
$pdf->Line(10,100,14,100);
|
||||
$pdf->SetXY($pdf->bMargin, $y_tmp);
|
||||
$pdf->SetLineWidth(0);
|
||||
|
||||
$pdf->Ln(6);
|
||||
if($pdf->page == 1)
|
||||
if($pdf->edt->address) {
|
||||
$pdf->Ln(9);
|
||||
$pdf->SetFont('arialpl', 'u', 8);
|
||||
$pdf->SetXY($pdf->lMargin, 55);
|
||||
$pdf->MultiCell(0,3.15,$pdf->edt->address,0,'L');
|
||||
$pdf->SetXY($pdf->lMargin, 60);
|
||||
}
|
||||
|
||||
//$pdf->Ln(2);
|
||||
|
||||
|
||||
//to address
|
||||
|
||||
$address = $this->parent_name;
|
||||
if($this->parent_contact_name) {
|
||||
$address .= "\n".$this->parent_contact_name;
|
||||
if($this->parent_contact_title) $address .= "\n".$this->parent_contact_title;
|
||||
}
|
||||
if($this->parent_address_street) $address .= "\n".$this->parent_address_street;
|
||||
if($this->parent_address_postalcode) $address .= "\n".$this->parent_address_postalcode;
|
||||
if($this->parent_address_city) $address .= " ".$this->parent_address_city;
|
||||
if($this->to_vatid) $address .= "\n\n".$mod_strings['LBL_PDF_VATID']." ".$this->to_vatid;
|
||||
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
|
||||
//$pdf->Ln(2);
|
||||
$current = $pdf->GetY();
|
||||
$pdf->MultiCell(0,4,$address,0,'L');
|
||||
$current2 = $pdf->GetY();
|
||||
|
||||
$pdf->SetLineWidth(0.5);
|
||||
$pdf->SetDrawColor(192,192,192);
|
||||
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40,85);
|
||||
$pdf->SetFont('arialpl', 'B', 9);
|
||||
$pdf->MultiCell(40,6,$mod_strings['LBL_PDF_NUMBER'],'LTR');
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40, $pdf->GetY()-1);
|
||||
$pdf->SetFont('arialpl', '', 9);
|
||||
$pdf->MultiCell(40,5,$this->document_no,'LBR');
|
||||
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40,$pdf->GetY()+0.4);
|
||||
$pdf->SetFont('arialpl', 'B', 9);
|
||||
$pdf->MultiCell(40,6,$mod_strings['LBL_PDF_DATE_REGISTER'],'LTR');
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40, $pdf->GetY()-1);
|
||||
$pdf->SetFont('arialpl', '', 9);
|
||||
$pdf->MultiCell(40,5,$this->register_date,'LBR');
|
||||
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40,$pdf->GetY()+0.4);
|
||||
$pdf->SetFont('arialpl', 'B', 9);
|
||||
$pdf->MultiCell(40,6,$mod_strings['LBL_PDF_OWNER'],'LTR');
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40, $pdf->GetY()-1);
|
||||
$pdf->SetFont('arialpl', '', 9);
|
||||
$pdf->MultiCell(40,5,$this->setUser()->full_name,'LBR');
|
||||
|
||||
/*
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-40,85);
|
||||
$table = array();
|
||||
$table [0]['data'] = array('width' => 40, 'value' => $mod_strings['LBL_PDF_NUMBER'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [1]['data'] = array('width' => 40, 'value' => $this->document_no, 'border' => 1, 'overflow' => 1, 'align' => 'L');
|
||||
$table [2]['data'] = array('width' => 40, 'value' => $mod_strings['LBL_PDF_DATE_REGISTER'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [3]['data'] = array('width' => 40, 'value' => $this->register_date, 'border' => 1, 'overflow' => 1, 'align' => 'L');
|
||||
$table [4]['data'] = array('width' => 40, 'value' => $mod_strings['LBL_PDF_OWNER'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [5]['data'] = array('width' => 40, 'value' => $this->setUser()->full_name, 'border' => 1, 'overflow' => 1, 'align' => 'L');
|
||||
$pdf->DrawTable($table, null, 0.5, 0.5, 3.5);
|
||||
*/
|
||||
//$pdf->SetY($current2);
|
||||
|
||||
//$pdf->Ln(12);
|
||||
|
||||
$pdf->SetFont('arialpl','','24');
|
||||
$y_tmp = $pdf->GetY();
|
||||
$pdf->SetXY($pdf->lMargin, 106);
|
||||
if($this->type == "normal")
|
||||
$pdf->MultiCell(0,0,$mod_strings['LBL_PDF_DOCUMENT_NAME'],0,'L');
|
||||
else if($this->type == "correct") {
|
||||
$pdf->MultiCell(0,0,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT'],0,'L');
|
||||
$this->loadEcmInvoiceOut();
|
||||
$this->ecminvoiceout->format_all_fields();
|
||||
$pdf->Ln(5);
|
||||
$pdf->SetFont('arialpl','','18');
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT_TO'].' '.$this->ecminvoiceout->document_no);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->loadParser();
|
||||
|
||||
$this->header_text = $this->template->mfp->parseText($this->header_text);
|
||||
|
||||
$this->footer_text = $this->template->mfp->parseText($this->footer_text);
|
||||
|
||||
$this->ads_text = $this->template->mfp->parseText($this->ads_text);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//header text
|
||||
|
||||
$pdf->SetY($y_tmp);
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
$pdf->Ln(8);
|
||||
|
||||
|
||||
if(isset($this->header_text) && $this->header_text != '') {
|
||||
$pdf->MultiCell(0,4,$this->header_text,0,'J');
|
||||
$pdf->Ln(10);
|
||||
}
|
||||
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_BEFORE_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
$this->ecminvoiceout->DrawPositions($pdf);
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->Ln(4);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_AFTER_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$pdf->SetFont('arialpl','','7');
|
||||
global $mod_strings;
|
||||
if(!isset($this->position_list) || !is_array($this->position_list))
|
||||
$this->position_list = $this->getPositionList(true);
|
||||
$calc = $this->calculate($this->position_list,true);
|
||||
//$this->position_list = $this->formatPositions($this->position_list);
|
||||
|
||||
$calc['total'] .= ' '.$this->currency_symbol;
|
||||
$calc['subtotal'] .= ' '.$this->currency_symbol;
|
||||
if($calc['discount']) {
|
||||
$calc['total2'] .= ' '.$this->currency_symbol;
|
||||
$calc['discount']['value'] .= ' '.$this->currency_symbol;
|
||||
}
|
||||
|
||||
if(isset($calc['vats']) && is_array($calc['vats']) && count($calc['vats']) > 0)
|
||||
foreach($calc['vats'] as $key => $value) $calc['vats'][$key] .= ' '.$this->currency_symbol;
|
||||
|
||||
$pdf->SetDrawColor(0,0,0);
|
||||
$pdf->SetLineWidth(0.35);
|
||||
|
||||
$name_w = 21;
|
||||
//if($calc['draw_discount']) $name_w -= 8;
|
||||
//if($calc['draw_vat']) $name_w -= 8;
|
||||
$table = array();
|
||||
$table [0]['position'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_POSITION'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['tax_code'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_TAX_CODE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['quantity'] = array('width' => 7, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['unit'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['unit_price'] = array('width' => 11, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['unit_price_total'] = array('width' => 11, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
//if($calc['draw_discount'])
|
||||
$table [0]['discount'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
//if($calc['draw_vat']) {
|
||||
$table [0]['vat_id'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_VAT'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$table [0]['vat_value'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_VAT_VALUE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
//}
|
||||
$table [0]['total'] = array('width' => 12, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7, 'background' => array(226,226,226));
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$pdf->Ln(0);
|
||||
|
||||
|
||||
$i = 1;
|
||||
|
||||
$table=array();
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => $i, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($p['name']), 'border' => 1, 'align' => 'L', 'font-size' => 7 );
|
||||
$table [$i]['tax_code'] = array('width' => 8, 'value' => $p['tax_code'],'border' => 1, 'align' => 'C', 'font-size' => 7);
|
||||
$table [$i]['quantity'] = array('width' => 7, 'value' => $p['quantity'], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $GLOBALS['app_list_strings']['ecmproducts_unit_dom'][$p['unit']], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit_price'] = array('width' => 11, 'value' => format_number($p['price']).' PLN', 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
|
||||
$price_total=($p['price']-($p['price']*$p['discount']/100))*$p['quantity'];
|
||||
$table [$i]['unit_price_total'] = array('width' => 11, 'value' => format_number($price_total).' PLN', 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_discount'])
|
||||
$table [$i]['discount'] = array('width' => 5, 'value' => $p['discount'], 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_vat']){
|
||||
$table [$i]['vat_id'] = array('width' => 5, 'value' => format_number($p['vat_value']), 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$vat_value=$p['vat_value']/100*$p['price']*$p['quantity'];
|
||||
$table [$i]['vat_value'] = array('width' => 10, 'value' => format_number($vat_value).' PLN', 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
|
||||
//}
|
||||
$table [$i]['total'] = array('width' => 12, 'value' => format_number($price_total+$vat_value).' PLN', 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$totals[$p['vat_id']]['price']+=$price_total;
|
||||
$totals[$p['vat_id']]['total']+=$price_total+$vat_value;
|
||||
$totals[$p['vat_id']]['vat']+=$vat_value;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->DrawTable($table,array(0));
|
||||
//total, vat, subtotal
|
||||
|
||||
$pdf->Ln(4);
|
||||
$pr = ($pdf->fw-$pdf->lMargin-$pdf->rMargin)/100;
|
||||
//$pdf->SetX($pdf->fw-$pdf->rMargin-$pr*34);
|
||||
$table = array();
|
||||
|
||||
if($calc['vats']) {
|
||||
/*$table [] = array(
|
||||
'subtotal1' => array('width' => 42, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'subtotal2' => array('width' => 14, 'value' => $calc['subtotal'].' PLN', 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
*/
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select id,name,value from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 10, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'netto_total' => array('width' => 12, 'value' => format_number($totals[$r['id']]['price']).' PLN', 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_rate' => array('width' => 5, 'value' => format_number($r['value']), 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_total' => array('width' => 13, 'value' => format_number($totals[$r['id']]['vat']).' PLN', 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat2' => array('width' => 14, 'value' => format_number($totals[$r['id']]['total']).' PLN', 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($calc['discount'])) {
|
||||
$table [] = array(
|
||||
'total21' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total22' => array('width' => 34, 'value' => $calc['total2'].' PLN', 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 86, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'discount2' => array('width' => 14, 'value' => $calc['discount']['value'].' PLN', 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
}
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 40, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b', 'background' => array(226,226,226)),
|
||||
'total2' => array('width' => 14, 'value' => $calc['total'].' PLN', 'border' => 1, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7, 'font-style' => 'b', 'background' => array(226,226,226)),);
|
||||
$pdf->SetX(103);
|
||||
$pdf->DrawTable($table);
|
||||
$pdf->Ln(1);
|
||||
|
||||
//$table=array();
|
||||
|
||||
//$pdf->DrawTable($table);
|
||||
31
modules/templates/EcmReceiptOuts/invoice_pl2/footer.php
Executable file
31
modules/templates/EcmReceiptOuts/invoice_pl2/footer.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetY($this->fh-15);
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Rect(0, $this->getBreakLine(), $this->fw, $this->bMargin+1, "F");
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Cell(0, 10, $this->PageNo().'/{nb}');
|
||||
|
||||
$this->Ln(5);
|
||||
$this->AliasNbPages();
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->getBreakLine(),$this->fw-$this->rMargin,$this->fh-$this->bMargin+1);
|
||||
|
||||
|
||||
if($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) {
|
||||
// $this->bMargin = 3;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin);
|
||||
return;
|
||||
} else {
|
||||
// $this->bMargin = 19;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin+$this->tMarign+5);
|
||||
}
|
||||
|
||||
$this->SetFont('arialpl','','8');
|
||||
$this->SetXY($this->lMargin+10,$this->fh-$this->bMargin+3);
|
||||
$this->MultiCell($this->fw-$this->lMargin-$this->rMargin-20,4,$this->edt->footer_text,0,'C');
|
||||
?>
|
||||
17
modules/templates/EcmReceiptOuts/invoice_pl2/header.php
Executable file
17
modules/templates/EcmReceiptOuts/invoice_pl2/header.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?
|
||||
if(!$this->blnShowHeader) return;
|
||||
|
||||
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
//logo
|
||||
if(isset($this->edt->logo_path) && $this->edt->logo_path != '')
|
||||
if(file_exists($this->edt->logo_path))
|
||||
$this->Image($this->edt->logo_path,$this->rMargin+132,$this->tMargin,0,18.3);
|
||||
|
||||
//from address
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetXY($this->lMargin,$this->tMargin+3);
|
||||
$this->MultiCell(100,3.15,$this->edt->header_text,0,'L');
|
||||
|
||||
$this->SetY(32);
|
||||
?>
|
||||
38
modules/templates/EcmReceiptOuts/invoice_pl2/subfooter.php
Executable file
38
modules/templates/EcmReceiptOuts/invoice_pl2/subfooter.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?
|
||||
|
||||
|
||||
//payment conditions
|
||||
if(!empty($this->ecmpaymentcondition_text)) {
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->ecmpaymentcondition_text,0,'L');
|
||||
}
|
||||
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','12');
|
||||
$pdf->Ln(3);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_CORRECT_DIFFERENCE']." ".format_number(abs(unformat_number($this->total) + unformat_number($this->ecminvoiceout->total))).' '.$this->currency_symbol);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
//footer text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->footer_text,0,'J');
|
||||
|
||||
|
||||
|
||||
//header text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','B','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
|
||||
|
||||
?>
|
||||
237
modules/templates/EcmReceiptOuts/invoice_pl2/subheader.php
Executable file
237
modules/templates/EcmReceiptOuts/invoice_pl2/subheader.php
Executable file
@@ -0,0 +1,237 @@
|
||||
<?
|
||||
/*
|
||||
$pdf->Ln(10);
|
||||
|
||||
//$this->SetY($this->tMargin);
|
||||
|
||||
//from address
|
||||
|
||||
$this->template->setAccount();
|
||||
|
||||
$address = $this->template->account->name;
|
||||
|
||||
if($this->template->account->billing_address_street) $address .= " - ".$this->template->account->billing_address_street;
|
||||
|
||||
if($this->template->account->billing_address_postalcode) $address .= " - ".$this->template->account->billing_address_postalcode;
|
||||
|
||||
if($this->template->account->billing_address_city) $address .= " ".$this->template->account->billing_address_city;
|
||||
|
||||
$pdf->SetFont('arialpl', 'u', 8);
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->MultiCell(0,5,$address,0,'L');
|
||||
*/
|
||||
|
||||
|
||||
$pdf->Ln(2);
|
||||
|
||||
|
||||
//to address
|
||||
|
||||
$address = $this->parent_name;
|
||||
if($this->parent_contact_name) {
|
||||
$address .= "\n".$this->parent_contact_name;
|
||||
if($this->parent_contact_title) $address .= "\n".$this->parent_contact_title;
|
||||
}
|
||||
|
||||
if($this->parent_address_street) $address .= "\n".$this->parent_address_street;
|
||||
|
||||
if($this->parent_address_postalcode) $address .= "\n\n".$this->parent_address_postalcode;
|
||||
|
||||
if($this->parent_address_city) $address .= " ".$this->parent_address_city;
|
||||
|
||||
if($this->to_vatid) $address .= "\n\n".$mod_strings['LBL_PDF_VATID']." ".$this->to_vatid;
|
||||
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
|
||||
$pdf->Ln(2);
|
||||
$current = $pdf->GetY();
|
||||
$pdf->MultiCell(0,4,$address,0,'L');
|
||||
$current2 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-30,$current);
|
||||
$table = array();
|
||||
$table [0]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_NUMBER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [1]['data'] = array('width' => 30, 'value' => $this->document_no, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
$table [2]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_DATE_REGISTER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [3]['data'] = array('width' => 30, 'value' => $this->register_date, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
$table [4]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_OWNER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [5]['data'] = array('width' => 30, 'value' => $this->setUser()->full_name, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
$pdf->DrawTable($table, null, 0.5, 0.5, 3);
|
||||
|
||||
$pdf->SetY($current2);
|
||||
|
||||
$pdf->Ln(12);
|
||||
|
||||
$pdf->SetFont('arialpl','','24');
|
||||
|
||||
if($this->type == "normal")
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME'],0,'L');
|
||||
else if($this->type == "correct") {
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT'],0,'L');
|
||||
$this->loadEcmInvoiceOut();
|
||||
$this->ecminvoiceout->format_all_fields();
|
||||
$pdf->Ln(5);
|
||||
$pdf->SetFont('arialpl','','18');
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT_TO'].' '.$this->ecminvoiceout->document_no);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->loadParser();
|
||||
|
||||
$this->header_text = $this->template->mfp->parseText($this->header_text);
|
||||
|
||||
$this->footer_text = $this->template->mfp->parseText($this->footer_text);
|
||||
|
||||
$this->ads_text = $this->template->mfp->parseText($this->ads_text);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//header text
|
||||
|
||||
$pdf->Ln(12);
|
||||
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->header_text,0,'J');
|
||||
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_BEFORE_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
$this->ecminvoiceout->DrawPositions($pdf);
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->Ln(4);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_AFTER_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$pdf->SetFont('arialpl','','7');
|
||||
global $mod_strings;
|
||||
|
||||
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($this->currency_id);
|
||||
$this->currency_symbol=$currency->iso4217;
|
||||
|
||||
if(!isset($this->position_list) || !is_array($this->position_list))
|
||||
$this->position_list = $this->getPositionList(true);
|
||||
$calc = $this->calculate($this->position_list,true);
|
||||
//$this->position_list = $this->formatPositions($this->position_list);
|
||||
|
||||
$calc['total'] .= ' '.$this->currency_symbol;
|
||||
$calc['subtotal'] .= ' '.$this->currency_symbol;
|
||||
if($calc['discount']) {
|
||||
$calc['total2'] .= ' '.$this->currency_symbol;
|
||||
$calc['discount']['value'] .= ' '.$this->currency_symbol;
|
||||
}
|
||||
|
||||
if(isset($calc['vats']) && is_array($calc['vats']) && count($calc['vats']) > 0)
|
||||
foreach($calc['vats'] as $key => $value) $calc['vats'][$key] .= ' '.$this->currency_symbol;
|
||||
|
||||
$name_w = 17;
|
||||
//if($calc['draw_discount']) $name_w -= 8;
|
||||
//if($calc['draw_vat']) $name_w -= 8;
|
||||
$table = array();
|
||||
$table [0]['position'] = array('width' => 4, 'value' => $mod_strings['LBL_PDF_LIST_POSITION'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 8);
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['tax_code'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_TAX_CODE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['quantity'] = array('width' => 7, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['unit'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 8);
|
||||
$table [0]['unit_price'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['unit_price_total'] = array('width' => 12, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//if($calc['draw_discount'])
|
||||
$table [0]['discount'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//if($calc['draw_vat']) {
|
||||
$table [0]['vat_id'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_VAT'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['vat_value'] = array('width' => 13, 'value' => $mod_strings['LBL_PDF_LIST_VAT_VALUE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//}
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$pdf->Ln(0);
|
||||
|
||||
|
||||
$i = 1;
|
||||
$lv=return_app_list_strings_language($this->ecmlanguage);
|
||||
|
||||
$table=array();
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
$table [$i]['position'] = array('width' => 4, 'value' => $i, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($p['name']), 'border' => 1, 'align' => 'L', 'font-size' => 7 );
|
||||
$table [$i]['tax_code'] = array('width' => 8, 'value' => $p['tax_code'],'border' => 1, 'align' => 'C', 'font-size' => 7);
|
||||
$table [$i]['quantity'] = array('width' => 7, 'value' => $p['quantity'], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $lv['ecmproducts_unit_dom'][$p['unit_id']], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit_price'] = array('width' => 10, 'value' => format_number($p['price']).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$price_total=($p['price']-($p['price']*$p['discount']/100))*$p['quantity'];
|
||||
$table [$i]['unit_price_total'] = array('width' => 12, 'value' => format_number($price_total).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_discount'])
|
||||
$table [$i]['discount'] = array('width' => 5, 'value' => $p['discount'], 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_vat']){
|
||||
$table [$i]['vat_id'] = array('width' => 5, 'value' => format_number($p['vat_value']), 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$vat_value=$p['vat_value']/100*$p['price']*$p['quantity'];
|
||||
$table [$i]['vat_value'] = array('width' => 13, 'value' => format_number($vat_value).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
|
||||
//}
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => format_number($price_total+$vat_value).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$totals[$p['vat_id']]['price']+=$price_total;
|
||||
$totals[$p['vat_id']]['total']+=$price_total+$vat_value;
|
||||
$totals[$p['vat_id']]['vat']+=$vat_value;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->DrawTable($table,array(0));
|
||||
//total, vat, subtotal
|
||||
|
||||
$pdf->Ln(4);
|
||||
$pr = ($pdf->fw-$pdf->lMargin-$pdf->rMargin)/100;
|
||||
//$pdf->SetX($pdf->fw-$pdf->rMargin-$pr*34);
|
||||
$table = array();
|
||||
|
||||
if($calc['vats']) {
|
||||
/*$table [] = array(
|
||||
'subtotal1' => array('width' => 42, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'subtotal2' => array('width' => 14, 'value' => $calc['subtotal'].' '.$this->currency_symbol, 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
*/
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select id,name,value from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 10, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'netto_total' => array('width' => 12, 'value' => format_number($totals[$r['id']]['price']).' '.$this->currency_symbol, 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_rate' => array('width' => 5, 'value' => format_number($r['value']), 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_total' => array('width' => 13, 'value' => format_number($totals[$r['id']]['vat']).' '.$this->currency_symbol, 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat2' => array('width' => 14, 'value' => format_number($totals[$r['id']]['total']).' '.$this->currency_symbol, 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($calc['discount'])) {
|
||||
$table [] = array(
|
||||
'total21' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total22' => array('width' => 34, 'value' => $calc['total2'].' '.$this->currency_symbol, 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 86, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'discount2' => array('width' => 14, 'value' => $calc['discount']['value'].' '.$this->currency_symbol, 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
}
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 40, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total2' => array('width' => 14, 'value' => $calc['total'], 'border' => 1, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7, 'font-style' => 'b'), );
|
||||
$pdf->SetX(103);
|
||||
$pdf->DrawTable($table);
|
||||
$pdf->Ln(1);
|
||||
|
||||
//$table=array();
|
||||
|
||||
//$pdf->DrawTable($table);
|
||||
?>
|
||||
31
modules/templates/EcmReceiptOuts/saascrm/footer.php
Executable file
31
modules/templates/EcmReceiptOuts/saascrm/footer.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetY($this->fh-15);
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Rect(0, $this->getBreakLine(), $this->fw, $this->bMargin+1, "F");
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Cell(0, 10, $this->PageNo().'/{nb}');
|
||||
|
||||
$this->Ln(5);
|
||||
$this->AliasNbPages();
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->getBreakLine(),$this->fw-$this->rMargin,$this->fh-$this->bMargin+1);
|
||||
|
||||
|
||||
if($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) {
|
||||
// $this->bMargin = 3;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin);
|
||||
return;
|
||||
} else {
|
||||
// $this->bMargin = 19;
|
||||
// $this->SetAutoPageBreak(true,$this->bMargin+$this->tMarign+5);
|
||||
}
|
||||
|
||||
$this->SetFont('arialpl','','8');
|
||||
$this->SetXY($this->lMargin+10,$this->fh-$this->bMargin+3);
|
||||
$this->MultiCell($this->fw-$this->lMargin-$this->rMargin-20,4,$this->edt->footer_text,0,'C');
|
||||
?>
|
||||
32
modules/templates/EcmReceiptOuts/saascrm/header.php
Executable file
32
modules/templates/EcmReceiptOuts/saascrm/header.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?
|
||||
if(!$this->blnShowHeader) return;
|
||||
|
||||
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
//from address
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetXY($this->fw-100-$this->rMargin,$this->tMargin);
|
||||
$this->MultiCell(100,3.15,$this->edt->header_text,0,'R');
|
||||
//logo
|
||||
if(isset($this->edt->logo_path) && $this->edt->logo_path != '')
|
||||
if(file_exists($this->edt->logo_path))
|
||||
$this->Image($this->edt->logo_path,$this->lMargin,$this->tMargin,0,22.3);
|
||||
|
||||
/*
|
||||
//line
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->tMargin-1,$this->fw-$this->rMargin,$this->tMargin-1);
|
||||
*/
|
||||
//if($this->GetY() < $this->tMargin) $this->SetY($this->tMargin); else
|
||||
|
||||
$this->Ln(6);
|
||||
if($this->page == 1)
|
||||
if($this->edt->address) {
|
||||
$this->Ln(9);
|
||||
$this->SetFont('arialpl', 'u', 8);
|
||||
$this->SetX($this->lMargin);
|
||||
$this->MultiCell(0,3.15,$this->edt->address,0,'L');
|
||||
$this->Ln(5);
|
||||
}
|
||||
?>
|
||||
38
modules/templates/EcmReceiptOuts/saascrm/subfooter.php
Executable file
38
modules/templates/EcmReceiptOuts/saascrm/subfooter.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?
|
||||
|
||||
|
||||
//payment conditions
|
||||
if(!empty($this->ecmpaymentcondition_text)) {
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->ecmpaymentcondition_text,0,'L');
|
||||
}
|
||||
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','12');
|
||||
$pdf->Ln(3);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_CORRECT_DIFFERENCE']." ".format_number(abs(unformat_number($this->total) + unformat_number($this->ecminvoiceout->total))).' '.$this->currency_symbol);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
//footer text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->footer_text,0,'J');
|
||||
|
||||
|
||||
|
||||
//header text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','B','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
|
||||
|
||||
?>
|
||||
236
modules/templates/EcmReceiptOuts/saascrm/subheader.php
Executable file
236
modules/templates/EcmReceiptOuts/saascrm/subheader.php
Executable file
@@ -0,0 +1,236 @@
|
||||
<?
|
||||
/*
|
||||
$pdf->Ln(10);
|
||||
|
||||
//$this->SetY($this->tMargin);
|
||||
|
||||
//from address
|
||||
|
||||
$this->template->setAccount();
|
||||
|
||||
$address = $this->template->account->name;
|
||||
|
||||
if($this->template->account->billing_address_street) $address .= " - ".$this->template->account->billing_address_street;
|
||||
|
||||
if($this->template->account->billing_address_postalcode) $address .= " - ".$this->template->account->billing_address_postalcode;
|
||||
|
||||
if($this->template->account->billing_address_city) $address .= " ".$this->template->account->billing_address_city;
|
||||
|
||||
$pdf->SetFont('arialpl', 'u', 8);
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->MultiCell(0,5,$address,0,'L');
|
||||
*/
|
||||
|
||||
|
||||
$pdf->Ln(2);
|
||||
|
||||
|
||||
//to address
|
||||
|
||||
$address = $this->parent_name;
|
||||
if($this->parent_contact_name) {
|
||||
$address .= "\n".$this->parent_contact_name;
|
||||
if($this->parent_contact_title) $address .= "\n".$this->parent_contact_title;
|
||||
}
|
||||
|
||||
if($this->parent_address_street) $address .= "\n".$this->parent_address_street;
|
||||
|
||||
if($this->parent_address_postalcode) $address .= "\n\n".$this->parent_address_postalcode;
|
||||
|
||||
if($this->parent_address_city) $address .= " ".$this->parent_address_city;
|
||||
|
||||
if($this->to_vatid) $address .= "\n\n".$mod_strings['LBL_PDF_VATID']." ".$this->to_vatid;
|
||||
|
||||
$pdf->SetFont('arialpl', '', 10);
|
||||
|
||||
$pdf->Ln(2);
|
||||
$current = $pdf->GetY();
|
||||
$pdf->MultiCell(0,4,$address,0,'L');
|
||||
$current2 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-30,$current);
|
||||
$table = array();
|
||||
$table [0]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_NUMBER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [1]['data'] = array('width' => 30, 'value' => $this->document_no, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
$table [2]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_DATE_REGISTER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [3]['data'] = array('width' => 30, 'value' => $this->register_date, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
$table [4]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_OWNER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [5]['data'] = array('width' => 30, 'value' => $this->setUser()->full_name, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
$pdf->DrawTable($table, null, 0.5, 0.5, 3);
|
||||
|
||||
$pdf->SetY($current2);
|
||||
|
||||
$pdf->Ln(12);
|
||||
|
||||
$pdf->SetFont('arialpl','','24');
|
||||
|
||||
if($this->type == "normal")
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME'],0,'L');
|
||||
else if($this->type == "correct") {
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT'],0,'L');
|
||||
$this->loadEcmInvoiceOut();
|
||||
$this->ecminvoiceout->format_all_fields();
|
||||
$pdf->Ln(5);
|
||||
$pdf->SetFont('arialpl','','18');
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME_CORRECT_TO'].' '.$this->ecminvoiceout->document_no);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->loadParser();
|
||||
|
||||
$this->header_text = $this->template->mfp->parseText($this->header_text);
|
||||
|
||||
$this->footer_text = $this->template->mfp->parseText($this->footer_text);
|
||||
|
||||
$this->ads_text = $this->template->mfp->parseText($this->ads_text);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//header text
|
||||
|
||||
$pdf->Ln(12);
|
||||
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->header_text,0,'J');
|
||||
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
if($this->type == "correct") {
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_BEFORE_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
$this->ecminvoiceout->DrawPositions($pdf);
|
||||
$pdf->SetFont('arialpl','b','10');
|
||||
$pdf->Ln(4);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_DOCUMENT_AFTER_CORRECT']);
|
||||
$pdf->Ln(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$pdf->SetFont('arialpl','','7');
|
||||
global $mod_strings;
|
||||
|
||||
|
||||
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($this->currency_id);
|
||||
$this->currency_symbol=$currency->iso4217;
|
||||
|
||||
if(!isset($this->position_list) || !is_array($this->position_list))
|
||||
$this->position_list = $this->getPositionList(true);
|
||||
$calc = $this->calculate($this->position_list,true);
|
||||
//$this->position_list = $this->formatPositions($this->position_list);
|
||||
|
||||
$calc['total'] .= ' '.$this->currency_symbol;
|
||||
$calc['subtotal'] .= ' '.$this->currency_symbol;
|
||||
if($calc['discount']) {
|
||||
$calc['total2'] .= ' '.$this->currency_symbol;
|
||||
$calc['discount']['value'] .= ' '.$this->currency_symbol;
|
||||
}
|
||||
|
||||
if(isset($calc['vats']) && is_array($calc['vats']) && count($calc['vats']) > 0)
|
||||
foreach($calc['vats'] as $key => $value) $calc['vats'][$key] .= ' '.$this->currency_symbol;
|
||||
|
||||
$name_w = 17;
|
||||
//if($calc['draw_discount']) $name_w -= 8;
|
||||
//if($calc['draw_vat']) $name_w -= 8;
|
||||
$table = array();
|
||||
$table [0]['position'] = array('width' => 4, 'value' => $mod_strings['LBL_PDF_LIST_POSITION'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 8);
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['tax_code'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_TAX_CODE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['quantity'] = array('width' => 7, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['unit'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 8);
|
||||
$table [0]['unit_price'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['unit_price_total'] = array('width' => 12, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL_PRICE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//if($calc['draw_discount'])
|
||||
$table [0]['discount'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//if($calc['draw_vat']) {
|
||||
$table [0]['vat_id'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_VAT'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$table [0]['vat_value'] = array('width' => 13, 'value' => $mod_strings['LBL_PDF_LIST_VAT_VALUE'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
//}
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'],'border' => 1, 'overflow' => 1, 'align' => 'C', 'font-style' => 'b', 'font-size' => 7);
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$pdf->Ln(0);
|
||||
|
||||
|
||||
$i = 1;
|
||||
$lv=return_app_list_strings_language($this->ecmlanguage);
|
||||
|
||||
$table=array();
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
$table [$i]['position'] = array('width' => 4, 'value' => $i, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($p['name']), 'border' => 1, 'align' => 'L', 'font-size' => 7 );
|
||||
$table [$i]['tax_code'] = array('width' => 8, 'value' => $p['tax_code'],'border' => 1, 'align' => 'C', 'font-size' => 7);
|
||||
$table [$i]['quantity'] = array('width' => 7, 'value' => $p['quantity'], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $lv['ecmproducts_unit_dom'][$p['unit_id']], 'border' => 1, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit_price'] = array('width' => 10, 'value' => format_number($p['price']).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$price_total=($p['price']-($p['price']*$p['discount']/100))*$p['quantity'];
|
||||
$table [$i]['unit_price_total'] = array('width' => 12, 'value' => format_number($price_total).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_discount'])
|
||||
$table [$i]['discount'] = array('width' => 5, 'value' => $p['discount'], 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
//if($calc['draw_vat']){
|
||||
$table [$i]['vat_id'] = array('width' => 5, 'value' => format_number($p['vat_value']), 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$vat_value=$p['vat_value']/100*$p['price']*$p['quantity'];
|
||||
$table [$i]['vat_value'] = array('width' => 13, 'value' => format_number($vat_value).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
|
||||
//}
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => format_number($price_total+$vat_value).' '.$this->currency_symbol, 'border' => 1, 'align' => 'R', 'font-size' => 7 );
|
||||
$totals[$p['vat_id']]['price']+=$price_total;
|
||||
$totals[$p['vat_id']]['total']+=$price_total+$vat_value;
|
||||
$totals[$p['vat_id']]['vat']+=$vat_value;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->DrawTable($table,array(0));
|
||||
//total, vat, subtotal
|
||||
|
||||
$pdf->Ln(4);
|
||||
$pr = ($pdf->fw-$pdf->lMargin-$pdf->rMargin)/100;
|
||||
//$pdf->SetX($pdf->fw-$pdf->rMargin-$pr*34);
|
||||
$table = array();
|
||||
|
||||
if($calc['vats']) {
|
||||
/*$table [] = array(
|
||||
'subtotal1' => array('width' => 42, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'subtotal2' => array('width' => 14, 'value' => $calc['subtotal'].' '.$this->currency_symbol, 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
*/
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select id,name,value from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 10, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7),
|
||||
'netto_total' => array('width' => 12, 'value' => format_number($totals[$r['id']]['price']).' '.$this->currency_symbol, 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_rate' => array('width' => 5, 'value' => format_number($r['value']), 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat_total' => array('width' => 13, 'value' => format_number($totals[$r['id']]['vat']).' '.$this->currency_symbol, 'background' => array(255,255,255), 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7),
|
||||
'vat2' => array('width' => 14, 'value' => format_number($totals[$r['id']]['total']).' '.$this->currency_symbol, 'border' => 1, 'overflow' => 1, 'align' => 'R', 'font-size' => 7), );
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($calc['discount'])) {
|
||||
$table [] = array(
|
||||
'total21' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total22' => array('width' => 34, 'value' => $calc['total2'].' '.$this->currency_symbol, 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 86, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'discount2' => array('width' => 14, 'value' => $calc['discount']['value'].' '.$this->currency_symbol, 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7), );
|
||||
}
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 40, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'border' => 1, 'overflow' => 1, 'align' => 'L', 'font-size' => 7, 'font-style' => 'b'),
|
||||
'total2' => array('width' => 14, 'value' => $calc['total'], 'border' => 1, 'overflow' => 1, 'align' => 'R' , 'font-size' => 7, 'font-style' => 'b'), );
|
||||
$pdf->SetX(103);
|
||||
$pdf->DrawTable($table);
|
||||
$pdf->Ln(1);
|
||||
|
||||
//$table=array();
|
||||
|
||||
//$pdf->DrawTable($table);
|
||||
?>
|
||||
Reference in New Issue
Block a user