Merge branch '20.0' into fix_v20_pdf_space_lost_with_images

This commit is contained in:
John BOTELLA 2024-10-22 09:01:47 +02:00 committed by GitHub
commit 21aa2f680f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 192 additions and 76 deletions

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2024 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2023 Juanjo Menent <jmenent@2byte.es>
@ -277,6 +277,30 @@ if ($action == 'install' && $allowonlineinstall) {
}
}
/*
if (!$error) {
if (GETPOST('checkforcompliance')) {
$dir = $dirins;
$file = $modulenameval;
// $installedmodule
try {
$res = include_once $dir.$file; // A class already exists in a different file will send a non catchable fatal error.
$modName = substr($file, 0, dol_strlen($file) - 10);
if ($modName) {
if (class_exists($modName)) {
$objMod = new $modName($db);
'@phan-var-force DolibarrModules $objMod';
//var_dump($objMod);
}
}
} catch(Exception $e) {
// Nothing done
}
}
}
*/
if (!$error) {
$message = $langs->trans("SetupIsReadyForUse", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules"));
setEventMessages($message, null, 'warnings');
@ -861,7 +885,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|| getDolGlobalString('CHECKLASTVERSION_EXTERNALMODULE')
)
) {
$checkRes = $objMod->checkForUpdate();
$checkRes = $objMod->checkForUpdate(); // Check for update version
if ($checkRes > 0) {
setEventMessages($objMod->getName().' : '.preg_replace('/[^a-z0-9_\.\-\s]/i', '', $versiontrans).' -> '.preg_replace('/[^a-z0-9_\.\-\s]/i', '', $objMod->lastVersion), null, 'mesgs');
} elseif ($checkRes < 0) {
@ -869,6 +893,14 @@ if ($mode == 'common' || $mode == 'commonkanban') {
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && $action == 'checklastversion' && !getDolGlobalString('DISABLE_CHECK_ON_MALWARE_MODULES')) {
$checkRes = $objMod->checkForCompliance(); // Check if module is reported as non compliant with Dolibarr rules and law
if (!is_numeric($checkRes) && $checkRes != '') {
$langs->load("errors");
setEventMessages($objMod->getName().' : '.$langs->trans($checkRes), null, 'errors');
}
}
// Define imginfo
$imginfo = "info";
if ($objMod->isCoreOrExternalModule() == 'external') {

View file

@ -1366,6 +1366,14 @@ class FactureRec extends CommonInvoice
$facture->multicurrency_tx = $facturerec->multicurrency_tx;
}
if (isset($facture->array_options) && isset($facturerec->array_options)) {
foreach ($facturerec->array_options as $key => $value) {
if (isset($facture->array_options[$key])) {
$facture->array_options[$key] = $value;
}
}
}
$invoiceidgenerated = $facture->create($user);
if ($invoiceidgenerated <= 0) {
$this->errors = $facture->errors;

View file

@ -261,6 +261,7 @@ class DoliDBMysqli extends DoliDB
try {
if (!class_exists('mysqli')) {
dol_print_error(null, 'Driver mysqli for PHP not available');
return false;
}
if (strpos($host, 'ssl://') === 0) {
$tmp = new mysqliDoli($host, $login, $passwd, $name, $port);
@ -1288,38 +1289,41 @@ class DoliDBMysqli extends DoliDB
}
}
/**
* Class to make SSL connection
*/
class mysqliDoli extends mysqli
{
if (class_exists('myslqi')) {
/**
* Constructor.
* This create an opened connection to a database server and eventually to a database
*
* @param string $host Address of database server
* @param string $user Name of database user
* @param string $pass Password of database user
* @param string $name Name of database
* @param int $port Port of database server
* @param string $socket Socket
* Class to make SSL connection
*/
public function __construct($host, $user, $pass, $name, $port = 0, $socket = "")
class mysqliDoli extends mysqli
{
$flags = 0;
if (PHP_VERSION_ID >= 80100) {
parent::__construct();
} else {
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
parent::init();
/**
* Constructor.
* This create an opened connection to a database server and eventually to a database
*
* @param string $host Address of database server
* @param string $user Name of database user
* @param string $pass Password of database user
* @param string $name Name of database
* @param int $port Port of database server
* @param string $socket Socket
*/
public function __construct($host, $user, $pass, $name, $port = 0, $socket = "")
{
$flags = 0;
if (PHP_VERSION_ID >= 80100) {
parent::__construct();
} else {
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
parent::init();
}
if (strpos($host, 'ssl://') === 0) {
$host = substr($host, 6);
parent::options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, false);
// Suppress false positive @phan-suppress-next-line PhanTypeMismatchArgumentInternalProbablyReal
parent::ssl_set(null, null, "", null, null);
$flags = MYSQLI_CLIENT_SSL;
}
parent::real_connect($host, $user, $pass, $name, $port, $socket, $flags);
}
if (strpos($host, 'ssl://') === 0) {
$host = substr($host, 6);
parent::options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, false);
// Suppress false positive @phan-suppress-next-line PhanTypeMismatchArgumentInternalProbablyReal
parent::ssl_set(null, null, "", null, null);
$flags = MYSQLI_CLIENT_SSL;
}
parent::real_connect($host, $user, $pass, $name, $port, $socket, $flags);
}
}

View file

@ -10390,7 +10390,8 @@ function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1'
$forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST', 'ReflectionFunction'));
$forbiddenphpfunctions = array();
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode", "str_rot13", "hex2bin")); // decode string functions used to obfuscated function name
// @phpcs:ignore
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64"."_"."decode", "rawurl"."decode", "url"."decode", "str"."_rot13", "hex"."2bin")); // name of forbidden functions are split to avoid false positive
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "require", "include", "mkdir", "rmdir", "symlink", "touch", "unlink", "umask"));
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("override_function", "session_id", "session_create_id", "session_regenerate_id"));
$forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("get_defined_functions", "get_defined_vars", "get_defined_constants", "get_declared_classes"));

