NEW: PDF Add option to print rounded corner frames (#31172)

* NEW: Add option to enable PDF frame rounded corners

* NEW: function printRoundedRect

* NEW PDF frame rounded corners

* New add rounded corners in frames

* New add rounded corners in frames

* Update admin.lang

* fix incoterm frame height

* Update pdf_sponge.modules.php

* fix pre-commit

* fix pre-commit

* fix php-stan (8.2)

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* fix phan php-stan (8.2) declare property

* New add rounded corners in frames

* New add rounded corners in frames

* add phpdoc for corner radius

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* fix php-stan (8.2)

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* fix whitespace

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* New add rounded corners in frames

* fix pre-commit empty line

* fix phan php-stan (8.2)

* fix phan php-stan (8.2)

* fix Travis

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix title color

* fix phan

* fix phan

* fix phan

* fix phan

* fix phan phpdoc

* fix pre-commit

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
sonikf
2024-10-04 10:13:44 +03:00
committed by GitHub
parent b595b30a5b
commit c5587519f0
40 changed files with 451 additions and 329 deletions

View File

@@ -5,7 +5,8 @@
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021-2022 Anthony Berton <bertonanthony@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -140,6 +141,9 @@ if ($action == 'update') {
if (GETPOSTISSET('MAIN_DOCUMENTS_LOGO_HEIGHT')) {
dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOSTINT("MAIN_DOCUMENTS_LOGO_HEIGHT"), 'chaine', 0, '', $conf->entity);
}
if (GETPOSTISSET('MAIN_PDF_FRAME_CORNER_RADIUS')) {
dolibarr_set_const($db, "MAIN_PDF_FRAME_CORNER_RADIUS", GETPOSTINT("MAIN_PDF_FRAME_CORNER_RADIUS"), 'chaine', 0, '', $conf->entity);
}
if (GETPOSTISSET('MAIN_INVERT_SENDER_RECIPIENT')) {
dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), 'chaine', 0, '', $conf->entity);
}
@@ -516,6 +520,14 @@ print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DOCUMENTS_LOGO_HEIGHT").'</
print '<input type="text" class="maxwidth50" name="MAIN_DOCUMENTS_LOGO_HEIGHT" value="'.getDolGlobalInt('MAIN_DOCUMENTS_LOGO_HEIGHT', 20).'">';
print '</td></tr>';
// Frame corner radius
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("PDFBoxFrameRoundedCorners"), $langs->trans("MAIN_PDF_FRAME_CORNER_RADIUS"));
print '</td><td>';
$arrval = array('0', '1', '2', '3');
print $form->selectarray("MAIN_PDF_FRAME_CORNER_RADIUS", $arrval, getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0));
print '</td></tr>';
// Show project
if (isModEnabled('project')) {
print '<tr class="oddeven"><td>'.$langs->trans("PDF_SHOW_PROJECT").'</td><td>';
@@ -525,8 +537,7 @@ if (isModEnabled('project')) {
print '</td></tr>';
}
//
// Hide customer code
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_HIDE_CUSTOMER_CODE");
print '</td><td>';
if ($conf->use_javascript_ajax) {
@@ -537,7 +548,7 @@ if ($conf->use_javascript_ajax) {
}
print '</td></tr>';
// Ref
// Hide Ref
print '<tr class="oddeven"><td>'.$langs->trans("HideRefOnPDF").'</td><td>';
if ($conf->use_javascript_ajax) {

View File

@@ -9,6 +9,7 @@
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Mélina Joum <melina.joum@altairis.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -122,9 +123,15 @@ abstract class CommonDocGenerator
*/
public $marge_basse;
/**
* @var int corner radius
*/
public $corner_radius;
/**
* @var int<0,1> option logo
*/
public $option_logo;
public $option_tva;
public $option_multilang;
@@ -1109,6 +1116,33 @@ abstract class CommonDocGenerator
$pdf->line($x, $y + $h, $x, $y);
}
/**
* Print a rounded rectangle on the PDF
*
* @param TCPDF $pdf Object PDF
* @param float $x Abscissa of first point
* @param float $y Ordinate of first point
* @param float $w Width of the rectangle
* @param float $h Height of the rectangle
* @param float $r Corner radius (can be an array for different radii per corner)
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
* @param int $hidebottom Hide bottom
* @param string $style Draw style (e.g. 'D' for draw, 'F' for fill, 'DF' for both)
* @return void
*/
public function printRoundedRect($pdf, $x, $y, $w, $h, $r, $hidetop = 0, $hidebottom = 0, $style = 'D')
{
// Top line
if (empty($hidetop) || $hidetop == -1) {
$pdf->RoundedRect($x, $y, $w, $h, $r, '1111', $style);
} else {
// Draw rounded rectangle with hidden top side
$pdf->RoundedRect($x, $y, $w, $h, $r, '0111', $style);
}
if (!empty($hidebottom)) {
$pdf->RoundedRect($x, $y, $w, $h, $r, '1101', $style);
}
}
/**
* uasort callback function to Sort columns fields

View File

@@ -1,9 +1,10 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -122,6 +123,11 @@ class pdf_standard_actions
*/
public $page_largeur;
/**
* @var int corner radius
*/
public $corner_radius;
/**
* @var array{fullpath:string}
*/
@@ -146,7 +152,7 @@ class pdf_standard_actions
$this->date_edition = time();
$this->month = $month;
$this->year = $year;
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
// Page size for A4 format
$this->type = 'pdf';
$formatarray = pdf_getFormat();
@@ -424,7 +430,7 @@ class pdf_standard_actions
$y = $pdf->GetY() + 2;
$pdf->Rect($this->marge_gauche, $y, ($this->page_largeur - $this->marge_gauche - $this->marge_droite), ($this->page_hauteur - $this->marge_haute - $this->marge_basse));
$pdf->RoundedRect($this->marge_gauche, $y, ($this->page_largeur - $this->marge_gauche - $this->marge_droite), ($this->page_hauteur - $this->marge_haute - $this->marge_basse), $this->corner_radius, '1234', 'D');
$y = $pdf->GetY() + 1;
return $y;

View File

@@ -9,7 +9,8 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -113,7 +114,7 @@ class pdf_standard_asset extends ModelePDFAsset
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
// Get source company
$this->emetteur = $mysoc;
if (empty($this->emetteur->country_code)) {
@@ -368,10 +369,10 @@ class pdf_standard_asset extends ModelePDFAsset
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -390,12 +391,12 @@ class pdf_standard_asset extends ModelePDFAsset
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else { // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -761,7 +762,7 @@ class pdf_standard_asset extends ModelePDFAsset
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -769,7 +770,7 @@ class pdf_standard_asset extends ModelePDFAsset
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -959,7 +960,7 @@ class pdf_standard_asset extends ModelePDFAsset
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -1011,7 +1012,7 @@ class pdf_standard_asset extends ModelePDFAsset
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":", 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -78,7 +79,7 @@ class pdf_ban extends ModeleBankAccountDoc
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -206,7 +207,7 @@ class pdf_ban extends ModeleBankAccountDoc
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 3, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 3, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -89,7 +90,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -238,7 +239,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 3, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 3, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -385,7 +386,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetXY($this->marge_gauche, $posY);
$txt = $outputlangs->transnoentitiesnoconv("SEPAFrstOrRecur").' * : ';
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
$pdf->Rect(80, $posY, 5, 5);
$pdf->RoundedRect(80, $posY, 5, 5, $this->corner_radius, '1234', 'D');
$pdf->SetXY(80, $posY);
if ($object->frstrecur == 'RCUR') {
$pdf->MultiCell(5, 3, 'X', 0, 'L');
@@ -394,7 +395,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$txt = $langs->transnoentitiesnoconv("ModeRECUR").' '.$langs->transnoentitiesnoconv("or");
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
$posY += 6;
$pdf->Rect(80, $posY, 5, 5);
$pdf->RoundedRect(80, $posY, 5, 5, $this->corner_radius, '1234', 'D');
$pdf->SetXY(80, $posY);
if ($object->frstrecur == 'FRST') {
$pdf->MultiCell(5, 3, 'X', 0, 'L');

View File

@@ -2,8 +2,9 @@
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2009-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -86,6 +87,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
// Retrieves transmitter
$this->emetteur = $mysoc;
@@ -286,7 +288,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$pdf->SetXY(114, 15);
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("Signature"), 0, 'L');
$pdf->Rect(9, 14, 192, 35);
$pdf->RoundedRect(9, 14, 192, 35, $this->corner_radius, '1234', 'D');
$pdf->line(9, 19, 112, 19);
$pdf->line(9, 25, 112, 25);
//$pdf->line(9, 31, 201, 31);
@@ -297,7 +299,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
// Number of cheques
$posy = 51;
$pdf->Rect(9, $posy, 192, 6);
$pdf->RoundedRect(9, $posy, 192, 6, $this->corner_radius, '1234', 'D');
$pdf->line(55, $posy, 55, $posy + 6);
$pdf->line(140, $posy, 140, $posy + 6);
$pdf->line(170, $posy, 170, $posy + 6);
@@ -336,7 +338,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$pdf->MultiCell(20, 2, $outputlangs->transnoentities("Amount"), 0, 'R');
$pdf->line(9, $this->tab_top + 8, 201, $this->tab_top + 8);
$pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10);
$pdf->RoundedRect(9, $this->tab_top, 192, $this->tab_height + 10, $this->corner_radius, '1234', 'D');
}

View File

@@ -8,7 +8,8 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -107,7 +108,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -337,7 +338,7 @@ class pdf_einstein extends ModelePDFCommandes
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -377,7 +378,7 @@ class pdf_einstein extends ModelePDFCommandes
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -1200,7 +1201,7 @@ class pdf_einstein extends ModelePDFCommandes
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1208,7 +1209,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
@@ -1450,7 +1451,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -1506,7 +1507,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name

View File

@@ -8,7 +8,8 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -112,7 +113,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -374,7 +375,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -469,10 +470,10 @@ class pdf_eratosthene extends ModelePDFCommandes
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -491,13 +492,13 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -1410,7 +1411,7 @@ class pdf_eratosthene extends ModelePDFCommandes
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1418,7 +1419,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -1635,7 +1636,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -1692,7 +1693,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name

View File

@@ -8,6 +8,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -108,7 +109,7 @@ class pdf_strato extends ModelePDFContract
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode
@@ -271,7 +272,7 @@ class pdf_strato extends ModelePDFContract
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -543,7 +544,7 @@ class pdf_strato extends ModelePDFContract
*/
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 3); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 3, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
}
/**
@@ -566,7 +567,7 @@ class pdf_strato extends ModelePDFContract
$pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name), 0, 'L', 0);
$pdf->SetXY($this->marge_gauche, $posy + 5);
$pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1);
$pdf->RoundedRect($this->marge_gauche, $posy + 5, $posmiddle - $this->marge_gauche - 5, 20, $this->corner_radius, '1234', 'D');
}
if (!getDolGlobalString('CONTRACT_HIDE_THIRPARTY_SIGNATURE_SECTION_PDF')) {
@@ -574,7 +575,7 @@ class pdf_strato extends ModelePDFContract
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name), 0, 'L', 0);
$pdf->SetXY($posmiddle + 5, $posy + 5);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 20, '', 1);
$pdf->RoundedRect($posmiddle + 5, $posy + 5, $this->page_largeur - $this->marge_droite - $posmiddle - 5, 20, $this->corner_radius, '1234', 'D');
}
}
@@ -715,7 +716,7 @@ class pdf_strato extends ModelePDFContract
$pdf->SetXY($posx, $posy - 5);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -773,7 +774,7 @@ class pdf_strato extends ModelePDFContract
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
$pdf->SetTextColor(0, 0, 0);
}

View File

@@ -6,9 +6,10 @@
* Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2020 John BOTELLA
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -100,7 +101,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -309,7 +310,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -335,7 +336,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -615,11 +616,11 @@ class pdf_storm extends ModelePDFDeliveryOrder
$pdf->SetXY($this->marge_gauche, $posy);
$larg_sign = ($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 3;
$pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25);
$pdf->RoundedRect($this->marge_gauche, $posy + 1, $larg_sign, 25, $this->corner_radius, '1234', 'D');
$pdf->SetXY($this->marge_gauche + 2, $posy + 2);
$pdf->MultiCell($larg_sign, 2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":", '', 'L');
$pdf->Rect(2 * $larg_sign + $this->marge_gauche, $posy + 1, $larg_sign, 25);
$pdf->RoundedRect(2 * $larg_sign + $this->marge_gauche, $posy + 1, $larg_sign, 25, $this->corner_radius, '1234', 'D');
$pdf->SetXY(2 * $larg_sign + $this->marge_gauche + 2, $posy + 2);
$pdf->MultiCell($larg_sign, 2, $outputlangs->trans("ForCustomer").':', '', 'L');
}
@@ -657,7 +658,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
if (empty($hidetop)) {
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -665,7 +666,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -773,7 +774,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -833,7 +834,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
//$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":",0,'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -5,9 +5,10 @@
* Copyright (C) 2008 Chiptronik
* Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -103,7 +104,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -294,7 +295,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -312,7 +313,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -608,11 +609,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetXY($this->marge_gauche, $posy);
$larg_sign = ($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 3;
$pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25);
$pdf->RoundedRect($this->marge_gauche, $posy + 1, $larg_sign, 25, $this->corner_radius, '1234', 'D');
$pdf->SetXY($this->marge_gauche + 2, $posy + 2);
$pdf->MultiCell($larg_sign, 2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":", '', 'L');
$pdf->Rect(2 * $larg_sign + $this->marge_gauche, $posy + 1, $larg_sign, 25);
$pdf->RoundedRect(2 * $larg_sign + $this->marge_gauche, $posy + 1, $larg_sign, 25, $this->corner_radius, '1234', 'D');
$pdf->SetXY(2 * $larg_sign + $this->marge_gauche + 2, $posy + 2);
$pdf->MultiCell($larg_sign, 2, $outputlangs->trans("ForCustomer").':', '', 'L');
}
@@ -647,7 +648,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetFont('', '', $default_font_size - 2);
// Output Rec
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 10, $this->page_largeur - $this->marge_droite, $tab_top + 10);
@@ -781,7 +782,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'D');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -841,7 +842,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
//$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo").":",0,'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -1,11 +1,12 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ class pdf_espadon extends ModelePdfExpedition
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
$this->watermark = '';
@@ -320,7 +321,7 @@ class pdf_espadon extends ModelePdfExpedition
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -448,7 +449,7 @@ class pdf_espadon extends ModelePdfExpedition
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter) + $height_trackingnumber + 1;
$tab_top_newpage = $tab_topbeforetrackingnumber;
}
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
if (empty($height_trackingnumber)) {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
@@ -456,7 +457,7 @@ class pdf_espadon extends ModelePdfExpedition
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter) + $height_trackingnumber + 1;
$tab_top = $tab_topbeforetrackingnumber;
}
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -475,7 +476,7 @@ class pdf_espadon extends ModelePdfExpedition
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else { // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
@@ -485,7 +486,7 @@ class pdf_espadon extends ModelePdfExpedition
$height_note = $posyafter - $tab_top + $height_trackingnumber + 1;
$tab_top = $tab_topbeforetrackingnumber;
}
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -952,7 +953,7 @@ class pdf_espadon extends ModelePdfExpedition
if (empty($hidetop)) {
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -960,7 +961,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -1144,7 +1145,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFillColor(255, 255, 255);
}
@@ -1199,7 +1200,7 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient"), 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name

View File

@@ -4,8 +4,9 @@
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -98,7 +99,7 @@ class pdf_merou extends ModelePdfExpedition
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
// Get source company
@@ -256,7 +257,7 @@ class pdf_merou extends ModelePdfExpedition
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -440,7 +441,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetXY(170, $tab_top);
$pdf->MultiCell(30, 5, $outputlangs->transnoentities("QtyToShip"), 0, 'C', 1);
}
$pdf->Rect(10, $tab_top, 190, $tab_height);
$pdf->RoundedRect(10, $tab_top, 190, $tab_height, $this->corner_radius, '1234', 'D');
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
@@ -631,7 +632,7 @@ class pdf_merou extends ModelePdfExpedition
$blExpX = $Xoff - 20;
$blW = 52;
$Ydef = $Yoff;
$pdf->Rect($blExpX, $Yoff, $blW, 26);
$pdf->RoundedRect($blExpX, $Yoff, $blW, 26, $this->corner_radius, '1234', 'D');
$object->fetch_thirdparty();
@@ -674,7 +675,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetFont('', 'B', $default_font_size - 3);
$pdf->SetXY($blDestX, $Yoff - 4);
$pdf->MultiCell($blW, 3, $outputlangs->transnoentities("Recipient"), 0, 'L');
$pdf->Rect($blDestX, $Yoff - 1, $blW, 26);
$pdf->RoundedRect($blDestX, $Yoff - 1, $blW, 26, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetFont('', 'B', $default_font_size - 3);

View File

@@ -3,8 +3,9 @@
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ class pdf_rouget extends ModelePdfExpedition
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
$this->watermark = '';
@@ -351,7 +352,7 @@ class pdf_rouget extends ModelePdfExpedition
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -399,7 +400,7 @@ class pdf_rouget extends ModelePdfExpedition
// Notes
if (!empty($object->note_public)) {
$pdf->SetFont('', '', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top_alt, dol_htmlentitiesbr($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
}
$nexY = $pdf->GetY();
@@ -407,7 +408,7 @@ class pdf_rouget extends ModelePdfExpedition
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 3, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -824,7 +825,7 @@ class pdf_rouget extends ModelePdfExpedition
*
* @param TCPDF $pdf Object PDF
* @param float|int $tab_top Top position of table
* @param float|int $tab_height Height of table (rectangle)
* @param float|int $tab_height Height of table (angle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @param int $hidetop Hide top bar of array
@@ -849,7 +850,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->SetFont('', '', $default_font_size - 2);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetFont('', '', $default_font_size - 1);
@@ -1077,7 +1078,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFillColor(255, 255, 255);
}
@@ -1132,7 +1133,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient"), 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name

View File

@@ -7,7 +7,8 @@
* Copyright (C) 2019 Markus Welters <markus@welters.de>
* Copyright (C) 2019 Rafael Ingenleuf <ingenleuf@welters.de>
* Copyright (C) 2020 Marc Guenneugues <marc.guenneugues@simicar.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -119,7 +120,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -315,7 +316,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -759,7 +760,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("TripSociete"), '', 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(224, 224, 224);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender information
@@ -791,7 +792,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport
$pdf->SetFont('', 'B', 8);
$pdf->SetXY($posx, $posy - 5);
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("TripNDF")." :", 0, 'L');
$pdf->rect($posx, $posy, $this->page_largeur - $this->marge_gauche - $posx, $hautcadre);
$pdf->RoundedRect($posx, $posy, $this->page_largeur - $this->marge_gauche - $posx, $hautcadre, $this->corner_radius, '1234', 'D');
// Information for expense report (dates and users workflow)
if ($object->fk_user_author > 0) {
@@ -901,8 +902,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport
$pdf->SetDrawColor(128, 128, 128);
// Rect takes a length in 3rd parameter
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height);
// line prend une position y en 3eme param
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, '1234', 'D');
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5);
}

View File

@@ -12,6 +12,7 @@
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -120,7 +121,7 @@ class pdf_crabe extends ModelePDFFactures
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -516,7 +517,7 @@ class pdf_crabe extends ModelePDFFactures
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -556,7 +557,7 @@ class pdf_crabe extends ModelePDFFactures
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -1736,7 +1737,7 @@ class pdf_crabe extends ModelePDFFactures
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1744,7 +1745,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
@@ -2086,7 +2087,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -2142,7 +2143,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name
@@ -2182,7 +2183,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($widthrecbox, '', $outputlangs->transnoentities('ShippingTo'), 0, 'L', 0);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show shipping name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -12,7 +12,8 @@
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2022-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2022-2024 Eric Seigne <eric.seigne@cap-rel.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -207,7 +208,7 @@ class pdf_octopus extends ModelePDFFactures
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->posx_cumul_anterieur = 94;
$this->posx_new_cumul = 130;
$this->posx_current = 166;
@@ -603,7 +604,7 @@ class pdf_octopus extends ModelePDFFactures
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$this->tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -699,10 +700,10 @@ class pdf_octopus extends ModelePDFFactures
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($this->tab_top_newpage + $this->heightforfooter);
$pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($this->tab_top + $this->heightforfooter);
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -721,13 +722,13 @@ class pdf_octopus extends ModelePDFFactures
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
}
$height_note = $posyafter - $this->tab_top_newpage;
$pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $this->tab_top;
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) {
@@ -1979,7 +1980,7 @@ class pdf_octopus extends ModelePDFFactures
// MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
$tab_top += 4;
}
@@ -1988,7 +1989,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param
// situation invoice
$pdf->SetFont('', '', $default_font_size - 2);
@@ -2304,7 +2305,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -2359,7 +2360,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name
@@ -2397,7 +2398,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($widthrecbox, '', $outputlangs->transnoentities('ShippingTo'), 0, 'L', 0);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show shipping name
$pdf->SetXY($posx + 2, $posy + 3);
@@ -2774,8 +2775,10 @@ class pdf_octopus extends ModelePDFFactures
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->Rect($this->marge_gauche, $tab_top + 92.5, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
//$pdf->Rect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->posx_cumul_anterieur - 1, $tab_top, $width, 5, $this->corner_radius, '1001', 'F', explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
//$pdf->Rect($this->marge_gauche, $tab_top + 92.5, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top + 92.5, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -2784,7 +2787,7 @@ class pdf_octopus extends ModelePDFFactures
// Output Rect
// KEEPTHIS => Affiche les bords extérieurs
$this->printRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
$this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param
$pdf->line($this->posx_cumul_anterieur - 1, $tab_top, $this->posx_cumul_anterieur - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
@@ -3212,6 +3215,7 @@ class pdf_octopus extends ModelePDFFactures
* @param int $hidebottom Hide bottom
* @return void
*/
/*
public function printRectBtp(&$pdf, $x, $y, $l, $h, $hidetop = 0, $hidebottom = 0)
{
if (empty($hidetop) || $hidetop == -1) {
@@ -3222,8 +3226,35 @@ class pdf_octopus extends ModelePDFFactures
$pdf->line($x + $l, $y + $h, $x, $y + $h);
}
$pdf->line($x, $y + $h, $x, $y);
}
}*/
/**
* Print a rounded rectangle on the PDF
*
* @param TCPDF $pdf Object PDF
* @param float $x Abscissa of first point
* @param float $y Ordinate of first point
* @param float $w Width of the rectangle
* @param float $h Height of the rectangle
* @param float $r Corner radius (can be an array for different radii per corner)
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
* @param int $hidebottom Hide bottom
* @param string $style Draw style (e.g. 'D' for draw, 'F' for fill, 'DF' for both)
* @return void
*/
public function printRoundedRectBtp($pdf, $x, $y, $w, $h, $r, $hidetop = 0, $hidebottom = 0, $style = 'D')
{
// Top line
if (empty($hidetop) || $hidetop == -1) {
$pdf->RoundedRect($x, $y, $w, $h, $r, '1111', $style);
} else {
// Draw rounded rectangle with hidden top side
$pdf->RoundedRect($x, $y, $w, $h, $r, '0111', $style);
}
if (!empty($hidebottom)) {
$pdf->RoundedRect($x, $y, $w, $h, $r, '1101', $style);
}
}
/**
* Get data about invoice
@@ -3401,7 +3432,8 @@ class pdf_octopus extends ModelePDFFactures
// Output Rect
$pdf->SetDrawColor(128, 128, 128);
$this->printRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6); // Rect prend une longueur en 3eme param et 4eme param
//$this->printRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6); // Rect prend une longueur en 3eme param et 4eme param
$this->printRoundedRect($pdf, $posx, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 6, $this->corner_radius, 0, 0, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$posy += 4;
} elseif (count($orders)) {
@@ -3681,7 +3713,8 @@ class pdf_octopus extends ModelePDFFactures
// Output Rect
$pdf->SetDrawColor(128, 128, 128);
$this->printRect($pdf, $this->marge_gauche, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height * $index + $y);
//$this->printRect($pdf, $this->marge_gauche, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height * $index + $y);
$this->printRoundedRect($pdf, $this->marge_gauche, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height * $index + $y, $this->corner_radius, 0, 0, 'D');
$posy += $height * $index + $y;
$pageposafter = $pdf->getPage();
@@ -3741,6 +3774,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->MultiCell($width2, 3, $amount, 0, 'R', 0, 1, $posx + $width, $posy + 1);
$pdf->SetDrawColor(128, 128, 128);
$this->printRect($pdf, $this->marge_gauche, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 7);
//$this->printRect($pdf, $this->marge_gauche, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 7);
$this->printRoundedRect($pdf, $this->marge_gauche, $posy, $this->page_largeur - $this->marge_gauche - $this->marge_droite, 7, $this->corner_radius, 0, 0, 'D');
}
}

View File

@@ -12,6 +12,7 @@
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -146,7 +147,7 @@ class pdf_sponge extends ModelePDFFactures
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -531,7 +532,7 @@ class pdf_sponge extends ModelePDFFactures
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$this->tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -627,10 +628,10 @@ class pdf_sponge extends ModelePDFFactures
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($this->tab_top_newpage + $this->heightforfooter);
$pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($this->tab_top + $this->heightforfooter);
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -649,13 +650,13 @@ class pdf_sponge extends ModelePDFFactures
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
}
$height_note = $posyafter - $this->tab_top_newpage;
$pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $this->tab_top;
$pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) {
@@ -2074,7 +2075,7 @@ class pdf_sponge extends ModelePDFFactures
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -2082,7 +2083,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -2367,7 +2368,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -2422,7 +2423,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name
@@ -2462,7 +2463,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($widthrecbox, '', $outputlangs->transnoentities('ShippingTo'), 0, 'L', 0);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show shipping name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -8,6 +8,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -97,7 +98,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode
@@ -253,7 +254,7 @@ class pdf_soleil extends ModelePDFFicheinter
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -487,7 +488,7 @@ class pdf_soleil extends ModelePDFFicheinter
*/
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 1, 0, 0); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 1, $this->corner_radius, 0, 0, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidebottom)) {
$employee_name = '';
@@ -630,7 +631,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetXY($posx, $posy - 5);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
}
// Show sender name
@@ -683,7 +684,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
$pdf->SetTextColor(0, 0, 0);
}

