init
This commit is contained in:
84
modules/templates/EcmQuotes/e5/footer.php
Executable file
84
modules/templates/EcmQuotes/e5/footer.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?
|
||||
$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->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) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->SetXY($this->lMargin,$this->fh-$this->bMargin+3);
|
||||
|
||||
$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();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,'');
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'Numer GIOS: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,"E0006254W",0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetY($this->fh-15);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Cell(0, 10, $this->PageNo().'/{nb}');
|
||||
|
||||
$this->SetFont("arialpl","B",8);
|
||||
$this->SetY($this->fh-12);
|
||||
$this->SetX(40);
|
||||
$r=mysql_fetch_array(mysql_query("select document_no from ".strtolower($_REQUEST['module'])." where id='".$_REQUEST['record']."'"));
|
||||
$this->Cell(45,4,$r['document_no'],0,0,'L');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
18
modules/templates/EcmQuotes/e5/header.php
Executable file
18
modules/templates/EcmQuotes/e5/header.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?
|
||||
error_reporting(0);
|
||||
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);
|
||||
?>
|
||||
37
modules/templates/EcmQuotes/e5/subfooter.php
Executable file
37
modules/templates/EcmQuotes/e5/subfooter.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?
|
||||
|
||||
error_reporting(0);
|
||||
|
||||
//payment conditions
|
||||
if(!empty($this->ecmpaymentcondition_text)) {
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->ecmpaymentcondition_text,0,'L');
|
||||
}
|
||||
|
||||
//delivery conditions
|
||||
if(!empty($this->ecmdeliverycondition_text)) {
|
||||
$pdf->Ln(4);
|
||||
$pdf->SetFont('arialpl','','8');
|
||||
$pdf->MultiCell(0,4,$this->ecmdeliverycondition_text,0,'L');
|
||||
}
|
||||
|
||||
|
||||
//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');
|
||||
?>
|
||||
307
modules/templates/EcmQuotes/e5/subheader.php
Executable file
307
modules/templates/EcmQuotes/e5/subheader.php
Executable file
@@ -0,0 +1,307 @@
|
||||
<?
|
||||
error_reporting(0);
|
||||
$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();
|
||||
|
||||
//$current = $pdf->GetY();
|
||||
//$pdf->Ln(7);
|
||||
$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');
|
||||
|
||||
$next = 4;
|
||||
if(isset($this->validtill_date) && $this->validtill_date != '') {
|
||||
$table [$next++]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_VALIDTILL_DATE'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [$next++]['data'] = array('width' => 30, 'value' => $this->validtill_date, 'border' => 0, 'overflow' => 1, 'align' => 'L');
|
||||
}
|
||||
|
||||
|
||||
$table [$next++]['data'] = array('width' => 30, 'value' => $mod_strings['LBL_PDF_OWNER'], 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [$next++]['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','','22');
|
||||
|
||||
$pdf->SetY(45);
|
||||
$pdf->SetX(65);
|
||||
$pdf->MultiCell(90,10,$this->name,70,'C');
|
||||
$yaftername=$pdf->GetY()+7;
|
||||
|
||||
|
||||
if(isset($this->validtill_date) && $this->validtill_date != '') $pdf->Ln(9);
|
||||
|
||||
|
||||
$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(20);
|
||||
|
||||
$pdf->SetFont('arialpl','B','10');
|
||||
|
||||
$pdf->SetY(36);
|
||||
$pdf->MultiCell(0,4,$mod_strings['LBL_PDF_QUOTE_FOR'],0,'J');
|
||||
$pdf->Ln(1);
|
||||
$pdf->SetFont('arialpl','','10');
|
||||
$pdf->MultiCell(0,4,$this->parent_name,0,'J');
|
||||
|
||||
|
||||
|
||||
$pdf->Ln(20);
|
||||
$pdf->SetY($yaftername);
|
||||
|
||||
|
||||
|
||||
|
||||
//********************
|
||||
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;
|
||||
|
||||
|
||||
|
||||
$name_w = 38;
|
||||
$image_w = 10;
|
||||
$recipient_code_w = 10;
|
||||
|
||||
if($this->show_images_on_offers){
|
||||
$name_w -= $image_w;
|
||||
}
|
||||
if($this->show_recipient_code){
|
||||
$name_w -= $recipient_code_w;
|
||||
}
|
||||
|
||||
if($calc['draw_discount']){
|
||||
$name_w -= 8;
|
||||
}
|
||||
if($calc['draw_vat']){
|
||||
$name_w -= 8;
|
||||
}
|
||||
//wsp - wsp<73><70>czynnik zmniejszenia obrazka
|
||||
|
||||
if (isset($this->image_size))
|
||||
$proc = (int) $this->image_size;
|
||||
if (!isset($proc) || $proc='' || is_null($proc)) {
|
||||
$test = 1;
|
||||
$wsp = 1;} else {
|
||||
//alert('tu!');
|
||||
$test = "Lp.";
|
||||
$wsp = (float) $proc / 100;
|
||||
}
|
||||
//$mod_strings['LBL_PDF_LIST_POSITION']
|
||||
|
||||
$table = array();
|
||||
if($this->show_images_on_offers)
|
||||
$table [0]['image'] = array('width' => $image_w, 'value' => ''
|
||||
, 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
$table [0]['position'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_POSITION'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['code'] = array('width' => 16, 'value' => $mod_strings['LBL_PDF_LIST_CODE'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
if($this->show_recipient_code)
|
||||
$table [0]['recipient_code'] = array('width' => $recipient_code_w, 'value' => $mod_strings['LBL_PDF_LIST_RECIPIENT_CODE'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
//$table [0]['unit'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['quantity'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['unit'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'], 'border' => 0,'background' => array(233,233,233), 'overflow' => 1, 'align' => 'C', 'font-size' => 8);
|
||||
$table [0]['unit_price'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
if($calc['draw_discount']) $table [0]['discount'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
if($calc['draw_vat']) $table [0]['vat_id'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_VAT'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
|
||||
$i = 1;
|
||||
$ii = 1;
|
||||
$lv=return_app_list_strings_language($this->ecmlanguage);
|
||||
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
|
||||
|
||||
$w=mysql_query("select code,name,ecmcomponent_id,quantity from ecmproductcomponents where ecmproduct_id='".$p['id']."' and deleted='0' and position='0'");
|
||||
if(mysql_num_rows($w)>0 && eregi("Zestaw",$p['name']) && eregi("\+",$p['name'])){
|
||||
$r=mysql_fetch_array($w);
|
||||
$p_name=$r['name'];
|
||||
$p_code=$r['code'];
|
||||
$p_image=$this->getProductImage($r['ecmcomponent_id']);
|
||||
}
|
||||
else {
|
||||
$p_name=$p['name'];
|
||||
$p_code=$p['code'];
|
||||
$p_image=$this->getProductImage($p['id']);
|
||||
}
|
||||
|
||||
if($this->show_images_on_offers){
|
||||
if(file_exists($p_image)){$table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R', 'image_path' => $p_image);
|
||||
}
|
||||
else $table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R');
|
||||
}
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => $ii, 'border' => 0, 'align' => 'C', );
|
||||
if($this->show_ean)$p_code.="\n".$p['ean'];
|
||||
// EAN2
|
||||
if($this->show_ean2){
|
||||
$db = $GLOBALS['db'];
|
||||
$query = "SELECT ean2 from ecmproducts WHERE id='".$p['id']."';";
|
||||
$result = $db->query($query);
|
||||
$row = $db->fetchByAssoc($result);
|
||||
if (!$row['ean2']=='') $p_code.="\n".$row['ean2'];
|
||||
}
|
||||
//
|
||||
$table [$i]['code'] = array('width' => 16, 'value' => $p_code, 'border' => 0, 'align' => 'C', );
|
||||
if($this->show_recipient_code){
|
||||
$table [$i]['recipient_code'] = array('width' => $recipient_code_w, 'value' => $p['recipient_code'], 'border' => 0, 'align' => 'C', );
|
||||
}
|
||||
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($p_name), 'border' => 0, 'align' => 'L', );
|
||||
$table [$i]['quantity'] = array('width' => 8, 'value' => $p['quantity'], 'border' => 0, 'align' => 'C', );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $lv['ecmproducts_unit_dom'][$p['unit_id']], 'border' => 0, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit_price'] = array('width' => 14, 'value' => $p['price'], 'border' => 0, 'align' => 'C', );
|
||||
if($calc['draw_discount']) $table [$i]['discount'] = array('width' => 8, 'value' => $p['discount'], 'border' => 0, 'align' => 'R', );
|
||||
if($calc['draw_vat']) $table [$i]['vat_id'] = array('width' => 8, 'value' => $p['vat_name'], 'border' => 0, 'align' => 'R', );
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => $p['total'], 'border' => 0, 'align' => 'R', );
|
||||
|
||||
if($p['id'] && eregi("Zestaw",$p['name']) && eregi("\+",$p['name'])){
|
||||
$w=mysql_query("select code,name,quantity,ecmcomponent_id,position from ecmproductcomponents where ecmproduct_id='".$p['id']."' and deleted='0' and position>0 order by name asc");
|
||||
if(mysql_num_rows($w)>0){
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$i++;
|
||||
if($this->show_images_on_offers){
|
||||
if(file_exists($this->getProductImage($r['ecmcomponent_id'])) && $r['position']>0){
|
||||
//tworzenie obrazka
|
||||
$pl=$this->getProductImage($r['ecmcomponent_id']);
|
||||
if(strstr($pl,".jpeg")) {$handle = imagecreatefromjpeg($pl);$co="jpeg";}
|
||||
if(strstr($pl,".jpg")) {$handle = imagecreatefromjpeg($pl);$co="jpg";}
|
||||
if(strstr($pl,".gif")){$handle = imagecreatefromgif($pl);$co="gif";}
|
||||
if(strstr($pl,".png")){$handle = imagecreatefrompng($pl);$co="png";}
|
||||
$ow = imagesx($handle);
|
||||
$oh = imagesy($handle);
|
||||
$ow1 = $ow/2.5;
|
||||
$oh1 = $oh/2.5;
|
||||
$new_pl=str_replace(".".$co,"_gratis.".$co,$pl);
|
||||
|
||||
$npic = imagecreatetruecolor($ow1,$oh1);
|
||||
imagefill($npic,0,0,imagecolorallocate($npic, 255, 255, 255));
|
||||
imagecopyresampled($npic, $handle, 0, 0, 0, 0,$ow1, $oh1, $ow, $oh);
|
||||
|
||||
$bg = imagecolorallocate($npic,255,0,0);
|
||||
imagefilledrectangle($npic,0,$oh1-20,$ow1,$ow1,$bg);
|
||||
imagestring($npic,5,10,$oh1-18,"GRATIS",imagecolorallocate($npic,255,255,255));
|
||||
|
||||
chmod($new_pl,0777);
|
||||
|
||||
imagejpeg($npic,$new_pl,100);
|
||||
//tworzenie obrazka
|
||||
|
||||
$table [$i]['image'] = array('width' => ($image_w), 'value' => $new_pl, 'border' => 0, 'align' => 'R', 'image_path' => $new_pl);
|
||||
}
|
||||
else $table [$i]['image'] = array('width' => ($image_w), 'value' => '', 'border' => 0, 'align' => 'R');
|
||||
}
|
||||
else $table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R');
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => '+', 'border' => 0, 'align' => 'C', 'font-style' => 'b', 'font-size' => 20);
|
||||
|
||||
$table [$i]['code'] = array('width' => 16, 'value' => $r['code'], 'border' => 0, 'align' => 'C', );
|
||||
if($this->show_recipient_code)$table [$i]['recipient_code'] = array('width' => $recipient_code_w, 'value' => '', 'border' => 0, 'align' => 'C', );
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($r['name']), 'border' => 0, 'align' => 'L', );
|
||||
$table [$i]['quantity'] = array('width' => 8, 'value' => $p['quantity'], 'border' => 0, 'align' => 'C', );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $lv['ecmproducts_unit_dom'][$r['unit_id']], 'border' => 0, 'align' => 'C', 'font-size' => 7 );
|
||||
}
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
$table [$i]['image'] = array('width' => 100, 'font-style'=>'b', 'value' => '___________________________________________________________________________________________________________','border'=>'0', 'align' => 'R',);
|
||||
|
||||
$i++;
|
||||
$ii++;
|
||||
}
|
||||
$starttab=$pdf->GetY()+10;
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$endtab=$pdf->GetY();
|
||||
//for($n=0;$n<$i;$n++){
|
||||
//if(file_exists($iarr[$n]))$pdf->Image($iarr[$n],$pdf->GetX()+1,$starttab+$n*18+1,15,0);
|
||||
//}
|
||||
$pdf->SetY($endtab);
|
||||
//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' => 66, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9),
|
||||
'subtotal2' => array('width' => 34, 'value' => $calc['subtotal'], 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-size' => 9), );
|
||||
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select name from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9),
|
||||
'vat2' => array('width' => 34, 'value' => $value, 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-size' => 9), );
|
||||
}
|
||||
}
|
||||
|
||||
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' => 9, 'font-style' => 'b'),
|
||||
'total22' => array('width' => 34, 'value' => $calc['total2'], 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 9), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-style' => 'b'),
|
||||
'discount2' => array('width' => 34, 'value' => $calc['discount']['value'], 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 9), );
|
||||
}
|
||||
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-style' => 'b'),
|
||||
'total2' => array('width' => 34, 'value' => $calc['total'], 'border' => 0, 'background' => array(233,233,233), 'overflow' => 1, 'align' => 'R' , 'font-size' => 9, 'font-style' => 'b'), );
|
||||
|
||||
$pdf->DrawTable($table);
|
||||
?>
|
||||
51
modules/templates/EcmQuotes/hoffmann/footer.php
Executable file
51
modules/templates/EcmQuotes/hoffmann/footer.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?
|
||||
|
||||
$this->SetXY(115, $this->fh - 10);
|
||||
$this->SetFont('arialpl', 'b', 10);
|
||||
$this->SetFillColor(254, 226, 0);
|
||||
$this->Cell(85,10,"www.hoffmann-verpackung.de",0,0,"C",1,"http://www.hoffmann-verpackung.de");
|
||||
$this->SetFillColor(255,255,255);
|
||||
|
||||
$this->SetFont('arialpl', '', 7.5);
|
||||
|
||||
$this->SetXY(26,$this->fh-16);
|
||||
$this->Cell(49,0,"Dresdner Bank Düsseldorf"); $this->Cell(40,0,"Postbank Köln (BLZ 370 100 50)"); $this->Cell(56,0,"Gaschäftsführer"); $this->Cell(30,0,"Handelsregister");
|
||||
$this->SetXY(26,$this->fh-12.5);
|
||||
$this->Cell(49,0,"(BLZ 300 800 00) Kto. 01 031 004 00"); $this->Cell(40,0,"Kto. 50 630-502"); $this->Cell(56,0,"Carl-Gerd Coenen, Andrea Müller"); $this->Cell(30,0,"AG Neuss HRB 4023");
|
||||
$this->SetXY(26,$this->fh-7.5);
|
||||
$this->Cell(49,0,"Stadtsparkasse Düsseldorf"); //$this->Cell(40,0,""); $this->Cell(56,0,""); $this->Cell(30,0,"");
|
||||
$this->SetXY(26,$this->fh-4);
|
||||
$this->Cell(49,0,"(BLZ 300 501 10) Kto. 47 001 409"); $this->Cell(40,0,"USt-IdNr. DE 120511813"); //$this->Cell(56,0,""); $this->Cell(30,0,"");
|
||||
|
||||
|
||||
/*
|
||||
$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');
|
||||
*/
|
||||
77
modules/templates/EcmQuotes/hoffmann/header.php
Executable file
77
modules/templates/EcmQuotes/hoffmann/header.php
Executable file
@@ -0,0 +1,77 @@
|
||||
<?
|
||||
$this->lMargin = 20;
|
||||
if(!$this->blnShowHeader) return;
|
||||
|
||||
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
/*
|
||||
$this->SetXY(35,5);
|
||||
$html = "<table><tr><td><b>Kaarst/Neuss</b></td><td>Moderne Verpackung</td></tr></table>";
|
||||
$this->WriteHTML($html);
|
||||
*/
|
||||
|
||||
/*
|
||||
$addr = array(
|
||||
"Kaarst/Neuss" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss1" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss2" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss3" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss4" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss5" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss6" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss7" => "Moderne Verpackung",
|
||||
);
|
||||
|
||||
$this->SetFont('arialpl', 'B', 8);
|
||||
for($i = 0; $i < count($addr); $i++) {
|
||||
$this->SetXY(30,$i*3.5+5);
|
||||
$this->Cell(35,0,"Kaarst/Neuss"); $this->Cell(35,0,"Moderne Verpackung");
|
||||
}
|
||||
*/
|
||||
|
||||
$this->SetFont('arialpl', 'b', '7.5');
|
||||
$this->SetXY(26, 5); $this->Cell(35,0,"Kaarst/Neuss"); $this->Cell(0,0,"Moderne Verpackung");
|
||||
$this->SetXY(26, 8.5); $this->Cell(35,0,"Wetter/Ruhr"); $this->Cell(0,0,"Carl Bernh. Hoffmann GmbH");
|
||||
$this->SetXY(26, 12); $this->Cell(35,0,"Leipzig"); $this->Cell(0,0,"D-41564 Kaarst-Holzbüttgen");
|
||||
|
||||
$this->SetFont('arialpl', '', '7.5');
|
||||
$this->SetXY(26, 15.5); $this->Cell(35,0,"Groß Kienitz/Berlin"); $this->Cell(0,0,"Hüngert 5 - Gewerbegebiet");
|
||||
$this->SetXY(26, 19); $this->Cell(35,0,"Wendlingen/Stuttgart"); $this->Cell(0,0,"Telefon 02131-88 00-0");
|
||||
$this->SetXY(26, 22.5); $this->Cell(35,0,"Idstein/Taunus"); $this->Cell(0,0,"Telfax 02131-88 00-188");
|
||||
$this->SetXY(26, 26); $this->Cell(35,0,"Pliening/Bayern"); $this->Cell(0,0,"kaarst@hoffmann-verpackung.de");
|
||||
$this->SetXY(26, 29.5); $this->Cell(35,0,"Jeding/Slazburg"); $this->Cell(0,0,"www.hoffmann-verpackung.de");
|
||||
|
||||
|
||||
$this->SetY(35);
|
||||
|
||||
|
||||
/*
|
||||
$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,115,0,85,24);
|
||||
|
||||
$this->Ln(10);
|
||||
/*
|
||||
//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);
|
||||
}
|
||||
*/
|
||||
15
modules/templates/EcmQuotes/hoffmann/subfooter.php
Executable file
15
modules/templates/EcmQuotes/hoffmann/subfooter.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?
|
||||
|
||||
if($this->footer_text != '') {
|
||||
//footer text
|
||||
$pdf->Ln(8);
|
||||
$pdf->SetFont('courier','','10');
|
||||
$pdf->MultiCell(0,4,$this->footer_text,0,'J');
|
||||
}
|
||||
|
||||
if($this->ads_text != '') {
|
||||
//ads text
|
||||
$pdf->Ln(8);
|
||||
$pdf->SetFont('courier','','10');
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
}
|
||||
223
modules/templates/EcmQuotes/hoffmann/subheader.php
Executable file
223
modules/templates/EcmQuotes/hoffmann/subheader.php
Executable file
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
$pdf->SetXY(135,37); $pdf->SetFont('courier','',10); $pdf->Cell(30,0,"Angebot-Nr."); $pdf->SetFont('courier','B',10); $pdf->Cell(30,0,trim($this->document_no));
|
||||
$pdf->SetXY(135,41.5); $pdf->SetFont('courier','',10); $pdf->Cell(30,0,"vom"); $pdf->SetFont('courier','B',10); $pdf->Cell(30,0,$this->register_date);
|
||||
$pdf->SetXY(135,46); $pdf->SetFont('courier','',10); $pdf->Cell(30,0,"Kunde-Nr."); $pdf->SetFont('courier','B',10); $pdf->Cell(30,0,$this->getAccount()->customerno_c);
|
||||
|
||||
$pdf->SetFont('courier','',10);
|
||||
$pdf->SetXY(135,53); $pdf->Cell(30,0,"Außendienst"); //$pdf->Cell(30,0,"");
|
||||
$pdf->SetXY(135,57.5); $pdf->Cell(30,0,"Mobil"); //$pdf->Cell(30,0,"");
|
||||
$pdf->SetXY(135,63); $pdf->Cell(30,0,"Innendienst"); $pdf->Cell(30,0,$this->setUser()->full_name);
|
||||
$pdf->SetXY(135,66.5); $pdf->Cell(30,0,"Telefon"); $pdf->Cell(30,0,$this->setUser()->phone_work);
|
||||
$pdf->SetXY(135,71); $pdf->Cell(30,0,"Unser Zeichen"); $pdf->Cell(30,0,"mh/an");
|
||||
|
||||
$pdf->SetXY(135,78); $pdf->Cell(30,0,"Anfrage vom"); //$pdf->Cell(30,0,"");
|
||||
$pdf->SetXY(135,82.5); $pdf->Cell(30,0,"durch"); //$pdf->Cell(30,0,"");
|
||||
$pdf->SetXY(135,87); $pdf->Cell(30,0,"Ihre Anfrage"); //$pdf->Cell(30,0,"");
|
||||
$pdf->SetXY(135,91.5); $pdf->Cell(30,0,"Seite:"); $pdf->Cell(30,0,$pdf->PageNo());
|
||||
|
||||
$pdf->SetFont('courier','b',14);
|
||||
$pdf->SetXY(20,89);
|
||||
$pdf->Cell(0,0,"A N G E B O T");
|
||||
|
||||
$pdf->SetFont('courier','',10);
|
||||
$pdf->SetXY(20,96);
|
||||
$pdf->Cell(0,0,"Lieferanschrift");
|
||||
|
||||
$pdf->SetFont('courier','',10);
|
||||
|
||||
$addr_pos = 102;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
$pdf->Cell(0,0,$this->parent_name);
|
||||
|
||||
if($this->parent_contact_name) {
|
||||
|
||||
$addr_pos += 4;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
$pdf->Cell(0,0,$this->parent_contact_name);
|
||||
|
||||
if($this->parent_contact_title) {
|
||||
$addr_pos += 4;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
$pdf->Cell(0,0,$this->parent_contact_title);
|
||||
}
|
||||
|
||||
}
|
||||
if($this->parent_address_street) {
|
||||
$addr_pos += 4;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
$pdf->Cell(0,0,$this->parent_address_street);
|
||||
}
|
||||
if($this->parent_address_postalcode) {
|
||||
$addr_pos += 6;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
$pdf->Cell(0,0,$this->parent_address_postalcode.($this->parent_address_city ? (" ".$this->parent_address_city) : ""));
|
||||
}
|
||||
if($this->to_vatid) {
|
||||
$addr_pos += 6;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
$pdf->Cell(0,0,$mod_strings['LBL_PDF_VATID']." ".$this->to_vatid);
|
||||
}
|
||||
|
||||
$addr_pos += 3;
|
||||
$pdf->SetXY(25,$addr_pos);
|
||||
|
||||
|
||||
$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);
|
||||
|
||||
if($this->header_text != '') {
|
||||
//header text
|
||||
$pdf->Ln(8);
|
||||
$pdf->SetFont('courier','','10');
|
||||
$pdf->MultiCell(0,4,$this->header_text,0,'J');
|
||||
}
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
|
||||
|
||||
|
||||
//*************
|
||||
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;
|
||||
|
||||
$name_w = 47;
|
||||
$image_w = 10;
|
||||
|
||||
$recipient_code_w = 10;
|
||||
if($this->show_images_on_offers){
|
||||
$name_w -= $image_w;
|
||||
}
|
||||
if($this->show_recipient_code){
|
||||
$name_w -= $recipient_code_w;
|
||||
}
|
||||
|
||||
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'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-family' => 'courier');
|
||||
if($this->show_images_on_offers)
|
||||
$table [0]['image'] = array('width' => $image_w, 'value' => $mod_strings['LBL_PDF_LIST_IMAGE'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-family' => 'courier');
|
||||
$table [0]['code'] = array('width' => 12, 'value' => $mod_strings['LBL_PDF_LIST_CODE'],'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-family' => 'courier');
|
||||
if($this->show_recipient_code)
|
||||
$table [0]['recipient_code'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_RECIPIENT_CODE'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'C', 'font-family' => 'courier');
|
||||
//$table [0]['unit'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-family' => 'courier');
|
||||
$table [0]['quantity'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'C', 'font-family' => 'courier');
|
||||
$table [0]['unit_price'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'C', 'font-family' => 'courier');
|
||||
if($calc['draw_discount']) $table [0]['discount'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-family' => 'courier');
|
||||
if($calc['draw_vat']) $table [0]['vat_id'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_VAT'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-family' => 'courier');
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-family' => 'courier');
|
||||
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$pdf->SetLineWidth(0);
|
||||
$pdf->SetDrawColor(0,0,0);
|
||||
$pdf->Line($pdf->lMargin,$pdf->getY(),$pdf->fw-$pdf->rMargin,$pdf->getY());
|
||||
|
||||
$pdf->Ln(1);
|
||||
$table = array();
|
||||
|
||||
$i = 1;
|
||||
$lv=return_app_list_strings_language($this->ecmlanguage);
|
||||
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => $i, 'border' => 0, 'align' => 'L', 'font-family' => 'courier');
|
||||
if($this->show_images_on_offers){
|
||||
if(file_exists($this->getProductImage($p['id']))){
|
||||
$table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R', 'image_path' => $this->getProductImage($p['id']));
|
||||
//$iarr[]=$this->getProductImage($p['id']);
|
||||
}
|
||||
else $table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R', 'font-family' => 'courier');
|
||||
}
|
||||
$table [$i]['code'] = array('width' => 12, 'value' => $p['code'], 'border' => 0, 'align' => 'L', 'font-family' => 'courier');
|
||||
if($this->show_recipient_code)
|
||||
$table [$i]['recipient_code'] = array('width' => $recipient_code_w, 'value' => $p['recipient_code'], 'border' => 0, 'align' => 'C', 'font-family' => 'courier');
|
||||
//$table [$i]['unit'] = array('width' => 10, 'value' => $p['unit_id'], 'border' => 0, 'align' => 'C', );
|
||||
|
||||
/*
|
||||
if($this->ecmlanguage=="en_us"){
|
||||
$r=mysql_fetch_array(mysql_query("select short_description from ecmproduct_language_en_view where ecmproduct_id='".$p['id']."'"));
|
||||
$dname=$r['short_description'];
|
||||
}
|
||||
elseif($this->ecmlanguage=="ge_ge"){
|
||||
$r=mysql_fetch_array(mysql_query("select short_description from ecmproduct_language_de_view where ecmproduct_id='".$p['id']."'"));
|
||||
$dname=$r['short_description'];
|
||||
}
|
||||
else $dname=$p['name'];
|
||||
*/
|
||||
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($p['name']), 'border' => 0, 'align' => 'L', 'font-family' => 'courier');
|
||||
$table [$i]['quantity'] = array('width' => 8, 'value' => $p['quantity'], 'border' => 0, 'align' => 'C', 'font-family' => 'courier');
|
||||
$table [$i]['unit_price'] = array('width' => 14, 'value' => $p['price'], 'border' => 0, 'align' => 'C', 'font-family' => 'courier');
|
||||
if($calc['draw_discount']) $table [$i]['discount'] = array('width' => 8, 'value' => $p['discount'], 'border' => 0, 'align' => 'R', 'font-family' => 'courier');
|
||||
if($calc['draw_vat']) $table [$i]['vat_id'] = array('width' => 8, 'value' => $p['vat_name'], 'border' => 0, 'align' => 'R', 'font-family' => 'courier');
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => $p['total'], 'border' => 0, 'align' => 'R', 'font-family' => 'courier');
|
||||
$i++;
|
||||
}
|
||||
//$starttab=$pdf->GetY()+10;
|
||||
$pdf->DrawTable($table);
|
||||
//$endtab=$pdf->GetY();
|
||||
//for($n=0;$n<$i;$n++){
|
||||
//if(file_exists($iarr[$n]))$pdf->Image($iarr[$n],$pdf->GetX()+1,$starttab+$n*18+1,15,0);
|
||||
//}
|
||||
//$pdf->SetY($endtab);
|
||||
//total, vat, subtotal
|
||||
|
||||
$pdf->Ln(4);
|
||||
$pdf->Line($pdf->lMargin,$pdf->getY(),$pdf->fw-$pdf->rMargin,$pdf->getY());
|
||||
$pdf->Ln(1);
|
||||
$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' => 66, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-family' => 'courier'),
|
||||
'subtotal2' => array('width' => 34, 'value' => $calc['subtotal'], 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-size' => 9, 'font-family' => 'courier'), );
|
||||
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select name from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-family' => 'courier'),
|
||||
'vat2' => array('width' => 34, 'value' => $value, 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-size' => 9, 'font-family' => 'courier'), );
|
||||
}
|
||||
}
|
||||
|
||||
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' => 9, 'font-style' => 'b', 'font-family' => 'courier'),
|
||||
'total22' => array('width' => 34, 'value' => $calc['total2'], 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 9, 'font-family' => 'courier'), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-style' => 'b', 'font-family' => 'courier'),
|
||||
'discount2' => array('width' => 34, 'value' => $calc['discount']['value'], 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 9, 'font-family' => 'courier'), );
|
||||
}
|
||||
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-style' => 'b', 'font-family' => 'courier'),
|
||||
'total2' => array('width' => 34, 'value' => $calc['total'], 'border' => 0, 'background' => array(255,255,255), 'overflow' => 1, 'align' => 'R' , 'font-size' => 9, 'font-style' => 'b', 'font-family' => 'courier'), );
|
||||
|
||||
$pdf->DrawTable($table);
|
||||
53
modules/templates/EcmQuotes/saascrm/footer.php
Executable file
53
modules/templates/EcmQuotes/saascrm/footer.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?
|
||||
|
||||
if($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
$this->SetXY(115, $this->fh - 10);
|
||||
$this->SetFont('arialpl', 'b', 10);
|
||||
$this->SetFillColor(254, 226, 0);
|
||||
$this->Cell(85,10,"www.hoffmann-verpackung.de",0,0,"C",1,"http://www.hoffmann-verpackung.de");
|
||||
$this->SetFillColor(255,255,255);
|
||||
|
||||
$this->SetFont('arialpl', '', 7.5);
|
||||
|
||||
$this->SetXY(26,$this->fh-16);
|
||||
$this->Cell(49,0,"Dresdner Bank Düsseldorf"); $this->Cell(40,0,"Postbank Köln (BLZ 370 100 50)"); $this->Cell(56,0,"Gaschäftsführer"); $this->Cell(30,0,"Handelsregister");
|
||||
$this->SetXY(26,$this->fh-12.5);
|
||||
$this->Cell(49,0,"(BLZ 300 800 00) Kto. 01 031 004 00"); $this->Cell(40,0,"Kto. 50 630-502"); $this->Cell(56,0,"Carl-Gerd Coenen, Andrea Müller"); $this->Cell(30,0,"AG Neuss HRB 4023");
|
||||
$this->SetXY(26,$this->fh-7.5);
|
||||
$this->Cell(49,0,"Stadtsparkasse Düsseldorf"); //$this->Cell(40,0,""); $this->Cell(56,0,""); $this->Cell(30,0,"");
|
||||
$this->SetXY(26,$this->fh-4);
|
||||
$this->Cell(49,0,"(BLZ 300 501 10) Kto. 47 001 409"); $this->Cell(40,0,"USt-IdNr. DE 120511813"); //$this->Cell(56,0,""); $this->Cell(30,0,"");
|
||||
|
||||
|
||||
/*
|
||||
$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');
|
||||
*/
|
||||
77
modules/templates/EcmQuotes/saascrm/header.php
Executable file
77
modules/templates/EcmQuotes/saascrm/header.php
Executable file
@@ -0,0 +1,77 @@
|
||||
<?
|
||||
|
||||
$this->lMargin = 20;
|
||||
if(!$this->blnShowHeader) return;
|
||||
|
||||
if($this->edt->show_header_on_all_pages == 0 && $this->page > 1) return;
|
||||
|
||||
/*
|
||||
$this->SetXY(35,5);
|
||||
$html = "<table><tr><td><b>Kaarst/Neuss</b></td><td>Moderne Verpackung</td></tr></table>";
|
||||
$this->WriteHTML($html);
|
||||
*/
|
||||
|
||||
/*
|
||||
$addr = array(
|
||||
"Kaarst/Neuss" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss1" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss2" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss3" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss4" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss5" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss6" => "Moderne Verpackung",
|
||||
"Kaarst/Neuss7" => "Moderne Verpackung",
|
||||
);
|
||||
|
||||
$this->SetFont('arialpl', 'B', 8);
|
||||
for($i = 0; $i < count($addr); $i++) {
|
||||
$this->SetXY(30,$i*3.5+5);
|
||||
$this->Cell(35,0,"Kaarst/Neuss"); $this->Cell(35,0,"Moderne Verpackung");
|
||||
}
|
||||
*/
|
||||
$this->SetFont('arialpl', 'b', '7.5');
|
||||
$this->SetXY(26, $y_pos+5); $this->Cell(35,0,"Kaarst/Neuss"); $this->Cell(0,0,"Moderne Verpackung");
|
||||
$this->SetXY(26, $y_pos+8.5); $this->Cell(35,0,"Wetter/Ruhr"); $this->Cell(0,0,"Carl Bernh. Hoffmann GmbH");
|
||||
$this->SetXY(26, $y_pos+12); $this->Cell(35,0,"Leipzig"); $this->Cell(0,0,"D-41564 Kaarst-Holzbüttgen");
|
||||
|
||||
$this->SetFont('arialpl', '', '7.5');
|
||||
$this->SetXY(26, $y_pos+15.5); $this->Cell(35,0,"Groß Kienitz/Berlin"); $this->Cell(0,0,"Hüngert 5 - Gewerbegebiet");
|
||||
$this->SetXY(26, $y_pos+19); $this->Cell(35,0,"Wendlingen/Stuttgart"); $this->Cell(0,0,"Telefon 02131-88 00-0");
|
||||
$this->SetXY(26, $y_pos+22.5); $this->Cell(35,0,"Idstein/Taunus"); $this->Cell(0,0,"Telfax 02131-88 00-188");
|
||||
$this->SetXY(26, $y_pos+26); $this->Cell(35,0,"Pliening/Bayern"); $this->Cell(0,0,"kaarst@hoffmann-verpackung.de");
|
||||
$this->SetXY(26, $y_pos+29.5); $this->Cell(35,0,"Jeding/Slazburg"); $this->Cell(0,0,"www.hoffmann-verpackung.de");
|
||||
|
||||
|
||||
$this->SetY($y_pos+35);
|
||||
|
||||
|
||||
/*
|
||||
$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,115,$y_pos+0,85,24);
|
||||
|
||||
$this->Ln(10);
|
||||
/*
|
||||
//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);
|
||||
}
|
||||
*/
|
||||
15
modules/templates/EcmQuotes/saascrm/subfooter.php
Executable file
15
modules/templates/EcmQuotes/saascrm/subfooter.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?
|
||||
|
||||
if($this->footer_text != '') {
|
||||
//footer text
|
||||
$pdf->Ln(8);
|
||||
$pdf->SetFont('courier','','10');
|
||||
$pdf->MultiCell(0,4,$this->footer_text,0,'J');
|
||||
}
|
||||
|
||||
if($this->ads_text != '') {
|
||||
//ads text
|
||||
$pdf->Ln(8);
|
||||
$pdf->SetFont('courier','','10');
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
}
|
||||
234
modules/templates/EcmQuotes/saascrm/subheader.php
Executable file
234
modules/templates/EcmQuotes/saascrm/subheader.php
Executable file
@@ -0,0 +1,234 @@
|
||||
<?
|
||||
/*
|
||||
$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(2);
|
||||
|
||||
//$pdf->MultiCell(0,5,$address,0,'L');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//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->Ln(7);
|
||||
$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');
|
||||
|
||||
$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME'],0,'L');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$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);
|
||||
|
||||
|
||||
//**************************************************
|
||||
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;
|
||||
|
||||
|
||||
|
||||
$name_w = 42;
|
||||
$image_w = 10;
|
||||
$recipient_code_w = 10;
|
||||
|
||||
if($this->show_images_on_offers){
|
||||
$name_w -= $image_w;
|
||||
}
|
||||
if($this->show_recipient_code){
|
||||
$name_w -= $recipient_code_w;
|
||||
}
|
||||
|
||||
if($calc['draw_discount']){
|
||||
$name_w -= 8;
|
||||
}
|
||||
if($calc['draw_vat']){
|
||||
$name_w -= 8;
|
||||
}
|
||||
|
||||
$table = array();
|
||||
if($this->show_images_on_offers)
|
||||
$table [0]['image'] = array('width' => $image_w, 'value' => $mod_strings['LBL_PDF_LIST_IMAGE'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
$table [0]['position'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_POSITION'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['code'] = array('width' => 12, 'value' => $mod_strings['LBL_PDF_LIST_CODE'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
if($this->show_recipient_code)
|
||||
$table [0]['recipient_code'] = array('width' => $recipient_code_w, 'value' => $mod_strings['LBL_PDF_LIST_RECIPIENT_CODE'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
//$table [0]['unit'] = array('width' => 10, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $mod_strings['LBL_PDF_LIST_DESCRIPTION'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['quantity'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_QUANTITY'],'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['unit'] = array('width' => 5, 'value' => $mod_strings['LBL_PDF_LIST_UNIT'], 'border' => 0,'background' => array(233,233,233), 'overflow' => 1, 'align' => 'C', 'font-size' => 8);
|
||||
$table [0]['unit_price'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_PRICE'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'C');
|
||||
if($calc['draw_discount']) $table [0]['discount'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_DISCOUNT'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
if($calc['draw_vat']) $table [0]['vat_id'] = array('width' => 8, 'value' => $mod_strings['LBL_PDF_LIST_VAT'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $mod_strings['LBL_PDF_LIST_TOTAL'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'R');
|
||||
|
||||
$i = 1;
|
||||
$lv=return_app_list_strings_language($this->ecmlanguage);
|
||||
// print_r($this->position_list);die();
|
||||
if($this->position_list != '')
|
||||
foreach($this->position_list as $p) {
|
||||
if($this->show_images_on_offers){
|
||||
if(file_exists($this->getProductImage($p['id']))){$table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R', 'image_path' => $this->getProductImage($p['id']));
|
||||
//$iarr[]=$this->getProductImage($p['id']);
|
||||
}
|
||||
else $table [$i]['image'] = array('width' => $image_w, 'value' => '', 'border' => 0, 'align' => 'R');
|
||||
}
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => $i, 'border' => 0, 'align' => 'C', );
|
||||
$table [$i]['code'] = array('width' => 12, 'value' => $p['code'], 'border' => 0, 'align' => 'C', );
|
||||
if($this->show_recipient_code)
|
||||
$table [$i]['recipient_code'] = array('width' => $recipient_code_w, 'value' => $p['recipient_code'], 'border' => 0, 'align' => 'C', );
|
||||
//$table [$i]['unit'] = array('width' => 10, 'value' => $p['unit_id'], 'border' => 0, 'align' => 'C', );
|
||||
|
||||
/*
|
||||
if($this->ecmlanguage=="en_us"){
|
||||
$r=mysql_fetch_array(mysql_query("select short_description from ecmproduct_language_en_view where ecmproduct_id='".$p['id']."'"));
|
||||
$dname=$r['short_description'];
|
||||
}
|
||||
elseif($this->ecmlanguage=="ge_ge"){
|
||||
$r=mysql_fetch_array(mysql_query("select short_description from ecmproduct_language_de_view where ecmproduct_id='".$p['id']."'"));
|
||||
$dname=$r['short_description'];
|
||||
}
|
||||
else $dname=$p['name'];
|
||||
*/
|
||||
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => htmlspecialchars_decode($p['name']), 'border' => 0, 'align' => 'L', );
|
||||
$table [$i]['quantity'] = array('width' => 8, 'value' => $p['quantity'], 'border' => 0, 'align' => 'C', );
|
||||
$table [$i]['unit'] = array('width' => 5, 'value' => $lv['ecmproducts_unit_dom'][$p['unit_id']], 'border' => 0, 'align' => 'C', 'font-size' => 7 );
|
||||
$table [$i]['unit_price'] = array('width' => 14, 'value' => $p['price'], 'border' => 0, 'align' => 'C', );
|
||||
if($calc['draw_discount']) $table [$i]['discount'] = array('width' => 8, 'value' => $p['discount'], 'border' => 0, 'align' => 'R', );
|
||||
if($calc['draw_vat']) $table [$i]['vat_id'] = array('width' => 8, 'value' => $p['vat_name'], 'border' => 0, 'align' => 'R', );
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => $p['total'], 'border' => 0, 'align' => 'R', );
|
||||
$i++;
|
||||
}
|
||||
$starttab=$pdf->GetY()+10;
|
||||
$pdf->DrawTable($table,array(0));
|
||||
$endtab=$pdf->GetY();
|
||||
//for($n=0;$n<$i;$n++){
|
||||
//if(file_exists($iarr[$n]))$pdf->Image($iarr[$n],$pdf->GetX()+1,$starttab+$n*18+1,15,0);
|
||||
//}
|
||||
$pdf->SetY($endtab);
|
||||
//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' => 66, 'value' => $mod_strings['LBL_PDF_TOTAL'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9),
|
||||
'subtotal2' => array('width' => 34, 'value' => $calc['subtotal'], 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-size' => 9), );
|
||||
|
||||
foreach($calc['vats'] as $key => $value){
|
||||
$r=mysql_fetch_array(mysql_query("select name from ecmvats where id='".$key."'"));
|
||||
$vvn=$r['name'];
|
||||
$table [] = array(
|
||||
'vat1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_VAT'].' ('.$vvn.')', 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9),
|
||||
'vat2' => array('width' => 34, 'value' => $value, 'border' => 0, 'overflow' => 1, 'align' => 'R', 'font-size' => 9), );
|
||||
}
|
||||
}
|
||||
|
||||
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' => 9, 'font-style' => 'b'),
|
||||
'total22' => array('width' => 34, 'value' => $calc['total2'], 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 9), );
|
||||
$table [] = array(
|
||||
'discount1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_DISCOUNT'].' '.$calc['discount']['procent'], 'background' => array(255,255,255), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-style' => 'b'),
|
||||
'discount2' => array('width' => 34, 'value' => $calc['discount']['value'], 'border' => 0, 'overflow' => 1, 'align' => 'R' , 'font-size' => 9), );
|
||||
}
|
||||
|
||||
$table [] = array(
|
||||
'total1' => array('width' => 66, 'value' => $mod_strings['LBL_PDF_END_TOTAL'], 'background' => array(233,233,233), 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-size' => 9, 'font-style' => 'b'),
|
||||
'total2' => array('width' => 34, 'value' => $calc['total'], 'border' => 0, 'background' => array(233,233,233), 'overflow' => 1, 'align' => 'R' , 'font-size' => 9, 'font-style' => 'b'), );
|
||||
|
||||
$pdf->DrawTable($table);
|
||||
?>
|
||||
Reference in New Issue
Block a user