mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
fix phpstan (#31075)
* fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
ffeb471bab
commit
000173c7b9
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -199,7 +200,7 @@ fputs($fp, ' </dir>'."\n");
|
|||
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
//var_dump($checksumconcat);
|
||||
|
||||
fputs($fp, '<dolibarr_htdocs_dir_checksum>'."\n");
|
||||
fputs($fp, md5(join(',', $checksumconcat))."\n");
|
||||
fputs($fp, '</dolibarr_htdocs_dir_checksum>'."\n");
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 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>
|
||||
* 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
|
||||
|
|
@ -225,7 +226,6 @@ if (!empty($argv[4])) {
|
|||
$user=new User($db);
|
||||
}
|
||||
|
||||
//var_dump($user->db->database_name);
|
||||
$ret=$user->fetch('', 'admin');
|
||||
if (! $ret > 0) {
|
||||
print 'An admin user with login "admin" must exists to use this script.'."\n";
|
||||
|
|
|
|||
|
|
@ -623,13 +623,6 @@ if ($result) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
//var_dump($tabpay);
|
||||
//var_dump($tabcompany);
|
||||
//var_dump($tabbq);
|
||||
//var_dump($tabtp);
|
||||
//var_dump($tabtype);
|
||||
|
||||
// Write bookkeeping
|
||||
if (!$error && $action == 'writebookkeeping' && $user->hasRight('accounting', 'bind', 'write')) {
|
||||
$now = dol_now();
|
||||
|
|
@ -663,9 +656,6 @@ if (!$error && $action == 'writebookkeeping' && $user->hasRight('accounting', 'b
|
|||
$db->begin();
|
||||
|
||||
// Introduce a protection. Total of tabtp must be total of tabbq
|
||||
//var_dump($tabpay);
|
||||
//var_dump($tabtp);
|
||||
//var_dump($tabbq);exit;
|
||||
|
||||
// Bank
|
||||
if (!$errorforline && is_array($tabbq[$key])) {
|
||||
|
|
@ -1388,9 +1378,6 @@ if (empty($action) || $action == 'view') {
|
|||
$accounttoshowsubledger = length_accounta($k);
|
||||
if ($accounttoshow != $accounttoshowsubledger) {
|
||||
if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined') {
|
||||
//var_dump($tabpay[$key]);
|
||||
//var_dump($tabtype[$key]);
|
||||
//var_dump($tabbq[$key]);
|
||||
//print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
if (!empty($tabcompany[$key]['code_compta'])) {
|
||||
if (in_array($tabtype[$key], array('payment_various', 'payment_salary'))) {
|
||||
|
|
|
|||
|
|
@ -211,7 +211,6 @@ foreach ($object->fields as $key => $val) {
|
|||
}
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
|
||||
//var_dump($arrayfields);exit;
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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 +119,7 @@ print '<td></td>';
|
|||
print "</tr>\n";
|
||||
|
||||
$listofnetworks = dol_sort_array($listofnetworks, 'label');
|
||||
//var_dump($listofnetworks);
|
||||
|
||||
foreach ($listofnetworks as $key => $value) {
|
||||
if (!empty($value['active'])) {
|
||||
print '<tr class="oddeven">';
|
||||
|
|
|
|||
|
|
@ -1385,7 +1385,6 @@ if ($id > 0) {
|
|||
} elseif ($search_active == 'no') {
|
||||
$sql .= " AND ".$db->sanitize($tableprefix)."active = 0";
|
||||
}
|
||||
//var_dump($sql);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1563,7 +1563,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
|
|||
}
|
||||
echo ' </tr>'."\n";
|
||||
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$todaytms = dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']);
|
||||
|
||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
||||
|
|
@ -1679,7 +1679,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
|
|||
}
|
||||
|
||||
$today = 0;
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) {
|
||||
$today = 1;
|
||||
}
|
||||
|
|
@ -1709,7 +1709,7 @@ if (empty($mode) || $mode == 'show_month') { // View by month
|
|||
// Code to show just one day
|
||||
$style = 'cal_current_month cal_current_month_oneday';
|
||||
$today = 0;
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
if ($todayarray['mday'] == $day && $todayarray['mon'] == $month && $todayarray['year'] == $year) {
|
||||
$today = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -832,7 +832,7 @@ while ($obj = $db->fetch_object($resql)) {
|
|||
}
|
||||
|
||||
// Loop on each user to show calendar
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$sav = $tmpday;
|
||||
$showheader = true;
|
||||
$var = false;
|
||||
|
|
|
|||
|
|
@ -999,7 +999,7 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
|||
}
|
||||
|
||||
// Loop on each user to show calendar
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$sav = $tmpday;
|
||||
$showheader = true;
|
||||
$var = false;
|
||||
|
|
|
|||
|
|
@ -1276,7 +1276,7 @@ if (empty($reshook)) {
|
|||
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
|
||||
$desc = $product_desc;
|
||||
} else {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
// Add custom code and origin country into description
|
||||
|
|
|
|||
|
|
@ -974,7 +974,7 @@ if (empty($reshook)) {
|
|||
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
|
||||
$desc = $product_desc;
|
||||
} else {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
// Add custom code and origin country into description
|
||||
|
|
|
|||
|
|
@ -2346,7 +2346,7 @@ if (empty($reshook)) {
|
|||
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
|
||||
$desc = $product_desc;
|
||||
} else {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
// Add custom code and origin country into description
|
||||
|
|
|
|||
|
|
@ -61,7 +61,9 @@ class ChargeSociales extends CommonObject
|
|||
*/
|
||||
public $date_ech;
|
||||
|
||||
|
||||
/**
|
||||
* @var string label
|
||||
*/
|
||||
public $label;
|
||||
public $type;
|
||||
public $type_label;
|
||||
|
|
@ -96,6 +98,9 @@ class ChargeSociales extends CommonObject
|
|||
*/
|
||||
public $paiementtype;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $mode_reglement_id;
|
||||
public $mode_reglement_code;
|
||||
public $mode_reglement;
|
||||
|
|
@ -115,6 +120,9 @@ class ChargeSociales extends CommonObject
|
|||
*/
|
||||
public $total;
|
||||
|
||||
/**
|
||||
* @var float total paid
|
||||
*/
|
||||
public $totalpaid;
|
||||
|
||||
|
||||
|
|
@ -406,6 +414,7 @@ class ChargeSociales extends CommonObject
|
|||
public function solde($year = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT SUM(f.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as f";
|
||||
$sql .= " WHERE f.entity = ".((int) $conf->entity);
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ if (empty($reshook)) {
|
|||
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
|
||||
$desc = $product_desc;
|
||||
} else {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
$fk_unit = $prod->fk_unit;
|
||||
|
|
@ -1680,7 +1680,7 @@ if ($action == 'create') {
|
|||
}
|
||||
// VAT
|
||||
print '<td class="center">';
|
||||
print vatrate($objp->tva_tx.($objp->vat_src_code ? (' ('.$objp->vat_src_code.')') : ''), '%', $objp->info_bits);
|
||||
print vatrate($objp->tva_tx.($objp->vat_src_code ? (' ('.$objp->vat_src_code.')') : ''), true, $objp->info_bits);
|
||||
print '</td>';
|
||||
// Price
|
||||
print '<td class="right">'.($objp->subprice != '' ? price($objp->subprice) : '')."</td>\n";
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
|
||||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -854,8 +854,8 @@ class Utils
|
|||
}
|
||||
|
||||
// Copy some files into temp directory, so instruction include::ChangeLog.md[] will works inside the asciidoc file.
|
||||
dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', 0, 1);
|
||||
dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', 0, 1);
|
||||
dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', '0', 1);
|
||||
dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', '0', 1);
|
||||
|
||||
// Replace into README.md and ChangeLog.md (in case they are included into documentation with tag __README__ or __CHANGELOG__)
|
||||
$arrayreplacement = array();
|
||||
|
|
|
|||
|
|
@ -1925,9 +1925,9 @@ function pdf_getlineref_supplier($object, $i, $outputlangs, $hidedetails = 0)
|
|||
* Return line vat rate
|
||||
*
|
||||
* @param SupplierProposal|CommandeFournisseur|FactureFournisseur|Propal|Facture|Commande|ExpenseReport|StockTransfer $object Object
|
||||
* @param int $i Current line number
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @param int<0,2> $hidedetails Hide details (0=no, 1=yes, 2=just special lines)
|
||||
* @param int $i Current line number
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @param int<0,2> $hidedetails Hide details (0=no, 1=yes, 2=just special lines)
|
||||
* @return string
|
||||
*/
|
||||
function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0)
|
||||
|
|
@ -1962,7 +1962,7 @@ function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0)
|
|||
} else {
|
||||
$tmpresult = '';
|
||||
}
|
||||
$tmpresult .= vatrate(abs($object->lines[$i]->localtax1_tx), 0);
|
||||
$tmpresult .= vatrate((string) abs($object->lines[$i]->localtax1_tx), 0);
|
||||
}
|
||||
}
|
||||
if (!getDolGlobalString('MAIN_PDF_MAIN_HIDE_THIRD_TAX')) {
|
||||
|
|
@ -1972,7 +1972,7 @@ function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0)
|
|||
} else {
|
||||
$tmpresult = '';
|
||||
}
|
||||
$tmpresult .= vatrate(abs($object->lines[$i]->localtax2_tx), 0);
|
||||
$tmpresult .= vatrate((string) abs($object->lines[$i]->localtax2_tx), 0);
|
||||
}
|
||||
}
|
||||
$tmpresult .= '%';
|
||||
|
|
|
|||
|
|
@ -947,7 +947,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -983,7 +983,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1053,7 +1053,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1093,7 +1093,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1153,7 +1153,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1189,7 +1189,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1257,7 +1257,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1295,7 +1295,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1426,7 +1426,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1463,7 +1463,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1530,7 +1530,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1565,7 +1565,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1638,7 +1638,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1675,7 +1675,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1759,7 +1759,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1797,7 +1797,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1713,7 +1713,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1750,7 +1750,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1842,7 +1842,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1880,7 +1880,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 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
|
||||
|
|
@ -387,7 +387,7 @@ class modAi extends DolibarrModules
|
|||
// if (file_exists($src) && !file_exists($dest)) {
|
||||
// require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
// dol_mkdir($dirodt);
|
||||
// $result = dol_copy($src, $dest, 0, 0);
|
||||
// $result = dol_copy($src, $dest, '0', 0);
|
||||
// if ($result < 0) {
|
||||
// $langs->load("errors");
|
||||
// $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Rafael San José <rsanjose@alxarafe.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -485,7 +486,7 @@ class modBom extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Ahmad Jamaly Rabub <rabib@metroworks.co.jp>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -465,7 +466,7 @@ class modCommande extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* 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
|
||||
|
|
@ -236,7 +237,7 @@ class modContrat extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -453,7 +454,7 @@ class modEventOrganization extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -349,7 +350,7 @@ class modExpedition extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2021-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -786,7 +786,7 @@ class modFacture extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2020 Ahmad Jamaly Rabib <rabib@metroworks.co.jp>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -978,7 +979,7 @@ class modFournisseur extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
@ -999,7 +1000,7 @@ class modFournisseur extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 SuperAdmin
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -455,7 +455,7 @@ class modKnowledgeManagement extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
|
|
@ -440,7 +440,7 @@ class modMrp extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Dorian Laurent <i.merraha@sofimedmaroc.com>
|
||||
* Copyright (C) 2021 NextGestion <contact@nextgestion.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
|
@ -471,7 +471,7 @@ class modPartnership extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Charles-Fr BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -383,7 +384,7 @@ class modProjet extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
@ -399,7 +400,7 @@ class modProjet extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Ahmad Jamaly Rabib <rabib@metroworks.co.jp>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -495,7 +496,7 @@ class modPropale extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -272,7 +273,7 @@ class modReception extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -425,7 +425,7 @@ class modRecruitment extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2012-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1039,7 +1040,7 @@ class modSociete extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ class modStock extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -169,7 +170,7 @@ class modSupplierProposal extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ class modTicket extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class modWebsite extends DolibarrModules
|
|||
$src = $srcroot.'/'.$cursorfile['name'];
|
||||
$dest = $destroot.'/'.$cursorfile['name'];
|
||||
|
||||
$result = dol_copy($src, $dest, 0, 1); // For full zip templates, we overwrite old existing files
|
||||
$result = dol_copy($src, $dest, '0', 1); // For full zip templates, we overwrite old existing files
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -402,7 +402,7 @@ class modWorkstation extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ class pdf_vinci extends ModelePDFMo
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -840,7 +840,7 @@ class pdf_vinci extends ModelePDFMo
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -1132,7 +1132,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1168,7 +1168,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1235,7 +1235,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1272,7 +1272,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1235,7 +1235,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT1", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
@ -1268,7 +1268,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
@ -1326,7 +1326,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT1", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
@ -1361,7 +1361,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -745,7 +745,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -1021,7 +1021,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -1051,7 +1051,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -897,7 +897,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -927,7 +927,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -966,7 +966,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -1019,7 +1019,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
||||
|
|
@ -1050,7 +1050,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -1048,7 +1048,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -330,7 +331,7 @@ if (empty($positiverates)) {
|
|||
$positiverates = '0';
|
||||
}
|
||||
print $tooltiponprice;
|
||||
print vatrate($positiverates.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), '%', $line->info_bits);
|
||||
print vatrate($positiverates.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), true, $line->info_bits);
|
||||
print $tooltiponpriceend;
|
||||
?></td>
|
||||
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ if (empty($reshook)) {
|
|||
$desc = $product_desc;
|
||||
}
|
||||
if (!empty($product_desc) && trim($product_desc) != trim($desc)) {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
$ref_supplier = $productsupplier->ref_supplier;
|
||||
|
|
|
|||
|
|
@ -1701,7 +1701,7 @@ if (empty($reshook)) {
|
|||
$desc = $product_desc;
|
||||
}
|
||||
if (!empty($product_desc) && trim($product_desc) != trim($desc)) {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
$ref_supplier = $productsupplier->ref_supplier;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- ========================================================================
|
||||
-- Copyright (C) 2016 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- ========================================================================
|
||||
-- Copyright (C) 2016 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
-- Copyright (C) 2016 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -23,4 +23,3 @@ ALTER TABLE llx_categorie_account ADD INDEX idx_categorie_account_fk_account (fk
|
|||
|
||||
ALTER TABLE llx_categorie_account ADD CONSTRAINT fk_categorie_account_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_account ADD CONSTRAINT fk_categorie_account_fk_account FOREIGN KEY (fk_account) REFERENCES llx_bank_account (rowid);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
-- Copyright (C) 2016 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ========================================================================
|
||||
-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
-- Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2015 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -40,16 +40,16 @@ create table llx_loan
|
|||
|
||||
capital_position double(24,8) DEFAULT 0, -- If not a new loan, just have the position of capital
|
||||
date_position date,
|
||||
|
||||
|
||||
paid smallint default 0 NOT NULL,
|
||||
|
||||
accountancy_account_capital varchar(32),
|
||||
accountancy_account_insurance varchar(32),
|
||||
accountancy_account_interest varchar(32),
|
||||
|
||||
|
||||
fk_projet integer DEFAULT NULL,
|
||||
|
||||
|
||||
fk_user_author integer DEFAULT NULL,
|
||||
fk_user_modif integer DEFAULT NULL,
|
||||
fk_user_modif integer DEFAULT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
-- Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2015 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
-- Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2015 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2013 Florian HENRY <florian.henry@open-concept.pro>
|
||||
-- Copyright (C) 2014 Frederic France <frederic.france@free.fr>
|
||||
-- Copyright (C) 2014 Frédéric France <frederic.france@free.fr>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
--
|
||||
-- ============================================================================
|
||||
|
||||
CREATE TABLE llx_printing
|
||||
CREATE TABLE llx_printing
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
datec datetime,
|
||||
printer_name text NOT NULL,
|
||||
printer_name text NOT NULL,
|
||||
printer_location text NOT NULL,
|
||||
printer_id varchar(255) NOT NULL,
|
||||
copy integer NOT NULL DEFAULT '1',
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ if (!$error && $db->connected && $action == "set") { // Test on permission not r
|
|||
$dest = $dirodt.'/template_'.$cursorfile.'.odt';
|
||||
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
print '<tr><td colspan="2"><br>'.$langs->trans('ErrorFailToCopyFile', $src, $dest).'</td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4437,7 +4437,7 @@ function migrate_user_photospath()
|
|||
|
||||
//print $origin.'/'.$file.'/'.$thumb.' -> '.$destin.'/'.$file.'/'.$thumb.'<br>'."\n";
|
||||
print '.';
|
||||
dol_copy($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb, 0, 0);
|
||||
dol_copy($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb, '0', 0);
|
||||
//var_dump('aaa');exit;
|
||||
}
|
||||
}
|
||||
|
|
@ -4447,7 +4447,7 @@ function migrate_user_photospath()
|
|||
if (!dol_is_file($destin.'/'.$file)) {
|
||||
//print $origin.'/'.$file.' -> '.$destin.'/'.$file.'<br>'."\n";
|
||||
print '.';
|
||||
dol_copy($origin.'/'.$file, $destin.'/'.$file, 0, 0);
|
||||
dol_copy($origin.'/'.$file, $destin.'/'.$file, '0', 0);
|
||||
//var_dump('eee');exit;
|
||||
}
|
||||
}
|
||||
|
|
@ -4530,7 +4530,7 @@ function migrate_user_photospath2()
|
|||
|
||||
//print $origin.'/'.$file.'/'.$thumb.' -> '.$destin.'/'.$file.'/'.$thumb.'<br>'."\n";
|
||||
print '.';
|
||||
dol_copy($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb, 0, 0);
|
||||
dol_copy($origin.'/'.$file.'/'.$thumb, $destin.'/'.$file.'/'.$thumb, '0', 0);
|
||||
}
|
||||
}
|
||||
// dol_delete_dir($origin.'/'.$file);
|
||||
|
|
@ -4539,7 +4539,7 @@ function migrate_user_photospath2()
|
|||
if (!dol_is_file($destin.'/'.$file)) {
|
||||
//print $origin.'/'.$file.' -> '.$destin.'/'.$file.'<br>'."\n";
|
||||
print '.';
|
||||
dol_copy($origin.'/'.$file, $destin.'/'.$file, 0, 0);
|
||||
dol_copy($origin.'/'.$file, $destin.'/'.$file, '0', 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ if ($dirins && $action == 'initmodule' && $modulename && $user->hasRight("module
|
|||
// file_put_contents($destdir.'/'.strtolower($modulename).'propertycard.php','');
|
||||
// $srcFileCard = DOL_DOCUMENT_ROOT.'/modulebuilder/card.php';
|
||||
// $destFileCard = $dirins.'/'.strtolower($modulename).'/template/card.php';
|
||||
// dol_copy($srcFileCard, $destdir.'/'.strtolower($modulename).'propertycard.php', 0,1, $arrayreplacement);
|
||||
// dol_copy($srcFileCard, $destdir.'/'.strtolower($modulename).'propertycard.php', '0',1, $arrayreplacement);
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
@ -454,7 +454,7 @@ if ($dirins && in_array($action, array('initapi', 'initphpunit', 'initpagecontac
|
|||
|
||||
if ($action == 'initapi') { // Test on permission already done
|
||||
if (file_exists($dirins.'/'.strtolower($module).'/class/api_'.strtolower($module).'.class.php')) {
|
||||
$result = dol_copy(DOL_DOCUMENT_ROOT.'/modulebuilder/template/class/api_mymodule.class.php', $dirins.'/'.strtolower($module).'/class/api_'.strtolower($module).'.class.php', 0, 1);
|
||||
$result = dol_copy(DOL_DOCUMENT_ROOT.'/modulebuilder/template/class/api_mymodule.class.php', $dirins.'/'.strtolower($module).'/class/api_'.strtolower($module).'.class.php', '0', 1);
|
||||
}
|
||||
dol_mkdir($dirins.'/'.strtolower($module).'/class');
|
||||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
|
|
@ -491,10 +491,8 @@ if ($dirins && in_array($action, array('initapi', 'initphpunit', 'initpagecontac
|
|||
$varnametoupdate = 'showtabofpageagenda';
|
||||
}
|
||||
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
if (!file_exists($destfile)) {
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
}
|
||||
|
||||
if ($result > 0) {
|
||||
|
|
@ -547,14 +545,10 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module) && $user->hasR
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile1 = $srcdir.'/sql/llx_mymodule_myobject_extrafields.sql';
|
||||
$destfile1 = $dirins.'/'.strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result1 = dol_copy($srcfile1, $destfile1, 0, 0);
|
||||
$result1 = dol_copy($srcfile1, $destfile1, '0', 0);
|
||||
$srcfile2 = $srcdir.'/sql/llx_mymodule_myobject_extrafields.key.sql';
|
||||
$destfile2 = $dirins.'/'.strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.key.sql';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result2 = dol_copy($srcfile2, $destfile2, 0, 0);
|
||||
$result2 = dol_copy($srcfile2, $destfile2, '0', 0);
|
||||
|
||||
if ($result1 > 0 && $result2 > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -601,9 +595,7 @@ if ($dirins && $action == 'inithook' && !empty($module) && $user->hasRight("modu
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/class/actions_mymodule.class.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/class/actions_'.strtolower($module).'.class.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -636,9 +628,7 @@ if ($dirins && $action == 'inittrigger' && !empty($module) && $user->hasRight("m
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/core/triggers/interface_99_mod'.$module.'_'.$module.'Triggers.class.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -671,9 +661,7 @@ if ($dirins && $action == 'initwidget' && !empty($module) && $user->hasRight("mo
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/core/boxes/mymodulewidget1.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/core/boxes/'.strtolower($module).'widget1.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -706,9 +694,7 @@ if ($dirins && $action == 'initemailing' && !empty($module) && $user->hasRight("
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/core/modules/mailings/mailing_mymodule_selector1.modules.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/core/modules/mailings/mailing_'.strtolower($module).'_selector1.modules.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -741,9 +727,7 @@ if ($dirins && $action == 'initcss' && !empty($module) && $user->hasRight("modul
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/css/mymodule.css.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/css/'.strtolower($module).'.css.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -781,9 +765,7 @@ if ($dirins && $action == 'initjs' && !empty($module) && $user->hasRight("module
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/js/mymodule.js.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/js/'.strtolower($module).'.js.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -821,9 +803,7 @@ if ($dirins && $action == 'initcli' && !empty($module) && $user->hasRight("modul
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/scripts/mymodule.php';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/scripts/'.strtolower($module).'.php';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -863,9 +843,7 @@ if ($dirins && $action == 'initdoc' && !empty($module) && $user->hasRight("modul
|
|||
$srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template';
|
||||
$srcfile = $srcdir.'/doc/Documentation.asciidoc';
|
||||
$destfile = $dirins.'/'.strtolower($module).'/doc/Documentation.asciidoc';
|
||||
//var_dump($srcfile);
|
||||
//var_dump($destfile);
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
|
||||
if ($result > 0) {
|
||||
$modulename = ucfirst($module); // Force first letter in uppercase
|
||||
|
|
@ -966,7 +944,7 @@ if ($dirins && $action == 'addlanguage' && !empty($module) && $user->hasRight("m
|
|||
$srcfile = $diroflang.'/langs/en_US/'.$modulelowercase.'.lang';
|
||||
$destfile = $diroflang.'/langs/'.$newlangcode.'/'.$modulelowercase.'.lang';
|
||||
|
||||
$result = dol_copy($srcfile, $destfile, 0, 0);
|
||||
$result = dol_copy($srcfile, $destfile, '0', 0);
|
||||
if ($result < 0) {
|
||||
setEventMessages($langs->trans("ErrorFailToCopyFile", $srcfile, $destfile), null, 'errors');
|
||||
}
|
||||
|
|
@ -2650,7 +2628,7 @@ if ($action == 'savefile' && empty($cancel) && $user->hasRight("modulebuilder",
|
|||
|
||||
// Save old version
|
||||
if (dol_is_file($pathoffile)) {
|
||||
dol_copy($pathoffile, $pathoffilebackup, 0, 1);
|
||||
dol_copy($pathoffile, $pathoffilebackup, '0', 1);
|
||||
}
|
||||
|
||||
$check = 'restricthtml';
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ class modMyModule extends DolibarrModules
|
|||
if (file_exists($src) && !file_exists($dest)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result = dol_copy($src, $dest, 0, 0);
|
||||
$result = dol_copy($src, $dest, '0', 0);
|
||||
if ($result < 0) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 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
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
* Copyright (C) 2015-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 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
|
||||
|
|
@ -976,7 +976,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS
|
|||
if (empty($positiverates)) {
|
||||
$positiverates = '0';
|
||||
}
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr);
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), true, $object->tva_npr);
|
||||
//print vatrate($object->multiprices_tva_tx[$soc->price_level], true);
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
|
|
@ -996,7 +996,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS
|
|||
if (empty($positiverates)) {
|
||||
$positiverates = '0';
|
||||
}
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr);
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), true, $object->tva_npr);
|
||||
/*
|
||||
if ($object->default_vat_code)
|
||||
{
|
||||
|
|
@ -1217,7 +1217,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS
|
|||
if (empty($positiverates)) {
|
||||
$positiverates = '0';
|
||||
}
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr, 0, 1);
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), true, $object->tva_npr, 0, 1);
|
||||
/*
|
||||
if ($object->default_vat_code)
|
||||
{
|
||||
|
|
@ -1819,7 +1819,7 @@ if ((!getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || $action == 'showlog_defau
|
|||
if (empty($positiverates)) {
|
||||
$positiverates = '0';
|
||||
}
|
||||
echo vatrate($positiverates.($objp->default_vat_code ? ' ('.$objp->default_vat_code.')' : ''), '%', !empty($objp->tva_npr) ? $objp->tva_npr : 0);
|
||||
echo vatrate($positiverates.($objp->default_vat_code ? ' ('.$objp->default_vat_code.')' : ''), true, !empty($objp->tva_npr) ? $objp->tva_npr : 0);
|
||||
/*
|
||||
if ($objp->default_vat_code)
|
||||
{
|
||||
|
|
@ -2270,7 +2270,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
|
|||
$positiverates = '0';
|
||||
}
|
||||
|
||||
echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), '%', ($line->tva_npr ? $line->tva_npr : $line->recuperableonly));
|
||||
echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), true, ($line->tva_npr ? $line->tva_npr : $line->recuperableonly));
|
||||
|
||||
//. vatrate($tva_tx, true, $line->recuperableonly) .
|
||||
print "</td>";
|
||||
|
|
@ -2401,7 +2401,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
|
|||
if (empty($positiverates)) {
|
||||
$positiverates = '0';
|
||||
}
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr);
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), true, $object->tva_npr);
|
||||
|
||||
//print vatrate($object->tva_tx, true, $object->tva_npr);
|
||||
//print $object->default_vat_code?' ('.$object->default_vat_code.')':'';
|
||||
|
|
@ -2482,7 +2482,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
|
|||
$positiverates = '0';
|
||||
}
|
||||
|
||||
echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), '%', (!empty($line->tva_npr) ? $line->tva_npr : $line->recuperableonly));
|
||||
echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), true, (!empty($line->tva_npr) ? $line->tva_npr : $line->recuperableonly));
|
||||
|
||||
print "</td>";
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
|
||||
|
|
@ -785,7 +785,7 @@ if ($id > 0 || $ref) {
|
|||
|
||||
// Discount qty min
|
||||
print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>';
|
||||
print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), '', 2)) : (isset($object->fourn_remise_percent) ? vatrate($object->fourn_remise_percent) : '')).'"> %';
|
||||
print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), '', 2)) : (isset($object->fourn_remise_percent) ? vatrate(price2num($object->fourn_remise_percent)) : '')).'"> %';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -1903,7 +1903,7 @@ class Project extends CommonObject
|
|||
if (dol_mkdir($clone_project_dir) >= 0) {
|
||||
$filearray = dol_dir_list($ori_project_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1);
|
||||
foreach ($filearray as $key => $file) {
|
||||
$rescopy = dol_copy($ori_project_dir.'/'.$file['name'], $clone_project_dir.'/'.$file['name'], 0, 1);
|
||||
$rescopy = dol_copy($ori_project_dir.'/'.$file['name'], $clone_project_dir.'/'.$file['name'], '0', 1);
|
||||
if (is_numeric($rescopy) && $rescopy < 0) {
|
||||
$this->error .= $langs->trans("ErrorFailToCopyFile", $ori_project_dir.'/'.$file['name'], $clone_project_dir.'/'.$file['name']);
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -2306,7 +2306,7 @@ class Task extends CommonObjectLine
|
|||
}
|
||||
}
|
||||
|
||||
$rescopy = dol_copy($ori_task_dir.'/'.$file['name'], $clone_task_dir.'/'.$file['name'], 0, 1);
|
||||
$rescopy = dol_copy($ori_task_dir.'/'.$file['name'], $clone_task_dir.'/'.$file['name'], '0', 1);
|
||||
if (is_numeric($rescopy) && $rescopy < 0) {
|
||||
$this->error .= $langs->trans("ErrorFailToCopyFile", $ori_task_dir.'/'.$file['name'], $clone_task_dir.'/'.$file['name']);
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ if ($action == 'afteradd') {
|
|||
}
|
||||
print ' </tr>'."\n";
|
||||
|
||||
$todayarray = dol_getdate($now, 'fast');
|
||||
$todayarray = dol_getdate($now, true);
|
||||
$todaytms = dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']);
|
||||
|
||||
// Load into an array all days with availabilities of the calendar for the current month $todayarray['mon'] and $todayarray['year']
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ if (empty($reshook)) {
|
|||
$desc = $product_desc;
|
||||
}
|
||||
if (!empty($product_desc) && trim($product_desc) != trim($desc)) {
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION'));
|
||||
$desc = dol_concatdesc($desc, $product_desc, false, getDolGlobalString('MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION') ? true : false);
|
||||
}
|
||||
|
||||
$ref_supplier = $productsupplier->ref_supplier;
|
||||
|
|
|
|||
|
|
@ -1879,7 +1879,7 @@ if ($placeid > 0) {
|
|||
$htmlsupplements[$line->fk_parent_line] .= $hookmanager->resPrint;
|
||||
|
||||
if (empty($_SESSION["basiclayout"]) || $_SESSION["basiclayout"] != 1) {
|
||||
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
||||
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.vatrate(price2num($line->remise_percent), true).'</td>';
|
||||
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.$line->qty.'</td>';
|
||||
$htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.price($line->total_ttc).'</td>';
|
||||
}
|
||||
|
|
@ -1994,7 +1994,7 @@ if ($placeid > 0) {
|
|||
if (getDolGlobalInt("TAKEPOS_SHOW_SUBPRICE")) {
|
||||
$htmlforlines .= '<td class="right">'.price($line->subprice).'</td>';
|
||||
}
|
||||
$htmlforlines .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
||||
$htmlforlines .= '<td class="right">'.vatrate(price2num($line->remise_percent), true).'</td>';
|
||||
$htmlforlines .= '<td class="right">';
|
||||
if (isModEnabled('stock') && $user->hasRight('stock', 'mouvement', 'lire')) {
|
||||
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
|
||||
|
|
|
|||
|
|
@ -2911,7 +2911,7 @@ class User extends CommonObject
|
|||
// Info Login
|
||||
$data['opendiv'] = '<div class="centpercent divtooltip">';
|
||||
$data['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("User").'</u> '.$this->getLibStatut(4);
|
||||
$data['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_string_nohtmltag($this->getFullName($langs, ''));
|
||||
$data['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_string_nohtmltag($this->getFullName($langs));
|
||||
if (!empty($this->login)) {
|
||||
$data['login'] = '<br><b>'.$langs->trans('Login').':</b> '.dol_string_nohtmltag($this->login);
|
||||
}
|
||||
|
|
@ -3096,7 +3096,7 @@ class User extends CommonObject
|
|||
if ($mode == 'login') {
|
||||
$result .= dol_string_nohtmltag(dol_trunc($this->login, $maxlen));
|
||||
} else {
|
||||
$result .= dol_string_nohtmltag($this->getFullName($langs, '', ($mode == 'firstelselast' ? 3 : ($mode == 'firstname' ? 2 : -1)), $maxlen));
|
||||
$result .= dol_string_nohtmltag($this->getFullName($langs, 0, ($mode == 'firstelselast' ? 3 : ($mode == 'firstname' ? 2 : -1)), $maxlen));
|
||||
}
|
||||
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
||||
$result .= '</span>';
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ if (!empty($id) || !empty($ref)) {
|
|||
if (empty($positiverates)) {
|
||||
$positiverates = '0';
|
||||
}
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr);
|
||||
echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), true, $object->tva_npr);
|
||||
/*
|
||||
if ($object->default_vat_code)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ class WebPortalMember extends Adherent
|
|||
} elseif ($mode == 'ref') {
|
||||
$result .= $this->ref;
|
||||
} else {
|
||||
$result .= $this->getFullName($langs, '', ($mode == 'firstname' ? 2 : ($mode == 'lastname' ? 4 : -1)), $maxlen);
|
||||
$result .= $this->getFullName($langs, 0, ($mode == 'firstname' ? 2 : ($mode == 'lastname' ? 4 : -1)), $maxlen);
|
||||
}
|
||||
if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
||||
$result .= '</span>';
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ parameters:
|
|||
- '#expects \(callable#'
|
||||
- '#expects bool\|string#'
|
||||
- '#expects bool, int#'
|
||||
- '# (dol_getdate|dol_concatdesc|vatrate) expects bool, string given.#'
|
||||
- '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#'
|
||||
- '# (dolibarr_set_const|yn|getLocalTaxesFromRate) expects int\|string#'
|
||||
- '#::(options)\(\) expects int\|string#'
|
||||
|
|
@ -74,10 +73,9 @@ parameters:
|
|||
- '#color.* expects int, string#'
|
||||
- '#imap.* expects int, string#'
|
||||
- '# (Setup|Asset|Proposals|Orders|Invoices|FactureRec|BonPrelevement|Products|Thirdparties)::_fetch\S*\(\) expects int, string#'
|
||||
- '#(getFullName|sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|buildRumNumber|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#'
|
||||
- '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|buildRumNumber|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#'
|
||||
- '#run_sql expects int, string#'
|
||||
- '#on array{url: mixed} in empty\(\) does not exist.#'
|
||||
- '#dol_copy expects string, int given#'
|
||||
- '#EvalMath::trigger\(\) expects string, int given#'
|
||||
- '#get_next_value expects string, int given#'
|
||||
- '# Diff::generatePartialDiff\(\) expects array#'
|
||||
|
|
@ -95,7 +93,7 @@ parameters:
|
|||
- '# (envoi_mail|sendEmailTo) expects string, \(float\|int\) given.#'
|
||||
- '#::printStdColumnContent\(\) expects string, float(\|(int|array)(\<.*\>)?)* given.#'
|
||||
- '#::HTML2OpenIDServer\(\) expects string, array given.#'
|
||||
- '# (dol_strlen|vatrate) expects string, float(\|(int|array)(\<.*\>)?)* given.#'
|
||||
- '# dol_strlen expects string, float(\|(int|array)(\<.*\>)?)* given.#'
|
||||
- '#create_line\(\) expects string, float given.#'
|
||||
- '# dol_stringtotime expects string, DateTime given.#'
|
||||
- '# (show_ldap_content|projectLinesa) expects string, true given.#'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user