From 7a651b50719a74bfcd795b8a59efc18933230f15 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 26 Apr 2019 13:53:22 +0200 Subject: [PATCH 001/126] New: Add ref_client field on template invoice --- .../facture/class/facture-rec.class.php | 6 ++++- htdocs/compta/facture/class/facture.class.php | 1 + htdocs/compta/facture/fiche-rec.php | 22 ++++++++++++++++--- .../install/mysql/migration/9.0.0-10.0.0.sql | 1 + .../install/mysql/tables/llx_facture_rec.sql | 1 + 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 89f324d2450..eba6fa42288 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -77,6 +77,7 @@ class FactureRec extends CommonInvoice public $total; public $db_table; public $propalid; + public $ref_client; public $date_last_gen; public $date_when; @@ -166,6 +167,7 @@ class FactureRec extends CommonInvoice $sql.= ", fk_account"; $sql.= ", fk_cond_reglement"; $sql.= ", fk_mode_reglement"; + $sql.= ", ref_client"; $sql.= ", usenewprice"; $sql.= ", frequency"; $sql.= ", unit_frequency"; @@ -194,6 +196,7 @@ class FactureRec extends CommonInvoice $sql.= ", ".(! empty($facsrc->fk_account)?"'".$facsrc->fk_account."'":"null"); $sql.= ", ".($facsrc->cond_reglement_id > 0 ? $this->db->escape($facsrc->cond_reglement_id) : "null"); $sql.= ", ".($facsrc->mode_reglement_id > 0 ? $this->db->escape($facsrc->mode_reglement_id) : "null"); + $sql.= ",'".$this->db->escape($this->ref_client)."'"; $sql.= ", ".$this->usenewprice; $sql.= ", ".$this->frequency; $sql.= ", '".$this->db->escape($this->unit_frequency)."'"; @@ -382,7 +385,7 @@ class FactureRec extends CommonInvoice $sql.= ', f.note_private, f.note_public, f.fk_user_author'; $sql.= ', f.modelpdf'; $sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project'; - $sql.= ', f.fk_account'; + $sql.= ', f.fk_account, f.ref_client'; $sql.= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.usenewprice, f.auto_validate'; $sql.= ', f.generate_pdf'; $sql.= ", f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc"; @@ -1127,6 +1130,7 @@ class FactureRec extends CommonInvoice $facture->brouillon = 1; $facture->date = (empty($facturerec->date_when)?$now:$facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later. $facture->socid = $facturerec->socid; + $facture->ref_client = $facturerec->ref_client; $invoiceidgenerated = $facture->create($user); if ($invoiceidgenerated <= 0) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c2dc89c903e..9e9005d471d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -358,6 +358,7 @@ class Facture extends CommonInvoice $this->socid = $_facrec->socid; // Invoice created on same thirdparty than template $this->entity = $_facrec->entity; // Invoice created in same entity than template + $this->ref_client = $_facrec->ref_client; // Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI $this->fk_project = GETPOST('projectid', 'int') > 0 ? ((int) GETPOST('projectid', 'int')) : $_facrec->fk_project; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index fa8af87ac29..25144edbcb3 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -174,6 +174,7 @@ if (empty($reshook)) if (! $error) { $object->titre = GETPOST('titre', 'alpha'); + $object->ref_client = GETPOST('ref_client', 'alpha'); $object->note_private = GETPOST('note_private', 'none'); $object->note_public = GETPOST('note_public', 'none'); $object->modelpdf = GETPOST('modelpdf', 'alpha'); @@ -274,7 +275,7 @@ if (empty($reshook)) { $object->setProject(GETPOST('projectid', 'int')); } - // Set bank account + // Set titre elseif ($action == 'setref' && $user->rights->facture->creer) { //var_dump(GETPOST('ref', 'alpha'));exit; @@ -286,6 +287,15 @@ if (empty($reshook)) } else dol_print_error($db, $object->error, $object->errors); } + elseif ($action == 'setref_client' && $user->rights->facture->creer) + { + $result=$object->setValueFrom('ref_client', GETPOST('ref_client', 'alpha'), '', null, 'text', '', $user, 'BILLREC_MODIFY'); + if ($result > 0) + { + $object->ref_client = GETPOST('ref_client', 'alpha'); + } + else dol_print_error($db, $object->error, $object->errors); + } // Set bank account elseif ($action == 'setbankaccount' && $user->rights->facture->creer) { @@ -997,6 +1007,11 @@ if ($action == 'create') print ''; print ''; + // Ref Client + print ''.$langs->trans("RefCustomer").''; + print ''; + print ''; + // Third party print ''.$langs->trans("Customer").''.$object->thirdparty->getNomUrl(1, 'customer').''; print ''; @@ -1229,8 +1244,9 @@ else $morehtmlref.='
'; // Ref customer - //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', 0, 1); - //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1); + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1); + $morehtmlref.='
'; // Thirdparty $morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 9aa395c22d6..49a19de5316 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -297,3 +297,4 @@ ALTER TABLE llx_inventorydet DROP COLUMN pmp; ALTER TABLE llx_inventorydet DROP COLUMN pa; ALTER TABLE llx_inventorydet DROP COLUMN new_pmp; +ALTER TABLE llx_facture_rec ADD COLUMN ref_client varchar(255) after suspended; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index 1add07c6e8c..2c1c2514488 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -29,6 +29,7 @@ create table llx_facture_rec tms timestamp, -- date creation/modification suspended integer DEFAULT 0, -- 1=suspended + ref_client varchar(255), -- reference for customer amount double(24,8) DEFAULT 0 NOT NULL, remise real DEFAULT 0, From be17e31be18e8bf2e126262f870b6b724b679a0b Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 2 May 2019 11:04:55 +0200 Subject: [PATCH 002/126] New: Add ref_client field on template invoice --- htdocs/compta/facture/fiche-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 25144edbcb3..fa71bdd7f2e 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1009,7 +1009,7 @@ if ($action == 'create') // Ref Client print ''.$langs->trans("RefCustomer").''; - print ''; + print ''; print ''; // Third party From d810e11c4ed967fff1533e003d6567504b31ab2e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 19:23:32 +0200 Subject: [PATCH 003/126] Update fiche-rec.php --- htdocs/compta/facture/fiche-rec.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index fa71bdd7f2e..c9ee6e592ee 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -275,7 +275,7 @@ if (empty($reshook)) { $object->setProject(GETPOST('projectid', 'int')); } - // Set titre + // Set title/label of template invoice elseif ($action == 'setref' && $user->rights->facture->creer) { //var_dump(GETPOST('ref', 'alpha'));exit; From 9db2e272895dbb7b30182f7b726a2c86c93a497d Mon Sep 17 00:00:00 2001 From: ATM john Date: Tue, 10 Sep 2019 21:47:08 +0200 Subject: [PATCH 004/126] add widget box for supplier orders awaiting reception --- ...box_supplier_orders_awaiting_reception.php | 198 ++++++++++++++++++ htdocs/core/modules/modFournisseur.class.php | 1 + htdocs/langs/en_US/boxes.lang | 1 + 3 files changed, 200 insertions(+) create mode 100644 htdocs/core/boxes/box_supplier_orders_awaiting_reception.php diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php new file mode 100644 index 00000000000..bba7e6557de --- /dev/null +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -0,0 +1,198 @@ + + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2012 Raphaƫl Doursenaud + * Copyright (C) 2015 Frederic France + * + * 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 + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/boxes/box_supplier_orders.php + * \ingroup fournisseurs + * \brief Module that generates the latest supplier orders box + */ +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; + +/** + * Class that manages the box showing latest supplier orders + */ +class box_supplier_orders_awaiting_reception extends ModeleBoxes +{ + + public $boxcode = "supplierordersawaitingreception"; + public $boximg = "object_order"; + public $boxlabel="BoxLatestSupplierOrdersAwaitingReception"; + public $depends = array("fournisseur"); + + /** + * @var DoliDB Database handler. + */ + public $db; + + public $param; + public $info_box_head = array(); + public $info_box_contents = array(); + + + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + public function __construct($db, $param) + { + global $user; + + $this->db = $db; + + $this->hidden = ! ($user->rights->fournisseur->commande->lire); + } + + /** + * Load data into info_box_contents array to show array later. + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf, $user, $langs, $db; + $langs->loadLangs(array("boxes", "sendings")); + + $this->max = $max; + + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; + $supplierorderstatic=new CommandeFournisseur($db); + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; + $thirdpartytmp = new Fournisseur($db); + + $this->info_box_head = array('text' => $langs->trans("BoxTitleSupplierOrdersAwaitingReception", $max)); + + if ($user->rights->fournisseur->commande->lire) + { + $sql = "SELECT s.nom as name, s.rowid as socid,"; + $sql.= " s.code_client, s.code_fournisseur,"; + $sql.= " s.logo,"; + $sql.= " c.rowid, c.ref, c.tms, c.date_commande, c.date_livraison, "; + $sql.= " c.total_ht,"; + $sql.= " c.tva as total_tva,"; + $sql.= " c.total_ttc,"; + $sql.= " c.fk_statut"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE c.fk_soc = s.rowid"; + $sql.= " AND c.entity = ".$conf->entity; + + $sql.= " AND c.fk_statut = ".CommandeFournisseur::STATUS_ORDERSENT; + if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($user->socid) $sql.= " AND s.rowid = ".$user->socid; + if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_commande DESC, c.ref DESC "; + else $sql.= " ORDER BY c.date_livraison ASC, c.fk_statut ASC "; + $sql.= $db->plimit($max, 0); + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + + $line = 0; + while ($line < $num) { + $objp = $db->fetch_object($result); + $date=$db->jdate($objp->date_commande); + $date_livraison=$db->jdate($objp->date_livraison); + $datem=$db->jdate($objp->tms); + + $supplierorderstatic->date_livraison = $date_livraison; + $supplierorderstatic->statut = $objp->fk_statut; + + $supplierorderstatic->id = $objp->rowid; + $supplierorderstatic->ref = $objp->ref; + + $thirdpartytmp->id = $objp->socid; + $thirdpartytmp->name = $objp->name; + $thirdpartytmp->fournisseur = 1; + $thirdpartytmp->code_fournisseur = $objp->code_fournisseur; + $thirdpartytmp->logo = $objp->logo; + + $this->info_box_contents[$line][] = array( + 'td' => '', + 'text' => $supplierorderstatic->getNomUrl(1), + 'asis' => 1 + ); + + $this->info_box_contents[$line][] = array( + 'td' => '', + 'text' => $thirdpartytmp->getNomUrl(1, 'supplier'), + 'asis' => 1, + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right nowrap"', + 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), + ); + + $delayIcon = ''; + if ($supplierorderstatic->hasDelay()) { + $delayIcon = img_warning($langs->trans("Late")); + } + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right"', + 'text' => $delayIcon.' '. dol_print_date($date_livraison, 'day').'', + 'asis' => 1 + ); + + $line++; + } + + if ($num == 0) + $this->info_box_contents[$line][] = array( + 'td' => 'class="center"', + 'text' => $langs->trans("NoSupplierOrder"), + ); + + $db->free($result); + } else { + $this->info_box_contents[0][] = array( + 'td' => '', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } + else + { + $this->info_box_contents[0][] = array( + 'td' => 'class="nohover opacitymedium left"', + 'text' => $langs->trans("ReadPermissionNotAllowed") + ); + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 0553fe3a1fa..3cc418f7d36 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -126,6 +126,7 @@ class modFournisseur extends DolibarrModules 3=>array('file'=>'box_factures_fourn_imp.php','enabledbydefaulton'=>'Home'), 4=>array('file'=>'box_factures_fourn.php','enabledbydefaulton'=>'Home'), 5=>array('file'=>'box_supplier_orders.php','enabledbydefaulton'=>'Home'), + 6=>array('file'=>'box_supplier_orders_awaiting_reception.php','enabledbydefaulton'=>'Home'), ); // Permissions diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index b1ab8e41fbc..3cf7ea24493 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -34,6 +34,7 @@ BoxTitleLastFicheInter=Latest %s modified interventions BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid BoxTitleCurrentAccounts=Open Accounts: balances +BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified BoxMyLastBookmarks=Bookmarks: latest %s BoxOldestExpiredServices=Oldest active expired services From 337194023abdd2125c9f9d4fcd9c0c9938438fe5 Mon Sep 17 00:00:00 2001 From: ATM john Date: Tue, 10 Sep 2019 22:10:20 +0200 Subject: [PATCH 005/126] Add purchase orders awaiting reception to workboard --- .../fourn/class/fournisseur.commande.class.php | 18 +++++++++++++++--- htdocs/index.php | 5 +++-- htdocs/langs/en_US/orders.lang | 2 ++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 64c7ca73b7b..b3e81247f90 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2804,9 +2804,10 @@ class CommandeFournisseur extends CommonOrder * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @param User $user Objet user + * @param int $mode "opened", "awaiting" for orders awaiting reception * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - public function load_board($user) + public function load_board($user, $mode = 'opened') { // phpcs:enable global $conf, $langs; @@ -2822,7 +2823,12 @@ class CommandeFournisseur extends CommonOrder $clause = " AND"; } $sql.= $clause." c.entity = ".$conf->entity; - $sql.= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; + if($mode==='awaiting'){ + $sql.= " AND c.fk_statut = ".self::STATUS_ORDERSENT; + } + else{ + $sql.= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; + } if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; $resql=$this->db->query($sql); @@ -2834,9 +2840,15 @@ class CommandeFournisseur extends CommonOrder $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SuppliersOrdersToProcess"); $response->labelShort=$langs->trans("Opened"); - $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2&mainmenu=commercial&leftmenu=orders_suppliers'; $response->img=img_object('', "order"); + if($mode==='awaiting'){ + $response->label=$langs->trans("SuppliersOrdersAwaitingReception"); + $response->labelShort=$langs->trans("AwaitingReception"); + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=3&mainmenu=commercial&leftmenu=orders_suppliers'; + } + while ($obj=$this->db->fetch_object($resql)) { $response->nbtodo++; diff --git a/htdocs/index.php b/htdocs/index.php index d50b5248fab..ed5bd362911 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -425,7 +425,8 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) { include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php'; $board = new CommandeFournisseur($db); - $dashboardlines[$board->element] = $board->load_board($user); + $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); + $dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting'); } // Number of services enabled (delayed) @@ -550,7 +551,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { array( 'groupName' => 'SuppliersOrders', 'stats' => - array('order_supplier'), + array('order_supplier_opened', 'order_supplier_awaiting'), ), 'invoice_supplier' => array( diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 3197cc12bca..ec6ab48e413 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -25,6 +25,8 @@ OrdersToBill=Sales orders delivered OrdersInProcess=Sales orders in process OrdersToProcess=Sales orders to process SuppliersOrdersToProcess=Purchase orders to process +SuppliersOrdersAwaitingReception=Purchase orders awaiting reception +AwaitingReception=Awaiting reception StatusOrderCanceledShort=Canceled StatusOrderDraftShort=Draft StatusOrderValidatedShort=Validated From 6e806a5aed63476c464c5e58c0aad80388c44e59 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Mon, 16 Sep 2019 10:37:55 +0200 Subject: [PATCH 006/126] FIX empty cache when we want to load specific warehouses in select --- htdocs/product/class/html.formproduct.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index e356226dd2f..56d5b4bea74 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -243,6 +243,7 @@ class FormProduct $out=''; if (empty($conf->global->ENTREPOT_EXTRA_STATUS)) $filterstatus = ''; + if (!empty($fk_product)) $this->cache_warehouses = array(); $this->loadWarehouses($fk_product, '', $filterstatus, true, $exclude, $stockMin, $orderBy); $nbofwarehouses=count($this->cache_warehouses); From 1c5a5eb5938aef26e2143a40b119d0fe99e8b140 Mon Sep 17 00:00:00 2001 From: Daniel Seichter Date: Mon, 16 Sep 2019 13:24:21 +0200 Subject: [PATCH 007/126] Added hint for setting up database (issue #11815) --- build/docker/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/docker/README.md b/build/docker/README.md index 5a0997cf121..616cbd8fa78 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -23,3 +23,6 @@ The URL to go to the Dolibarr is : The URL to go to PhpMyAdmin is (login/password is root/root) : http://0.0.0.0:8080 + +Setup the database connection during the installation process, please use mariad +b (name of the database container) as database host. From 555ea977c9e3a5758b94dcaa9088acd186264808 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Mon, 16 Sep 2019 15:32:31 +0200 Subject: [PATCH 008/126] NEW Add units in select products lines --- htdocs/core/class/html.form.class.php | 132 +++++++++++++++++++++----- 1 file changed, 106 insertions(+), 26 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c470231e5de..52be1cec2b0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2064,6 +2064,11 @@ class Form $out=''; $outarray=array(); + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $langs->load('other'); + } + $warehouseStatusArray = array(); if (! empty($warehouseStatus)) { @@ -2114,7 +2119,7 @@ class Form } // Units if (! empty($conf->global->PRODUCT_USE_UNITS)) { - $sql .= ', u.label as unit_long, u.short_label as unit_short'; + $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; $selectFields .= ', unit_long, unit_short'; } @@ -2408,6 +2413,42 @@ class Form $outdurationvalue=$outtype == Product::TYPE_SERVICE?substr($objp->duration, 0, dol_strlen($objp->duration)-1):''; $outdurationunit=$outtype == Product::TYPE_SERVICE?substr($objp->duration, -1):''; + // Units + $outvalUnits = ''; + if ($conf->global->PRODUCT_USE_UNITS) { + if (!empty($objp->unit_short)) { + $outvalUnits .= ' - ' . $objp->unit_short; + } + if (!empty($objp->weight)) { + $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); + $outvalUnits .= ' - ' . $unitToShow; + } + if (!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) { + $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuring_units_string($objp->length_units, 'size'); + $outvalUnits .= ' - ' . $unitToShow; + } + if (!empty($objp->surface)) { + $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); + $outvalUnits .= ' - ' . $unitToShow; + } + if (!empty($objp->volume)) { + $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); + $outvalUnits .= ' - ' . $unitToShow; + } + if ($outdurationvalue && $outdurationunit) { + $da = array( + 'h' => $langs->trans('Hour'), + 'd' => $langs->trans('Day'), + 'w' => $langs->trans('Week'), + 'm' => $langs->trans('Month'), + 'y' => $langs->trans('Year') + ); + if (isset($da[$outdurationunit])) { + $outvalUnits .= ' - ' . $outdurationvalue . ' ' . $langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); + } + } + } + $opt = '\n"; $optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>price2num($outprice_ht), 'price_ttc'=>price2num($outprice_ttc), 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit); } @@ -2679,16 +2708,28 @@ class Form $outarray=array(); $langs->load('stocks'); + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $langs->load('other'); + } $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration, p.fk_product_type,"; $sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice,"; $sql.= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.fk_soc, s.nom as name,"; $sql.= " pfp.supplier_reputation"; + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; + } if (! empty($conf->barcode->enabled)) $sql.= " ,pfp.barcode"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; if ($socid) $sql.= " AND pfp.fk_soc = ".$socid; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_units u ON u.rowid = p.fk_unit"; + } $sql.= " WHERE p.entity IN (".getEntity('product').")"; $sql.= " AND p.tobuy = 1"; if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$this->db->escape($filtertype); @@ -2749,6 +2790,42 @@ class Form $outdurationvalue=$outtype == Product::TYPE_SERVICE?substr($objp->duration, 0, dol_strlen($objp->duration)-1):''; $outdurationunit=$outtype == Product::TYPE_SERVICE?substr($objp->duration, -1):''; + // Units + $outvalUnits = ''; + if ($conf->global->PRODUCT_USE_UNITS) { + if (!empty($objp->unit_short)) { + $outvalUnits .= ' - ' . $objp->unit_short; + } + if (!empty($objp->weight)) { + $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); + $outvalUnits .= ' - ' . $unitToShow; + } + if (!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) { + $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuring_units_string($objp->length_units, 'size'); + $outvalUnits .= ' - ' . $unitToShow; + } + if (!empty($objp->surface)) { + $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); + $outvalUnits .= ' - ' . $unitToShow; + } + if (!empty($objp->volume)) { + $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); + $outvalUnits .= ' - ' . $unitToShow; + } + if ($outdurationvalue && $outdurationunit) { + $da = array( + 'h' => $langs->trans('Hour'), + 'd' => $langs->trans('Day'), + 'w' => $langs->trans('Week'), + 'm' => $langs->trans('Month'), + 'y' => $langs->trans('Year') + ); + if (isset($da[$outdurationunit])) { + $outvalUnits .= ' - ' . $outdurationvalue . ' ' . $langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); + } + } + } + $opt = '\n"; From 8d7d14c7305c74df7708c842d659e923614ff523 Mon Sep 17 00:00:00 2001 From: madx666 Date: Mon, 16 Sep 2019 15:39:58 +0200 Subject: [PATCH 009/126] Fix return to list on page 1 When are on page 1 on any list and we go on an object, when return to the list, we are back on page 0 --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 014ca843236..1c0b86dff88 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -748,7 +748,7 @@ if (! defined('NOLOGIN')) $_SESSION['lastsearch_contextpage_'.$relativepathstring]=$_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]); } - if (! empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 1) + if (! empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 0) { $_SESSION['lastsearch_page_'.$relativepathstring]=$_SESSION['lastsearch_page_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_page_tmp_'.$relativepathstring]); @@ -2271,7 +2271,7 @@ if (! function_exists("llxFooter")) unset($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]); if (! empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]=$contextpage; - if (! empty($page) && $page > 1) $_SESSION['lastsearch_page_tmp_'.$relativepathstring]=$page; + if (! empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring]=$page; if (! empty($limit) && $limit != $conf->limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring]=$limit; unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]); From 872f5ed85f8f0a298faaa49d33f856914c65de14 Mon Sep 17 00:00:00 2001 From: John Botella Date: Mon, 16 Sep 2019 16:49:08 +0200 Subject: [PATCH 010/126] fix_missing_expedition_table_line_tag --- htdocs/expedition/card.php | 53 ++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4202607cbd2..cab0ec3a189 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2036,27 +2036,28 @@ elseif ($id || $ref) print '
'; print '
'; - print ''; + print '
'; + print ''; print ''; // Adds a line numbering column if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ''; + print ''; } // Product/Service - print ''; + print ''; // Qty - print ''; + print ''; if ($origin && $origin_id > 0) { - print ''; + print ''; } if ($action == 'editline') { $editColspan = 3; if (empty($conf->stock->enabled)) $editColspan--; if (empty($conf->productbatch->enabled)) $editColspan--; - print ''; + print ''; } else { - print ''; + print ''; } if (! empty($conf->stock->enabled)) { - print ''; + print ''; } if (! empty($conf->productbatch->enabled)) { - print ''; + print ''; } } - print ''; - print ''; + print ''; + print ''; //print ''; if ($object->statut == 0) { @@ -2104,7 +2105,7 @@ elseif ($id || $ref) print ''; } print "\n"; - + print ''; $var=false; if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) @@ -2164,6 +2165,7 @@ elseif ($id || $ref) //var_dump($alreadysent); } + print ''; // Loop on each product to send/sent for ($i = 0 ; $i < $num_prod ; $i++) { @@ -2174,12 +2176,12 @@ elseif ($id || $ref) if(empty($reshook)) { print ''; // id of order line - print ''; + print ''; // # if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ''; + print ''; } // Predefined product or service @@ -2195,7 +2197,7 @@ elseif ($id || $ref) else $label = (! empty($lines[$i]->label)?$lines[$i]->label:$lines[$i]->product_label); - print ''; + print ''; // Qty in other shipments (with shipment and warehouse used) if ($origin && $origin_id > 0) { - print ''; + print ''; // Warehouse source if (! empty($conf->stock->enabled)) { - print ''; } else { - print ''; + print ''; } } } // Weight - print ''; // Volume - print ''; @@ -2473,6 +2475,7 @@ elseif ($id || $ref) // TODO Show also lines ordered but not delivered print "
  '.$langs->trans("Products").''.$langs->trans("Products").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyInOtherShipments").''.$langs->trans("QtyInOtherShipments").''; + print ''; if ($object->statut <= 1) { print $langs->trans("QtyToShip").' - '; @@ -2079,24 +2080,24 @@ elseif ($id || $ref) { if ($object->statut <= 1) { - print ''.$langs->trans("QtyToShip").''.$langs->trans("QtyToShip").''.$langs->trans("QtyShipped").''.$langs->trans("QtyShipped").''.$langs->trans("WarehouseSource").''.$langs->trans("WarehouseSource").''.$langs->trans("Batch").''.$langs->trans("Batch").''.$langs->trans("CalculatedWeight").''.$langs->trans("CalculatedVolume").''.$langs->trans("CalculatedWeight").''.$langs->trans("CalculatedVolume").''.$langs->trans("Size").'