View File

@@ -7,7 +7,8 @@
* Copyright (C) 2019 Markus Welters <markus@welters.de>
* Copyright (C) 2019 Rafael Ingenleuf <ingenleuf@welters.de>
* Copyright (C) 2020 Marc Guenneugues <marc.guenneugues@simicar.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ class pdf_standard_evaluation extends ModelePDFEvaluation
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
@@ -261,7 +262,7 @@ class pdf_standard_evaluation extends ModelePDFEvaluation
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1 - 4, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1 + 6);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1 - 4, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1 + 6, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -616,7 +617,7 @@ class pdf_standard_evaluation extends ModelePDFEvaluation
$pdf->MultiCell(190, 5, $outputlangs->transnoentities("Information"), '', 'L');*/
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(224, 224, 224);
$pdf->MultiCell(190, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 190, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender information
@@ -658,7 +659,7 @@ class pdf_standard_evaluation extends ModelePDFEvaluation
$pdf->SetDrawColor(128, 128, 128);
// Rect takes a length in 3rd parameter
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height);
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, '1234', 'D');
// line prend une position y en 3eme param
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5);

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2017 Laurent Destailleur <eldy@stocks.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -83,7 +84,7 @@ class pdf_standard_movementstock extends ModelePDFMovement
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_multilang = 1; // Available in several languages
$this->option_freetext = 0; // Support add of a personalised text
@@ -709,7 +710,7 @@ class pdf_standard_movementstock extends ModelePDFMovement
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -781,7 +782,7 @@ class pdf_standard_movementstock extends ModelePDFMovement
*
* @param TCPDF $pdf Object PDF
* @param float|int $tab_top Top position of table
* @param float|int $tab_height Height of table (rectangle)
* @param float|int $tab_height Height of table (angle)
* @param int $nexY Y (not used)
* @param Translate $outputlangs Langs object
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
@@ -813,7 +814,7 @@ class pdf_standard_movementstock extends ModelePDFMovement
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}

