init
This commit is contained in:
31
modules/templates/EcmDeliveryNotes/e5/footer.php
Executable file
31
modules/templates/EcmDeliveryNotes/e5/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/EcmDeliveryNotes/e5/header.php
Executable file
17
modules/templates/EcmDeliveryNotes/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;
|
||||
|
||||
//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/EcmDeliveryNotes/e5/subfooter.php
Executable file
37
modules/templates/EcmDeliveryNotes/e5/subfooter.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?
|
||||
|
||||
|
||||
|
||||
//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');
|
||||
|
||||
|
||||
|
||||
//ads text
|
||||
|
||||
$pdf->Ln(10);
|
||||
|
||||
$pdf->SetFont('arialpl','B','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->ads_text,0,'J');
|
||||
?>
|
||||
91
modules/templates/EcmDeliveryNotes/e5/subheader.php
Executable file
91
modules/templates/EcmDeliveryNotes/e5/subheader.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?
|
||||
$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();
|
||||
|
||||
//$current = $pdf->GetY();
|
||||
//$pdf->Ln(7);
|
||||
$pdf->SetXY($pdf->fw-$pdf->rMargin-20,$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');
|
||||
}
|
||||
if(isset($this->delivery_date) && $this->delivery_date != '') {
|
||||
$table [$next++]['data'] = array('width' => 30, 'value' => "Data dostawy", 'border' => 0, 'overflow' => 1, 'align' => 'L', 'font-style' => 'b', 'font-size' => 9);
|
||||
$table [$next++]['data'] = array('width' => 30, 'value' => $this->delivery_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','','16');
|
||||
|
||||
$pdf->SetY(55);
|
||||
if($this->type=="sales_order")$pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME'],0,'C');
|
||||
elseif($this->type=="back")$pdf->MultiCell(0,3,"Zwrot Towaru",0,'C');
|
||||
elseif($this->type=="serwis_back")$pdf->MultiCell(0,3,"Zwrot Serwisowy",0,'C');
|
||||
elseif($this->type=="gratis")$pdf->MultiCell(0,3,"Gratis",0,'C');
|
||||
else $pdf->MultiCell(0,3,$mod_strings['LBL_PDF_DOCUMENT_NAME'],0,'C');
|
||||
|
||||
|
||||
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(10);
|
||||
|
||||
$pdf->SetFont('arialpl','B','10');
|
||||
|
||||
$pdf->MultiCell(0,4,$this->header_text,0,'J');
|
||||
|
||||
|
||||
|
||||
$pdf->Ln(4);
|
||||
?>
|
||||
31
modules/templates/EcmDeliveryNotes/saascrm/footer.php
Executable file
31
modules/templates/EcmDeliveryNotes/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/EcmDeliveryNotes/saascrm/header.php
Executable file
32
modules/templates/EcmDeliveryNotes/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);
|
||||
}
|
||||
?>
|
||||
37
modules/templates/EcmDeliveryNotes/saascrm/subfooter.php
Executable file
37
modules/templates/EcmDeliveryNotes/saascrm/subfooter.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?
|
||||
|
||||
|
||||
|
||||
//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');
|
||||
?>
|
||||
99
modules/templates/EcmDeliveryNotes/saascrm/subheader.php
Executable file
99
modules/templates/EcmDeliveryNotes/saascrm/subheader.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?
|
||||
/*
|
||||
$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-20,$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);
|
||||
?>
|
||||
Reference in New Issue
Block a user