From 3477cf6bd3fc7c92425020a5e95beb53f906acce Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 29 Jan 2019 18:01:28 +0100 Subject: [PATCH 01/12] FIX : must fetch member in current entity --- htdocs/user/class/user.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ef2b828f6e5..42770041a5b 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1483,9 +1483,9 @@ class User extends CommonObject // This user is linked with a member, so we also update member information // if this is an update. $adh=new Adherent($this->db); - $result=$adh->fetch($this->fk_member); + $result=$adh->fetch('',$this->fk_member); - if ($result >= 0) + if ($result > 0) { $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; @@ -1520,7 +1520,7 @@ class User extends CommonObject $error++; } } - else + elseif(!empty($adh->error) || !empty($adh->errors)) { $this->error=$adh->error; $this->errors=$adh->errors; From 0c4e5a6487ec97d894df50bff72154462d0e486f Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 31 Jan 2019 09:30:07 +0100 Subject: [PATCH 02/12] FIX : better test --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 42770041a5b..5a154be7478 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1483,9 +1483,9 @@ class User extends CommonObject // This user is linked with a member, so we also update member information // if this is an update. $adh=new Adherent($this->db); - $result=$adh->fetch('',$this->fk_member); + $result=$adh->fetch($this->fk_member); - if ($result > 0) + if ($result > 0 && $adh->entity == $conf->entity) { $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; From bfc7265cbc7ce819277ae5f6d3e2ff842c83974c Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 31 Jan 2019 11:53:10 +0100 Subject: [PATCH 03/12] FIX : better test on fetch --- htdocs/adherents/class/adherent.class.php | 4 ++-- htdocs/user/class/user.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c7807bc6b00..0b3a4dd45d4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -578,7 +578,7 @@ class Adherent extends CommonObject $lthirdparty=new Societe($this->db); $result=$lthirdparty->fetch($this->fk_soc); - if ($result >= 0) + if ($result > 0) { $lthirdparty->address=$this->address; $lthirdparty->zip=$this->zip; @@ -600,7 +600,7 @@ class Adherent extends CommonObject $error++; } } - else + elseif(!empty($lthirdparty->error)) { $this->error=$lthirdparty->error; $error++; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 5a154be7478..e305439e34a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1485,7 +1485,7 @@ class User extends CommonObject $adh=new Adherent($this->db); $result=$adh->fetch($this->fk_member); - if ($result > 0 && $adh->entity == $conf->entity) + if ($result > 0) { $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; From 75845a990f6d33f74d39173faca5428cbc08e7f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Feb 2019 22:55:28 +0100 Subject: [PATCH 04/12] FIX Missing province in export of invoice --- htdocs/core/modules/modFacture.class.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index dc7448fc8f2..9951f4b2d31 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -209,7 +209,8 @@ class modFacture extends DolibarrModules $this->export_icon[$r] = 'invoice'; $this->export_permission[$r] = array(array("facture", "facture", "export", "other")); $this->export_fields_array[$r] = array( - 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone', + 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State', + 's.phone'=>'Phone', 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"InvoiceId", 'f.facnumber'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer', @@ -231,7 +232,7 @@ class modFacture extends DolibarrModules $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; } $this->export_TypeFields_array[$r] = array( - 's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', + 's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.rowid'=>'Numeric', 'f.facnumber'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date", 'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'none.rest'=>"NumericCompute", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric', @@ -261,7 +262,8 @@ class modFacture extends DolibarrModules $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; - $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as cd on s.fk_departement = cd.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture as f'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON f.fk_user_author = uc.rowid'; @@ -281,7 +283,8 @@ class modFacture extends DolibarrModules $this->export_icon[$r] = 'invoice'; $this->export_permission[$r] = array(array("facture", "facture", "export")); $this->export_fields_array[$r] = array( - 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone', + 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State', + 's.phone'=>'Phone', 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"InvoiceId", 'f.facnumber'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer', @@ -301,7 +304,7 @@ class modFacture extends DolibarrModules $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; } $this->export_TypeFields_array[$r] = array( - 's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', + 's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.rowid'=>"Numeric", 'f.facnumber'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date", 'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'none.rest'=>'NumericCompute', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', @@ -323,7 +326,8 @@ class modFacture extends DolibarrModules $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid,'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as cd on s.fk_departement = cd.rowid,'; $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture as f'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON f.fk_user_author = uc.rowid'; From bb3225809be41560e257b5b9a0d0f2a47db9444d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 2 Feb 2019 18:43:25 +0100 Subject: [PATCH 05/12] Fix warehouse fetch was not checking parameters. Fixes #10414 --- htdocs/product/stock/class/entrepot.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 039918ea66c..add121b902e 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -308,6 +308,16 @@ class Entrepot extends CommonObject { global $conf; + dol_syslog(get_class($this)."::fetch id=".$id." ref=".$ref); + + // Check parameters + if (! $id && ! $ref) + { + $this->error='ErrorWrongParameters'; + dol_syslog(get_class($this)."::fetch ".$this->error); + return -1; + } + $sql = "SELECT rowid, fk_parent, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot"; if ($id) @@ -320,7 +330,6 @@ class Entrepot extends CommonObject if ($ref) $sql.= " AND ref = '".$this->db->escape($ref)."'"; } - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { From f8b10e9c3d36b977c48718a7439306eb537b846e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Feb 2019 18:47:55 +0100 Subject: [PATCH 06/12] Doxygen --- htdocs/core/modules/modFournisseur.class.php | 5 ++--- htdocs/core/modules/modTicket.class.php | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 16712d21ec2..9033d2de8cd 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -20,11 +20,10 @@ */ /** - * \defgroup fournisseur suppliers Module - * \brief Module to manage companies and contacts of supplier type + * \defgroup fournisseur Module suppliers * \file htdocs/core/modules/modFournisseur.class.php * \ingroup fournisseur - * \brief Description and activation file for module Fournisseur + * \brief Description and activation file for module Supplier */ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 08f1050df32..98252c655b4 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -18,8 +18,7 @@ */ /** - * \defgroup ticket Ticket module - * \brief Ticket module descriptor. + * \defgroup ticket Module Ticket * \file core/modules/modTicket.class.php * \ingroup ticket * \brief Description and activation file for module Ticket From 9c41f41c24b861c9c15e86257b5ec38858898993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 2 Feb 2019 18:33:48 +0100 Subject: [PATCH 07/12] add missing require date.lib.php --- htdocs/cron/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index c89cfe1895d..cf50028450c 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2016 Laurent Destailleur + * Copyright (C) 2019 Frédéric 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 @@ -28,6 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin","cron","bills","members")); From 62d677118dc70d6cc7517bbd458b1094e5807167 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Feb 2019 19:24:18 +0100 Subject: [PATCH 08/12] Update adherent.class.php --- htdocs/adherents/class/adherent.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0b3a4dd45d4..ac3e6890cf4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -600,7 +600,7 @@ class Adherent extends CommonObject $error++; } } - elseif(!empty($lthirdparty->error)) + elseif ($result < 0) { $this->error=$lthirdparty->error; $error++; @@ -689,7 +689,6 @@ class Adherent extends CommonObject $this->db->rollback(); return -1; } - } /** From bd2c7092a47737f0a38859ed9bf9cd27e6b68e42 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Feb 2019 19:25:11 +0100 Subject: [PATCH 09/12] Update user.class.php --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e305439e34a..1b414795c24 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1520,7 +1520,7 @@ class User extends CommonObject $error++; } } - elseif(!empty($adh->error) || !empty($adh->errors)) + elseif ($result < 0) { $this->error=$adh->error; $this->errors=$adh->errors; From a520642d9773964fbe1c9c3ac85a420ce15354e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Feb 2019 19:54:55 +0100 Subject: [PATCH 10/12] FIX Price in combo list of service does not use the correct price level --- htdocs/contrat/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index d53413efee0..6362759e6d0 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1318,6 +1318,8 @@ else { $object->fetch_thirdparty(); + $soc = $object->thirdparty; // $soc is used later + $result=$object->fetch_lines(); // This also init $this->nbofserviceswait, $this->nbofservicesopened, $this->nbofservicesexpired=, $this->nbofservicesclosed if ($result < 0) { dol_print_error($db,$object->error); From 72f78ecf3b170e0d95e6e5acdfa27ce49d7193f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Feb 2019 20:02:05 +0100 Subject: [PATCH 11/12] FIX #10460 compatibility with MariaDB 10.4 --- htdocs/comm/action/class/actioncomm.class.php | 3 +-- htdocs/core/boxes/box_actions.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index be8ad550b39..07ebcef2f8d 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1020,8 +1020,7 @@ class ActionComm extends CommonObject $this->nb=array(); $sql = "SELECT count(a.id) as nb"; } - $sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a"; - $sql.= ")"; + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " WHERE 1 = 1"; diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index f6d9d03dccf..565634ec95b 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -85,8 +85,7 @@ class box_actions extends ModeleBoxes $sql.= ", s.nom as name"; $sql.= ", s.rowid as socid"; $sql.= ", s.code_client"; - $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, "; - $sql.= MAIN_DB_PREFIX."actioncomm AS a)"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm AS ta, ".MAIN_DB_PREFIX."actioncomm AS a"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " WHERE a.fk_action = ta.id"; From cdfeeafab98e6e518379d36bc55e0860fd3b92aa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Feb 2019 21:12:05 +0100 Subject: [PATCH 12/12] FIX #10381 --- htdocs/compta/localtax/index.php | 6 +++--- htdocs/compta/tva/index.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index c62034ee65c..0c96f728fd6 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -120,7 +120,7 @@ function pt($db, $sql, $date) if ($obj->mode == 'claimed' && ! empty($previousmode)) { print ''; - print ''.$obj->dm."\n"; + print ''.$previousmonth."\n"; print ''.price($amountclaimed)."\n"; print ''.price($amountpaid)."\n"; print "\n"; @@ -270,7 +270,7 @@ $mend = $tmp['mon']; $total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; $i=0; $mcursor=0; -while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop +while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop { //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); if ($m == 13) $y++; @@ -535,7 +535,7 @@ while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcu if ($i > 2) { print ''; - print ''.$langs->trans("SubTotal").':'; + print ''.$langs->trans("SubTotal").':'; print ''.price(price2num($subtotalcoll,'MT')).''; print ''.price(price2num($subtotalpaye,'MT')).''; print ''.price(price2num($subtotal,'MT')).''; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 5c346ca9ced..6b0c2875d42 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -504,7 +504,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc if ($i > 2) { print ''; - print ''.$langs->trans("SubTotal").':'; + print ''.$langs->trans("SubTotal").':'; print ''.price(price2num($subtotalcoll,'MT')).''; print ''.price(price2num($subtotalpaye,'MT')).''; print ''.price(price2num($subtotal,'MT')).'';