View File

@@ -8,6 +8,7 @@
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -103,7 +104,7 @@ class pdf_vinci extends ModelePDFMo
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_multilang = 1; //Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount
@@ -342,10 +343,10 @@ class pdf_vinci extends ModelePDFMo
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -364,13 +365,13 @@ class pdf_vinci extends ModelePDFMo
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -938,7 +939,7 @@ class pdf_vinci extends ModelePDFMo
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -946,7 +947,7 @@ class pdf_vinci extends ModelePDFMo
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
foreach ($this->cols as $colKey => $colDef) {
if (!$this->getColumnStatus($colKey)) {
@@ -1200,7 +1201,7 @@ class pdf_vinci extends ModelePDFMo
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@products.sourceforge.net>
* Copyright (C) 2023 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -92,7 +93,7 @@ class pdf_standard extends ModelePDFProduct
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_multilang = 1; // Available in several languages
$this->option_freetext = 0; // Support add of a personalised text
@@ -337,7 +338,7 @@ class pdf_standard extends ModelePDFProduct
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -636,7 +637,7 @@ class pdf_standard extends ModelePDFProduct
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -644,7 +645,7 @@ class pdf_standard extends ModelePDFProduct
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -109,7 +110,7 @@ class pdf_baleine extends ModelePDFProjects
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -273,7 +274,7 @@ class pdf_baleine extends ModelePDFProjects
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 2, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 2, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -509,7 +510,7 @@ class pdf_baleine extends ModelePDFProjects
*
* @param TCPDF $pdf Object PDF
* @param float|int $tab_top Top position of table
* @param float|int $tab_height Height of table (rectangle)
* @param float|int $tab_height Height of table (angle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @param int $hidetop Hide top bar of array
@@ -527,7 +528,7 @@ class pdf_baleine extends ModelePDFProjects
$pdf->SetDrawColor(128, 128, 128);
// Draw rect of all tab (title + lines). Rect takes a length in 3rd parameter
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height);
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, '1234', 'D');
// Line takes a position y in 3rd parameter
$pdf->line($this->marge_gauche, $tab_top + $heightoftitleline, $this->page_largeur - $this->marge_droite, $tab_top + $heightoftitleline);

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -129,7 +130,7 @@ class pdf_beluga extends ModelePDFProjects
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -306,7 +307,7 @@ class pdf_beluga extends ModelePDFProjects
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 2, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 2, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -757,7 +758,7 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetDrawColor(128, 128, 128);
// Draw rect of all tab (title + lines). Rect takes a length in 3rd parameter
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height);
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, '1234', 'D');
// line prend une position y en 3eme param
$pdf->line($this->marge_gauche, $tab_top + $heightoftitleline, $this->page_largeur - $this->marge_droite, $tab_top + $heightoftitleline);

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -103,7 +104,7 @@ class pdf_timespent extends ModelePDFProjects
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
@@ -268,7 +269,7 @@ class pdf_timespent extends ModelePDFProjects
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 2, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 2, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -525,7 +526,7 @@ class pdf_timespent extends ModelePDFProjects
$pdf->SetDrawColor(128, 128, 128);
// Draw rect of all tab (title + lines). Rect takes a length in 3rd parameter
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height);
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, '1234', 'D');
// Line takes a position y in 3rd parameter
$pdf->line($this->marge_gauche, $tab_top + $heightoftitleline, $this->page_largeur - $this->marge_droite, $tab_top + $heightoftitleline);