View file

@ -1353,7 +1353,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
if ($bentityon) { // only if entity enable
$maskrefclient_sql .= " AND entity IN (".getEntity($sharetable).")";
} elseif (!empty($forceentity)) {
$sql .= " AND entity IN (".$db->sanitize($forceentity).")";
$maskrefclient_sql .= " AND entity IN (".$db->sanitize($forceentity).")";
}
if ($where) {
$maskrefclient_sql .= $where; //use the same optional where as general mask

View file

@ -2534,10 +2534,12 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
if (count($objects) > 1) {
$order = null;
$refListsTxt = '';
if (empty($object->linkedObjects['commande']) && $object->element != 'commande') {
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :');
$refListsTxt.= $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending").' :';
} else {
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefSending").' :');
$refListsTxt.=$outputlangs->transnoentities("RefSending").' :';
}
// We concat this record info into fields xxx_value. title is overwrote.
foreach ($objects as $elementobject) {
@ -2552,14 +2554,16 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
}
}
}
$refListsTxt.= (!empty($refListsTxt)?' ':'');
if (! is_object($order)) {
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref));
$refListsTxt.= $outputlangs->transnoentities($elementobject->ref);
} else {
$object->note_public = dol_concatdesc($object->note_public, $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : ''));
$object->note_public = dol_concatdesc($object->note_public, ' / '.$outputlangs->transnoentities($elementobject->ref));
$refListsTxt.= $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '');
$refListsTxt.= ' / '.$outputlangs->transnoentities($elementobject->ref);
}
}
$object->note_public = dol_concatdesc($object->note_public, $refListsTxt);
} elseif (count($objects) == 1) {
$elementobject = array_shift($objects);
$order = null;

View file

@ -2634,6 +2634,62 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
return 0;
}
/**
* Check for module compliance with Dolibarr rules and law
* If a module is reported by this function,it is surely a malware. Delete it as soon as possible.
*
* @return int|string Return integer <0 if Error, 0 == not compliant, 'string' with message if module not compliant
*/
public function checkForCompliance()
{
global $conf, $langs;
// Get list of illegal modules name or ID
if (empty($conf->cache['noncompliantmodules'])) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
$urlforblacklistmodules = 'https://ping.dolibarr.org/modules-blacklist.txt';
$result = getURLContent($urlforblacklistmodules, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
if (isset($result['content']) && $result['http_code'] == 200) {
$langs->load("errors");
// Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . -
$arrayoflines = preg_split("/[\n,]/", $result['content']);
foreach ($arrayoflines as $line) {
$tmpfieldsofline = explode(';', $line);
$modulekey = strtolower($tmpfieldsofline[0]);
$conf->cache['noncompliantmodules'][$modulekey]['name'] = $tmpfieldsofline[0];
$conf->cache['noncompliantmodules'][$modulekey]['id'] = $tmpfieldsofline[1];
$conf->cache['noncompliantmodules'][$modulekey]['signature'] = $tmpfieldsofline[2];
$conf->cache['noncompliantmodules'][$modulekey]['message'] = $langs->trans(empty($tmpfieldsofline[3]) ? 'WarningModuleAffiliatedToAReportedCompany' : $tmpfieldsofline[3]);
if (!empty($tmpfieldsofline[4])) {
$message2 = $langs->trans("WarningModuleAffiliatedToAPiratPlatform", '{s}');
$listofillegalurl = '';
foreach (explode(" ", $tmpfieldsofline[4]) as $illegalurl) {
$listofillegalurl .= ($listofillegalurl ? ' '.$langs->trans("or").' ' : '').'<b>'.preg_replace('/[^a-z0-9\.\-]/', '', $illegalurl).'</b>';
}
$message2 = str_replace('{s}', $listofillegalurl, $message2);
$conf->cache['noncompliantmodules'][$modulekey]['message2'] = $message2;
}
}
}
}
if (!empty($conf->cache['noncompliantmodules'])) {
$modulekey = strtolower($this->name);
if (in_array($modulekey, array_keys($conf->cache['noncompliantmodules']))) {
$answer = trim($conf->cache['noncompliantmodules'][$modulekey]['message']);
if (!empty($conf->cache['noncompliantmodules'][$modulekey]['message2'])) {
$answer .= '<br>'.$conf->cache['noncompliantmodules'][$modulekey]['message2'];
}
return $answer;
}
}
return 0;
}
/**
* Helper method to declare dictionaries one at a time (rather than declaring dictionaries property by property).
*

View file

@ -8,7 +8,9 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
* Copyright (C) 2024 Joachim Kueter <git-jk@bloxera.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
@ -557,10 +559,6 @@ class pdf_eratosthene extends ModelePDFCommandes
$posYAfterImage = 0;
$posYAfterDescription = 0;
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $i + 1);
}
if ($this->getColumnStatus('photo')) {
// We start with Photo of product line
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page
@ -644,6 +642,11 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// # of line
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $i + 1);
}
// VAT Rate
if ($this->getColumnStatus('vat')) {
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
@ -1846,7 +1849,7 @@ class pdf_eratosthene extends ModelePDFCommandes
'border-left' => true, // add left line separator
);
if (!getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) {
if (!getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT') && !getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN')) {
$this->cols['vat']['status'] = true;
}

View file

@ -574,10 +574,6 @@ class pdf_espadon extends ModelePdfExpedition
$posYAfterDescription = 0;
$heightforsignature = 0;
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', (string) ($i + 1));
}
if ($this->getColumnStatus('photo')) {
// We start with Photo of product line
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // If photo too high, we moved completely on new page
@ -666,8 +662,12 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// weight
// # of line
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $i + 1);
}
// weight
$weighttxt = '';
if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->weight) {
$weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);

View file

@ -714,10 +714,6 @@ class pdf_sponge extends ModelePDFFactures
$posYAfterImage = 0;
$posYAfterDescription = 0;
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $i + 1);
}
if ($this->getColumnStatus('photo')) {
// We start with Photo of product line
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - $page_bottom_margin)) { // If photo too high, we moved completely on new page
@ -799,6 +795,11 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// # of line
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $i + 1);
}
// VAT Rate
if ($this->getColumnStatus('vat')) {
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
@ -2702,7 +2703,7 @@ class pdf_sponge extends ModelePDFFactures
$this->cols['totalexcltax'] = array(
'rank' => $rank,
'width' => 26, // in mm
'status' => !getDolGlobalString('PDF_PROPAL_HIDE_PRICE_EXCL_TAX') ? true : false,
'status' => !getDolGlobalString('PDF_INVOICE_HIDE_PRICE_EXCL_TAX') ? true : false,
'title' => array(
'textkey' => 'TotalHTShort'
),
@ -2713,7 +2714,7 @@ class pdf_sponge extends ModelePDFFactures
$this->cols['totalincltax'] = array(
'rank' => $rank,
'width' => 26, // in mm
'status' => !getDolGlobalString('PDF_PROPAL_SHOW_PRICE_INCL_TAX') ? false : true,
'status' => !getDolGlobalString('PDF_INVOICE_SHOW_PRICE_INCL_TAX') ? false : true,
'title' => array(
'textkey' => 'TotalTTCShort'
),

View file

@ -1779,7 +1779,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1);
$pdf->SetXY($posx, $tab_top + $tab_hl);
$pdf->SetXY($posx, $tab_top + $tab_hl + 3);
$pdf->MultiCell($largcol, $tab_hl * 3, '', 1, 'R');
if (getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
// Can be retrieve with getSignatureAppearanceArray()

View file

@ -633,7 +633,8 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// Line position
// # of line
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $linePosition);
}
@ -1848,7 +1849,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1);
$pdf->SetXY($posx, $tab_top + $tab_hl);
$pdf->SetXY($posx, $tab_top + $tab_hl + 3);
$pdf->MultiCell($largcol, $tab_hl * 3, '', 1, 'R');
if (getDolGlobalString('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {

View file

@ -519,10 +519,6 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$posYAfterImage = 0;
$posYAfterDescription = 0;
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', (string) ($i + 1));
}
// We start with Photo of product line
if ($this->getColumnStatus('photo')) {
// We start with Photo of product line
@ -549,6 +545,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$posYAfterImage = $curY + $imglinesize['height'];
}
}
// Description of product line
$curX = $this->posxdesc - 1;
$showpricebeforepagebreak = 1;
@ -604,6 +601,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par default
// # of line
if ($this->getColumnStatus('position')) {
$this->printStdColumnContent($pdf, $curY, 'position', $i + 1);
}
// VAT Rate
if ($this->getColumnStatus('vat')) {
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);

View file

@ -542,8 +542,8 @@ if (empty($reshook)) {
$label = ((GETPOST('product_label') && GETPOST('product_label') != $prod->label) ? GETPOST('product_label') : '');
// Update if prices fields are defined
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $prod->id);
$tva_npr = get_default_npr($object->thirdparty, $mysoc, $prod->id);
if (empty($tva_tx)) {
$tva_npr = 0;
}
@ -551,7 +551,7 @@ if (empty($reshook)) {
// Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp'].
$pqp = (GETPOSTINT('pbq') ? GETPOSTINT('pbq') : 0);
$datapriceofproduct = $prod->getSellPrice($mysoc, $object->thirdparty, $pqp);
$datapriceofproduct = $prod->getSellPrice($object->thirdparty, $mysoc, $pqp);
$pu_ht = $datapriceofproduct['pu_ht'];
$pu_ttc = $datapriceofproduct['pu_ttc'];
@ -666,8 +666,8 @@ if (empty($reshook)) {
$buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value
// Local Taxes
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc, $tva_npr);
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr);
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr);
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr);
$info_bits = 0;
if ($tva_npr) {
$info_bits |= 0x01;
@ -1113,7 +1113,7 @@ if ($action == 'create') {
$disableedit = 1;
$disablemove = 1;
$disableremove = 1;
$object->printObjectLines('', $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
$object->printObjectLines('', $object->thirdparty, $mysoc, $lineid, 0); // No date selector for template invoice
}
print "</table>\n";
@ -1613,7 +1613,7 @@ if ($action == 'create') {
$canchangeproduct = 0;
$object->statut = $object->suspended;
$object->printObjectLines($action, $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
$object->printObjectLines($action, $object->thirdparty, $mysoc, $lineid, 0); // No date selector for template invoice
}
// Form to add new line

View file

@ -1,4 +1,4 @@
-- Copyright (C) ---Put here your own copyright and developer email---
-- Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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

View file

@ -1,4 +1,4 @@
-- Copyright (C) 2019 Alicealalalamdskfldmjgdfgdfhfghgfh Adminson <testldr9@dolicloud.com>
-- Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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

View file

@ -1,4 +1,4 @@
-- Copyright (C) 2019 Alicealalalamdskfldmjgdfgdfhfghgfh Adminson <testldr9@dolicloud.com>
-- Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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

View file

@ -390,6 +390,9 @@ WarningReadBankAlsoAllowedIfUserHasPermission=Warning, reading bank account is a
WarningNoDataTransferedInAccountancyYet=Please note, there is no data in the accounting table. Please transfer your data recorded in the application to the accounting section or change the calculation mode to analyze the data recorded outside of accounting.
WarningChangingThisMayBreakStopTaskScheduler=Warning, changing this value may disable the scheduler
WarningAmountOfFileDiffersFromSumOfLines=Warning, amount of file (%s) differs from the sum of lines (%s)
WarningModuleAffiliatedToAReportedCompany=Warning, this module has been reported to the Dolibarr foundation as being published by a company using illegal practices (non-compliance with the rules for using the Dolibarr brand, collecting your data without your consent or deploying malware). Use it at your own risk!
WarningModuleAffiliatedToAPiratPlatform=Be careful when getting a module (paid or free) from a suspicious non official platform like %s
SwissQrOnlyVIR = SwissQR invoice can only be added on invoices set to be paid with credit transfer payments.
SwissQrCreditorAddressInvalid = Creditor address is invalid (are ZIP and city set? (%s)
SwissQrCreditorInformationInvalid = Creditor information is invalid for IBAN (%s): %s

View file

@ -960,8 +960,8 @@ class Project extends CommonObject
'fichinter' => 'fk_projet',
'don' => array('field' => 'fk_projet', 'module' => 'don'),
'actioncomm' => 'fk_project',
'mrp_mo' => 'fk_project',
'entrepot' => 'fk_project'
'mrp_mo' => array('field' => 'fk_project', 'module' => 'mrp'),
'entrepot' => 'fk_project',
);
foreach ($listoftables as $key => $value) {
if (is_array($value)) {

View file

@ -1903,6 +1903,7 @@ while ($i < $imaxinloop) {
$userstatic->user_mobile = $val['user_mobile'];
$userstatic->job = $val['job'];
$userstatic->gender = $val['gender'];
$userstatic->statut = $val['statut'];
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
$j++;
if ($j < $nbofsalesrepresentative) {

View file

@ -597,7 +597,7 @@ function CloseBill() {
if (!empty($conf->global->TAKEPOS_FORBID_SALES_TO_DEFAULT_CUSTOMER)) {
echo "customerAnchorTag = document.querySelector('a[id=\"customer\"]'); ";
echo "if (customerAnchorTag && customerAnchorTag.innerText.trim() === '".$langs->trans("Customer")."') { ";
echo "alert('".$langs->trans("NoClientErrorMessage")."'); ";
echo "alert('".dol_escape_js($langs->trans("NoClientErrorMessage"))."'); ";
echo "return; } \n";
}
?>