forked from Wavyzz/dolibarr
Fix Phan notices introduced since 30/12/2024
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@ope-concept.pro>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -617,11 +618,11 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
|
||||
// Replace tags of lines for contacts task
|
||||
$sourcearray = array('internal', 'external');
|
||||
$contact_arrray = array();
|
||||
$contact_array = array();
|
||||
foreach ($sourcearray as $source) {
|
||||
$contact_temp = $object->liste_contact(-1, $source);
|
||||
if ((is_array($contact_temp) && count($contact_temp) > 0)) {
|
||||
$contact_arrray = array_merge($contact_arrray, $contact_temp);
|
||||
$contact_array = array_merge($contact_array, $contact_temp);
|
||||
}
|
||||
}
|
||||
// Check for segment
|
||||
@@ -633,8 +634,8 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines && (is_array($contact_arrray) && count($contact_arrray) > 0)) {
|
||||
foreach ($contact_arrray as $contact) {
|
||||
if ($foundtagforlines && (is_array($contact_array) && count($contact_array) > 0)) {
|
||||
foreach ($contact_array as $contact) {
|
||||
if ($contact['source'] == 'internal') {
|
||||
$objectdetail = new User($this->db);
|
||||
$objectdetail->fetch($contact['id']);
|
||||
@@ -646,6 +647,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($contact['socid']);
|
||||
$contact['socname'] = $soc->name;
|
||||
} else {
|
||||
dol_syslog(get_class().'::'.__METHOD__.' Unexpected contact source:'.$contact['source'], LOG_ERR);
|
||||
continue;
|
||||
}
|
||||
$contact['fullname'] = is_object($objectdetail) ? $objectdetail->getFullName($outputlangs, 1) : null;
|
||||
|
||||
@@ -793,11 +797,11 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
|
||||
// Replace tags of lines for contacts
|
||||
$sourcearray = array('internal', 'external');
|
||||
$contact_arrray = array();
|
||||
$contact_array = array();
|
||||
foreach ($sourcearray as $source) {
|
||||
$contact_temp = $project->liste_contact(-1, $source);
|
||||
if ((is_array($contact_temp) && count($contact_temp) > 0)) {
|
||||
$contact_arrray = array_merge($contact_arrray, $contact_temp);
|
||||
$contact_array = array_merge($contact_array, $contact_temp);
|
||||
}
|
||||
}
|
||||
// Check for segment
|
||||
@@ -809,9 +813,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines && (is_array($contact_arrray) && count($contact_arrray) > 0)) {
|
||||
if ($foundtagforlines && (is_array($contact_array) && count($contact_array) > 0)) {
|
||||
try {
|
||||
foreach ($contact_arrray as $contact) {
|
||||
foreach ($contact_array as $contact) {
|
||||
if ($contact['source'] == 'internal') {
|
||||
$objectdetail = new User($this->db);
|
||||
$objectdetail->fetch($contact['id']);
|
||||
@@ -823,6 +827,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($contact['socid']);
|
||||
$contact['socname'] = $soc->name;
|
||||
} else {
|
||||
dol_syslog(get_class().'::'.__METHOD__.' Unexpected contact source:'.$contact['source'], LOG_ERR);
|
||||
continue;
|
||||
}
|
||||
$contact['fullname'] = $objectdetail->getFullName($outputlangs, 1);
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -49,10 +50,19 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
/**
|
||||
* @var string Prefix customer accountancy code
|
||||
*/
|
||||
public $prefixcustomeraccountancycode;
|
||||
|
||||
/**
|
||||
* @var string Prefix supplier accountancy code
|
||||
*/
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $position = 20;
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -45,24 +46,31 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
/**
|
||||
* Prefix customer accountancy code
|
||||
* @var string
|
||||
* @var string Prefix customer accountancy code
|
||||
*/
|
||||
public $prefixcustomeraccountancycode;
|
||||
|
||||
/**
|
||||
* Prefix supplier accountancy code
|
||||
* @var string
|
||||
* @var string Prefix supplier accountancy code
|
||||
*/
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $position = 30;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $customeraccountancycodecharacternumber;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $supplieraccountancycodecharacternumber;
|
||||
|
||||
|
||||
@@ -178,7 +186,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
$s .= "<br>\n";
|
||||
|
||||
if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) {
|
||||
$thirdpartylabelexample = preg_replace('/([^a-z0-9])/i', '', $mysoc->name);
|
||||
$thirdpartylabelexample = (string) preg_replace('/([^a-z0-9])/i', '', $mysoc->name);
|
||||
} else {
|
||||
$thirdpartylabelexample = '';
|
||||
}
|
||||
$s .= "<br>\n";
|
||||
$s .= $this->prefixcustomeraccountancycode.strtoupper(substr($thirdpartylabelexample, 0, (int) $this->customeraccountancycodecharacternumber));
|
||||
@@ -191,8 +201,8 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
/**
|
||||
* Set accountancy account code for a third party into this->code
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Societe $societe Third party object
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Societe $societe Third party object
|
||||
* @param string $type 'customer' or 'supplier'
|
||||
* @return int >=0 if OK, <0 if KO
|
||||
*/
|
||||
@@ -209,11 +219,11 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
dol_syslog("mod_codecompta_digitaria::get_code search code for type=".$type." & company=".(!empty($societe->name) ? $societe->name : ''));
|
||||
|
||||
if ($type == 'supplier') {
|
||||
$codetouse = $societe->name;
|
||||
$codetouse = (string) $societe->name;
|
||||
$prefix = $this->prefixsupplieraccountancycode;
|
||||
$width = $this->supplieraccountancycodecharacternumber;
|
||||
} elseif ($type == 'customer') {
|
||||
$codetouse = $societe->name;
|
||||
$codetouse = (string) $societe->name;
|
||||
$prefix = $this->prefixcustomeraccountancycode;
|
||||
$width = $this->customeraccountancycodecharacternumber;
|
||||
} else {
|
||||
@@ -228,11 +238,11 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
}
|
||||
// Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default)
|
||||
if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || getDolGlobalString('COMPANY_DIGITARIA_REMOVE_SPECIAL')) {
|
||||
$codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse);
|
||||
$codetouse = (string) preg_replace('/([^a-z0-9])/i', '', $codetouse);
|
||||
}
|
||||
// Apply a regex replacement pattern on code if COMPANY_DIGITARIA_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed.
|
||||
if (getDolGlobalString('COMPANY_DIGITARIA_CLEAN_REGEX')) { // Example: $conf->global->COMPANY_DIGITARIA_CLEAN_REGEX='^..(..)..';
|
||||
$codetouse = preg_replace('/' . getDolGlobalString('COMPANY_DIGITARIA_CLEAN_REGEX').'/', '\1\2\3', $codetouse);
|
||||
$codetouse = (string) preg_replace('/' . getDolGlobalString('COMPANY_DIGITARIA_CLEAN_REGEX').'/', '\1\2\3', $codetouse);
|
||||
}
|
||||
|
||||
$this->code = $prefix.strtoupper(substr($codetouse, 0, (int) $width));
|
||||
@@ -248,11 +258,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
|
||||
if ($i <= 9) {
|
||||
$a = 1;
|
||||
}
|
||||
if ($i >= 10 && $i <= 99) {
|
||||
} elseif ($i >= 10 && $i <= 99) {
|
||||
$a = 2;
|
||||
}
|
||||
if ($i >= 100 && $i <= 999) {
|
||||
} else { // ($i >= 100 && $i <= 999) {
|
||||
$a = 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?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-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
@@ -41,16 +42,46 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
*/
|
||||
class pdf_standard_stock extends ModelePDFStock
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $wref;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdesc;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxlabel;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxqty;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxup;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxunit;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdiscount;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $postotalht;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $tabTitleHeight;
|
||||
|
||||
|
||||
@@ -390,6 +421,7 @@ class pdf_standard_stock extends ModelePDFStock
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 3, price(price2num($objp->ppmp * $objp->value, 'MT'), 0, $outputlangs), 0, 'R');
|
||||
$totalvalue += price2num($objp->ppmp * $objp->value, 'MT');
|
||||
|
||||
$pricemin = 0;
|
||||
// Price sell min
|
||||
if (!getDolGlobalString('PRODUIT_MULTIPRICES')) {
|
||||
$pricemin = $objp->price;
|
||||
@@ -806,6 +838,7 @@ class pdf_standard_stock extends ModelePDFStock
|
||||
$sql = "SELECT max(m.datem) as datem";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
|
||||
$sql .= " WHERE m.fk_entrepot = ".((int) $object->id);
|
||||
$lastmovementdate = 0;
|
||||
$resqlbis = $this->db->query($sql);
|
||||
if ($resqlbis) {
|
||||
$obj = $this->db->fetch_object($resqlbis);
|
||||
|
||||
@@ -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) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -1167,6 +1168,8 @@ class pdf_eagle extends ModelePDFStockTransfer
|
||||
|
||||
if (!empty($thirdparty)) {
|
||||
$carac_emetteur_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
||||
} else {
|
||||
$carac_emetteur_name = '';
|
||||
}
|
||||
|
||||
if ($usecontact) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?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>
|
||||
@@ -9,7 +10,7 @@
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 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-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -208,6 +209,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
}
|
||||
|
||||
$arephoto = false;
|
||||
$realpath = null;
|
||||
foreach ($pdir as $midir) {
|
||||
if (!$arephoto) {
|
||||
$dir = $conf->product->dir_output.'/'.$midir;
|
||||
@@ -640,6 +642,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
$pmp = $object->lines[$i]->pmp;
|
||||
$this->printStdColumnContent($pdf, $curY, 'subprice', price($pmp));
|
||||
$nexY = max($pdf->GetY(), $nexY);
|
||||
} else {
|
||||
$pmp = 0;
|
||||
}
|
||||
|
||||
// Quantity
|
||||
@@ -1158,7 +1162,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->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')));
|
||||
$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')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1376,6 +1380,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
|
||||
if (!empty($thirdparty)) {
|
||||
$carac_emetteur_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
||||
} else {
|
||||
$carac_emetteur_name = '';
|
||||
}
|
||||
|
||||
if ($usecontact) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -244,6 +245,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices
|
||||
if ($object->specimen) {
|
||||
$dir = $conf->fournisseur->facture->dir_output;
|
||||
$file = $dir."/SPECIMEN.pdf";
|
||||
$objectref = 'SPECIMEN_REF';
|
||||
} else {
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -872,7 +873,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (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')));
|
||||
$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')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -241,6 +242,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
||||
if ($object->specimen) {
|
||||
$dir = $conf->fournisseur->commande->dir_output;
|
||||
$file = $dir."/SPECIMEN.pdf";
|
||||
$objectref = "SPECIMEN_REF";
|
||||
} else {
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
@@ -7,7 +8,7 @@
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 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-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -313,7 +314,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
// Does we have at least one line with discount $this->atleastonediscount
|
||||
foreach ($object->lines as $line) {
|
||||
if ($line->remise_percent) {
|
||||
$this->atleastonediscount = true;
|
||||
$this->atleastonediscount = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1176,7 +1177,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (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')));
|
||||
$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')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -1030,7 +1031,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (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')));
|
||||
$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')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -150,6 +151,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
|
||||
$max = 0;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -40,21 +41,67 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxpicture;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxup;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxqty;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxunit;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdesc;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdiscount;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $postotalht;
|
||||
|
||||
/**
|
||||
* @var array<string,float>
|
||||
*/
|
||||
public $tva;
|
||||
/**
|
||||
* @var array<string,array{amount:float}>
|
||||
*/
|
||||
public $tva_array;
|
||||
/**
|
||||
* Local tax rates Array[tax_type][tax_rate]
|
||||
*
|
||||
* @var array<int,array<string,float>>
|
||||
*/
|
||||
public $localtax1;
|
||||
/**
|
||||
* Local tax rates Array[tax_type][tax_rate]
|
||||
*
|
||||
* @var array<int,array<string,float>>
|
||||
*/
|
||||
public $localtax2;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $atleastoneratenotnull = 0;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $atleastonediscount = 0;
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* 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-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -73,12 +74,33 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdate;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxreffacturefourn;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxreffacture;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtype;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtotalht;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtotalttc;
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@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-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -293,6 +294,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket
|
||||
$result = $object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
|
||||
$contactobject = null;
|
||||
// Recipient name
|
||||
if (!empty($usecontact)) {
|
||||
// We can use the company of contact instead of thirdparty company
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@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-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -327,6 +328,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
$result = $object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
|
||||
$contactobject = null;
|
||||
// Recipient name
|
||||
if (!empty($usecontact)) {
|
||||
if ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || getDolGlobalString('MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
|
||||
|
||||
Reference in New Issue
Block a user