View File

@@ -1,15 +1,16 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -108,7 +109,7 @@ class pdf_azur extends ModelePDFPropales
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -396,7 +397,7 @@ class pdf_azur extends ModelePDFPropales
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -452,7 +453,7 @@ class pdf_azur extends ModelePDFPropales
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -1385,7 +1386,7 @@ class pdf_azur extends ModelePDFPropales
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1393,7 +1394,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
@@ -1658,7 +1659,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -1713,7 +1714,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name

View File

@@ -7,8 +7,9 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ class pdf_cyan extends ModelePDFPropales
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -369,7 +370,7 @@ class pdf_cyan extends ModelePDFPropales
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -483,10 +484,10 @@ class pdf_cyan extends ModelePDFPropales
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -505,13 +506,13 @@ class pdf_cyan extends ModelePDFPropales
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -1487,7 +1488,7 @@ class pdf_cyan extends ModelePDFPropales
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1495,7 +1496,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (getDolGlobalString('MAIN_PDF_TITLE_TEXT_COLOR')) {
$arrayColorTextTitle = explode(',', getDolGlobalString('MAIN_PDF_TITLE_TEXT_COLOR'));
@@ -1725,7 +1726,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
}
@@ -1781,7 +1782,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
}
// Show recipient name

View File

@@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -82,7 +83,7 @@ class pdf_squille extends ModelePdfReception
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
$this->watermark = '';
@@ -311,7 +312,7 @@ class pdf_squille extends ModelePdfReception
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -364,7 +365,7 @@ class pdf_squille extends ModelePdfReception
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -823,7 +824,7 @@ class pdf_squille extends ModelePdfReception
$pdf->SetFont('', '', $default_font_size - 2);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetFont('', '', $default_font_size - 1);
@@ -1054,7 +1055,7 @@ class pdf_squille extends ModelePdfReception
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFillColor(255, 255, 255);
@@ -1106,7 +1107,7 @@ class pdf_squille extends ModelePdfReception
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient"), 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');