'.($i+1).''.($i+1).''; + print ''; // Show product and description $product_static->type=$lines[$i]->fk_product_type; @@ -2215,7 +2217,7 @@ elseif ($id || $ref) } else { - print ""; + print ''; if ($lines[$i]->product_type == Product::TYPE_SERVICE) $text = img_object($langs->trans('Service'), 'service'); else $text = img_object($langs->trans('Product'), 'product'); @@ -2231,12 +2233,12 @@ elseif ($id || $ref) } // Qty ordered - print ''.$lines[$i]->qty_asked.''.$lines[$i]->qty_asked.''; + print ''; foreach ($alreadysent as $key => $val) { if ($lines[$i]->fk_origin_line == $key) @@ -2350,12 +2352,12 @@ elseif ($id || $ref) else { // Qty to ship or shipped - print ''.$lines[$i]->qty_shipped.''.$lines[$i]->qty_shipped.''; + print ''; if ($lines[$i]->entrepot_id > 0) { $entrepot = new Entrepot($db); @@ -2385,7 +2387,7 @@ elseif ($id || $ref) if (isset($lines[$i]->detail_batch)) { print ''; - print ''; + print ''; if ($lines[$i]->product_tobatch) { $detail = ''; @@ -2405,19 +2407,19 @@ elseif ($id || $ref) } print ''; + print ''; if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units, "weight"); else print ' '; print ''; + print ''; if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units, "volume"); else print ' '; print '
\n"; + print ''; print '
'; } From 5c00712c0a142d1a472c469845c872f67e1f1663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Sep 2019 17:57:40 +0200 Subject: [PATCH 011/126] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 86d02bcf22c..f018bdefe53 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3015,7 +3015,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) if (empty($srconly) && in_array($pictowithoutext, array( 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', - 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', + 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow',, '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', 'jabber','skype','twitter','facebook','linkedin', 'chevron-left','chevron-right','chevron-down','chevron-top' ) From e43f3a0f58d03864e3fd4dd47c1d9a4b4b77f7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Sep 2019 18:07:06 +0200 Subject: [PATCH 012/126] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f018bdefe53..ad72b8cf22e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3015,7 +3015,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) if (empty($srconly) && in_array($pictowithoutext, array( 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', - 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow',, '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', + 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', 'jabber','skype','twitter','facebook','linkedin', 'chevron-left','chevron-right','chevron-down','chevron-top' ) From 67b73cf0e6a6f731f340c0c5141615b966019028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Sep 2019 20:57:20 +0200 Subject: [PATCH 013/126] Update actioncomm.class.php --- htdocs/comm/action/class/actioncomm.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 12926f9b360..7e8bd88e5bc 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -772,6 +772,7 @@ class ActionComm extends CommonObject $error=0; $this->db->begin(); + $this->oldcopy = clone $this; $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; From f369c1a80a41dfa032dd875add059edd7a87dcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Sep 2019 20:59:13 +0200 Subject: [PATCH 014/126] Update card.php --- htdocs/comm/action/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 173770d725c..b2438175123 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -608,6 +608,7 @@ if ($action == 'update') if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') { $object->fetch($id); + $object->fetch_optionals(); if ($user->rights->agenda->myactions->delete || $user->rights->agenda->allactions->delete) From fb7ef3cefc6ca9765e0e4db5f8058ea390d6c63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Sep 2019 23:12:11 +0200 Subject: [PATCH 015/126] Update card.php --- htdocs/comm/action/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index b2438175123..1df5c06f51f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -421,6 +421,7 @@ if ($action == 'update') if ($p2min == -1) $p2min='0'; $object->fetch($id); + $object->fetch_optionals(); $object->fetch_userassigned(); $datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); From a2d3cde2915aee620e791a5472420e3a0c75cd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 07:59:46 +0200 Subject: [PATCH 016/126] some update after night --- htdocs/comm/action/card.php | 6 +++++- htdocs/comm/action/class/actioncomm.class.php | 1 - htdocs/comm/action/class/api_agendaevents.class.php | 12 +++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 1df5c06f51f..4eeb87a5b61 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -422,7 +422,9 @@ if ($action == 'update') $object->fetch($id); $object->fetch_optionals(); - $object->fetch_userassigned(); + $object->fetch_userassigned(); + $object->oldcopy = clone $object; + $datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); $datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); @@ -610,6 +612,8 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') { $object->fetch($id); $object->fetch_optionals(); + $object->fetch_userassigned(); + $object->oldcopy = clone $object; if ($user->rights->agenda->myactions->delete || $user->rights->agenda->allactions->delete) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 7e8bd88e5bc..12926f9b360 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -772,7 +772,6 @@ class ActionComm extends CommonObject $error=0; $this->db->begin(); - $this->oldcopy = clone $this; $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 833f97b3b6b..53d0ad61b90 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -237,6 +237,11 @@ class AgendaEvents extends DolibarrApi } $result = $this->actioncomm->fetch($id); + if ($result) { + $this->actioncomm->fetch_optionals(); + $this->actioncomm->fetch_userassigned(); + $this->actioncomm->oldcopy = clone $this->actioncomm; + } if ( ! $result ) { throw new RestException(404, 'actioncomm not found'); } @@ -269,7 +274,12 @@ class AgendaEvents extends DolibarrApi throw new RestException(401, "Insuffisant rights to delete your Agenda Event"); } - $result = $this->actioncomm->fetch($id); + $result = $this->actioncomm->fetch($id); + if ($result) { + $this->actioncomm->fetch_optionals(); + $this->actioncomm->fetch_userassigned(); + $this->actioncomm->oldcopy = clone $this->actioncomm; + } if(! DolibarrApiAccess::$user->rights->agenda->allactions->delete && DolibarrApiAccess::$user->id != $this->actioncomm->userownerid) { throw new RestException(401, "Insuffisant rights to delete an Agenda Event of owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); From ecac1f9f404f5640ab502ff2fe43050c84d928e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 08:02:55 +0200 Subject: [PATCH 017/126] wip --- htdocs/comm/action/class/api_agendaevents.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 53d0ad61b90..3f21e94f53d 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -274,7 +274,7 @@ class AgendaEvents extends DolibarrApi throw new RestException(401, "Insuffisant rights to delete your Agenda Event"); } - $result = $this->actioncomm->fetch($id); + $result = $this->actioncomm->fetch($id); if ($result) { $this->actioncomm->fetch_optionals(); $this->actioncomm->fetch_userassigned(); From 0d63c43ccd239b116b9c0283ddd79ec29f911570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 08:15:01 +0200 Subject: [PATCH 018/126] add doaction to actioncommcard --- htdocs/comm/action/card.php | 49 +++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 003203940a8..31b2f22a194 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -86,6 +86,18 @@ $form = new Form($db); $formfile = new FormFile($db); $formactions = new FormActions($db); +// Load object +if ($id > 0 && $action!='add') { + $ret = $object->fetch($id); + if ($ret > 0) { + $ret = $object->fetch_optionals(); + $ret1 = $object->fetch_userassigned(); + } + if ($ret < 0 || $ret1 < 0) { + dol_print_error('', $object->error); + } +} + // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); @@ -94,6 +106,9 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('actioncard','globalcard')); +$parameters = array('socid' => $socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); /* * Actions @@ -101,7 +116,7 @@ $hookmanager->initHooks(array('actioncard','globalcard')); $listUserAssignedUpdated = false; // Remove user to assigned list -if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') +if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')) { $idtoremove=GETPOST('removedassigned'); @@ -122,7 +137,7 @@ if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') } // Add user to assigned list -if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) +if (empty($reshook) && (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))) { // Add a new user if (GETPOST('assignedtouser') > 0) @@ -143,15 +158,15 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) } // Link to a project -if ($action == 'classin' && ($user->rights->agenda->allactions->create || +if (empty($reshook) && $action == 'classin' && ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))) { - $object->fetch($id); + //$object->fetch($id); $object->setProject(GETPOST('projectid', 'int')); } // Action clone object -if ($action == 'confirm_clone' && $confirm == 'yes') +if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes') { if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) { @@ -160,7 +175,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') else { if ($id > 0) { - $object->fetch($id); + //$object->fetch($id); if (!empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); $object->contactid = key($object->socpeopleassigned); @@ -178,7 +193,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') } // Add event -if ($action == 'add') +if (empty($reshook) && $action == 'add') { $error=0; @@ -403,7 +418,7 @@ if ($action == 'add') /* * Action update event */ -if ($action == 'update') +if (empty($reshook) && $action == 'update') { if (empty($cancel)) { @@ -420,8 +435,8 @@ if ($action == 'update') if ($p2hour == -1) $p2hour='0'; if ($p2min == -1) $p2min='0'; - $object->fetch($id); - $object->fetch_userassigned(); + //$object->fetch($id); + //$object->fetch_userassigned(); $datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); $datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); @@ -546,9 +561,9 @@ if ($action == 'update') /* * delete event */ -if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') +if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes') { - $object->fetch($id); + //$object->fetch($id); if ($user->rights->agenda->myactions->delete || $user->rights->agenda->allactions->delete) @@ -571,10 +586,10 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') * Action move update, used when user move an event in calendar by drag'n drop * TODO Move this into page comm/action/index that trigger this call by the drag and drop of event. */ -if (GETPOST('actionmove', 'alpha') == 'mupdate') +if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') { - $object->fetch($id); - $object->fetch_userassigned(); + //$object->fetch($id); + //$object->fetch_userassigned(); $shour = dol_print_date($object->datep, "%H"); $smin = dol_print_date($object->datep, "%M"); @@ -614,7 +629,9 @@ if (GETPOST('actionmove', 'alpha') == 'mupdate') // Actions to delete doc $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref); $permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read)); -include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; +if (empty($reshook) { + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; +} /* From 155e8fb50083934adca79862db73d0de76d137b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 08:18:01 +0200 Subject: [PATCH 019/126] fix syntax --- htdocs/comm/action/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 31b2f22a194..6418869bf1d 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -629,7 +629,7 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') // Actions to delete doc $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref); $permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read)); -if (empty($reshook) { +if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } From e4984492b3173a053362da42bd11f59b7d511ed4 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 17 Sep 2019 09:32:43 +0200 Subject: [PATCH 020/126] Dejarlo igual que develop --- htdocs/compta/facture/class/facture-rec.class.php | 6 +----- htdocs/compta/facture/class/facture.class.php | 1 - htdocs/install/mysql/tables/llx_facture_rec.sql | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 57ecc836acf..37a031198bc 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -77,7 +77,6 @@ class FactureRec extends CommonInvoice public $total; public $db_table; public $propalid; - public $ref_client; public $date_last_gen; public $date_when; @@ -168,7 +167,6 @@ class FactureRec extends CommonInvoice $sql.= ", fk_account"; $sql.= ", fk_cond_reglement"; $sql.= ", fk_mode_reglement"; - $sql.= ", ref_client"; $sql.= ", usenewprice"; $sql.= ", frequency"; $sql.= ", unit_frequency"; @@ -197,7 +195,6 @@ class FactureRec extends CommonInvoice $sql.= ", ".(! empty($facsrc->fk_account)?"'".$facsrc->fk_account."'":"null"); $sql.= ", ".($facsrc->cond_reglement_id > 0 ? $this->db->escape($facsrc->cond_reglement_id) : "null"); $sql.= ", ".($facsrc->mode_reglement_id > 0 ? $this->db->escape($facsrc->mode_reglement_id) : "null"); - $sql.= ",'".$this->db->escape($this->ref_client)."'"; $sql.= ", ".$this->usenewprice; $sql.= ", ".$this->frequency; $sql.= ", '".$this->db->escape($this->unit_frequency)."'"; @@ -386,7 +383,7 @@ class FactureRec extends CommonInvoice $sql.= ', f.note_private, f.note_public, f.fk_user_author'; $sql.= ', f.modelpdf'; $sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project'; - $sql.= ', f.fk_account, f.ref_client'; + $sql.= ', f.fk_account'; $sql.= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.usenewprice, f.auto_validate'; $sql.= ', f.generate_pdf'; $sql.= ", f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc"; @@ -1147,7 +1144,6 @@ class FactureRec extends CommonInvoice $facture->brouillon = 1; $facture->date = (empty($facturerec->date_when)?$now:$facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later. $facture->socid = $facturerec->socid; - $facture->ref_client = $facturerec->ref_client; $invoiceidgenerated = $facture->create($user); if ($invoiceidgenerated <= 0) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 70ecf6500f5..131f0ee90fd 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -372,7 +372,6 @@ class Facture extends CommonInvoice $this->socid = $_facrec->socid; // Invoice created on same thirdparty than template $this->entity = $_facrec->entity; // Invoice created in same entity than template - $this->ref_client = $_facrec->ref_client; // Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI $this->fk_project = GETPOST('projectid', 'int') > 0 ? ((int) GETPOST('projectid', 'int')) : $_facrec->fk_project; diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index 2c1c2514488..1add07c6e8c 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -29,7 +29,6 @@ create table llx_facture_rec tms timestamp, -- date creation/modification suspended integer DEFAULT 0, -- 1=suspended - ref_client varchar(255), -- reference for customer amount double(24,8) DEFAULT 0 NOT NULL, remise real DEFAULT 0, From 3f25a8d8d57d38792f46ac736dd6ce75630075da Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 17 Sep 2019 09:38:08 +0200 Subject: [PATCH 021/126] New: Load invoices only if showed --- htdocs/compta/facture/card.php | 88 +++++++++++++++++----------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ff5a280a118..6d0bf2f56bc 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2013 Jean-Francois FERRY * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013 CƩdric Salvador - * Copyright (C) 2014-2018 Ferran Marcet + * Copyright (C) 2014-2019 Ferran Marcet * Copyright (C) 2015-2016 Marcos Garcƭa * Copyright (C) 2018 FrƩdƩric France * @@ -2862,49 +2862,6 @@ if ($action == 'create') } } - // Type de facture - $facids = $facturestatic->list_replacable_invoices($soc->id); - if ($facids < 0) { - dol_print_error($db, $facturestatic); - exit(); - } - $options = ""; - foreach ($facids as $facparam) - { - $options .= ''; - } - - // Show link for credit note - $facids=$facturestatic->list_qualified_avoir_invoices($soc->id); - if ($facids < 0) - { - dol_print_error($db, $facturestatic); - exit; - } - $optionsav = ""; - $newinvoice_static = new Facture($db); - foreach ($facids as $key => $valarray) - { - $newinvoice_static->id = $key; - $newinvoice_static->ref = $valarray ['ref']; - $newinvoice_static->statut = $valarray ['status']; - $newinvoice_static->type = $valarray ['type']; - $newinvoice_static->paye = $valarray ['paye']; - - $optionsav .= ''; - } - print '' . $langs->trans('Type') . ''; print '
' . "\n"; @@ -2981,6 +2938,23 @@ if ($action == 'create') // Replacement if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT)) { + // Type de facture + $facids = $facturestatic->list_replacable_invoices($soc->id); + if ($facids < 0) { + dol_print_error($db, $facturestatic); + exit(); + } + $options = ""; + foreach ($facids as $facparam) + { + $options .= ''; + } + print ''; print '
'; $tmp='global->INVOICE_DISABLE_CREDIT_NOTE)) { + // Show link for credit note + $facids=$facturestatic->list_qualified_avoir_invoices($soc->id); + if ($facids < 0) + { + dol_print_error($db, $facturestatic); + exit; + } + $optionsav = ""; + $newinvoice_static = new Facture($db); + foreach ($facids as $key => $valarray) + { + $newinvoice_static->id = $key; + $newinvoice_static->ref = $valarray ['ref']; + $newinvoice_static->statut = $valarray ['status']; + $newinvoice_static->type = $valarray ['type']; + $newinvoice_static->paye = $valarray ['paye']; + + $optionsav .= ''; + } + print '
'; $tmp=' Date: Tue, 17 Sep 2019 09:43:15 +0200 Subject: [PATCH 022/126] New: Load invoices only if showed --- htdocs/fourn/facture/card.php | 87 ++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index ae042b4c4b8..db5b87e590f 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -10,6 +10,7 @@ * Copyright (C) 2014-2016 Marcos Garcƭa * Copyright (C) 2016-2017 Alexandre Spangaro * Copyright (C) 2018 FrƩdƩric France + * Copyright (C) 2019 Ferran Marcet * * 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 @@ -1765,49 +1766,6 @@ if ($action == 'create') print ''.$langs->trans('RefSupplier').''; print ''; - // Type invoice - $facids = $facturestatic->list_replacable_supplier_invoices($societe->id); - if ($facids < 0) { - dol_print_error($db, $facturestatic); - exit(); - } - $options = ""; - foreach ($facids as $facparam) - { - $options .= ''; - } - - // Show link for credit note - $facids=$facturestatic->list_qualified_avoir_supplier_invoices($societe->id); - if ($facids < 0) - { - dol_print_error($db, $facturestatic); - exit; - } - $optionsav = ""; - $newinvoice_static = new FactureFournisseur($db); - foreach ($facids as $key => $valarray) - { - $newinvoice_static->id = $key; - $newinvoice_static->ref = $valarray ['ref']; - $newinvoice_static->statut = $valarray ['status']; - $newinvoice_static->type = $valarray ['type']; - $newinvoice_static->paye = $valarray ['paye']; - - $optionsav .= ''; - } - print ''.$langs->trans('Type').''; print '
' . "\n"; @@ -1860,6 +1818,23 @@ if ($action == 'create') // Replacement if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT)) { + // Type invoice + $facids = $facturestatic->list_replacable_supplier_invoices($societe->id); + if ($facids < 0) { + dol_print_error($db, $facturestatic); + exit(); + } + $options = ""; + foreach ($facids as $facparam) + { + $options .= ''; + } + print ''; print '
'; $tmp='global->INVOICE_DISABLE_CREDIT_NOTE)) { + // Show link for credit note + $facids=$facturestatic->list_qualified_avoir_supplier_invoices($societe->id); + if ($facids < 0) + { + dol_print_error($db, $facturestatic); + exit; + } + $optionsav = ""; + $newinvoice_static = new FactureFournisseur($db); + foreach ($facids as $key => $valarray) + { + $newinvoice_static->id = $key; + $newinvoice_static->ref = $valarray ['ref']; + $newinvoice_static->statut = $valarray ['status']; + $newinvoice_static->type = $valarray ['type']; + $newinvoice_static->paye = $valarray ['paye']; + + $optionsav .= ''; + } + print '
'; $tmp=' Date: Tue, 17 Sep 2019 10:05:35 +0200 Subject: [PATCH 023/126] FIX selectFields for GROUP BY and show only if units defined --- htdocs/core/class/html.form.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 52be1cec2b0..5c2d89cdf60 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2120,7 +2120,7 @@ class Form // Units if (! empty($conf->global->PRODUCT_USE_UNITS)) { $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; - $selectFields .= ', unit_long, unit_short'; + $selectFields .= ', unit_long, unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units'; } // Multilang : we add translation @@ -2419,19 +2419,19 @@ class Form if (!empty($objp->unit_short)) { $outvalUnits .= ' - ' . $objp->unit_short; } - if (!empty($objp->weight)) { + if (!empty($objp->weight) && $objp->weight_units!==null) { $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); $outvalUnits .= ' - ' . $unitToShow; } - if (!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) { + if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units!==null) { $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuring_units_string($objp->length_units, 'size'); $outvalUnits .= ' - ' . $unitToShow; } - if (!empty($objp->surface)) { + if (!empty($objp->surface) && $objp->surface_units!==null) { $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); $outvalUnits .= ' - ' . $unitToShow; } - if (!empty($objp->volume)) { + if (!empty($objp->volume) && $objp->volume_units!==null) { $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); $outvalUnits .= ' - ' . $unitToShow; } @@ -2796,19 +2796,19 @@ class Form if (!empty($objp->unit_short)) { $outvalUnits .= ' - ' . $objp->unit_short; } - if (!empty($objp->weight)) { + if (!empty($objp->weight) && $objp->weight_units!==null) { $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); $outvalUnits .= ' - ' . $unitToShow; } - if (!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) { + if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units!==null) { $unitToShow = $objp->length . ' x ' . $objp->width . ' x ' . $objp->height . ' ' . measuring_units_string($objp->length_units, 'size'); $outvalUnits .= ' - ' . $unitToShow; } - if (!empty($objp->surface)) { + if (!empty($objp->surface) && $objp->surface_units!==null) { $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); $outvalUnits .= ' - ' . $unitToShow; } - if (!empty($objp->volume)) { + if (!empty($objp->volume) && $objp->volume_units!==null) { $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); $outvalUnits .= ' - ' . $unitToShow; } From a44836ae406ac4feaf7fbdcf9e8b562d003e0574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 10:15:55 +0200 Subject: [PATCH 024/126] Update CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 43ad52b5f47..864f2869b82 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -80,6 +80,18 @@ class CMailFile public $headers; public $message; + /** + * @var array fullfilenames list + */ + public $filename_list = array(); + /** + * @var array mimetypes of files list + */ + public $mimetype_list = array(); + /** + * @var array filenames list + */ + public $mimefilename_list = array(); // Image public $html; @@ -125,6 +137,9 @@ class CMailFile global $conf, $dolibarr_main_data_root; $this->sendcontext = $sendcontext; + $this->filename_list = $filename_list; + $this->mimetype_list = $mimetype_list; + $this->mimefilename_list = $mimefilename_list; if (empty($replyto)) $replyto=$from; From 24cb1390e4e4327b84dcc5e58e42b153b72aa0cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Sep 2019 13:17:25 +0200 Subject: [PATCH 025/126] FIX Update of leave request when CSRF with token is on FIX Export of leave request show the number of open days --- htdocs/core/modules/modHoliday.class.php | 5 +++-- htdocs/exports/class/export.class.php | 9 ++++++++- htdocs/holiday/card.php | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index ba792ad28ad..61217d91686 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -202,13 +202,13 @@ class modHoliday extends DolibarrModules $this->export_permission[$r]=array(array("holiday","read_all")); $this->export_fields_array[$r]=array( 'd.rowid'=>"LeaveId",'d.fk_type'=>'TypeOfLeaveId','t.code'=>'TypeOfLeaveCode','t.label'=>'TypeOfLeaveLabel','d.fk_user'=>'UserID', - 'u.lastname'=>'Lastname','u.firstname'=>'Firstname','u.login'=>"Login",'d.date_debut'=>'DateStart','d.date_fin'=>'DateEnd','d.halfday'=>'HalfDay', + 'u.lastname'=>'Lastname','u.firstname'=>'Firstname','u.login'=>"Login",'d.date_debut'=>'DateStart','d.date_fin'=>'DateEnd','d.halfday'=>'HalfDay','none.num_open_days'=>'NbUseDaysCP', 'd.date_valid'=>'DateApprove','d.fk_validator'=>"UserForApprovalID",'ua.lastname'=>"UserForApprovalLastname",'ua.firstname'=>"UserForApprovalFirstname", 'ua.login'=>"UserForApprovalLogin",'d.description'=>'Description','d.statut'=>'Status' ); $this->export_TypeFields_array[$r]=array( 'd.rowid'=>"Numeric",'t.code'=>'Text', 't.label'=>'Text','d.fk_user'=>'Numeric', - 'u.lastname'=>'Text','u.firstname'=>'Text','u.login'=>"Text",'d.date_debut'=>'Date','d.date_fin'=>'Date', + 'u.lastname'=>'Text','u.firstname'=>'Text','u.login'=>"Text",'d.date_debut'=>'Date','d.date_fin'=>'Date','none.num_open_days'=>'NumericCompute', 'd.date_valid'=>'Date','d.fk_validator'=>"Numeric",'ua.lastname'=>"Text",'ua.firstname'=>"Text", 'ua.login'=>"Text",'d.description'=>'Text','d.statut'=>'Numeric' ); @@ -216,6 +216,7 @@ class modHoliday extends DolibarrModules 'u.lastname'=>'user','u.firstname'=>'user','u.login'=>'user','ua.lastname'=>'user','ua.firstname'=>'user','ua.login'=>'user' ); $this->export_alias_array[$r]=array('d.rowid'=>"idholiday"); + $this->export_special_array[$r] = array('none.num_open_days'=>'getNumOpenDays'); $this->export_dependencies_array[$r]=array(); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 51a16f717b2..f6ef6a27e2b 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -540,7 +540,7 @@ class Export public function build_file($user, $model, $datatoexport, $array_selected, $array_filterValue, $sqlquery = '') { // phpcs:enable - global $conf,$langs; + global $conf,$langs,$mysoc; $indice=0; asort($array_selected); @@ -634,6 +634,13 @@ class Export $alias=str_replace(array('.', '-','(',')'), '_', $key); if ($obj->$alias < 0) $obj->$alias='0'; } + // Operation GETNUMOPENDAYS (for Holiday module) + elseif ($this->array_export_special[$indice][$key]=='getNumOpenDays') + { + //$alias=$this->array_export_alias[$indice][$key]; + $alias=str_replace(array('.', '-','(',')'), '_', $key); + $obj->$alias=num_open_day(dol_stringtotime($obj->d_date_debut, 1), dol_stringtotime($obj->d_date_fin, 1), 0, 1, $obj->d_halfday, $mysoc->country_code); + } // Operation INVOICEREMAINTOPAY elseif ($this->array_export_special[$indice][$key]=='getRemainToPay') { diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 204d832a94c..1f597f2ddc2 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1134,6 +1134,7 @@ else if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) $edit = true; print '
'."\n"; + print ''."\n"; print ''."\n"; print ''."\n"; } From 214bf4375eb9cfafa32723131e597ff01643e0ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Sep 2019 13:28:36 +0200 Subject: [PATCH 026/126] Fix missing include --- htdocs/exports/class/export.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index f6ef6a27e2b..da184f27574 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -637,6 +637,7 @@ class Export // Operation GETNUMOPENDAYS (for Holiday module) elseif ($this->array_export_special[$indice][$key]=='getNumOpenDays') { + include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; //$alias=$this->array_export_alias[$indice][$key]; $alias=str_replace(array('.', '-','(',')'), '_', $key); $obj->$alias=num_open_day(dol_stringtotime($obj->d_date_debut, 1), dol_stringtotime($obj->d_date_fin, 1), 0, 1, $obj->d_halfday, $mysoc->country_code); From 5e7b7bbc33c846f36768bb3dc8688d4b76879945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 13:31:45 +0200 Subject: [PATCH 027/126] Update eldy.lib.php --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 2eead6da81d..e7764be3ceb 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; */ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { - global $user,$conf,$langs,$dolibarr_main_db_name; + global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; $mainmenu=(empty($_SESSION["mainmenu"])?'':$_SESSION["mainmenu"]); $leftmenu=(empty($_SESSION["leftmenu"])?'':$_SESSION["leftmenu"]); From ea5ff59076935967ae95b80057c16d9523a420b0 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 17 Sep 2019 16:43:36 +0200 Subject: [PATCH 028/126] FIX check if a resource is in use after a drag and drop from events --- htdocs/comm/action/card.php | 76 +++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 173770d725c..3ef20a71a9c 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -632,6 +632,8 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') */ if (GETPOST('actionmove', 'alpha') == 'mupdate') { + $error = 0; + $object->fetch($id); $object->fetch_userassigned(); @@ -653,10 +655,76 @@ if (GETPOST('actionmove', 'alpha') == 'mupdate') $object->datef+=$datep-$object->datep; } $object->datep=$datep; - $result=$object->update($user); - if ($result < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); + + if (!$error) { + // check if an event resource is already in use + if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element == 'action') { + $eventDateStart = $object->datep; + $eventDateEnd = $object->datef; + + $sql = "SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label"; + $sql .= " FROM " . MAIN_DB_PREFIX . "element_resources as er"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "resource as r ON r.rowid = er.resource_id AND er.resource_type = 'dolresource'"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "actioncomm as ac ON ac.id = er.element_id AND er.element_type = '" . $db->escape($object->element) . "'"; + $sql .= " WHERE ac.id != " . $object->id; + $sql .= " AND er.resource_id IN ("; + $sql .= " SELECT resource_id FROM " . MAIN_DB_PREFIX . "element_resources"; + $sql .= " WHERE element_id = " . $object->id; + $sql .= " AND element_type = '" . $db->escape($object->element) . "'"; + $sql .= " AND busy = 1"; + $sql .= ")"; + $sql .= " AND er.busy = 1"; + $sql .= " AND ("; + + // event date start between ac.datep and ac.datep2 (if datep2 is null we consider there is no end) + $sql .= " (ac.datep <= '" . $db->idate($eventDateStart) . "' AND (ac.datep2 IS NULL OR ac.datep2 >= '" . $db->idate($eventDateStart) . "'))"; + // event date end between ac.datep and ac.datep2 + if (!empty($eventDateEnd)) { + $sql .= " OR (ac.datep <= '" . $db->idate($eventDateEnd) . "' AND (ac.datep2 >= '" . $db->idate($eventDateEnd) . "'))"; + } + // event date start before ac.datep and event date end after ac.datep2 + $sql .= " OR ("; + $sql .= "ac.datep >= '" . $db->idate($eventDateStart) . "'"; + if (!empty($eventDateEnd)) { + $sql .= " AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '" . $db->idate($eventDateEnd) . "')"; + } + $sql .= ")"; + + $sql .= ")"; + $resql = $db->query($sql); + if (!$resql) { + $error++; + $object->error = $db->lasterror(); + $object->errors[] = $object->error; + } else { + if ($db->num_rows($resql) > 0) { + // already in use + $error++; + $object->error = $langs->trans('ErrorResourcesAlreadyInUse') . ' : '; + while ($obj = $db->fetch_object($resql)) { + $object->error .= '
- ' . $langs->trans('ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label . ' [' . $obj->ac_id . ']'); + } + $object->errors[] = $object->error; + } + $db->free($resql); + } + + if ($error) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + } + + if (!$error) { + $db->begin(); + $result = $object->update($user); + if ($result < 0) { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + $db->rollback(); + } else { + $db->commit(); + } } } if (! empty($backtopage)) From 49b75e3f52d0c7393d3b4f3e257a0048f1ab56c9 Mon Sep 17 00:00:00 2001 From: Laurent De Coninck Date: Tue, 17 Sep 2019 17:40:42 +0200 Subject: [PATCH 029/126] support referent in the beluga export. The beluga export of a project, now supports additional referents, coming from the hooks. When the element is present in the view of all elements of the project, the beluga export will also export this element. [see: X] --- .../project/doc/pdf_beluga.modules.php | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 32a2d10f72d..f7314476023 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -361,6 +361,11 @@ class pdf_beluga extends ModelePDFProjects 'lang'=>'agenda') ); + $hookmanager->initHooks(array('completeListOfReferent')); + $hookmanager->executeHooks('completeListOfReferent', ['listofreferent'=>$listofreferent], $object, $action); + if(!empty($hookmanager->resArray)) { + $listofreferent = array_merge($listofreferent, $hookmanager->resArray); + } foreach ($listofreferent as $key => $value) { @@ -370,17 +375,13 @@ class pdf_beluga extends ModelePDFProjects $datefieldname=$value['datefieldname']; $qualified=$value['test']; $langstoload=$value['lang']; + $projectField=isset($value['project_field']) ? $value['project_field'] : 'fk_projet'; $langs->load($langstoload); if (! $qualified) continue; //var_dump("$key, $tablename, $datefieldname, $dates, $datee"); - $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee); - - if ($key == 'agenda') - { -// var_dump($elementarray); - } + $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, $projectField); $num = count($elementarray); if ($num >= 0) @@ -394,7 +395,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetXY($this->posxref, $curY); $pdf->MultiCell($this->posxstatut - $this->posxref, 3, $outputlangs->transnoentities($title), 0, 'L'); - $selectList = $formproject->select_element($tablename, $project->thirdparty->id); + $selectList = $formproject->select_element($tablename, $project->thirdparty->id, '', -2, $projectField); $nexY = $pdf->GetY() + 1; $curY = $nexY; $pdf->SetXY($this->posxref, $curY); @@ -569,9 +570,9 @@ class pdf_beluga extends ModelePDFProjects // Amount without tax if (empty($value['disableamount'])) { $pdf->SetXY($this->posxamountht, $curY); - $pdf->MultiCell($this->posxamountttc - $this->posxamountht, 3, (isset($element->total_ht) ? price($element->total_ht) : ' '), 1, 'R'); + $pdf->MultiCell($this->posxamountttc - $this->posxamountht, 3, (isset($element->total_ht) ? price($element->total_ht) : ''), 1, 'R'); $pdf->SetXY($this->posxamountttc, $curY); - $pdf->MultiCell($this->posxstatut - $this->posxamountttc, 3, (isset($element->total_ttc) ? price($element->total_ttc) : ' '), 1, 'R'); + $pdf->MultiCell($this->posxstatut - $this->posxamountttc, 3, (isset($element->total_ttc) ? price($element->total_ttc) : ''), 1, 'R'); } else { $pdf->SetXY($this->posxamountht, $curY); if ($key == 'agenda') @@ -608,9 +609,9 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetXY($this->posxref, $curY); $pdf->MultiCell($this->posxamountttc - $this->posxref, 3, "TOTAL", 1, 'L'); $pdf->SetXY($this->posxamountht, $curY); - $pdf->MultiCell($this->posxamountttc - $this->posxamountht, 3, (isset($element->total_ht) ? price($total_ht) : ' '), 1, 'R'); + $pdf->MultiCell($this->posxamountttc - $this->posxamountht, 3, (isset($element->total_ht) ? price($total_ht) : ''), 1, 'R'); $pdf->SetXY($this->posxamountttc, $curY); - $pdf->MultiCell($this->posxstatut - $this->posxamountttc, 3, (isset($element->total_ttc) ? price($total_ttc) : ' '), 1, 'R'); + $pdf->MultiCell($this->posxstatut - $this->posxamountttc, 3, (isset($element->total_ttc) ? price($total_ttc) : ''), 1, 'R'); $pdf->SetXY($this->posxstatut, $curY); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxstatut, 3, $outputlangs->transnoentities("Nb") . " " . $num, 1, 'L'); } From 87d41256d456a3c68b6822458ce15bf1ee17e905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 22:59:23 +0200 Subject: [PATCH 030/126] Update box_contacts.php --- htdocs/core/boxes/box_contacts.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 667f892bc0a..fb5cf2db7fb 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -83,8 +83,8 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire && $user->rights->societe->contact->lire) { $sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status"; - $sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile"; - $sql.= ", s.nom as socname, s.name_alias"; + $sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile, sp.email as spemail"; + $sql.= ", s.nom as socname, s.name_alias, s.email as semail"; $sql.= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; @@ -117,12 +117,14 @@ class box_contacts extends ModeleBoxes $contactstatic->phone_pro = $objp->phone; $contactstatic->phone_perso = $objp->phone_perso; $contactstatic->phone_mobile = $objp->phone_mobile; + $contactstatic->email = $objp->spemail; $contactstatic->address = $objp->address; $contactstatic->zip = $objp->zip; $contactstatic->town = $objp->town; $societestatic->id = $objp->fk_soc; $societestatic->name = $objp->socname; + $societestatic->email = $objp->semail; $societestatic->name_alias = $objp->name_alias; $societestatic->code_client = $objp->code_client; $societestatic->code_fournisseur = $objp->code_fournisseur; From c38c0bec1c0932b976d060084371301e4c5d6851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 23:03:37 +0200 Subject: [PATCH 031/126] Update box_fournisseurs.php --- htdocs/core/boxes/box_fournisseurs.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 8d231cc472b..b80f9c27975 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Frederic France + * Copyright (C) 2015-2019 Frederic France * * 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 @@ -85,7 +85,7 @@ class box_fournisseurs extends ModeleBoxes if ($user->rights->societe->lire) { $sql = "SELECT s.nom as name, s.rowid as socid, s.datec, s.tms, s.status,"; - $sql.= " s.code_fournisseur,"; + $sql.= " s.code_fournisseur, s.email as semail,"; $sql.= " s.logo"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -109,6 +109,7 @@ class box_fournisseurs extends ModeleBoxes $datem=$db->jdate($objp->tms); $thirdpartytmp->id = $objp->socid; $thirdpartytmp->name = $objp->name; + $thirdpartytmp->email = $objp->email; $thirdpartytmp->code_client = $objp->code_client; $thirdpartytmp->logo = $objp->logo; From c01ab451cc21c4c90c4bfdc8579dbedc973fb307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 17 Sep 2019 23:04:43 +0200 Subject: [PATCH 032/126] Update box_fournisseurs.php --- htdocs/core/boxes/box_fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index b80f9c27975..a90336753da 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -109,7 +109,7 @@ class box_fournisseurs extends ModeleBoxes $datem=$db->jdate($objp->tms); $thirdpartytmp->id = $objp->socid; $thirdpartytmp->name = $objp->name; - $thirdpartytmp->email = $objp->email; + $thirdpartytmp->email = $objp->semail; $thirdpartytmp->code_client = $objp->code_client; $thirdpartytmp->logo = $objp->logo; From ca18448b48f6a041ed13762ac56233a095c5c6c7 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 18 Sep 2019 10:36:13 +0200 Subject: [PATCH 033/126] NEW add units fields in buying price tab of product card --- htdocs/product/fournisseurs.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index cb56ff63cfc..d8cfcae0bb7 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -491,6 +491,13 @@ if ($id > 0 || $ref) { print ''; } + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $unit = $object->getLabelOfUnit(); + if ($unit !== '') { + print '  ' . $langs->trans($unit); + } + } print ''; // Vat rate @@ -778,11 +785,11 @@ SCRIPT; $num = count($product_fourn_list); if (($num + ($offset * $limit)) < $nbtotalofrecords) $num++; - print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER ['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1); + print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1); // Suppliers list title print '
'; - print ''; + print '
'; $param="&id=".$object->id; @@ -851,6 +858,13 @@ SCRIPT; // Quantity print ''; // VAT rate From 7455d772a2cda7032e0201be030b96f4382f2d25 Mon Sep 17 00:00:00 2001 From: com4WEB <42214196+com4WEB@users.noreply.github.com> Date: Wed, 18 Sep 2019 10:50:07 +0200 Subject: [PATCH 034/126] Update README.md --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8100cabddbe..0ae6d1b9de5 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ If you don't have time to install it yourself, you can try some commercial 'read ## UPGRADING +- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. - At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process. Ā If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*"). @@ -90,18 +91,19 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) ### Main application/modules (all optional) -- Customers, Prospects and/or Suppliers directory +- Customers, Prospects (Leads) and/or Suppliers directory - Products and/or Services catalog - Commercial proposals management - Customer and Supplier Orders management - Invoices and payment management - Standing orders management (European SEPA) - Bank accounts management +- Accounting management - Shared calendar/agenda (with ical and vcal export for third party tools integration) - Opportunities and/or project management - Projects management - Contracts management -- Stock management +- Warehouse/Stock management - Shipping management - Interventions management - Employee's leave requests management @@ -111,7 +113,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Foundations members management - Mass emailing - Surveys -- Point of Sale +- Point of Sale (POS) - … ### Other application/modules @@ -131,15 +133,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) ### Other general features -- Localization in most major languages. -- Multi-Users and groups with finely grained rights. -- Multi-currency. -- Multi-company by adding of an external module. -- Very user friendly and easy to use. +- Localization in most major languages +- Multi-Users and groups with finely grained rights +- Multi-currency +- Multi-company by adding of an external module +- Very user friendly and easy to use +- customizable Dashboard - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) -- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)) -- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. -- APIs. + +- APIs - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) - Support a lot of country specific features: - Spanish Tax RE and ISPF @@ -153,6 +155,12 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - PDF or ODT generation for invoice, proposals, orders... - … +### System Environment / Requirements + +- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)) +- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. + + ### Extending Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com). From cf7193691f4d853ca45b4d95efe1b1f157a8a0ee Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 18 Sep 2019 11:22:32 +0200 Subject: [PATCH 035/126] FIX dol_print_date format in buying price tooltip --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 6847af5edf1..e18e02d4930 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -998,7 +998,7 @@ class ProductFournisseur extends Product //$out .= ''; $out .= ''; foreach ($productFournLogList as $productFournLog) { - $out.= ''; + $out.= ''; $out.= ''; //$out.= ''; $out.= ''; From 2da50716421b46fdeaa9a9b300d7754ab05a59bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Sep 2019 13:12:22 +0200 Subject: [PATCH 036/126] Fix VAT in New caledonia is now called TGC --- htdocs/langs/fr_NC/admin.lang | 6 ++--- htdocs/langs/fr_NC/companies.lang | 4 ++-- htdocs/langs/fr_NC/compta.lang | 40 +++++++++++++++---------------- htdocs/langs/fr_NC/main.lang | 8 +++---- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/htdocs/langs/fr_NC/admin.lang b/htdocs/langs/fr_NC/admin.lang index d86b324fdc5..f7c25610e3f 100644 --- a/htdocs/langs/fr_NC/admin.lang +++ b/htdocs/langs/fr_NC/admin.lang @@ -1,4 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -VATManagement=Gestion TSS -VATIsUsedDesc=Le taux de TSS proposĆ© par dĆ©faut lors de la crĆ©ation de proposition commerciale, facture, commande, etc... rĆ©pond Ć  la rĆØgle standard suivanteĀ :
Si vendeur non assujetti à TSS, TSS par défaut=0. Fin de règle.
Si le (pays vendeur= pays acheteur) alors TSS par défaut=TSS du produit vendu. Fin de règle.
Si vendeur et acheteur dans Communauté européenne et bien vendu= moyen de transport neuf (auto, bateau, avion), TSS par défaut=0 (La TSS doit être payée par acheteur au centre d'impÓts de son pays et non au vendeur). Fin de règle.
Si vendeur et acheteur dans Communauté européenne et acheteur= particulier alors TSS par défaut=TSS du produit vendu. Fin de règle.
Si vendeur et acheteur dans Communauté européenne et acheteur= entreprise alors TSS par défaut=0. Fin de règle.
Sinon TSS proposée par défaut=0. Fin de règle.
-VATIsNotUsedDesc=Le taux de TSS proposé par défaut est 0. C'est le cas d'associations, particuliers ou certaines petites sociétés. +VATManagement=Gestion TGC +VATIsUsedDesc=Le taux de TGC proposé par défaut lors de la création de proposition commerciale, facture, commande, etc... répond à la règle standard suivante :
Si vendeur non assujetti à TGC, TGC par défaut=0. Fin de règle.
Si le (pays vendeur= pays acheteur) alors TGC par défaut=TGC du produit vendu. Fin de règle.
Si vendeur et acheteur dans Communauté européenne et bien vendu= moyen de transport neuf (auto, bateau, avion), TGC par défaut=0 (La TGC doit être payée par acheteur au centre d'impÓts de son pays et non au vendeur). Fin de règle.
Si vendeur et acheteur dans Communauté européenne et acheteur= particulier alors TGC par défaut=TGC du produit vendu. Fin de règle.
Si vendeur et acheteur dans Communauté européenne et acheteur= entreprise alors TGC par défaut=0. Fin de règle.
Sinon TGC proposée par défaut=0. Fin de règle.
+VATIsNotUsedDesc=Le taux de TGC proposé par défaut est 0. C'est le cas d'associations, particuliers ou certaines petites sociétés. diff --git a/htdocs/langs/fr_NC/companies.lang b/htdocs/langs/fr_NC/companies.lang index 9853f7e7e21..c3520226e42 100644 --- a/htdocs/langs/fr_NC/companies.lang +++ b/htdocs/langs/fr_NC/companies.lang @@ -1,3 +1,3 @@ # Dolibarr language file - Source file is en_US - companies -VATIsUsed=Assujetti à la TSS -VATIsNotUsed=Non assujetti à la TSS +VATIsUsed=Assujetti à la TGC +VATIsNotUsed=Non assujetti à la TGC diff --git a/htdocs/langs/fr_NC/compta.lang b/htdocs/langs/fr_NC/compta.lang index f22e834c4a5..2d7a5468f84 100644 --- a/htdocs/langs/fr_NC/compta.lang +++ b/htdocs/langs/fr_NC/compta.lang @@ -1,21 +1,21 @@ # Dolibarr language file - Source file is en_US - compta -VATToPay=TSS ventes -VATReceived=TSS collectée -VATToCollect=TSS achats -VATSummary=Balance de TSS -VATPaid=TSS payée -VATCollected=TSS récupérée -PaymentVat=Règlement TSS -VATPayment=Règlement TSS -VATPayments=Règlements TSS -ShowVatPayment=Affiche paiement TSS -RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TSS.
- Il se base sur la date de règlement de ces factures, charges et TSS. -VATReportByCustomersInInputOutputMode=Rapport par client des TSS collectées et payées (TSS sur encaissement) -VATReportByQuartersInInputOutputMode=Rapport par taux des TSS collectées et payées (TSS sur encaissement) -SeeVATReportInInputOutputMode=Voir le rapport %sTSS encaissement%s pour mode de calcul standard -SeeVATReportInDueDebtMode=Voir le rapport %sTSS sur débit%s pour mode de calcul avec option sur les débits -RulesVATInServices=- Pour les services, le rapport inclut les TSS des règlements effectivement reçus ou émis en se basant sur la date du règlement. -RulesVATInProducts=- Pour les biens matériels, il inclut les TSS des factures en se basant sur la date de facture. -RulesVATDueServices=- Pour les services, le rapport inclut les TSS des factures dues, payées ou non en se basant sur la date de facture. -RulesVATDueProducts=- Pour les biens matériels, il inclut les TSS des factures en se basant sur la date de facture. -CalculationRuleDesc=Pour calculer le total de TSS, il existe 2 modes:
Le mode 1 consiste Ć  arrondir la TSS de chaque ligne et Ć  sommer cet arrondi.
Le mode 2 consiste Ć  sommer la tva de chaque ligne puis Ć  l'arrondir.
Les résultats peuvent différer de quelques centimes. Le mode par défaut est le mode %s. +VATToPay=TGC ventes +VATReceived=TGC collectée +VATToCollect=TGC achats +VATSummary=Balance de TGC +VATPaid=TGC payée +VATCollected=TGC récupérée +PaymentVat=Règlement TGC +VATPayment=Règlement TGC +VATPayments=Règlements TGC +ShowVatPayment=Affiche paiement TGC +RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TGC.
- Il se base sur la date de règlement de ces factures, charges et TGC. +VATReportByCustomersInInputOutputMode=Rapport par client des TGC collectées et payées (TGC sur encaissement) +VATReportByQuartersInInputOutputMode=Rapport par taux des TGC collectées et payées (TGC sur encaissement) +SeeVATReportInInputOutputMode=Voir le rapport %sTGC encaissement%s pour mode de calcul standard +SeeVATReportInDueDebtMode=Voir le rapport %sTGC sur débit%s pour mode de calcul avec option sur les débits +RulesVATInServices=- Pour les services, le rapport inclut les TGC des règlements effectivement reçus ou émis en se basant sur la date du règlement. +RulesVATInProducts=- Pour les biens matériels, il inclut les TGC des factures en se basant sur la date de facture. +RulesVATDueServices=- Pour les services, le rapport inclut les TGC des factures dues, payées ou non en se basant sur la date de facture. +RulesVATDueProducts=- Pour les biens matériels, il inclut les TGC des factures en se basant sur la date de facture. +CalculationRuleDesc=Pour calculer le total de TGC, il existe 2 modes:
Le mode 1 consiste Ć  arrondir la TGC de chaque ligne et Ć  sommer cet arrondi.
Le mode 2 consiste Ć  sommer la tva de chaque ligne puis Ć  l'arrondir.
Les rƩsultats peuvent diffƩrer de quelques centimes. Le mode par dƩfaut est le mode %s. diff --git a/htdocs/langs/fr_NC/main.lang b/htdocs/langs/fr_NC/main.lang index 82c7a4ee746..23b739d83e5 100644 --- a/htdocs/langs/fr_NC/main.lang +++ b/htdocs/langs/fr_NC/main.lang @@ -20,7 +20,7 @@ FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M ErrorNoVATRateDefinedForSellerCountry=Erreur, aucun taux de taxe dƩfini pour le pays '%s'. -AmountVAT=Montant TSS -TotalVAT=Total TSS -VAT=TSS -VATRate=Taux TSS +AmountVAT=Montant TGC +TotalVAT=Total TGC +VAT=TGC +VATRate=Taux TGC From 7b512587aadc3eca9e3565eed17f46c36498c643 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Sep 2019 14:15:20 +0200 Subject: [PATCH 037/126] FIX XSS --- htdocs/admin/mails_templates.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index e0dfcd75277..573d4c5fbaa 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -50,7 +50,7 @@ $confirm = GETPOST('confirm','alpha'); // Result of a confirmation $id = GETPOST('id','int'); $rowid = GETPOST('rowid','alpha'); -$search_label=GETPOST('search_label','alpha'); +$search_label=GETPOST('search_label', 'alphanohtml'); // Must allow value like 'Abc Def' or '(MyTemplateName)' $search_type_template=GETPOST('search_type_template','alpha'); $search_lang=GETPOST('search_lang','alpha'); $search_fk_user=GETPOST('search_fk_user','intcomma'); @@ -262,6 +262,7 @@ if (empty($reshook)) { //var_dump($i.' - '.$listfieldvalue[$i].' - '.$_POST[$listfieldvalue[$i]].' - '.$value); $keycode=$listfieldvalue[$i]; + if ($value == 'label') $_POST[$keycode] = dol_escape_htmltag($_POST[$keycode]); if ($value == 'lang') $keycode='langcode'; if ($value == 'entity') $_POST[$keycode] = $conf->entity; if ($i) $sql.=","; @@ -666,8 +667,6 @@ if ($resql) print '
'; foreach ($fieldlist as $field => $value) { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees $showfield=1; // By defaut $align="left"; $sortable=1; @@ -694,7 +693,7 @@ if ($resql) if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); $showfield=0;} if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); $showfield=0; } - // Affiche nom du champ + // Show fields if ($showfield) { if (! empty($tabhelp[$id][$value])) @@ -812,6 +811,10 @@ if ($resql) $showfield=1; $align="left"; $valuetoshow=$obj->{$fieldlist[$field]}; + if ($value == 'label' || $value == 'topic') + { + $valuetoshow = dol_escape_htmltag($valuetoshow); + } if ($value == 'type_template') { $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; From 345ac28c8999d53ed541fb14cd08f4692e21aec6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Aug 2019 16:22:24 +0200 Subject: [PATCH 038/126] Fix js injection Conflicts: htdocs/core/lib/functions.lib.php htdocs/user/group/card.php --- htdocs/core/lib/functions.lib.php | 8 ++++++-- htdocs/main.inc.php | 16 +++++++++------- htdocs/user/group/card.php | 4 ++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 20930ca52c4..bf79b2070d5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -966,11 +966,15 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) * @param string $stringtoescape String to escape * @param int $keepb 1=Preserve b tags (otherwise, remove them) * @param int $keepn 1=Preserve \r\n strings (otherwise, replace them with escaped value). Set to 1 when escaping for a '."\n"; - print ''."\n"; - print ''."\n"; // Country - print ''."\n"; - print ''."\n"; - print ''; print ''."\n"; - print ''; print ''."\n"; - print ''; print ''."\n"; // Web - print ''; print ''."\n"; // Code - print ''."\n"; // Note - print ''; print ''; @@ -189,24 +189,24 @@ else print '
'; print '
'; print $productfourn->fourn_qty; + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $unit = $object->getLabelOfUnit(); + if ($unit !== '') { + print '  ' . $langs->trans($unit); + } + } print ''.$langs->trans("QtyMin").''.$langs->trans("User").'
'.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').'
'.dol_print_date($this->db->jdate($productFournLog['datec']), 'dayhour', 'tzuser').''.price($productFournLog['price']).''.$productFournLog['quantity'].''.$productFournLog['lastname'].'
'; + print '
'; print '
'; + print '
'; print '
'; + print '
'; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
'; + print '
'; $formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); print '
'; + print '
'; print '
'; + print '
'; print '
'; + print '
'; print '
'; + print '
'; print '
'; + print '
'; print '
'; + print '
'; print '
'; - print ''; + print ''; - print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; - if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; + print '
'.$langs->trans("CompanyName").''; print $conf->global->MAIN_INFO_ACCOUNTANT_NAME; print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP)?'':$conf->global->MAIN_INFO_ACCOUNTANT_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN)?'':$conf->global->MAIN_INFO_ACCOUNTANT_TOWN) . '
'.$langs->trans("CompanyCountry").''; + print '
'.$langs->trans("CompanyCountry").''; if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY)) { $code = getCountry($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 2); @@ -217,23 +217,23 @@ else print '
'.$langs->trans("Region-State").''; - else print '
'.$langs->trans("State").''; + if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '
'.$langs->trans("Region-State").''; + else print '
'.$langs->trans("State").''; if (! empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE)) print getState($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_SHOW_STATE_CODE, 0, $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT); else print ' '; print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_PHONE, $mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_ACCOUNTANT_FAX, $mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_ACCOUNTANT_MAIL, 0, 0, 0, 80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_ACCOUNTANT_WEB, '_blank', 80) . '
'.$langs->trans("AccountantFileNumber").'' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '
'.$langs->trans("AccountantFileNumber").'' . $conf->global->MAIN_INFO_ACCOUNTANT_CODE . '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? nl2br($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) : '') . '
'; print "
"; From 278312f38f3bbdb528e6741efb946dd0e0678643 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 20 Sep 2019 07:02:14 +0200 Subject: [PATCH 050/126] Translate --- htdocs/adherents/card.php | 8 ++++---- htdocs/adherents/subscription.php | 4 ++-- htdocs/admin/bank.php | 2 +- htdocs/admin/chequereceipts.php | 3 +-- htdocs/admin/delais.php | 2 +- htdocs/admin/dict.php | 14 ++++++------- htdocs/admin/emailcollector_card.php | 2 +- htdocs/admin/emailcollector_list.php | 2 +- htdocs/admin/expensereport.php | 2 +- htdocs/core/modules/action/rapport.pdf.php | 2 +- .../core/modules/bank/doc/pdf_ban.modules.php | 2 +- .../bank/doc/pdf_sepamandate.modules.php | 2 +- .../modules/cheque/doc/pdf_blochet.class.php | 6 +++--- .../commande/doc/pdf_einstein.modules.php | 2 +- .../doc/doc_generic_contract_odt.modules.php | 2 +- .../contract/doc/pdf_strato.modules.php | 4 ++-- .../modules/dons/html_cerfafr.modules.php | 2 +- .../doc/doc_generic_shipment_odt.modules.php | 2 +- .../expedition/doc/pdf_espadon.modules.php | 2 +- .../expedition/doc/pdf_merou.modules.php | 2 +- .../expedition/doc/pdf_rouget.modules.php | 2 +- .../doc/pdf_standard.modules.php | 4 ++-- .../modules/facture/doc/pdf_crabe.modules.php | 20 +++++++++---------- .../fichinter/doc/pdf_soleil.modules.php | 4 ++-- .../modules/member/doc/pdf_standard.class.php | 2 +- .../doc/pdf_standardlabel.class.php | 2 +- .../printsheet/doc/pdf_tcpdflabel.class.php | 2 +- .../product/doc/pdf_standard.modules.php | 6 +++--- .../doc/doc_generic_project_odt.modules.php | 2 +- .../project/doc/pdf_baleine.modules.php | 2 +- .../project/doc/pdf_beluga.modules.php | 2 +- .../project/doc/pdf_timespent.modules.php | 2 +- .../modules/propale/doc/pdf_azur.modules.php | 4 ++-- .../societe/doc/doc_generic_odt.modules.php | 2 +- .../stock/doc/pdf_standard.modules.php | 6 +++--- .../stock/doc/pdf_stdmovement.modules.php | 6 +++--- .../doc/pdf_aurore.modules.php | 4 ++-- htdocs/core/tpl/card_presend.tpl.php | 2 +- htdocs/public/members/new.php | 2 +- htdocs/public/payment/paymentok.php | 2 +- 40 files changed, 72 insertions(+), 73 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 5836bf48332..badf93b4e80 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -638,7 +638,7 @@ if (empty($reshook)) // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; @@ -719,7 +719,7 @@ if (empty($reshook)) // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; @@ -1483,7 +1483,7 @@ else // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; @@ -1544,7 +1544,7 @@ else // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 0922ca4f572..49e1cbbc553 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -360,7 +360,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && ! // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template @@ -1093,7 +1093,7 @@ if ($rowid > 0) // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 44cdd5e611b..a40448acdc8 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -49,7 +49,7 @@ $type = 'bankaccount'; * Actions */ -//Order display of bank account +// Order display of bank account if ($action == 'setbankorder') { if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) { diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index efc192e6de1..7e136bf6978 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -91,7 +91,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT') } /* - * view + * View */ $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']); @@ -233,7 +233,6 @@ print '
'; /* * Other options - * */ print load_fiche_titre($langs->trans("OtherOptions"), '', ''); diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 1fe8b2285c3..6d6ebe13333 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -222,7 +222,7 @@ if ($action == 'edit') else { /* - * Affichage des parametres + * Show parameters */ print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index ff4c3cc6a6b..28dd36b5442 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -251,7 +251,7 @@ $tabsqlsort[35]="c.label ASC"; $tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC"; $tabsqlsort[37]="r.unit_type ASC, r.scale ASC, r.code ASC"; -// Nom des champs en resultat de select pour affichage du dictionnaire +// Field names in select result for dictionary display $tabfield=array(); $tabfield[1] = "code,libelle,country"; $tabfield[2] = "code,libelle,region_id,region,country"; // "code,libelle,region,country_code-country" @@ -291,7 +291,7 @@ $tabfield[35]= "label"; $tabfield[36]= "range_ik,fk_c_exp_tax_cat"; $tabfield[37]= "code,label,short_label,unit_type,scale"; -// Nom des champs d'edition pour modification d'un enregistrement +// Edit field names for editing a record $tabfieldvalue=array(); $tabfieldvalue[1] = "code,libelle,country"; $tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region" @@ -331,7 +331,7 @@ $tabfieldvalue[35]= "label"; $tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat"; $tabfieldvalue[37]= "code,label,short_label,unit_type,scale"; -// Nom des champs dans la table pour insertion d'un enregistrement +// Field names in the table for inserting a record $tabfieldinsert=array(); $tabfieldinsert[1] = "code,libelle,fk_pays"; $tabfieldinsert[2] = "code_departement,nom,fk_region"; @@ -1283,8 +1283,8 @@ if ($id) { if ($fieldlist[$field] == 'entity') continue; - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees + // Determines the name of the field in relation to the possible names + // in data dictionaries $showfield=1; // By defaut $align="left"; $cssprefix=''; @@ -1850,14 +1850,14 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; } - // Le type de l'element (pour les type de contact) + // The type of the element (for contact types) elseif ($fieldlist[$field] == 'element') { print ''; } - // La source de l'element (pour les type de contact) + // The source of the element (for contact types) elseif ($fieldlist[$field] == 'source') { print ''."\n"; -//Use draft Watermark +// Use draft Watermark print ''."\n"; print ''."\n"; - // Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position + // For each possible position, an activation link is displayed if the box is not already active for that position print '
'; print $form->selectarray('element', $elementList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')); print ''; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 6d1b640f45b..011f04b0882 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -36,7 +36,7 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; if (!$user->admin) accessforbidden(); if (empty($conf->emailcollector->enabled)) accessforbidden(); -// Load traductions files requiredby by page +// Load traductions files required by page $langs->loadLangs(array("admin", "mails", "other")); // Get parameters diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 14cb63cd923..a55f6ee962e 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -34,7 +34,7 @@ dol_include_once('/emailcollector/class/emailcollector.class.php'); if (!$user->admin) accessforbidden(); if (empty($conf->emailcollector->enabled)) accessforbidden(); -// Load traductions files requiredby by page +// Load traductions files required by page $langs->loadLangs(array("admin", "other")); $action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index da77c0e78d3..d0ba9c63a3c 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -496,7 +496,7 @@ else } print '
'; print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 52b70caf47f..b63b2785e44 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -117,7 +117,7 @@ class CommActionRapport // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); $dir = $conf->agenda->dir_temp."/"; diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 23fef1ef2c5..eeee238ac80 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -106,7 +106,7 @@ class pdf_ban extends ModeleBankAccountDoc // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); if ($conf->bank->dir_output) diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index e3990bc8ccc..e94af011b1e 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -109,7 +109,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills")); if (! empty($conf->bank->dir_output)) diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 71866464084..09148746fe9 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -49,7 +49,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts { global $conf,$langs,$mysoc; - // Load traductions files requiredby by page + // Load traductions files required by page $langs->loadLangs(array("main", "bills")); $this->db = $db; @@ -98,7 +98,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $sav_charset_output=$outputlangs->charset_output; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta")); $dir = $_dir . "/".get_exdir($number, 0, 1, 0, $object, 'cheque').$number; @@ -225,7 +225,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts global $langs; $default_font_size = pdf_getPDFFontSize($outputlangs); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("compta", "banks")); $title = $outputlangs->transnoentities("CheckReceipt"); diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index f74291ecac9..4a81f94ed29 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1236,7 +1236,7 @@ class pdf_einstein extends ModelePDFCommandes // phpcs:enable global $conf,$langs,$hookmanager; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 124d51a33ad..7cff0c19e6b 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -217,7 +217,7 @@ class doc_generic_contract_odt extends ModelePDFContract $sav_charset_output=$outputlangs->charset_output; $outputlangs->charset_output='UTF-8'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); if ($conf->contrat->dir_output) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index b04ce5890ab..f7ae9834a65 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -181,7 +181,7 @@ class pdf_strato extends ModelePDFContract // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "contracts")); if ($conf->contrat->dir_output) @@ -602,7 +602,7 @@ class pdf_strato extends ModelePDFContract $default_font_size = pdf_getPDFFontSize($outputlangs); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "contract", "companies")); pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 6ef76d21b78..f871cd3e2b0 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -83,7 +83,7 @@ class html_cerfafr extends ModeleDon if (! is_object($outputlangs)) $outputlangs=$langs; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "donations")); $currency = !empty($currency) ? $currency : $conf->currency; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 9f94dd86867..52c810fd965 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -227,7 +227,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $sav_charset_output=$outputlangs->charset_output; $outputlangs->charset_output='UTF-8'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); if ($conf->expedition->dir_output."/sending") diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 996e8035316..8f3441c332c 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -165,7 +165,7 @@ class pdf_espadon extends ModelePdfExpedition // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); $nblines = count($object->lines); diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 4293f29ed6d..dbdfd722168 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -165,7 +165,7 @@ class pdf_merou extends ModelePdfExpedition // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); if ($conf->expedition->dir_output) diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 18ba0ef9d44..d3e254c6132 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -195,7 +195,7 @@ class pdf_rouget extends ModelePdfExpedition // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); $nblines = count($object->lines); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index fb977c19b63..5cfc6c3287e 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -217,7 +217,7 @@ class pdf_standard extends ModeleExpenseReport // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks")); $nblines = count($object->lines); @@ -635,7 +635,7 @@ class pdf_standard extends ModeleExpenseReport // global $conf, $langs, $hookmanager; global $user, $langs, $conf, $mysoc, $db, $hookmanager; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "trips", "companies")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 8876137f877..7ec496d385b 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -243,7 +243,7 @@ class pdf_crabe extends ModelePDFFactures // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); $nblines = count($object->lines); @@ -1351,7 +1351,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1); - + // Retained warranty if( !empty($object->situation_final) && ( $object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty) ) ) ) { @@ -1367,29 +1367,29 @@ class pdf_crabe extends ModelePDFFactures } } } - + if($displayWarranty){ $pdf->SetTextColor(40, 40, 40); $pdf->SetFillColor(255, 255, 255); - + $retainedWarranty = $object->total_ttc * $object->retained_warranty / 100; $billedWithRetainedWarranty = $object->total_ttc - $retainedWarranty ; - + // Billed - retained warranty $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("ToPayOn", dol_print_date($object->date_lim_reglement, 'day')), $useborder, 'L', 1); - + $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($billedWithRetainedWarranty), $useborder, 'R', 1); - + // retained warranty $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - + $retainedWarrantyToPayOn = $outputlangs->transnoentities("RetainedWarranty") . ' ('.$object->retained_warranty.'%)'; $retainedWarrantyToPayOn.= !empty($object->retained_warranty_date_limit)?' '.$outputlangs->transnoentities("toPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')):''; - + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $retainedWarrantyToPayOn, $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($retainedWarranty), $useborder, 'R', 1); @@ -1591,7 +1591,7 @@ class pdf_crabe extends ModelePDFFactures { global $conf, $langs; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "propal", "companies")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 847f1de7087..9d39eb5e858 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -173,7 +173,7 @@ class pdf_soleil extends ModelePDFFicheinter // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "interventions", "dict", "companies")); if ($conf->ficheinter->dir_output) @@ -562,7 +562,7 @@ class pdf_soleil extends ModelePDFFicheinter global $conf,$langs; $default_font_size = pdf_getPDFFontSize($outputlangs); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "interventions")); pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index f3a105f99f1..13c28514211 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -329,7 +329,7 @@ class pdf_standard extends CommonStickerGenerator // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "admin", "members")); if (empty($mode) || $mode == 'member') diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index e178d16d5bc..f72ca14cc25 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -260,7 +260,7 @@ class pdf_standardlabel extends CommonStickerGenerator // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "admin")); $title=$outputlangs->transnoentities('Labels'); diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index f6bb3bc46a7..a2705adcb7d 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -301,7 +301,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "admin")); $title=$outputlangs->transnoentities('Labels'); diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 019d67518a4..88ec5204845 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -119,7 +119,7 @@ class pdf_standard extends ModelePDFProduct { global $conf,$langs,$mysoc; - // Load traductions files requiredby by page + // Load traductions files required by page $langs->loadLangs(array("main", "companies")); $this->db = $db; @@ -169,7 +169,7 @@ class pdf_standard extends ModelePDFProduct // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); $nblines = count($object->lines); @@ -709,7 +709,7 @@ class pdf_standard extends ModelePDFProduct { global $conf,$langs,$hookmanager; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index e682cfd9507..6d67a36c010 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -82,7 +82,7 @@ class doc_generic_project_odt extends ModelePDFProjects { global $conf, $langs, $mysoc; - // Load traductions files requiredby by page + // Load traductions files required by page $langs->loadLangs(array("companies", "main")); $this->db = $db; diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 154c8e067b0..bc2019bfce8 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -183,7 +183,7 @@ class pdf_baleine extends ModelePDFProjects // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); if ($conf->projet->dir_output) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 05100fbe8eb..ba815810f28 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -155,7 +155,7 @@ class pdf_beluga extends ModelePDFProjects // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); if ($conf->projet->dir_output) diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 061ae7a0b58..7685c07b480 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -115,7 +115,7 @@ class pdf_timespent extends ModelePDFProjects // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); if ($conf->projet->dir_output) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 77c41d01927..59267e25272 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -224,7 +224,7 @@ class pdf_azur extends ModelePDFPropales // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); $nblines = count($object->lines); @@ -1438,7 +1438,7 @@ class pdf_azur extends ModelePDFPropales { global $conf,$langs; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "propal", "companies", "bills")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index a6738ddcc90..f8bbf568d86 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -94,7 +94,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc { global $conf,$langs; - // Load traductions files requiredby by page + // Load traductions files required by page $langs->loadLangs(array("companies", "errors")); $form = new Form($this->db); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index e0c831732ba..61bfa916fe2 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -119,7 +119,7 @@ class pdf_standard extends ModelePDFStock { global $conf,$langs,$mysoc; - // Load traductions files requiredby by page + // Load traductions files required by page $langs->loadLangs(array("main", "companies")); $this->db = $db; @@ -198,7 +198,7 @@ class pdf_standard extends ModelePDFStock // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); $nblines = count($object->lines); @@ -875,7 +875,7 @@ class pdf_standard extends ModelePDFStock { global $conf,$langs,$db,$hookmanager; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 380b9ceffa5..6a607de6d37 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -119,7 +119,7 @@ class pdf_stdmovement extends ModelePDFMovement { global $conf,$langs,$mysoc; - // Load traductions files requiredby by page + // Load traductions files required by page $langs->loadLangs(array("main", "companies")); $this->db = $db; @@ -200,7 +200,7 @@ class pdf_stdmovement extends ModelePDFMovement // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); /** @@ -954,7 +954,7 @@ class pdf_stdmovement extends ModelePDFMovement { global $conf,$langs,$db,$hookmanager; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index d243c209848..44fe533f0eb 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -215,7 +215,7 @@ class pdf_aurore extends ModelePDFSupplierProposal // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal")); $nblines = count($object->lines); @@ -1278,7 +1278,7 @@ class pdf_aurore extends ModelePDFSupplierProposal { global $conf, $langs; - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies")); $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index a8594ec1b62..06b2a8414c0 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -76,7 +76,7 @@ if ($action == 'presend') { $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang($newlang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array('commercial','bills','orders','contracts','members','propal','products','supplier_proposal','interventions')); } diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 873a6858a1a..81f46897cc6 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -281,7 +281,7 @@ if ($action == 'add') // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 52413921f90..6c9711e4055 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -516,7 +516,7 @@ if ($ispaymentok) // Set output language $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); - // Load traductions files requiredby by page + // Load traductions files required by page $outputlangs->loadLangs(array("main", "members")); // Get email content from template $arraydefaultmessage=null; From bf6fd2a5e2f904aaade31cb6293885835ce0885c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 20 Sep 2019 09:25:46 +0200 Subject: [PATCH 051/126] Translate & style --- htdocs/admin/agenda_reminder.php | 4 ++-- htdocs/admin/boxes.php | 14 ++++++++------ htdocs/admin/dict.php | 4 ++-- htdocs/admin/ihm.php | 6 ++++-- htdocs/admin/limits.php | 20 +++++++++++--------- htdocs/admin/payment.php | 10 ++++++---- 6 files changed, 33 insertions(+), 25 deletions(-) diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 3af179ba2e7..43e031a8ce9 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -148,8 +148,8 @@ elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { - // La constante qui a ete lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage coherent + // The constant that has been read in front of the new set + // is therefore passed through a variable to have a coherent display $conf->global->ACTION_EVENT_ADDON_PDF = $value; } diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 2e81a2c6dad..796d9c7a42b 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -63,7 +63,7 @@ if ($action == 'add') { { $pos = $boxid['pos']; - // Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos") + // Initialize distinct fk_user with all already existing values of fk_user (user that use a personalized view of boxes for page "pos") $distinctfkuser=array(); if (! $error) { @@ -225,8 +225,8 @@ print load_fiche_titre($langs->trans("Boxes"), '', 'title_setup'); print $langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; /* - * Recherche des boites actives par defaut pour chaque position possible - * On stocke les boites actives par defaut dans $boxes[position][id_boite]=1 + * Search for the default active boxes for each possible position + * We store the active boxes by default in $boxes[position][id_boite]=1 */ $actives = array(); @@ -257,7 +257,7 @@ if ($resql) array_push($actives, $obj->box_id); if ($obj->box_order == '' || $obj->box_order == '0' || $decalage) $decalage++; - // On renumerote l'ordre des boites si l'une d'elle est a '' + // We renumber the order of the boxes if one of them is in '' // This occurs just after an insert. if ($decalage) { @@ -268,7 +268,7 @@ if ($resql) if ($decalage) { - // Si on a renumerote, on corrige champ box_order + // If we have renumbered, we correct the field box_order // This occurs just after an insert. $sql = "SELECT box_order"; $sql.= " FROM ".MAIN_DB_PREFIX."boxes"; @@ -366,7 +366,7 @@ foreach($boxtoadd as $box) print '
' . $box->sourcefile . ''; print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n"; print ''."\n"; @@ -483,7 +483,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIV print '
'; +print '
'; print '
'; +print '
'; print ''; print "\n".''."\n"; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 28dd36b5442..9033819b540 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -979,7 +979,7 @@ if ($sortfield) $paramwithsearch.= '&sortfield='.urlencode($sortfield); if (GETPOST('from')) $paramwithsearch.= '&from='.urlencode(GETPOST('from', 'alpha')); -// Confirmation de la suppression de la ligne +// Confirmation of the deletion of the line if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); @@ -991,7 +991,7 @@ if ($action == 'delete') */ if ($id) { - // Complete requete recherche valeurs avec critere de tri + // Complete search values request with sort criteria $sql=$tabsql[$id]; if (! preg_match('/ WHERE /', $sql)) $sql.= " WHERE 1 = 1"; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 37c997ee306..7b0a7983b5a 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -432,11 +432,13 @@ if ($action == 'edit') // Edit print ''."\n"; - print '
'; + print '
'; + print '
'; print ''; - print '   '; + print '   '; print ''; print '
'; + print '
'; print ''; } diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index a43f86d0e28..5eb3532e47d 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -102,7 +102,7 @@ if ($action == 'edit') clearstatcache(); print ''; - print ''; + print ''; print ''; - print ''; - print ''; + print ''; - print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; @@ -110,23 +110,25 @@ if ($action == 'edit') print '
'; + print '
'; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print '
'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'
'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'
'; + print '
'; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print '
'; - print '
'; + print '
'; + print '
'; print ''; print '
'; + print '
'; print ''; print '
'; @@ -142,21 +144,21 @@ else print ''.$conf->global->MAIN_MAX_DECIMALS_UNIT.''; - print ''; + print ''; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_TOT.''; - print ''.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").''.$conf->global->MAIN_MAX_DECIMALS_SHOWN.''; + print ''.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").''.$conf->global->MAIN_MAX_DECIMALS_SHOWN.''; - print ''; + print ''; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_ROUNDING_RULE_TOT.''; print ''; - print '
'; + print '
'; print ''.$langs->trans("Modify").''; print '
'; } diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 4e80fe55e25..eb3261f46c6 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -252,14 +252,16 @@ print "\n"; print ''; -print '
'; +dol_fiche_end(); + +print '
'; +print '
'; print ''; -print '
'; +print '
'; +print '
'; print ''; -dol_fiche_end(); - // End of page llxFooter(); $db->close(); From e32772fdc52befab1a903989e6a7fc9089bc7754 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 20 Sep 2019 09:44:49 +0200 Subject: [PATCH 052/126] Translate --- htdocs/adherents/htpasswd.php | 3 +-- .../facture/class/paymentterm.class.php | 1 - .../compta/localtax/class/localtax.class.php | 1 - htdocs/compta/tva/class/tva.class.php | 1 - htdocs/core/class/antivir.class.php | 1 - htdocs/core/modules/action/rapport.pdf.php | 2 +- .../core/modules/bank/doc/pdf_ban.modules.php | 6 +++--- .../bank/doc/pdf_sepamandate.modules.php | 6 +++--- .../modules/cheque/doc/pdf_blochet.class.php | 6 +++--- .../doc/doc_generic_order_odt.modules.php | 2 +- .../doc/doc_generic_contract_odt.modules.php | 2 +- .../contract/doc/pdf_strato.modules.php | 2 +- .../doc/doc_generic_shipment_odt.modules.php | 2 +- .../doc/pdf_standard.modules.php | 2 +- .../modules/export/export_csv.modules.php | 1 - .../modules/export/export_excel.modules.php | 1 - .../export/export_excel2007.modules.php | 1 - .../export/export_excel2007new.modules.php | 1 - .../modules/export/export_tsv.modules.php | 1 - .../doc/doc_generic_invoice_odt.modules.php | 2 +- .../fichinter/doc/pdf_soleil.modules.php | 2 +- .../livraison/doc/pdf_typhon.modules.php | 3 +-- .../doc/doc_generic_product_odt.modules.php | 2 +- .../product/doc/pdf_standard.modules.php | 2 +- .../doc/doc_generic_project_odt.modules.php | 2 +- .../project/doc/pdf_baleine.modules.php | 21 +++++++++---------- .../project/doc/pdf_beluga.modules.php | 11 +++++----- .../project/doc/pdf_timespent.modules.php | 11 +++++----- .../task/doc/doc_generic_task_odt.modules.php | 2 +- .../doc/doc_generic_proposal_odt.modules.php | 2 +- .../modules/rapport/pdf_paiement.class.php | 2 +- .../doc/doc_generic_reception_odt.modules.php | 2 +- .../societe/doc/doc_generic_odt.modules.php | 4 ++-- .../doc/doc_generic_stock_odt.modules.php | 2 +- .../stock/doc/pdf_standard.modules.php | 2 +- .../stock/doc/pdf_stdmovement.modules.php | 2 +- .../pdf/pdf_canelle.modules.php | 4 ++-- ...doc_generic_supplier_order_odt.modules.php | 4 ++-- .../supplier_order/pdf/pdf_cornas.modules.php | 2 +- .../pdf/pdf_muscadet.modules.php | 2 +- .../doc/pdf_standard.modules.php | 4 ++-- ..._generic_supplier_proposal_odt.modules.php | 2 +- .../doc/pdf_aurore.modules.php | 2 +- .../user/doc/doc_generic_user_odt.modules.php | 2 +- .../doc/doc_generic_usergroup_odt.modules.php | 2 +- htdocs/ecm/dir_card.php | 1 - htdocs/public/agenda/index.php | 1 - htdocs/public/donations/index.php | 1 - htdocs/public/index.php | 1 - htdocs/public/members/index.php | 1 - htdocs/public/paybox/index.php | 1 - htdocs/public/paybox/newpayment.php | 1 - htdocs/public/payment/index.php | 1 - htdocs/public/paypal/index.php | 1 - htdocs/public/stripe/index.php | 1 - htdocs/public/theme/common/index.php | 1 - htdocs/public/theme/index.php | 1 - 57 files changed, 63 insertions(+), 89 deletions(-) diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php index 885e453c6f1..79de1971dbc 100644 --- a/htdocs/adherents/htpasswd.php +++ b/htdocs/adherents/htpasswd.php @@ -20,8 +20,7 @@ /** * \file htdocs/adherents/htpasswd.php * \ingroup member - * \brief Page d'export htpasswd du fichier des adherents - * \author Rodolphe Quiedeville + * \brief Export page htpasswd of the membership file */ require '../main.inc.php'; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index d3b4bd83743..f37c7046633 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -19,7 +19,6 @@ * \file compta/facture/class/paymentterm.class.php * \ingroup facture * \brief This file is an example for a CRUD class file (Create/Read/Update/Delete) - * \author Put author name here */ diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 247db26715a..1a8606054e6 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -18,7 +18,6 @@ /** * \file htdocs/compta/localtax/class/localtax.class.php * \ingroup tax - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 55a94d685cc..29194d21ec6 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -22,7 +22,6 @@ /** * \file htdocs/compta/tva/class/tva.class.php * \ingroup tax - * \author Laurent Destailleur */ // Put here all includes required by your class file diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index 4be4d175b47..df2dcd1f94a 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -22,7 +22,6 @@ /** * \file htdocs/core/class/antivir.class.php * \brief File of class to scan viruses - * \author Laurent Destailleur. */ /** diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index b63b2785e44..2fcf6ef7c4f 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -84,7 +84,7 @@ class CommActionRapport $this->month = $month; $this->year = $year; - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index eeee238ac80..91fe828963c 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -61,7 +61,7 @@ class pdf_ban extends ModeleBankAccountDoc $this->name = "ban"; $this->description = $langs->trans("DocumentModelBan").' (Volunteer wanted to finish)'; - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -76,11 +76,11 @@ class pdf_ban extends ModeleBankAccountDoc $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION $this->option_codeproduitservice = 1; // Affiche code produit-service - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Defini position des colonnes + // Define column position $this->posxref=$this->marge_gauche+1; $this->posxlabel=$this->marge_gauche+25; $this->posxworkload=$this->marge_gauche+100; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index e94af011b1e..f66d005e6c3 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -63,7 +63,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $this->name = "sepamandate"; $this->description = $langs->transnoentitiesnoconv("DocumentModelSepaMandate"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -78,11 +78,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION $this->option_codeproduitservice = 1; // Affiche code produit-service - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Defini position des colonnes + // Define column position $this->posxref=$this->marge_gauche; } diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 09148746fe9..eaf4047e107 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -57,7 +57,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $this->tab_top = 60; - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -68,11 +68,11 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $this->marge_haute =isset($conf->global->MAIN_PDF_MARGIN_TOP)?$conf->global->MAIN_PDF_MARGIN_TOP:10; $this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10; - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Defini position des colonnes + // Define column position $this->line_height = 5; $this->line_per_page = 40; $this->tab_height = 200; //$this->line_height * $this->line_per_page; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index eced22d03d8..8f1b0f3a3c8 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -75,7 +75,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'COMMANDE_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 7cff0c19e6b..aaec1127963 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_contract_odt extends ModelePDFContract $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'CONTRACT_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index f7ae9834a65..d73ddd4297b 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -132,7 +132,7 @@ class pdf_strato extends ModelePDFContract $this->name = 'strato'; $this->description = $langs->trans("StandardContractsTemplate"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 52c810fd965..e27eb9b7bf0 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -76,7 +76,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'EXPEDITION_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 5cfc6c3287e..2c24c4338c5 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -133,7 +133,7 @@ class pdf_standard extends ModeleExpenseReport $this->name = ""; $this->description = $langs->trans('PDFStandardExpenseReports'); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 9d606aadc33..9dfe8efe28c 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -19,7 +19,6 @@ * \file htdocs/core/modules/export/export_csv.modules.php * \ingroup export * \brief File of class to build exports with CSV format - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT .'/core/modules/export/modules_export.php'; diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index 0e7fd0f1169..2651762998d 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -20,7 +20,6 @@ * \file htdocs/core/modules/export/export_excel.modules.php * \ingroup export * \brief File of class to generate export file with Excel format - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 7460d71ff13..982b42b3ec5 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -20,7 +20,6 @@ * \file htdocs/core/modules/export/export_excel2007.modules.php * \ingroup export * \brief File of class to generate export file with Excel format - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007new.modules.php index 038446643a2..42ffd3b5fba 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007new.modules.php @@ -20,7 +20,6 @@ * \file htdocs/core/modules/export/export_excelnew.modules.php * \ingroup export * \brief File of class to generate export file with Excel format - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index b40da3cd539..f87bcf4fbdb 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -20,7 +20,6 @@ * \file htdocs/core/modules/export/export_csv.modules.php * \ingroup export * \brief File of class to build export files with format TSV - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT .'/core/modules/export/modules_export.php'; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 642140e0ce8..8463f1449ed 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -75,7 +75,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'FACTURE_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 9d39eb5e858..2b5158e6f48 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -125,7 +125,7 @@ class pdf_soleil extends ModelePDFFicheinter $this->name = 'soleil'; $this->description = $langs->trans("DocumentModelStandardPDF"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 963de1494a7..4c10b7c7864 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -25,7 +25,6 @@ * \file htdocs/core/modules/livraison/doc/pdf_typhon.modules.php * \ingroup livraison * \brief File of class to manage receving receipts with template Typhon - * \author Laurent Destailleur */ require_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php'; @@ -128,7 +127,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->name = "typhon"; $this->description = $langs->trans("DocumentModelTyphon"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index f8861380b2f..9a3381319a7 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -73,7 +73,7 @@ class doc_generic_product_odt extends ModelePDFProduct $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'PRODUCT_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 88ec5204845..119ce6ad632 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -126,7 +126,7 @@ class pdf_standard extends ModelePDFProduct $this->name = "standard"; $this->description = $langs->trans("DocumentModelStandardPDF"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 6d67a36c010..6c1aa5b418b 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -90,7 +90,7 @@ class doc_generic_project_odt extends ModelePDFProjects $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'PROJECT_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index bc2019bfce8..67b530ef96c 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -20,8 +20,7 @@ /** * \file htdocs/core/modules/project/doc/pdf_baleine.modules.php * \ingroup project - * \brief File of class to generate project document Baleine - * \author Regis Houssin + * \brief File of the class allowing to generate projects with the baleine model */ require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php'; @@ -128,7 +127,7 @@ class pdf_baleine extends ModelePDFProjects $this->name = "baleine"; $this->description = $langs->trans("DocumentModelBaleine"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -143,11 +142,11 @@ class pdf_baleine extends ModelePDFProjects $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION $this->option_codeproduitservice = 1; // Affiche code produit-service - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Defini position des colonnes + // Define column position $this->posxref=$this->marge_gauche+1; $this->posxlabel=$this->marge_gauche+25; $this->posxworkload=$this->marge_gauche+120; @@ -295,7 +294,7 @@ class pdf_baleine extends ModelePDFProjects $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-2, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+2); @@ -410,7 +409,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // Ref of task $pdf->SetXY($this->posxref, $curY); @@ -483,7 +482,7 @@ class pdf_baleine extends ModelePDFProjects $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; - // Pied de page + // Footer of the page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -507,7 +506,7 @@ class pdf_baleine extends ModelePDFProjects $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -545,10 +544,10 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetDrawColor(128, 128, 128); - // Draw rect of all tab (title + lines). Rect prend une longueur en 3eme param + // Draw rect of all tab (title + lines). Rect takes a length in 3rd parameter $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height); - // line prend une position y en 3eme param + // line takes a position y in 3rd parameter $pdf->line($this->marge_gauche, $tab_top+$heightoftitleline, $this->page_largeur-$this->marge_droite, $tab_top+$heightoftitleline); $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index ba815810f28..7721b29a1bf 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -21,8 +21,7 @@ /** * \file htdocs/core/modules/project/doc/pdf_beluga.modules.php * \ingroup project - * \brief Fichier de la classe permettant de generer les projets au modele beluga - * \author Charlie Benke + * \brief File of the class allowing to generate projects with the beluga model */ require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php'; @@ -50,7 +49,7 @@ if (! empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/com /** - * Class to manage generation of project document Baleine + * Class to manage generation of project document Beluga */ class pdf_beluga extends ModelePDFProjects @@ -83,7 +82,7 @@ class pdf_beluga extends ModelePDFProjects $this->name = "beluga"; $this->description = $langs->trans("DocumentModelBeluga"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->orientation = 'L'; @@ -104,11 +103,11 @@ class pdf_beluga extends ModelePDFProjects $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION $this->option_codeproduitservice = 1; // Affiche code produit-service - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Defini position des colonnes + // Define column position if ($this->orientation == 'L' || $this->orientation == 'Landscape') { $this->posxref=$this->marge_gauche+1; $this->posxdate=$this->marge_gauche+105; diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 7685c07b480..e4a32541aa9 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -17,10 +17,9 @@ */ /** - * \file htdocs/core/modules/project/doc/pdf_baleine.modules.php + * \file htdocs/core/modules/project/doc/pdf_timespent.modules.php * \ingroup project * \brief File of class to generate project document Baleine - * \author Regis Houssin */ require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php'; @@ -33,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; /** - * Class to manage generation of project document Baleine + * Class to manage generation of project document Timespent */ class pdf_timespent extends ModelePDFProjects @@ -60,7 +59,7 @@ class pdf_timespent extends ModelePDFProjects $this->name = "timespent"; $this->description = $langs->trans("DocumentModelTimeSpent"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -75,11 +74,11 @@ class pdf_timespent extends ModelePDFProjects $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION $this->option_codeproduitservice = 1; // Affiche code produit-service - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined - // Defini position des colonnes + // Define column position $this->posxref=$this->marge_gauche+1; $this->posxlabel=$this->marge_gauche+25; $this->posxtimespent=$this->marge_gauche+120; diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index f6da1061c89..a12b1079caf 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -91,7 +91,7 @@ class doc_generic_task_odt extends ModelePDFTask $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'PROJECT_TASK_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 7b274ac0c9a..8c8b566259a 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -72,7 +72,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'PROPALE_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 127c7a92352..0fb5c1412b2 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -47,7 +47,7 @@ class pdf_paiement $this->db = $db; $this->description = $langs->transnoentities("ListOfCustomerPayments"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 588b848f3d3..fd3a93c130f 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -70,7 +70,7 @@ class doc_generic_reception_odt extends ModelePdfReception $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'RECEPTION_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index f8bbf568d86..cba1a3d894e 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -66,7 +66,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'COMPANY_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; @@ -78,7 +78,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc $this->option_logo = 1; // Affiche logo - // Recupere emmetteur + // Retrieves transmitter $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini } diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index ac9c0423694..55a6caea5a2 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -73,7 +73,7 @@ class doc_generic_stock_odt extends ModelePDFStock $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'STOCK_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 61bfa916fe2..08e0894bd04 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -126,7 +126,7 @@ class pdf_standard extends ModelePDFStock $this->name = "standard"; $this->description = $langs->trans("DocumentModelStandardPDF"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 6a607de6d37..45edfb72cde 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -126,7 +126,7 @@ class pdf_stdmovement extends ModelePDFMovement $this->name = "stdmouvement"; $this->description = $langs->trans("DocumentModelStandardPDF"); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 00e981dfdd6..2f2e28b5463 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -128,7 +128,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->name = "canelle"; $this->description = $langs->trans('SuppliersInvoiceModel'); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -148,7 +148,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->franchise=!$mysoc->tva_assuj; - // Defini position des colonnes + // Define column position $this->posxdesc=$this->marge_gauche+1; $this->posxtva=112; $this->posxup=126; diff --git a/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php index d9e9112ec54..06fc7d2ae87 100644 --- a/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/doc_generic_supplier_order_odt.modules.php @@ -76,7 +76,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'SUPPLIER_ORDER_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; @@ -233,7 +233,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders if ($conf->fournisseur->commande->dir_output) { $object->fetch_thirdparty(); - + if ($object->specimen) { $dir = $conf->fournisseur->commande->dir_output; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 02b11366816..07070c261cc 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -131,7 +131,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $this->name = "cornas"; $this->description = $langs->trans('SuppliersCommandModel'); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 116b77117e4..61982a05621 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -131,7 +131,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->name = "muscadet"; $this->description = $langs->trans('SuppliersCommandModel'); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 81093d9adff..3670797da67 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -128,7 +128,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->name = "standard"; $this->description = $langs->trans('DocumentModelStandardPDF'); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -144,7 +144,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->franchise=!$mysoc->tva_assuj; - // Defini position des colonnes + // Define column position $this->posxdate=$this->marge_gauche+1; $this->posxreffacturefourn=30; $this->posxreffacture=65; diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 7b38ec52c0e..ac1868f6313 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 44fe533f0eb..2ed06067944 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -128,7 +128,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->name = "aurore"; $this->description = $langs->trans('DocModelAuroreDescription'); - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'pdf'; $formatarray=pdf_getFormat(); $this->page_largeur = $formatarray['width']; diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 80576bfcca0..f67cc02ff2d 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -71,7 +71,7 @@ class doc_generic_user_odt extends ModelePDFUser $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'USER_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 023bc714ac3..750d523b4e2 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $this->description = $langs->trans("DocumentModelOdt"); $this->scandir = 'USERGROUP_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan - // Dimension page pour format A4 + // Page size for A4 format $this->type = 'odt'; $this->page_largeur = 0; $this->page_hauteur = 0; diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index b6cb7dbfb7f..f0992160d09 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -20,7 +20,6 @@ * \file htdocs/ecm/dir_card.php * \ingroup ecm * \brief Card of a directory for ECM module - * \author Laurent Destailleur */ require '../main.inc.php'; diff --git a/htdocs/public/agenda/index.php b/htdocs/public/agenda/index.php index 112a07951b8..f55eb4d941b 100644 --- a/htdocs/public/agenda/index.php +++ b/htdocs/public/agenda/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/agenda/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/donations/index.php b/htdocs/public/donations/index.php index 08e7650a152..7404698becd 100644 --- a/htdocs/public/donations/index.php +++ b/htdocs/public/donations/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/donations/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/index.php b/htdocs/public/index.php index e1030c9973a..a1eeeffe9c6 100644 --- a/htdocs/public/index.php +++ b/htdocs/public/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../master.inc.php'; diff --git a/htdocs/public/members/index.php b/htdocs/public/members/index.php index 42bfa7713cf..c31d0e10449 100644 --- a/htdocs/public/members/index.php +++ b/htdocs/public/members/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/members/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/paybox/index.php b/htdocs/public/paybox/index.php index 58d748aba72..60da64aad9d 100644 --- a/htdocs/public/paybox/index.php +++ b/htdocs/public/paybox/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/paybox/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 319c40f2c18..9524b1be9ed 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -21,7 +21,6 @@ * \file htdocs/public/paybox/newpayment.php * \ingroup paybox * \brief File to offer a way to make a payment for a particular Dolibarr entity - * \author Laurent Destailleur */ define("NOLOGIN", 1); // This means this output page does not require to be logged. diff --git a/htdocs/public/payment/index.php b/htdocs/public/payment/index.php index 21786830df6..b0772b576c0 100644 --- a/htdocs/public/payment/index.php +++ b/htdocs/public/payment/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/payment/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/paypal/index.php b/htdocs/public/paypal/index.php index 0cba12e6aa2..54e81788f49 100644 --- a/htdocs/public/paypal/index.php +++ b/htdocs/public/paypal/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/paypal/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/stripe/index.php b/htdocs/public/stripe/index.php index 6958940ea48..792aa7c5f10 100644 --- a/htdocs/public/stripe/index.php +++ b/htdocs/public/stripe/index.php @@ -19,7 +19,6 @@ * \file htdocs/public/stripe/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; diff --git a/htdocs/public/theme/common/index.php b/htdocs/public/theme/common/index.php index 2a9d8b8c2a9..3d4eec0ee31 100644 --- a/htdocs/public/theme/common/index.php +++ b/htdocs/public/theme/common/index.php @@ -20,7 +20,6 @@ * \file htdocs/public/theme/common/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../../master.inc.php'; diff --git a/htdocs/public/theme/index.php b/htdocs/public/theme/index.php index 6b5d38f5e94..bf856f24280 100644 --- a/htdocs/public/theme/index.php +++ b/htdocs/public/theme/index.php @@ -20,7 +20,6 @@ * \file htdocs/public/theme/index.php * \ingroup core * \brief A redirect page to an error - * \author Laurent Destailleur */ require '../../master.inc.php'; From d3b51979565f63a38900969c58d573fb08af1a1e Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 20 Sep 2019 13:02:50 +0200 Subject: [PATCH 053/126] FIX new display for stripe account invert col and row for better display --- htdocs/societe/paymentmodes.php | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index a9f0d9aed0b..6154a8a7c3a 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1307,19 +1307,21 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $balance = \Stripe\Balance::retrieve(array("stripe_account" => $stripesupplieracc)); print ''."\n"; print ''; - print ''; - print ''; print ''; + print ''; + print ''; + print ''; print ''; + $currencybalance = array(); if (is_array($balance->available) && count($balance->available)) { foreach ($balance->available as $cpt) { $arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (! in_array($cpt->currency, $arrayzerounitcurrency)) $amount = $cpt->amount / 100; - else $amount = $cpt->amount; - print ''; + if (! in_array($cpt->currency, $arrayzerounitcurrency)) $currencybalance[$cpt->currency]->available=$cpt->amount / 100; + else $currencybalance[$cpt->currency]->available=$cpt->amount; + $currencybalance[$cpt->currency]->currency=$cpt->currency; } } @@ -1328,11 +1330,19 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' foreach ($balance->pending as $cpt) { $arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (! in_array($cpt->currency, $arrayzerounitcurrency)) $amount = $cpt->amount / 100; - else $amount = $cpt->amount; - print ''; + if (! in_array($cpt->currency, $arrayzerounitcurrency)) $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount / 100; + else $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount; } } + + if (is_array($currencybalance)) + { + foreach ($currencybalance as $cpt) + { + print ''; + } + } + print '
'.$langs->trans('Status').''.$langs->trans('Amount').''.$langs->trans('Currency').''.$langs->trans('Available').''.$langs->trans('Pending').''.$langs->trans('Total').'
'.$langs->trans("Available").''.price($amount, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).' '.$langs->trans("Currency".strtoupper($cpt->currency)).'
'.$langs->trans("Pending").''.price($amount, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).' '.$langs->trans("Currency".strtoupper($cpt->currency)).'
'.$langs->trans("Currency".strtoupper($cpt->currency)).''.price($cpt->available, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).''.price($cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).''.price($cpt->available+$cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt->currency)).'
'; print '
'; } From 1e49fd0d45b259de9df24aa6cdd4401faafabb4b Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 20 Sep 2019 15:07:58 +0200 Subject: [PATCH 054/126] Translate --- htdocs/adherents/subscription/card.php | 6 +++--- htdocs/core/modules/bank/doc/pdf_ban.modules.php | 6 +++--- .../modules/bank/doc/pdf_sepamandate.modules.php | 10 +++++----- htdocs/core/modules/cheque/doc/pdf_blochet.class.php | 2 +- .../modules/commande/doc/pdf_einstein.modules.php | 10 +++++----- .../modules/commande/doc/pdf_eratosthene.modules.php | 8 ++++---- .../core/modules/contract/doc/pdf_strato.modules.php | 4 ++-- .../modules/expedition/doc/pdf_espadon.modules.php | 8 ++++---- .../modules/expedition/doc/pdf_merou.modules.php | 2 +- .../modules/expedition/doc/pdf_rouget.modules.php | 6 +++--- .../expensereport/doc/pdf_standard.modules.php | 6 +++--- .../core/modules/facture/doc/pdf_crabe.modules.php | 8 ++++---- .../core/modules/facture/doc/pdf_sponge.modules.php | 6 +++--- .../modules/fichinter/doc/pdf_soleil.modules.php | 4 ++-- .../modules/livraison/doc/pdf_typhon.modules.php | 8 ++++---- .../modules/product/doc/pdf_standard.modules.php | 8 ++++---- .../core/modules/project/doc/pdf_beluga.modules.php | 6 +++--- .../modules/project/doc/pdf_timespent.modules.php | 6 +++--- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 10 +++++----- htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 8 ++++---- .../modules/reception/doc/pdf_squille.modules.php | 6 +++--- .../core/modules/stock/doc/pdf_standard.modules.php | 8 ++++---- .../modules/stock/doc/pdf_stdmovement.modules.php | 8 ++++---- .../supplier_invoice/pdf/pdf_canelle.modules.php | 10 +++++----- .../supplier_order/pdf/pdf_cornas.modules.php | 8 ++++---- .../supplier_order/pdf/pdf_muscadet.modules.php | 10 +++++----- .../supplier_payment/doc/pdf_standard.modules.php | 4 ++-- .../supplier_proposal/doc/pdf_aurore.modules.php | 12 ++++++------ 28 files changed, 99 insertions(+), 99 deletions(-) diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index e44995b263f..21b5b68794f 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -68,7 +68,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $cancel) { - // Charge objet actuel + // Load current object $result=$object->fetch($rowid); if ($result > 0) { @@ -101,7 +101,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $canc if (! $errmsg) { - // Modifie valeures + // Modify values $object->dateh=dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']); $object->datef=dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']); $object->fk_type=$_POST["typeid"]; @@ -389,7 +389,7 @@ if ($rowid && $action != 'edit') } } - // Supprimer + // Delete if ($user->rights->adherent->cotisation->creer) { print '\n"; diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 91fe828963c..9a6ee697833 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -197,7 +197,7 @@ class pdf_ban extends ModeleBankAccountDoc $nexY = $pdf->GetY(); $height_note=$nexY-($tab_top-2); - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-3, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -231,7 +231,7 @@ class pdf_ban extends ModeleBankAccountDoc } /* - * Pied de page + * Footer of the page */ $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -261,7 +261,7 @@ class pdf_ban extends ModeleBankAccountDoc $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index f66d005e6c3..c7206000982 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -109,7 +109,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - // Load traductions files required by page + // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills")); if (! empty($conf->bank->dir_output)) @@ -194,7 +194,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $tab_top_newpage = 40; $tab_height_newpage = 210; - // Affiche notes + // Show notes if (! empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); @@ -202,7 +202,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $nexY = $pdf->GetY(); $height_note=$nexY-($tab_top-2); - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-3, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -374,7 +374,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs); /* - * Pied de page + * Footer of the page */ $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); @@ -404,7 +404,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index eaf4047e107..70985902ad7 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -205,7 +205,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $this->result = array('fullpath'=>$file); $outputlangs->charset_output=$sav_charset_output; - return 1; // Pas d'erreur + return 1; // No error } diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 4a81f94ed29..6f46a9b70a9 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -353,7 +353,7 @@ class pdf_einstein extends ModelePDFCommandes $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -388,7 +388,7 @@ class pdf_einstein extends ModelePDFCommandes $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -633,7 +633,7 @@ class pdf_einstein extends ModelePDFCommandes $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1156,11 +1156,11 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index afe1213fa23..eeb0fa930ac 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -383,7 +383,7 @@ class pdf_eratosthene extends ModelePDFCommandes $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -831,7 +831,7 @@ class pdf_eratosthene extends ModelePDFCommandes $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1343,13 +1343,13 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); if (empty($hidetop)){ - $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter } } diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index d73ddd4297b..76dafb4f10a 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -279,7 +279,7 @@ class pdf_strato extends ModelePDFContract $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -556,7 +556,7 @@ class pdf_strato extends ModelePDFContract */ // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3); // Rect takes a length in 3rd parameter and 4th parameter } /** diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 8f3441c332c..66a86e4345f 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -320,7 +320,7 @@ class pdf_espadon extends ModelePdfExpedition $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -377,7 +377,7 @@ class pdf_espadon extends ModelePdfExpedition $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -788,13 +788,13 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); if (empty($hidetop)){ - $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter } } diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index dbdfd722168..761201e1836 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -281,7 +281,7 @@ class pdf_merou extends ModelePdfExpedition $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index d3e254c6132..96a166d4ff8 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -350,7 +350,7 @@ class pdf_rouget extends ModelePdfExpedition $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -407,7 +407,7 @@ class pdf_rouget extends ModelePdfExpedition $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -800,7 +800,7 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetFont('', '', $default_font_size - 2); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $pdf->SetDrawColor(128, 128, 128); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 2c24c4338c5..65db52ddce3 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -334,7 +334,7 @@ class pdf_standard extends ModeleExpenseReport $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -525,7 +525,7 @@ class pdf_standard extends ModeleExpenseReport $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -883,7 +883,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetDrawColor(128, 128, 128); - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height); // line prend une position y en 3eme param if (empty($hidetop)) { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 7ec496d385b..fd684801096 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -420,7 +420,7 @@ class pdf_crabe extends ModelePDFFactures $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -455,7 +455,7 @@ class pdf_crabe extends ModelePDFFactures $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -1498,11 +1498,11 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 10bea53032f..7a41a72ba3b 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -414,7 +414,7 @@ class pdf_sponge extends ModelePDFFactures $nexY = max($pdf->GetY(), $nexY); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -1795,13 +1795,13 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); if (empty($hidetop)){ - $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter } } diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 2b5158e6f48..aec300c634d 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -282,7 +282,7 @@ class pdf_soleil extends ModelePDFFicheinter $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -529,7 +529,7 @@ class pdf_soleil extends ModelePDFFicheinter */ // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+1, 0, 0); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+1, 0, 0); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidebottom)) { diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 4c10b7c7864..796f58a6743 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -334,7 +334,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -353,7 +353,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -623,7 +623,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->result = array('fullpath'=>$file); - return 1; // pas d'erreur + return 1; // No error } else { @@ -694,7 +694,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetFont('', '', $default_font_size - 2); // Output Rec - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 119ce6ad632..098adc71c57 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -328,7 +328,7 @@ class pdf_standard extends ModelePDFProduct $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -572,7 +572,7 @@ class pdf_standard extends ModelePDFProduct $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -630,11 +630,11 @@ class pdf_standard extends ModelePDFProduct $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 7721b29a1bf..1d7e30e7e6c 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -267,7 +267,7 @@ class pdf_beluga extends ModelePDFProjects $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-2, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+2); @@ -679,7 +679,7 @@ class pdf_beluga extends ModelePDFProjects $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -717,7 +717,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetDrawColor(128, 128, 128); - // Draw rect of all tab (title + lines). Rect prend une longueur en 3eme param + // Draw rect of all tab (title + lines). Rect takes a length in 3rd parameter $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height); // line prend une position y en 3eme param diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index e4a32541aa9..2e475a05731 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -225,7 +225,7 @@ class pdf_timespent extends ModelePDFProjects $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -437,7 +437,7 @@ class pdf_timespent extends ModelePDFProjects $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -475,7 +475,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetDrawColor(128, 128, 128); - // Draw rect of all tab (title + lines). Rect prend une longueur en 3eme param + // Draw rect of all tab (title + lines). Rect takes a length in 3rd parameter $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height); // line prend une position y en 3eme param diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 59267e25272..c29fc14685a 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -415,7 +415,7 @@ class pdf_azur extends ModelePDFPropales $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -458,7 +458,7 @@ class pdf_azur extends ModelePDFPropales $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -818,7 +818,7 @@ class pdf_azur extends ModelePDFPropales $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1350,11 +1350,11 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index f5784ab1b2b..11c4ac111d1 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -392,7 +392,7 @@ class pdf_cyan extends ModelePDFPropales $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -933,7 +933,7 @@ class pdf_cyan extends ModelePDFPropales $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1457,13 +1457,13 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); if (empty($hidetop)){ - $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+$this->tabTitleHeight, $this->page_largeur-$this->marge_droite, $tab_top+$this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter } } diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 4a16724d614..c3e287a4366 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -274,7 +274,7 @@ class pdf_squille extends ModelePdfReception $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -331,7 +331,7 @@ class pdf_squille extends ModelePdfReception $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -716,7 +716,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetFont('', '', $default_font_size - 2); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $pdf->SetDrawColor(128, 128, 128); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 08e0894bd04..bff8f8b4c43 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -558,7 +558,7 @@ class pdf_standard extends ModelePDFStock $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -738,7 +738,7 @@ class pdf_standard extends ModelePDFStock $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -796,7 +796,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetFont('', 'B', $default_font_size - 3); // Output Rect - //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); $pdf->SetDrawColor(220, 26, 26); @@ -807,7 +807,7 @@ class pdf_standard extends ModelePDFStock if (empty($hidetop)) { - //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L'); } diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 45edfb72cde..e589654feb3 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -732,7 +732,7 @@ class pdf_stdmovement extends ModelePDFMovement $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -794,7 +794,7 @@ class pdf_stdmovement extends ModelePDFMovement $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -852,7 +852,7 @@ class pdf_stdmovement extends ModelePDFMovement $pdf->SetFont('', 'B', $default_font_size - 3); // Output Rect - //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); $pdf->SetDrawColor(220, 26, 26); @@ -864,7 +864,7 @@ class pdf_stdmovement extends ModelePDFMovement //Ref mouv if (empty($hidetop)) { - //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxidref, $tab_top+1); $pdf->MultiCell($this->posxdatemouv-$this->posxdatemouv-0.8, 3, $outputlangs->transnoentities("Ref"), '', 'L'); } diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 2f2e28b5463..a2393d7f63e 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -340,7 +340,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -358,7 +358,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -590,7 +590,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -858,11 +858,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 07070c261cc..ffa0d9edc08 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -355,7 +355,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -785,7 +785,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1141,7 +1141,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter foreach ($this->cols as $colKey => $colDef) { @@ -1165,7 +1165,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders } if (empty($hidetop)){ - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter } } diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 61982a05621..9201a586d31 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -388,7 +388,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY = $pdf->GetY(); $height_incoterms=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1); @@ -406,7 +406,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -687,7 +687,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1043,11 +1043,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 3670797da67..3f2dca2757d 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -502,7 +502,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -619,7 +619,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 2ed06067944..e39e8434a8b 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -24,7 +24,7 @@ /** * \file htdocs/core/modules/propale/doc/pdf_azur.modules.php * \ingroup propale - * \brief Fichier de la classe permettant de generer les propales au modele Azur + * \brief File of the class allowing to generate the supplier propals to the Aurore model */ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_proposal/modules_supplier_proposal.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * Class to generate PDF proposal Azur + * Class to generate PDF supplier proposal Aurore */ class pdf_aurore extends ModelePDFSupplierProposal { @@ -391,7 +391,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -685,7 +685,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->result = array('fullpath'=>$file); - return 1; // Pas d'erreur + return 1; // No error } else { @@ -1201,11 +1201,11 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetFont('', '', $default_font_size - 1); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param + $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); From 44ba0deae69c4dc291bff0c04edfc55dbe588a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 20 Sep 2019 17:58:22 +0200 Subject: [PATCH 055/126] fix badge linked resources on fichinter --- htdocs/core/lib/fichinter.lib.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 8f8dea33b97..c17080d53f5 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -66,19 +66,20 @@ function fichinter_prepare_head($object) if ($conf->resource->enabled) { require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; - $nbResource = 0; - $objectres=new Dolresource($db); - if (is_array($objectres->available_resources)) - { - foreach ($objectres->available_resources as $modresources => $resources) - { - $resources=(array) $resources; // To be sure $resources is an array - foreach($resources as $resource_obj) - { - $linked_resources = $object->getElementResources('fichinter', $object->id, $resource_obj); - } - } - } + $objectres = new Dolresource($db); + $linked_resources = $objectres->getElementResources('fichinter', $object->id); + $nbResource = (is_array($linked_resources)?count($linked_resources):0); + // if (is_array($objectres->available_resources)) + // { + // foreach ($objectres->available_resources as $modresources => $resources) + // { + // $resources=(array) $resources; // To be sure $resources is an array + // foreach($resources as $resource_obj) + // { + // $linked_resources = $object->getElementResources('fichinter', $object->id, $resource_obj); + // } + // } + // } $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=fichinter&element_id='.$object->id; $head[$h][1] = $langs->trans("Resources"); From 86e8abde65635e41479af3dd250014ff10108f92 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 22 Sep 2019 11:18:54 +0200 Subject: [PATCH 056/126] Fix warning --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 2eead6da81d..9c2f8ea737c 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; */ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 0, $mode = '') { - global $user,$conf,$langs,$dolibarr_main_db_name; + global $user,$conf,$langs,$dolibarr_main_db_name, $mysoc; $mainmenu=(empty($_SESSION["mainmenu"])?'':$_SESSION["mainmenu"]); $leftmenu=(empty($_SESSION["leftmenu"])?'':$_SESSION["leftmenu"]); From 14c98bea157941f4cbaafb985b108f41ecbaff02 Mon Sep 17 00:00:00 2001 From: oscim Date: Sun, 22 Sep 2019 11:34:28 +0200 Subject: [PATCH 057/126] Update livraison.class.php for correct display object link in card other object (shipping) --- htdocs/livraison/class/livraison.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 093a1c3ab1e..aa1f59cdfc4 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -844,6 +844,12 @@ class Livraison extends CommonObject elseif ($statut==0) return $langs->trans($this->statuts[$statut]); elseif ($statut==1) return $langs->trans($this->statuts[$statut]); } + elseif ($mode == 3) + { + if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'),'statut5'); + if ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'),'statut0'); + if ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'),'statut4'); + } elseif ($mode == 4) { if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5').' '.$langs->trans('StatusDeliveryCanceled'); From aed017deab26924d048f169d8b7e25186ce1e743 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 22 Sep 2019 09:36:18 +0000 Subject: [PATCH 058/126] Fixing style errors. --- htdocs/livraison/class/livraison.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index aa1f59cdfc4..afc1d89538c 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -846,9 +846,9 @@ class Livraison extends CommonObject } elseif ($mode == 3) { - if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'),'statut5'); - if ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'),'statut0'); - if ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'),'statut4'); + if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); + if ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); + if ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); } elseif ($mode == 4) { From 98acfd6929369ff11a0e6fb2f1583b16b4c36b4a Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 22 Sep 2019 11:57:33 +0200 Subject: [PATCH 059/126] Add basic stats to new dashboard --- htdocs/index.php | 51 ++++++++++++++++++++++++++++-- htdocs/theme/eldy/info-box.inc.php | 28 ++++++++++++++++ 2 files changed, 76 insertions(+), 3 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index d50b5248fab..9151ead38b8 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -514,47 +514,55 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { 'project' => array( 'groupName' => 'Projects', + 'globalStatsKey' => 'projects', 'stats' => array('project', 'project_task'), ), 'propal' => array( 'groupName' => 'Proposals', + 'globalStatsKey' => 'proposals', 'stats' => array('propal_opened', 'propal_signed'), ), 'commande' => array( 'groupName' => 'Orders', + 'globalStatsKey' => 'orders', 'stats' => array('commande'), ), 'facture' => array( 'groupName' => 'Invoices', + 'globalStatsKey' => 'invoices', 'stats' => array('facture'), ), 'contrat' => array( 'groupName' => 'Contracts', + 'globalStatsKey' => 'Contracts', 'stats' => array('contrat_inactive', 'contrat_active'), ), 'supplier_proposal' => array( 'groupName' => 'SupplierProposals', + 'globalStatsKey' => 'askprice', 'stats' => array('supplier_proposal_opened', 'supplier_proposal_signed'), ), 'order_supplier' => array( 'groupName' => 'SuppliersOrders', + 'globalStatsKey' => 'supplier_orders', 'stats' => array('order_supplier'), ), 'invoice_supplier' => array( 'groupName' => 'BillsSuppliers', + 'globalStatsKey' => 'supplier_invoices', 'stats' => array('invoice_supplier'), ), @@ -567,18 +575,21 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { 'Adherent' => array( 'groupName' => 'Members', + 'globalStatsKey' => 'members', 'stats' => array('Adherent'), ), 'ExpenseReport' => array( 'groupName' => 'ExpenseReport', + 'globalStatsKey' => 'expensereports', 'stats' => array('ExpenseReport'), ), 'Holiday' => array( 'groupName' => 'Holidays', + 'globalStatsKey' => 'holidays', 'stats' => array('Holiday'), ), @@ -672,12 +683,46 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { if (!empty($boards)) { $groupName = $langs->trans($groupElement['groupName']); $groupKeyLowerCase = strtolower($groupKey); + $nbTotalForGroup = 0; + + // global stats + $globalStatsKey = false; + if (!empty($groupElement['globalStatsKey']) && empty($groupElement['globalStats'])){ // can be filled by hook + $globalStatsKey = $groupElement['globalStatsKey']; + $groupElement['globalStats'] = array(); + + if(in_array($globalStatsKey, $keys)) + { + // get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links + $keyIndex = array_search($globalStatsKey, $keys); + + $classe=$classes[$keyIndex]; + if (isset($boardloaded[$classe]) && is_object($boardloaded[$classe])) + { + $groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey]?$boardloaded[$classe]->nb[$globalStatsKey]:0; + $nbTotal = doubleval($groupElement['globalStats']['total']); + if($nbTotal>=10000){ $nbTotal = round($nbTotal/1000 , 2) .'k'; } + $groupElement['globalStats']['text'] = $langs->trans('Total').' : '.$langs->trans($titres[$keyIndex]).' ('.$groupElement['globalStats']['total'].')'; + $groupElement['globalStats']['total'] = $nbTotal; + $groupElement['globalStats']['link'] = $links[$keyIndex]; + } + } + } + $openedDashBoard .= '
' . "\n"; $openedDashBoard .= '
' . "\n"; - $openedDashBoard .= ' ' . "\n"; - $openedDashBoard .= '
' . "\n"; - $openedDashBoard .= ' ' . $groupName . '' . "\n"; + $openedDashBoard.= ' '."\n"; + $openedDashBoard.= ' '."\n"; + + if(!empty($groupElement['globalStats'])){ + $openedDashBoard.= ' '.$nbTotal.''."\n"; + } + + $openedDashBoard.= ' '."\n"; + $openedDashBoard .= '
' . "\n"; + + $openedDashBoard .= ' '.$groupName.'' . "\n"; foreach ($boards as $board) { if (!empty($board->labelShort)) { diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 3586d310dfa..34254812848 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -8,6 +8,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> */ .info-box { display: block; + position: relative; min-height: 90px; background: #fff; width: 100%; @@ -54,6 +55,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> border-bottom-right-radius: 0; border-bottom-left-radius: 2px; display: block; + overflow: hidden; float: left; height: 90px; width: 90px; @@ -71,6 +73,32 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .info-box-icon > img { max-width: 100%; } +.info-box-icon-text{ + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; + + font-size: 10px; + line-height: 15px; + padding: 0px 3px; + text-align: center; + opacity: 0; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; +} +.info-box-sm .info-box-icon-text{ + overflow: hidden; + width: 80px; +} +.info-box:hover .info-box-icon-text{ + opacity: 1; +} + .info-box-content { padding: 5px 10px; margin-left: 90px; From 0660229602b642a9b7188b0ee8501a586d856463 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 22 Sep 2019 10:05:13 +0000 Subject: [PATCH 060/126] Fixing style errors. --- htdocs/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 9151ead38b8..b18ba2cf3be 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -701,7 +701,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { { $groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey]?$boardloaded[$classe]->nb[$globalStatsKey]:0; $nbTotal = doubleval($groupElement['globalStats']['total']); - if($nbTotal>=10000){ $nbTotal = round($nbTotal/1000 , 2) .'k'; } + if($nbTotal>=10000){ $nbTotal = round($nbTotal/1000, 2) .'k'; } $groupElement['globalStats']['text'] = $langs->trans('Total').' : '.$langs->trans($titres[$keyIndex]).' ('.$groupElement['globalStats']['total'].')'; $groupElement['globalStats']['total'] = $nbTotal; $groupElement['globalStats']['link'] = $links[$keyIndex]; From 9e55fee6e44825e47204bec4d6fc55e35b185b25 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 22 Sep 2019 13:46:11 +0200 Subject: [PATCH 061/126] Prepare global stats replacement --- htdocs/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 9151ead38b8..a8158f6e473 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -662,7 +662,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { // Show dashboard $nbworkboardempty = 0; - $isIntopOpenedDashBoard = array(); + $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array(); if (!empty($valid_dashboardlines)) { $openedDashBoard = ''; @@ -716,6 +716,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $openedDashBoard.= ' '."\n"; if(!empty($groupElement['globalStats'])){ + $globalStatInTopOpenedDashBoard[] = $groupElement['globalStats']; $openedDashBoard.= ' '.$nbTotal.''."\n"; } From 913c298a9178bd84870a4f64c78073a959e8fce8 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 22 Sep 2019 20:59:28 +0200 Subject: [PATCH 062/126] Auto remove basic stats if in new opened dashboard --- htdocs/index.php | 98 +++++++++++++++++++----------- htdocs/theme/eldy/info-box.inc.php | 7 +++ 2 files changed, 70 insertions(+), 35 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 45c7e1509e2..28a1a54e2ad 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -107,27 +107,21 @@ if (! empty($conf->global->MAIN_MOTD)) * Dashboard Dolibarr states (statistics) * Hidden for external users */ -$boxstat=''; + + +$boxstatItems = array(); +$boxstatFromHook = ''; // Load translation files required by page $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts')); if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { - $boxstat.='
'; - $boxstat.=''; - $boxstat.=''; - $boxstat.=''; - $boxstat.=''; - $boxstat.=''; - $boxstat.='
'; - $boxstat.='
'.$langs->trans("DolibarrStateBoard").'
'; - $boxstat.='
'; - $object=new stdClass(); $parameters=array(); $action=''; $reshook=$hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $boxstat.=$hookmanager->resPrint; + $boxstatFromHook=$hookmanager->resPrint; if (empty($reshook)) { @@ -318,6 +312,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT { if ($conditions[$key]) { + $boxstatItem = ''; $classe=$classes[$key]; // Search in cache if load_state_board is already realized if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe])) @@ -336,28 +331,17 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT if (!empty($langfile[$key])) $langs->load($langfile[$key]); $text=$langs->trans($titres[$key]); - $boxstat.=''; - $boxstat.='
'; - $boxstat.=''.$text.'
'; - $boxstat.=''.img_object("", $icons[$key], 'class="inline-block"').' '.($board->nb[$val]?$board->nb[$val]:0).''; - $boxstat.='
'; - $boxstat.='
'; + $boxstatItem.=''; + $boxstatItem.='
'; + $boxstatItem.=''.$text.'
'; + $boxstatItem.=''.img_object("", $icons[$key], 'class="inline-block"').' '.($board->nb[$val]?$board->nb[$val]:0).''; + $boxstatItem.='
'; + $boxstatItem.='
'; + + $boxstatItems[$val] = $boxstatItem; } } } - - $boxstat.='
'; - $boxstat.='
'; - $boxstat.='
'; - $boxstat.='
'; - $boxstat.='
'; - $boxstat.='
'; - $boxstat.='
'; - $boxstat.='
'; - - $boxstat.='
'; - $boxstat.='
'; } @@ -589,7 +573,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { 'Holiday' => array( 'groupName' => 'Holidays', - 'globalStatsKey' => 'holidays', + 'globalStatsKey' => 'holidays', 'stats' => array('Holiday'), ), @@ -710,18 +694,18 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } - $openedDashBoard .= '
' . "\n"; - $openedDashBoard .= '
' . "\n"; + $openedDashBoard.= '
' . "\n"; + $openedDashBoard.= '
' . "\n"; $openedDashBoard.= ' '."\n"; $openedDashBoard.= ' '."\n"; if(!empty($groupElement['globalStats'])){ - $globalStatInTopOpenedDashBoard[] = $groupElement['globalStats']; + $globalStatInTopOpenedDashBoard[] = $globalStatsKey; $openedDashBoard.= ' '.$nbTotal.''."\n"; } $openedDashBoard.= ' '."\n"; - $openedDashBoard .= '
' . "\n"; + $openedDashBoard .= '
' . "\n"; $openedDashBoard .= ' '.$groupName.'' . "\n"; @@ -900,6 +884,50 @@ $boxlist.=$resultboxes['boxlista']; $boxlist.= '
'; + +if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) +{ + // Remove allready present info in new dash board + if(!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0){ + foreach ( $boxstatItems as $boxstatItemKey => $boxstatItemHtml) { + if (in_array($boxstatItemKey, $globalStatInTopOpenedDashBoard)) { + unset($boxstatItems[$boxstatItemKey]); + } + } + } + + if(!empty($boxstatFromHook) || !empty($boxstatItems)){ + $boxstat.='
'; + $boxstat.=''; + $boxstat.=''; + $boxstat.=''; + $boxstat.=''; + $boxstat.=''; + $boxstat.='
'; + $boxstat.='
'.$langs->trans("DolibarrStateBoard").'
'; + $boxstat.='
'; + + $boxstat.=$boxstatFromHook; + + if(is_array($boxstatItems) && count($boxstatItems) > 0) + { + $boxstat.= implode('', $boxstatItems); + } + + $boxstat.='
'; + $boxstat.='
'; + $boxstat.='
'; + $boxstat.='
'; + $boxstat.='
'; + $boxstat.='
'; + $boxstat.='
'; + $boxstat.='
'; + + $boxstat.='
'; + $boxstat.='
'; + } +} + $boxlist.= '
'; $boxlist.=$boxstat; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 34254812848..a483b3d758d 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -91,6 +91,13 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> -webkit-transition: opacity 0.5s, visibility 0s 0.5s; transition: opacity 0.5s, visibility 0s 0.5s; } + +global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)){ ?> +.info-box-icon-text{ + opacity: 1; +} + + .info-box-sm .info-box-icon-text{ overflow: hidden; width: 80px; From cc5c6c0c76a7b8cef8ae69b842dde8ba4f171dc6 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 22 Sep 2019 19:09:02 +0000 Subject: [PATCH 063/126] Fixing style errors. --- htdocs/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 28a1a54e2ad..bce3b9dc083 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -889,7 +889,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT { // Remove allready present info in new dash board if(!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0){ - foreach ( $boxstatItems as $boxstatItemKey => $boxstatItemHtml) { + foreach ($boxstatItems as $boxstatItemKey => $boxstatItemHtml) { if (in_array($boxstatItemKey, $globalStatInTopOpenedDashBoard)) { unset($boxstatItems[$boxstatItemKey]); } From 31094936c1ab3524c0e07ee17d1b2c91a5a2a92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 23 Sep 2019 10:56:11 +0200 Subject: [PATCH 064/126] wip --- htdocs/core/boxes/box_contracts.php | 5 ++++- htdocs/core/boxes/box_factures_fourn.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 43ade84ad20..c304800f4c1 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -84,7 +84,8 @@ class box_contracts extends ModeleBoxes $thirdpartytmp=new Societe($db); $sql = "SELECT s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; - $sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture"; + $sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture"; + $sql.= ", c.ref_customer, c.ref_supplier"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.fk_soc = s.rowid"; @@ -117,6 +118,8 @@ class box_contracts extends ModeleBoxes $contractstatic->statut=$objp->fk_statut; $contractstatic->id=$objp->rowid; $contractstatic->ref=$objp->ref; + $contractstatic->ref_customer = $objp->ref_customer; + $contractstatic->ref_supplier = $objp->ref_supplier; $result=$contractstatic->fetch_lines(); $thirdpartytmp->name = $objp->name; diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 9d2e8e995e3..ce355f53e1e 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -87,7 +87,7 @@ class box_factures_fourn extends ModeleBoxes if ($user->rights->fournisseur->facture->lire) { $sql = "SELECT s.nom as name, s.rowid as socid,"; - $sql.= " s.code_fournisseur,"; + $sql.= " s.code_fournisseur, s.email,"; $sql.= " s.logo,"; $sql.= " f.rowid as facid, f.ref, f.ref_supplier,"; $sql.= " f.total_ht,"; @@ -133,6 +133,7 @@ class box_factures_fourn extends ModeleBoxes $thirdpartytmp->id = $objp->socid; $thirdpartytmp->name = $objp->name; + $thirdpartytmp->email = $objp->email; $thirdpartytmp->fournisseur = 1; $thirdpartytmp->code_fournisseur = $objp->code_fournisseur; $thirdpartytmp->logo = $objp->logo; From d5877e9c36fbda0040c67e6b63befbd558eb9480 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2019 11:36:45 +0200 Subject: [PATCH 065/126] FIX Bad currency var used in stripe for connect --- htdocs/stripe/class/stripe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index abc875c370f..626f5533da4 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -325,7 +325,7 @@ class Stripe extends CommonObject } elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL; } - if (! in_array($currency, $arrayzerounitcurrency)) $stripefee = round($fee * 100); + if (! in_array($currency_code, $arrayzerounitcurrency)) $stripefee = round($fee * 100); else $stripefee = round($fee); $paymentintent = null; From 8ac0383fa020b029365cb6e12de68de35bb4a481 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2019 12:36:12 +0200 Subject: [PATCH 066/126] FIX Send email from expense report card. FIX Alias name is not into the email recipient label. --- htdocs/core/actions_sendmails.inc.php | 54 +++++++++++---------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 836652ea819..de3a43d9ce6 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -113,8 +113,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO { $result=$object->fetch($id); - $sendtosocid=0; // Thirdparty on object - if (method_exists($object, "fetch_thirdparty") && ! in_array($object->element, array('societe','member','user','expensereport', 'contact'))) + $sendtosocid=0; // Id of related thirdparty + if (method_exists($object, "fetch_thirdparty") && ! in_array($object->element, array('societe', 'member', 'user', 'expensereport', 'contact'))) { $result=$object->fetch_thirdparty(); if ($object->element == 'user' && $result == 0) $result=1; // Even if not found, we consider ok @@ -124,7 +124,14 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO elseif ($object->element == 'member' || $object->element == 'user') { $thirdparty=$object; - if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; + if ($object->socid > 0) $sendtosocid=$object->socid; + } + elseif ($object->element == 'expensereport') + { + $tmpuser=new User($db); + $tmpuser->fetch($object->fk_user_author); + $thirdparty=$tmpuser; + if ($object->socid > 0) $sendtosocid=$object->socid; } elseif ($object->element == 'societe') { @@ -136,7 +143,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $contact=$object; if ($contact->id > 0) $sendtosocid=$contact->fetch_thirdparty()->id; } - else dol_print_error('', 'Use actions_sendmails.in.php for an element/object that is not supported'); + else dol_print_error('', "Use actions_sendmails.in.php for an element/object '".$object->element."' that is not supported"); if (is_object($hookmanager)) { @@ -162,6 +169,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if ($receiver == '-1') $receiver=array(); else $receiver=array($receiver); } + $tmparray=array(); if (trim($_POST['sendto'])) { @@ -173,22 +181,23 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO foreach($receiver as $key=>$val) { // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party + if ($val == 'thirdparty') // Key selected means currentthird party (may be usd for current member or current user too) { - $tmparray[] = dol_string_nospecial($thirdparty->name, ' ', array(",")).' <'.$thirdparty->email.'>'; + $tmparray[] = dol_string_nospecial($thirdparty->getFullName($langs), ' ', array(",")).' <'.$thirdparty->email.'>'; } // Recipient was provided from combo list - elseif ($val == 'contact') // Id of contact + elseif ($val == 'contact') // Key selected means current contact { - $tmparray[] = dol_string_nospecial($contact->name, ' ', array(",")).' <'.$contact->email.'>'; + $tmparray[] = dol_string_nospecial($contact->getFullName($langs), ' ', array(",")).' <'.$contact->email.'>'; } - elseif ($val) // Id du contact + elseif ($val) // $val is the Id of a contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); $sendtoid[] = $val; } } } + if (!empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) { $receiveruser=$_POST['receiveruser']; @@ -222,16 +231,16 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO foreach($receivercc as $key=>$val) { // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party + if ($val == 'thirdparty') // Key selected means currentthird party (may be usd for current member or current user too) { $tmparray[] = dol_string_nospecial($thirdparty->name, ' ', array(",")).' <'.$thirdparty->email.'>'; } // Recipient was provided from combo list - elseif ($val == 'contact') // Id of contact + elseif ($val == 'contact') // Key selected means current contact { $tmparray[] = dol_string_nospecial($contact->name, ' ', array(",")).' <'.$contact->email.'>'; } - elseif ($val) // Id du contact + elseif ($val) // $val is the Id of a contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); //$sendtoid[] = $val; TODO Add also id of contact in CC ? @@ -414,27 +423,6 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $result=$mailfile->sendfile(); if ($result) { - // Two hooks are available into method $mailfile->sendfile, so dedicated code is no more required - /* - if (! empty($conf->dolimail->enabled)) - { - $mid = (GETPOST('mid','int') ? GETPOST('mid','int') : 0); // Original mail id is set ? - if ($mid) - { - // set imap flag answered if it is an answered mail - $dolimail=new DoliMail($db); - $dolimail->id = $mid; - $res=$dolimail->set_prop($user, 'answered',1); - } - if ($imap==1) - { - // write mail to IMAP Server - $movemail = $mailboxconfig->putMail($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$folder,$deliveryreceipt,$mailfile); - if ($movemail) setEventMessages($langs->trans("MailMovedToImapFolder",$folder), null, 'mesgs'); - else setEventMessages($langs->trans("MailMovedToImapFolder_Warning",$folder), null, 'warnings'); - } - }*/ - // Initialisation of datas of object to call trigger if (is_object($object)) { From 40f75b16d8fdb81a89266799846072f7b8970279 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2019 13:04:22 +0200 Subject: [PATCH 067/126] FIX Substitution of __PROJECT_XXX__ not done --- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/core/actions_massactions.inc.php | 4 ++ htdocs/core/lib/functions.lib.php | 46 ++++++++++++------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index c3b698d3918..a52bdee82cc 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -676,7 +676,7 @@ class ActionComm extends CommonObject $this->socid = $obj->fk_soc; // To have fetch_thirdparty method working $this->contactid = $obj->fk_contact; // To have fetch_contact method working - $this->fk_project = $obj->fk_project; // To have fetch_project method working + $this->fk_project = $obj->fk_project; // To have fetch_projet method working $this->societe->id = $obj->fk_soc; // deprecated //$this->contact->id = $obj->fk_contact; // deprecated diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index d54d2dd02ff..6cd98f00e48 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -384,6 +384,10 @@ if (! $error && $massaction == 'confirm_presend') foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content + if (! empty($conf->projet->enabled) && method_exists($objecttmp, 'fetch_projet') && is_null($objecttmp->project)) + { + $objecttmp->fetch_projet(); + } $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ', array_keys($listofqualifiedobj)) : $objecttmp->id); $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ', $listofqualifiedref) : $objecttmp->ref); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b6b691117a5..268b206919c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3831,6 +3831,8 @@ function dol_print_error($db = '', $error = '', $errors = null) if (empty($dolibarr_main_prod)) print $out; else { + print 'This website is currently temporarly offline. This may be due to a maintenance operation. Current status of operation are on next line...

'."\n"; + $langs->load("errors"); print $langs->trans("DolibarrHasDetectedError").'. '; print $langs->trans("YouCanSetOptionDolibarrMainProdToZero"); define("MAIN_CORE_ERROR", 1); @@ -3859,7 +3861,7 @@ function dol_print_error_email($prefixcode, $errormessage = '', $errormessages = $now=dol_now(); print '