finish design order, wip files destination
This commit is contained in:
parent
7d71e069d3
commit
4dbe8ab397
@ -46,7 +46,7 @@ class OrderPdfHandler extends FPDF {
|
||||
private $initialIndexPosition = 0;
|
||||
private $articlesCountToGet = 0;
|
||||
|
||||
private const MAX_ARTICLES_PER_PAGE = 15;
|
||||
private const MAX_ARTICLES_PER_PAGE = 18;
|
||||
|
||||
private const DEFAULT_SUBCONTRACTOR_NAME = "SOUS TRAITANT";
|
||||
function Header()
|
||||
@ -62,7 +62,7 @@ class OrderPdfHandler extends FPDF {
|
||||
}
|
||||
function Footer()
|
||||
{
|
||||
$this->DrawBankAndTotalPriceInfo($this->totalPrices);
|
||||
$this->DrawTotalPriceInfo($this->totalPrices);
|
||||
$this->SetY(-40);
|
||||
$this->SetFont('Arial', '', 7);
|
||||
$this->MultiCell(0,5,utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ( Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.')));
|
||||
@ -123,14 +123,14 @@ class OrderPdfHandler extends FPDF {
|
||||
|
||||
private function DrawArticlesTableRect(){
|
||||
$this->SetLineWidth(0.1);
|
||||
$this->Rect(10, 105, 190, 100, "D");
|
||||
$this->Rect(10, 105, 190, 120, "D");
|
||||
// cadre titre des colonnes
|
||||
$this->Line(10, 115, 200,115);
|
||||
// les traits verticaux colonnes
|
||||
$this->Line(35, 105, 35, 205);
|
||||
$this->Line(135, 105, 135, 205);
|
||||
$this->Line(155, 105, 155, 205);
|
||||
$this->Line(175, 105, 175, 205);
|
||||
$this->Line(35, 105, 35, 225);
|
||||
$this->Line(135, 105, 135, 225);
|
||||
$this->Line(155, 105, 155, 225);
|
||||
$this->Line(175, 105, 175, 225);
|
||||
}
|
||||
|
||||
private function DrawArticlesTableHeader(){
|
||||
@ -203,27 +203,12 @@ class OrderPdfHandler extends FPDF {
|
||||
|
||||
}
|
||||
|
||||
private function DrawBankAndTotalPriceInfo($totalPriceArray){
|
||||
$this->SetY(210);
|
||||
$this->SetFont('Arial', '', 9);
|
||||
|
||||
$this->MultiCell(0,5,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->orderData['configuration']->entreprise)));
|
||||
$this->MultiCell(0,5,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :")));
|
||||
|
||||
$this->Ln(1);
|
||||
|
||||
//Table IBAN
|
||||
private function DrawTotalPriceInfo($totalPriceArray){
|
||||
$this->SetY(230);
|
||||
$this->SetFont('Arial', '', 11);
|
||||
$ibanWidth = 90;
|
||||
$ibanCursorY = $this->GetY();
|
||||
$this->Cell($ibanWidth, 7, 'IBAN : FR76 3000 3030 7700 0200 2057 074', 1, 1, 'C');
|
||||
$ibanCursorX = $this->GetX();
|
||||
$this->Cell($ibanWidth, 7, 'Code SWIFT : SOGEFRPP', 1, 1, 'C');
|
||||
|
||||
//TABLE HT
|
||||
$ibanLastPositionX = $ibanCursorX+$ibanWidth + 20;
|
||||
$startOfArrayX = $ibanLastPositionX;
|
||||
$startOfArrayY = $ibanCursorY;
|
||||
$startOfArrayX = 120;
|
||||
$startOfArrayY = 230;
|
||||
foreach($totalPriceArray as $label => $price){
|
||||
$this->SetXY($startOfArrayX,$startOfArrayY);
|
||||
$this->Cell(40, 7, $label, 1, 1, 'C');
|
||||
@ -239,7 +224,7 @@ class OrderPdfHandler extends FPDF {
|
||||
}
|
||||
|
||||
private function DrawArticlesTable(){
|
||||
$pageCount = ceil(sizeof($this->orderProducts) / 15);
|
||||
$pageCount = ceil(sizeof($this->orderProducts) / self::MAX_ARTICLES_PER_PAGE);
|
||||
$pageNumber = 1;
|
||||
while($pageNumber <= $pageCount){
|
||||
if($pageNumber > 1){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user