View File

@@ -1,9 +1,10 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@stocks.sourceforge.net>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2022 Nicolas Silobre <nsilobre@ns-info90.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2022 Nicolas Silobre <nsilobre@ns-info90.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -79,7 +80,7 @@ class pdf_standard_stock extends ModelePDFStock
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_multilang = 1; // Available in several languages
$this->option_freetext = 0; // Support add of a personalised text
@@ -506,7 +507,7 @@ class pdf_standard_stock extends ModelePDFStock
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -610,7 +611,7 @@ class pdf_standard_stock extends ModelePDFStock
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -619,7 +620,7 @@ class pdf_standard_stock extends ModelePDFStock
$pdf->SetFont('', 'B', $default_font_size - 3);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$pdf->SetLineStyle(array('dash' => '0', 'color' => array(200, 200, 200)));
$pdf->SetDrawColor(200, 200, 200);

View File

@@ -3,9 +3,10 @@
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -115,7 +116,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
// Get source company
@@ -368,7 +369,7 @@ class pdf_eagle extends ModelePDFStockTransfer
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -424,7 +425,7 @@ class pdf_eagle extends ModelePDFStockTransfer
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_height -= $height_note;
$tab_top = $nexY + 6;
@@ -905,7 +906,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$pdf->SetFont('', '', $default_font_size - 2);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetFont('', '', $default_font_size - 1);
@@ -1185,7 +1186,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender").":", 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFillColor(255, 255, 255);
@@ -1240,7 +1241,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient").":", 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -9,7 +9,8 @@
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -103,7 +104,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -345,7 +346,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
$height_incoterms += 4;
@@ -442,10 +443,10 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -464,12 +465,12 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else { // No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -1148,7 +1149,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1156,7 +1157,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -1391,7 +1392,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender").":", 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFillColor(255, 255, 255);
@@ -1446,7 +1447,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Recipient").":", 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -3,7 +3,8 @@
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -98,7 +99,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -315,7 +316,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -347,7 +348,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -867,7 +868,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -875,7 +876,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
@@ -1196,7 +1197,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -1247,7 +1248,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -5,9 +5,10 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -102,7 +103,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -336,7 +337,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -421,10 +422,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -443,13 +444,13 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -1156,7 +1157,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1164,7 +1165,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -1380,7 +1381,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -1431,7 +1432,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -5,8 +5,9 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -101,7 +102,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -355,7 +356,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -372,7 +373,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -1024,7 +1025,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1032,7 +1033,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
@@ -1291,7 +1292,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -1341,7 +1342,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -5,6 +5,7 @@
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -108,7 +109,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_multilang = 1; // Available in several languages
@@ -729,7 +730,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("PayedBy"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -768,7 +769,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("PayedTo"), 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -5,8 +5,9 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -99,7 +100,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -366,7 +367,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 2, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -1143,7 +1144,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1151,7 +1152,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter
@@ -1339,7 +1340,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, 'L');
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -1397,7 +1398,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, 'L');
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -5,8 +5,9 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -101,7 +102,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$this->marge_droite = getDolGlobalInt('MAIN_PDF_MARGIN_RIGHT', 10);
$this->marge_haute = getDolGlobalInt('MAIN_PDF_MARGIN_TOP', 10);
$this->marge_basse = getDolGlobalInt('MAIN_PDF_MARGIN_BOTTOM', 10);
$this->corner_radius = getDolGlobalInt('MAIN_PDF_FRAME_CORNER_RADIUS', 0);
$this->option_logo = 1; // Display logo
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode
@@ -335,7 +336,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
// Rect takes a length in 3rd parameter
$pdf->SetDrawColor(192, 192, 192);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 3, $this->corner_radius, '1234', 'D');
$tab_top = $nexY + 6;
}
@@ -420,10 +421,10 @@ class pdf_zenith extends ModelePDFSupplierProposal
// Draw note frame
if ($i > $pageposbeforenote) {
$height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
}
// Add footer
@@ -442,13 +443,13 @@ class pdf_zenith extends ModelePDFSupplierProposal
$this->_pagehead($pdf, $object, 0, $outputlangs);
}
$height_note = $posyafter - $tab_top_newpage;
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
} else {
// No pagebreak
$pdf->commitTransaction();
$posyafter = $pdf->GetY();
$height_note = $posyafter - $tab_top;
$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1);
$pdf->RoundedRect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2, $this->corner_radius, '1234', 'D');
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) {
@@ -1145,7 +1146,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
}
}
@@ -1153,7 +1154,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - 1);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect takes a length in 3rd parameter and 4th parameter
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
@@ -1360,7 +1361,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection);
$pdf->SetXY($posx, $posy);
$pdf->SetFillColor(230, 230, 230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
$pdf->RoundedRect($posx, $posy, 82, $hautcadre, $this->corner_radius, '1234', 'F');
$pdf->SetTextColor(0, 0, 60);
// Show sender name
@@ -1415,7 +1416,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx + 2, $posy - 5);
$pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
$pdf->RoundedRect($posx, $posy, $widthrecbox, $hautcadre, $this->corner_radius, '1234', 'D');
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);

View File

@@ -2557,6 +2557,8 @@ ParamValue=Value of parameter
ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ?
HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s
HelpMariaDBToGetValue=This value was retrieved with command: %s
PDFBoxFrameRoundedCorners=Frames with rounded corners
MAIN_PDF_FRAME_CORNER_RADIUS=Default value for corner radius is 0 so no rounder corners. Choose values between 1-3 to increase corner radius and add rounded corners to frames
Captcha=Captcha
CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here
DolibarrStandardCaptcha=A native captcha generated by Dolibarr