From 86d88709394adfe0cc9059e675f71778fb3546c6 Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 11 Sep 2014 14:01:39 +0200 Subject: [PATCH 01/36] Add create button on predefined invoice details Check invoice creation right --- ChangeLog | 1 + htdocs/compta/facture/fiche-rec.php | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f7bee20186..2d07bcb5114 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ For users: - Fix: Iban was used instead of Bic into SEPA file. - Fix: Must unaccent strings into SEPA file. - Fix: Extrafield feature select from table should try to translate multiple column when not needed +- New: Direct invoice creation from predefined invoice ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 1929a8a3721..dc794a394c4 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -507,9 +507,14 @@ else */ print '
'; + if ($object->statut == 0 && $user->rights->facture->creer) + { + echo ''; + } + if ($object->statut == 0 && $user->rights->facture->supprimer) { - print ''.$langs->trans('Delete').''; + print ''; } print '
'; @@ -569,23 +574,18 @@ else print ''.price($objp->total).''."\n"; - if (! $objp->paye) + echo ''; + + if ($user->rights->facture->creer) { - if ($objp->fk_statut == 0) - { - print ''.$langs->trans("Draft").''; - } - else - { - print ''.$langs->trans("Validated").''; - } + echo ''; + echo $langs->trans("CreateBill"),''; } else { - print ' '; + echo " "; } - - print "\n"; + echo "\n"; $i++; } } From e71dc6bc325241e9d8629b164346598a73691f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 12:30:37 +0200 Subject: [PATCH 02/36] Created a method generateDocument for several classes Which are: Commande, Contrat, Livraison, Facture, Projet, Propal, Task, Expedition, CommandeFournisseur, FactureFournisseur and therefore deprecated the following methods supplier_order_pdf_create, supplier_invoice_pdf_create, delivery_order_pdf_create, task_pdf_create, propale_pdf_create, project_pdf_create, facture_pdf_create, expedition_pdf_create, commande_pdf_create --- htdocs/comm/propal/class/propal.class.php | 104 ++++++++++++++++ htdocs/commande/class/commande.class.php | 103 ++++++++++++++++ htdocs/compta/facture/class/facture.class.php | 111 ++++++++++++++++- htdocs/contrat/class/contrat.class.php | 100 +++++++++++++++ .../modules/commande/modules_commande.php | 92 +------------- .../modules/contract/modules_contract.php | 90 +------------- .../modules/expedition/modules_expedition.php | 98 +-------------- .../core/modules/facture/modules_facture.php | 98 +-------------- .../modules/livraison/modules_livraison.php | 89 +------------- .../core/modules/project/modules_project.php | 90 +------------- .../modules/project/task/modules_task.php | 89 +------------- .../core/modules/propale/modules_propale.php | 92 +------------- .../modules_facturefournisseur.php | 100 +-------------- .../modules_commandefournisseur.php | 101 +--------------- htdocs/expedition/class/expedition.class.php | 105 ++++++++++++++++ .../class/fournisseur.commande.class.php | 114 +++++++++++++++++- .../fourn/class/fournisseur.facture.class.php | 112 +++++++++++++++++ htdocs/livraison/class/livraison.class.php | 98 +++++++++++++++ htdocs/projet/class/project.class.php | 102 ++++++++++++++++ htdocs/projet/class/task.class.php | 101 ++++++++++++++++ 20 files changed, 1087 insertions(+), 902 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index bb55cde5103..52d57c5251c 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -10,6 +10,7 @@ * Copyright (C) 2010-2011 Philippe Grand * Copyright (C) 2012-214 Christophe Battarel * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -2673,6 +2674,109 @@ class Propal extends CommonObject } } + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force model to use ('' to not force) + * @param Translate $outputlangs Object langs to use for output + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf,$user,$langs; + + $langs->load("propale"); + + $error=0; + + $srctemplatepath=''; + + // Positionne le modele sur le nom du modele a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->PROPALE_ADDON_PDF)) + { + $modele = $conf->global->PROPALE_ADDON_PDF; + } + else + { + $modele = 'azur'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/propale/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + //$obj->message = $message; + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"propal_pdf_create Error: ".$obj->error); + return -1; + } + + } + else + { + dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); + return -1; + } + } + + } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index a12b6dc7256..dd4505ecc95 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -7,6 +7,7 @@ * Copyright (C) 2011 Jean Heimburger * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -3011,6 +3012,108 @@ class Commande extends CommonOrder } } + /** + * Create a document onto disk accordign to template module. + * + * @param string $modele Force le mnodele a utiliser ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf,$user,$langs,$hookmanager; + + $langs->load("orders"); + + $error=0; + + $srctemplatepath=''; + + // Positionne le modele sur le nom du modele a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->COMMANDE_ADDON_PDF)) + { + $modele = $conf->global->COMMANDE_ADDON_PDF; + } + else + { + $modele = 'einstein'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/commande/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + //$obj->message = $message; + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"order_pdf_create Error: ".$obj->error); + return -1; + } + + } + else + { + dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); + return -1; + } + } + } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c46f48ed1c6..ca42b77033b 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2012 Marcos García + * Copyright (C) 2012-2014 Marcos García * Copyright (C) 2013 Cedric Gross * Copyright (C) 2013 Florian Henry * @@ -3222,6 +3222,115 @@ class Facture extends CommonInvoice } } + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int <0 if KO, >0 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf,$user,$langs; + + $langs->load("bills"); + + $error=0; + + // Increase limit for PDF build + $err=error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); + + $srctemplatepath=''; + + // Positionne le modele sur le nom du modele a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->FACTURE_ADDON_PDF)) + { + $modele = $conf->global->FACTURE_ADDON_PDF; + } + else + { + $modele = 'crabe'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/facture/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"facture_pdf_create Error: ".$obj->error); + return -1; + } + + } + else + { + dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); + return -1; + } + } + + + } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index b4cf7c20322..7861846c4a4 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -7,6 +7,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -2339,6 +2340,105 @@ class ContratLigne extends CommonObject } } + /** + * Create a contract document on disk using template defined into CONTRACT_ADDON_PDF + * + * @param string $modele force le modele a utiliser ('' par defaut) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf,$langs,$user,$hookmanager; + + $langs->load("contracts"); + + $error=0; + + $srctemplatepath=''; + + // Positionne modele sur le nom du modele de contrat a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->CONTRACT_ADDON_PDF)) + { + $modele = $conf->global->CONTRACT_ADDON_PDF; + } + else + { + $modele = 'strato'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/contract/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"contract_pdf_create Error: ".$obj->error); + return 0; + } + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + return 0; + } + } } diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index 63806e4cb46..18a586d3b63 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García * * 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 @@ -159,94 +160,9 @@ abstract class ModeleNumRefCommandes * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of Commande class */ -function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function commande_pdf_create(DoliDB $db, Commande $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$user,$langs,$hookmanager; - $langs->load("orders"); - - $error=0; - - $srctemplatepath=''; - - // Positionne le modele sur le nom du modele a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->COMMANDE_ADDON_PDF)) - { - $modele = $conf->global->COMMANDE_ADDON_PDF; - } - else - { - $modele = 'einstein'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/commande/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - //$obj->message = $message; - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - // Success in building document. We build meta file. - dol_meta_create($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,"order_pdf_create Error: ".$obj->error); - return -1; - } - - } - else - { - dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); - return -1; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 689509f2a59..9ffd5d93881 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2014 Marcos García * * 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 @@ -154,92 +155,9 @@ class ModelNumRefContracts * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of Contrat class */ -function contract_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function contract_pdf_create(DoliDB $db, Contrat $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$langs,$user,$hookmanager; - $langs->load("contracts"); - - $error=0; - - $srctemplatepath=''; - - // Positionne modele sur le nom du modele de contrat a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->CONTRACT_ADDON_PDF)) - { - $modele = $conf->global->CONTRACT_ADDON_PDF; - } - else - { - $modele = 'strato'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/contract/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - // Success in building document. We build meta file. - dol_meta_create($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,"contract_pdf_create Error: ".$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index 3f2938ef25f..43292ae95c4 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2011-2013 Philippe Grand + * Copyright (C) 2014 Marcos García * * 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 @@ -149,100 +150,9 @@ abstract class ModelNumRefExpedition * @param string $modele Force le modele a utiliser ('' to not force) * @param Translate $outputlangs Objet lang a utiliser pour traduction * @return int <=0 if KO, >0 if OK + * @deprecated Use the new function generateDocument of Expedition class */ -function expedition_pdf_create($db, $object, $modele, $outputlangs) +function expedition_pdf_create(DoliDB $db, Expedition $object, $modele, $outputlangs) { - global $conf,$user,$langs; - - $langs->load("sendings"); - - $error=0; - - $srctemplatepath=''; - - // Sets the model on the model name to use - if (! dol_strlen($modele)) - { - if (! empty($conf->global->EXPEDITION_ADDON_PDF)) - { - $modele = $conf->global->EXPEDITION_ADDON_PDF; - } - else - { - $modele = 'rouget'; - } - } - - // If selected model is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // We check the model location - $file=dol_buildpath($reldir."core/modules/expedition/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Load the model - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - - $result=$object->fetch_origin(); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - //require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - //dol_delete_preview($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans expedition_pdf_create"); - dol_print_error($db,$obj->error); - return 0; - } - } - else - { - if (! $conf->global->EXPEDITION_ADDON_PDF) - { - print $langs->trans("Error")." ".$langs->trans("Error_EXPEDITION_ADDON_PDF_NotDefined"); - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - } - return 0; - } + return $object->generateDocument($modele, $outputlangs); } diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index ae0d9f98cda..bca513e3fd6 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Marcos García * * 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 @@ -154,101 +155,10 @@ abstract class ModeleNumRefFactures * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int <0 if KO, >0 if OK + * @deprecated Use the new function generateDocument of Facture class */ -function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function facture_pdf_create(DoliDB $db, Facture $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$user,$langs; - - $langs->load("bills"); - - $error=0; - - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); - - $srctemplatepath=''; - - // Positionne le modele sur le nom du modele a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->FACTURE_ADDON_PDF)) - { - $modele = $conf->global->FACTURE_ADDON_PDF; - } - else - { - $modele = 'crabe'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/facture/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - // Success in building document. We build meta file. - dol_meta_create($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,"facture_pdf_create Error: ".$obj->error); - return -1; - } - - } - else - { - dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); - return -1; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php index fe8e4220281..22c25bcfd5f 100644 --- a/htdocs/core/modules/livraison/modules_livraison.php +++ b/htdocs/core/modules/livraison/modules_livraison.php @@ -4,6 +4,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2006-2011 Regis Houssin * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2014 Marcos García * * 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 @@ -154,92 +155,10 @@ abstract class ModeleNumRefDeliveryOrder * @param string $modele force le modele a utiliser ('' to not force) * @param Translate $outputlangs objet lang a utiliser pour traduction * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of Livraison class */ -function delivery_order_pdf_create($db, $object, $modele, $outputlangs='') +function delivery_order_pdf_create(DoliDB $db, Livraison $object, $modele, $outputlangs='') { - global $conf,$user,$langs; - - $langs->load("deliveries"); - - $error=0; - - $srctemplatepath=''; - - // Positionne modele sur le nom du modele de bon de livraison a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->LIVRAISON_ADDON_PDF)) - { - $modele = $conf->global->LIVRAISON_ADDON_PDF; - } - else - { - $modele = 'typhon'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/livraison/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object,$outputlangs) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans delivery_order_pdf_create"); - dol_print_error($db,$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $object->generateDocument($modele, $outputlangs); } diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index ecaf0213bc0..54d981e51a4 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -1,5 +1,6 @@ + * Copyright (C) 2014 Marcos García * * 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 @@ -151,93 +152,10 @@ abstract class ModeleNumRefProjects * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of Project class */ -function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function project_pdf_create(DoliDB $db, Project $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$langs; - $langs->load("projects"); - - $error=0; - - $srctemplatepath=''; - - // Positionne modele sur le nom du modele de projet a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->PROJECT_ADDON_PDF)) - { - $modele = $conf->global->PROJECT_ADDON_PDF; - } - else - { - $modele='baleine'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/project/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - // Success in building document. We build meta file. - dol_meta_create($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,"project_pdf_create Error: ".$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index c72d221ead1..f861b1bf002 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -1,6 +1,7 @@ * Copyright (C) 2010 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -152,92 +153,10 @@ abstract class ModeleNumRefTask * @param int $hideref Hide ref * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of Task class */ -function task_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) +function task_pdf_create(DoliDB $db, Task $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { - global $conf,$langs; - $langs->load("projects"); - - $error=0; - - $srctemplatepath=''; - - // Positionne modele sur le nom du modele de projet a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->PROJECT_TASK_ADDON_PDF)) - { - $modele = $conf->global->PROJECT_TASK_ADDON_PDF; - } - else - { - $modele='nodefault'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/project/task/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - // Success in building document. We build meta file. - dol_meta_create($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,"task_pdf_create Error: ".$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); } diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index 04b75bae091..9b0cc1d82a2 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García * * 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 @@ -155,95 +156,10 @@ abstract class ModeleNumRefPropales * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of Propal class */ -function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function propale_pdf_create(DoliDB $db, Propal $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf,$user,$langs; - $langs->load("propale"); - - $error=0; - - $srctemplatepath=''; - - // Positionne le modele sur le nom du modele a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->PROPALE_ADDON_PDF)) - { - $modele = $conf->global->PROPALE_ADDON_PDF; - } - else - { - $modele = 'azur'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/propale/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($db); - //$obj->message = $message; - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - // Success in building document. We build meta file. - dol_meta_create($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($db,"propal_pdf_create Error: ".$obj->error); - return -1; - } - - } - else - { - dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); - return -1; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index 1d4e9f262f8..51eb675057e 100644 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Juanjo Menent * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2014 Marcos García * * 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 @@ -143,105 +144,10 @@ abstract class ModeleNumRefSuppliersInvoices * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK + * */ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf, $user, $langs; - - $langs->load("suppliers"); - - $error=0; - - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); - - $srctemplatepath=''; - - // Set the model on the model name to use - if (! dol_strlen($modele)) - { - if (! empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) - { - $modele = $conf->global->INVOICE_SUPPLIER_ADDON_PDF; - } - else - { - $modele = 'canelle'; - } - } - - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // We checked the location of the model - $file=dol_buildpath($reldir."core/modules/supplier_invoice/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Load the model - if ($filefound) - { - require_once $file; - - $obj = new $classname($db,$object); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans supplier_invoice_pdf_create"); - dol_print_error($db,$obj->error); - return 0; - } - } - else - { - if (! $conf->global->INVOICE_SUPPLIER_ADDON_PDF) - { - print $langs->trans("Error")." ".$langs->trans("Error_INVOICE_SUPPLIER_ADDON_PDF_NotDefined"); - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - } - return 0; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index edf2f928ddb..bc544363b39 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011-2013 Philippe Grand + * Copyright (C) 2014 Marcos García * * 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 @@ -149,104 +150,10 @@ abstract class ModeleNumRefSuppliersOrders * @param int $hidedesc Hide description * @param int $hideref Hide ref * @return int 0 if KO, 1 if OK + * @deprecated Use the new function generateDocument of CommandeFournisseur class */ -function supplier_order_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) +function supplier_order_pdf_create(DoliDB $db, CommandeFournisseur $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { - global $conf, $user, $langs; - $langs->load("suppliers"); - - $error=0; - - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); - - $srctemplatepath=''; - - // Sets the model on the model name to use - if (! dol_strlen($modele)) - { - if (! empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)) - { - $modele = $conf->global->COMMANDE_SUPPLIER_ADDON_PDF; - } - else - { - $modele = 'muscadet'; - } - } - - // If selected model is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // We check the model location - $file=dol_buildpath($reldir."core/modules/supplier_order/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Load the model - if ($filefound) - { - require_once $file; - - $obj = new $classname($db,$object); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($object); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans supplier_order_pdf_create"); - dol_print_error($db,$obj->error); - return 0; - } - } - else - { - if (! $conf->global->COMMANDE_SUPPLIER_ADDON_PDF) - { - print $langs->trans("Error")." ".$langs->trans("Error_COMMANDE_SUPPLIER_ADDON_PDF_NotDefined"); - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - } - return 0; - } + return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index d2527d1fca0..ebadc9d0f4e 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -6,6 +6,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Cedric GROSS + * Copyright (C) 2014 Marcos García * * 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 @@ -1532,6 +1533,110 @@ class Expedition extends CommonObject } } + /** + * Cree un bon d'expedition sur disque + * + * @param string $modele Force le modele a utiliser ('' to not force) + * @param Translate $outputlangs Objet lang a utiliser pour traduction + * @return int <=0 if KO, >0 if OK + */ + public function generateDocument($modele, $outputlangs) + { + global $conf,$user,$langs; + + $langs->load("sendings"); + + $error=0; + + $srctemplatepath=''; + + // Sets the model on the model name to use + if (! dol_strlen($modele)) + { + if (! empty($conf->global->EXPEDITION_ADDON_PDF)) + { + $modele = $conf->global->EXPEDITION_ADDON_PDF; + } + else + { + $modele = 'rouget'; + } + } + + // If selected model is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // We check the model location + $file=dol_buildpath($reldir."core/modules/expedition/doc/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Load the model + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + + $result=$this->fetch_origin(); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // we delete preview files + //require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + //dol_delete_preview($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_syslog("Erreur dans expedition_pdf_create"); + dol_print_error($this->db,$obj->error); + return 0; + } + } + else + { + if (! $conf->global->EXPEDITION_ADDON_PDF) + { + print $langs->trans("Error")." ".$langs->trans("Error_EXPEDITION_ADDON_PDF_NotDefined"); + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + } + return 0; + } + } + } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 4e8c3a650b0..279050d0cd4 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2010-2014 Philippe Grand - * Copyright (C) 2012 Marcos García + * Copyright (C) 2012-2014 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador * @@ -2005,6 +2005,118 @@ class CommandeFournisseur extends CommonOrder return ''; } + + /** + * Create a document onto disk according to template model. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs Object lang to use for traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf, $user, $langs; + $langs->load("suppliers"); + + $error=0; + + // Increase limit for PDF build + $err=error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); + + $srctemplatepath=''; + + // Sets the model on the model name to use + if (! dol_strlen($modele)) + { + if (! empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)) + { + $modele = $conf->global->COMMANDE_SUPPLIER_ADDON_PDF; + } + else + { + $modele = 'muscadet'; + } + } + + // If selected model is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // We check the model location + $file=dol_buildpath($reldir."core/modules/supplier_order/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Load the model + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db,$this); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // we delete preview files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_syslog("Erreur dans supplier_order_pdf_create"); + dol_print_error($this->db,$obj->error); + return 0; + } + } + else + { + if (! $conf->global->COMMANDE_SUPPLIER_ADDON_PDF) + { + print $langs->trans("Error")." ".$langs->trans("Error_COMMANDE_SUPPLIER_ADDON_PDF_NotDefined"); + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + } + return 0; + } + } + + } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4ceea058b4f..d4828338432 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -7,6 +7,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -1670,4 +1671,115 @@ class FactureFournisseur extends CommonInvoice } } + /** + * Create a document onto disk according to template model. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs Object lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf, $user, $langs; + + $langs->load("suppliers"); + + $error=0; + + // Increase limit for PDF build + $err=error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); + + $srctemplatepath=''; + + // Set the model on the model name to use + if (! dol_strlen($modele)) + { + if (! empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) + { + $modele = $conf->global->INVOICE_SUPPLIER_ADDON_PDF; + } + else + { + $modele = 'canelle'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // We checked the location of the model + $file=dol_buildpath($reldir."core/modules/supplier_invoice/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Load the model + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db,$this); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // we delete preview files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_syslog("Erreur dans supplier_invoice_pdf_create"); + dol_print_error($this->db,$obj->error); + return 0; + } + } + else + { + if (! $conf->global->INVOICE_SUPPLIER_ADDON_PDF) + { + print $langs->trans("Error")." ".$langs->trans("Error_INVOICE_SUPPLIER_ADDON_PDF_NotDefined"); + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + } + return 0; + } + } + } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index ffa17862939..3fa7cc3eadc 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2011-2012 Philippe Grand * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -926,6 +927,103 @@ class Livraison extends CommonObject } } + /** + * Create object on disk + * + * @param string $modele force le modele a utiliser ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs='') + { + global $conf,$user,$langs; + + $langs->load("deliveries"); + + $error=0; + + $srctemplatepath=''; + + // Positionne modele sur le nom du modele de bon de livraison a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->LIVRAISON_ADDON_PDF)) + { + $modele = $conf->global->LIVRAISON_ADDON_PDF; + } + else + { + $modele = 'typhon'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/livraison/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this,$outputlangs) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // we delete preview files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_syslog("Erreur dans delivery_order_pdf_create"); + dol_print_error($this->db,$obj->error); + return 0; + } + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + return 0; + } + } + + + } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 8cbaea46c39..4cc130f548b 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * 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 @@ -1305,5 +1306,106 @@ class Project extends CommonObject } } + + /** + * Create an intervention document on disk using template defined into PROJECT_ADDON_PDF + * + * @param string $modele force le modele a utiliser ('' par defaut) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + { + global $conf,$langs; + + $langs->load("projects"); + + $error=0; + + $srctemplatepath=''; + + // Positionne modele sur le nom du modele de projet a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->PROJECT_ADDON_PDF)) + { + $modele = $conf->global->PROJECT_ADDON_PDF; + } + else + { + $modele='baleine'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/project/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // we delete preview files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"project_pdf_create Error: ".$obj->error); + return 0; + } + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + return 0; + } + } + } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index acfad6108e9..5bc94d740f7 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2014 Marcos García * * 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 @@ -1312,4 +1313,104 @@ class Task extends CommonObject } } + /** + * Create an intervention document on disk using template defined into PROJECT_TASK_ADDON_PDF + * + * @param string $modele force le modele a utiliser ('' par defaut) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) + { + global $conf,$langs; + $langs->load("projects"); + + $error=0; + + $srctemplatepath=''; + + // Positionne modele sur le nom du modele de projet a utiliser + if (! dol_strlen($modele)) + { + if (! empty($conf->global->PROJECT_TASK_ADDON_PDF)) + { + $modele = $conf->global->PROJECT_TASK_ADDON_PDF; + } + else + { + $modele='nodefault'; + } + } + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir."core/modules/project/task/pdf/".$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // we delete preview files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"task_pdf_create Error: ".$obj->error); + return 0; + } + } + else + { + print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); + return 0; + } + } + + } From c195c6fd104ced7ffdb0b17ef0119f1854fe6217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 20:35:31 +0200 Subject: [PATCH 03/36] Removed deprecated usage of commande_pdf_create --- htdocs/commande/fiche.php | 29 ++++++++++++++++------------- htdocs/webservices/server_order.php | 2 +- test/phpunit/BuildDocTest.php | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index d73a4c068e1..ccf92cc2b0b 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -178,7 +178,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); @@ -491,7 +491,7 @@ else if ($action == 'setconditions' && $user->rights->commande->creer) { } $ret = $object->fetch($object->id); // Reload to get new records - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } @@ -722,7 +722,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) { $outputlangs->setDefaultLang($newlang); } - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); @@ -847,7 +847,7 @@ else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST(' } $ret = $object->fetch($object->id); // Reload to get new records - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['qty']); @@ -911,8 +911,9 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->co $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } } } } @@ -958,7 +959,7 @@ else if ($action == 'confirm_modif' && $user->rights->commande->creer) { } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } @@ -1023,8 +1024,9 @@ else if ($action == 'up' && $user->rights->commande->creer) { $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); exit(); @@ -1044,8 +1046,9 @@ else if ($action == 'down' && $user->rights->commande->creer) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); exit(); @@ -1073,7 +1076,7 @@ else if ($action == 'builddoc') // In get or post $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $result = commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); @@ -2462,7 +2465,7 @@ if ($action == 'create' && $user->rights->commande->creer) { // Build document if it not exists if (! $file || ! is_readable($file)) { - $result = commande_pdf_create($db, $object, GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); exit(); diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index d70725b468f..c799f0c8169 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -755,7 +755,7 @@ function validOrder($authentication,$id='') { // Define output language $outputlangs = $langs; - commande_pdf_create($db, $order, $order->modelpdf, $outputlangs, 0, 0, 0); + $order->generateDocument($order->modelpdf, $outputlangs); } else diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 50f9598e79e..01bfdc73fa8 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -274,7 +274,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Einstein $localobject->modelpdf='einstein'; - $result=commande_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result = $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; From 610dc8cd0ccf152def10264cecbc94b9f862963a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 20:38:28 +0200 Subject: [PATCH 04/36] Removed deprecated usage of expedition_pdf_create --- htdocs/expedition/fiche.php | 6 +++--- test/phpunit/BuildDocTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 15b0a16a13e..b618ac59a80 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -261,7 +261,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret=$object->fetch($id); // Reload to get new records - $result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs); + $result = $object->generateDocument($object->modelpdf, $outputlangs); } if ($result < 0) { @@ -362,7 +362,7 @@ else if ($action == 'builddoc') // En get ou en post $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - $result=expedition_pdf_create($db,$object,$object->modelpdf,$outputlangs); + $result = $object->generateDocument($object->modelpdf, $outputlangs); if ($result <= 0) { dol_print_error($db,$result); @@ -1598,7 +1598,7 @@ else if ($id || $ref) // Build document if it not exists if (! $file || ! is_readable($file)) { - $result=expedition_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument(GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref)); if ($result <= 0) { dol_print_error($db,$result); diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 01bfdc73fa8..3f2e9d39b37 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -409,14 +409,14 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Merou $localobject->modelpdf='merou'; - $result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result= $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; // Rouget $localobject->modelpdf='rouget'; - $result=expedition_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result= $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; From 4b3191b64e7bd21aa4dc161785b5718d7dfef6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 20:49:05 +0200 Subject: [PATCH 05/36] Removed deprecated usage of facture_pdf_create --- htdocs/adherents/card_subscriptions.php | 3 ++- htdocs/compta/facture.php | 24 +++++++++++++----------- htdocs/compta/paiement/fiche.php | 4 +++- htdocs/compta/payment_sc/fiche.php | 4 +++- htdocs/core/lib/invoice2.lib.php | 2 +- test/phpunit/BuildDocTest.php | 14 +++++++------- 6 files changed, 29 insertions(+), 22 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index c3fdd1176a1..9e2f1f2a8eb 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -482,7 +482,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ } // Generate PDF (whatever is option MAIN_DISABLE_PDF_AUTOUPDATE) so we can include it into email //if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - facture_pdf_create($db, $invoice, $invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + + $invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7bd05f9f806..eb7bd367468 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -190,7 +190,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($id); // Reload to get new records - $result = facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } if ($result >= 0) { header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); @@ -402,7 +402,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($id); // Reload to get new records - facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } else { if (count($object->errors)) setEventMessage($object->errors, 'errors'); @@ -477,7 +477,7 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_ } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($id); // Reload to get new records - facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } @@ -1285,7 +1285,7 @@ else if ($action == 'addline' && $user->rights->facture->creer) } $ret = $object->fetch($id); // Reload to get new records - facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); @@ -1416,7 +1416,7 @@ elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST(' } $ret = $object->fetch($id); // Reload to get new records - facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['qty']); @@ -1459,8 +1459,9 @@ else if ($action == 'up' && $user->rights->facture->creer) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']); exit(); @@ -1481,8 +1482,9 @@ else if ($action == 'down' && $user->rights->facture->creer) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']); exit(); @@ -1705,7 +1707,7 @@ else if ($action == 'builddoc') // En get ou en post $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $result = facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); @@ -3707,7 +3709,7 @@ if ($action == 'create') // Build document if it not exists if (! $file || ! is_readable($file)) { - $result = facture_pdf_create($db, $object, GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); exit(); diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 74ec9f4cb69..e8e19010b83 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -112,7 +112,9 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($_REQUEST['lang_id']); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, $fac->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $fac->generateDocument($fac->modelpdf, $outputlangs); + } } header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/fiche.php index 5c6562b6fc0..d71f73a15e5 100644 --- a/htdocs/compta/payment_sc/fiche.php +++ b/htdocs/compta/payment_sc/fiche.php @@ -98,7 +98,9 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->tax->char $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($_REQUEST['lang_id']); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, $fac->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $fac->generateDocument($fac->modelpdf, $outputlangs); + } } header('Location: fiche.php?id='.$paiement->id); diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index 39405db4468..d5be39aff0f 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -174,7 +174,7 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte if ($regenerate || ! dol_is_file($filename)) { if ($usestdout) print "Build PDF for invoice ".$obj->facnumber." - Lang = ".$outputlangs->defaultlang."\n"; - $result=facture_pdf_create($db, $fac, $regenerate?$regenerate:$fac->modelpdf, $outputlangs); + $result= $fac->generateDocument($regenerate?$regenerate:$fac->modelpdf, $outputlangs); } else { if ($usestdout) print "PDF for invoice ".$obj->facnumber." already exists\n"; diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 3f2e9d39b37..b2ea825f514 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -173,7 +173,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Crabe (english) $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result = $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -181,7 +181,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $newlangs1=new Translate("",$conf); $newlangs1->setDefaultLang('ja_JP'); $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $newlangs1); + $result = $localobject->generateDocument($localobject->modelpdf, $newlangs1); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -189,7 +189,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $newlangs2a=new Translate("",$conf); $newlangs2a->setDefaultLang('sa_SA'); $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $newlangs2a); + $result = $localobject->generateDocument($localobject->modelpdf, $newlangs2a); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -197,7 +197,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $newlangs2b=new Translate("",$conf); $newlangs2b->setDefaultLang('en_SA'); $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $newlangs2b); + $result = $localobject->generateDocument($localobject->modelpdf, $newlangs2b); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -205,7 +205,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $newlangs3=new Translate("",$conf); $newlangs3->setDefaultLang('el_GR'); $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $newlangs3); + $result = $localobject->generateDocument($localobject->modelpdf, $newlangs3); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -213,7 +213,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $newlangs4=new Translate("",$conf); $newlangs4->setDefaultLang('zh_CN'); $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $newlangs4); + $result = $localobject->generateDocument($localobject->modelpdf, $newlangs4); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -221,7 +221,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase $newlangs5=new Translate("",$conf); $newlangs5->setDefaultLang('ru_RU'); $localobject->modelpdf='crabe'; - $result=facture_pdf_create($db, $localobject, $localobject->modelpdf, $newlangs5); + $result = $localobject->generateDocument($localobject->modelpdf, $newlangs5); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; From 9dbf054026f763dd10f9fd5ddbd2f168daaa2302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 20:53:43 +0200 Subject: [PATCH 06/36] Removed deprecated usage of project_pdf_create --- htdocs/livraison/fiche.php | 4 ++-- htdocs/projet/fiche.php | 2 +- htdocs/projet/tasks/task.php | 2 +- test/phpunit/BuildDocTest.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 322635354bf..664a44e644a 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -129,7 +129,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret=$object->fetch($id); // Reload to get new records - $result=delivery_order_pdf_create($db, $object,$_REQUEST['model'],$outputlangs); + $result= $object->generateDocument($_REQUEST['model'],$outputlangs); } if ($result < 0) { @@ -202,7 +202,7 @@ if ($action == 'builddoc') // En get ou en post if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret=$object->fetch($id); // Reload to get new records - $result=delivery_order_pdf_create($db, $object, $object->modelpdf, $outputlangs); + $result= $object->generateDocument($object->modelpdf, $outputlangs); } if ($result < 0) { diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index b87a89181c5..09b85f38cbe 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -276,7 +276,7 @@ if (empty($reshook)) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang(GETPOST('lang_id')); } - $result=project_pdf_create($db, $object, $object->modelpdf, $outputlangs); + $result= $object->generateDocument($object->modelpdf, $outputlangs); if ($result <= 0) { dol_print_error($db,$result); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 7337c152f4e..c9539c424b1 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -159,7 +159,7 @@ if ($action == 'builddoc' && $user->rights->projet->creer) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang(GETPOST('lang_id')); } - $result=task_pdf_create($db, $object, $object->modelpdf, $outputlangs); + $result= $object->generateDocument($object->modelpdf, $outputlangs); if ($result <= 0) { dol_print_error($db,$result); diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index b2ea825f514..e78a6602f6a 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -355,7 +355,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Baleine $localobject->modelpdf='baleine'; - $result=project_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result = $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; From 3561c8e6f3f6ff70ee431f8f3ef3e6e23fb20208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 20:57:17 +0200 Subject: [PATCH 07/36] Removed deprecated usage of propale_pdf_create --- htdocs/comm/propal.php | 20 ++++++++++---------- htdocs/comm/propal/class/propal.class.php | 4 ++-- test/phpunit/BuildDocTest.php | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index bd95e5a67e4..3e530ef8676 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -156,7 +156,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); @@ -176,7 +176,7 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->pr $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } else { $langs->load("errors"); @@ -475,7 +475,7 @@ else if ($action == 'add' && $user->rights->propal->creer) { $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); @@ -676,7 +676,7 @@ if ($action == 'modif' && $user->rights->propal->creer) { $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } @@ -890,7 +890,7 @@ else if ($action == 'addline' && $user->rights->propal->creer) { $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); @@ -1018,7 +1018,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['qty']); @@ -1060,7 +1060,7 @@ else if ($action == 'builddoc' && $user->rights->propal->creer) { $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - $result = propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); @@ -1146,7 +1146,7 @@ else if ($action == 'up' && $user->rights->propal->creer) { $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); @@ -1165,7 +1165,7 @@ else if ($action == 'down' && $user->rights->propal->creer) { $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); @@ -2333,7 +2333,7 @@ if ($action == 'create') { // Build document if it not exists if (! $file || ! is_readable($file)) { - $result = propale_pdf_create($db, $object, GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); exit(); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 52d57c5251c..cb1046f86ee 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1747,7 +1747,7 @@ class Propal extends CommonObject $outputlangs->setDefaultLang($newlang); } //$ret=$object->fetch($id); // Reload to get new records - propale_pdf_create($this->db, $this, $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL?$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL:$this->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $this->generateDocument($conf->global->PROPALE_ADDON_PDF_ODT_TOBILL?$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL:$this->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } // Call trigger @@ -1769,7 +1769,7 @@ class Propal extends CommonObject $outputlangs->setDefaultLang($newlang); } //$ret=$object->fetch($id); // Reload to get new records - propale_pdf_create($this->db, $this, $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED?$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED:$this->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $this->generateDocument($conf->global->PROPALE_ADDON_PDF_ODT_CLOSED?$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED:$this->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } // Call trigger diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index e78a6602f6a..5462121d7ae 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -329,7 +329,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Azur $localobject->modelpdf='azur'; - $result=propale_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result = $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; From 9ae7486555dfaa4d4cb76dfea7b49d2650fad71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 16 Sep 2014 21:42:07 +0200 Subject: [PATCH 08/36] Removed deprecated usage of supplier_order_pdf_create and supplier_invoice_pdf_create --- htdocs/fourn/commande/fiche.php | 24 ++++++++++++++---------- htdocs/fourn/facture/fiche.php | 10 +++++----- test/phpunit/BuildDocTest.php | 4 ++-- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index f4f69fbd269..17475a08b6b 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -352,7 +352,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $outputlangs->setDefaultLang($newlang); } - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); @@ -448,7 +448,7 @@ else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret=$object->fetch($object->id); // Reload to get new records - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } else @@ -473,7 +473,7 @@ else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->r if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret=$object->fetch($object->id); // Reload to get new records - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } else @@ -504,7 +504,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fourn if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret=$object->fetch($object->id); // Reload to get new records - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } else @@ -550,7 +550,7 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou if ($result > 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; @@ -582,7 +582,7 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo if ($result > 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; @@ -689,7 +689,9 @@ else if ($action == 'up' && $user->rights->fournisseur->commande->creer) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($_REQUEST['lang_id']); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); exit; } @@ -703,7 +705,9 @@ else if ($action == 'down' && $user->rights->fournisseur->commande->creer) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($_REQUEST['lang_id']); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); exit; } @@ -721,7 +725,7 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) / $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang(GETPOST('lang_id')); } - $result=supplier_order_pdf_create($db, $object,$object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref); + $result= $object->generateDocument($object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); @@ -2033,7 +2037,7 @@ elseif (! empty($object->id)) // Build document if it not exists if (! $file || ! is_readable($file)) { - $result=supplier_order_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result= $object->generateDocument(GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 9d20c2b9722..de70bf696cc 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -475,7 +475,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; - $result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); @@ -699,7 +699,7 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); @@ -776,7 +776,7 @@ elseif ($action == 'edit' && $user->rights->fournisseur->facture->creer) $outputlangs->setDefaultLang($_REQUEST['lang_id']); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); @@ -1016,7 +1016,7 @@ elseif ($action == 'builddoc') $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - $result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); @@ -2348,7 +2348,7 @@ else // Build document if it not exists if (! $file || ! is_readable($file)) { - $result=supplier_invoice_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument(GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 5462121d7ae..3f20b99fd14 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -247,7 +247,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Canelle $localobject->modelpdf='canelle'; - $result=supplier_invoice_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result = $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; @@ -302,7 +302,7 @@ class BuildDocTest extends PHPUnit_Framework_TestCase // Muscadet $localobject->modelpdf='muscadet'; - $result=supplier_order_pdf_create($db, $localobject, $localobject->modelpdf, $langs); + $result= $localobject->generateDocument($localobject->modelpdf, $langs); $this->assertLessThan($result, 0); print __METHOD__." result=".$result."\n"; From 9ed77c60605d44ebbf61324f03ba316f08adaae4 Mon Sep 17 00:00:00 2001 From: Cubexed Date: Fri, 12 Sep 2014 18:00:55 +0200 Subject: [PATCH 09/36] Closed projects are greyed out in project selector --- htdocs/core/class/html.formprojet.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 4042bb16e31..eafe9d9f166 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -115,12 +115,17 @@ class FormProjets { $disabled=0; $labeltoshow.=' '.dol_trunc($obj->title,$maxlength); - if (! $obj->fk_statut > 0) + if ($obj->fk_statut == 0) { $disabled=1; $labeltoshow.=' - '.$langs->trans("Draft"); } - if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) + else if ($obj->fk_statut == 2) + { + $disabled=1; + $labeltoshow.=' - '.$langs->trans("Closed"); + } + else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled=1; $labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany"); From 7a9ce455d97359d293233590202df4d825e3c375 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 18 Sep 2014 20:13:38 +0200 Subject: [PATCH 10/36] Uniformize code $_SERVER["PHP_SELF"] --- htdocs/accountancy/admin/account.php | 12 ++++++------ htdocs/adherents/cotisations.php | 16 ++++++++-------- htdocs/boutique/client/index.php | 6 +++--- htdocs/boutique/notification/index.php | 2 +- htdocs/boutique/produits/index.php | 6 +++--- htdocs/commande/orderstoinvoice.php | 8 ++++---- htdocs/compta/paiement.php | 10 +++++----- htdocs/compta/paiement/avalider.php | 10 +++++----- htdocs/compta/prelevement/bons.php | 6 +++--- htdocs/compta/prelevement/factures.php | 6 +++--- htdocs/compta/prelevement/lignes.php | 8 ++++---- htdocs/compta/prelevement/rejets.php | 8 ++++---- htdocs/contrat/services.php | 20 ++++++++++---------- htdocs/cron/list.php | 18 +++++++++--------- htdocs/expedition/liste.php | 12 ++++++------ htdocs/fourn/contact.php | 8 ++++---- htdocs/fourn/facture/paiement.php | 16 ++++++++-------- htdocs/product/popuprop.php | 10 +++++----- htdocs/product/reassort.php | 18 +++++++++--------- htdocs/public/members/public_list.php | 9 ++++----- htdocs/societe/notify/fiche.php | 20 ++++++++++---------- htdocs/societe/notify/index.php | 8 ++++---- 22 files changed, 118 insertions(+), 119 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index c42a8d7079b..0c929ef5de5 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -139,12 +139,12 @@ if ($result) { print ''; print ''; - print_liste_field_titre($langs->trans("AccountNumber"), "account.php", "aa.account_number", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Label"), "account.php", "aa.label", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Accountparent"), "account.php", "aa.account_parent", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Pcgtype"), "account.php", "aa.pcg_type", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Pcgsubtype"), "account.php", "aa.pcg_subtype", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Active"), "account.php", "aa.active", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("AccountNumber"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "aa.label", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Accountparent"), $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Pcgtype"), $_SERVER["PHP_SELF"], "aa.pcg_type", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Pcgsubtype"), $_SERVER["PHP_SELF"], "aa.pcg_subtype", "", $param, "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Active"), $_SERVER["PHP_SELF"], "aa.active", "", $param, "", $sortfield, $sortorder); print_liste_field_titre(" "); print ''; diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 2bb7a438f3e..160f47365fa 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -97,17 +97,17 @@ if ($result) print '
'; print ''; - print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.lastname",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"c.note",$param,"",'align="left"',$sortfield,$sortorder); if (! empty($conf->banque->enabled)) { - print_liste_field_titre($langs->trans("Account"),"cotisations.php","b.fk_account",$pram,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"b.fk_account",$pram,"","",$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("Date"),"cotisations.php","c.dateadh",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateEnd"),"cotisations.php","c.datef",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"),"cotisations.php","c.cotisation",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.dateadh",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"c.datef",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"c.cotisation",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; // Static objects diff --git a/htdocs/boutique/client/index.php b/htdocs/boutique/client/index.php index 358a74a750f..b22c478f320 100644 --- a/htdocs/boutique/client/index.php +++ b/htdocs/boutique/client/index.php @@ -47,7 +47,7 @@ if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; -print_barre_liste("Liste des clients", $page, "index.php"); +print_barre_liste("Liste des clients", $page, $_SERVER["PHP_SELF"]); $sql = "SELECT c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_newsletter"; $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."customers as c"; @@ -61,8 +61,8 @@ if ($resql) $i = 0; print "
"; print ""; - print_liste_field_titre($langs->trans("Firstname"),"index.php", "c.customers_firstname"); - print_liste_field_titre($langs->trans("Lastname"),"index.php", "c.customers_lastname"); + print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"], "c.customers_firstname"); + print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"], "c.customers_lastname"); print ''; print "\n"; $var=True; diff --git a/htdocs/boutique/notification/index.php b/htdocs/boutique/notification/index.php index f8a24c5a52c..f94c08018d8 100644 --- a/htdocs/boutique/notification/index.php +++ b/htdocs/boutique/notification/index.php @@ -62,7 +62,7 @@ if ($resql) $i = 0; print "
'.$langs->trans("EMail").''.$langs->trans("Newsletter").'
"; print ""; - print_liste_field_titre("Client","index.php", "c.customers_lastname"); + print_liste_field_titre("Client",$_SERVER["PHP_SELF"], "c.customers_lastname"); print ''; print "\n"; $var=True; diff --git a/htdocs/boutique/produits/index.php b/htdocs/boutique/produits/index.php index 02db7d5db2b..13ad3463af9 100644 --- a/htdocs/boutique/produits/index.php +++ b/htdocs/boutique/produits/index.php @@ -44,7 +44,7 @@ if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; -print_barre_liste("Liste des clients", $page, "index.php"); +print_barre_liste("Liste des clients", $page, $_SERVER["PHP_SELF"]); $sql = "SELECT c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_newsletter"; $sql .= " FROM ".DB_NAME_OSC.".customers as c"; @@ -58,8 +58,8 @@ if ($resql) $i = 0; print "
'.$langs->trans("Product").'
"; print ""; - print_liste_field_titre($langs->trans("Firstname"),"index.php", "c.customers_firstname"); - print_liste_field_titre($langs->trans("Lastname"),"index.php", "c.customers_lastname"); + print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"], "c.customers_firstname"); + print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"], "c.customers_lastname"); print ''; print "\n"; $var=True; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index f6cb4a27863..eb29889f115 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -579,10 +579,10 @@ if (($action != 'create' && $action != 'add') || !$error) print '
'.$langs->trans("EMail").''.$langs->trans("Newsletter").'
'; print ''; - print_liste_field_titre($langs->trans('Ref'),'orderstoinvoice.php','c.ref','','&socid='.$socid,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('RefCustomerOrder'),'orderstoinvoice.php','c.ref_client','','&socid='.$socid,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('OrderDate'),'orderstoinvoice.php','c.date_commande','','&socid='.$socid, 'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('DeliveryDate'),'orderstoinvoice.php','c.date_livraison','','&socid='.$socid, 'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','','&socid='.$socid,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','','&socid='.$socid,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','','&socid='.$socid, 'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','','&socid='.$socid, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),'','','','','align="right"'); print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"'); print ''; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index e7d11fb1b99..1cfc507e4df 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -686,13 +686,13 @@ if (! GETPOST('action')) $i = 0; $var=True; - print_barre_liste($langs->trans('Payments'), $page, 'paiement.php','',$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans('Payments'), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num); print '
'; print ''; - print_liste_field_titre($langs->trans('Invoice'),'paiement.php','facnumber','','','',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Date'),'paiement.php','dp','','','',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Type'),'paiement.php','libelle','','','',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Amount'),'paiement.php','fa_amount','','','align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Invoice'),$_SERVER["PHP_SELF"],'facnumber','','','',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'dp','','','',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Type'),$_SERVER["PHP_SELF"],'libelle','','','',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Amount'),$_SERVER["PHP_SELF"],'fa_amount','','','align="right"',$sortfield,$sortorder); print ''; print "\n"; diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 70e7507b96e..3d5fa3935de 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -80,14 +80,14 @@ if ($resql) $i = 0; $var=True; - print_barre_liste($langs->trans("ReceivedCustomersPaymentsToValid"), $page, "avalider.php","",$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans("ReceivedCustomersPaymentsToValid"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num); print '
 
'; print ''; - print_liste_field_titre($langs->trans("Ref"),"avalider.php","p.rowid","","",'width="60"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),"avalider.php","dp","","",'width="80" align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),"avalider.php","c.libelle","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountTTC"),"avalider.php","c.libelle","","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.rowid","","",'width="60"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","","",'width="80" align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","","","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"c.libelle","","",'align="right"',$sortfield,$sortorder); print ""; print "\n"; diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 97e4401ec27..8c55d8b556c 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -73,14 +73,14 @@ if ($result) $urladd= "&statut=".$statut; - print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, "bons.php", $urladd, $sortfield, $sortorder, '', $num); + print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num); print"\n\n"; print '
 
'; print ''; - print_liste_field_titre($langs->trans("WithdrawalsReceipts"),"bons.php","p.ref",'','','class="liste_titre"'); - print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"'); + print_liste_field_titre($langs->trans("WithdrawalsReceipts"),$_SERVER["PHP_SELF"],"p.ref",'','','class="liste_titre"'); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"p.datec","","",'class="liste_titre" align="center"'); print ''; print ''; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 92cd8c4c6a9..31a726828ff 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -144,9 +144,9 @@ if ($result) print"\n\n"; print '
'.$langs->trans("Amount").'
'; print ''; - print_liste_field_titre($langs->trans("Bill"),"factures.php","p.ref",'',$urladd,'class="liste_titre"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdParty"),"factures.php","s.nom",'',$urladd,'class="liste_titre"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"),"factures.php","f.total_ttc","",$urladd,'class="liste_titre" align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"p.ref",'',$urladd,'class="liste_titre"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$urladd,'class="liste_titre"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"f.total_ttc","",$urladd,'class="liste_titre" align="center"',$sortfield,$sortorder); print ''; $var=false; diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index d7dac30b3af..16f1793c372 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -149,13 +149,13 @@ if ($result) $urladd = "&id=".$prev_id; - print_barre_liste("", $page, "lignes.php", $urladd, $sortfield, $sortorder, '', $num); + print_barre_liste("", $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num); print"\n\n"; print '
 
'; print ''; - print_liste_field_titre($langs->trans("Lines"),"lignes.php","pl.rowid",'',$urladd); - print_liste_field_titre($langs->trans("ThirdParty"),"lignes.php","s.nom",'',$urladd); - print_liste_field_titre($langs->trans("Amount"),"lignes.php","pl.amount","",$urladd,'align="center"'); + print_liste_field_titre($langs->trans("Lines"),$_SERVER["PHP_SELF"],"pl.rowid",'',$urladd); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$urladd); + print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"pl.amount","",$urladd,'align="center"'); print ''; $var=false; diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 30b36a59775..6cc88d41835 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -85,13 +85,13 @@ if ($result) $num = $db->num_rows($result); $i = 0; - print_barre_liste($langs->trans("WithdrawsRefused"), $page, "rejets.php", $urladd, $sortfield, $sortorder, '', $num); + print_barre_liste($langs->trans("WithdrawsRefused"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num); print"\n\n"; print '
 
'; print ''; - print_liste_field_titre($langs->trans("Line"),"rejets.php","p.ref",'',$urladd); - print_liste_field_titre($langs->trans("ThirdParty"),"rejets.php","s.nom",'',$urladd); - print_liste_field_titre($langs->trans("Reason"),"rejets.php","pr.motif","",$urladd); + print_liste_field_titre($langs->trans("Line"),$_SERVER["PHP_SELF"],"p.ref",'',$urladd); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",'',$urladd); + print_liste_field_titre($langs->trans("Reason"),$_SERVER["PHP_SELF"],"pr.motif","",$urladd); print ''; $var=True; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 2f656d14211..4318d81e923 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -136,24 +136,24 @@ if ($resql) if ($mode == "4" && $filter != "expired") $title=$langs->trans("ListOfRunningServices"); if ($mode == "4" && $filter == "expired") $title=$langs->trans("ListOfExpiredServices"); if ($mode == "5") $title=$langs->trans("ListOfClosedServices"); - print_barre_liste($title, $page, "services.php", $param, $sortfield, $sortorder,'',$num); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); print '
'; print ''; - print_liste_field_titre($langs->trans("Contract"),"services.php", "c.rowid",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Service"),"services.php", "p.description",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"),"services.php", "s.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contract"),$_SERVER["PHP_SELF"], "c.rowid",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Service"),$_SERVER["PHP_SELF"], "p.description",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"], "s.nom",$param,"","",$sortfield,$sortorder); // Date debut - if ($mode == "0") print_liste_field_titre($langs->trans("DateStartPlannedShort"),"services.php", "cd.date_ouverture_prevue",$param,'',' align="center"',$sortfield,$sortorder); - if ($mode == "" || $mode > 0) print_liste_field_titre($langs->trans("DateStartRealShort"),"services.php", "cd.date_ouverture",$param,'',' align="center"',$sortfield,$sortorder); + if ($mode == "0") print_liste_field_titre($langs->trans("DateStartPlannedShort"),$_SERVER["PHP_SELF"], "cd.date_ouverture_prevue",$param,'',' align="center"',$sortfield,$sortorder); + if ($mode == "" || $mode > 0) print_liste_field_titre($langs->trans("DateStartRealShort"),$_SERVER["PHP_SELF"], "cd.date_ouverture",$param,'',' align="center"',$sortfield,$sortorder); // Date fin - if ($mode == "" || $mode < 5) print_liste_field_titre($langs->trans("DateEndPlannedShort"),"services.php", "cd.date_fin_validite",$param,'',' align="center"',$sortfield,$sortorder); - else print_liste_field_titre($langs->trans("DateEndRealShort"),"services.php", "cd.date_cloture",$param,'',' align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"services.php", "cd.statut,c.statut",$param,"","align=\"right\"",$sortfield,$sortorder); + if ($mode == "" || $mode < 5) print_liste_field_titre($langs->trans("DateEndPlannedShort"),$_SERVER["PHP_SELF"], "cd.date_fin_validite",$param,'',' align="center"',$sortfield,$sortorder); + else print_liste_field_titre($langs->trans("DateEndRealShort"),$_SERVER["PHP_SELF"], "cd.date_cloture",$param,'',' align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"], "cd.statut,c.statut",$param,"","align=\"right\"",$sortfield,$sortorder); print "\n"; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index dd9eb8b6289..a9789ec055e 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -150,17 +150,17 @@ print ''; print '
'; print ''; $arg_url='&page='.$page.'&status='.$status.'&search_label='.$search_label; -print_liste_field_titre($langs->trans("CronLabel"),$_SERVEUR['PHP_SELF'],"t.label","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronLabel"),$_SERVER["PHP_SELF"],"t.label","",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CronTask"),'','',"",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtStart"),$_SERVEUR['PHP_SELF'],"t.datestart","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtEnd"),$_SERVEUR['PHP_SELF'],"t.dateend","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtLastLaunch"),$_SERVEUR['PHP_SELF'],"t.datelastrun","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronDtNextLaunch"),$_SERVEUR['PHP_SELF'],"t.datenextrun","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtStart"),$_SERVER["PHP_SELF"],"t.datestart","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtEnd"),$_SERVER["PHP_SELF"],"t.dateend","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtLastLaunch"),$_SERVER["PHP_SELF"],"t.datelastrun","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronDtNextLaunch"),$_SERVER["PHP_SELF"],"t.datenextrun","",$arg_url,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CronFrequency"),'',"","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronNbRun"),$_SERVEUR['PHP_SELF'],"t.nbrun","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronLastResult"),$_SERVEUR['PHP_SELF'],"t.lastresult","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVEUR['PHP_SELF'],"t.lastoutput","",$arg_url,'',$sortfield,$sortorder); -print_liste_field_titre($langs->trans("Enabled"),$_SERVEUR['PHP_SELF'],"t.status","",$arg_url,'align="center"',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronNbRun"),$_SERVER["PHP_SELF"],"t.nbrun","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronLastResult"),$_SERVER["PHP_SELF"],"t.lastresult","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("CronLastOutput"),$_SERVER["PHP_SELF"],"t.lastoutput","",$arg_url,'',$sortfield,$sortorder); +print_liste_field_titre($langs->trans("Enabled"),$_SERVER["PHP_SELF"],"t.status","",$arg_url,'align="center"',$sortfield,$sortorder); print ''; print ''; diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index 29ab105ee91..100198478e0 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -96,20 +96,20 @@ if ($resql) $param="&socid=$socid"; - print_barre_liste($langs->trans('ListOfSendings'), $page, "liste.php",$param,$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num); $i = 0; print '
'; print ''; - print_liste_field_titre($langs->trans("Ref"),"liste.php","e.ref","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"liste.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"e.ref","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateDeliveryPlanned"),$_SERVER["PHP_SELF"],"e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder); if($conf->livraison_bon->enabled) { - print_liste_field_titre($langs->trans("DateReceived"),"liste.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateReceived"),$_SERVER["PHP_SELF"],"e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("Status"),"liste.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"e.fk_statut","",$param,'align="right"',$sortfield,$sortorder); print "\n"; $var=True; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 70748c8bd57..8764acdbda3 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -94,13 +94,13 @@ if ($result) $num = $db->num_rows($result); $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); - print_barre_liste($title." (".$langs->trans("Suppliers").")",$page, "contact.php", "",$sortfield,$sortorder,"",$num); + print_barre_liste($title." (".$langs->trans("Suppliers").")",$page, $_SERVER["PHP_SELF"], "",$sortfield,$sortorder,"",$num); print '
'; print ''; - print_liste_field_titre($langs->trans("Lastname"),"contact.php","p.name", $begin, "", "", $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Firstname"),"contact.php","p.firstname", $begin, "", "", $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"),"contact.php","s.nom", $begin, "", "", $sortfield,$sortorder); + print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.name", $begin, "", "", $sortfield,$sortorder); + print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, "", "", $sortfield,$sortorder); + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, "", "", $sortfield,$sortorder); print ''; print ''; print "\n"; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index c66a03382de..2859620445e 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -514,18 +514,18 @@ if (empty($action)) $paramlist.=(! empty($search_company)?"&search_company=".$search_company:""); $paramlist.=(! empty($search_amount)?"&search_amount=".$search_amount:""); - print_barre_liste($langs->trans('SupplierPayments'), $page, 'paiement.php',$paramlist,$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num); print ''; print '
'.$langs->trans("Email").''.$langs->trans("Phone").'
'; print ''; - print_liste_field_titre($langs->trans('RefPayment'),'paiement.php','p.rowid','',$paramlist,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Date'),'paiement.php','dp','',$paramlist,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('ThirdParty'),'paiement.php','s.nom','',$paramlist,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Type'),'paiement.php','c.libelle','',$paramlist,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Account'),'paiement.php','ba.label','',$paramlist,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Amount'),'paiement.php','f.amount','',$paramlist,'align="right"',$sortfield,$sortorder); - //print_liste_field_titre($langs->trans('Invoice'),'paiement.php','ref_supplier','',$paramlist,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('RefPayment'),$_SERVER["PHP_SELF"],'p.rowid','',$paramlist,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'dp','',$paramlist,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('ThirdParty'),$_SERVER["PHP_SELF"],'s.nom','',$paramlist,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Type'),$_SERVER["PHP_SELF"],'c.libelle','',$paramlist,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Account'),$_SERVER["PHP_SELF"],'ba.label','',$paramlist,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Amount'),$_SERVER["PHP_SELF"],'f.amount','',$paramlist,'align="right"',$sortfield,$sortorder); + //print_liste_field_titre($langs->trans('Invoice'),$_SERVER["PHP_SELF"],'ref_supplier','',$paramlist,'',$sortfield,$sortorder); print "\n"; // Lines for filters fields diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index 7d1f4da5682..523926d5084 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -89,16 +89,16 @@ if (isset($type)) if ($type == 1) $title = $langs->trans("ListServiceByPopularity"); } -print_barre_liste($title, $page, "popuprop.php",$param,"","","",$num); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"],$param,"","","",$num); print '
'; print ""; -print_liste_field_titre($langs->trans('Ref'), 'popuprop.php', 'p.ref', '', '', '', $sortfield, $sortorder); -print_liste_field_titre($langs->trans('Type'), 'popuprop.php', 'p.type', '', '', '', $sortfield, $sortorder); -print_liste_field_titre($langs->trans('Label'), 'popuprop.php', 'p.label', '', '', '', $sortfield, $sortorder); -print_liste_field_titre($langs->trans('NbOfProposals'), 'popuprop.php', 'c', '', '', 'align="right"', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('Ref'), $_SERVER["PHP_SELF"], 'p.ref', '', '', '', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('Type'), $_SERVER["PHP_SELF"], 'p.type', '', '', '', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('Label'), $_SERVER["PHP_SELF"], 'p.label', '', '', '', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('NbOfProposals'), $_SERVER["PHP_SELF"], 'c', '', '', 'align="right"', $sortfield, $sortorder); print "\n"; $sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type as type, count(*) as c"; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index d0b8c961afa..eaad17afd40 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -194,11 +194,11 @@ if ($resql) if ($sref || $snom || $sall || GETPOST('search')) { - print_barre_liste($texte, $page, "reassort.php", "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num); } else { - print_barre_liste($texte, $page, "reassort.php", "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num); } if (! empty($catid)) @@ -211,7 +211,7 @@ if ($resql) print "
"; } - print ''; + print ''; print ''; print ''; print ''; @@ -240,12 +240,12 @@ if ($resql) // Lignes des titres print ""; - print_liste_field_titre($langs->trans("Ref"),"reassort.php", "p.ref",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),"reassort.php", "p.label",$param,"","",$sortfield,$sortorder); - if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"),"reassort.php", "p.duration",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("StockLimit"),"reassort.php", "p.seuil_stock_alerte",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DesiredStock"),"reassort.php", "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PhysicalStock"),"reassort.php", "stock_physique",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder); + if (! empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("StockLimit"), $_SERVER["PHP_SELF"], "p.seuil_stock_alerte",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DesiredStock"), $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhysicalStock"), $_SERVER["PHP_SELF"], "stock_physique",$param,"",'align="right"',$sortfield,$sortorder); // TODO Add info of running suppliers/customers orders //print_liste_field_titre($langs->trans("TheoreticalStock"),"reassort.php", "stock_theorique",$param,"",'align="right"',$sortfield,$sortorder); print ''; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index d88e87c2d12..e672a6d59d3 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -126,10 +126,10 @@ if ($result) print ''."\n"; - //print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? - print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),"public_list.php","zip","",$param,$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),"public_list.php","town","",$param,$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("DateToBirth"), $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? + print_liste_field_titre($langs->trans("EMail"), $_SERVER["PHP_SELF"],"email",'',$param,$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Zip"), $_SERVER["PHP_SELF"],"zip","",$param,$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"), $_SERVER["PHP_SELF"],"town","",$param,$sortfield,$sortorder); print "\n"; print "\n"; @@ -140,7 +140,6 @@ if ($result) $var=!$var; print ""; print ''."\n"; - //print "\n"; // est-ce nécessaire ?? print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 18de91a6a31..0f1b7c010f9 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -203,7 +203,7 @@ if ($result > 0) // Add notification form print_fiche_titre($langs->trans("AddNewNotification"),'',''); - print ''; + print ''; print ''; print ''; @@ -212,9 +212,9 @@ if ($result > 0) // Line with titles print '
 '.$langs->trans("Firstname").''; print ' '.$langs->trans("Lastname").''; print ' / '.$langs->trans("Company").'".$langs->trans("Photo")."
'.dolGetFirstLastname($obj->firstname, $obj->lastname).($objp->societe?' / '.$objp->societe:'').'$objp->birth'.$objp->email.''.$objp->zip.''.$objp->town.'
'; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'"width="10%"',$sortfield,$sortorder); print_liste_field_titre(''); print ''; @@ -265,9 +265,9 @@ if ($result > 0) // Line with titles print '
'; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"",'',$param,'"width="10%"',$sortfield,$sortorder); print_liste_field_titre('','',''); print ''; @@ -343,9 +343,9 @@ if ($result > 0) // Line with titles print '
'; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),"fiche.php","a.daten",'',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"c.lastname",'',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre",'',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"a.daten",'',$param,'align="right"',$sortfield,$sortorder); print ''; // List diff --git a/htdocs/societe/notify/index.php b/htdocs/societe/notify/index.php index 47054424212..457542d21f3 100644 --- a/htdocs/societe/notify/index.php +++ b/htdocs/societe/notify/index.php @@ -78,13 +78,13 @@ if ($result) $i = 0; $paramlist=''; - print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, "index.php", $paramlist, $sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $paramlist, $sortfield,$sortorder,'',$num); print '
'; print ''; - print_liste_field_titre($langs->trans("Company"),"index.php","s.nom","","",'valign="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Contact"),"index.php","c.lastname","","",'valign="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Action"),"index.php","a.titre","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"c.lastname","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.titre","","",'valign="center"',$sortfield,$sortorder); print "\n"; $var=True; while ($i < $num) From b22aef3521a8e09c6f697234164075c6822785b2 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 18 Sep 2014 20:33:37 +0200 Subject: [PATCH 11/36] Qual: Renamed all files & links "liste.php" into "list.php" --- ChangeLog | 1 + htdocs/adherents/agenda.php | 2 +- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/document.php | 2 +- htdocs/adherents/fiche.php | 4 +- htdocs/adherents/index.php | 2 +- htdocs/adherents/{liste.php => list.php} | 2 +- htdocs/adherents/note.php | 2 +- htdocs/adherents/type.php | 6 +- htdocs/bookmarks/bookmarks.lib.php | 2 +- htdocs/bookmarks/fiche.php | 6 +- htdocs/bookmarks/{liste.php => list.php} | 2 +- .../produits/{osc-liste.php => osc-list.php} | 4 +- htdocs/categories/categorie.php | 2 +- htdocs/comm/fiche.php | 4 +- htdocs/comm/index.php | 4 +- htdocs/comm/mailing/cibles.php | 4 +- htdocs/comm/mailing/fiche.php | 4 +- htdocs/comm/mailing/index.php | 4 +- htdocs/comm/mailing/{liste.php => list.php} | 2 +- htdocs/comm/propal/index.php | 6 +- htdocs/commande/contact.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/commande/fiche.php | 2 +- htdocs/commande/index.php | 8 +- htdocs/commande/{liste.php => list.php} | 2 +- htdocs/commande/note.php | 2 +- htdocs/compta/dons/fiche.php | 4 +- htdocs/compta/dons/index.php | 2 +- htdocs/compta/dons/{liste.php => list.php} | 2 +- htdocs/compta/index.php | 4 +- .../paiement/cheque/{liste.php => list.php} | 2 +- htdocs/compta/paiement/fiche.php | 2 +- .../compta/paiement/{liste.php => list.php} | 2 +- .../prelevement/{liste.php => list.php} | 4 +- htdocs/compta/resultat/clientfourn.php | 2 +- htdocs/compta/stats/cabyuser.php | 8 +- htdocs/compta/stats/casoc.php | 8 +- .../fournisseur/{liste.php => list.php} | 4 +- .../ventilation/{liste.php => list.php} | 4 +- htdocs/contact/fiche.php | 2 +- htdocs/contrat/contact.php | 2 +- htdocs/contrat/document.php | 2 +- htdocs/contrat/fiche.php | 2 +- htdocs/contrat/index.php | 2 +- htdocs/contrat/{liste.php => list.php} | 2 +- htdocs/contrat/note.php | 2 +- htdocs/core/boxes/box_activity.php | 4 +- htdocs/core/boxes/box_bookmarks.php | 4 +- htdocs/core/menus/init_menu_auguria.sql | 64 +++++++------- htdocs/core/menus/standard/eldy.lib.php | 88 +++++++++---------- htdocs/core/search_page.php | 6 +- htdocs/expedition/contact.php | 2 +- htdocs/expedition/fiche.php | 2 +- htdocs/expedition/index.php | 2 +- htdocs/expedition/{liste.php => list.php} | 2 +- htdocs/expedition/note.php | 2 +- htdocs/fourn/commande/contact.php | 2 +- htdocs/fourn/commande/document.php | 2 +- htdocs/fourn/commande/fiche.php | 4 +- htdocs/fourn/commande/history.php | 2 +- htdocs/fourn/commande/index.php | 8 +- htdocs/fourn/commande/{liste.php => list.php} | 2 +- htdocs/fourn/commande/note.php | 2 +- htdocs/fourn/fiche.php | 4 +- htdocs/fourn/index.php | 2 +- htdocs/fourn/{liste.php => list.php} | 4 +- htdocs/fourn/product/index.php | 6 +- htdocs/fourn/product/{liste.php => list.php} | 6 +- htdocs/index.php | 16 ++-- htdocs/livraison/fiche.php | 2 +- htdocs/main.inc.php | 6 +- htdocs/product/fiche.php | 2 +- htdocs/product/index.php | 14 +-- htdocs/product/{liste.php => list.php} | 8 +- htdocs/product/stock/fiche.php | 4 +- htdocs/product/stock/index.php | 2 +- htdocs/product/stock/{liste.php => list.php} | 2 +- htdocs/product/stock/mouvement.php | 2 +- htdocs/projet/contact.php | 2 +- htdocs/projet/document.php | 2 +- htdocs/projet/element.php | 2 +- htdocs/projet/fiche.php | 2 +- htdocs/projet/ganttview.php | 2 +- htdocs/projet/index.php | 4 +- htdocs/projet/{liste.php => list.php} | 4 +- htdocs/projet/note.php | 2 +- htdocs/projet/tasks.php | 2 +- htdocs/societe/index.php | 2 +- 89 files changed, 225 insertions(+), 224 deletions(-) rename htdocs/adherents/{liste.php => list.php} (99%) rename htdocs/bookmarks/{liste.php => list.php} (99%) rename htdocs/boutique/produits/{osc-liste.php => osc-list.php} (97%) rename htdocs/comm/mailing/{liste.php => list.php} (99%) rename htdocs/commande/{liste.php => list.php} (99%) rename htdocs/compta/dons/{liste.php => list.php} (99%) rename htdocs/compta/paiement/cheque/{liste.php => list.php} (99%) rename htdocs/compta/paiement/{liste.php => list.php} (99%) rename htdocs/compta/prelevement/{liste.php => list.php} (98%) rename htdocs/compta/ventilation/fournisseur/{liste.php => list.php} (94%) rename htdocs/compta/ventilation/{liste.php => list.php} (97%) rename htdocs/contrat/{liste.php => list.php} (99%) rename htdocs/expedition/{liste.php => list.php} (99%) rename htdocs/fourn/commande/{liste.php => list.php} (99%) rename htdocs/fourn/{liste.php => list.php} (99%) rename htdocs/fourn/product/{liste.php => list.php} (97%) rename htdocs/product/{liste.php => list.php} (98%) rename htdocs/product/stock/{liste.php => list.php} (99%) rename htdocs/projet/{liste.php => list.php} (98%) diff --git a/ChangeLog b/ChangeLog index 24e22202555..f3287e51215 100644 --- a/ChangeLog +++ b/ChangeLog @@ -112,6 +112,7 @@ For developers: - Qual: Renamed table llx_c_civilite into llx_c_civility, field civilite into label in the same table, and field civilite into civility in other table +- Qual: Renamed all files & links "liste.php" into "list.php" WARNING: Following changes may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index f1a18c5e4bf..5d19cad1ffb 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -84,7 +84,7 @@ if ($object->id > 0) print '
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Reference print ''; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index c3fdd1176a1..3000974a389 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -554,7 +554,7 @@ if ($rowid) print ''; print '
'.$langs->trans('Ref').'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index a3d7fe1cb40..1d780eb21a5 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -113,7 +113,7 @@ if ($id > 0) print '
'.$langs->trans("Ref").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 777cead2469..069bbe0669e 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -564,7 +564,7 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confir } else { - header("Location: liste.php"); + header("Location: list.php"); exit; } } @@ -1355,7 +1355,7 @@ else print '
'.$langs->trans("Ref").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index eff3f85fdf6..1ec3d71c664 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -127,7 +127,7 @@ print '
'; // Formulaire recherche adherent -print ''; +print ''; print ''; print ''; print '
'.$langs->trans("Ref").'
'; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/list.php similarity index 99% rename from htdocs/adherents/liste.php rename to htdocs/adherents/list.php index e5715bff99b..0cd2b215086 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/list.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/adherents/liste.php + * \file htdocs/adherents/list.php * \ingroup member * \brief Page to list all members of foundation */ diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 96ccd19b928..727b3a9bcdc 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -87,7 +87,7 @@ if ($id) print '
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Reference print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 7dc0a43ac26..ec7aa7383c8 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -364,7 +364,7 @@ if ($rowid > 0) print ""; - // Show list of members (nearly same code than in page liste.php) + // Show list of members (nearly same code than in page list.php) $membertypestatic=new AdherentType($db); @@ -588,12 +588,12 @@ if ($rowid > 0) print '"; diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index ebfe7e78db6..e59ae0af845 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -48,7 +48,7 @@ function printBookmarksList($aDb, $aLangs) // Menu bookmark $ret.= '
'.$langs->trans('Ref').''; if ($user->rights->adherent->creer) { - print ''.img_edit().''; + print ''.img_edit().''; } print ' '; if ($user->rights->adherent->supprimer) { - print ''.img_picto($langs->trans("Resiliate"),'disable.png').''; + print ''.img_picto($langs->trans("Resiliate"),'disable.png').''; } print "
'; - print ''; + print ''; } else { diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 76176930da3..9aaadc70eea 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -592,7 +592,7 @@ if ($id > 0) print '
'; - $ret.= ''.$langs->trans('Bookmarks').''; + $ret.= ''.$langs->trans('Bookmarks').''; $ret.= ''; if ($user->rights->bookmark->creer) { diff --git a/htdocs/bookmarks/fiche.php b/htdocs/bookmarks/fiche.php index 6a7394f6fc6..18698d3a3b7 100644 --- a/htdocs/bookmarks/fiche.php +++ b/htdocs/bookmarks/fiche.php @@ -54,7 +54,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (GETPOST("cancel")) { - if (empty($backtopage)) $backtopage=(GETPOST("urlsource")?GETPOST("urlsource"):((! empty($url))?$url:DOL_URL_ROOT.'/bookmarks/liste.php')); + if (empty($backtopage)) $backtopage=(GETPOST("urlsource")?GETPOST("urlsource"):((! empty($url))?$url:DOL_URL_ROOT.'/bookmarks/list.php')); header("Location: ".$backtopage); exit; } @@ -86,7 +86,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($res > 0) { - if (empty($backtopage)) $backtopage=(GETPOST("urlsource")?GETPOST("urlsource"):DOL_URL_ROOT.'/bookmarks/liste.php'); + if (empty($backtopage)) $backtopage=(GETPOST("urlsource")?GETPOST("urlsource"):DOL_URL_ROOT.'/bookmarks/list.php'); header("Location: ".$backtopage); exit; } @@ -285,7 +285,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) // Remove if ($user->rights->bookmark->supprimer && $action != 'edit') { - print " id."&action=delete\">".$langs->trans("Delete")."\n"; + print " id."&action=delete\">".$langs->trans("Delete")."\n"; } print ''; diff --git a/htdocs/bookmarks/liste.php b/htdocs/bookmarks/list.php similarity index 99% rename from htdocs/bookmarks/liste.php rename to htdocs/bookmarks/list.php index 87f98072045..7d0c326f894 100644 --- a/htdocs/bookmarks/liste.php +++ b/htdocs/bookmarks/list.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/bookmarks/liste.php + * \file htdocs/bookmarks/list.php * \brief Page to display list of bookmarks * \ingroup bookmark */ diff --git a/htdocs/boutique/produits/osc-liste.php b/htdocs/boutique/produits/osc-list.php similarity index 97% rename from htdocs/boutique/produits/osc-liste.php rename to htdocs/boutique/produits/osc-list.php index d8888505254..4edf156dd05 100644 --- a/htdocs/boutique/produits/osc-liste.php +++ b/htdocs/boutique/produits/osc-list.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/boutique/produits/osc-liste.php + * \file htdocs/boutique/produits/osc-list.php * \ingroup boutique * \brief Page gestion produits du module OsCommerce */ @@ -46,7 +46,7 @@ $limit = $conf->liste_limit; $offset = $limit * $page ; -print_barre_liste("Liste des produits oscommerce", $page, "osc-liste.php"); +print_barre_liste("Liste des produits oscommerce", $page, "osc-list.php"); $sql = "SELECT p.products_id, p.products_model, p.products_quantity, p.products_status, d.products_name, m.manufacturers_name, m.manufacturers_id"; $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."products as p, ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."products_description as d, ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."manufacturers as m"; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 7f8ceac853e..f760cd736f0 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -551,7 +551,7 @@ else if ($id || $ref) { $langs->load("mails"); print ''.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().''.$object->getNbOfEMailings().'
'; print ''; - print '
'; + print ''; print ''; } $i = 0; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index eada82f7f6a..0e17380ea9e 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -91,7 +91,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { $var=false; print '
'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')'; print ''; //if($num2 > 0) print ''; //else print ''; @@ -647,7 +647,7 @@ if ($id > 0) print ''; print ''; + print '
'.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').''.img_picto($langs->trans("CreateInvoiceForThisCustomer"),'object_bill').''.img_picto($langs->trans("NoOrdersToInvoice"),'object_bill').'
'; - print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' ('.$num.')
'.$langs->trans("AllContracts").' ('.$num.')
'; - print ''; + print ''; print ''; print ''; print '
'.$langs->trans("SearchACustomerOrder").'
'; @@ -105,7 +105,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $var=false; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index e10ea970b43..49d2f1befa2 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -144,7 +144,7 @@ if ($action == 'delete') } else { - header("Location: liste.php"); + header("Location: list.php"); exit; } } @@ -180,7 +180,7 @@ if ($object->fetch($id) >= 0) print '
'.$langs->trans("SearchAContract").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; print ''; print '
'.$langs->trans("Ref").''; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index d64d9188de8..803ea4f81d8 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -631,7 +631,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') { if ($object->delete($object->id)) { - $url= (! empty($urlfrom) ? $urlfrom : 'liste.php'); + $url= (! empty($urlfrom) ? $urlfrom : 'list.php'); header("Location: ".$url); exit; } @@ -769,7 +769,7 @@ else print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; print ''; print '
'.$langs->trans("Ref").''; diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index a0175bad448..a657423f095 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -51,7 +51,7 @@ print '
'; // Recherche emails $var=false; -print ''; +print ''; print ''; print ''; print ''; @@ -162,7 +162,7 @@ if ($result) print ''; print ''; print ''; - print ''; + print ''; $num = $db->num_rows($result); if ($num > 0) diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/list.php similarity index 99% rename from htdocs/comm/mailing/liste.php rename to htdocs/comm/mailing/list.php index 3e06e5af005..15fd830987c 100644 --- a/htdocs/comm/mailing/liste.php +++ b/htdocs/comm/mailing/list.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/comm/mailing/liste.php + * \file htdocs/comm/mailing/list.php * \ingroup mailing * \brief Liste des mailings */ diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index f89b6bfda86..facf34a78da 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -127,7 +127,7 @@ if ($resql) $var=!$var; print ""; print ''; - print ''; + print ''; print "\n"; } } @@ -399,7 +399,7 @@ if (! empty($conf->propal->enabled)) print '
'.$langs->trans("SearchAMailing").'
'.$langs->trans("LastMailings",$limit).''.$langs->trans("DateCreation").''.$langs->trans("NbOfEMails").''.$langs->trans("AllEMailings").'
'.$langs->trans("AllEMailings").'
'.$propalstatic->LibStatut($status,0).''.(isset($vals[$status])?$vals[$status]:0).''.(isset($vals[$status])?$vals[$status]:0).'
'; print ''; - print ''; + print ''; if ($num) { @@ -471,7 +471,7 @@ if (! empty($conf->propal->enabled)) print '
'.$langs->trans("ProposalsToProcess").' ('.$num.')
'.$langs->trans("ProposalsToProcess").' ('.$num.')
'; print ''; - print ''; + print ''; if ($num) { diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 5a886664c17..c36f19c166b 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -152,7 +152,7 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans("OnProcessOrders").' ('.$num.')
'.$langs->trans("OnProcessOrders").' ('.$num.')
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '
'.$langs->trans("Ref").''; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index d939b106c7f..2d9c80e9d2d 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -106,7 +106,7 @@ if ($id > 0 || ! empty($ref)) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '
'.$langs->trans('Ref').''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index f05f516e188..e54844ac938 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1875,7 +1875,7 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; - $linkback = '' . $langs->trans("BackToList") . ''; + $linkback = '' . $langs->trans("BackToList") . ''; // Ref print ''; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 37e88f37d85..c00d057ca33 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -63,7 +63,7 @@ print '
'; // Search customer orders $var=false; print '
' . $langs->trans('Ref') . '
'; -print ''; +print ''; print ''; print ''; print '"; print ''; - print ''; @@ -303,7 +303,7 @@ if (! empty($conf->commande->enabled)) print '
'.$langs->trans("SearchOrder").'
'; @@ -141,7 +141,7 @@ if ($resql) $var=!$var; print "
'.$commandestatic->LibStatut($status,$bool,0).''.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; + print ''.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; print $commandestatic->LibStatut($status,$bool,3); print ''; print '
'; print ''; - print ''; + print ''; if ($num) { @@ -374,7 +374,7 @@ if (! empty($conf->commande->enabled)) print '
'.$langs->trans("OrdersToProcess").' ('.$num.')
'.$langs->trans("OrdersToProcess").' ('.$num.')
'; print ''; - print ''; + print ''; if ($num) { diff --git a/htdocs/commande/liste.php b/htdocs/commande/list.php similarity index 99% rename from htdocs/commande/liste.php rename to htdocs/commande/list.php index bcfdd80d29d..d699192acbf 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/list.php @@ -22,7 +22,7 @@ */ /** - * \file htdocs/commande/liste.php + * \file htdocs/commande/list.php * \ingroup commande * \brief Page to list orders */ diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index ae5aab0491b..6f3519e9ced 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -79,7 +79,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("OnProcessOrders").' ('.$num.')
'.$langs->trans("OnProcessOrders").' ('.$num.')
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '
'.$langs->trans("Ref").''; diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 1b09863d4dd..68b2bef1b58 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -164,7 +164,7 @@ if ($action == 'add') if ($action == 'delete') { $don->delete($id); - header("Location: liste.php"); + header("Location: list.php"); exit; } if ($action == 'commentaire') @@ -459,7 +459,7 @@ if (! empty($id) && $action != 'edit') print ''; print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $nbrows=12; if (! empty($conf->projet->enabled)) $nbrows++; diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php index 30b34b6b85b..100380bc128 100644 --- a/htdocs/compta/dons/index.php +++ b/htdocs/compta/dons/index.php @@ -118,7 +118,7 @@ foreach ($listofstatus as $status) { $var=!$var; print ""; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/list.php similarity index 99% rename from htdocs/compta/dons/liste.php rename to htdocs/compta/dons/list.php index 62700ae5cb0..badc71c96e2 100644 --- a/htdocs/compta/dons/liste.php +++ b/htdocs/compta/dons/list.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/dons/liste.php + * \file htdocs/compta/dons/list.php * \ingroup don * \brief Page de liste des dons */ diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 442016f38fd..b6d54787f7f 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -127,7 +127,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) if (! empty($conf->don->enabled) && $user->rights->don->lire) { $langs->load("donations"); - print ''; + print ''; print ''; print '
'.$donstatic->LibStatut($status,4).''.$donstatic->LibStatut($status,4).''.(! empty($nb[$status])?$nb[$status]:' ').''.(! empty($nb[$status])?price($somme[$status],'MT'):' ').''.(! empty($nb[$status])?price(price2num($somme[$status]/$nb[$status],'MT')):' ').'
'; print ''; @@ -639,7 +639,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $i = 0; print '
'.$langs->trans("SearchADonation").'
'; print ""; - print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/list.php similarity index 99% rename from htdocs/compta/paiement/cheque/liste.php rename to htdocs/compta/paiement/cheque/list.php index cafe8493b71..1699656acb1 100644 --- a/htdocs/compta/paiement/cheque/liste.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/paiement/cheque/liste.php + * \file htdocs/compta/paiement/cheque/list.php * \ingroup compta * \brief Page list of cheque deposits */ diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 74ec9f4cb69..a589ea219e3 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -79,7 +79,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture-> if ($result > 0) { $db->commit(); - header("Location: liste.php"); + header("Location: list.php"); exit; } else diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/list.php similarity index 99% rename from htdocs/compta/paiement/liste.php rename to htdocs/compta/paiement/list.php index 6e3e1bc54ff..c96d1affbd6 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/list.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/paiement/liste.php + * \file htdocs/compta/paiement/list.php * \ingroup compta * \brief Page liste des paiements des factures clients */ diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/list.php similarity index 98% rename from htdocs/compta/prelevement/liste.php rename to htdocs/compta/prelevement/list.php index a9fb6024992..4427d08b2d2 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/list.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/prelevement/liste.php + * \file htdocs/compta/prelevement/list.php * \ingroup prelevement * \brief Page liste des prelevements */ @@ -120,7 +120,7 @@ if ($result) print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index d55930ef80f..08ae52a3d51 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -639,7 +639,7 @@ if ($result) $var = !$var; print ""; - print "\n"; + print "\n"; if ($modecompta == 'CREANCES-DETTES') print ''; print ''; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 708c77708cf..db6c0d2f149 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -359,9 +359,9 @@ if (count($amount)) { if ($modecompta != 'CREANCES-DETTES') { if ($key > 0) { - print ''; + print ''; } else { - print ''; + print ''; } } else { if ($key > 0) { @@ -377,9 +377,9 @@ if (count($amount)) { print '
'.$langs->trans("OrdersToBill").' ('.$num.')'.$langs->trans("OrdersToBill").' ('.$num.')'.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("ToBill").' 
 ".$langs->trans("Donation")." nom."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->nom. " ".$obj->firstname." ".$obj->lastname."".$langs->trans("Donation")." nom."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->nom. " ".$obj->firstname." ".$obj->lastname."'.price($obj->amount).''.price($obj->amount).''; if ($modecompta != 'CREANCES-DETTES') { if ($key > 0) { - print ''; + print ''; } else { - print ''; + print ''; } } else { if ($key > 0) { diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 3535db5594a..cea623a144b 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -429,9 +429,9 @@ if (count($amount)) { print ''; if ($modecompta != 'CREANCES-DETTES') { if ($key > 0) { - print ''; + print ''; } else { - print ''; + print ''; } } else { if ($key > 0) { @@ -447,9 +447,9 @@ if (count($amount)) { print ''; if ($modecompta != 'CREANCES-DETTES') { if ($key > 0) { - print ''; + print ''; } else { - print ''; + print ''; } } else { if ($key > 0) { diff --git a/htdocs/compta/ventilation/fournisseur/liste.php b/htdocs/compta/ventilation/fournisseur/list.php similarity index 94% rename from htdocs/compta/ventilation/fournisseur/liste.php rename to htdocs/compta/ventilation/fournisseur/list.php index e3eb4cf487d..e7a05c8fe24 100644 --- a/htdocs/compta/ventilation/fournisseur/liste.php +++ b/htdocs/compta/ventilation/fournisseur/list.php @@ -20,7 +20,7 @@ /** - * \file htdocs/compta/ventilation/liste.php + * \file htdocs/compta/ventilation/list.php * \ingroup compta * \brief Page de ventilation des lignes de facture */ @@ -60,7 +60,7 @@ if ($result) $num_lignes = $db->num_rows($result); $i = 0; - print_barre_liste("Lignes de facture à ventiler",$page,"liste.php","",$sortfield,$sortorder,'',$num_lignes); + print_barre_liste("Lignes de facture à ventiler",$page,"list.php","",$sortfield,$sortorder,'',$num_lignes); print ''; print ''; diff --git a/htdocs/compta/ventilation/liste.php b/htdocs/compta/ventilation/list.php similarity index 97% rename from htdocs/compta/ventilation/liste.php rename to htdocs/compta/ventilation/list.php index effa7689821..5fa2a5a1ee5 100644 --- a/htdocs/compta/ventilation/liste.php +++ b/htdocs/compta/ventilation/list.php @@ -20,7 +20,7 @@ /** - * \file htdocs/compta/ventilation/liste.php + * \file htdocs/compta/ventilation/list.php * \ingroup compta * \brief Page de ventilation des lignes de facture */ @@ -69,7 +69,7 @@ if ($result) $num_lignes = $db->num_rows($result); $i = 0; - print_barre_liste($langs->trans("InvoiceLinesToDispatch"),$page,"liste.php","",$sortfield,$sortorder,'',$num_lignes); + print_barre_liste($langs->trans("InvoiceLinesToDispatch"),$page,"list.php","",$sortfield,$sortorder,'',$num_lignes); print '
Facture
'; print ''; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4f793fe8538..a86965f5c8b 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -975,7 +975,7 @@ else { $langs->load("mails"); print ''; - print ''; + print ''; } else { diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 7156b69777c..1528e472cbe 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -139,7 +139,7 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans("Invoice").''.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().''.$object->getNbOfEMailings().'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Reference du contrat print '
'.$langs->trans("Ref").''; diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index e17a0c67389..6c520105c36 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -107,7 +107,7 @@ if ($object->id) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Reference print ''; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 165e8ae3c69..81d50edb211 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -1110,7 +1110,7 @@ else print '
'.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref du contrat if (!empty($modCodeContract->code_auto)) { diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 680ea9c201f..d23e789d92e 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -75,7 +75,7 @@ print '
'; if (! empty($conf->contrat->enabled)) { $var=false; - print ''; + print ''; print ''; print '
'; print ''; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/list.php similarity index 99% rename from htdocs/contrat/liste.php rename to htdocs/contrat/list.php index 6bd9e249bc7..e6a0750aa4e 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/list.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/contrat/liste.php + * \file htdocs/contrat/list.php * \ingroup contrat * \brief Page liste des contrats */ diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index cd782d73444..502b354ee69 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -75,7 +75,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("SearchAContract").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Reference print ''; diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index f37079fa037..d118bc8a4bc 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -114,7 +114,7 @@ class box_activity extends ModeleBoxes $billurl="viewstatut=2&paye=1&year=".$objp->annee; $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/liste.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills" + 'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills" ); $this->info_box_contents[$i][3] = array('td' => 'align="right"', @@ -214,7 +214,7 @@ class box_activity extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => $objp->nb, - 'url' => DOL_URL_ROOT."/commande/liste.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$objp->fk_statut + 'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$objp->fk_statut ); $totalnb += $objp->nb; diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index 5cb1e3ddad4..968eefef4b9 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -53,7 +53,7 @@ class box_bookmarks extends ModeleBoxes $this->max=$max; $this->info_box_head = array('text' => $langs->trans("BoxMyLastBookmarks",$max), - 'sublink' => DOL_URL_ROOT.'/bookmarks/liste.php'); + 'sublink' => DOL_URL_ROOT.'/bookmarks/list.php'); if ($user->rights->bookmark->creer) { $this->info_box_head['subpicto']='object_bookmark'; @@ -101,7 +101,7 @@ class box_bookmarks extends ModeleBoxes { $mytxt=$langs->trans("NoRecordedBookmarks"); if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd"); - $this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/liste.php', 'text'=>$mytxt); + $this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/list.php', 'text'=>$mytxt); } $db->free($result); diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 36291883755..8d8448cedb3 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -64,7 +64,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Third parties insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/soc.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/fourn/liste.php?leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/fourn/list.php?leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/soc.php?leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/comm/prospect/list.php?leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/soc.php?leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); @@ -90,18 +90,18 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Product - Product insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2800__+MAX_llx_menu__, 'products', 'product', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/liste.php?leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/list.php?leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?type=0', 'Stocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats&type=0', 'Statistics', 1, 'main', '$user->rights->produit->lire', '', 2, 5, __ENTITY__); -- Product - Services insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2900__+MAX_llx_menu__, 'products', 'service', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=service&type=1', 'Services', 0, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/fiche.php?leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/liste.php?leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/list.php?leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2903__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats&type=1', 'Statistics', 1, 'main', '$user->rights->service->lire', '', 2, 5, __ENTITY__); -- Product - Stocks insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3100__+MAX_llx_menu__, 'products', 'stock', 3__+MAX_llx_menu__, '/product/stock/index.php?leftmenu=stock', 'Stock', 0, 'stocks', '$user->rights->stock->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/fiche.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/liste.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/list.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); @@ -112,7 +112,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Product - Shipment insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled', __HANDLER__, 'left', 1300__+MAX_llx_menu__, 'commercial', 'sendings', 3__+MAX_llx_menu__, '/expedition/index.php?leftmenu=sendings', 'Shipments', 0, 'sendings', '$user->rights->expedition->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1301__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/fiche.php?action=create2&leftmenu=sendings', 'NewSending', 1, 'sendings', '$user->rights->expedition->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1302__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/liste.php?leftmenu=sendings', 'List', 1, 'sendings', '$user->rights->expedition->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1302__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/list.php?leftmenu=sendings', 'List', 1, 'sendings', '$user->rights->expedition->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1303__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/stats/index.php?leftmenu=sendings', 'Statistics', 1, 'sendings', '$user->rights->expedition->lire', '', 2, 2, __ENTITY__); -- Commercial - Proposals @@ -128,23 +128,23 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Commercial - Customer's orders insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1201__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/fiche.php?action=create&leftmenu=orders', 'NewOrder', 1, 'orders', '$user->rights->commande->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1202__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders', 'List', 1, 'orders', '$user->rights->commande->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1203__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=0', 'StatusOrderDraftShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1204__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=1', 'StatusOrderValidated', 1, 'orders', '$user->rights->commande->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1205__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=2', 'StatusOrderOnProcessShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1206__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=3', 'StatusOrderToBill', 1, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1207__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=4', 'StatusOrderProcessed', 1, 'orders', '$user->rights->commande->lire', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1202__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders', 'List', 1, 'orders', '$user->rights->commande->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1203__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=0', 'StatusOrderDraftShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1204__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=1', 'StatusOrderValidated', 1, 'orders', '$user->rights->commande->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1205__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=2', 'StatusOrderOnProcessShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1206__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=3', 'StatusOrderToBill', 1, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1207__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=4', 'StatusOrderProcessed', 1, 'orders', '$user->rights->commande->lire', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__); -- Commercial - Supplier's orders insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/fiche.php?action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/liste.php?leftmenu=orders_suppliers&viewstatut=0', 'List', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0', 'List', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5108__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier', 'Statistics', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 7, __ENTITY__); -- Commercial - Contracts insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1400__+MAX_llx_menu__, 'commercial', 'contracts', 5__+MAX_llx_menu__, '/contrat/index.php?leftmenu=contracts', 'Contracts', 0, 'contracts', '$user->rights->contrat->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1401__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/fiche.php?&action=create&leftmenu=contracts', 'NewContract', 1, 'contracts', '$user->rights->contrat->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1402__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/liste.php?leftmenu=contracts', 'List', 1, 'contracts', '$user->rights->contrat->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1402__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/list.php?leftmenu=contracts', 'List', 1, 'contracts', '$user->rights->contrat->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1403__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/services.php?leftmenu=contracts', 'MenuServices', 1, 'contracts', '$user->rights->contrat->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled&&$leftmenu=="contracts"', __HANDLER__, 'left', 1404__+MAX_llx_menu__, 'commercial', '', 1403__+MAX_llx_menu__, '/contrat/services.php?leftmenu=contracts&mode=0', 'MenuInactiveServices', 2, 'contracts', '$user->rights->contrat->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled&&$leftmenu=="contracts"', __HANDLER__, 'left', 1405__+MAX_llx_menu__, 'commercial', '', 1403__+MAX_llx_menu__, '/contrat/services.php?leftmenu=contracts&mode=4', 'MenuRunningServices', 2, 'contracts', '$user->rights->contrat->lire', '', 2, 1, __ENTITY__); @@ -165,15 +165,15 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1701__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture.php?action=create&leftmenu=customers_bills', 'NewBill', 1, 'bills', '$user->rights->facture->creer', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1702__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/fiche-rec.php?leftmenu=customers_bills', 'Repeatable', 1, 'bills', '$user->rights->facture->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1703__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills', 'Unpaid', 1, 'bills', '$user->rights->facture->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1704__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/paiement/liste.php?leftmenu=customers_bills', 'Payments', 1, 'bills', '$user->rights->facture->lire', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1704__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/paiement/list.php?leftmenu=customers_bills', 'Payments', 1, 'bills', '$user->rights->facture->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1710__+MAX_llx_menu__, 'accountancy', '', 1704__+MAX_llx_menu__, '/compta/paiement/rapport.php?leftmenu=customers_bills', 'Reportings', 2, 'bills', '$user->rights->facture->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1714__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills', 'Statistics', 1, 'bills', '$user->rights->facture->lire', '', 2, 8, __ENTITY__); -- Accountancy - Orders to bill -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', 'orders', 6__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', 'orders', 6__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); -- Donations insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled', __HANDLER__, 'left', 2000__+MAX_llx_menu__, 'accountancy', 'donations', 6__+MAX_llx_menu__, '/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy', 'Donations', 0, 'donations', '$user->rights->don->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2002__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy', 'List', 1, 'donations', '$user->rights->don->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2002__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/list.php?leftmenu=donations&mainmenu=accountancy', 'List', 1, 'donations', '$user->rights->don->lire', '', 2, 1, __ENTITY__); --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2003__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/stats.php?leftmenu=donations&mainmenu=accountancy', 'Statistics', 1, 'donations', '$user->rights->don->lire', '', 2, 2, __ENTITY__); -- Special expenses insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled || $conf->salaries->enabled', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'accountancy', 'tax', 6__+MAX_llx_menu__, '/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy', 'MenuSpecialExpenses', 0, 'compta', '(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)', '', 0, 6, __ENTITY__); @@ -190,14 +190,14 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); -- Ventilation (accounting) insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'ventil', 6__+MAX_llx_menu__, '/compta/ventilation/index.php?leftmenu=ventil', 'Ventilation', 0, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 8, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/ventilation/liste.php', 'ToDispatch', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/ventilation/list.php', 'ToDispatch', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/ventilation/lignes.php', 'Dispatched', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/param/', 'Setup', 1, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2404__+MAX_llx_menu__, 'accountancy', '', 2403__+MAX_llx_menu__, '/compta/param/comptes/liste.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2404__+MAX_llx_menu__, 'accountancy', '', 2403__+MAX_llx_menu__, '/compta/param/comptes/list.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2405__+MAX_llx_menu__, 'accountancy', '', 2403__+MAX_llx_menu__, '/compta/param/comptes/fiche.php?action=create', 'New', 2, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2406__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/export/', 'Export', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2407__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/index.php', 'New', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2408__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/liste.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2408__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/list.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 1, __ENTITY__); -- Rapports insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); @@ -211,12 +211,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Check deposit insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/liste.php?leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/list.php?leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__); -- Withdrawal insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank', 'StandingOrders', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/bons.php?leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/liste.php?leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/list.php?leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2506__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/rejets.php?leftmenu=withdraw', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__); -- Bank @@ -229,11 +229,11 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Project insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects', 'Projects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/fiche.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3602__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/liste.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3602__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3610__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects&mode=mine', 'MyProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3611__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/fiche.php?leftmenu=projects&action=create&mode=mine', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3612__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/liste.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3612__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3700__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects', 'Activities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3701__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); @@ -247,7 +247,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3900__+MAX_llx_menu__, 'tools', 'mailing', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/fiche.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/liste.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/list.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->export->enabled', __HANDLER__, 'left', 4100__+MAX_llx_menu__, 'tools', 'export', 8__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'FormatedExport', 0, 'exports', '$user->rights->export->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->export->enabled', __HANDLER__, 'left', 4101__+MAX_llx_menu__, 'tools', '', 4100__+MAX_llx_menu__, '/exports/export.php?leftmenu=export', 'NewExport', 1, 'exports', '$user->rights->export->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->import->enabled', __HANDLER__, 'left', 4130__+MAX_llx_menu__, 'tools', 'import', 8__+MAX_llx_menu__, '/imports/index.php?leftmenu=import', 'FormatedImport', 0, 'exports', '$user->rights->import->run', '', 2, 2, __ENTITY__); @@ -255,16 +255,16 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Members insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4200__+MAX_llx_menu__, 'members', 'members', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=members&mainmenu=members', 'Members', 0, 'members', '$user->rights->adherent->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4201__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/fiche.php?leftmenu=members&action=create', 'NewMember', 1, 'members', '$user->rights->adherent->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/liste.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate', 'MenuMembersNotUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate', 'MenuMembersUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/liste.php?leftmenu=members&statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/list.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=1&filter=outofdate', 'MenuMembersNotUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=1&filter=uptodate', 'MenuMembersUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); -- Members - Subscriptions insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4300__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=members&mainmenu=members', 'Subscriptions', 0, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4301__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members', 'NewSubscription', 1, 'compta', '$user->rights->adherent->cotisation->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4301__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members', 'NewSubscription', 1, 'compta', '$user->rights->adherent->cotisation->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4302__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/cotisations.php?leftmenu=members', 'List', 1, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4303__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/stats/index.php?leftmenu=members', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4500__+MAX_llx_menu__, 'members', 'export', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=export&mainmenu=members', 'Exports', 0, 'members', '$user->rights->adherent->export', '', 2, 3, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 1d7aa1a5a9a..e7fa68aae85 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -617,9 +617,9 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->societe->enabled) && ! empty($conf->fournisseur->enabled)) { $langs->load("suppliers"); - $newmenu->add("/fourn/liste.php?leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers'); + $newmenu->add("/fourn/list.php?leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, $user->rights->fournisseur->lire, '', $mainmenu, 'suppliers'); $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire); - //$newmenu->add("/fourn/liste.php?leftmenu=suppliers", $langs->trans("List"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire); + //$newmenu->add("/fourn/list.php?leftmenu=suppliers", $langs->trans("List"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire); //$newmenu->add("/contact/list.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire); } @@ -652,7 +652,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire); $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); } - //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); + //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } } @@ -686,13 +686,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("orders"); $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); $newmenu->add("/commande/fiche.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); - $newmenu->add("/commande/liste.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders" && ! empty($conf->expedition->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderSentShort"), 2, $user->rights->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire); // The translation key is StatusOrderToBill but it means StatusDelivered. TODO We should renamed this later - if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire); + $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders" && ! empty($conf->expedition->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderSentShort"), 2, $user->rights->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=3", $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire); // The translation key is StatusOrderToBill but it means StatusDelivered. TODO We should renamed this later + if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire); $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire); } @@ -702,16 +702,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("orders"); $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers",$langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers'); $newmenu->add("/fourn/commande/fiche.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewOrder"), 1, $user->rights->fournisseur->commande->creer); - $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusOrderOnProcess"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusOrderReceivedPartially"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusOrderCanceled"), 2, $user->rights->fournisseur->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/liste.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusOrderRefused"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusOrderOnProcess"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusOrderReceivedPartially"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusOrderCanceled"), 2, $user->rights->fournisseur->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusOrderRefused"), 2, $user->rights->fournisseur->commande->lire); $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); @@ -723,7 +723,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("contracts"); $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("Contracts"), 0, $user->rights->contrat->lire, '', $mainmenu, 'contracts'); $newmenu->add("/contrat/fiche.php?&action=create&leftmenu=contracts", $langs->trans("NewContract"), 1, $user->rights->contrat->creer); - $newmenu->add("/contrat/liste.php?leftmenu=contracts", $langs->trans("List"), 1, $user->rights->contrat->lire); + $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->rights->contrat->lire); $newmenu->add("/contrat/services.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->rights->contrat->lire); if (empty($leftmenu) || $leftmenu=="contracts") $newmenu->add("/contrat/services.php?leftmenu=contracts&mode=0", $langs->trans("MenuInactiveServices"), 2, $user->rights->contrat->lire); if (empty($leftmenu) || $leftmenu=="contracts") $newmenu->add("/contrat/services.php?leftmenu=contracts&mode=4", $langs->trans("MenuRunningServices"), 2, $user->rights->contrat->lire); @@ -760,7 +760,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/compta/facture/impayees.php?leftmenu=customers_bills",$langs->trans("Unpaid"),1,$user->rights->facture->lire); - $newmenu->add("/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),1,$user->rights->facture->lire); + $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),1,$user->rights->facture->lire); if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { @@ -787,7 +787,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->commande->enabled)) { $langs->load("orders"); - if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=-3", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); + if (! empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); // if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); } @@ -797,7 +797,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("donations"); $newmenu->add("/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy",$langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations'); if (empty($leftmenu) || $leftmenu=="donations") $newmenu->add("/compta/dons/fiche.php?action=create",$langs->trans("NewDonation"), 1, $user->rights->don->creer); - if (empty($leftmenu) || $leftmenu=="donations") $newmenu->add("/compta/dons/liste.php",$langs->trans("List"), 1, $user->rights->don->lire); + if (empty($leftmenu) || $leftmenu=="donations") $newmenu->add("/compta/dons/list.php",$langs->trans("List"), 1, $user->rights->don->lire); //if ($leftmenu=="donations") $newmenu->add("/compta/dons/stats.php",$langs->trans("Statistics"), 1, $user->rights->don->lire); } @@ -1002,7 +1002,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($leftmenu) || $leftmenu=="withdraw") $newmenu->add("/compta/prelevement/bons.php?mainmenu=bank",$langs->trans("WithdrawalsReceipts"),1,$user->rights->prelevement->bons->lire); - if (empty($leftmenu) || $leftmenu=="withdraw") $newmenu->add("/compta/prelevement/liste.php?mainmenu=bank",$langs->trans("WithdrawalsLines"),1,$user->rights->prelevement->bons->lire); + if (empty($leftmenu) || $leftmenu=="withdraw") $newmenu->add("/compta/prelevement/list.php?mainmenu=bank",$langs->trans("WithdrawalsLines"),1,$user->rights->prelevement->bons->lire); if (empty($leftmenu) || $leftmenu=="withdraw") $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank",$langs->trans("Rejects"),1,$user->rights->prelevement->bons->lire); if (empty($leftmenu) || $leftmenu=="withdraw") $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank",$langs->trans("Statistics"),1,$user->rights->prelevement->bons->lire); @@ -1014,7 +1014,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->cheque, '', $mainmenu, 'checks'); $newmenu->add("/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque); - $newmenu->add("/compta/paiement/cheque/liste.php?leftmenu=checks&mainmenu=bank",$langs->trans("List"),1,$user->rights->banque->cheque); + $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks&mainmenu=bank",$langs->trans("List"),1,$user->rights->banque->cheque); } } @@ -1029,7 +1029,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product'); $newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); - $newmenu->add("/product/liste.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); + $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); if (! empty($conf->propal->enabled)) { $newmenu->add("/product/popuprop.php?leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire); @@ -1045,7 +1045,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service'); $newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); - $newmenu->add("/product/liste.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); + $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); if (! empty($conf->propal->enabled)) { $newmenu->add("/product/popuprop.php?leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire); @@ -1058,7 +1058,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); $newmenu->add("/categories/fiche.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); + //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } // Stocks @@ -1067,7 +1067,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("stocks"); $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/fiche.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/liste.php", $langs->trans("List"), 1, $user->rights->stock->lire); + if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); @@ -1079,7 +1079,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("sendings"); $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings'); $newmenu->add("/expedition/fiche.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); - $newmenu->add("/expedition/liste.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); + $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); } @@ -1099,7 +1099,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Security check $newmenu->add("/societe/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire); - $newmenu->add("/fourn/liste.php",$langs->trans("List"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire); + $newmenu->add("/fourn/list.php",$langs->trans("List"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire); $newmenu->add("/contact/list.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 1, $user->rights->societe->contact->lire && $user->rights->fournisseur->lire); $newmenu->add("/fourn/stats.php",$langs->trans("Statistics"), 1, $user->rights->societe->lire && $user->rights->fournisseur->lire); } @@ -1117,7 +1117,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("orders"); $newmenu->add("/fourn/commande/index.php?leftmenu=suppliers",$langs->trans("Orders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'suppliers'); $newmenu->add("/societe/societe.php?leftmenu=supplier", $langs->trans("NewOrder"), 1, $user->rights->fournisseur->commande->creer); - $newmenu->add("/fourn/commande/liste.php?leftmenu=suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); } if (! empty($conf->categorie->enabled)) @@ -1125,7 +1125,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); + //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } } @@ -1142,12 +1142,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Project affected to user $newmenu->add("/projet/index.php?leftmenu=projects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'projects'); $newmenu->add("/projet/fiche.php?leftmenu=projects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer); - $newmenu->add("/projet/liste.php?leftmenu=projects&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire); + $newmenu->add("/projet/list.php?leftmenu=projects&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire); // All project i have permission on $newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire); $newmenu->add("/projet/fiche.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer); - $newmenu->add("/projet/liste.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire); + $newmenu->add("/projet/list.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire); // Project affected to user $newmenu->add("/projet/activity/index.php?mode=mine", $langs->trans("MyActivities"), 0, $user->rights->projet->lire); @@ -1204,7 +1204,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing'); $newmenu->add("/comm/mailing/fiche.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer); - $newmenu->add("/comm/mailing/liste.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); + $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); } if (! empty($conf->export->enabled)) @@ -1235,16 +1235,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire, '', $mainmenu, 'members'); $newmenu->add("/adherents/fiche.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer); - $newmenu->add("/adherents/liste.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->lire); - $newmenu->add("/adherents/liste.php?leftmenu=members&statut=-1",$langs->trans("MenuMembersToValidate"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/liste.php?leftmenu=members&statut=1",$langs->trans("MenuMembersValidated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/liste.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); + $newmenu->add("/adherents/list.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1",$langs->trans("MenuMembersToValidate"),2,$user->rights->adherent->lire); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1",$langs->trans("MenuMembersValidated"),2,$user->rights->adherent->lire); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); - $newmenu->add("/adherents/liste.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); + $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); $newmenu->add("/adherents/cotisations.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); @@ -1254,7 +1254,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); $newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); - //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/liste.php", $langs->trans("List"), 1, $user->rights->categorie->lire); + //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } $newmenu->add("/adherents/index.php?leftmenu=export&mainmenu=members",$langs->trans("Exports"),0,$user->rights->adherent->export, '', $mainmenu, 'export'); diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index c83fdafcf7e..9f1734b2326 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -85,7 +85,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/liste.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall'); $nbofsearch++; } @@ -93,14 +93,14 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/liste.php', DOL_URL_ROOT.'/fourn/product/liste.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier'); $nbofsearch++; } if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) { $langs->load("members"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall'); $nbofsearch++; } diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 49b83692630..c09b3e415cd 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '
'.$langs->trans("Ref").''; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 15b0a16a13e..de557cfcde1 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1087,7 +1087,7 @@ else if ($id || $ref) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 5ce833e5e3f..d299bda1422 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -51,7 +51,7 @@ print '
'; $var=false; print '
'.$langs->trans("Ref").'
'; -print ''; +print ''; print ''; print ''; print '
'.$langs->trans("SearchASending").'
'; diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/list.php similarity index 99% rename from htdocs/expedition/liste.php rename to htdocs/expedition/list.php index 657cf00b514..4e1adf7221e 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/list.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/expedition/liste.php + * \file htdocs/expedition/list.php * \ingroup expedition * \brief Page to list all shipments */ diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 27d53b03cd6..01a341d7ab5 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -101,7 +101,7 @@ if ($id > 0 || ! empty($ref)) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index ba32a143f8c..b8eabb9be6c 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -146,7 +146,7 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans("Ref").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index a3681b8fc02..2949aedcf14 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -110,7 +110,7 @@ if ($object->id > 0) print '
'.$langs->trans("Ref").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index f4f69fbd269..0131ddb72dd 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -599,7 +599,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->four $result=$object->delete($user); if ($result > 0) { - header("Location: ".DOL_URL_ROOT.'/fourn/commande/liste.php'); + header("Location: ".DOL_URL_ROOT.'/fourn/commande/list.php'); exit; } else @@ -1325,7 +1325,7 @@ elseif (! empty($object->id)) print '
'.$langs->trans("Ref").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index e53b3974cf4..e26bc867640 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -76,7 +76,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("Ref").'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 85557877d76..bd3b18fc87c 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -59,7 +59,7 @@ print ''; print ''; diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index bfdf1b1ce45..01f4ad3b1bf 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -86,7 +86,7 @@ if ($resql) print ""; print ''; print ''; - print ''; + print ''; print "\n"; $i++; diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/list.php similarity index 99% rename from htdocs/fourn/liste.php rename to htdocs/fourn/list.php index 341f3ffca54..571c4a9925c 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/list.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/fourn/liste.php + * \file htdocs/fourn/list.php * \ingroup fournisseur * \brief Home page of supplier area */ @@ -118,7 +118,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -dol_syslog('fourn/liste.php:', LOG_DEBUG); +dol_syslog('fourn/list.php:', LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/fourn/product/index.php b/htdocs/fourn/product/index.php index 14f4790f5af..68cf81745a3 100644 --- a/htdocs/fourn/product/index.php +++ b/htdocs/fourn/product/index.php @@ -43,7 +43,7 @@ print ''; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index dea52ae6ef9..6c3ed0db3bc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1553,20 +1553,20 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/liste.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P'); } if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER)) { $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/liste.php', DOL_URL_ROOT.'/fourn/product/liste.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier'); } if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) { $langs->load("members"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M'); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M'); } // Execute hook printSearchForm diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 3ae836d0214..5cd4ca7103d 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -464,7 +464,7 @@ if (empty($reshook)) if ($result > 0) { - header('Location: '.DOL_URL_ROOT.'/product/liste.php?type='.$object->type.'&delprod='.urlencode($object->ref)); + header('Location: '.DOL_URL_ROOT.'/product/list.php?type='.$object->type.'&delprod='.urlencode($object->ref)); exit; } else diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 0ace0fdc190..fb2830e9e57 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -77,7 +77,7 @@ print '
'; */ $rowspan=2; if (! empty($conf->barcode->enabled)) $rowspan++; -print ''; +print ''; print ''; print '
'.$langs->trans("Ref").'
'; */ $var=false; print ''; -print ''; +print ''; print ''; print ''; print '"; print ''; - print ''; + print ''; print "\n"; } } @@ -184,7 +184,7 @@ if ($resql) print ""; print ''; - print ''; + print ''; print "\n"; $i++; @@ -387,7 +387,7 @@ $num = $db->num_rows($resql); print '
'.$langs->trans("SearchOrder").'
'; @@ -125,7 +125,7 @@ if ($resql) $var=!$var; print "
'.$commandestatic->LibStatut($statut,0).''.(isset($vals[$statut])?$vals[$statut]:0).''.(isset($vals[$statut])?$vals[$statut]:0).'
'.$langs->trans($commandestatic->statuts[$row[1]]).''.$row[0].' '.$commandestatic->LibStatut($row[1],3).''.$row[0].' '.$commandestatic->LibStatut($row[1],3).'
'; print ''; -print ''; +print ''; if ($num) { diff --git a/htdocs/fourn/commande/liste.php b/htdocs/fourn/commande/list.php similarity index 99% rename from htdocs/fourn/commande/liste.php rename to htdocs/fourn/commande/list.php index c02ab0685f7..62e427d842c 100644 --- a/htdocs/fourn/commande/liste.php +++ b/htdocs/fourn/commande/list.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/fourn/commande/liste.php + * \file htdocs/fourn/commande/list.php * \ingroup fournisseur * \brief List of suppliers orders */ diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index b9cbf6e33b7..6a1c6cfe80e 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans("OrdersToProcess").' ('.$num.')
'.$langs->trans("OrdersToProcess").' ('.$num.')
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 11e505334cd..0294e78986e 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -285,7 +285,7 @@ if ($object->fetch($id)) print '
'.$langs->trans("Ref").'
'; print ''; print '
'.$langs->trans("ProductsAndServices").''; - print ''.$langs->trans("All").' ('.$object->nbOfProductRefs().')'; + print ''.$langs->trans("All").' ('.$object->nbOfProductRefs().')'; print '
'; } @@ -319,7 +319,7 @@ if ($object->fetch($id)) print '
'; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("LastOrders",($num<$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllOrders").' ('.$num.')'.$langs->trans("AllOrders").' ('.$num.')'.img_picto($langs->trans("Statistics"),'stats').'
'; print '
'.$langs->trans($commande->statuts[$row[1]]).''.$row[0].''.$commande->LibStatut($row[1],3).''.$commande->LibStatut($row[1],3).'
'; /* * Zone recherche produit/service */ -print ''; +print ''; print ''; print ''; print "\n"; @@ -81,13 +81,13 @@ print '"; - print ''; + print ''; print ""; } if (! empty($conf->service->enabled)) { print ""; - print ''; + print ''; print ""; } print '
'.$langs->trans("Statistics").'product->enabled)) { print "
'.$langs->trans("Products").''.round($prodser[0]).''.$langs->trans("Products").''.round($prodser[0]).'
'.$langs->trans("Services").''.round($prodser[1]).''.$langs->trans("Services").''.round($prodser[1]).'
'; diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/list.php similarity index 97% rename from htdocs/fourn/product/liste.php rename to htdocs/fourn/product/list.php index c8911837a40..481e7d22771 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/list.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/fourn/product/liste.php + * \file htdocs/fourn/product/list.php * \ingroup produit * \brief Page liste des produits ou services */ @@ -121,7 +121,7 @@ if ($fourn_id > 0) $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit($limit + 1, $offset); -dol_syslog("fourn/product/liste.php:", LOG_DEBUG); +dol_syslog("fourn/product/list.php:", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -150,7 +150,7 @@ if ($resql) { print "
"; $c = new Categorie($db); - $ways = $c->print_all_ways(' > ','fourn/product/liste.php'); + $ways = $c->print_all_ways(' > ','fourn/product/list.php'); print " > ".$ways[0]."
\n"; print "

"; } diff --git a/htdocs/index.php b/htdocs/index.php index 6dbccde9cf0..138ddc4e3a9 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -213,14 +213,14 @@ if (empty($user->societe_id)) // Dashboard Link lines $links=array(DOL_URL_ROOT.'/comm/list.php', DOL_URL_ROOT.'/comm/prospect/list.php', - DOL_URL_ROOT.'/fourn/liste.php', - DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members', - DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products', - DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products', + DOL_URL_ROOT.'/fourn/list.php', + DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', + DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', + DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products', DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial', - DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial', + DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial', DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy', - DOL_URL_ROOT.'/contrat/liste.php'); + DOL_URL_ROOT.'/contrat/list.php'); // Translation lang files $langfile=array("companies", "prospects", @@ -317,7 +317,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $board->load_board($user); $board->warning_delay=$conf->commande->client->warning_delay/60/60/24; $board->label=$langs->trans("OrdersToProcess"); - $board->url=DOL_URL_ROOT.'/commande/liste.php?viewstatut=-3'; + $board->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3'; $board->img=img_object($langs->trans("Orders"),"order"); $rowspan++; $dashboardlines[]=$board; @@ -477,7 +477,7 @@ if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire && ! $use $board->load_board($user); $board->warning_delay=$conf->adherent->cotisation->warning_delay/60/60/24; $board->label=$langs->trans("MembersWithSubscriptionToReceive"); - $board->url=DOL_URL_ROOT.'/adherents/liste.php?mainmenu=members&statut=1'; + $board->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1'; $board->img=img_object($langs->trans("Members"),"user"); $rowspan++; $dashboardlines[]=$board; diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 322635354bf..7d94413f559 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -515,7 +515,7 @@ else // Shipment if (($delivery->origin == 'shipment' || $delivery->origin == 'expedition') && $delivery->origin_id > 0) { - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '
'.$langs->trans("RefSending").'
'; print ""; @@ -123,26 +123,26 @@ print '"; - $statProducts.= ''; + $statProducts.= ''; $statProducts.= ""; $statProducts.= ""; - $statProducts.= ''; + $statProducts.= ''; $statProducts.= ""; $statProducts.= ""; - $statProducts.= ''; + $statProducts.= ''; $statProducts.= ""; } if (! empty($conf->service->enabled)) { $statServices = ""; - $statServices.= ''; + $statServices.= ''; $statServices.= ""; $statServices.= ""; - $statServices.= ''; + $statServices.= ''; $statServices.= ""; $statServices.= ""; - $statServices.= ''; + $statServices.= ''; $statServices.= ""; } diff --git a/htdocs/product/liste.php b/htdocs/product/list.php similarity index 98% rename from htdocs/product/liste.php rename to htdocs/product/list.php index 682cd1dda6a..cd4cf11e80c 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/list.php @@ -25,7 +25,7 @@ */ /** - * \file htdocs/product/liste.php + * \file htdocs/product/list.php * \ingroup produit * \brief Page to list products and services */ @@ -239,13 +239,13 @@ else $param.=($search_categ?"&search_categ=".$search_categ:""); $param.=isset($type)?"&type=".$type:""; - print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); + print_barre_liste($texte, $page, "list.php", $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); if (! empty($catid)) { print "
"; $c = new Categorie($db); - $ways = $c->print_all_ways(' > ','product/liste.php'); + $ways = $c->print_all_ways(' > ','product/list.php'); print " > ".$ways[0]."
\n"; print "

"; } @@ -523,7 +523,7 @@ else $param.=($fourn_id?"&fourn_id=".$fourn_id:""); $param.=($search_categ?"&search_categ=".$search_categ:""); $param.=isset($type)?"&type=".$type:""; - print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num,$nbtotalofrecords); + print_barre_liste('', $page, "list.php", $param, $sortfield, $sortorder,'',$num,$nbtotalofrecords); $db->free($resql); diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 86e930d8cf1..366f3b040b8 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -94,7 +94,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->right $result=$object->delete($user); if ($result > 0) { - header("Location: ".DOL_URL_ROOT.'/product/stock/liste.php'); + header("Location: ".DOL_URL_ROOT.'/product/stock/list.php'); exit; } else @@ -238,7 +238,7 @@ else print '
'.$langs->trans("Statistics").'product->enabled)) { $statProducts = "
'.$langs->trans("ProductsNotOnSell").''.round($prodser[0][0]).''.$langs->trans("ProductsNotOnSell").''.round($prodser[0][0]).'
'.$langs->trans("ProductsOnSell").''.round($prodser[0][1]).''.$langs->trans("ProductsOnSell").''.round($prodser[0][1]).'
'.$langs->trans("ProductsOnSellAndOnBuy").''.round($prodser[0][2]).''.$langs->trans("ProductsOnSellAndOnBuy").''.round($prodser[0][2]).'
'.$langs->trans("ServicesNotOnSell").''.round($prodser[1][0]).''.$langs->trans("ServicesNotOnSell").''.round($prodser[1][0]).'
'.$langs->trans("ServicesOnSell").''.round($prodser[1][1]).''.$langs->trans("ServicesOnSell").''.round($prodser[1][1]).'
'.$langs->trans("ServicesOnSellAndOnBuy").''.round($prodser[1][2]).''.$langs->trans("ServicesOnSellAndOnBuy").''.round($prodser[1][2]).'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; print '
'.$langs->trans("Ref").''; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 1309da95a2a..faea23ab770 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -51,7 +51,7 @@ print '
'; /* * Zone recherche entrepot */ -print ''; +print ''; print ''; print ''; print ""; diff --git a/htdocs/product/stock/liste.php b/htdocs/product/stock/list.php similarity index 99% rename from htdocs/product/stock/liste.php rename to htdocs/product/stock/list.php index 04a9c03aa59..c63e4cfc898 100644 --- a/htdocs/product/stock/liste.php +++ b/htdocs/product/stock/list.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/product/stock/liste.php + * \file htdocs/product/stock/list.php * \ingroup stock * \brief Page with warehouse and stock value */ diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 1498b12a033..2feeee7aa2d 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -213,7 +213,7 @@ if ($resql) print '
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; // Location - print ''; + if (empty($conf->global->AGENDA_DISABLE_LOCATION)) + { + print ''; + } // Assigned to print ''; // Location - print ''; + if (empty($conf->global->AGENDA_DISABLE_LOCATION)) + { + print ''; + } // Assigned to print ''; + $rowspan=4; + if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++; + // Date start print ''; - print ''; // Location - print ''; + if (empty($conf->global->AGENDA_DISABLE_LOCATION)) + { + print ''; + } // Assigned to print ''; print '
'.$langs->trans("Ref").''; diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index f359f789c3f..b570d5720d9 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -156,7 +156,7 @@ if ($id > 0 || ! empty($ref)) */ print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; print "\n"; + // Other attributes + $parameters=array('colspan' => ' colspan="2"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields,'edit'); + } + print "
'.$langs->trans('Ref').''; diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 611fc314481..cb9742e40cc 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -104,7 +104,7 @@ if ($object->id > 0) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; print ''; print "\n"; + + // Other attributes + $parameters=array('colspan' => ' colspan="2"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields); + } + + print "
'.$langs->trans("Ref").''; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index b5a1d089c96..52149da9039 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -101,7 +101,7 @@ dol_fiche_head($head, 'element', $langs->trans("Project"),0,($project->public?'p print ''; -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; print ''; -print ''; +print ''; print ''; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 62e427d842c..37f2384b4b1 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -204,7 +204,7 @@ if ($resql) print ""; // Ref - print ''."\n"; // Author diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index fc1942e0f61..3a9d8f5bebe 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -45,7 +45,7 @@ foreach($linkedObjectBlock as $object) $var=!$var; ?> > + trans("ShowOrder"),"order").' '.$object->ref; ?>"; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/card.php similarity index 99% rename from htdocs/fourn/facture/fiche.php rename to htdocs/fourn/facture/card.php index 9d20c2b9722..fb55ce74052 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/card.php @@ -24,7 +24,7 @@ */ /** - * \file htdocs/fourn/facture/fiche.php + * \file htdocs/fourn/facture/card.php * \ingroup facture, fournisseur * \brief Page for supplier invoice card (view, edit, validate) */ @@ -1699,7 +1699,7 @@ else $objp = $db->fetch_object($result); $var=!$var; print ''; - print '\n"; + print '\n"; print ''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index c9969543d20..adc62ee4cd8 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -213,8 +213,8 @@ if ($action == 'confirm_paiement' && $confirm == 'yes') else $invoiceid=$facid; } } - if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$invoiceid; - else $loc = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement_id; + if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$invoiceid; + else $loc = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$paiement_id; header('Location: '.$loc); exit; } @@ -556,7 +556,7 @@ if (empty($action)) print ''; // Ref payment - print ''; + print ''; // Date print '\n"; diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index c10fea8bb8a..211d6c4ad8f 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -46,7 +46,7 @@ foreach($linkedObjectBlock as $object) $var=!$var; ?> > + trans("ShowBill"),"bill").' '.$object->ref; ?>"; - print '\n"; + print '\n"; print ''; print ''; print "\n"; diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/card.php similarity index 95% rename from htdocs/fourn/paiement/fiche.php rename to htdocs/fourn/paiement/card.php index f5f7114ada5..684985ed261 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/card.php @@ -19,10 +19,10 @@ */ /** - * \file htdocs/fourn/paiement/fiche.php + * \file htdocs/fourn/paiement/card.php * \ingroup facture, fournisseur * \brief Tab to show a payment of a supplier invoice - * \remarks Fichier presque identique a compta/paiement/fiche.php + * \remarks Fichier presque identique a compta/paiement/card.php */ require '../../main.inc.php'; @@ -268,13 +268,13 @@ if ($result > 0) $var=!$var; print ''; // Ref - print '\n"; // Ref supplier print '\n"; // Third party - print ''; + print ''; // Expected to pay print ''; // Status diff --git a/htdocs/fourn/product/categorie.php b/htdocs/fourn/product/categorie.php index b2d353046df..448cf19e61e 100644 --- a/htdocs/fourn/product/categorie.php +++ b/htdocs/fourn/product/categorie.php @@ -72,7 +72,7 @@ if ($_GET["id"]) $h=0; - $head[$h][0] = DOL_URL_ROOT."/fourn/product/fiche.php?id=".$product->id; + $head[$h][0] = DOL_URL_ROOT."/fourn/product/card.php?id=".$product->id; $head[$h][1] = $langs->trans("Card"); $h++; @@ -95,7 +95,7 @@ if ($_GET["id"]) $head[$h][1] = $langs->trans("Photos"); $h++; - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; + $head[$h][0] = DOL_URL_ROOT."/product/stats/card.php?id=".$product->id; $head[$h][1] = $langs->trans('Statistics'); $h++; diff --git a/htdocs/fourn/product/index.php b/htdocs/fourn/product/index.php index 68cf81745a3..28e84e30f6a 100644 --- a/htdocs/fourn/product/index.php +++ b/htdocs/fourn/product/index.php @@ -125,10 +125,10 @@ if ($resql) $objp = $db->fetch_object($resql); $var=!$var; print ""; - print "\n"; + print "rowid\">$objp->ref\n"; print ""; print ""; print "\n"; - print "\n"; + print "\n"; print ''; print '\n"; @@ -149,7 +149,7 @@ if ($socid > 0) print '\n"; // Author - print ''; + print ''; print "\n"; @@ -176,7 +176,7 @@ if ($socid > 0) print '\n"; print ''; + print ''.img_object($langs->trans("ShowPayment"),"payment").' '.$langs->trans("Payment").' '.$objp->rowid.''; print "\n"; print "\n"; print ''; @@ -184,7 +184,7 @@ if ($socid > 0) print '\n"; // Auteur - print ''; + print ''; print ''; diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/card.php similarity index 89% rename from htdocs/holiday/fiche.php rename to htdocs/holiday/card.php index 9fc3e278ac5..31a4e40599f 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/holiday/fiche.php + * \file htdocs/holiday/card.php * \ingroup holiday * \brief Form and file creation of paid holiday. */ @@ -84,21 +84,21 @@ if ($action == 'create') // Si pas de date de début if (empty($date_debut)) { - header('Location: fiche.php?action=request&error=nodatedebut'); + header('Location: card.php?action=request&error=nodatedebut'); exit; } // Si pas de date de fin if (empty($date_fin)) { - header('Location: fiche.php?action=request&error=nodatefin'); + header('Location: card.php?action=request&error=nodatefin'); exit; } // Si date de début après la date de fin if ($date_debut > $date_fin) { - header('Location: fiche.php?action=request&error=datefin'); + header('Location: card.php?action=request&error=datefin'); exit; } @@ -106,7 +106,7 @@ if ($action == 'create') $verifCP = $cp->verifDateHolidayCP($userID, $date_debut, $date_fin, $halfday); if (! $verifCP) { - header('Location: fiche.php?action=request&error=alreadyCP'); + header('Location: card.php?action=request&error=alreadyCP'); exit; } @@ -114,14 +114,14 @@ if ($action == 'create') $nbopenedday=num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); if($nbopenedday < 0.5) { - header('Location: fiche.php?action=request&error=DureeHoliday'); + header('Location: card.php?action=request&error=DureeHoliday'); exit; } // Si pas de validateur choisi if ($valideur < 1) { - header('Location: fiche.php?action=request&error=Valideur'); + header('Location: card.php?action=request&error=Valideur'); exit; } @@ -137,13 +137,13 @@ if ($action == 'create') // Si pas d'erreur SQL on redirige vers la fiche de la demande if ($verif > 0) { - header('Location: fiche.php?id='.$verif); + header('Location: card.php?id='.$verif); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: fiche.php?action=request&error=SQL_Create&msg='.$cp->error); + header('Location: card.php?action=request&error=SQL_Create&msg='.$cp->error); exit; } } @@ -165,7 +165,7 @@ if ($action == 'update') // Si pas le droit de modifier une demande if (! $user->rights->holiday->write) { - header('Location: fiche.php?action=request&error=CantUpdate'); + header('Location: card.php?action=request&error=CantUpdate'); exit; } @@ -185,25 +185,25 @@ if ($action == 'update') // Si pas de date de début if (empty($_POST['date_debut_'])) { - header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=nodatedebut'); + header('Location: card.php?id='.$_POST['holiday_id'].'&action=edit&error=nodatedebut'); exit; } // Si pas de date de fin if (empty($_POST['date_fin_'])) { - header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=nodatefin'); + header('Location: card.php?id='.$_POST['holiday_id'].'&action=edit&error=nodatefin'); exit; } // Si date de début après la date de fin if ($date_debut > $date_fin) { - header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=datefin'); + header('Location: card.php?id='.$_POST['holiday_id'].'&action=edit&error=datefin'); exit; } // Si pas de valideur choisi if ($valideur < 1) { - header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=Valideur'); + header('Location: card.php?id='.$_POST['holiday_id'].'&action=edit&error=Valideur'); exit; } @@ -211,7 +211,7 @@ if ($action == 'update') $nbopenedday=num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); if ($nbopenedday < 0.5) { - header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=DureeHoliday'); + header('Location: card.php?id='.$_POST['holiday_id'].'&action=edit&error=DureeHoliday'); exit; } @@ -225,18 +225,18 @@ if ($action == 'update') $verif = $cp->update($user->id); if ($verif > 0) { - header('Location: fiche.php?id='.$_POST['holiday_id']); + header('Location: card.php?id='.$_POST['holiday_id']); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=SQL_Create&msg='.$cp->error); + header('Location: card.php?id='.$_POST['holiday_id'].'&action=edit&error=SQL_Create&msg='.$cp->error); exit; } } } else { - header('Location: fiche.php?id='.$_POST['holiday_id']); + header('Location: card.php?id='.$_POST['holiday_id']); exit; } } @@ -305,7 +305,7 @@ if ($action == 'confirm_send') if (!$emailTo) { - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } @@ -354,7 +354,7 @@ if ($action == 'confirm_send') $message.= "\n"; $message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->rowid."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -364,16 +364,16 @@ if ($action == 'confirm_send') if (!$result) { - header('Location: fiche.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); + header('Location: card.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); exit; } - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: fiche.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); + header('Location: card.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); exit; } } @@ -417,7 +417,7 @@ if($action == 'confirm_valid') if (!$emailTo) { - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } @@ -439,7 +439,7 @@ if($action == 'confirm_valid') $message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->rowid."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -448,15 +448,15 @@ if($action == 'confirm_valid') $result=$mail->sendfile(); if(!$result) { - header('Location: fiche.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); + header('Location: card.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); exit; } - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: fiche.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); + header('Location: card.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); exit; } @@ -491,7 +491,7 @@ if ($action == 'confirm_refuse') if (!$emailTo) { - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } @@ -514,7 +514,7 @@ if ($action == 'confirm_refuse') $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->rowid."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -523,22 +523,22 @@ if ($action == 'confirm_refuse') $result=$mail->sendfile(); if(!$result) { - header('Location: fiche.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); + header('Location: card.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); exit; } - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: fiche.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); + header('Location: card.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); exit; } } } else { - header('Location: fiche.php?id='.$_GET['id'].'&error=NoMotifRefuse'); + header('Location: card.php?id='.$_GET['id'].'&error=NoMotifRefuse'); exit; } } @@ -600,7 +600,7 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') if (!$emailTo) { - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } @@ -622,7 +622,7 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') $message.= $langs->transnoentities("HolidaysCanceledBody", dol_print_date($cp->date_debut,'day'), dol_print_date($cp->date_fin,'day'))."\n"; $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$cp->rowid."\n\n"; $message.= "\n"; $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); @@ -632,17 +632,17 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') if(!$result) { - header('Location: fiche.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); + header('Location: card.php?id='.$_GET['id'].'&error=mail&error_content='.$mail->error); exit; } - header('Location: fiche.php?id='.$_GET['id']); + header('Location: card.php?id='.$_GET['id']); exit; } else { // Sinon on affiche le formulaire de demande avec le message d'erreur SQL - header('Location: fiche.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); + header('Location: card.php?id='.$_GET['id'].'&error=SQL_Create&msg='.$cp->error); exit; } @@ -901,33 +901,33 @@ else { if($user->rights->holiday->delete) { - print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); + print $form->formconfirm("card.php?id=".$id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1); } } // Si envoi en validation if ($action == 'sendToValidate' && $cp->statut == 1 && $user->id == $cp->fk_user) { - print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); + print $form->formconfirm("card.php?id=".$id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1); } // Si validation de la demande if ($action == 'valid') { - print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); + print $form->formconfirm("card.php?id=".$id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1); } // Si refus de la demande if ($action == 'refuse') { $array_input = array(array('type'=>"text",'label'=> $langs->trans('DetailRefusCP'),'name'=>"detail_refuse",'size'=>"50",'value'=>"")); - print $form->formconfirm("fiche.php?id=".$id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); + print $form->formconfirm("card.php?id=".$id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); } // Si annulation de la demande if ($action == 'cancel') { - print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); + print $form->formconfirm("card.php?id=".$id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1); } $head=holiday_prepare_head($cp); @@ -1126,26 +1126,26 @@ else // Boutons d'actions if ($canedit && $cp->statut == 1) { - print ''.$langs->trans("EditCP").''; + print ''.$langs->trans("EditCP").''; } if ($canedit && $cp->statut == 1) { - print ''.$langs->trans("Validate").''; + print ''.$langs->trans("Validate").''; } if ($user->rights->holiday->delete && $cp->statut == 1) // If draft { - print ''.$langs->trans("DeleteCP").''; + print ''.$langs->trans("DeleteCP").''; } if ($user->id == $cp->fk_validator && $cp->statut == 2) { - print ''.$langs->trans("Approve").''; - print ''.$langs->trans("ActionRefuseCP").''; + print ''.$langs->trans("Approve").''; + print ''.$langs->trans("ActionRefuseCP").''; } if (($user->id == $cp->fk_validator || $user->id == $cp->fk_user) && ($cp->statut == 2 || $cp->statut == 3)) // Status validated or approved { - if (($cp->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; + if (($cp->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; else print ''.$langs->trans("ActionCancelCP").''; } diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index b88547729c1..119a4980a78 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -659,7 +659,7 @@ class Holiday extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='holiday'; diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index 26f413a4e43..9b0d1bbba62 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -386,7 +386,7 @@ if ($user_id == $user->id) { print '
'; print ''; } diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/card.php similarity index 94% rename from htdocs/livraison/fiche.php rename to htdocs/livraison/card.php index 7d94413f559..48f1fa388b3 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/card.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/livraison/fiche.php + * \file htdocs/livraison/card.php * \ingroup livraison * \brief Fiche descriptive d'un bon de livraison=reception */ @@ -271,7 +271,7 @@ if ($action == 'create') /* * Commande */ - print ''; + print ''; print ''; print ''; print ''; @@ -281,7 +281,7 @@ if ($action == 'create') } print '
'.$langs->trans("Ref").''; // Define a complementary filter for search of next/prev ref. diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 1fe3d91346d..978e142b1ad 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -615,7 +615,7 @@ else { print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '"; // Sending id - print ''; + print ''; // Description if ($objp->fk_product > 0) @@ -310,7 +310,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='') // Ref print ''; // Qty received //print ''; print "\n"; @@ -926,7 +926,7 @@ if ($action == 'create') $img=img_warning($langs->trans("StockTooLow")); } print ""; } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index d2527d1fca0..dc54ea3670b 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1171,7 +1171,7 @@ class Expedition extends CommonObject $result=''; - $url = DOL_URL_ROOT.'/expedition/fiche.php?id='.$this->id; + $url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id; if ($short) return $url; diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index d299bda1422..188127f0304 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -101,10 +101,10 @@ if ($resql) print $shipment->getNomUrl(1); print ""; print ''; print ''; $i++; } @@ -253,9 +253,9 @@ if ($resql) { $var=!$var; $obj = $db->fetch_object($resql); - print ''; - print ''; + print ''; print ''; + print ''; print ''; print ''; print ''; @@ -606,7 +606,7 @@ if ($id > 0 || ! empty($ref)) { if ($user->rights->expedition->creer) { - print ''.$langs->trans("NewSending").''; + print ''.$langs->trans("NewSending").''; if ($toBeShippedTotal <= 0) { print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend")); @@ -628,7 +628,7 @@ if ($id > 0 || ! empty($ref)) { print_titre($langs->trans("NewSending")); - print ''; + print ''; print ''; print ''; print ''; @@ -647,7 +647,7 @@ if ($id > 0 || ! empty($ref)) print $formproduct->selectWarehouses(-1,'entrepot_id','',1); if (count($formproduct->cache_warehouses) <= 0) { - print '   '.$langs->trans("WarehouseSourceNotDefined").' '.$langs->trans("AddOne").''; + print '   '.$langs->trans("WarehouseSourceNotDefined").' '.$langs->trans("AddOne").''; } print ''; } diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index 364afb92177..72206c13e2b 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -47,7 +47,7 @@ foreach($linkedObjectBlock as $object) $var=!$var; ?> > + trans("ShowShipping"),"sending").' '.$object->ref; ?>"; print ''; print ''; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/card.php similarity index 98% rename from htdocs/fichinter/fiche.php rename to htdocs/fichinter/card.php index edd5372471e..ae44f5bb8b7 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/fichinter/fiche.php + * \file htdocs/fichinter/card.php * \brief Page of intervention * \ingroup ficheinter */ @@ -1044,7 +1044,7 @@ if ($action == 'create') $numprojet=$formproject->select_projects($soc->id,GETPOST('projectid','int'),'projectid'); if ($numprojet==0) { - print '   '.$langs->trans("AddProject").''; + print '   '.$langs->trans("AddProject").''; } print ''; } @@ -1057,7 +1057,7 @@ if ($action == 'create') $numcontrat=$formcontract->select_contract($soc->id,GETPOST('contratid','int'),'contratid',0,1); if ($numcontrat==0) { - print '   '.$langs->trans("AddContract").''; + print '   '.$langs->trans("AddContract").''; } print ''; } @@ -1303,7 +1303,7 @@ else if ($id > 0 || ! empty($ref)) { $contratstatic = new Contrat($db); $contratstatic->fetch($object->fk_contrat); - //print ''.$projet->title.''; + //print ''.$projet->title.''; print $contratstatic->getNomUrl(0,'',1); } else @@ -1620,14 +1620,14 @@ else if ($id > 0 || ! empty($ref)) // Validate if ($object->statut == 0 && $user->rights->ficheinter->creer && (count($object->lines) > 0 || ! empty($conf->global->FICHINTER_DISABLE_DETAILS))) { - print ''; } // Modify if ($object->statut == 1 && $user->rights->ficheinter->creer) { - print '
'; + print ''; @@ -1651,7 +1651,7 @@ else if ($id > 0 || ! empty($ref)) $langs->load("agenda"); if ($object->statut < 2) { - if ($user->rights->agenda->myactions->create) print ''; + if ($user->rights->agenda->myactions->create) print ''; else print ''; } } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 6aaf29c7ac2..6f613dda5c8 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -545,7 +545,7 @@ class Fichinter extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='intervention'; diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index e104bea2a7a..4e0d6b753e7 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -42,7 +42,7 @@ foreach($linkedObjectBlock as $object) $var=!$var; ?>
> + trans("ShowIntervention"),"intervention").' '.$object->ref; ?> diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/card.php similarity index 96% rename from htdocs/fourn/fiche.php rename to htdocs/fourn/card.php index 0294e78986e..313f82547e7 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/fourn/fiche.php + * \file htdocs/fourn/card.php * \ingroup fournisseur, facture * \brief Page for supplier third party card (view, edit) */ @@ -331,7 +331,7 @@ if ($object->fetch($id)) $var=!$var; print ""; - print ''; + print ''; print ''; print ''; print ''; print ''; @@ -431,13 +431,13 @@ if ($object->fetch($id)) if ($user->rights->fournisseur->commande->creer) { $langs->load("orders"); - print ''.$langs->trans("AddOrder").''; + print ''.$langs->trans("AddOrder").''; } if ($user->rights->fournisseur->facture->creer) { $langs->load("bills"); - print ''.$langs->trans("AddBill").''; + print ''.$langs->trans("AddBill").''; } // Add action @@ -445,7 +445,7 @@ if ($object->fetch($id)) { if ($user->rights->agenda->myactions->create) { - print ''.$langs->trans("AddAction").''; + print ''.$langs->trans("AddAction").''; } else { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 4e8c3a650b0..d3e15bd1ded 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -523,7 +523,7 @@ class CommandeFournisseur extends CommonOrder $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='order'; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4ceea058b4f..0ce9381fa38 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1438,7 +1438,7 @@ class FactureFournisseur extends CommonInvoice } else { - $lien = ''; + $lien = ''; $lienfin=''; } $label=$langs->trans("ShowInvoice").': '.$this->ref; diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index f41cee3c2b7..59dc5dab3d1 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -488,7 +488,7 @@ class PaiementFourn extends Paiement $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $text=$this->ref; // Sometimes ref contains label diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/card.php similarity index 99% rename from htdocs/fourn/commande/fiche.php rename to htdocs/fourn/commande/card.php index 0131ddb72dd..39a382d8d62 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/card.php @@ -24,7 +24,7 @@ */ /** - * \file htdocs/fourn/commande/fiche.php + * \file htdocs/fourn/commande/card.php * \ingroup supplier, order * \brief Card supplier order */ @@ -1871,7 +1871,7 @@ elseif (! empty($object->id)) { if ($user->rights->fournisseur->facture->creer) { - print ''.$langs->trans("CreateBill").''; + print ''.$langs->trans("CreateBill").''; } //if ($user->rights->fournisseur->commande->creer && $object->statut > 2) @@ -1942,7 +1942,7 @@ elseif (! empty($object->id)) * Commander (action=commande) */ print '
'; - print ''; + print ''; print ''; print ''; print '
'.$langs->trans("Ref").''; diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 0c06c30ba57..e6fdd3264ca 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -102,7 +102,7 @@ if ($id > 0 || ! empty($ref)) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/card.php similarity index 89% rename from htdocs/compta/payment_sc/fiche.php rename to htdocs/compta/payment_sc/card.php index 5c6562b6fc0..326903dc67d 100644 --- a/htdocs/compta/payment_sc/fiche.php +++ b/htdocs/compta/payment_sc/card.php @@ -19,10 +19,10 @@ */ /** - * \file htdocs/compta/payment_sc/fiche.php + * \file htdocs/compta/payment_sc/card.php * \ingroup facture * \brief Onglet payment of a social contribution - * \remarks Fichier presque identique a fournisseur/paiement/fiche.php + * \remarks Fichier presque identique a fournisseur/paiement/card.php */ require '../../main.inc.php'; @@ -101,7 +101,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->tax->char if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, $fac->modelpdf, $outputlangs); } - header('Location: fiche.php?id='.$paiement->id); + header('Location: card.php?id='.$paiement->id); exit; } else @@ -124,7 +124,7 @@ $form = new Form($db); $h=0; -$head[$h][0] = DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='.$_GET["id"]; +$head[$h][0] = DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$_GET["id"]; $head[$h][1] = $langs->trans("Card"); $hselected = $h; $h++; @@ -142,7 +142,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0, */ if ($action == 'delete') { - print $form->formconfirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print $form->formconfirm('card.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -152,7 +152,7 @@ if ($action == 'delete') if ($action == 'valide') { $facid = $_GET['facid']; - print $form->formconfirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + print $form->formconfirm('card.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } @@ -211,7 +211,7 @@ $sql.= ' WHERE pf.fk_charge = f.rowid AND f.fk_type = pc.id'; $sql.= ' AND f.entity = '.$conf->entity; $sql.= ' AND pf.rowid = '.$paiement->id; -dol_syslog("compta/payment_sc/fiche.php", LOG_DEBUG); +dol_syslog("compta/payment_sc/card.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -291,7 +291,7 @@ if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { if ($user->rights->facture->paiement) { - print ''.$langs->trans('Valid').''; + print ''.$langs->trans('Valid').''; } } } @@ -303,7 +303,7 @@ if ($_GET['action'] == '') { if (! $disable_delete) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 8c55d8b556c..c2d67b4551b 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -104,7 +104,7 @@ if ($result) print $bon->LibStatut($obj->statut,2); print " "; - print ''.$obj->ref."\n"; + print ''.$obj->ref."\n"; print '\n"; diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/card.php similarity index 88% rename from htdocs/compta/prelevement/fiche.php rename to htdocs/compta/prelevement/card.php index e594beae1d6..e2a5e846b0a 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/compta/prelevement/fiche.php + * \file htdocs/compta/prelevement/card.php * \ingroup prelevement * \brief Fiche prelevement */ @@ -69,7 +69,7 @@ if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes') $bon->set_credite(); - header("Location: fiche.php?id=".$id); + header("Location: card.php?id=".$id); exit; } @@ -92,7 +92,7 @@ if ($action == 'infotrans' && $user->rights->prelevement->bons->send) $bon->set_infotrans($user, $dt, GETPOST('methode','alpha')); } - header("Location: fiche.php?id=".$id); + header("Location: card.php?id=".$id); exit; } else @@ -105,7 +105,7 @@ if ($action == 'infotrans' && $user->rights->prelevement->bons->send) if ($error) { - header("Location: fiche.php?id=".$id."&error=$error"); + header("Location: card.php?id=".$id."&error=$error"); exit; } } @@ -120,7 +120,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) if ($error) { - header("Location: fiche.php?id=".$id."&error=$error"); + header("Location: card.php?id=".$id."&error=$error"); exit; } } @@ -150,7 +150,7 @@ if ($id > 0) /*if ($action == 'credite') { - print $form->formconfirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); + print $form->formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); }*/ @@ -201,7 +201,7 @@ if ($id > 0) if (empty($bon->date_trans) && $user->rights->prelevement->bons->send && $action=='settransmitted') { - print ''; + print ''; print ''; print ''; print '
'; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 4e81c2efca3..d986c1ca079 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -77,7 +77,7 @@ print '
'; if (! empty($conf->projet->enabled) && $user->rights->projet->lire) { $var=false; - print ''; + print ''; print ''; print ''; print ''; @@ -135,7 +135,7 @@ if ( $resql ) print $langs->trans("OthersNotLinkedToThirdParty"); } print ''; - print ''; + print ''; print "\n"; $i++; diff --git a/htdocs/projet/liste.php b/htdocs/projet/list.php similarity index 98% rename from htdocs/projet/liste.php rename to htdocs/projet/list.php index a7404e5c23b..2a427558eb4 100644 --- a/htdocs/projet/liste.php +++ b/htdocs/projet/list.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/projet/liste.php + * \file htdocs/projet/list.php * \ingroup projet * \brief Page to list projects */ @@ -39,7 +39,7 @@ if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); - $title .= ' ('.$soc->nom.')'; + $title .= ' ('.$soc->nom.')'; } if (!$user->rights->projet->lire) accessforbidden(); diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index a086f632a36..b581ca01be9 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("SearchAProject").'
'.$obj->nb.''.$obj->nb.'
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; // Id - print ''; + print ''; // Type print ''; // Date diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/card.php similarity index 96% rename from htdocs/compta/dons/fiche.php rename to htdocs/compta/dons/card.php index 68b2bef1b58..a9c8a42448b 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/card.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/dons/fiche.php + * \file htdocs/compta/dons/card.php * \ingroup don * \brief Page of donation card */ @@ -268,7 +268,7 @@ if ($action == 'create') { print_fiche_titre($langs->trans("AddDonation")); - print ''; + print ''; print ''; print '
'.$langs->trans("Ref").''; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 994779fcac9..8461321e071 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -203,7 +203,7 @@ if ($id > 0 || ! empty($ref)) print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print '"; - $statstring2.= ''; + $statstring2.= ''; $statstring2.= ""; } print $statstring; From 0b20369dd7ebe2efae0f80360f980ebe5208f75d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 18 Sep 2014 21:18:25 +0200 Subject: [PATCH 12/36] Qual: Renamed all files & links "fiche.php" into "card.php" --- ChangeLog | 3 +- htdocs/accountancy/supplier/list.php | 4 +- htdocs/adherents/agenda.php | 2 +- htdocs/adherents/{fiche.php => card.php} | 30 +++--- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/class/adherent.class.php | 2 +- htdocs/adherents/list.php | 8 +- htdocs/adherents/type.php | 10 +- htdocs/bookmarks/bookmarks.lib.php | 2 +- htdocs/bookmarks/{fiche.php => card.php} | 4 +- htdocs/bookmarks/list.php | 6 +- .../boutique/client/{fiche.php => card.php} | 4 +- htdocs/boutique/client/index.php | 4 +- .../boutique/commande/{fiche.php => card.php} | 14 +-- htdocs/boutique/commande/index.php | 4 +- htdocs/boutique/critiques/bestproduct.php | 2 +- .../critiques/{fiche.php => card.php} | 2 +- htdocs/boutique/critiques/index.php | 2 +- htdocs/boutique/notification/index.php | 4 +- htdocs/boutique/notification/produits.php | 2 +- htdocs/boutique/produits/index.php | 4 +- htdocs/categories/{fiche.php => card.php} | 2 +- htdocs/categories/categorie.php | 2 +- htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/{fiche.php => card.php} | 14 +-- htdocs/comm/action/class/actioncomm.class.php | 4 +- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/peruser.php | 4 +- htdocs/comm/address.php | 4 +- htdocs/comm/{fiche.php => card.php} | 26 ++--- htdocs/comm/contact.php | 8 +- htdocs/comm/index.php | 6 +- htdocs/comm/mailing/{fiche.php => card.php} | 20 ++-- htdocs/comm/mailing/index.php | 2 +- htdocs/comm/mailing/list.php | 2 +- htdocs/comm/propal.php | 10 +- htdocs/comm/propal/index.php | 4 +- htdocs/comm/propal/list.php | 2 +- htdocs/comm/prospect/list.php | 2 +- htdocs/comm/remise.php | 2 +- htdocs/comm/remx.php | 4 +- htdocs/commande/apercu.php | 2 +- htdocs/commande/{fiche.php => card.php} | 12 +-- htdocs/commande/class/commande.class.php | 2 +- htdocs/commande/index.php | 10 +- htdocs/commande/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/compta/bank/account.php | 2 +- htdocs/compta/bank/{fiche.php => card.php} | 2 +- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/bank/index.php | 2 +- htdocs/compta/bank/ligne.php | 12 +-- htdocs/compta/bank/rappro.php | 4 +- htdocs/compta/bank/releve.php | 4 +- .../deplacement/{fiche.php => card.php} | 2 +- .../deplacement/class/deplacement.class.php | 2 +- htdocs/compta/deplacement/list.php | 2 +- htdocs/compta/dons/{fiche.php => card.php} | 18 ++-- htdocs/compta/dons/class/don.class.php | 2 +- htdocs/compta/facture.php | 2 +- htdocs/compta/facture/apercu.php | 2 +- htdocs/compta/facture/prelevement.php | 4 +- htdocs/compta/index.php | 2 +- .../compta/localtax/{fiche.php => card.php} | 8 +- .../compta/localtax/class/localtax.class.php | 4 +- htdocs/compta/paiement.php | 2 +- htdocs/compta/paiement/avalider.php | 4 +- .../compta/paiement/{fiche.php => card.php} | 4 +- .../paiement/cheque/{fiche.php => card.php} | 2 +- .../cheque/class/remisecheque.class.php | 2 +- htdocs/compta/paiement/cheque/index.php | 2 +- .../compta/paiement/class/paiement.class.php | 10 +- htdocs/compta/paiement/list.php | 2 +- .../compta/payment_sc/{fiche.php => card.php} | 18 ++-- htdocs/compta/prelevement/bons.php | 2 +- .../prelevement/{fiche.php => card.php} | 22 ++-- .../class/bonprelevement.class.php | 4 +- htdocs/compta/prelevement/factures.php | 2 +- htdocs/compta/prelevement/fiche-rejet.php | 2 +- htdocs/compta/prelevement/ligne.php | 4 +- htdocs/compta/prelevement/lignes.php | 2 +- htdocs/compta/prelevement/list.php | 6 +- htdocs/compta/prelevement/rejets.php | 2 +- htdocs/compta/recap-compta.php | 2 +- .../compta/salaries/{fiche.php => card.php} | 8 +- .../salaries/class/paymentsalary.class.php | 6 +- htdocs/compta/sociales/charges.php | 2 +- .../class/paymentsocialcontribution.class.php | 4 +- htdocs/compta/stats/cabyprodserv.php | 2 +- htdocs/compta/stats/cabyuser.php | 2 +- htdocs/compta/tva/{fiche.php => card.php} | 8 +- htdocs/compta/tva/class/tva.class.php | 4 +- htdocs/compta/tva/quadri.php | 2 +- .../ventilation/{fiche.php => card.php} | 4 +- .../fournisseur/{fiche.php => card.php} | 4 +- .../compta/ventilation/fournisseur/list.php | 4 +- htdocs/compta/ventilation/list.php | 2 +- htdocs/contact/{fiche.php => card.php} | 10 +- htdocs/contact/class/contact.class.php | 4 +- htdocs/contact/list.php | 8 +- htdocs/contrat/{fiche.php => card.php} | 2 +- htdocs/contrat/class/contrat.class.php | 4 +- htdocs/contrat/index.php | 8 +- htdocs/contrat/list.php | 4 +- htdocs/contrat/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/core/boxes/box_actions.php | 4 +- htdocs/core/boxes/box_clients.php | 2 +- htdocs/core/boxes/box_commandes.php | 8 +- htdocs/core/boxes/box_contacts.php | 4 +- htdocs/core/boxes/box_contracts.php | 8 +- htdocs/core/boxes/box_factures.php | 4 +- htdocs/core/boxes/box_factures_fourn.php | 10 +- htdocs/core/boxes/box_factures_fourn_imp.php | 10 +- htdocs/core/boxes/box_factures_imp.php | 4 +- htdocs/core/boxes/box_ficheinter.php | 8 +- htdocs/core/boxes/box_fournisseurs.php | 4 +- htdocs/core/boxes/box_members.php | 4 +- htdocs/core/boxes/box_produits.php | 4 +- .../core/boxes/box_produits_alerte_stock.php | 4 +- htdocs/core/boxes/box_propales.php | 4 +- htdocs/core/boxes/box_prospect.php | 4 +- htdocs/core/boxes/box_services_contracts.php | 8 +- htdocs/core/boxes/box_services_expired.php | 8 +- htdocs/core/boxes/box_supplier_orders.php | 4 +- htdocs/core/class/html.form.class.php | 6 +- htdocs/core/class/notify.class.php | 6 +- htdocs/core/lib/agenda.lib.php | 2 +- htdocs/core/lib/bank.lib.php | 2 +- htdocs/core/lib/company.lib.php | 26 ++--- htdocs/core/lib/contact.lib.php | 2 +- htdocs/core/lib/contract.lib.php | 2 +- htdocs/core/lib/emailing.lib.php | 2 +- htdocs/core/lib/fichinter.lib.php | 2 +- htdocs/core/lib/fourn.lib.php | 4 +- htdocs/core/lib/functions.lib.php | 6 +- htdocs/core/lib/holiday.lib.php | 2 +- htdocs/core/lib/member.lib.php | 2 +- htdocs/core/lib/order.lib.php | 2 +- htdocs/core/lib/payments.lib.php | 4 +- htdocs/core/lib/prelevement.lib.php | 2 +- htdocs/core/lib/product.lib.php | 6 +- htdocs/core/lib/project.lib.php | 2 +- htdocs/core/lib/sendings.lib.php | 12 +-- htdocs/core/lib/stock.lib.php | 2 +- htdocs/core/lib/trip.lib.php | 2 +- htdocs/core/lib/usergroups.lib.php | 4 +- htdocs/core/menus/init_menu_auguria.sql | 58 +++++----- htdocs/core/menus/standard/auguria.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 66 ++++++------ .../modules/mailings/contacts1.modules.php | 2 +- .../modules/mailings/contacts2.modules.php | 2 +- .../modules/mailings/contacts3.modules.php | 2 +- .../modules/mailings/contacts4.modules.php | 2 +- .../core/modules/mailings/fraise.modules.php | 2 +- .../modules/mailings/framboise.modules.php | 2 +- .../core/modules/mailings/pomme.modules.php | 2 +- htdocs/core/modules/modAgenda.class.php | 2 +- htdocs/core/modules/modHoliday.class.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 2 +- htdocs/expedition/{fiche.php => card.php} | 14 +-- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/expedition/index.php | 8 +- htdocs/expedition/shipment.php | 8 +- .../expedition/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fichinter/apercu.php | 2 +- htdocs/fichinter/{fiche.php => card.php} | 14 +-- htdocs/fichinter/class/fichinter.class.php | 2 +- .../fichinter/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fourn/{fiche.php => card.php} | 12 +-- .../class/fournisseur.commande.class.php | 2 +- .../fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/fourn/commande/{fiche.php => card.php} | 8 +- htdocs/fourn/commande/history.php | 2 +- htdocs/fourn/commande/index.php | 8 +- htdocs/fourn/commande/list.php | 4 +- .../commande/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fourn/contact.php | 4 +- htdocs/fourn/facture/{fiche.php => card.php} | 4 +- htdocs/fourn/facture/paiement.php | 6 +- .../facture/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fourn/index.php | 4 +- htdocs/fourn/paiement/{fiche.php => card.php} | 8 +- htdocs/fourn/product/categorie.php | 4 +- htdocs/fourn/product/index.php | 4 +- htdocs/fourn/product/list.php | 2 +- htdocs/fourn/product/photos.php | 4 +- htdocs/fourn/recap-fourn.php | 8 +- htdocs/holiday/{fiche.php => card.php} | 100 +++++++++--------- htdocs/holiday/class/holiday.class.php | 2 +- htdocs/holiday/index.php | 2 +- htdocs/livraison/{fiche.php => card.php} | 22 ++-- htdocs/livraison/class/livraison.class.php | 2 +- htdocs/main.inc.php | 2 +- htdocs/margin/tabs/productMargins.php | 2 +- htdocs/product/{fiche.php => card.php} | 6 +- htdocs/product/class/product.class.php | 4 +- .../composition/{fiche.php => card.php} | 8 +- htdocs/product/list.php | 2 +- htdocs/product/popuprop.php | 2 +- htdocs/product/price.php | 2 +- htdocs/product/reassort.php | 2 +- htdocs/product/stats/{fiche.php => card.php} | 2 +- htdocs/product/stats/commande.php | 4 +- htdocs/product/stats/commande_fournisseur.php | 2 +- htdocs/product/stats/contrat.php | 4 +- htdocs/product/stats/facture.php | 2 +- htdocs/product/stats/facture_fournisseur.php | 2 +- htdocs/product/stats/propal.php | 2 +- htdocs/product/stock/{fiche.php => card.php} | 12 +-- htdocs/product/stock/class/entrepot.class.php | 2 +- htdocs/product/stock/index.php | 6 +- htdocs/product/stock/list.php | 2 +- htdocs/product/stock/replenishorders.php | 4 +- htdocs/product/stock/valo.php | 2 +- htdocs/projet/{fiche.php => card.php} | 16 +-- htdocs/projet/class/project.class.php | 2 +- htdocs/projet/element.php | 6 +- htdocs/projet/index.php | 2 +- htdocs/societe/agenda.php | 2 +- .../canvas/actions_card_common.class.php | 4 +- htdocs/societe/class/societe.class.php | 6 +- htdocs/societe/commerciaux.php | 4 +- htdocs/societe/notify/{fiche.php => card.php} | 4 +- htdocs/societe/notify/index.php | 2 +- htdocs/societe/soc.php | 4 +- htdocs/societe/societecontact.php | 2 +- htdocs/user/{fiche.php => card.php} | 18 ++-- htdocs/user/class/user.class.php | 6 +- htdocs/user/group/{fiche.php => card.php} | 4 +- htdocs/user/group/index.php | 2 +- htdocs/user/home.php | 6 +- htdocs/user/index.php | 2 +- scripts/emailings/mailing-send.php | 4 +- test/selenium/test_thirdparty.xml | 2 +- 234 files changed, 665 insertions(+), 664 deletions(-) rename htdocs/adherents/{fiche.php => card.php} (96%) rename htdocs/bookmarks/{fiche.php => card.php} (98%) rename htdocs/boutique/client/{fiche.php => card.php} (93%) rename htdocs/boutique/commande/{fiche.php => card.php} (85%) rename htdocs/boutique/critiques/{fiche.php => card.php} (97%) rename htdocs/categories/{fiche.php => card.php} (99%) rename htdocs/comm/action/{fiche.php => card.php} (98%) rename htdocs/comm/{fiche.php => card.php} (95%) rename htdocs/comm/mailing/{fiche.php => card.php} (97%) rename htdocs/commande/{fiche.php => card.php} (99%) rename htdocs/compta/bank/{fiche.php => card.php} (99%) rename htdocs/compta/deplacement/{fiche.php => card.php} (99%) rename htdocs/compta/dons/{fiche.php => card.php} (96%) rename htdocs/compta/localtax/{fiche.php => card.php} (95%) rename htdocs/compta/paiement/{fiche.php => card.php} (98%) rename htdocs/compta/paiement/cheque/{fiche.php => card.php} (99%) rename htdocs/compta/payment_sc/{fiche.php => card.php} (89%) rename htdocs/compta/prelevement/{fiche.php => card.php} (88%) rename htdocs/compta/salaries/{fiche.php => card.php} (97%) rename htdocs/compta/tva/{fiche.php => card.php} (96%) rename htdocs/compta/ventilation/{fiche.php => card.php} (96%) rename htdocs/compta/ventilation/fournisseur/{fiche.php => card.php} (96%) rename htdocs/contact/{fiche.php => card.php} (98%) rename htdocs/contrat/{fiche.php => card.php} (99%) rename htdocs/expedition/{fiche.php => card.php} (99%) rename htdocs/fichinter/{fiche.php => card.php} (98%) rename htdocs/fourn/{fiche.php => card.php} (96%) rename htdocs/fourn/commande/{fiche.php => card.php} (99%) rename htdocs/fourn/facture/{fiche.php => card.php} (99%) rename htdocs/fourn/paiement/{fiche.php => card.php} (95%) rename htdocs/holiday/{fiche.php => card.php} (89%) rename htdocs/livraison/{fiche.php => card.php} (94%) rename htdocs/product/{fiche.php => card.php} (99%) rename htdocs/product/composition/{fiche.php => card.php} (98%) rename htdocs/product/stats/{fiche.php => card.php} (99%) rename htdocs/product/stock/{fiche.php => card.php} (97%) rename htdocs/projet/{fiche.php => card.php} (96%) rename htdocs/societe/notify/{fiche.php => card.php} (98%) rename htdocs/user/{fiche.php => card.php} (98%) rename htdocs/user/group/{fiche.php => card.php} (98%) diff --git a/ChangeLog b/ChangeLog index f3287e51215..2c0a5353f60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -112,7 +112,8 @@ For developers: - Qual: Renamed table llx_c_civilite into llx_c_civility, field civilite into label in the same table, and field civilite into civility in other table -- Qual: Renamed all files & links "liste.php" into "list.php" +- Qual: Renamed all files & links "liste.php" into "list.php" +- Qual: Renamed all files & links "fiche.php" into "card.php" WARNING: Following changes may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 84f548344b8..7cb53a99a83 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -176,9 +176,9 @@ if ($result) { print ' '; print ''; - // print ''; + // print ''; - // print ''; + // print ''; print ''; diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 5d19cad1ffb..501b5ed87d1 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -139,7 +139,7 @@ if ($object->id > 0) if (! empty($conf->agenda->enabled)) { - print ''; + print ''; } print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/card.php similarity index 96% rename from htdocs/adherents/fiche.php rename to htdocs/adherents/card.php index 069bbe0669e..3b1f61df5b5 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/card.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/adherents/fiche.php + * \file htdocs/adherents/card.php * \ingroup member * \brief Page of member */ @@ -1284,13 +1284,13 @@ else if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); } - print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1); } // Confirm send card by mail if ($action == 'sendinfo') { - print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("SendCardByMail"),$langs->trans("ConfirmSendCardByMail",$object->email),"confirm_sendinfo",'',0,1); } // Confirm resiliate @@ -1321,7 +1321,7 @@ else $formquestion=array(); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false')); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion); } // Confirm remove member @@ -1329,7 +1329,7 @@ else { $formquestion=array(); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); - print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); + print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } /* @@ -1337,7 +1337,7 @@ else */ if ($action == 'add_spip') { - print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); + print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } /* @@ -1345,7 +1345,7 @@ else */ if ($action == 'del_spip') { - print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); + print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); } $rowspan=17; @@ -1543,7 +1543,7 @@ else // Modify if ($user->rights->adherent->creer) { - print '"; + print '"; } else { @@ -1555,7 +1555,7 @@ else { if ($user->rights->adherent->creer) { - print '\n"; + print '\n"; } else { @@ -1568,7 +1568,7 @@ else { if ($user->rights->adherent->creer) { - print '\n"; + print '\n"; } else { @@ -1581,7 +1581,7 @@ else { if ($object->statut >= 1) { - if ($object->email) print '\n"; + if ($object->email) print '\n"; else print '\n"; } else @@ -1599,7 +1599,7 @@ else { if ($user->rights->adherent->supprimer) { - print '\n"; + print '\n"; } else { @@ -1638,7 +1638,7 @@ else // Delete if ($user->rights->adherent->supprimer) { - print '\n"; + print '\n"; } else { @@ -1652,11 +1652,11 @@ else if ($isinspip == 1) { - print '\n"; + print '\n"; } if ($isinspip == 0) { - print '\n"; + print '\n"; } } diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 3000974a389..eade23f7a3a 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -299,7 +299,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ $insertid=$acct->addline($dateop, $operation, $label, $cotisation, $num_chq, '', $user, $emetteur_nom, $emetteur_banque); if ($insertid > 0) { - $inserturlid=$acct->add_url_line($insertid, $object->id, DOL_URL_ROOT.'/adherents/fiche.php?rowid=', $object->getFullname($langs), 'member'); + $inserturlid=$acct->add_url_line($insertid, $object->id, DOL_URL_ROOT.'/adherents/card.php?rowid=', $object->getFullname($langs), 'member'); if ($inserturlid > 0) { // Met a jour la table cotisation diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 2de6a6e159e..bd43ed134af 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1558,7 +1558,7 @@ class Adherent extends CommonObject if ($option == 'card') { - $lien = ''; + $lien = ''; $lienfin=''; } if ($option == 'subscription') diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 0cd2b215086..887bac4e1e7 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -294,7 +294,7 @@ if ($resql) print "\n"; // Lastname - print ""; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index ec7aa7383c8..d9b04e3c506 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -353,7 +353,7 @@ if ($rowid > 0) } // Add - print ''; + print ''; // Delete if ($user->rights->adherent->configurer) @@ -526,11 +526,11 @@ if ($rowid > 0) print ''; if ($objp->societe != '') { - print ''."\n"; + print ''."\n"; } else { - print ''."\n"; + print ''."\n"; } // Login @@ -588,12 +588,12 @@ if ($rowid > 0) print '"; diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index e59ae0af845..a9d2d7eb6c0 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -52,7 +52,7 @@ function printBookmarksList($aDb, $aLangs) $ret.= ''; $lieninterne=0; @@ -178,7 +178,7 @@ if ($resql) print '"; - print '\n"; diff --git a/htdocs/boutique/client/index.php b/htdocs/boutique/client/index.php index b22c478f320..dae59eb50cb 100644 --- a/htdocs/boutique/client/index.php +++ b/htdocs/boutique/client/index.php @@ -71,8 +71,8 @@ if ($resql) $objp = $dbosc->fetch_object($resql); $var=!$var; print ""; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; print "\n"; print "\n"; diff --git a/htdocs/boutique/commande/fiche.php b/htdocs/boutique/commande/card.php similarity index 85% rename from htdocs/boutique/commande/fiche.php rename to htdocs/boutique/commande/card.php index 1e2e90dd41c..f6719bb40bb 100644 --- a/htdocs/boutique/commande/fiche.php +++ b/htdocs/boutique/commande/card.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/boutique/commande/fiche.php + * \file htdocs/boutique/commande/card.php * \ingroup boutique * \brief Page fiche commande OSCommerce */ @@ -49,7 +49,7 @@ if ($id > 0) print '
'; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index dad3c5cb5e0..e6a251a2d78 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -148,7 +148,7 @@ else if (! empty($conf->fournisseur->enabled) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { $statstring2 = "
'.$langs->trans("Suppliers").''.round($third['supplier']).''.$langs->trans("Suppliers").''.round($third['supplier']).'
'.$objp->ref.''.$objp->ref.''.$objp->ref_supplier.''.$objp->ref_supplier.'' . dol_trunc($objp->product_label, 24) . 'rowid\">"; + print "rowid\">"; print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); @@ -348,16 +348,16 @@ if ($resql) print ''; if ($user->rights->adherent->creer) { - print "rowid."&action=edit&backtopage=1\">".img_edit().""; + print "rowid."&action=edit&backtopage=1\">".img_edit().""; } print ' '; if ($user->rights->adherent->supprimer && $objp->statut == -1) { - print "rowid."&action=delete&backtopage=1\">".img_picto($langs->trans("Delete"),'disable.png').""; + print "rowid."&action=delete&backtopage=1\">".img_picto($langs->trans("Delete"),'disable.png').""; } if ($user->rights->adherent->supprimer && $objp->statut == 1) { - print "rowid."&action=resign&backtopage=1\">".img_picto($langs->trans("Resiliate"),'disable.png').""; + print "rowid."&action=resign&backtopage=1\">".img_picto($langs->trans("Resiliate"),'disable.png').""; } print "
'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).''.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).''.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,32).''.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,32).''; if ($user->rights->adherent->creer) { - print ''.img_edit().''; + print ''.img_edit().''; } print ' '; if ($user->rights->adherent->supprimer) { - print ''.img_picto($langs->trans("Resiliate"),'disable.png').''; + print ''.img_picto($langs->trans("Resiliate"),'disable.png').''; } print "'; if ($user->rights->bookmark->creer) { - $ret.= ''; + $ret.= ''; //$ret.=img_picto($langs->trans('AddThisPageToBookmarks'),'edit_add').' '; $ret.=img_object($langs->trans('AddThisPageToBookmarks'),'bookmark'); $ret.= ''; diff --git a/htdocs/bookmarks/fiche.php b/htdocs/bookmarks/card.php similarity index 98% rename from htdocs/bookmarks/fiche.php rename to htdocs/bookmarks/card.php index 18698d3a3b7..640e7e72c57 100644 --- a/htdocs/bookmarks/fiche.php +++ b/htdocs/bookmarks/card.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/bookmarks/fiche.php + * \file htdocs/bookmarks/card.php * \brief Page display/creation of bookmarks * \ingroup bookmark */ @@ -205,7 +205,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; print ''; print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 7d0c326f894..61dc0a91d7e 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -112,7 +112,7 @@ if ($resql) // Id print ''; - print "bid."\">".img_object($langs->trans("ShowBookmark"),"bookmark").' '.$obj->bid.""; + print "bid."\">".img_object($langs->trans("ShowBookmark"),"bookmark").' '.$obj->bid.""; print ''; if ($user->rights->bookmark->creer) { - print "bid."&backtopage=".urlencode($_SERVER["PHP_SELF"])."\">".img_edit()." "; + print "bid."&backtopage=".urlencode($_SERVER["PHP_SELF"])."\">".img_edit()." "; } if ($user->rights->bookmark->supprimer) { @@ -206,7 +206,7 @@ print "
\n"; if ($user->rights->bookmark->creer) { - print ''.$langs->trans("NewBookmark").''; + print ''.$langs->trans("NewBookmark").''; } print '
'; diff --git a/htdocs/boutique/client/fiche.php b/htdocs/boutique/client/card.php similarity index 93% rename from htdocs/boutique/client/fiche.php rename to htdocs/boutique/client/card.php index 895eea66e79..4944911f408 100644 --- a/htdocs/boutique/client/fiche.php +++ b/htdocs/boutique/client/card.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/boutique/client/fiche.php + * \file htdocs/boutique/client/card.php * \ingroup boutique * \brief Page fiche client OSCommerce */ @@ -82,7 +82,7 @@ if ($id > 0) $var=!$var; print "
Fiche '; + print 'Fiche '; print dol_print_date($dbosc->jdate($objp->date_purchased),'dayhour')."\n"; print $objp->total . "
'.$objp->customers_firstname."'.$objp->customers_lastname."'.$objp->customers_firstname."'.$objp->customers_lastname."$objp->customers_email_address$objp->customers_newsletter
'; print ''; - print ''; + print ''; print ''; @@ -88,14 +88,14 @@ if ($id > 0) $var=!$var; print ""; print '"; - print '\n"; - print "\n"; - print "\n"; + print '\n"; + print "\n"; + print "\n"; print "\n"; $i++; diff --git a/htdocs/boutique/commande/index.php b/htdocs/boutique/commande/index.php index cc683994565..0ce6b7b3655 100644 --- a/htdocs/boutique/commande/index.php +++ b/htdocs/boutique/commande/index.php @@ -71,10 +71,10 @@ if ($resql) $var=!$var; print ""; - print ''; - print '\n"; + print '\n"; print ''; print "\n"; $i++; diff --git a/htdocs/boutique/critiques/bestproduct.php b/htdocs/boutique/critiques/bestproduct.php index 1b7b9ff0669..dd3cda24d96 100644 --- a/htdocs/boutique/critiques/bestproduct.php +++ b/htdocs/boutique/critiques/bestproduct.php @@ -75,7 +75,7 @@ if ($resql) $objp = $dbosc->fetch_object($resql); $var=!$var; print ""; - print ''; + print ''; print '\n"; print '\n"; print '\n"; diff --git a/htdocs/boutique/critiques/fiche.php b/htdocs/boutique/critiques/card.php similarity index 97% rename from htdocs/boutique/critiques/fiche.php rename to htdocs/boutique/critiques/card.php index a5ea716ed8c..1c75faebbee 100644 --- a/htdocs/boutique/critiques/fiche.php +++ b/htdocs/boutique/critiques/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/boutique/critiques/fiche.php + * \file htdocs/boutique/critiques/card.php * \ingroup boutique * \brief Page fiche critique OS Commerce */ diff --git a/htdocs/boutique/critiques/index.php b/htdocs/boutique/critiques/index.php index 98294d5d09c..35e536ed66e 100644 --- a/htdocs/boutique/critiques/index.php +++ b/htdocs/boutique/critiques/index.php @@ -72,7 +72,7 @@ if ($resql) { $var=!$var; print ""; print "\n"; - print '\n"; + print '\n"; print "\n"; print "\n"; $i++; diff --git a/htdocs/boutique/notification/index.php b/htdocs/boutique/notification/index.php index f94c08018d8..6799af10708 100644 --- a/htdocs/boutique/notification/index.php +++ b/htdocs/boutique/notification/index.php @@ -71,8 +71,8 @@ if ($resql) $objp = $dbosc->fetch_object($resql); $var=!$var; print ""; - print "\n"; - print '"; + print "\n"; + print '"; print "\n"; $i++; } diff --git a/htdocs/boutique/notification/produits.php b/htdocs/boutique/notification/produits.php index 6b4b82b60f5..ad04d7d61b0 100644 --- a/htdocs/boutique/notification/produits.php +++ b/htdocs/boutique/notification/produits.php @@ -73,7 +73,7 @@ if ($resql) $var=!$var; print ""; - print '"; + print '"; print ''; print ''; diff --git a/htdocs/boutique/produits/index.php b/htdocs/boutique/produits/index.php index 13ad3463af9..2574b7cb7f4 100644 --- a/htdocs/boutique/produits/index.php +++ b/htdocs/boutique/produits/index.php @@ -68,8 +68,8 @@ if ($resql) $objp = $dbosc->fetch_object($resql); $var=!$var; print ""; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; print "\n"; print "\n"; diff --git a/htdocs/categories/fiche.php b/htdocs/categories/card.php similarity index 99% rename from htdocs/categories/fiche.php rename to htdocs/categories/card.php index 9a41d1b389a..3b5fa5d3189 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/categories/fiche.php + * \file htdocs/categories/card.php * \ingroup category * \brief Page to create a new category */ diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index f760cd736f0..9ff2ce11871 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -642,7 +642,7 @@ function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1) if ($user->rights->categorie->creer) { print ''; } @@ -749,7 +749,7 @@ if ($id > 0) // Confirmation suppression action if ($action == 'delete') { - print $form->formconfirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); + print $form->formconfirm("card.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1); } if ($action == 'edit') @@ -884,7 +884,7 @@ if ($id > 0) $numprojet=$formproject->select_projects($object->societe->id,$object->fk_project,'projectid'); if ($numprojet==0) { - print '   '.$langs->trans("AddProject").''; + print '   '.$langs->trans("AddProject").''; } print ''; } @@ -1139,7 +1139,7 @@ if ($id > 0) if ($user->rights->agenda->allactions->create || (($object->author->id == $user->id || $object->usertodo->id == $user->id) && $user->rights->agenda->myactions->create)) { - print ''; + print ''; } else { @@ -1149,7 +1149,7 @@ if ($id > 0) if ($user->rights->agenda->allactions->delete || (($object->author->id == $user->id || $object->usertodo->id == $user->id) && $user->rights->agenda->myactions->delete)) { - print ''; + print ''; } else { diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 393082f3427..8bf2a1036bf 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -760,7 +760,7 @@ class ActionComm extends CommonObject $result=''; if ($option=='birthday') $lien = ''; - else $lien = ''; + else $lien = ''; $lienfin=''; $label=$this->label; if (empty($label)) $label=$this->libelle; // Fro backward compatibility @@ -952,7 +952,7 @@ class ActionComm extends CommonObject $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $url=$urlwithroot.'/comm/action/fiche.php?id='.$obj->id; + $url=$urlwithroot.'/comm/action/card.php?id='.$obj->id; $event['url']=$url; $event['created']=$this->db->jdate($obj->datec)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600)); $event['modified']=$this->db->jdate($obj->datem)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600)); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 2318c45f132..44d1e209694 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1104,7 +1104,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; - print ''; + print ''; print img_picto($langs->trans("NewAction"),'edit_add.png'); print ''; } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 8bcd1c7289b..abd8b71a699 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -656,7 +656,7 @@ jQuery(document).ready(function() { if (ids == \'none\') /* No event */ { /* alert(\'no event\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&affectedto="+userid+"&datep="+year+month+day+hour+min+"00&backtopage='.urlencode($_SERVER["PHP_SELF"].'?year='.$year.'&month='.$month.'&day='.$day).'" + url = "'.DOL_URL_ROOT.'/comm/action/card.php?action=create&affectedto="+userid+"&datep="+year+month+day+hour+min+"00&backtopage='.urlencode($_SERVER["PHP_SELF"].'?year='.$year.'&month='.$month.'&day='.$day).'" window.location.href = url; } else if (ids.indexOf(",") > -1) /* There is several events */ @@ -668,7 +668,7 @@ jQuery(document).ready(function() { else /* One event */ { /* alert(\'one event\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/fiche.php?action=view&id="+ids + url = "'.DOL_URL_ROOT.'/comm/action/card.php?action=view&id="+ids window.location.href = url; } }); diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 289c2acb7ef..0ffcb351500 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -95,7 +95,7 @@ if ($action == 'add' || $action == 'update') } elseif ($origin == 'shipment') { - header("Location: ../expedition/fiche.php?id=".$originid); + header("Location: ../expedition/card.php?id=".$originid); exit; } else @@ -135,7 +135,7 @@ if ($action == 'add' || $action == 'update') } elseif ($origin == 'shipment') { - header("Location: ../expedition/fiche.php?id=".$originid); + header("Location: ../expedition/card.php?id=".$originid); exit; } else diff --git a/htdocs/comm/fiche.php b/htdocs/comm/card.php similarity index 95% rename from htdocs/comm/fiche.php rename to htdocs/comm/card.php index 9aaadc70eea..c3f28a36ed6 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/card.php @@ -23,7 +23,7 @@ */ /** - * \file htdocs/comm/fiche.php + * \file htdocs/comm/card.php * \ingroup commercial compta * \brief Page to show customer card of a third party */ @@ -439,11 +439,11 @@ if ($id > 0) // Status print ''; print ''; } @@ -606,7 +606,7 @@ if ($id > 0) $objp = $db->fetch_object($resql); $var=!$var; print ""; - print '\n"; print ''; print ''; @@ -719,7 +719,7 @@ if ($id > 0) $fichinter_static->statut=$objp->fk_statut; print ""; - print ''."\n"; + print ''."\n"; //print ''."\n"; print ''."\n"; print ''."\n"; @@ -835,19 +835,19 @@ if ($id > 0) if (! empty($conf->commande->enabled) && $user->rights->commande->creer) { $langs->load("orders"); - print ''; + print ''; } if ($user->rights->contrat->creer) { $langs->load("contracts"); - print ''; + print ''; } if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { $langs->load("fichinter"); - print ''; + print ''; } // Add invoice @@ -856,7 +856,7 @@ if ($id > 0) if (! empty($conf->deplacement->enabled)) { $langs->load("trips"); - print ''; + print ''; } if (! empty($conf->facture->enabled)) @@ -888,7 +888,7 @@ if ($id > 0) { if ($user->rights->agenda->myactions->create) { - print ''; + print ''; } else { diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 279044ccf25..d4652b57353 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -59,12 +59,12 @@ llxHeader('','Contacts'); if ($type == "c" || $type == "p") { $label = $langs->trans("Customers"); - $urlfiche="fiche.php"; + $urlfiche="card.php"; } if ($type == "f") { $label = $langs->trans("Suppliers"); - $urlfiche="fiche.php"; + $urlfiche="card.php"; } /* @@ -154,8 +154,8 @@ if ($resql) $var=!$var; print ""; - print ''; + print ''; print ""; print ''; + print ''; print '"; + print ""; print '"; - print ''."\n"; + print ''."\n"; print ''."\n"; print ''; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/card.php similarity index 97% rename from htdocs/comm/mailing/fiche.php rename to htdocs/comm/mailing/card.php index 803ea4f81d8..441e51ef293 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/comm/mailing/fiche.php + * \file htdocs/comm/mailing/card.php * \ingroup mailing * \brief Fiche mailing, onglet general */ @@ -174,7 +174,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$object->id; - dol_syslog("fiche.php: select targets", LOG_DEBUG); + dol_syslog("card.php: select targets", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -182,7 +182,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') if ($num) { - dol_syslog("comm/mailing/fiche.php: nb of targets = ".$num, LOG_DEBUG); + dol_syslog("comm/mailing/card.php: nb of targets = ".$num, LOG_DEBUG); $now=dol_now(); @@ -280,7 +280,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') // Mail successful $nbok++; - dol_syslog("comm/mailing/fiche.php: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); + dol_syslog("comm/mailing/card.php: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql.=" SET statut=1, date_envoi=".$db->idate($now)." WHERE rowid=".$obj->rowid; @@ -296,7 +296,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') { //Update status communication of thirdparty prospect $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$obj->rowid.")"; - dol_syslog("fiche.php: set prospect thirdparty status", LOG_DEBUG); + dol_syslog("card.php: set prospect thirdparty status", LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) { @@ -305,7 +305,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') //Update status communication of contact prospect $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; - dol_syslog("fiche.php: set prospect contact status", LOG_DEBUG); + dol_syslog("card.php: set prospect contact status", LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) @@ -323,7 +323,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') // Mail failed $nbko++; - dol_syslog("comm/mailing/fiche.php: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_WARNING); + dol_syslog("comm/mailing/card.php: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_WARNING); $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; $sql.=" SET statut=-1, date_envoi=".$db->idate($now)." WHERE rowid=".$obj->rowid; @@ -364,7 +364,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') } $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$object->id; - dol_syslog("comm/mailing/fiche.php: update global status", LOG_DEBUG); + dol_syslog("comm/mailing/card.php: update global status", LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) { @@ -858,7 +858,7 @@ else print ''.$langs->trans("EditMailing").''; } - //print ''.$langs->trans("PreviewMailing").''; + //print ''.$langs->trans("PreviewMailing").''; if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send) { @@ -1066,7 +1066,7 @@ else print ""; print "\n"; - print ''."\n"; + print ''."\n"; print ''; print ''; print ''; diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index a657423f095..5c6ae896e42 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -176,7 +176,7 @@ if ($result) $var=!$var; print ""; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 15fd830987c..ef2e2c48bf8 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -136,7 +136,7 @@ if ($result) $var=!$var; print ""; - print ''; print ''; // Date creation diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 9c5ffd03234..71470fd8665 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1460,7 +1460,7 @@ if ($action == 'create') $numprojet = $formproject->select_projects($soc->id, $projectid); if ($numprojet == 0) { $langs->load("projects"); - print '   ' . $langs->trans("AddProject") . ''; + print '   ' . $langs->trans("AddProject") . ''; } print ''; print ''; @@ -1961,7 +1961,7 @@ if ($action == 'create') print ''; @@ -2201,7 +2201,7 @@ if ($action == 'create') // else on // page. { - print '' . $langs->trans("AddAction") . ''; + print '' . $langs->trans("AddAction") . ''; } // Edit if ($object->statut == 1 && $user->rights->propal->creer) { @@ -2225,7 +2225,7 @@ if ($action == 'create') // Create an order if (! empty($conf->commande->enabled) && $object->statut == 2) { if ($user->rights->commande->creer) { - print ''; + print ''; } } @@ -2234,7 +2234,7 @@ if ($action == 'create') $langs->load("contracts"); if ($user->rights->contrat->creer) { - print ''; + print ''; } } diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index facf34a78da..8c7f38ed607 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -433,7 +433,7 @@ if (! empty($conf->propal->enabled)) print ''; - print ''; + print ''; print ''; @@ -505,7 +505,7 @@ if (! empty($conf->propal->enabled)) print ''; - print ''; + print ''; print ''; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index ba0a49f2772..4b43eadeebf 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -370,7 +370,7 @@ if ($result) print $objp->ref_client; print ''; - $url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->rowid; + $url = DOL_URL_ROOT.'/comm/card.php?socid='.$objp->rowid; // Company $companystatic->id=$objp->rowid; diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index d4b47283bf3..6e138c1153c 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -242,7 +242,7 @@ if ($resql) if ($num == 1 && $socname) { $obj = $db->fetch_object($resql); - header("Location: fiche.php?socid=".$obj->rowid); + header("Location: card.php?socid=".$obj->rowid); exit; } else diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 544ef619720..fe3e39d266d 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -184,7 +184,7 @@ if ($socid > 0) print ''; print ''; print ''; - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 905f73e3c9b..79f952fe7fd 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -367,7 +367,7 @@ if ($socid > 0) print ''; print ''; print ''; if ($user->rights->societe->creer || $user->rights->facture->creer) { @@ -524,7 +524,7 @@ if ($socid > 0) print ''; print ''; print ''; print ''; print ''; diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 97671510bfd..1257769b954 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -167,7 +167,7 @@ if ($id > 0 || ! empty($ref)) // Client print ""; print ''; print ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/card.php similarity index 99% rename from htdocs/commande/fiche.php rename to htdocs/commande/card.php index e54844ac938..2a3188e19bc 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/card.php @@ -26,7 +26,7 @@ */ /** - * \file htdocs/commande/fiche.php + * \file htdocs/commande/card.php * \ingroup commande * \brief Page to show customer order */ @@ -1553,7 +1553,7 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; } @@ -2296,14 +2296,14 @@ if ($action == 'create' && $user->rights->commande->creer) { } // Edit if ($object->statut == 1 && $user->rights->commande->creer) { - print ''; + print ''; } // Create event if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a // "workflow" action so should appears somewhere else on // page. { - print '' . $langs->trans("AddAction") . ''; + print '' . $langs->trans("AddAction") . ''; } // Send if ($object->statut > 0) { @@ -2338,7 +2338,7 @@ if ($action == 'create' && $user->rights->commande->creer) { if ($object->statut > 0 && $object->statut < 3 && $object->getNbOfServicesLines() > 0) { if ($user->rights->ficheinter->creer) { - print ''; + print ''; } else { print ''; } @@ -2355,7 +2355,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $langs->load("contracts"); if ($user->rights->contrat->creer) { - print ''; + print ''; } } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index a12b6dc7256..f6e6238585d 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2699,7 +2699,7 @@ class Commande extends CommonOrder $result=''; if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id; - else $url = DOL_URL_ROOT.'/commande/fiche.php?id='.$this->id; + else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id; if ($short) return $url; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index c00d057ca33..705354d401b 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -194,8 +194,8 @@ if (! empty($conf->commande->enabled)) $obj = $db->fetch_object($resql); print ""; print '"; - print ''; + print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.""; + print ''; $i++; } } @@ -268,7 +268,7 @@ if ($resql) print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -337,7 +337,7 @@ if (! empty($conf->commande->enabled)) print ''; - print ''; + print ''; print ''; @@ -408,7 +408,7 @@ if (! empty($conf->commande->enabled)) print ''; - print ''; + print ''; print ''; diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index d2fe19c5b6f..c47aefe0958 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -48,7 +48,7 @@ foreach($linkedObjectBlock as $object) $var=!$var; ?> > + trans("ShowOrder"),"order").' '.$object->ref; ?>
Date'.$commande->date.'
Client'.$commande->client_name.'
Client'.$commande->client_name.'
Paiement'.$commande->payment_method.'
'; - print 'Fiche livre'; + print 'Fiche livre'; - print ''.$objp->products_name.''; + print ''.$objp->products_name.''; print "$objp->products_quantityrowid\">".price($objp->products_price)."rowid\">".price($objp->final_price)."$objp->products_quantityrowid\">".price($objp->products_price)."rowid\">".price($objp->final_price)."
Fiche '; + print 'Fiche '; print $objp->orders_id .""; print dol_print_date($dbosc->jdate($objp->date_purchased),'dayhour').''.$objp->customers_name."'.$objp->customers_name."'.price($objp->value).'
'.$objp->products_model.''.$objp->products_model.''.$objp->rat."'.$objp->products_quantity."'.$objp->products_status."
".substr($objp->products_name, 0, 30)."'.substr($objp->reviews_text, 0, 40)." ...'.substr($objp->reviews_text, 0, 40)." ...$objp->reviews_rating
rowid\">$objp->customers_firstname $objp->customers_lastname'.$objp->products_name."rowid\">$objp->customers_firstname $objp->customers_lastname'.$objp->products_name."
'.$objp->products_name."'.$objp->products_name."'.$objp->nb.'Voir les clients
'.$objp->customers_firstname."'.$objp->customers_lastname."'.$objp->customers_firstname."'.$objp->customers_lastname."$objp->customers_email_address$objp->customers_newsletter
'; - print 'id.'&type='.$typeid).'">'; + print 'id.'&type='.$typeid).'">'; print $langs->trans("CreateCat").' '; print img_picto($langs->trans("Create"),'filenew'); print ""; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 898d6626539..29ed8a5d6b8 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -212,7 +212,7 @@ else print "
".$langs->trans("SubCats").''; if ($user->rights->categorie->creer) { - print ""; + print ""; print img_picto($langs->trans("Create"),'filenew'); print ""; } diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/card.php similarity index 98% rename from htdocs/comm/action/fiche.php rename to htdocs/comm/action/card.php index 27be46bd9e1..426faf46297 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/card.php @@ -22,7 +22,7 @@ */ /** - * \file htdocs/comm/action/fiche.php + * \file htdocs/comm/action/card.php * \ingroup agenda * \brief Page for event card */ @@ -250,7 +250,7 @@ if ($action == 'add') } elseif($idaction) { - header("Location: ".DOL_URL_ROOT.'/comm/action/fiche.php?id='.$idaction); + header("Location: ".DOL_URL_ROOT.'/comm/action/card.php?id='.$idaction); } else { @@ -652,7 +652,7 @@ if ($action == 'create') $numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:0),GETPOST("projectid")?GETPOST("projectid"):'','projectid'); if ($numproject==0) { - print '   '.$langs->trans("AddProject").''; + print '   '.$langs->trans("AddProject").''; } print '
'.$langs->trans("StatusProsp").''.$object->getLibProspCommStatut(4).''; - if ($object->stcomm_id != -1) print ''.img_action(0,-1).''; - if ($object->stcomm_id != 0) print ''.img_action(0,0).''; - if ($object->stcomm_id != 1) print ''.img_action(0,1).''; - if ($object->stcomm_id != 2) print ''.img_action(0,2).''; - if ($object->stcomm_id != 3) print ''.img_action(0,3).''; + if ($object->stcomm_id != -1) print ''.img_action(0,-1).''; + if ($object->stcomm_id != 0) print ''.img_action(0,0).''; + if ($object->stcomm_id != 1) print ''.img_action(0,1).''; + if ($object->stcomm_id != 2) print ''.img_action(0,2).''; + if ($object->stcomm_id != 3) print ''.img_action(0,3).''; print '
'.img_object($langs->trans("ShowOrder"),"order").' '.$objp->ref."\n"; + print ''.img_object($langs->trans("ShowOrder"),"order").' '.$objp->ref."\n"; print ''.dol_print_date($db->jdate($objp->dc),'day')."'.price($objp->total_ht).''.$commande_static->LibStatut($objp->fk_statut,$objp->facture,5).'
'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.''.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.''.dol_print_date($db->jdate($objp->startdate)).''.convertSecondToTime($objp->duration).''.$fichinter_static->getLibStatut(5).'
'.img_object($langs->trans("ShowContact"),"contact"); - print ' '.$obj->name.''.img_object($langs->trans("ShowContact"),"contact"); + print ' '.$obj->name.'$obj->firstname'.img_object($langs->trans("ShowCompany"),"company").' '; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 0e17380ea9e..22068860076 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -217,7 +217,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { $var=!$var; $obj = $db->fetch_object($resql); - print '
'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'
'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.''; $companystatic->id=$obj->socid; $companystatic->name=$obj->name; @@ -417,7 +417,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TO while ($i < $num) { $obj = $db->fetch_object($resql); - print "
contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."
contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."'; $companystatic->id=$objp->rowid; $companystatic->name=$objp->name; @@ -497,7 +497,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print "'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).''; print dol_print_date($db->jdate($obj->dp),'day').''.price($obj->total_ttc).'
'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.''.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.''.dol_trunc($obj->titre,38).''.dol_print_date($db->jdate($obj->date_creat),'day').''.($obj->nbemail?$obj->nbemail:"0").'
'; + print ''; print img_object($langs->trans("ShowEMail"),"email").' '.stripslashes($obj->rowid).''.$obj->titre.'
'; $proj = new Project($db); $proj->fetch($object->fk_project); - print ''; + print ''; print $proj->ref; print ''; print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).''.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).''.dol_print_date($db->jdate($obj->dc),"dayhour").''.price2num($obj->remise_percent).'%'.$obj->note.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'
'.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ' 
".$langs->trans("Customer")."'; - print ''.$soc->nom.''; + print ''.$soc->nom.''; print '
' . $langs->trans('Project') . ''; $numprojet = $formproject->select_projects($soc->id, $projectid); if ($numprojet == 0) { - print '   ' . $langs->trans("AddProject") . ''; + print '   ' . $langs->trans("AddProject") . ''; } print '
'; - print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'
'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'
'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.dol_print_date($db->jdate($obj->datem),'day').''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
- trans("ShowOrder"),"order").' '.$object->ref; ?> date,'day'); ?> rights->commande->lire) { diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 0adf68ca741..14b586c6d80 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -589,7 +589,7 @@ if ($id > 0 || ! empty($ref)) } elseif ($links[$key]['type']=='payment_sc') { - print ''; + print ''; print ' '.img_object($langs->trans('ShowPayment'),'payment').' '; //print $langs->trans("SocialContributionPayment"); print ''; diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/card.php similarity index 99% rename from htdocs/compta/bank/fiche.php rename to htdocs/compta/bank/card.php index c118186df27..e511a163c79 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/compta/bank/fiche.php + * \file htdocs/compta/bank/card.php * \ingroup banque * \brief Page to create/view a bank account */ diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 4ca6175d785..96ab643623b 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -882,7 +882,7 @@ class Account extends CommonObject if (empty($mode)) { - $lien = ''; + $lien = ''; $lienfin=''; } else if ($mode == 'transactions') diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index fdac94091eb..921b1739767 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -250,7 +250,7 @@ print "
"; print '
'."\n"; if ($user->rights->banque->configurer) { - print ''.$langs->trans("NewFinancialAccount").''; + print ''.$langs->trans("NewFinancialAccount").''; } print '
'; diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 89fd5727dc7..2be5d4336d6 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -304,13 +304,13 @@ if ($result) { if ($key) print '
'; if ($links[$key]['type']=='payment') { - print ''; + print ''; print img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("Payment"); print ''; } else if ($links[$key]['type']=='payment_supplier') { - print ''; + print ''; print img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("Payment"); print ''; @@ -328,25 +328,25 @@ if ($result) print ''; } else if ($links[$key]['type']=='payment_sc') { - print ''; + print ''; print img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; } else if ($links[$key]['type']=='payment_vat') { - print ''; + print ''; print img_object($langs->trans('ShowVAT'),'payment').' '; print $langs->trans("VATPayment"); print ''; } else if ($links[$key]['type']=='payment_salary') { - print ''; + print ''; print img_object($langs->trans('ShowPaymentSalary'),'payment').' '; print $langs->trans("SalaryPayment"); print ''; } else if ($links[$key]['type']=='member') { - print ''; + print ''; print img_object($langs->trans('ShowMember'),'user').' '; print $links[$key]['label']; print ''; diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 37c27afc0b6..c926c0414f6 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -325,7 +325,7 @@ if ($resql) else if ($links[$key]['type']=='payment_sc') { // We don't show anything because there is 1 payment for 1 social contribution and we already show link to social contribution - /*print ''; + /*print ''; print img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("SocialContributionPayment"); print '';*/ @@ -345,7 +345,7 @@ if ($resql) print ''; } else if ($links[$key]['type']=='member') { - print ''; + print ''; print img_object($langs->trans('ShowMember'),'user').' '; print $links[$key]['label']; print ''; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 172140c2c64..e4afe6f2b25 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -349,7 +349,7 @@ else } elseif ($links[$key]['type']=='payment_sc') { - print ''; + print ''; print ' '.img_object($langs->trans('ShowPayment'),'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; @@ -398,7 +398,7 @@ else $newline=0; } elseif ($links[$key]['type']=='member') { - print ''; + print ''; print img_object($langs->trans('ShowMember'),'user').' '; print $links[$key]['label']; print ''; diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/card.php similarity index 99% rename from htdocs/compta/deplacement/fiche.php rename to htdocs/compta/deplacement/card.php index b6bb980c462..80d1858d167 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/compta/deplacement/fiche.php + * \file htdocs/compta/deplacement/card.php * \brief Page to show a trip card */ diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 4d24aac9a83..d4402b03a55 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -355,7 +355,7 @@ class Deplacement extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='trip'; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 89df2428ca9..bc4406448df 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -134,7 +134,7 @@ if ($resql) $var=!$var; print '
'.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.''.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.''.$langs->trans($obj->type).'
'; @@ -352,7 +352,7 @@ if (! empty($id) && $action == 'edit') dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic'); - print ''; + print ''; print ''; print '
'; @@ -455,7 +455,7 @@ if (! empty($id) && $action != 'edit') dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic'); - print ""; + print ""; print ''; print '
'; @@ -529,16 +529,16 @@ if (! empty($id) && $action != 'edit') */ print '
'; - print ''; + print ''; if ($don->statut == 0) { - print ''; + print ''; } if (($don->statut == 0 || $don->statut == 1) && $resteapayer == 0 && $don->paye == 0) { - print '"; + print '"; } // TODO Gerer action emettre paiement @@ -549,12 +549,12 @@ if (! empty($id) && $action != 'edit') if ($don->statut == 1 && $resteapayer == 0 && $don->paye == 0) { - print '"; + print '"; } if ($user->rights->don->supprimer) { - print '"; + print '"; } else { diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index 993eda5a0f7..ab33bdbb43d 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -711,7 +711,7 @@ class Don extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='generic'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7bd05f9f806..3c73a6610e5 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2976,7 +2976,7 @@ if ($action == 'create') $objp = $db->fetch_object($result); $var = ! $var; print '
'; $label = ($langs->trans("PaymentType" . $objp->payment_code) != ("PaymentType" . $objp->payment_code)) ? $langs->trans("PaymentType" . $objp->payment_code) : $objp->payment_label; print ''; diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 856640e306e..ee197e9cee3 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -375,7 +375,7 @@ if ($id > 0 || ! empty($ref)) { $project = New Project($db); $project->fetch($object->fk_project); - print ''.$project->title.''; + print ''.$project->title.''; } else { diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index d86b2148715..4bfa4d81048 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -507,7 +507,7 @@ if ($object->id > 0) print ''; print ''; print ''; - print ''; + print ''; print ''; print '\n"; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index b6d54787f7f..eecf5e75746 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -916,7 +916,7 @@ if ($resql) $var=!$var; print ""; - print ""; + print ""; $i++; } $db->free($resql); diff --git a/htdocs/compta/localtax/fiche.php b/htdocs/compta/localtax/card.php similarity index 95% rename from htdocs/compta/localtax/fiche.php rename to htdocs/compta/localtax/card.php index ec40eba55b9..1b16064ed9e 100644 --- a/htdocs/compta/localtax/fiche.php +++ b/htdocs/compta/localtax/card.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/compta/localtax/fiche.php + * \file htdocs/compta/localtax/card.php * \ingroup tax * \brief Page of IRPF payments */ @@ -149,7 +149,7 @@ if ($id) if ($_GET["action"] == 'create') { - print "\n"; + print "\n"; print ''; print ''; print ''; @@ -208,7 +208,7 @@ if ($id) if ($mesg) print $mesg; $h = 0; - $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/fiche.php?id='.$vatpayment->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$vatpayment->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; @@ -259,7 +259,7 @@ if ($id) */ print "
\n"; if ($vatpayment->rappro == 0) - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; else print ''.$langs->trans("Delete").''; print "
"; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 749da49a7d0..4174d693da3 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -516,7 +516,7 @@ class Localtax extends CommonObject } // Mise a jour liens - $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/localtax/fiche.php?id=', "(VATPayment)", "payment_vat"); + $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/localtax/card.php?id=', "(VATPayment)", "payment_vat"); if ($result < 0) { $this->error=$acc->error; @@ -586,7 +586,7 @@ class Localtax extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='payment'; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index ec3fdb23027..cabaf87e4d0 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -237,7 +237,7 @@ if ($action == 'confirm_paiement' && $confirm == 'yes') } } if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/compta/facture.php?facid='.$invoiceid; - else $loc = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$paiement_id; + else $loc = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id; header('Location: '.$loc); exit; } diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 3d5fa3935de..1afdf0e2c80 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -96,7 +96,7 @@ if ($resql) $objp = $db->fetch_object($resql); $var=!$var; print ""; - print ''; + print ''; print '\n"; print "\n"; print ''; @@ -104,7 +104,7 @@ if ($resql) if ($objp->statut == 0) { - print ''.$langs->trans("PaymentStatusToValidShort").''; + print ''.$langs->trans("PaymentStatusToValidShort").''; } else { diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/card.php similarity index 98% rename from htdocs/compta/paiement/fiche.php rename to htdocs/compta/paiement/card.php index a589ea219e3..25dbaf92738 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/card.php @@ -20,10 +20,10 @@ */ /** - * \file htdocs/compta/paiement/fiche.php + * \file htdocs/compta/paiement/card.php * \ingroup facture * \brief Page of a customer payment - * \remarks Nearly same file than fournisseur/paiement/fiche.php + * \remarks Nearly same file than fournisseur/paiement/card.php */ require '../../main.inc.php'; diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/card.php similarity index 99% rename from htdocs/compta/paiement/cheque/fiche.php rename to htdocs/compta/paiement/cheque/card.php index 920a1328a62..0c5eeca3689 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/compta/paiement/cheque/fiche.php + * \file htdocs/compta/paiement/cheque/card.php * \ingroup bank, invoice * \brief Page for cheque deposits */ diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 39b8f209247..922ab54ac7c 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -770,7 +770,7 @@ class RemiseCheque extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin); diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 4e1d6190a4f..27f2cf3e2e7 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -77,7 +77,7 @@ if ($resql) print ""; print ''; print ''; print "
'; - print '' . img_object($langs->trans('ShowPayment'), 'payment') . ' '; + print '' . img_object($langs->trans('ShowPayment'), 'payment') . ' '; print dol_print_date($db->jdate($objp->dp), 'day') . '' . $label . ' ' . $objp->num_paiement . ''.$langs->trans("OrderWaiting").''.price($obj->amount).'-'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.' '; print ''; @@ -563,7 +563,7 @@ if ($object->id > 0) print $withdrawreceipt->getNomUrl(1); print "'.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'  
".dol_print_date($obj->da,"day")."$obj->libelle $obj->label
$obj->libelle $obj->label
'.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.''.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."$objp->paiement_type $objp->num_paiement'.price($objp->amount).'
'.$langs->trans("BankChecksToReceipt").''; - print ''.$num.''; + print ''.$num.''; print '
\n"; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 842050c61bc..cd6ba5c59a2 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -453,8 +453,8 @@ class Paiement extends CommonObject if ( ! $error) { $url=''; - if ($mode == 'payment') $url=DOL_URL_ROOT.'/compta/paiement/fiche.php?id='; - if ($mode == 'payment_supplier') $url=DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='; + if ($mode == 'payment') $url=DOL_URL_ROOT.'/compta/paiement/card.php?id='; + if ($mode == 'payment_supplier') $url=DOL_URL_ROOT.'/fourn/paiement/card.php?id='; if ($url) { $result=$acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); @@ -482,7 +482,7 @@ class Paiement extends CommonObject $result=$acc->add_url_line( $bank_line_id, $fac->thirdparty->id, - DOL_URL_ROOT.'/comm/fiche.php?socid=', + DOL_URL_ROOT.'/comm/card.php?socid=', $fac->thirdparty->nom, 'company' ); @@ -500,7 +500,7 @@ class Paiement extends CommonObject $result=$acc->add_url_line( $bank_line_id, $fac->thirdparty->id, - DOL_URL_ROOT.'/fourn/fiche.php?socid=', + DOL_URL_ROOT.'/fourn/card.php?socid=', $fac->thirdparty->nom, 'company' ); @@ -747,7 +747,7 @@ class Paiement extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"),'payment').$lienfin); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index c96d1affbd6..46fa00df68c 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -218,7 +218,7 @@ if ($resql) if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { print '
'; - if ($objp->statut == 0) print ''; + if ($objp->statut == 0) print ''; print $paymentstatic->LibStatut($objp->statut,5); if ($objp->statut == 0) print ''; print ''.dol_print_date($db->jdate($obj->datec),'day')."
'; @@ -224,7 +224,7 @@ if ($id > 0) if (! empty($bon->date_trans) && $bon->date_credit == 0 && $user->rights->prelevement->bons->credit && $action=='setcredited') { - print ''; + print ''; print ''; print ''; print '
'; @@ -247,15 +247,15 @@ if ($id > 0) if (empty($bon->date_trans) && $user->rights->prelevement->bons->send) { - print "id."\">".$langs->trans("SetToStatusSent").""; + print "id."\">".$langs->trans("SetToStatusSent").""; } if (! empty($bon->date_trans) && $bon->date_credit == 0) { - print "id."\">".$langs->trans("ClassCredited").""; + print "id."\">".$langs->trans("ClassCredited").""; } - print "id."\">".$langs->trans("Delete").""; + print "id."\">".$langs->trans("Delete").""; print ""; } diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 25065b24590..6a67ce5766b 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1118,12 +1118,12 @@ class BonPrelevement extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($option == 'xxx') { - $lien = ''; + $lien = ''; $lienfin=''; } diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 31a726828ff..3833a45215a 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -165,7 +165,7 @@ if ($result) print ''.$obj->ref."\n"; - print '\n"; print '\n"; diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 905ab6f6bf1..e43ea95ae44 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -152,7 +152,7 @@ if ($resql) print img_picto('', 'statut'.$obj->statut).' '; print substr('000000'.$obj->rowid, -6); print ''; - print '\n"; + print '\n"; print '\n"; print ''; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index ebf5180eb0e..45bab4d69dc 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -131,7 +131,7 @@ if ($id) print '
'; + print ''; print img_object($langs->trans("ShowCompany"),"company"). ' '.stripslashes($obj->nom)."'.price($obj->total_ttc)."'.stripslashes($obj->nom)."'.stripslashes($obj->nom)."'.price($obj->amount)."'.$rej->motifs[$obj->motif].'
'; print ''; + print ''.$lipre->bon_ref.''; print ''; print ''; print '\n"; - print '\n"; print '\n"; diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index 16f1793c372..ef884f50edf 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -175,7 +175,7 @@ if ($result) print substr('000000'.$obj->rowid, -6); print ''; - print '\n"; + print '\n"; print '\n"; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 4427d08b2d2..819d879b098 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -155,16 +155,16 @@ if ($result) print $bon->LibStatut($obj->statut,2); print " "; - print ''.$obj->ref."\n"; + print ''.$obj->ref."\n"; print '\n"; print ''; - print '\n"; + print '\n"; - print '\n"; + print '\n"; print '\n"; diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 6cc88d41835..0582e4f4091 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -108,7 +108,7 @@ if ($result) print substr('000000'.$obj->rowid, -6).""; - print '\n"; + print '\n"; print ''; print "\n"; diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 42f91e3132b..f56652fc4b6 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -181,7 +181,7 @@ if ($socid > 0) print '\n"; print ''; + print ''.img_object($langs->trans("ShowPayment"),"payment").' '.$langs->trans("Payment").' '.$objp->rowid.''; print "\n"; print "\n"; print ''; diff --git a/htdocs/compta/salaries/fiche.php b/htdocs/compta/salaries/card.php similarity index 97% rename from htdocs/compta/salaries/fiche.php rename to htdocs/compta/salaries/card.php index c46f83dd6fb..2cef32b136e 100644 --- a/htdocs/compta/salaries/fiche.php +++ b/htdocs/compta/salaries/card.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/compta/salaries/fiche.php + * \file htdocs/compta/salaries/card.php * \ingroup salaries * \brief Page of salaries payments */ @@ -206,7 +206,7 @@ if ($action == 'create') $datesp=dol_get_first_day($pastmonthyear,$pastmonth,false); $dateep=dol_get_last_day($pastmonthyear,$pastmonth,false); } - print "\n"; + print "\n"; print ''; print ''; @@ -290,7 +290,7 @@ if ($action == 'create') if ($id) { $h = 0; - $head[$h][0] = DOL_URL_ROOT.'/compta/salaries/fiche.php?id='.$salpayment->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/salaries/card.php?id='.$salpayment->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; @@ -367,7 +367,7 @@ if ($id) { if (! empty($user->rights->tax->charges->supprimer)) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 5e728b0cc64..0644a5ae4fe 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -395,7 +395,7 @@ class PaymentSalary extends CommonObject if (! $error) { // Add link 'payment_salary' in bank_url between payment and bank transaction - $url=DOL_URL_ROOT.'/compta/salaries/fiche.php?id='; + $url=DOL_URL_ROOT.'/compta/salaries/card.php?id='; $result=$acc->add_url_line($bank_line_id, $this->id, $url, "(SalaryPayment)", "payment_salary"); if ($result <= 0) @@ -412,7 +412,7 @@ class PaymentSalary extends CommonObject $result=$acc->add_url_line( $bank_line_id, $this->fk_user, - DOL_URL_ROOT.'/user/fiche.php?id=', + DOL_URL_ROOT.'/user/card.php?id=', $langs->trans("SalaryPayment").' '.$fuser->getFullName($langs).' '.dol_print_date($this->datesp,'dayrfc').' '.dol_print_date($this->dateep,'dayrfc'), '(User)', 'user' @@ -488,7 +488,7 @@ class PaymentSalary extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='payment'; diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index bce22caaed6..059a3ccf544 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -319,7 +319,7 @@ if ($id > 0) $objp = $db->fetch_object($resql); $var=!$var; print "'; + print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''; print '\n"; print "\n"; print '\n"; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 972fa762b96..fe2062e1ad7 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -506,7 +506,7 @@ class PaymentSocialContribution extends CommonObject // Add link 'payment', 'payment_supplier', 'payment_sc' in bank_url between payment and bank transaction $url=''; - if ($mode == 'payment_sc') $url=DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='; + if ($mode == 'payment_sc') $url=DOL_URL_ROOT.'/compta/payment_sc/card.php?id='; if ($url) { $result=$acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); @@ -588,7 +588,7 @@ class PaymentSocialContribution extends CommonObject if (!empty($this->id)) { - $lien = ''; + $lien = ''; $lienfin=''; if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment").': '.$this->ref,'payment').$lienfin.' '); diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 1bc88e176d9..aa1047934f5 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -336,7 +336,7 @@ if ($modecompta == 'CREANCES-DETTES') // Product $fullname=$name[$key]; if ($key >= 0) { - $linkname=''.img_object($langs->trans("ShowProduct"),'product').' '.$fullname.''; + $linkname=''.img_object($langs->trans("ShowProduct"),'product').' '.$fullname.''; } else { $linkname=$langs->trans("PaymentsNotLinkedToProduct"); } diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index db6c0d2f149..04cf00b4388 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -348,7 +348,7 @@ if (count($amount)) { // Third party $fullname=$name[$key]; if ($key >= 0) { - $linkname=''.img_object($langs->trans("ShowUser"),'user').' '.$fullname.''; + $linkname=''.img_object($langs->trans("ShowUser"),'user').' '.$fullname.''; } else { $linkname=$langs->trans("PaymentsNotLinkedToUser"); } diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/card.php similarity index 96% rename from htdocs/compta/tva/fiche.php rename to htdocs/compta/tva/card.php index a4a5a8831c4..c87530e6511 100644 --- a/htdocs/compta/tva/fiche.php +++ b/htdocs/compta/tva/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/compta/tva/fiche.php + * \file htdocs/compta/tva/card.php * \ingroup tax * \brief Page of VAT payments */ @@ -181,7 +181,7 @@ if ($id) // Formulaire saisie tva if ($action == 'create') { - print "\n"; + print "\n"; print ''; print ''; @@ -246,7 +246,7 @@ if ($action == 'create') if ($id) { $h = 0; - $head[$h][0] = DOL_URL_ROOT.'/compta/tva/fiche.php?id='.$vatpayment->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/tva/card.php?id='.$vatpayment->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; $h++; @@ -307,7 +307,7 @@ if ($id) { if (! empty($user->rights->tax->charges->supprimer)) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 4e049594b49..5d0762d3e35 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -571,7 +571,7 @@ class Tva extends CommonObject } // Update links - $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/tva/fiche.php?id=', "(VATPayment)", "payment_vat"); + $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/tva/card.php?id=', "(VATPayment)", "payment_vat"); if ($result < 0) { $this->error=$acc->error; @@ -639,7 +639,7 @@ class Tva extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='payment'; diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index 0e22dc77f1b..d991ac8ac88 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -250,7 +250,7 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES") } $x_both[$my_paye_rate]['paye']['links'] = ''; foreach($x_paye[$my_paye_rate]['facid'] as $id=>$dummy){ - $x_both[$my_paye_rate]['paye']['links'] .= '..'.substr($x_paye[$my_paye_rate]['facnum'][$id],-2).' '; + $x_both[$my_paye_rate]['paye']['links'] .= '..'.substr($x_paye[$my_paye_rate]['facnum'][$id],-2).' '; } } //now we have an array (x_both) indexed by rates for coll and paye diff --git a/htdocs/compta/ventilation/fiche.php b/htdocs/compta/ventilation/card.php similarity index 96% rename from htdocs/compta/ventilation/fiche.php rename to htdocs/compta/ventilation/card.php index b55f2b59475..7201dfe9e29 100644 --- a/htdocs/compta/ventilation/fiche.php +++ b/htdocs/compta/ventilation/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/compta/ventilation/fiche.php + * \file htdocs/compta/ventilation/card.php * \ingroup compta * \brief Page fiche ventilation */ @@ -106,7 +106,7 @@ if($_GET["id"]) if($objp->fk_code_ventilation == 0) { - print ''."\n"; + print ''."\n"; print ''; print ''; } diff --git a/htdocs/compta/ventilation/fournisseur/fiche.php b/htdocs/compta/ventilation/fournisseur/card.php similarity index 96% rename from htdocs/compta/ventilation/fournisseur/fiche.php rename to htdocs/compta/ventilation/fournisseur/card.php index 168b99eea35..d62694512fc 100644 --- a/htdocs/compta/ventilation/fournisseur/fiche.php +++ b/htdocs/compta/ventilation/fournisseur/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/compta/ventilation/fournisseur/fiche.php + * \file htdocs/compta/ventilation/fournisseur/card.php * \ingroup compta * \brief Page fiche ventilation */ @@ -95,7 +95,7 @@ if($_GET["id"]) if($objp->fk_code_ventilation == 0) { - print ''."\n"; + print ''."\n"; print ''; print ''; } diff --git a/htdocs/compta/ventilation/fournisseur/list.php b/htdocs/compta/ventilation/fournisseur/list.php index e7a05c8fe24..5213a4686be 100644 --- a/htdocs/compta/ventilation/fournisseur/list.php +++ b/htdocs/compta/ventilation/fournisseur/list.php @@ -76,14 +76,14 @@ if ($result) $var=!$var; print ""; - print ''; + print ''; print ''; print ''; - print ''; diff --git a/htdocs/compta/ventilation/list.php b/htdocs/compta/ventilation/list.php index 5fa2a5a1ee5..03a1b658cd2 100644 --- a/htdocs/compta/ventilation/list.php +++ b/htdocs/compta/ventilation/list.php @@ -111,7 +111,7 @@ if ($result) print price($objp->price); print ''; - print ''; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/card.php similarity index 98% rename from htdocs/contact/fiche.php rename to htdocs/contact/card.php index a86965f5c8b..ce607091267 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/card.php @@ -23,7 +23,7 @@ */ /** - * \file htdocs/contact/fiche.php + * \file htdocs/contact/card.php * \ingroup societe * \brief Card of a contact */ @@ -221,7 +221,7 @@ if (empty($reshook)) { $db->commit(); if (! empty($backtopage)) $url=$backtopage; - else $url='fiche.php?id='.$id; + else $url='card.php?id='.$id; header("Location: ".$url); exit; } @@ -1082,17 +1082,17 @@ else { if ($user->rights->societe->contact->creer) { - print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Modify').''; } if (! $object->user_id && $user->rights->user->user->creer) { - print ''.$langs->trans("CreateDolibarrLogin").''; + print ''.$langs->trans("CreateDolibarrLogin").''; } if ($user->rights->societe->contact->supprimer) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } // Activer if ($object->statut == 0 && $user->rights->societe->contact->creer) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 878ee1fa956..19ce91f9c82 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -885,12 +885,12 @@ class Contact extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($option == 'xxx') { - $lien = ''; + $lien = ''; $lienfin=''; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index d8e21b8cc4c..11eb366e98c 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -77,12 +77,12 @@ $titre = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans(" if ($type == "c" || $type=="p") { $titre.=' ('.$langs->trans("ThirdPartyCustomers").')'; - $urlfiche="fiche.php"; + $urlfiche="card.php"; } else if ($type == "f") { $titre.=' ('.$langs->trans("ThirdPartySuppliers").')'; - $urlfiche="fiche.php"; + $urlfiche="card.php"; } else if ($type == "o") { @@ -378,7 +378,7 @@ if ($result) print ''; - print ''; @@ -496,7 +496,7 @@ if ($resql) } else { - print ''.img_object($langs->trans("ShowService"),"service"); + print ''.img_object($langs->trans("ShowService"),"service"); if ($obj->label) print ' '.dol_trunc($obj->label,20).''; else print ' '.dol_trunc($obj->note,20); } @@ -576,7 +576,7 @@ if ($resql) } else { - print ''.img_object($langs->trans("ShowService"),"service"); + print ''.img_object($langs->trans("ShowService"),"service"); if ($obj->label) print ' '.dol_trunc($obj->label,20).''; else print ' '.dol_trunc($obj->note,20); } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index e6a0750aa4e..7970e80603c 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -152,12 +152,12 @@ if ($resql) $obj = $db->fetch_object($resql); $var=!$var; print ''; - print ''; print ''; - print ''; + print ''; //print ''; print ''; //print ''; diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index 702ed8d81ff..d94d45489fd 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -43,7 +43,7 @@ foreach($linkedObjectBlock as $object) $var=!$var; ?> > + trans("ShowContract"),"contract").' '.$object->ref; ?> diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index ae138ae1422..8b88b6ff557 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -100,12 +100,12 @@ class box_actions extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => ("action"), - 'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id); + 'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => dol_trunc($label,32), 'text2'=> $late, - 'url' => DOL_URL_ROOT."/comm/action/fiche.php?id=".$objp->id); + 'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => ($objp->socid?'company':''), diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 12145294d64..ae6b6b7ef15 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -78,7 +78,7 @@ class box_clients extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url= DOL_URL_ROOT."/comm/fiche.php?socid="; + if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url= DOL_URL_ROOT."/comm/card.php?socid="; else $url= DOL_URL_ROOT."/societe/soc.php?socid="; $i = 0; diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 1b7de3cca7f..f88eaa939ac 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -90,19 +90,19 @@ class box_commandes extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/commande/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->ref, - 'url' => DOL_URL_ROOT."/commande/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datem,'day'), diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index a6fe663087e..e10c9ae7ed9 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -96,11 +96,11 @@ class box_contacts extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/contact/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $contactstatic->getFullName($langs,0), - 'url' => DOL_URL_ROOT."/contact/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => ($objp->fk_soc > 0?'company':''), diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 26c3f269f3d..4297d4de46e 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -96,20 +96,20 @@ class box_contracts extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref 'text2'=> $late, - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($objp->nom,40), - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day')); diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 2e8f94e29ff..92af03f57ad 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -110,12 +110,12 @@ class box_factures extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'maxlength'=>40, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day'), diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index d9cfa9bf5cd..20d2a11bf9c 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -99,24 +99,24 @@ class box_factures_fourn extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => ($objp->ref?$objp->ref:$objp->facid), 'text2'=> $late, - 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); $this->info_box_contents[$i][2] = array('td' => 'align="left"', 'text' => $objp->ref_supplier, - 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); $this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="left"', 'text' => $objp->nom, - 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); $this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day')); diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 742bd04cf82..dadfe58a27a 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -95,24 +95,24 @@ class box_factures_fourn_imp extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => ($objp->ref?$objp->ref:$objp->facid), 'text2'=> $late, - 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); $this->info_box_contents[$i][2] = array('td' => 'align="left"', 'text' => $objp->ref_supplier, - 'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid); + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); $this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="left"', 'text' => $objp->nom, - 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); $this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => dol_print_date($datelimite,'day')); diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 72c34dee559..8aab8fa9b15 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -107,12 +107,12 @@ class box_factures_imp extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'maxlength'=>44, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datelimite,'day'), diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 32038c61928..118a18a007a 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -98,19 +98,19 @@ class box_ficheinter extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/fichinter/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/fichinter/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some interventions have no ref - 'url' => DOL_URL_ROOT."/fichinter/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/fichinter/card.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($objp->nom,40), - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day')); diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 0157e5acada..3423d8bee63 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -86,11 +86,11 @@ class box_fournisseurs extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->nom, - 'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 966a8ab7d10..4760a3aaf89 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -115,11 +115,11 @@ class box_members extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/adherents/fiche.php?rowid=".$objp->rowid); + 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $memberstatic->getFullName($langs), - 'url' => DOL_URL_ROOT."/adherents/fiche.php?rowid=".$objp->rowid); + 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 30669c4f392..d3772ff65f1 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -101,11 +101,11 @@ class box_produits extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => ($objp->fk_product_type==1?'object_service':'object_product'), - 'url' => DOL_URL_ROOT."/product/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->label, - 'url' => DOL_URL_ROOT."/product/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); if ($objp->price_base_type == 'HT') { diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index ec526a76492..1079f623492 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -108,11 +108,11 @@ class box_produits_alerte_stock extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => ($objp->fk_product_type==1?'object_service':'object_product'), - 'url' => DOL_URL_ROOT."/product/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->label, - 'url' => DOL_URL_ROOT."/product/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); if ($objp->price_base_type == 'HT') { diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 73e554de2b6..19c007bb287 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -103,11 +103,11 @@ class box_propales extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($objp->nom,40), - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec,'day')); diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index c0234f97dc3..8c1a0afd288 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -89,11 +89,11 @@ class box_prospect extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->nom, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day")); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 264178cc3ea..d6e525e42d4 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -113,21 +113,21 @@ class box_services_contracts extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => ($objp->fk_product_type==1?'object_service':'object_product'), - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->label, 'maxlength' => 16, - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'maxlength' => 28, - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datem,'day')); diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 5e488b3c6db..8bfe5749215 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -93,19 +93,19 @@ class box_services_expired extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($objp->nom,40), - 'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid); + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); $this->info_box_contents[$i][4] = array('td' => 'align="center"', 'text' => dol_print_date($dateline,'day'), diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index a976112c1ad..0634b1548a8 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -86,8 +86,8 @@ class box_supplier_orders extends ModeleBoxes $objp = $db->fetch_object($result); $datem=$db->jdate($objp->tms); - $urlo = DOL_URL_ROOT."/fourn/commande/fiche.php?id=".$objp->rowid; - $urls = DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid; + $urlo = DOL_URL_ROOT."/fourn/commande/card.php?id=".$objp->rowid; + $urls = DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid; $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5cf872eb3d8..73955bb82fc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2843,7 +2843,7 @@ class Form // JQUI method dialog is broken with jmobile, we use standard HTML. // Note: When using dol_use_jmobile or no js, you must also check code for button use a GET url with action=xxx and check that you also output the confirm code when action=xxx - // See page product/fiche.php for example + // See page product/card.php for example if (! empty($conf->dol_use_jmobile)) $useajax=0; if (empty($conf->use_javascript_ajax)) $useajax=0; @@ -3027,7 +3027,7 @@ class Form { $projet = new Project($this->db); $projet->fetch($selected); - //print ''.$projet->title.''; + //print ''.$projet->title.''; print $projet->getNomUrl(0,'',1); } else @@ -3360,7 +3360,7 @@ class Form { $addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); print 'Cette societe n\'a pas de contact, veuillez en cr�er un avant de faire votre proposition commerciale
'; - print ''.$addcontact.''; + print ''.$addcontact.''; } print ''; print ''; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index b0be8bd1cdd..43a504fd04f 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -178,7 +178,7 @@ class Notify switch($objet_type) { case 'ficheinter': - $link='/fichinter/fiche.php?id='.$objet_id; + $link='/fichinter/card.php?id='.$objet_id; break; case 'propal': $link='/comm/propal.php?id='.$objet_id; @@ -187,10 +187,10 @@ class Notify $link='/compta/facture.php?facid='.$objet_id; break; case 'order': - $link='/commande/fiche.php?id='.$objet_id; + $link='/commande/card.php?id='.$objet_id; break; case 'order_supplier': - $link='/fourn/commande/fiche.php?id='.$objet_id; + $link='/fourn/commande/card.php?id='.$objet_id; break; } // Define $urlwithroot diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 27b02e060e8..ddfcd239a41 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -435,7 +435,7 @@ function actions_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/card.php?id='.$object->id; $head[$h][1] = $langs->trans("CardAction"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 349cb15063f..488a4c3a530 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -36,7 +36,7 @@ function bank_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT . '/compta/bank/fiche.php?id=' . $object->id; + $head[$h][0] = DOL_URL_ROOT . '/compta/bank/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("AccountCard"); $head[$h][2] = 'bankname'; $h++; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index e3ad4ef3eb7..20b7b23a857 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -48,7 +48,7 @@ function societe_prepare_head($object) if ($object->client==1 || $object->client==2 || $object->client==3) { - $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/comm/card.php?socid='.$object->id; $head[$h][1] = ''; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] .= $langs->trans("Prospect"); if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= '/'; @@ -58,7 +58,7 @@ function societe_prepare_head($object) } if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) { - $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id; $head[$h][1] = $langs->trans("Supplier"); $head[$h][2] = 'supplier'; $h++; @@ -109,7 +109,7 @@ function societe_prepare_head($object) // Notifications if (! empty($conf->notification->enabled)) { - $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id; $head[$h][1] = $langs->trans("Notifications"); $head[$h][2] = 'notify'; $h++; @@ -440,8 +440,8 @@ function show_projects($conf,$langs,$db,$object,$backtopage='') $buttoncreate=''; if (! empty($conf->projet->enabled) && $user->rights->projet->creer) { - //$buttoncreate=''.$langs->trans("AddProject").''; - $buttoncreate=''.$langs->trans("AddProject"); + //$buttoncreate=''.$langs->trans("AddProject").''; + $buttoncreate=''.$langs->trans("AddProject"); if (empty($conf->dol_optimize_smallscreen)) $buttoncreate.=' '.img_picto($langs->trans("AddProject"),'filenew'); $buttoncreate.=''."\n"; } @@ -486,7 +486,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='') print ""; // Ref - print ''; + print ''; // Label print ''; // Date start @@ -557,7 +557,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') if ($user->rights->societe->contact->creer) { $addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); - $buttoncreate=''.$addcontact; + $buttoncreate=''.$addcontact; if (empty($conf->dol_optimize_smallscreen)) $buttoncreate.=' '.img_picto($addcontact,'filenew'); $buttoncreate.=''."\n"; } @@ -741,11 +741,11 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; } @@ -754,7 +754,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') if ($user->rights->societe->contact->creer) { print ''; } @@ -917,7 +917,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) $permok=$user->rights->agenda->myactions->create; if (($object->id || $objcon->id) && $permok) { - $out.='id; $out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">'; $out.=$langs->trans("AddAnAction").' '; @@ -1200,7 +1200,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $permok=$user->rights->agenda->myactions->create; if ((! empty($object->id) || ! empty($objcon->id)) && $permok) { - $out.='id; $out.=(! empty($objcon->id)?'&contactid='.$objcon->id:'').'&backtopage=1&percentage=-1">'; $out.=$langs->trans("AddAnAction").' '; @@ -1238,7 +1238,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) } if (isset($histo[$key]['type']) && $histo[$key]['type']=='mailing') { - $out.=''.img_object($langs->trans("ShowEMailing"),"email").' '; + $out.=''.img_object($langs->trans("ShowEMailing"),"email").' '; $transcode=$langs->trans("Action".$histo[$key]['acode']); $libelle=($transcode!="Action".$histo[$key]['acode']?$transcode:'Send mass mailing'); $out.=dol_trunc($libelle,40); diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 2518f7b7883..8d9ba9296a4 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -35,7 +35,7 @@ function contact_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/contact/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/contact/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index e51f7594ac9..51dba11df23 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -34,7 +34,7 @@ function contract_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/contrat/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/contrat/card.php?id='.$object->id; $head[$h][1] = $langs->trans("ContractCard"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php index 613b12dadad..239f36721ee 100644 --- a/htdocs/core/lib/emailing.lib.php +++ b/htdocs/core/lib/emailing.lib.php @@ -34,7 +34,7 @@ function emailing_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/comm/mailing/card.php?id=".$object->id; $head[$h][1] = $langs->trans("MailCard"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index b8d2e87fdff..d231b767753 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -38,7 +38,7 @@ function fichinter_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/fichinter/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/fichinter/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index 58d553e36d5..cc14c5ca4aa 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -37,7 +37,7 @@ function facturefourn_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$object->id; $head[$h][1] = $langs->trans('CardBill'); $head[$h][2] = 'card'; $h++; @@ -100,7 +100,7 @@ function ordersupplier_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$object->id; $head[$h][1] = $langs->trans("OrderCard"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 20b030a9226..68d0f4e7639 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1227,7 +1227,7 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid= if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $type='AC_EMAIL'; $link=''; - if (! empty($conf->global->AGENDA_ADDACTIONFOREMAIL)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; + if (! empty($conf->global->AGENDA_ADDACTIONFOREMAIL)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; $newemail='
'.$langs->trans("WithdrawalsReceipts").''; - print ''.$lipre->bon_ref.'
'.$langs->trans("Date").''.dol_print_date($bon->datec,'day').'
'.$langs->trans("Amount").''.price($lipre->amount).'
'.$langs->trans("Status").''; @@ -307,7 +307,7 @@ if ($id) print ''.$obj->ref."'; + print ''; print img_object($langs->trans("ShowCompany"),"company"). ' '.stripslashes($obj->nom)."'.price($obj->total_ttc)."'.stripslashes($obj->nom)."'.stripslashes($obj->nom)."'.price($obj->amount)."'; print img_object($langs->trans("ShowBill"),"bill"); print ' '.$obj->facnumber."'.$obj->nom."'.$obj->nom."'.$obj->code_client."'.$obj->code_client."'.dol_print_date($db->jdate($obj->datec),'day')."'.stripslashes($obj->nom)."'.stripslashes($obj->nom)."'.$rej->motifs[$obj->motif].'
'.dol_print_date($db->jdate($objp->dp),'day')."'; print '      '; // Decalage - print ''.img_object($langs->trans("ShowPayment"),"payment").' '.$langs->trans("Payment").' '.$objp->rowid.'  '.price($objp->amount).'
"; - print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."".$objp->paiement_type.' '.$objp->num_paiement."'.price($objp->amount)." ".$langs->trans("Currency".$conf->currency)."
'.$objp->facnumber.''.$objp->facnumber.''.stripslashes(nl2br($objp->description)).''; print price($objp->price); print ''; + print ''; print img_edit(); print ''; + print ''; print img_edit(); print ''; if ($obj->socid) { - print ''; + print ''; print img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,20).''; } else @@ -410,7 +410,7 @@ if ($result) // Links Add action and Export vcard print ''; - print ''.img_object($langs->trans("AddAction"),"action").''; + print ''.img_object($langs->trans("AddAction"),"action").''; print '   '; print ''; print img_picto($langs->trans("VCard"),'vcard.png').' '; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/card.php similarity index 99% rename from htdocs/contrat/fiche.php rename to htdocs/contrat/card.php index 81d50edb211..5cb25a5bed4 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/card.php @@ -23,7 +23,7 @@ */ /** - * \file htdocs/contrat/fiche.php + * \file htdocs/contrat/card.php * \ingroup contrat * \brief Page of a contract */ diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index b4cf7c20322..02859df9158 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1531,7 +1531,7 @@ class Contrat extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='contract'; @@ -2013,7 +2013,7 @@ class ContratLigne extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='contract'; diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index d23e789d92e..400899993ae 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -416,7 +416,7 @@ if ($resql) } else { - print ''.img_object($langs->trans("ShowService"),"service"); + print ''.img_object($langs->trans("ShowService"),"service"); if ($obj->label) print ' '.dol_trunc($obj->label,20).''; else print ' '.dol_trunc($obj->note,20); } @@ -426,7 +426,7 @@ if ($resql) $staticcompany->nom=$obj->nom; print $staticcompany->getNomUrl(1,'',20); print ''; + print ''; $dateend=$db->jdate($obj->date_fin_validite); print $staticcontratligne->LibStatut($obj->statut, 3, ($dateend && $dateend < $now)?1:0); print '
'; + print ''; print img_object($langs->trans("ShowContract"),"contract").' '.(isset($obj->ref) ? $obj->ref : $obj->cid) .''; if ($obj->nb_late) print img_warning($langs->trans("Late")); print ''.$obj->ref_customer.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.dol_print_date($obj->datec).''.dol_print_date($db->jdate($obj->date_contrat)).''.$staticcontrat->LibStatut($obj->statut,3).'
- trans("ShowContract"),"contract").' '.$object->ref; ?> date_contrat,'day'); ?>   getLibStatut(6); ?>
'.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.''.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.''.$obj->title.''; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''; + print ''; print img_object($langs->trans("Rendez-Vous"),"action_rdv"); print ' '; } - print ''; + print ''; print img_object($langs->trans("Event"),"action"); print ''; - print ''; + print ''; print img_edit(); print '
'.$newemail.'  '.$link.'
'; } } @@ -1275,7 +1275,7 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $type='AC_SKYPE'; $link=''; - if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; + if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; $newskype='
'.$newskype.'  '.$link.'
'; } } @@ -1373,7 +1373,7 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" { $type='AC_TEL'; $link=''; if ($addlink == 'AC_FAX') $type='AC_FAX'; - if (! empty($conf->global->AGENDA_ADDACTIONFORPHONE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; + if (! empty($conf->global->AGENDA_ADDACTIONFORPHONE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; if ($link) $newphone='
'.$newphone.'  '.$link.'
'; } } diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php index 209ca16f585..bb42f2e0760 100644 --- a/htdocs/core/lib/holiday.lib.php +++ b/htdocs/core/lib/holiday.lib.php @@ -34,7 +34,7 @@ function holiday_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT . '/holiday/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT . '/holiday/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 67b6794f3a3..20a05a701aa 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -34,7 +34,7 @@ function member_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/adherents/fiche.php?rowid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/adherents/card.php?rowid='.$object->id; $head[$h][1] = $langs->trans("MemberCard"); $head[$h][2] = 'general'; $h++; diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 43427acd59a..0aa3c980911 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -42,7 +42,7 @@ function commande_prepare_head($object) if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { - $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/commande/card.php?id='.$object->id; $head[$h][1] = $langs->trans("OrderCard"); $head[$h][2] = 'order'; $h++; diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index f4d3b80ee8c..591956bbffc 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -32,7 +32,7 @@ function payment_prepare_head(Paiement $object) { $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'payment'; $h++; @@ -67,7 +67,7 @@ function payment_supplier_prepare_head(Paiement $object) { $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'payment'; $h++; diff --git a/htdocs/core/lib/prelevement.lib.php b/htdocs/core/lib/prelevement.lib.php index dde5981cf75..257f13558ee 100644 --- a/htdocs/core/lib/prelevement.lib.php +++ b/htdocs/core/lib/prelevement.lib.php @@ -39,7 +39,7 @@ function prelevement_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'prelevement'; $h++; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index d8f814e06c3..b126df7bdc3 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -39,7 +39,7 @@ function product_prepare_head($object, $user) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/product/card.php?id=".$object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; @@ -83,13 +83,13 @@ function product_prepare_head($object, $user) // Sub products if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) { - $head[$h][0] = DOL_URL_ROOT."/product/composition/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/product/composition/card.php?id=".$object->id; $head[$h][1] = $langs->trans('AssociatedProducts'); $head[$h][2] = 'subproduct'; $h++; } - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/product/stats/card.php?id=".$object->id; $head[$h][1] = $langs->trans('Statistics'); $head[$h][2] = 'stats'; $h++; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 7a8f2302c12..f99034e088a 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -38,7 +38,7 @@ function project_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.$object->id; $head[$h][1] = $langs->trans("Project"); $head[$h][2] = 'project'; $h++; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index d2ff595b734..dd08c8b6c79 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -41,7 +41,7 @@ function shipping_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT."/expedition/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/expedition/card.php?id=".$object->id; $head[$h][1] = $langs->trans("SendingCard"); $head[$h][2] = 'shipping'; $h++; @@ -52,7 +52,7 @@ function shipping_prepare_head($object) $object->fetchObjectLinked($object->id,$object->element); if (! empty($object->linkedObjectsIds['delivery'][0])) // If there is a delivery { - $head[$h][0] = DOL_URL_ROOT."/livraison/fiche.php?id=".$object->linkedObjectsIds['delivery'][0]; + $head[$h][0] = DOL_URL_ROOT."/livraison/card.php?id=".$object->linkedObjectsIds['delivery'][0]; $head[$h][1] = $langs->trans("DeliveryCard"); $head[$h][2] = 'delivery'; $h++; @@ -99,13 +99,13 @@ function delivery_prepare_head($object) if ($conf->expedition_bon->enabled && $user->rights->expedition->lire) { - $head[$h][0] = DOL_URL_ROOT."/expedition/fiche.php?id=".$object->origin_id; + $head[$h][0] = DOL_URL_ROOT."/expedition/card.php?id=".$object->origin_id; $head[$h][1] = $langs->trans("SendingCard"); $head[$h][2] = 'shipping'; $h++; } - $head[$h][0] = DOL_URL_ROOT."/livraison/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/livraison/card.php?id=".$object->id; $head[$h][1] = $langs->trans("DeliveryCard"); $head[$h][2] = 'delivery'; $h++; @@ -207,7 +207,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='') print "
'.img_object($langs->trans("ShowSending"),'sending').' '.$objp->exp_ref.''.img_object($langs->trans("ShowSending"),'sending').' '.$objp->exp_ref.''; print $receiving->getNomUrl($db); - //print ''.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.''; + //print ''.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.''; print ''; diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 3305f76875d..758b2e96582 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -34,7 +34,7 @@ function stock_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/product/stock/card.php?id='.$object->id; $head[$h][1] = $langs->trans("WarehouseCard"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/trip.lib.php b/htdocs/core/lib/trip.lib.php index ae38a1bf706..45619b10d6f 100644 --- a/htdocs/core/lib/trip.lib.php +++ b/htdocs/core/lib/trip.lib.php @@ -34,7 +34,7 @@ function trip_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/fiche.php?id=' . $object->id; + $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 276efe85f02..af1b003e731 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -44,7 +44,7 @@ function user_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/user/card.php?id='.$object->id; $head[$h][1] = $langs->trans("UserCard"); $head[$h][2] = 'user'; $h++; @@ -140,7 +140,7 @@ function group_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/user/group/fiche.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id; $head[$h][1] = $langs->trans("GroupCard"); $head[$h][2] = 'group'; $h++; diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 8d8448cedb3..060524181d8 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -58,9 +58,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Home - Menu users and groups insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 402__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/user/fiche.php?leftmenu=users&action=create', 'NewUser', 2, 'users', '$user->rights->user->user->creer || $user->admin', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 402__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/user/card.php?leftmenu=users&action=create', 'NewUser', 2, 'users', '$user->rights->user->user->creer || $user->admin', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 403__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/group/index.php?leftmenu=users', 'Groups', 1, 'users', '($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 404__+MAX_llx_menu__, 'home', '', 403__+MAX_llx_menu__, '/user/group/fiche.php?leftmenu=users&action=create', 'NewGroup', 2, 'users', '($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 404__+MAX_llx_menu__, 'home', '', 403__+MAX_llx_menu__, '/user/group/card.php?leftmenu=users&action=create', 'NewGroup', 2, 'users', '($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin', '', 2, 0, __ENTITY__); -- Third parties insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/soc.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); @@ -72,7 +72,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 510__+MAX_llx_menu__, 'companies', '', 509__+MAX_llx_menu__, '/societe/soc.php?leftmenu=customers&action=create&type=c', 'MenuNewCustomer', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -- Third parties - Contacts insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/fiche.php?leftmenu=contacts&action=create', 'NewContactAddress', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/card.php?leftmenu=contacts&action=create', 'NewContactAddress', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=p', 'ThirdPartyProspects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=c', 'ThirdPartyCustomers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__); @@ -80,27 +80,27 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 607__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=o', 'Others', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 4, __ENTITY__); -- Third parties - Category customer insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=1', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/card.php?action=create&type=1', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category supplier insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/card.php?action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category contact insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 670__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=4', 'ContactCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 671__+MAX_llx_menu__, 'companies', '', 670__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 671__+MAX_llx_menu__, 'companies', '', 670__+MAX_llx_menu__, '/categories/card.php?action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Product - Product insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2800__+MAX_llx_menu__, 'products', 'product', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/card.php?leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/list.php?leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?type=0', 'Stocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats&type=0', 'Statistics', 1, 'main', '$user->rights->produit->lire', '', 2, 5, __ENTITY__); -- Product - Services insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2900__+MAX_llx_menu__, 'products', 'service', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=service&type=1', 'Services', 0, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/fiche.php?leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/card.php?leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/list.php?leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2903__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats&type=1', 'Statistics', 1, 'main', '$user->rights->service->lire', '', 2, 5, __ENTITY__); -- Product - Stocks insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3100__+MAX_llx_menu__, 'products', 'stock', 3__+MAX_llx_menu__, '/product/stock/index.php?leftmenu=stock', 'Stock', 0, 'stocks', '$user->rights->stock->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/fiche.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/card.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/list.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__); @@ -108,10 +108,10 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Product - Categories insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3200__+MAX_llx_menu__, 'products', 'cat', 3__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=0', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3201__+MAX_llx_menu__, 'products', '', 3200__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=0', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3201__+MAX_llx_menu__, 'products', '', 3200__+MAX_llx_menu__, '/categories/card.php?action=create&type=0', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Product - Shipment insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled', __HANDLER__, 'left', 1300__+MAX_llx_menu__, 'commercial', 'sendings', 3__+MAX_llx_menu__, '/expedition/index.php?leftmenu=sendings', 'Shipments', 0, 'sendings', '$user->rights->expedition->lire', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1301__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/fiche.php?action=create2&leftmenu=sendings', 'NewSending', 1, 'sendings', '$user->rights->expedition->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1301__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/card.php?action=create2&leftmenu=sendings', 'NewSending', 1, 'sendings', '$user->rights->expedition->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1302__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/list.php?leftmenu=sendings', 'List', 1, 'sendings', '$user->rights->expedition->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expedition->enabled && $leftmenu=="sendings"', __HANDLER__, 'left', 1303__+MAX_llx_menu__, 'commercial', '', 1300__+MAX_llx_menu__, '/expedition/stats/index.php?leftmenu=sendings', 'Statistics', 1, 'sendings', '$user->rights->expedition->lire', '', 2, 2, __ENTITY__); @@ -127,7 +127,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); -- Commercial - Customer's orders insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1201__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/fiche.php?action=create&leftmenu=orders', 'NewOrder', 1, 'orders', '$user->rights->commande->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1201__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/card.php?action=create&leftmenu=orders', 'NewOrder', 1, 'orders', '$user->rights->commande->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1202__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders', 'List', 1, 'orders', '$user->rights->commande->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1203__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=0', 'StatusOrderDraftShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1204__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=1', 'StatusOrderValidated', 1, 'orders', '$user->rights->commande->lire', '', 2, 3, __ENTITY__); @@ -138,12 +138,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__); -- Commercial - Supplier's orders insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/fiche.php?action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0', 'List', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5108__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier', 'Statistics', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 7, __ENTITY__); -- Commercial - Contracts insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1400__+MAX_llx_menu__, 'commercial', 'contracts', 5__+MAX_llx_menu__, '/contrat/index.php?leftmenu=contracts', 'Contracts', 0, 'contracts', '$user->rights->contrat->lire', '', 2, 7, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1401__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/fiche.php?&action=create&leftmenu=contracts', 'NewContract', 1, 'contracts', '$user->rights->contrat->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1401__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/card.php?&action=create&leftmenu=contracts', 'NewContract', 1, 'contracts', '$user->rights->contrat->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1402__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/list.php?leftmenu=contracts', 'List', 1, 'contracts', '$user->rights->contrat->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1403__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/services.php?leftmenu=contracts', 'MenuServices', 1, 'contracts', '$user->rights->contrat->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled&&$leftmenu=="contracts"', __HANDLER__, 'left', 1404__+MAX_llx_menu__, 'commercial', '', 1403__+MAX_llx_menu__, '/contrat/services.php?leftmenu=contracts&mode=0', 'MenuInactiveServices', 2, 'contracts', '$user->rights->contrat->lire', '', 2, 0, __ENTITY__); @@ -152,11 +152,11 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled&&$leftmenu=="contracts"', __HANDLER__, 'left', 1407__+MAX_llx_menu__, 'commercial', '', 1403__+MAX_llx_menu__, '/contrat/services.php?leftmenu=contracts&mode=5', 'MenuClosedServices', 2, 'contracts', '$user->rights->contrat->lire', '', 2, 3, __ENTITY__); -- Commercial - Interventions insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1500__+MAX_llx_menu__, 'commercial', 'ficheinter', 5__+MAX_llx_menu__, '/fichinter/list.php?leftmenu=ficheinter', 'Interventions', 0, 'interventions', '$user->rights->ficheinter->lire', '', 2, 8, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1501__+MAX_llx_menu__, 'commercial', '', 1500__+MAX_llx_menu__, '/fichinter/fiche.php?action=create&leftmenu=ficheinter', 'NewIntervention', 1, 'interventions', '$user->rights->ficheinter->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1501__+MAX_llx_menu__, 'commercial', '', 1500__+MAX_llx_menu__, '/fichinter/card.php?action=create&leftmenu=ficheinter', 'NewIntervention', 1, 'interventions', '$user->rights->ficheinter->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1502__+MAX_llx_menu__, 'commercial', '', 1500__+MAX_llx_menu__, '/fichinter/list.php?leftmenu=ficheinter', 'List', 1, 'interventions', '$user->rights->ficheinter->lire', '', 2, 1, __ENTITY__); -- Accountancy - Supplier invoice insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'accountancy', 'supplier_bills', 6__+MAX_llx_menu__, '/fourn/facture/list.php?leftmenu=suppliers_bills', 'BillsSuppliers', 0, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/fiche.php?action=create&leftmenu=suppliers_bills', 'NewBill', 1, 'bills', '$user->rights->fournisseur->facture->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/card.php?action=create&leftmenu=suppliers_bills', 'NewBill', 1, 'bills', '$user->rights->fournisseur->facture->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/impayees.php?leftmenu=suppliers_bills', 'Unpaid', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1603__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/paiement.php?leftmenu=suppliers_bills', 'Payments', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1604__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier', 'Statistics', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 8, __ENTITY__); @@ -172,19 +172,19 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', 'orders', 6__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); -- Donations insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled', __HANDLER__, 'left', 2000__+MAX_llx_menu__, 'accountancy', 'donations', 6__+MAX_llx_menu__, '/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy', 'Donations', 0, 'donations', '$user->rights->don->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/card.php?leftmenu=donations&mainmenu=accountancy&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2002__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/list.php?leftmenu=donations&mainmenu=accountancy', 'List', 1, 'donations', '$user->rights->don->lire', '', 2, 1, __ENTITY__); --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2003__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/stats.php?leftmenu=donations&mainmenu=accountancy', 'Statistics', 1, 'donations', '$user->rights->don->lire', '', 2, 2, __ENTITY__); -- Special expenses insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled || $conf->salaries->enabled', __HANDLER__, 'left', 2200__+MAX_llx_menu__, 'accountancy', 'tax', 6__+MAX_llx_menu__, '/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy', 'MenuSpecialExpenses', 0, 'compta', '(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)', '', 0, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled', __HANDLER__, 'left', 2210__+MAX_llx_menu__, 'accountancy', 'tax_sal', 2200__+MAX_llx_menu__, '/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy', 'Salaries', 1, 'salaries', '$user->rights->salaries->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2211__+MAX_llx_menu__, 'accountancy', '', 2210__+MAX_llx_menu__, '/compta/salaries/fiche.php?leftmenu=tax_salary&action=create', 'NewPayment', 2, 'companies', '$user->rights->salaries->write', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2211__+MAX_llx_menu__, 'accountancy', '', 2210__+MAX_llx_menu__, '/compta/salaries/card.php?leftmenu=tax_salary&action=create', 'NewPayment', 2, 'companies', '$user->rights->salaries->write', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->salaries->enabled && $leftmenu=="tax_salary"', __HANDLER__, 'left', 2212__+MAX_llx_menu__, 'accountancy', '', 2210__+MAX_llx_menu__, '/compta/salaries/index.php?leftmenu=tax_salary', 'Payments', 2, 'companies', '$user->rights->salaries->read', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled', __HANDLER__, 'left', 2250__+MAX_llx_menu__, 'accountancy', 'tax_social', 2200__+MAX_llx_menu__, '/compta/sociales/index.php?leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'accountancy', '', 2250__+MAX_llx_menu__, '/compta/sociales/charges.php?leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'accountancy', '', 2250__+MAX_llx_menu__, '/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'accountancy', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/fiche.php?leftmenu=tax_vat&action=create', 'NewPayment', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?leftmenu=tax_vat&action=create', 'NewPayment', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/reglement.php?leftmenu=tax_vat', 'Payments', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); @@ -194,7 +194,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/ventilation/lignes.php', 'Dispatched', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/param/', 'Setup', 1, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2404__+MAX_llx_menu__, 'accountancy', '', 2403__+MAX_llx_menu__, '/compta/param/comptes/list.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2405__+MAX_llx_menu__, 'accountancy', '', 2403__+MAX_llx_menu__, '/compta/param/comptes/fiche.php?action=create', 'New', 2, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2405__+MAX_llx_menu__, 'accountancy', '', 2403__+MAX_llx_menu__, '/compta/param/comptes/card.php?action=create', 'New', 2, 'companies', '$user->rights->compta->ventilation->parametrer', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2406__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/compta/export/', 'Export', 1, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2407__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/index.php', 'New', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION', __HANDLER__, 'left', 2408__+MAX_llx_menu__, 'accountancy', '', 2406__+MAX_llx_menu__, '/compta/export/list.php', 'List', 2, 'companies', '$user->rights->compta->ventilation->lire', '', 0, 1, __ENTITY__); @@ -210,7 +210,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); -- Check deposit insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/list.php?leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__); -- Withdrawal insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank', 'StandingOrders', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__); @@ -221,18 +221,18 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__); -- Bank insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/index.php?leftmenu=bank&mainmenu=bank', 'MenuBankCash', 0, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/fiche.php?action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->rights->banque->configurer', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/card.php?action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->rights->banque->configurer', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2602__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/categ.php?leftmenu=bank', 'Rubriques', 1, 'categories', '$user->rights->banque->configurer', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2603__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/search.php?leftmenu=bank', 'ListTransactions', 1, 'banks', '$user->rights->banque->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2604__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/budget.php?leftmenu=bank', 'ListTransactionsByCategory', 1, 'banks', '$user->rights->banque->lire', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2606__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/virement.php?leftmenu=bank', 'BankTransfers', 1, 'banks', '$user->rights->banque->transfer', '', 0, 5, __ENTITY__); -- Project insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects', 'Projects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/fiche.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3602__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3610__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects&mode=mine', 'MyProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3611__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/fiche.php?leftmenu=projects&action=create&mode=mine', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3611__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create&mode=mine', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3612__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3700__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects', 'Activities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); @@ -246,7 +246,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3803__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/activity/list.php?leftmenu=projects&mode=mine', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3900__+MAX_llx_menu__, 'tools', 'mailing', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/fiche.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3901__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/card.php?leftmenu=mailing&action=create', 'NewMailing', 1, 'mails', '$user->rights->mailing->creer', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/list.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->export->enabled', __HANDLER__, 'left', 4100__+MAX_llx_menu__, 'tools', 'export', 8__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'FormatedExport', 0, 'exports', '$user->rights->export->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->export->enabled', __HANDLER__, 'left', 4101__+MAX_llx_menu__, 'tools', '', 4100__+MAX_llx_menu__, '/exports/export.php?leftmenu=export', 'NewExport', 1, 'exports', '$user->rights->export->creer', '', 2, 0, __ENTITY__); @@ -254,7 +254,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->import->enabled', __HANDLER__, 'left', 4131__+MAX_llx_menu__, 'tools', '', 4130__+MAX_llx_menu__, '/imports/import.php?leftmenu=import', 'NewImport', 1, 'exports', '$user->rights->import->run', '', 2, 0, __ENTITY__); -- Members insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4200__+MAX_llx_menu__, 'members', 'members', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=members&mainmenu=members', 'Members', 0, 'members', '$user->rights->adherent->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4201__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/fiche.php?leftmenu=members&action=create', 'NewMember', 1, 'members', '$user->rights->adherent->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4201__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/card.php?leftmenu=members&action=create', 'NewMember', 1, 'members', '$user->rights->adherent->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/list.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?leftmenu=members&statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__); @@ -276,16 +276,16 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4702__+MAX_llx_menu__, 'members', '', 4700__+MAX_llx_menu__, '/adherents/type.php?leftmenu=setup&mainmenu=members', 'List', 1, 'members', '$user->rights->adherent->configurer', '', 2, 1, __ENTITY__); -- Members - Category member insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5200__+MAX_llx_menu__, 'members', 'cat', 13__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=3', 'MembersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/card.php?action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- HRM - Holiday insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/index.php?&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/fiche.php?&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->view_log', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/month_report.php?&action=request', 'MenuReportMonth', 1, 'holiday', '$user->rights->holiday->month_report', '', 0, 4, __ENTITY__); -- HRM - Trips and expenses insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/list.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2103__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses', 'Statistics', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index bf5de3c6a91..76866123673 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -262,7 +262,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM while ($i < $numr) { $objp = $db->fetch_object($resql); - $newmenu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); + $newmenu->add('/compta/bank/card.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate { $newmenu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e7fa68aae85..b45957a984b 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -562,9 +562,9 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($leftmenu) || $leftmenu=="users") { $newmenu->add("/user/index.php", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); - $newmenu->add("/user/fiche.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin); + $newmenu->add("/user/card.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin); $newmenu->add("/user/group/index.php", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin); - $newmenu->add("/user/group/fiche.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin); + $newmenu->add("/user/group/card.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin); } } @@ -625,7 +625,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Contacts $newmenu->add("/contact/list.php?leftmenu=contacts", (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->rights->societe->contact->lire, '', $mainmenu, 'contacts'); - $newmenu->add("/contact/fiche.php?leftmenu=contacts&action=create", (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->rights->societe->contact->creer); + $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->rights->societe->contact->creer); $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire); if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire); if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire); @@ -641,16 +641,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { // Categories prospects/customers $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $langs->trans("CustomersProspectsCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - $newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + $newmenu->add("/categories/card.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); } // Categories Contact $newmenu->add("/categories/index.php?leftmenu=cat&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - $newmenu->add("/categories/fiche.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + $newmenu->add("/categories/card.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); // Categories suppliers if (! empty($conf->fournisseur->enabled)) { $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire); - $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + $newmenu->add("/categories/card.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); } //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -685,7 +685,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("orders"); $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); - $newmenu->add("/commande/fiche.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); + $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire); @@ -701,7 +701,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("orders"); $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers",$langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers'); - $newmenu->add("/fourn/commande/fiche.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewOrder"), 1, $user->rights->fournisseur->commande->creer); + $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewOrder"), 1, $user->rights->fournisseur->commande->creer); $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); if (empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); @@ -722,7 +722,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("contracts"); $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("Contracts"), 0, $user->rights->contrat->lire, '', $mainmenu, 'contracts'); - $newmenu->add("/contrat/fiche.php?&action=create&leftmenu=contracts", $langs->trans("NewContract"), 1, $user->rights->contrat->creer); + $newmenu->add("/contrat/card.php?&action=create&leftmenu=contracts", $langs->trans("NewContract"), 1, $user->rights->contrat->creer); $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->rights->contrat->lire); $newmenu->add("/contrat/services.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->rights->contrat->lire); if (empty($leftmenu) || $leftmenu=="contracts") $newmenu->add("/contrat/services.php?leftmenu=contracts&mode=0", $langs->trans("MenuInactiveServices"), 2, $user->rights->contrat->lire); @@ -736,7 +736,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("interventions"); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter'); - $newmenu->add("/fichinter/fiche.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer); + $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire); } @@ -776,7 +776,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("bills"); $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),0,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills'); - $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer); + $newmenu->add("/fourn/facture/card.php?action=create",$langs->trans("NewBill"),1,$user->rights->fournisseur->facture->creer); $newmenu->add("/fourn/facture/impayees.php", $langs->trans("Unpaid"),1,$user->rights->fournisseur->facture->lire); $newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"),1,$user->rights->fournisseur->facture->lire); @@ -796,7 +796,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("donations"); $newmenu->add("/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy",$langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations'); - if (empty($leftmenu) || $leftmenu=="donations") $newmenu->add("/compta/dons/fiche.php?action=create",$langs->trans("NewDonation"), 1, $user->rights->don->creer); + if (empty($leftmenu) || $leftmenu=="donations") $newmenu->add("/compta/dons/card.php?action=create",$langs->trans("NewDonation"), 1, $user->rights->don->creer); if (empty($leftmenu) || $leftmenu=="donations") $newmenu->add("/compta/dons/list.php",$langs->trans("List"), 1, $user->rights->don->lire); //if ($leftmenu=="donations") $newmenu->add("/compta/dons/stats.php",$langs->trans("Statistics"), 1, $user->rights->don->lire); } @@ -814,7 +814,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("salaries"); $newmenu->add("/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy",$langs->trans("Salaries"),1,$user->rights->salaries->read, '', $mainmenu, 'tax_salary'); - if (empty($leftmenu) || preg_match('/^tax_salary/i',$leftmenu)) $newmenu->add("/compta/salaries/fiche.php?leftmenu=tax_salary&action=create",$langs->trans("NewPayment"),2,$user->rights->salaries->write); + if (empty($leftmenu) || preg_match('/^tax_salary/i',$leftmenu)) $newmenu->add("/compta/salaries/card.php?leftmenu=tax_salary&action=create",$langs->trans("NewPayment"),2,$user->rights->salaries->write); if (empty($leftmenu) || preg_match('/^tax_salary/i',$leftmenu)) $newmenu->add("/compta/salaries/index.php?leftmenu=tax_salary",$langs->trans("Payments"),2,$user->rights->salaries->read); } @@ -828,7 +828,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) { $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy",$langs->trans("VAT"),1,$user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat'); - if (empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/fiche.php?leftmenu=tax_vat&action=create",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); + if (empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); if (empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/reglement.php?leftmenu=tax_vat",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); if (empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if (empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); @@ -839,7 +839,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj=="1")) { $newmenu->add("/compta/localtax/index.php?leftmenu=tax_vat&mainmenu=accountancy&localTaxType=1",$langs->transcountry("LT1",$mysoc->country_code),1,$user->rights->tax->charges->lire); - if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/fiche.php?leftmenu=tax_vat&action=create&localTaxType=1",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); + if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/card.php?leftmenu=tax_vat&action=create&localTaxType=1",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/reglement.php?leftmenu=tax_vat&localTaxType=1",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_vat&localTaxType=1", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); @@ -848,7 +848,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj=="1")) { $newmenu->add("/compta/localtax/index.php?leftmenu=tax_vat&mainmenu=accountancy&localTaxType=2",$langs->transcountry("LT2",$mysoc->country_code),1,$user->rights->tax->charges->lire); - if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/fiche.php?leftmenu=tax_vat&action=create&localTaxType=2",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); + if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/card.php?leftmenu=tax_vat&action=create&localTaxType=2",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/reglement.php?leftmenu=tax_vat&localTaxType=2",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_vat&localTaxType=2", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if (empty($leftmenu) || preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); @@ -982,7 +982,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $newmenu->add("/compta/bank/index.php?leftmenu=bank&mainmenu=bank",$langs->trans("MenuBankCash"),0,$user->rights->banque->lire, '', $mainmenu, 'bank'); - $newmenu->add("/compta/bank/fiche.php?action=create",$langs->trans("MenuNewFinancialAccount"),1,$user->rights->banque->configurer); + $newmenu->add("/compta/bank/card.php?action=create",$langs->trans("MenuNewFinancialAccount"),1,$user->rights->banque->configurer); $newmenu->add("/compta/bank/categ.php",$langs->trans("Rubriques"),1,$user->rights->banque->configurer); $newmenu->add("/compta/bank/search.php",$langs->trans("ListTransactions"),1,$user->rights->banque->lire); @@ -1013,7 +1013,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)) { $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->cheque, '', $mainmenu, 'checks'); - $newmenu->add("/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque); + $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque); $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks&mainmenu=bank",$langs->trans("List"),1,$user->rights->banque->cheque); } @@ -1028,7 +1028,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->product->enabled)) { $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product'); - $newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); + $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); if (! empty($conf->propal->enabled)) { @@ -1044,7 +1044,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->service->enabled)) { $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service'); - $newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); + $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); if (! empty($conf->propal->enabled)) { @@ -1057,7 +1057,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - $newmenu->add("/categories/fiche.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + $newmenu->add("/categories/card.php?action=create&type=0", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -1066,7 +1066,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("stocks"); $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/fiche.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); + if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); @@ -1078,7 +1078,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("sendings"); $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings'); - $newmenu->add("/expedition/fiche.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); + $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); } @@ -1108,7 +1108,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("bills"); $newmenu->add("/fourn/facture/list.php?leftmenu=orders", $langs->trans("Bills"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'orders'); - $newmenu->add("/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer); + $newmenu->add("/fourn/facture/card.php?action=create",$langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer); $newmenu->add("/fourn/facture/paiement.php", $langs->trans("Payments"), 1, $user->rights->fournisseur->facture->lire); } @@ -1124,7 +1124,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - $newmenu->add("/categories/fiche.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + $newmenu->add("/categories/card.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -1141,12 +1141,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Project affected to user $newmenu->add("/projet/index.php?leftmenu=projects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'projects'); - $newmenu->add("/projet/fiche.php?leftmenu=projects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer); + $newmenu->add("/projet/card.php?leftmenu=projects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer); $newmenu->add("/projet/list.php?leftmenu=projects&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire); // All project i have permission on $newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire); - $newmenu->add("/projet/fiche.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer); + $newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer); $newmenu->add("/projet/list.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire); // Project affected to user @@ -1174,7 +1174,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("holiday"); $newmenu->add("/holiday/index.php?&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->write, '', $mainmenu, 'hrm'); - $newmenu->add("/holiday/fiche.php?&action=request", $langs->trans("MenuAddCP"), 1,$user->rights->holiday->write); + $newmenu->add("/holiday/card.php?&action=request", $langs->trans("MenuAddCP"), 1,$user->rights->holiday->write); $newmenu->add("/holiday/define_holiday.php?&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->define_holiday); $newmenu->add("/holiday/view_log.php?&action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->view_log); $newmenu->add("/holiday/month_report.php?&action=request", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->month_report); @@ -1185,7 +1185,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("trips"); $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses'); - $newmenu->add("/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->deplacement->creer); + $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->deplacement->creer); $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire); $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire); } @@ -1203,7 +1203,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("mails"); $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing'); - $newmenu->add("/comm/mailing/fiche.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer); + $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer); $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); } @@ -1234,7 +1234,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("compta"); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire, '', $mainmenu, 'members'); - $newmenu->add("/adherents/fiche.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer); + $newmenu->add("/adherents/card.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer); $newmenu->add("/adherents/list.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1",$langs->trans("MenuMembersToValidate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=1",$langs->trans("MenuMembersValidated"),2,$user->rights->adherent->lire); @@ -1253,7 +1253,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("categories"); $newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); - $newmenu->add("/categories/fiche.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + $newmenu->add("/categories/card.php?action=create&type=3", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } @@ -1294,7 +1294,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu while ($i < $numr) { $objp = $db->fetch_object($resql); - $newmenu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); + $newmenu->add('/compta/bank/card.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate { $newmenu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate); diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 2729234483f..3f8df87cd7a 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -158,7 +158,7 @@ class mailing_contacts1 extends MailingTargets */ function url($id) { - return ''.img_object('',"contact").''; + return ''.img_object('',"contact").''; } diff --git a/htdocs/core/modules/mailings/contacts2.modules.php b/htdocs/core/modules/mailings/contacts2.modules.php index 35d840125a7..fe49ce56b35 100644 --- a/htdocs/core/modules/mailings/contacts2.modules.php +++ b/htdocs/core/modules/mailings/contacts2.modules.php @@ -61,7 +61,7 @@ class mailing_contacts2 extends MailingTargets */ function url($id) { - return ''.img_object('',"contact").''; + return ''.img_object('',"contact").''; } /** diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index 327e36cf826..92640291088 100644 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -59,7 +59,7 @@ class mailing_contacts3 extends MailingTargets */ function url($id) { - return ''.img_object('',"contact").''; + return ''.img_object('',"contact").''; } /** diff --git a/htdocs/core/modules/mailings/contacts4.modules.php b/htdocs/core/modules/mailings/contacts4.modules.php index c86ca871c17..59355b372fe 100644 --- a/htdocs/core/modules/mailings/contacts4.modules.php +++ b/htdocs/core/modules/mailings/contacts4.modules.php @@ -59,7 +59,7 @@ class mailing_contacts4 extends MailingTargets */ function url($id) { - return ''.img_object('',"contact").''; + return ''.img_object('',"contact").''; } /** diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index aa76e6b9efc..dd6e18dfa91 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -140,7 +140,7 @@ class mailing_fraise extends MailingTargets */ function url($id) { - return ''.img_object('',"user").''; + return ''.img_object('',"user").''; } diff --git a/htdocs/core/modules/mailings/framboise.modules.php b/htdocs/core/modules/mailings/framboise.modules.php index 4572d894bac..d8f88ef766c 100644 --- a/htdocs/core/modules/mailings/framboise.modules.php +++ b/htdocs/core/modules/mailings/framboise.modules.php @@ -233,7 +233,7 @@ class mailing_framboise extends MailingTargets //$companystatic->id=$id; //$companystatic->nom=''; //return $companystatic->getNomUrl(1); // Url too long - return ''.img_object('',"user").''; + return ''.img_object('',"user").''; } } diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 61c3e2fb464..2c93b588524 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -129,7 +129,7 @@ class mailing_pomme extends MailingTargets */ function url($id) { - return ''.img_object('',"user").''; + return ''.img_object('',"user").''; } diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 8d7b930df08..7533018373a 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -214,7 +214,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'NewAction', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create', + 'url'=>'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create', 'langs'=>'commercial', 'position'=>101, 'perms'=>'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)', diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index eadfa84ba6c..e45b40a3f57 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -213,7 +213,7 @@ class modHoliday extends DolibarrModules 'titre'=>'MenuAddCP', 'mainmenu'=>'holiday', 'leftmenu'=>'holiday_add', - 'url'=>'/holiday/fiche.php?mainmenu=holiday&action=request', + 'url'=>'/holiday/card.php?mainmenu=holiday&action=request', 'langs'=>'holiday', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>101, 'enabled'=>'$conf->holiday->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 5d34ccfb19d..68a19c0bb73 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -60,7 +60,7 @@ $coldisplay=-1; // We remove first td fk_product > 0) { ?> - + product_type==1) echo img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/card.php similarity index 99% rename from htdocs/expedition/fiche.php rename to htdocs/expedition/card.php index de557cfcde1..9a12508ec18 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/card.php @@ -23,7 +23,7 @@ */ /** - * \file htdocs/expedition/fiche.php + * \file htdocs/expedition/card.php * \ingroup expedition * \brief Fiche descriptive d'une expedition */ @@ -207,7 +207,7 @@ if ($action == 'add') if (! $error) { $db->commit(); - header("Location: fiche.php?id=".$object->id); + header("Location: card.php?id=".$object->id); exit; } else @@ -226,7 +226,7 @@ else if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user- $result = $object->create_delivery($user); if ($result > 0) { - header("Location: ".DOL_URL_ROOT.'/livraison/fiche.php?id='.$result); + header("Location: ".DOL_URL_ROOT.'/livraison/card.php?id='.$result); exit; } else @@ -336,7 +336,7 @@ else if ($action == 'settrackingnumber' || $action == 'settrackingurl' { if ($object->update($user) >= 0) { - header("Location: fiche.php?id=".$object->id); + header("Location: card.php?id=".$object->id); exit; } setEventMessage($object->error,'errors'); @@ -634,11 +634,11 @@ if ($action == 'create') print '
'; if ($origin == 'commande' && ! empty($conf->commande->enabled)) { - print $langs->trans("RefOrder").''.img_object($langs->trans("ShowOrder"),'order').' '.$object->ref; + print $langs->trans("RefOrder").''.img_object($langs->trans("ShowOrder"),'order').' '.$object->ref; } if ($origin == 'propal' && ! empty($conf->propal->enabled)) { - print $langs->trans("RefProposal").''.img_object($langs->trans("ShowProposal"),'propal').' '.$object->ref; + print $langs->trans("RefProposal").''.img_object($langs->trans("ShowProposal"),'propal').' '.$object->ref; } print '
      -> - ".$value['fullpath']." + ".$value['fullpath']." (".$value['nb'].") ".$value['nb_total']."   ".$value['stock']." ".$img."
'; - print ''.$obj->nom.''; + print ''.$obj->nom.''; print ''; - if ($obj->commande_id) print ''.$obj->commande_ref.''; + if ($obj->commande_id) print ''.$obj->commande_ref.''; print '
'.img_object($langs->trans("ShowSending"),"sending").' '; + print '
'.img_object($langs->trans("ShowSending"),"sending").' '; print $obj->ref.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''; if ($obj->commande_id) { diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 0ad306ef8a3..07f004ca8d2 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -563,7 +563,7 @@ if ($id > 0 || ! empty($ref)) { $img=img_warning($langs->trans("StockTooLow")); } - print '
      -> '.$value['fullpath'].' ('.$value['nb'].')
      -> '.$value['fullpath'].' ('.$value['nb'].') '.$value['nb_total'].'  
- trans("ShowShipping"),"sending").' '.$object->ref; ?> date_creation,'day'); ?> date_delivery,'day'); ?> 0 || ! empty($ref)) // Client print "
".$langs->trans("Customer")."'; - print ''.$soc->nom.''; + print ''.$soc->nom.''; print '
- trans("ShowIntervention"),"intervention").' '.$object->ref; ?> datev,'day'); ?> getLibStatut(3); ?>
'.img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref.''.img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref.''; if ($obj->dc) { @@ -397,7 +397,7 @@ if ($object->fetch($id)) $var=!$var; print '
'; - print ''; + print ''; print img_object($langs->trans('ShowBill'),'bill').' '.$obj->ref_supplier.' '.dol_trunc($obj->libelle,14).''.dol_print_date($db->jdate($obj->df),'day').''.price($obj->amount).'
'; @@ -1968,7 +1968,7 @@ elseif (! empty($object->id)) * Receptionner (action=livraison) */ print '
'; - print ''; + print ''; print ''; print ''; print '
'; diff --git a/htdocs/fourn/commande/history.php b/htdocs/fourn/commande/history.php index e26bc867640..c864dce3b88 100644 --- a/htdocs/fourn/commande/history.php +++ b/htdocs/fourn/commande/history.php @@ -160,7 +160,7 @@ if ($id > 0 || ! empty($ref)) print '\n"; // User - print ''; // Comment diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index bd3b18fc87c..fd430ba4508 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -232,8 +232,8 @@ if (! empty($conf->fournisseur->enabled)) $obj = $db->fetch_object($resql); print ""; print '"; - print ''; + print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.""; + print ''; $i++; } } @@ -353,7 +353,7 @@ if ($resql) print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -421,7 +421,7 @@ print '
'.$commande->LibStatut($obj->fk_statut,4)."'; + print ''; print img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'
'; - print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'
'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'
'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.dol_print_date($db->jdate($obj->tms),'day').''.$commandestatic->LibStatut($obj->fk_statut,5).'
'; print '
'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.''; + print ''.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.''; $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->fournisseur->dir_output.'/commande' . '/' . dol_sanitizeFileName($obj->ref); print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); @@ -215,7 +215,7 @@ if ($resql) // Company - print ''.img_object($langs->trans("ShowCompany"),"company").' '; + print ''.img_object($langs->trans("ShowCompany"),"company").' '; print $obj->nom.'
- trans("ShowOrder"),"order").' '.$object->ref; ?> date,'day'); ?> rights->fournisseur->commande->lire) { diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 8764acdbda3..acdac3ab9a1 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -114,9 +114,9 @@ if ($result) print "
'.img_object($langs->trans("ShowContact"),"contact").' '.$obj->lastname.''.img_object($langs->trans("ShowContact"),"contact").' '.$obj->lastname.''.$obj->firstname.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''.$obj->email.''.$obj->phone.'
'.img_object($langs->trans('ShowPayment'),'payment').' '.dol_print_date($db->jdate($objp->dp),'day')."'.img_object($langs->trans('ShowPayment'),'payment').' '.dol_print_date($db->jdate($objp->dp),'day')."'; print $form->form_modes_reglement(null, $objp->paiement_type,'none').' '.$objp->num_paiement; print '
'.img_object($langs->trans('ShowPayment'),'payment').' '.$objp->pid.''.img_object($langs->trans('ShowPayment'),'payment').' '.$objp->pid.''.dol_print_date($db->jdate($objp->dp),'day')."
- trans("ShowBill"),"bill").' '.$object->ref; ?> date,'day'); ?> rights->fournisseur->facture->lire) { diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 01f4ad3b1bf..f0f825d3ff7 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -266,8 +266,8 @@ if ($resql) $var=!$var; print "
'.img_object($langs->trans("ShowSupplier"),"company").''; - print " socid."\">".$obj->nom."'.img_object($langs->trans("ShowSupplier"),"company").''; + print " socid."\">".$obj->nom."'.$obj->code_fournisseur.' '.dol_print_date($db->jdate($obj->tms),'day').'
'.img_object($langs->trans('ShowBill'),'bill').' '; + print ''.img_object($langs->trans('ShowBill'),'bill').' '; print ($objp->ref?$objp->ref:$objp->rowid); print "'.$objp->ref_supplier."'.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''.price($objp->total_ttc).'
rowid\">"; + print "rowid\">"; if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); - print " rowid\">$objp->ref $objp->label"; if ($objp->fk_product_type==1) print $langs->trans('ShowService'); diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 481e7d22771..89c3928f134 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -132,7 +132,7 @@ if ($resql) if ($num == 1 && (GETPOST("mode") == 'search')) { $objp = $db->fetch_object($resql); - header("Location: ".DOL_URL_ROOT."/product/fiche.php?id=".$objp->rowid); + header("Location: ".DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); exit; } diff --git a/htdocs/fourn/product/photos.php b/htdocs/fourn/product/photos.php index d60a4aab4d0..f20c360de6c 100644 --- a/htdocs/fourn/product/photos.php +++ b/htdocs/fourn/product/photos.php @@ -65,7 +65,7 @@ if ($id) $h=0; - $head[$h][0] = DOL_URL_ROOT."/fourn/product/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/fourn/product/card.php?id=".$object->id; $head[$h][1] = $langs->trans("Card"); $h++; @@ -89,7 +89,7 @@ if ($id) $h++; } - $head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/product/card.php?id=".$object->id; $head[$h][1] = $langs->trans("CommercialCard"); $h++; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 3d3fd9f2dcb..c09f52b8407 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -139,7 +139,7 @@ if ($socid > 0) print "
".dol_print_date($fac->date)."id\">".img_object($langs->trans("ShowBill"),"bill")." ".$fac->ref."id\">".img_object($langs->trans("ShowBill"),"bill")." ".$fac->ref."'.$fac->getLibStatut(2,$totalpaye).''.price($fac->total_ttc)."'.price($solde)."'.img_object($langs->trans("ShowUser"),'user').' '.$objf->login.''.img_object($langs->trans("ShowUser"),'user').' '.$objf->login.'
'.dol_print_date($db->jdate($objp->dp))."'; print '      '; // Decalage - print ''.img_object($langs->trans("ShowPayment"),"payment").' '.$langs->trans("Payment").' '.$objp->rowid.'  '.price($objp->amount).''.price($solde)."'.img_object($langs->trans("ShowUser"),'user').' '.$objp->login.''.img_object($langs->trans("ShowUser"),'user').' '.$objp->login.'
'; print ''; - print ''; + print ''; print '"; print "\n"; - print '\n"; print ''; @@ -300,7 +300,7 @@ if ($action == 'create') print ''; print ''; } @@ -372,7 +372,7 @@ if ($action == 'create') $label = (! empty($line->label)?$line->label:$product->label); print ''; } @@ -620,7 +620,7 @@ else $entrepot = new Entrepot($db); $entrepot->fetch($delivery->entrepot_id); print ''; - print ''; + print ''; print ''; } @@ -678,7 +678,7 @@ else print '\n"; - print ''; + print ''; print "\n"; print ""; diff --git a/htdocs/product/fiche.php b/htdocs/product/card.php similarity index 99% rename from htdocs/product/fiche.php rename to htdocs/product/card.php index 5cd4ca7103d..1ddc6dac50b 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/card.php @@ -27,7 +27,7 @@ */ /** - * \file htdocs/product/fiche.php + * \file htdocs/product/card.php * \ingroup product * \brief Page to show product */ @@ -652,7 +652,7 @@ if (empty($reshook)) if ($result > 0) { - header("Location: ".DOL_URL_ROOT."/commande/fiche.php?id=".$commande->id); + header("Location: ".DOL_URL_ROOT."/commande/card.php?id=".$commande->id); exit; } } @@ -1562,7 +1562,7 @@ $formquestionclone=array( if (($action == 'delete' && (empty($conf->use_javascript_ajax) || ! empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js || (! empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) // Always output when not jmobile nor js { - print $form->formconfirm("fiche.php?id=".$object->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete"); + print $form->formconfirm("card.php?id=".$object->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete"); } // Clone confirmation diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 8bd8632e2e1..13a6d1dfa41 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2798,7 +2798,7 @@ class Product extends CommonObject } else if ($option == 'composition') { - $lien = ''; + $lien = ''; $lienfin=''; } else if ($option == 'category') @@ -2807,7 +2807,7 @@ class Product extends CommonObject } else { - $lien = ''; + $lien = ''; $lienfin=''; } $newref=$this->ref; diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/card.php similarity index 98% rename from htdocs/product/composition/fiche.php rename to htdocs/product/composition/card.php index 47f7bf9c42a..efe03b0b024 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/card.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/product/composition/fiche.php + * \file htdocs/product/composition/card.php * \ingroup product * \brief Page de la fiche produit */ @@ -112,7 +112,7 @@ $cancel <> $langs->trans("Cancel") && if ($cancel == $langs->trans("Cancel")) { $action = ''; - header("Location: fiche.php?id=".$_POST["id"]); + header("Location: card.php?id=".$_POST["id"]); exit; } @@ -418,7 +418,7 @@ if ($id > 0 || ! empty($ref)) if (! empty($conf->categorie->enabled)) $rowspan++; print_fiche_titre($langs->trans("ProductToAddSearch"),'',''); - print ''; + print ''; print '
'.$langs->trans("Customer").''.$soc->nom.''.$soc->nom.''; @@ -290,7 +290,7 @@ if ($action == 'create') print "
".$langs->trans("Date")."".dol_print_date($commande->date,'dayhourtext')."'.$langs->trans("Order").''.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref.''; + print ''.$langs->trans("Order").''.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref.''; print "
'.$langs->trans("Warehouse").''; $ents = $entrepot->list_array(); - print ''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$ents[$_GET["entrepot_id"]].''; + print ''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$ents[$_GET["entrepot_id"]].''; print ''; - print ''.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.' - '.$label; + print ''.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.' - '.$label; if ($line->description) print nl2br($line->description); print '
'.$langs->trans("Warehouse").''.$entrepot->libelle.''.$entrepot->libelle.'
'; // Affiche ligne produit - $text = ''; + $text = ''; if ($delivery->lines[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service'); else $text.= img_object($langs->trans('ShowProduct'),'product'); $text.= ' '.$delivery->lines[$i]->product_ref.''; @@ -732,18 +732,18 @@ else if ($delivery->statut == 0 && $user->rights->expedition->livraison->valider && $num_prod > 0) { - print ''.$langs->trans("Validate").''; + print ''.$langs->trans("Validate").''; } if ($user->rights->expedition->livraison->supprimer) { if ($conf->expedition_bon->enabled) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index ffa17862939..62c089a22af 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -648,7 +648,7 @@ class Livraison extends CommonObject $urlOption=''; - $lien = ''; + $lien = ''; $lienfin=''; $picto='sending'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6c3ed0db3bc..18d1b7d4e4e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1402,7 +1402,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a $companylink=' ('.$thirdpartystatic->getNomUrl('','').')'; $company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')'; } - $logintext=''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client.""; print dol_print_date($db->jdate($objp->datef),'day')."
"; - print ''; // User - print ''; + print ''; // Action if ($user->rights->produit->supprimer) { diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index eaad17afd40..d9b3538eb72 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -173,7 +173,7 @@ if ($resql) if ($num == 1 && ($sall or $snom or $sref)) { $objp = $db->fetch_object($resql); - header("Location: fiche.php?id=$objp->rowid"); + header("Location: card.php?id=$objp->rowid"); exit; } diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/card.php similarity index 99% rename from htdocs/product/stats/fiche.php rename to htdocs/product/stats/card.php index 8b366a40958..9600e6c0a44 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/product/stats/fiche.php + * \file htdocs/product/stats/card.php * \ingroup product * \brief Page of product statistics */ diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 97e9a612ae1..82483d59805 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -164,10 +164,10 @@ if ($id > 0 || ! empty($ref)) $var=!$var; print ""; - print '\n"; - print ''; + print ''; print "\n"; print ""; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 22e3e2b30ba..f9056187cec 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -163,7 +163,7 @@ if ($id > 0 || ! empty($ref)) print ""; print '\n"; print "\n"; - print ''; + print ''; print "\n"; print '"; print "\n"; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 518daf2b8f1..60d3b9b50c8 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -170,10 +170,10 @@ if ($id > 0 || ! empty($ref)) $var=!$var; print ""; - print '\n"; - print ''; + print ''; print "\n"; print ""; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 6f717dd4e73..376263e122d 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -169,7 +169,7 @@ if ($id > 0 || ! empty($ref)) $invoicestatic->ref=$objp->facnumber; print $invoicestatic->getNomUrl(1); print "\n"; - print ''; + print ''; print "\n"; print '"; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 4cbeaec7e76..2f1d37602ce 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -172,7 +172,7 @@ if ($id > 0 || ! empty($ref)) $supplierinvoicestatic->ref=$objp->facnumber; print $supplierinvoicestatic->getNomUrl(1); print "\n"; - print ''; + print ''; print "\n"; print ""; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index e9a78f18b05..ad81e93e299 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -160,7 +160,7 @@ if ($id > 0 || ! empty($ref)) print ''."\n"; - print ''; + print ''; print '"; print "\n"; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/card.php similarity index 97% rename from htdocs/product/stock/fiche.php rename to htdocs/product/stock/card.php index 366f3b040b8..950b9b4e82b 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/card.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/product/stock/fiche.php + * \file htdocs/product/stock/card.php * \ingroup stock * \brief Page fiche entrepot */ @@ -73,7 +73,7 @@ if ($action == 'add' && $user->rights->stock->creer) $id = $object->create($user); if ($id > 0) { - header("Location: fiche.php?id=".$id); + header("Location: card.php?id=".$id); exit; } @@ -159,7 +159,7 @@ if ($action == 'create') { print_fiche_titre($langs->trans("NewWarehouse")); - print "\n"; + print "\n"; print ''; print ''; print ''."\n"; @@ -336,12 +336,12 @@ else if (empty($action)) { if ($user->rights->stock->creer) - print "id."\">".$langs->trans("Modify").""; + print "id."\">".$langs->trans("Modify").""; else print "".$langs->trans("Modify").""; if ($user->rights->stock->supprimer) - print "id."\">".$langs->trans("Delete").""; + print "id."\">".$langs->trans("Delete").""; else print "".$langs->trans("Delete").""; } @@ -491,7 +491,7 @@ else { $langs->trans("WarehouseEdit"); - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 78d4cc55a4e..fb3882c3bad 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -513,7 +513,7 @@ class Entrepot extends CommonObject $result=''; - $lien=''; + $lien=''; $lienfin=''; if ($withpicto) $result.=($lien.img_object($langs->trans("ShowStock"),'stock').$lienfin.' '); diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index faea23ab770..d2078d473e7 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -89,7 +89,7 @@ if ($result) $objp = $db->fetch_object($result); $var=!$var; print ""; - print "\n"; + print "\n"; print ''; print "\n"; $i++; @@ -146,10 +146,10 @@ if ($resql) $var=!$var; print ""; print ''; - print "\n"; - print '\n"; print '"; - print ''; + print ''; // Location print ''; // PMP value diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 5ebb36a7054..d0b0d5d4f53 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -260,7 +260,7 @@ if ($resql) $var = !$var; if (!dispatched($obj->rowid) && (!$sproduct || in_array($sproduct, getProducts($obj->rowid)))) { - $href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid; + $href = DOL_URL_ROOT . '/fourn/commande/card.php?id=' . $obj->rowid; print ''. // Ref ''; // Company - $href = DOL_URL_ROOT . '/fourn/fiche.php?socid=' . $obj->socid; + $href = DOL_URL_ROOT . '/fourn/card.php?socid=' . $obj->socid; print '"; - print ''; + print ''; print ''; // PMP value print ''; print ''; print ''; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 1ad1eeceed5..b25129580ff 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -160,7 +160,7 @@ if ($socid) { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) { - print ''.$langs->trans("AddAction").''; + print ''.$langs->trans("AddAction").''; } else { diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 27630fa4dfe..f076812d9e2 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -242,14 +242,14 @@ abstract class ActionsCardCommon if ( $this->object->client == 1 ) { - header("Location: ".DOL_URL_ROOT."/comm/fiche.php?socid=".$this->object->id); + header("Location: ".DOL_URL_ROOT."/comm/card.php?socid=".$this->object->id); return; } else { if ( $this->object->fournisseur == 1 ) { - header("Location: ".DOL_URL_ROOT."/fourn/fiche.php?socid=".$this->object->id); + header("Location: ".DOL_URL_ROOT."/fourn/card.php?socid=".$this->object->id); return; } else diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index cfd37436b72..071f0ff9b65 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1685,15 +1685,15 @@ class Societe extends CommonObject if ($option == 'customer' || $option == 'compta') { - $lien = 'global->SOCIETE_DISABLE_PROSPECTS)) { - $lien = ''; + print ''; print img_object($langs->trans("ShowUser"),"user").' '; print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n"; print ' '; @@ -253,7 +253,7 @@ if ($_GET["socid"]) $obj = $db->fetch_object($resql); $var=!$var; print "'; - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/societe/notify/index.php b/htdocs/societe/notify/index.php index 457542d21f3..1832e7851ea 100644 --- a/htdocs/societe/notify/index.php +++ b/htdocs/societe/notify/index.php @@ -94,7 +94,7 @@ if ($result) $var=!$var; print ""; - print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 8317a628c6a..cf801c0b3dd 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -340,8 +340,8 @@ if (empty($reshook)) else { $url=$_SERVER["PHP_SELF"]."?socid=".$object->id; - if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/fiche.php?socid=".$object->id; - else if ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/fiche.php?socid=".$object->id; + if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/card.php?socid=".$object->id; + else if ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; header("Location: ".$url); exit; diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 60e114be6a5..9e82e1a052f 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -254,7 +254,7 @@ if ($id > 0 || ! empty($ref)) print "\n"; // Lastname - print "'; print ''."\n"; @@ -1574,7 +1574,7 @@ else print '"; print ''; diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index d0766655d6a..547a89d3451 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -101,7 +101,7 @@ if ($resql) $var=!$var; print ""; - print '"; - print '"; - print '"; - print ' - + From 7aecce526a640ca25561ac9a448714cbf3a852a4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 20 Sep 2014 09:11:50 +0200 Subject: [PATCH 13/36] Better accountancy auto find accountacty code feature (work with several accountacy plan) --- htdocs/accountancy/customer/list.php | 5 +++-- htdocs/accountancy/supplier/list.php | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index fefed420621..fa7fc5de6e8 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -112,8 +112,9 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "facture as f"; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_sell = aa.account_number"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version"; $sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation = 0"; - +$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL)"; if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; } @@ -219,7 +220,7 @@ if ($result) { // Colonne choix ligne a ventiler print ''; print ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 259dc5aab39..2b24e4a4b09 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -114,7 +114,9 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f"; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_buy = aa.account_number"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version"; $sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation = 0"; +$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL)"; if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; @@ -199,7 +201,7 @@ if ($result) { print ''; // Colonne choix ligne a ventiler print ''; print ""; From 565de5258f4d9e1a3ee9d22bb0a12ef0d436475d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 20 Sep 2014 09:19:26 +0200 Subject: [PATCH 14/36] Re-Add subtotal line on compta report (accidentaly remove before) --- htdocs/compta/resultat/clientfourn.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index d55930ef80f..e400a9efd8f 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -601,6 +601,11 @@ else { dol_print_error($db); } +print ''; +if ($modecompta == 'CREANCES-DETTES') + print ''; +print ''; +print ''; /* * Dunning @@ -633,8 +638,8 @@ if ($result) $total_ht += $obj->amount; $total_ttc += $obj->amount; - $subtotal_ht -= $obj->amount; - $subtotal_ttc -= $obj->amount; + $subtotal_ht += $obj->amount; + $subtotal_ttc += $obj->amount; $var = !$var; print ""; @@ -661,8 +666,8 @@ else } print ''; if ($modecompta == 'CREANCES-DETTES') - print ''; -print ''; + print ''; +print ''; print ''; /* From 119be5da421e26da258eaa5c9633a79663476f9a Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 20 Sep 2014 10:14:26 +0200 Subject: [PATCH 15/36] Better ressource management on project and task --- htdocs/langs/en_US/projects.lang | 2 ++ htdocs/langs/fr_FR/projects.lang | 4 ++- htdocs/projet/class/project.class.php | 46 +++++++++++++++++++++++---- htdocs/projet/element.php | 17 ++++++++-- htdocs/projet/tasks.php | 3 +- htdocs/projet/tasks/contact.php | 10 +++--- htdocs/projet/tasks/task.php | 4 +-- htdocs/projet/tasks/time.php | 29 +++++++++++------ 8 files changed, 87 insertions(+), 28 deletions(-) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 55970f0b35c..75bc4a29f5a 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -120,6 +120,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +UnlinkElement=Unlink element # Documents models DocumentModelBaleine=A complete project's report model (logo...) PlannedWorkload = Planned workload @@ -128,3 +129,4 @@ ProjectReferers=Refering objects SearchAProject=Search a project ProjectMustBeValidatedFirst=Project must be validated first ProjectDraft=Draft projects +FirstAddRessourceToAllocateTime=Associate a ressource to allocate time \ No newline at end of file diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index e76a2777161..52fd913ee29 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -119,7 +119,8 @@ TypeContact_project_task_external_TASKEXECUTIVE=Responsable TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributeur TypeContact_project_task_external_TASKCONTRIBUTOR=Contributeur SelectElement=Séléctionnez l'élément -AddElement=Link to element +AddElement=Associer l'élément +UnlinkElement=Délier l'element # Documents models DocumentModelBaleine=Modèle de rapport de projet complet (logo...) PlannedWorkload = Charge de travail prévue @@ -128,3 +129,4 @@ ProjectReferers=Objets associés SearchAProject=Rechercher un projet ProjectMustBeValidatedFirst=Le projet doit être validé d'abord ProjectDraft=Projets brouillons +FirstAddRessourceToAllocateTime=Associer une ressource pour allouer du temps consomée \ No newline at end of file diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 8cbaea46c39..40ef5248a7b 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -322,6 +322,7 @@ class Project extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->socid = $obj->fk_soc; + $this->societe=(object)array();// To avoid warning on next line $this->societe->id = $obj->fk_soc; // TODO For backward compatibility $this->user_author_id = $obj->fk_user_creat; $this->public = $obj->public; @@ -1276,23 +1277,23 @@ class Project extends CommonObject /** * Associate element to a project * - * @param string $TableName Table of the element to update - * @param int $ElementSelectId Key-rowid of the line of the element to update + * @param string $tableName Table of the element to update + * @param int $elementSelectId Key-rowid of the line of the element to update * @return int 1 if OK or < 0 if KO */ - function update_element($TableName, $ElementSelectId) + function update_element($tableName, $elementSelectId) { - $sql="UPDATE ".MAIN_DB_PREFIX.$TableName; + $sql="UPDATE ".MAIN_DB_PREFIX.$tableName; if ($TableName=="actioncomm") { $sql.= " SET fk_project=".$this->id; - $sql.= " WHERE id=".$ElementSelectId; + $sql.= " WHERE id=".$elementSelectId; } else { $sql.= " SET fk_projet=".$this->id; - $sql.= " WHERE rowid=".$ElementSelectId; + $sql.= " WHERE rowid=".$elementSelectId; } dol_syslog(get_class($this)."::update_element", LOG_DEBUG); @@ -1305,5 +1306,38 @@ class Project extends CommonObject } } + + /** + * Associate element to a project + * + * @param string $tableName Table of the element to update + * @param int $elementSelectId Key-rowid of the line of the element to update + * @return int 1 if OK or < 0 if KO + */ + function remove_element($tableName, $elementSelectId) + { + $sql="UPDATE ".MAIN_DB_PREFIX.$tableName; + + if ($TableName=="actioncomm") + { + $sql.= " SET fk_project=NULL"; + $sql.= " WHERE id=".$elementSelectId; + } + else + { + $sql.= " SET fk_projet=NULL"; + $sql.= " WHERE rowid=".$elementSelectId; + } + + dol_syslog(get_class($this)."::remove_element", LOG_DEBUG); + $resql=$this->db->query($sql); + if (!$resql) { + $this->error=$this->db->lasterror(); + return -1; + }else { + return 1; + } + + } } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index b5a1d089c96..da4de04b8bc 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -215,6 +215,15 @@ if ($action=="addelement") if ($result<0) { setEventMessage($mailchimp->error,'errors'); } +}elseif ($action == "unlink") { + + $tablename = GETPOST("tablename"); + $elementselectid = GETPOST("elementselect"); + + $result = $project->remove_element($tablename, $elementselectid); + if ($result < 0) { + setEventMessage($project->error, 'errors'); + } } foreach ($listofreferent as $key => $value) @@ -247,7 +256,7 @@ foreach ($listofreferent as $key => $value) print '
'; print ''; print $langs->trans("KeywordFilter").'   '; @@ -444,7 +444,7 @@ if ($id > 0 || ! empty($ref)) if ($action == 'search') { print '
'; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index cd4cf11e80c..ebcd3245e7d 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -210,7 +210,7 @@ else if ($num == 1 && ($sall || $snom || $sref || $sbarcode) && $action != 'list') { $objp = $db->fetch_object($resql); - header("Location: fiche.php?id=".$objp->rowid); + header("Location: card.php?id=".$objp->rowid); exit; } diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index 523926d5084..8607cfeeb8e 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -141,7 +141,7 @@ if ($result) $var=!$var; print "
'; + print ''; if ($objp->type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print " "; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index cc566e3ba6d..6971a5bb125 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -801,7 +801,7 @@ if ($result) { print '' . price($objp->price_min_ttc) . '' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . '' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . '
'.img_object($langs->trans("ShowOrder"),"order").' '; + print ''.img_object($langs->trans("ShowOrder"),"order").' '; print $objp->ref; print "'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client.""; print dol_print_date($db->jdate($objp->date_commande))."
'.$commandestatic->getNomUrl(1)."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client."'.dol_print_date($db->jdate($objp->date_commande))."".$objp->qty."
'.img_object($langs->trans("ShowContract"),"contract").' '; + print ''.img_object($langs->trans("ShowContract"),"contract").' '; print $objp->rowid; print "'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client.""; print dol_print_date($db->jdate($objp->date_contrat))."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client."'; print dol_print_date($db->jdate($objp->datef),'day')."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client.""; print dol_print_date($db->jdate($objp->datef))."'.img_object($langs->trans("ShowPropal"),"propal").' '; print $objp->ref; print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; print dol_print_date($db->jdate($objp->datep))."".$objp->qty."
rowid\">".img_object($langs->trans("ShowStock"),"stock")." ".$objp->label."rowid\">".img_object($langs->trans("ShowStock"),"stock")." ".$objp->label."'.$entrepot->LibStatut($objp->statut,5).'
'.dol_print_date($db->jdate($objp->datem),'dayhour').'rowid\">"; + print "rowid\">"; print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit; print "'; + print ''; print img_object($langs->trans("ShowWarehouse"),"stock").' '.$objp->stock; print "'; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index c63e4cfc898..0d7b3c60c23 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -104,7 +104,7 @@ if ($result) { $objp = $db->fetch_object($result); print "
'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.''.$objp->lieu.'
'. @@ -269,7 +269,7 @@ if ($resql) ''. ''. img_object($langs->trans('ShowCompany'), 'company'). ' '. diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 03c779c0991..6f5cb7ae578 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -103,7 +103,7 @@ if ($result) { $objp = $db->fetch_object($result); print "
'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.''.$objp->lieu.''; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/card.php similarity index 96% rename from htdocs/projet/fiche.php rename to htdocs/projet/card.php index 978e142b1ad..e801598b530 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/projet/fiche.php + * \file htdocs/projet/card.php * \ingroup projet * \brief Project card */ @@ -171,7 +171,7 @@ if (empty($reshook)) { $db->commit(); - header("Location:fiche.php?id=".$object->id); + header("Location:card.php?id=".$object->id); exit; } else @@ -685,7 +685,7 @@ else { if ($userWrite > 0) { - print ''.$langs->trans("Valid").''; + print ''.$langs->trans("Valid").''; } else { @@ -698,7 +698,7 @@ else { if ($userWrite > 0) { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; } else { @@ -711,7 +711,7 @@ else { if ($userWrite > 0) { - print ''.$langs->trans("Close").''; + print ''.$langs->trans("Close").''; } else { @@ -724,7 +724,7 @@ else { if ($userWrite > 0) { - print ''.$langs->trans("ReOpen").''; + print ''.$langs->trans("ReOpen").''; } else { @@ -737,7 +737,7 @@ else { if ($userWrite > 0) { - print ''.$langs->trans('ToClone').''; + print ''.$langs->trans('ToClone').''; } else { @@ -750,7 +750,7 @@ else { if ($userDelete > 0) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } else { diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 8cbaea46c39..00eb39ac3c9 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -759,7 +759,7 @@ class Project extends CommonObject } else { - $lien = ''; + $lien = ''; $lienfin = ''; } } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 52149da9039..8899f3891e8 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -350,7 +350,7 @@ foreach ($listofreferent as $key => $value) } if ($key == 'order' && ! empty($conf->commande->enabled) && $user->rights->commande->creer) { - print ''.$langs->trans("AddCustomerOrder").''; + print ''.$langs->trans("AddCustomerOrder").''; } if ($key == 'invoice' && ! empty($conf->facture->enabled) && $user->rights->facture->creer) { @@ -361,11 +361,11 @@ foreach ($listofreferent as $key => $value) { if ($key == 'order_supplier' && ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->creer) { - print ''.$langs->trans("AddSupplierInvoice").''; + print ''.$langs->trans("AddSupplierInvoice").''; } if ($key == 'invoice_supplier' && ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->creer) { - print ''.$langs->trans("AddSupplierOrder").''; + print ''.$langs->trans("AddSupplierOrder").''; } } } diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index d986c1ca079..7e324841af2 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -222,7 +222,7 @@ if ( $resql ) $projectstatic->ref=$obj->ref; $projectstatic->title=$obj->title; print $projectstatic->getNomUrl(1,'',16); - //print ''.$obj->title.''; + //print ''.$obj->title.''; print ''.$obj->label.''.dol_print_date($db->jdate($obj->dateo)).'
"; - print ''; + print ''; print img_object($langs->trans("ShowUser"),"user").' '; print dolGetFirstLastname($obj->firstname, $obj->lastname)."\n"; print ''; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/card.php similarity index 98% rename from htdocs/societe/notify/fiche.php rename to htdocs/societe/notify/card.php index 0f1b7c010f9..8604b229134 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/card.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/societe/notify/fiche.php + * \file htdocs/societe/notify/card.php * \ingroup societe notification * \brief Tab for notifications of third party */ @@ -321,7 +321,7 @@ if ($result > 0) if ($obj->type == 'email') print $langs->trans("Email"); if ($obj->type == 'sms') print $langs->trans("SMS"); print ''.img_delete().''.img_delete().'
socid."\">".$obj->nom."socid."\">".$obj->nom."".dolGetFirstLastname($obj->firstname, $obj->lastname)."".$obj->titre."
rowid\">"; + print "rowid\">"; print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); diff --git a/htdocs/user/fiche.php b/htdocs/user/card.php similarity index 98% rename from htdocs/user/fiche.php rename to htdocs/user/card.php index ffe6336bc41..996d7e7440d 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/card.php @@ -25,7 +25,7 @@ */ /** - * \file htdocs/user/fiche.php + * \file htdocs/user/card.php * \brief Tab of user card */ @@ -1068,7 +1068,7 @@ else */ if ($action == 'password') { - print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1); + print $form->formconfirm("card.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1); } /* @@ -1076,7 +1076,7 @@ else */ if ($action == 'passwordsend') { - print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1); + print $form->formconfirm("card.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1); } /* @@ -1084,7 +1084,7 @@ else */ if ($action == 'disable') { - print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1); + print $form->formconfirm("card.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1); } /* @@ -1092,7 +1092,7 @@ else */ if ($action == 'enable') { - print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1); + print $form->formconfirm("card.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1); } /* @@ -1100,7 +1100,7 @@ else */ if ($action == 'delete') { - print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); + print $form->formconfirm("card.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); } /* @@ -1352,7 +1352,7 @@ else $contact->fetch($object->contact_id); if ($object->societe_id > 0) print ' / '; else print '
'; - print '
'.img_object($langs->trans("ShowContact"),'contact').' '.dol_trunc($contact->getFullName($langs),32).''; + print ''.img_object($langs->trans("ShowContact"),'contact').' '.dol_trunc($contact->getFullName($langs),32).''; } print '
'; if ($caneditgroup) { - print ''.img_object($langs->trans("ShowGroup"),"group").' '.$group->name.''; + print ''.img_object($langs->trans("ShowGroup"),"group").' '.$group->name.''; } else { @@ -2029,7 +2029,7 @@ else { $contact = new Contact($db); $contact->fetch($object->contact_id); - print ' / '.img_object($langs->trans("ShowContact"),'contact').' '.dol_trunc($contact->getFullName($langs),32).''; + print ' / '.img_object($langs->trans("ShowContact"),'contact').' '.dol_trunc($contact->getFullName($langs),32).''; } } else diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 0e4c5596194..5177bb3dbed 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1775,7 +1775,7 @@ class User extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($withpicto) @@ -1800,12 +1800,12 @@ class User extends CommonObject $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($option == 'xxx') { - $lien = ''; + $lien = ''; $lienfin=''; } diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/card.php similarity index 98% rename from htdocs/user/group/fiche.php rename to htdocs/user/group/card.php index f97ef35ae6e..c5f8ef6ad89 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/card.php @@ -20,7 +20,7 @@ */ /** - * \file htdocs/user/group/fiche.php + * \file htdocs/user/group/card.php * \brief Onglet groupes utilisateurs */ @@ -412,7 +412,7 @@ else print "
'; - print ''.img_object($langs->trans("ShowUser"),"user").' '.$useringroup->login.''; + print ''.img_object($langs->trans("ShowUser"),"user").' '.$useringroup->login.''; if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"),'redstar'); else if ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star'); print '
'.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.''; + print ''.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.''; if (! $obj->entity) { print img_picto($langs->trans("GlobalGroup"),'redstar'); diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 824f505fddd..c888dcdf632 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -26,7 +26,7 @@ require '../main.inc.php'; if (! $user->rights->user->user->lire && ! $user->admin) { // Redirection vers la page de l'utilisateur - header("Location: fiche.php?id=".$user->id); + header("Location: card.php?id=".$user->id); exit; } @@ -129,7 +129,7 @@ if ($resql) $var=!$var; print "
'.img_object($langs->trans("ShowUser"),"user").' '.dolGetFirstLastname($obj->firstname,$obj->lastname).''; + print ''.img_object($langs->trans("ShowUser"),"user").' '.dolGetFirstLastname($obj->firstname,$obj->lastname).''; if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity) { print img_picto($langs->trans("SuperAdministrator"),'redstar'); @@ -230,7 +230,7 @@ if ($canreadperms) $var=!$var; print "
'.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.''; + print ''.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.''; if (! $obj->entity) { print img_picto($langs->trans("GlobalGroup"),'redstar'); diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 8b7ba96a7f3..30b0c9b3a8e 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -145,7 +145,7 @@ if ($result) $var=!$var; print "
'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.''; + print ''.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.''; if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity) { print img_picto($langs->trans("SuperAdministrator"),'redstar'); diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index b1577cb26a2..1de66b491ed 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -226,7 +226,7 @@ if ($resql) { //Update status communication of thirdparty prospect $sqlx = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$obj2->rowid.")"; - dol_syslog("fiche.php: set prospect thirdparty status", LOG_DEBUG); + dol_syslog("card.php: set prospect thirdparty status", LOG_DEBUG); $resqlx=$db->query($sqlx); if (! $resqlx) { @@ -236,7 +236,7 @@ if ($resql) //Update status communication of contact prospect $sqlx = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj2->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; - dol_syslog("fiche.php: set prospect contact status", LOG_DEBUG); + dol_syslog("card.php: set prospect contact status", LOG_DEBUG); $resqlx=$db->query($sqlx); if (! $resqlx) diff --git a/test/selenium/test_thirdparty.xml b/test/selenium/test_thirdparty.xml index 47a9b8091a9..dbc24905cbf 100644 --- a/test/selenium/test_thirdparty.xml +++ b/test/selenium/test_thirdparty.xml @@ -13,7 +13,7 @@
open/dolibarrnew/fourn/fiche.php?socid=14/dolibarrnew/fourn/card.php?socid=14
'; - print 'code_sell ? "checked" : "") . '/>'; + print 'aarowid ? "checked" : "") . '/>'; print '
'; - print 'code_buy ? "checked" : "") . '/>'; + print 'aarowid ? "checked" : "") . '/>'; print '
'.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
 
'.price(-$subtotal_ht).''.price(-$subtotal_ttc).''.price($subtotal_ht).''.price($subtotal_ttc).'
'; print ''; - print ''; + print ''; print ''; print ''; if (empty($value['disableamount'])) print ''; @@ -276,7 +285,9 @@ foreach ($listofreferent as $key => $value) $var=!$var; print ""; - + print '\n"; // Ref print ''; + print ''; if (empty($value['disableamount'])) print ''; if (empty($value['disableamount'])) print ''; print ''; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 994779fcac9..e037a7ea9ec 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -300,7 +300,8 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print ''; // Date start diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 3cc8b51ca1a..da002ef72d2 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -155,7 +155,7 @@ if ($id > 0 || ! empty($ref)) if ($object->fetch($id) > 0) { $result=$projectstatic->fetch($object->fk_project); - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); $object->project = dol_clone($projectstatic); @@ -179,7 +179,7 @@ if ($id > 0 || ! empty($ref)) // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { - $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,0); + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0); $projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")"; } print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); @@ -188,7 +188,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; @@ -239,7 +239,7 @@ if ($id > 0 || ! empty($ref)) print '"; print ''; } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 7337c152f4e..0ec0ab2cbe2 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -202,7 +202,7 @@ if ($id > 0 || ! empty($ref)) $res=$object->fetch_optionals($object->id,$extralabels); $result=$projectstatic->fetch($object->fk_project); - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); $object->project = dol_clone($projectstatic); @@ -235,7 +235,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 56048ad1cf2..5c790df32f0 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -195,7 +195,7 @@ if ($id > 0 || ! empty($ref)) if ($object->fetch($id) >= 0) { $result=$projectstatic->fetch($object->fk_project); - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); $object->project = dol_clone($projectstatic); @@ -230,7 +230,7 @@ if ($id > 0 || ! empty($ref)) // Thirdparty print ''; print ''; @@ -302,7 +302,7 @@ if ($id > 0 || ! empty($ref)) // Third party print ''; } @@ -345,13 +345,14 @@ if ($id > 0 || ! empty($ref)) // Contributor print ''; // Note @@ -440,7 +441,15 @@ if ($id > 0 || ! empty($ref)) print '\n"; + + // Other attributes + $parameters=array('object' => $object, 'colspan' => ' colspan="2"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields,'edit'); + } + print "
'.$langs->trans("Ref").''.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("ThirdParty").''.$langs->trans("AmountHT").'
'; + print '' . img_picto($langs->trans('Unlink'), 'editdelete') . ''; + print "'; print $element->getNomUrl(1); @@ -326,7 +337,7 @@ foreach ($listofreferent as $key => $value) } } - print '
'.$langs->trans("Number").': '.$i.'
'.$langs->trans("Number").': '.$i.''.$langs->trans("TotalHT").' : '.price($total_ht).''.$langs->trans("TotalTTC").' : '.price($total_ttc).' 
'.$langs->trans("AffectedTo").''; - print $form->select_dolusers($user->id,'userid',1); + $contactsofproject=$object->getListContactId('internal'); + $form->select_users($user->id,'userid',0,'',0,'',$contactsofproject); print '
'.$langs->trans("Label").''.$projectstatic->title.'
'.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thridparty->id)) print $projectstatic->thridparty->getNomUrl(1); else print ' '; print '
'.$langs->trans('Ref').''; if (! GETPOST('withproject') || empty($projectstatic->id)) { - $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1); + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); $object->next_prev_filter=" fk_projet in (".$projectsListId.")"; } else $object->next_prev_filter=" fk_projet = ".$projectstatic->id; @@ -259,7 +259,7 @@ if ($id > 0 || ! empty($ref)) // Customer print "
".$langs->trans("ThirdParty")."'; - if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thridparty->id > 0) print $projectstatic->thridparty->getNomUrl(1); else print ' '; print '
'.$langs->trans("Label").''.$projectstatic->title.'
'.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print '
'.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print '
'.$langs->trans("ThirdParty").''; - if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thirdparty->id) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print '
'; - $restrictaddtimetocontactoftask=0; - if (empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS)) - { - $restrictaddtimetocontactoftask=$object->getListContactId('internal'); - } print img_object('','user'); - print $form->select_dolusers($_POST["userid"]?$_POST["userid"]:$user->id,'userid',0,'',0,'',$restrictaddtimetocontactoftask); // Note: If user is not allowed it will be disabled into combo list and userid not posted + $contactsoftask=$object->getListContactId('internal'); + if (count($contactsoftask)>0) { + $userid=$contactsoftask[0]; + $form->select_users($userid,'userid',0,'',0,'',$contactsoftask); + }else { + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); + } print ''; if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) { - print $form->select_dolusers($task_time->fk_user,'userid_line'); + $contactsoftask=$object->getListContactId('internal'); + if (!in_array($task_time->fk_user,$contactsoftask)) { + $contactsoftask[]=$task_time->fk_user; + } + if (count($contactsoftask)>0) { + $form->select_users($task_time->fk_user,'userid_line',0,'',0,'',$contactsoftask); + }else { + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); + } } else { From 3602155c5e334f8d8247e57ade3754d136bda8f8 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 20 Sep 2014 10:28:59 +0200 Subject: [PATCH 16/36] Fix FicheInterTest Call --- test/phpunit/AllTests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index a8a554ca25d..eb3c1a56abb 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -126,7 +126,7 @@ class AllTests require_once dirname(__FILE__).'/ContratTest.php'; $suite->addTestSuite('ContratTest'); - require_once dirname(__FILE__).'/FichinterTest.php'; + require_once dirname(__FILE__).'/FichInterTest.php'; $suite->addTestSuite('FichinterTest'); require_once dirname(__FILE__).'/PropalTest.php'; From bf7f4c1cabc32018278e37f6bfae373070b208bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 21 Sep 2014 18:16:14 +0200 Subject: [PATCH 17/36] Refactored generateDocument functions --- htdocs/comm/propal/class/propal.class.php | 72 +---------------- htdocs/commande/class/commande.class.php | 72 +---------------- htdocs/compta/facture/class/facture.class.php | 77 +----------------- htdocs/contrat/class/contrat.class.php | 70 +--------------- htdocs/core/class/commonobject.class.php | 81 +++++++++++++++++++ htdocs/expedition/class/expedition.class.php | 77 +----------------- htdocs/livraison/class/livraison.class.php | 70 +--------------- htdocs/projet/class/project.class.php | 70 +--------------- htdocs/projet/class/task.class.php | 71 +--------------- 9 files changed, 98 insertions(+), 562 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index cb1046f86ee..7140dd9d361 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2690,10 +2690,6 @@ class Propal extends CommonObject $langs->load("propale"); - $error=0; - - $srctemplatepath=''; - // Positionne le modele sur le nom du modele a utiliser if (! dol_strlen($modele)) { @@ -2707,73 +2703,9 @@ class Propal extends CommonObject } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/propale/doc/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/propale/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - //$obj->message = $message; - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - // Success in building document. We build meta file. - dol_meta_create($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db,"propal_pdf_create Error: ".$obj->error); - return -1; - } - - } - else - { - dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); - return -1; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index dd4505ecc95..4b1cf9e32e6 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3028,10 +3028,6 @@ class Commande extends CommonOrder $langs->load("orders"); - $error=0; - - $srctemplatepath=''; - // Positionne le modele sur le nom du modele a utiliser if (! dol_strlen($modele)) { @@ -3045,73 +3041,9 @@ class Commande extends CommonOrder } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/commande/doc/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/commande/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - //$obj->message = $message; - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - // Success in building document. We build meta file. - dol_meta_create($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db,"order_pdf_create Error: ".$obj->error); - return -1; - } - - } - else - { - dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); - return -1; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 2752f3d1e0d..f5d20936052 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3238,16 +3238,6 @@ class Facture extends CommonInvoice $langs->load("bills"); - $error=0; - - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); - - $srctemplatepath=''; - // Positionne le modele sur le nom du modele a utiliser if (! dol_strlen($modele)) { @@ -3261,72 +3251,9 @@ class Facture extends CommonInvoice } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/facture/doc/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/facture/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - // Success in building document. We build meta file. - dol_meta_create($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db,"facture_pdf_create Error: ".$obj->error); - return -1; - } - - } - else - { - dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); - return -1; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 7861846c4a4..da92f68065b 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2356,10 +2356,6 @@ class ContratLigne extends CommonObject $langs->load("contracts"); - $error=0; - - $srctemplatepath=''; - // Positionne modele sur le nom du modele de contrat a utiliser if (! dol_strlen($modele)) { @@ -2373,71 +2369,9 @@ class ContratLigne extends CommonObject } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/contract/doc/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/contract/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - // Success in building document. We build meta file. - dol_meta_create($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db,"contract_pdf_create Error: ".$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1059d1af07d..ebd5cb98a76 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3475,4 +3475,85 @@ abstract class CommonObject return $result; } + protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref) + { + global $conf, $langs; + + $srctemplatepath=''; + + // Increase limit for PDF build + $err=error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); + + // If selected modele is a filename template (then $modele="modelname:filename") + $tmp=explode(':',$modele,2); + if (! empty($tmp[1])) + { + $modele=$tmp[0]; + $srctemplatepath=$tmp[1]; + } + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + foreach(array('doc','pdf') as $prefix) + { + $file = $prefix."_".$modele.".modules.php"; + + // On verifie l'emplacement du modele + $file=dol_buildpath($reldir.$modelspath.$file,0); + if (file_exists($file)) + { + $filefound=1; + $classname=$prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } + + // Charge le modele + if ($filefound) + { + require_once $file; + + $obj = new $classname($this->db); + //$obj->message = $message; + + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output=$outputlangs->charset_output; + if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) + { + $outputlangs->charset_output=$sav_charset_output; + + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); + + // Success in building document. We build meta file. + dol_meta_create($this); + + return 1; + } + else + { + $outputlangs->charset_output=$sav_charset_output; + dol_print_error($this->db,"Error generating document for ".__CLASS__.". Error: ".$obj->error); + return -1; + } + + } + else + { + dol_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file)); + return -1; + } + } + } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index ebadc9d0f4e..9aea7ada0eb 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1546,10 +1546,6 @@ class Expedition extends CommonObject $langs->load("sendings"); - $error=0; - - $srctemplatepath=''; - // Sets the model on the model name to use if (! dol_strlen($modele)) { @@ -1563,78 +1559,9 @@ class Expedition extends CommonObject } } - // If selected model is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/expedition/doc/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // We check the model location - $file=dol_buildpath($reldir."core/modules/expedition/doc/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Load the model - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - - $result=$this->fetch_origin(); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - //require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - //dol_delete_preview($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans expedition_pdf_create"); - dol_print_error($this->db,$obj->error); - return 0; - } - } - else - { - if (! $conf->global->EXPEDITION_ADDON_PDF) - { - print $langs->trans("Error")." ".$langs->trans("Error_EXPEDITION_ADDON_PDF_NotDefined"); - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - } - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, 0, 0, 0); } } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 3fa7cc3eadc..9fa7c261ac7 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -940,10 +940,6 @@ class Livraison extends CommonObject $langs->load("deliveries"); - $error=0; - - $srctemplatepath=''; - // Positionne modele sur le nom du modele de bon de livraison a utiliser if (! dol_strlen($modele)) { @@ -957,73 +953,11 @@ class Livraison extends CommonObject } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/livraison/pdf/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/livraison/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this,$outputlangs) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans delivery_order_pdf_create"); - dol_print_error($this->db,$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, 0, 0, 0); } - - } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 4cc130f548b..b1317748493 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1323,10 +1323,6 @@ class Project extends CommonObject $langs->load("projects"); - $error=0; - - $srctemplatepath=''; - // Positionne modele sur le nom du modele de projet a utiliser if (! dol_strlen($modele)) { @@ -1340,71 +1336,9 @@ class Project extends CommonObject } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/project/pdf/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/project/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - // Success in building document. We build meta file. - dol_meta_create($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db,"project_pdf_create Error: ".$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 5bc94d740f7..2f4cc85cf7f 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1327,12 +1327,9 @@ class Task extends CommonObject public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { global $conf,$langs; + $langs->load("projects"); - $error=0; - - $srctemplatepath=''; - // Positionne modele sur le nom du modele de projet a utiliser if (! dol_strlen($modele)) { @@ -1346,71 +1343,9 @@ class Task extends CommonObject } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/project/task/pdf/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // On verifie l'emplacement du modele - $file=dol_buildpath($reldir."core/modules/project/task/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Charge le modele - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db); - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - // Success in building document. We build meta file. - dol_meta_create($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_print_error($this->db,"task_pdf_create Error: ".$obj->error); - return 0; - } - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } From e97a84102b8c611f6e1fbd1a415d55b30b99644d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 21 Sep 2014 18:49:44 +0200 Subject: [PATCH 18/36] Fixed syntax error in commande document generation --- htdocs/commande/fiche.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 8e2f1c5595e..da67a55c4e3 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -959,7 +959,7 @@ else if ($action == 'confirm_modif' && $user->rights->commande->creer) { } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } @@ -1025,7 +1025,7 @@ else if ($action == 'up' && $user->rights->commande->creer) { } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $object->generateDocument($object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); @@ -1047,7 +1047,7 @@ else if ($action == 'down' && $user->rights->commande->creer) { $outputlangs->setDefaultLang($newlang); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $object->generateDocument($object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); From 13f91a645c5343ac40576d3d693ed11f129580a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 21 Sep 2014 19:07:01 +0200 Subject: [PATCH 19/36] Fixed syntax error problem --- htdocs/expedition/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index b618ac59a80..073918471db 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1598,7 +1598,7 @@ else if ($id || $ref) // Build document if it not exists if (! $file || ! is_readable($file)) { - $result = $object->generateDocument(GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref)); + $result = $object->generateDocument(GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db,$result); From cec74644106c6d28e39e4122eb2f55791f9923a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Sep 2014 20:13:38 +0200 Subject: [PATCH 20/36] Fix: case into phpunit test case --- test/phpunit/{FichInterTest.php => FichinterTest.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/phpunit/{FichInterTest.php => FichinterTest.php} (100%) diff --git a/test/phpunit/FichInterTest.php b/test/phpunit/FichinterTest.php similarity index 100% rename from test/phpunit/FichInterTest.php rename to test/phpunit/FichinterTest.php From e147259e955edd3d7c1ae29d118b086a7c928b30 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 21 Sep 2014 20:30:55 +0200 Subject: [PATCH 21/36] Renamed all constants COMPTA_* into ACCOUNTING_* and migration of module ACCOUNTINGEX 3.6 --- htdocs/accountancy/admin/index.php | 20 +++++++-------- htdocs/accountancy/admin/productaccount.php | 8 +++--- htdocs/accountancy/customer/list.php | 8 +++--- htdocs/accountancy/journal/bankjournal.php | 16 ++++++------ htdocs/accountancy/journal/cashjournal.php | 16 ++++++------ .../accountancy/journal/purchasesjournal.php | 15 +++++------ htdocs/accountancy/journal/sellsjournal.php | 15 +++++------ htdocs/admin/compta.php | 24 +++++++++--------- htdocs/admin/salaries.php | 2 +- htdocs/compta/journal/purchasesjournal.php | 9 +++---- htdocs/compta/journal/sellsjournal.php | 9 +++---- htdocs/compta/resultat/clientfourn.php | 2 +- htdocs/compta/resultat/index.php | 2 +- htdocs/compta/stats/cabyprodserv.php | 2 +- htdocs/compta/stats/cabyuser.php | 2 +- htdocs/compta/stats/casoc.php | 2 +- htdocs/compta/stats/index.php | 2 +- htdocs/compta/tva/quadri.php | 6 ++--- htdocs/core/class/conf.class.php | 4 +-- .../install/mysql/migration/3.6.0-3.7.0.sql | 25 +++++++++++++++++++ htdocs/langs/ar_SA/compta.lang | 16 ++++++------ htdocs/langs/bg_BG/compta.lang | 16 ++++++------ htdocs/langs/bs_BA/compta.lang | 16 ++++++------ htdocs/langs/ca_ES/compta.lang | 16 ++++++------ htdocs/langs/cs_CZ/compta.lang | 16 ++++++------ htdocs/langs/da_DK/compta.lang | 16 ++++++------ htdocs/langs/de_DE/compta.lang | 16 ++++++------ htdocs/langs/el_GR/compta.lang | 16 ++++++------ htdocs/langs/en_US/accountancy.lang | 8 +++--- htdocs/langs/en_US/compta.lang | 16 ++++++------ htdocs/langs/es_DO/compta.lang | 4 +-- htdocs/langs/es_ES/accountancy.lang | 8 +++--- htdocs/langs/es_ES/compta.lang | 16 ++++++------ htdocs/langs/es_HN/compta.lang | 2 +- htdocs/langs/es_PE/compta.lang | 2 +- htdocs/langs/es_PR/compta.lang | 2 +- htdocs/langs/et_EE/compta.lang | 16 ++++++------ htdocs/langs/eu_ES/compta.lang | 16 ++++++------ htdocs/langs/fa_IR/compta.lang | 16 ++++++------ htdocs/langs/fi_FI/compta.lang | 16 ++++++------ htdocs/langs/fr_FR/accountancy.lang | 8 +++--- htdocs/langs/fr_FR/compta.lang | 16 ++++++------ htdocs/langs/he_IL/compta.lang | 16 ++++++------ htdocs/langs/hr_HR/compta.lang | 16 ++++++------ htdocs/langs/hu_HU/compta.lang | 16 ++++++------ htdocs/langs/id_ID/compta.lang | 16 ++++++------ htdocs/langs/is_IS/compta.lang | 16 ++++++------ htdocs/langs/it_IT/compta.lang | 16 ++++++------ htdocs/langs/ja_JP/compta.lang | 16 ++++++------ htdocs/langs/ko_KR/compta.lang | 16 ++++++------ htdocs/langs/lt_LT/compta.lang | 16 ++++++------ htdocs/langs/lv_LV/compta.lang | 16 ++++++------ htdocs/langs/mk_MK/compta.lang | 16 ++++++------ htdocs/langs/nb_NO/compta.lang | 16 ++++++------ htdocs/langs/nl_NL/compta.lang | 16 ++++++------ htdocs/langs/pl_PL/compta.lang | 16 ++++++------ htdocs/langs/pt_BR/compta.lang | 16 ++++++------ htdocs/langs/pt_PT/compta.lang | 16 ++++++------ htdocs/langs/ro_RO/compta.lang | 16 ++++++------ htdocs/langs/ru_RU/compta.lang | 16 ++++++------ htdocs/langs/sk_SK/compta.lang | 16 ++++++------ htdocs/langs/sl_SI/compta.lang | 16 ++++++------ htdocs/langs/sq_AL/compta.lang | 16 ++++++------ htdocs/langs/sv_SE/compta.lang | 16 ++++++------ htdocs/langs/th_TH/compta.lang | 16 ++++++------ htdocs/langs/tr_TR/compta.lang | 16 ++++++------ htdocs/langs/uk_UA/compta.lang | 16 ++++++------ htdocs/langs/uz_UZ/compta.lang | 16 ++++++------ htdocs/langs/vi_VN/compta.lang | 16 ++++++------ htdocs/langs/zh_CN/compta.lang | 16 ++++++------ htdocs/langs/zh_TW/compta.lang | 16 ++++++------ 71 files changed, 472 insertions(+), 455 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 02cb262b209..a61eb4852bd 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -44,17 +44,17 @@ if (!$user->admin) $action = GETPOST('action', 'alpha'); -// Other parameters COMPTA_* & ACCOUNTING_* +// Other parameters ACCOUNTING_* $list = array ( 'ACCOUNTING_LIMIT_LIST_VENTILATION', 'ACCOUNTING_LENGTH_GACCOUNT', 'ACCOUNTING_LENGTH_AACCOUNT', - 'COMPTA_ACCOUNT_CUSTOMER', - 'COMPTA_ACCOUNT_SUPPLIER', - 'COMPTA_PRODUCT_BUY_ACCOUNT', - 'COMPTA_PRODUCT_SOLD_ACCOUNT', - 'COMPTA_SERVICE_BUY_ACCOUNT', - 'COMPTA_SERVICE_SOLD_ACCOUNT', + 'ACCOUNTING_ACCOUNT_CUSTOMER', + 'ACCOUNTING_ACCOUNT_SUPPLIER', + 'ACCOUNTING_PRODUCT_BUY_ACCOUNT', + 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT', + 'ACCOUNTING_SERVICE_BUY_ACCOUNT', + 'ACCOUNTING_SERVICE_SOLD_ACCOUNT', 'ACCOUNTING_ACCOUNT_SUSPENSE', 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' ); @@ -63,7 +63,7 @@ $list = array ( * Actions */ -$compta_mode = defined('COMPTA_MODE')?COMPTA_MODE:'RECETTES-DEPENSES'; +$compta_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; if ($action == 'update') { @@ -78,7 +78,7 @@ if ($action == 'update') if (in_array($compta_mode,$compta_modes)) { - if (!dolibarr_set_const($db, 'COMPTA_MODE', $compta_mode, 'chaine', 0, '', $conf->entity)) { + if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $compta_mode, 'chaine', 0, '', $conf->entity)) { $error++; } } else { @@ -160,7 +160,7 @@ print ''; print ''; -// Cas du parametre COMPTA_MODE +// Cas du parametre ACCOUNTING_MODE print ''; print ''; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 0b06a3d0daa..5c1cba946ee 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -98,17 +98,17 @@ if ($resql) { $compta_prodsell = $obj->accountancy_code_sell; if (empty($compta_prodsell)) { if ($obj->product_type == 0) - $compta_prodsell = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT) ? $conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); else - $compta_prodsell = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT) ? $conf->global->COMPTA_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); } $compta_prodbuy = $obj->accountancy_code_buy; if (empty($compta_prodbuy)) { if ($obj->product_type == 0) - $compta_prodbuy = (! empty($conf->global->COMPTA_PRODUCT_BUY_ACCOUNT) ? $conf->global->COMPTA_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); else - $compta_prodbuy = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT) ? $conf->global->COMPTA_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); } $product_static = new Product($db); diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index fefed420621..225bffdfcb8 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -168,17 +168,17 @@ if ($result) { if (! empty($objp->type)) { if ($objp->type == 1) { - $objp->code_sell = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT) ? $conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $objp->code_sell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); } else { - $objp->code_sell = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT) ? $conf->global->COMPTA_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $objp->code_sell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); } } else { $code_sell_notset = 'color:blue'; if ($objp->type == 1) { - $objp->code_sell = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT) ? $conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $objp->code_sell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); } else { - $objp->code_sell = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT) ? $conf->global->COMPTA_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $objp->code_sell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); } } } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 82c3a09e20a..537dc3476fd 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -129,8 +129,8 @@ if ($result) { $num = $db->num_rows($result); // Variables - $cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef")); - $cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); + $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef")); + $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); $cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef")); $accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef")); @@ -349,7 +349,7 @@ if ($action == 'writeBookKeeping') { $bookkeeping->doc_ref = $objmid->facnumber; } $bookkeeping->code_tiers = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; } else if ($tabtype[$key] == 'payment_supplier') { $sqlmid = 'SELECT facf.facnumber'; @@ -364,7 +364,7 @@ if ($action == 'writeBookKeeping') { $bookkeeping->doc_ref = $objmid->facnumber; } $bookkeeping->code_tiers = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_SUPPLIER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; } else if ($tabtype[$key] == 'company') { $sqlmid = 'SELECT fac.facnumber'; @@ -379,11 +379,11 @@ if ($action == 'writeBookKeeping') { $bookkeeping->doc_ref = $objmid->facnumber; } $bookkeeping->code_tiers = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; } else { $bookkeeping->doc_ref = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; } $result = $bookkeeping->create(); @@ -434,9 +434,9 @@ if ($action == 'export_csv') { print $date . $sep; print $conf->global->ACCOUNTING_BANK_JOURNAL . $sep; if ($val["lib"] == '(SupplierInvoicePayment)') { - print length_accountg($conf->global->COMPTA_ACCOUNT_SUPPLIER) . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep; } else { - print length_accountg($conf->global->COMPTA_ACCOUNT_CUSTOMER) . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep; } print length_accounta(html_entity_decode($k)) . $sep; print ($mt < 0 ? 'D' : 'C') . $sep; diff --git a/htdocs/accountancy/journal/cashjournal.php b/htdocs/accountancy/journal/cashjournal.php index 33b1e4359c1..52cdbb4f616 100644 --- a/htdocs/accountancy/journal/cashjournal.php +++ b/htdocs/accountancy/journal/cashjournal.php @@ -121,8 +121,8 @@ if ($result) { $num = $db->num_rows($result); // les variables - $cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef")); - $cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); + $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef")); + $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); $cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef")); $cptsociale = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef")); @@ -318,7 +318,7 @@ if ($action == 'writeBookKeeping') { $bookkeeping->doc_ref = $objmid->facnumber; } $bookkeeping->code_tiers = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; } else if ($tabtype[$key] == 'payment_supplier') { $sqlmid = 'SELECT facf.facnumber'; @@ -333,7 +333,7 @@ if ($action == 'writeBookKeeping') { $bookkeeping->doc_ref = $objmid->facnumber; } $bookkeeping->code_tiers = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_SUPPLIER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; } else if ($tabtype[$key] == 'company') { $sqlmid = 'SELECT fac.facnumber'; @@ -348,11 +348,11 @@ if ($action == 'writeBookKeeping') { $bookkeeping->doc_ref = $objmid->facnumber; } $bookkeeping->code_tiers = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; } else { $bookkeeping->doc_ref = $k; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; } $result = $bookkeeping->create(); @@ -399,9 +399,9 @@ if ($action == 'export_csv') { print $date . $sep; print $conf->global->ACCOUNTING_CASH_JOURNAL . $sep; if ($obj->label == '(SupplierInvoicePayment)') { - print length_accountg($conf->global->COMPTA_ACCOUNT_SUPPLIER) . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep; } else { - print length_accountg($conf->global->COMPTA_ACCOUNT_CUSTOMER) . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep; } print length_accounta(html_entity_decode($k)) . $sep; print ($mt < 0 ? 'D' : 'C') . $sep; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index c9d21f5d9be..789aa1111af 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -111,8 +111,8 @@ $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); // les variables - $cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER)) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"); - $cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT)) ? $conf->global->COMPTA_VAT_ACCOUNT : $langs->trans("CodeNotDef"); + $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_ACCOUNT : $langs->trans("CodeNotDef"); $tabfac = array (); $tabht = array (); @@ -128,9 +128,9 @@ if ($result) { $compta_prod = $obj->compte; if (empty($compta_prod)) { if ($obj->product_type == 0) - $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_BUY_ACCOUNT)) ? $conf->global->COMPTA_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"); + $compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"); else - $compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT)) ? $conf->global->COMPTA_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"); + $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"); } $compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva); @@ -174,7 +174,7 @@ if ($action == 'writebookkeeping') { $bookkeeping->fk_docdet = $val["fk_facturefourndet"]; $bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur']; $bookkeeping->label_compte = $tabcompany[$key]['name']; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_SUPPLIER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt <= 0) ? $mt : 0; @@ -288,7 +288,7 @@ if ($action == 'export_csv') { } print $date . $sep; print $conf->global->ACCOUNTING_PURCHASE_JOURNAL . $sep; - print length_accountg($conf->global->COMPTA_ACCOUNT_SUPPLIER) . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep; foreach ( $tabttc[$key] as $k => $mt ) { print length_accounta(html_entity_decode($k)) . $sep; @@ -416,7 +416,6 @@ if ($action == 'export_csv') { foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { print ""; - // print ""; print ""; print ""; print ""; @@ -431,7 +430,6 @@ if ($action == 'export_csv') { foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { print ""; - // print ""; print ""; print ""; print ""; @@ -443,7 +441,6 @@ if ($action == 'export_csv') { print ""; // Third party - // print ""; print ""; print ""; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 79444fbca60..a7c0266998f 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -125,17 +125,17 @@ if ($result) { while ( $i < $num ) { $obj = $db->fetch_object($result); // les variables - $cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER)) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"); + $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"); $compta_soc = (! empty($obj->code_compta)) ? $obj->code_compta : $cptcli; $compta_prod = $obj->compte; if (empty($compta_prod)) { if ($obj->product_type == 0) - $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT)) ? $conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); + $compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); else - $compta_prod = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT)) ? $conf->global->COMPTA_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); + $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); } - $cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT)) ? $conf->global->COMPTA_VAT_ACCOUNT : $langs->trans("CodeNotDef"); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_ACCOUNT : $langs->trans("CodeNotDef"); $compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva); // Invoice lines @@ -183,7 +183,7 @@ if ($action == 'writebookkeeping') { $bookkeeping->fk_doc = $key; $bookkeeping->fk_docdet = $val["fk_facturedet"]; $bookkeeping->code_tiers = $tabcompany[$key]['code_client']; - $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_CUSTOMER; + $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; $bookkeeping->label_compte = $tabcompany[$key]['name']; $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt >= 0) ? 'D' : 'C'; @@ -267,7 +267,7 @@ if ($action == 'export_csv') { print $date . $sep; print $conf->global->ACCOUNTING_SELL_JOURNAL . $sep; - print length_accountg($conf->global->COMPTA_ACCOUNT_CUSTOMER) . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep; foreach ( $tabttc[$key] as $k => $mt ) { print length_accounta(html_entity_decode($k)) . $sep; print ($mt < 0 ? 'C' : 'D') . $sep; @@ -422,7 +422,6 @@ if ($action == 'export_csv') { print ""; // Third party - // print ""; print ""; print ""; foreach ( $tabttc[$key] as $k => $mt ) { @@ -441,7 +440,6 @@ if ($action == 'export_csv') { foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { print ""; - // print ""; print ""; print ""; print ""; @@ -457,7 +455,6 @@ if ($action == 'export_csv') { foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { print ""; - // print ""; print ""; print ""; print ""; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 5c77149c0f0..0bb83eae3c4 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -37,23 +37,23 @@ accessforbidden(); $action = GETPOST('action','alpha'); -// Other parameters COMPTA_* +// Other parameters ACCOUNTING_* $list = array( - 'COMPTA_PRODUCT_BUY_ACCOUNT', - 'COMPTA_PRODUCT_SOLD_ACCOUNT', - 'COMPTA_SERVICE_BUY_ACCOUNT', - 'COMPTA_SERVICE_SOLD_ACCOUNT', - 'COMPTA_VAT_ACCOUNT', - 'COMPTA_VAT_BUY_ACCOUNT', - 'COMPTA_ACCOUNT_CUSTOMER', - 'COMPTA_ACCOUNT_SUPPLIER' + 'ACCOUNTING_PRODUCT_BUY_ACCOUNT', + 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT', + 'ACCOUNTING_SERVICE_BUY_ACCOUNT', + 'ACCOUNTING_SERVICE_SOLD_ACCOUNT', + 'ACCOUNTING_VAT_ACCOUNT', + 'ACCOUNTING_VAT_BUY_ACCOUNT', + 'ACCOUNTING_ACCOUNT_CUSTOMER', + 'ACCOUNTING_ACCOUNT_SUPPLIER' ); /* * Actions */ -$compta_mode = defined('COMPTA_MODE')?COMPTA_MODE:'RECETTES-DEPENSES'; +$compta_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; if ($action == 'update') { @@ -69,7 +69,7 @@ if ($action == 'update') if (in_array($compta_mode,$compta_modes)) { - if (!dolibarr_set_const($db, 'COMPTA_MODE', $compta_mode, 'chaine', 0, '', $conf->entity)) { + if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $compta_mode, 'chaine', 0, '', $conf->entity)) { $error++; } } else { @@ -113,7 +113,7 @@ print ''; print '
'.$langs->trans('OptionMode').''.$langs->trans('Description').'
".$conf->global->COMPTA_JOURNAL_BUY."" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "
".$conf->global->COMPTA_JOURNAL_BUY."" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "" . $langs->trans("VAT") . "
".$conf->global->COMPTA_JOURNAL_BUY."" . $date . "" . $invoicestatic->getNomUrl(1) . "
".$conf->global->COMPTA_JOURNAL_SELL."" . $date . "" . $invoicestatic->getNomUrl(1) . "
".$conf->global->COMPTA_JOURNAL_SELL."" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "
".$conf->global->COMPTA_JOURNAL_SELL."" . $date . "" . $invoicestatic->getNomUrl(1) . "" . length_accountg($k) . "
'; -// Cas du parametre COMPTA_MODE +// Cas du parametre ACCOUNTING_MODE print ''; print ''; diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index 453db8e4203..d7027d8a1dd 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -36,7 +36,7 @@ if (!$user->admin) $action = GETPOST('action', 'alpha'); -// Other parameters COMPTA_* & ACCOUNTING_* +// Other parameters SALARIES_* $list = array ( 'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT', 'SALARIES_ACCOUNTING_ACCOUNT_CHARGE' diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 169fb32010a..34cf525104a 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -122,8 +122,8 @@ if ($result) { $num = $db->num_rows($result); // les variables - $cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER)?$conf->global->COMPTA_ACCOUNT_SUPPLIER:$langs->trans("CodeNotDef")); - $cpttva = (! empty($conf->global->COMPTA_VAT_BUY_ACCOUNT)?$conf->global->COMPTA_VAT_BUY_ACCOUNT:$langs->trans("CodeNotDef")); + $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)?$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER:$langs->trans("CodeNotDef")); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)?$conf->global->ACCOUNTING_VAT_BUY_ACCOUNT:$langs->trans("CodeNotDef")); $tabfac = array(); $tabht = array(); @@ -142,8 +142,8 @@ if ($result) $compta_prod = $obj->accountancy_code_buy; if (empty($compta_prod)) { - if($obj->product_type == 0) $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_BUY_ACCOUNT)?$conf->global->COMPTA_PRODUCT_BUY_ACCOUNT:$langs->trans("CodeNotDef")); - else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT)?$conf->global->COMPTA_SERVICE_BUY_ACCOUNT:$langs->trans("CodeNotDef")); + if($obj->product_type == 0) $compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT)?$conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT:$langs->trans("CodeNotDef")); + else $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)?$conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT:$langs->trans("CodeNotDef")); } $compta_tva = (! empty($obj->account_tva)?$obj->account_tva:$cpttva); $compta_localtax1 = (! empty($obj->account_localtax1)?$obj->account_localtax1:$langs->trans("CodeNotDef")); @@ -230,7 +230,6 @@ foreach ($tabfac as $key => $val) if (isset($line['nomtcheck']) || $mt) { print ""; - //print ""; print ""; print ""; print ""; diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index f90add66b54..e249d3fe554 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -141,15 +141,15 @@ if ($result) { $obj = $db->fetch_object($result); // les variables - $cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER)?$conf->global->COMPTA_ACCOUNT_CUSTOMER:$langs->trans("CodeNotDef")); + $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)?$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER:$langs->trans("CodeNotDef")); $compta_soc = (! empty($obj->code_compta)?$obj->code_compta:$cptcli); $compta_prod = $obj->accountancy_code_sell; if (empty($compta_prod)) { - if($obj->product_type == 0) $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT)?$conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); - else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT)?$conf->global->COMPTA_SERVICE_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); + if($obj->product_type == 0) $compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT)?$conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); + else $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT)?$conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); } - $cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT)?$conf->global->COMPTA_VAT_ACCOUNT:$langs->trans("CodeNotDef")); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)?$conf->global->ACCOUNTING_VAT_ACCOUNT:$langs->trans("CodeNotDef")); $compta_tva = (! empty($obj->account_tva)?$obj->account_tva:$cpttva); $account_localtax1=getLocalTaxesFromRate($obj->tva_tx, 1, $obj->thirdparty, $mysoc); @@ -240,7 +240,6 @@ foreach ($tabfac as $key => $val) if (isset($line['nomtcheck']) || $mt) { print ""; - //print ""; print ""; print ""; print ""; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 08ae52a3d51..abad47cf443 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -99,7 +99,7 @@ else } // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta=(GETPOST("modecompta")?GETPOST("modecompta"):$conf->global->COMPTA_MODE); +$modecompta=(GETPOST("modecompta")?GETPOST("modecompta"):$conf->global->ACCOUNTING_MODE); /* diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 05c3a93e011..1fecc0e1c28 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -48,7 +48,7 @@ if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accountin // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta=(GETPOST("modecompta")?GETPOST("modecompta"):$conf->global->COMPTA_MODE); +$modecompta=(GETPOST("modecompta")?GETPOST("modecompta"):$conf->global->ACCOUNTING_MODE); /* diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index aa1047934f5..e995ee45d54 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -39,7 +39,7 @@ if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta' if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport'); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta = $conf->global->COMPTA_MODE; +$modecompta = $conf->global->ACCOUNTING_MODE; if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); $sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 04cf00b4388..e88d370a0c6 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -36,7 +36,7 @@ if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta' if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport'); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta = $conf->global->COMPTA_MODE; +$modecompta = $conf->global->ACCOUNTING_MODE; if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); $sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index cea623a144b..1d34f78a181 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -34,7 +34,7 @@ $langs->load("companies"); $langs->load("categories"); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta = $conf->global->COMPTA_MODE; +$modecompta = $conf->global->ACCOUNTING_MODE; if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); $sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 59a7e478f9b..69fdeff849c 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -38,7 +38,7 @@ else { $userid=GETPOST('userid','int'); $socid = GETPOST('socid','int'); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') -$modecompta = $conf->global->COMPTA_MODE; +$modecompta = $conf->global->ACCOUNTING_MODE; if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"]; // Security check diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index d991ac8ac88..f5d0065e7f3 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -60,7 +60,7 @@ function tva_coll($db,$y,$q) { global $conf; - if ($conf->global->COMPTA_MODE == "CREANCES-DETTES") + if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") { // if vat paid on due invoices $sql = "SELECT d.fk_facture as facid, f.facnumber as facnum, d.tva_tx as rate, d.total_ht as totalht, d.total_tva as amount"; @@ -128,7 +128,7 @@ function tva_paye($db, $y,$q) { global $conf; - if ($conf->global->COMPTA_MODE == "CREANCES-DETTES") + if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") { // Si on paye la tva sur les factures dues (non brouillon) $sql = "SELECT d.fk_facture_fourn as facid, f.facnumber as facnum, d.tva_tx as rate, d.total_ht as totalht, d.tva as amount"; @@ -212,7 +212,7 @@ print ""; print ""; print "\n"; -if ($conf->global->COMPTA_MODE == "CREANCES-DETTES") +if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") { $y = $year_current; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index b6225de2913..8a17273435e 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -370,8 +370,8 @@ class Conf if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE='EUR'; $this->currency=$this->global->MAIN_MONNAIE; - // conf->global->COMPTA_MODE = Option des modules Comptabilites (simple ou expert). Defini le mode de calcul des etats comptables (CA,...) - if (empty($this->global->COMPTA_MODE)) $this->global->COMPTA_MODE='RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES' + // conf->global->ACCOUNTING_MODE = Option des modules Comptabilites (simple ou expert). Defini le mode de calcul des etats comptables (CA,...) + if (empty($this->global->ACCOUNTING_MODE)) $this->global->ACCOUNTING_MODE='RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES' // conf->liste_limit = constante de taille maximale des listes if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25; diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 24cb1a6203d..d444b003541 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -77,6 +77,31 @@ ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; ALTER TABLE llx_accountingaccount add column fk_user_author integer DEFAULT NULL AFTER label; ALTER TABLE llx_accountingaccount add column fk_user_modif integer DEFAULT NULL AFTER fk_user_author; +-- Qual +UPDATE llx_const SET name = 'ACCOUNTING_MODE' WHERE name = 'COMPTA_MODE'; +UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_CUSTOMER' WHERE name = 'COMPTA_ACCOUNT_CUSTOMER'; +UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUPPLIER' WHERE name = 'COMPTA_ACCOUNT_SUPPLIER'; +UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_BUY_ACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_SOLD_ACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_BUY_ACCOUNT' WHERE name = 'COMPTA_SERVICE_BUY_ACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT' WHERE name = 'COMPTA_SERVICE_SOLD_ACCOUNT'; + +-- Compatibility with module Accounting Expert +UPDATE llx_const SET name = 'ACCOUNTING_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV'; +UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUSPENSE' WHERE name = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE'; +UPDATE llx_const SET name = 'ACCOUNTING_SELL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SELL_JOURNAL'; +UPDATE llx_const SET name = 'ACCOUNTING_PURCHASE_JOURNAL' WHERE name = 'ACCOUNTINGEX_PURCHASE_JOURNAL'; +UPDATE llx_const SET name = 'ACCOUNTING_SOCIAL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SOCIAL_JOURNAL'; +UPDATE llx_const SET name = 'ACCOUNTING_CASH_JOURNAL' WHERE name = 'ACCOUNTINGEX_CASH_JOURNAL'; +UPDATE llx_const SET name = 'ACCOUNTING_MISCELLANEOUS_JOURNAL' WHERE name = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL'; +UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' WHERE name = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH'; +UPDATE llx_const SET name = 'ACCOUNTING_MODELCSV' WHERE name = 'ACCOUNTINGEX_MODELCSV'; +UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_GACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_GACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_AACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_AACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_LIMIT_LIST_VENTILATION' WHERE name = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION'; +UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_TODO' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO'; +UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_DONE' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE'; + -- Drop old table DROP TABLE llx_compta; DROP TABLE llx_compta_account; diff --git a/htdocs/langs/ar_SA/compta.lang b/htdocs/langs/ar_SA/compta.lang index 2d307a8aefc..f0f62dc224f 100644 --- a/htdocs/langs/ar_SA/compta.lang +++ b/htdocs/langs/ar_SA/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/bg_BG/compta.lang b/htdocs/langs/bg_BG/compta.lang index 92759e243bb..03427b5e2ae 100644 --- a/htdocs/langs/bg_BG/compta.lang +++ b/htdocs/langs/bg_BG/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/bs_BA/compta.lang b/htdocs/langs/bs_BA/compta.lang index f63bcd65b3c..2ea31a467d3 100644 --- a/htdocs/langs/bs_BA/compta.lang +++ b/htdocs/langs/bs_BA/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/ca_ES/compta.lang b/htdocs/langs/ca_ES/compta.lang index aee43830170..c70bfcf75da 100644 --- a/htdocs/langs/ca_ES/compta.lang +++ b/htdocs/langs/ca_ES/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/cs_CZ/compta.lang b/htdocs/langs/cs_CZ/compta.lang index 83ce6e5305d..2a350c29f16 100644 --- a/htdocs/langs/cs_CZ/compta.lang +++ b/htdocs/langs/cs_CZ/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=podle dodavatele zvolit vhodnou metodu použít stej TurnoverPerProductInCommitmentAccountingNotRelevant=Obrat zpráva za zboží, při použití hotovosti evidence režim není relevantní. Tato zpráva je k dispozici pouze při použití zásnubní evidence režimu (viz nastavení účetního modulu). CalculationMode=Výpočet režim AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Účetnictví standardní kód pro zákaznické thirdparties -COMPTA_ACCOUNT_SUPPLIER=Účetnictví standardní kód pro dodavatele thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Účetnictví standardní kód pro zákaznické thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Účetnictví standardní kód pro dodavatele thirdparties diff --git a/htdocs/langs/da_DK/compta.lang b/htdocs/langs/da_DK/compta.lang index cd807bc9c4c..7664bec456d 100644 --- a/htdocs/langs/da_DK/compta.lang +++ b/htdocs/langs/da_DK/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Kalkulations mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/de_DE/compta.lang b/htdocs/langs/de_DE/compta.lang index 8e9aa735602..53d8dba6d00 100644 --- a/htdocs/langs/de_DE/compta.lang +++ b/htdocs/langs/de_DE/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=Wählen Sie die geeignete Methode, um zum gleichen E TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Berechnungsmodus AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Standard-Aufwandskonto, um Produkte zu kaufen -COMPTA_PRODUCT_SOLD_ACCOUNT=Standard-Erlöskonto, um Produkte zu verkaufen -COMPTA_SERVICE_BUY_ACCOUNT=Standard-Aufwandskonto, um Services zu kaufen -COMPTA_SERVICE_SOLD_ACCOUNT=Standard-Erlöskonto, um Services zu verkaufen -COMPTA_VAT_ACCOUNT=Standard-Erlöskonto, um MwSt zu einzuziehen -COMPTA_VAT_BUY_ACCOUNT=Standard-Aufwandskonto, um MwSt zu bezahlen -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Standard-Aufwandskonto, um Produkte zu kaufen +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Standard-Erlöskonto, um Produkte zu verkaufen +ACCOUNTING_SERVICE_BUY_ACCOUNT=Standard-Aufwandskonto, um Services zu kaufen +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Standard-Erlöskonto, um Services zu verkaufen +ACCOUNTING_VAT_ACCOUNT=Standard-Erlöskonto, um MwSt zu einzuziehen +ACCOUNTING_VAT_BUY_ACCOUNT=Standard-Aufwandskonto, um MwSt zu bezahlen +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/el_GR/compta.lang b/htdocs/langs/el_GR/compta.lang index 89dac1035d2..35c9a2a060b 100644 --- a/htdocs/langs/el_GR/compta.lang +++ b/htdocs/langs/el_GR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=σύμφωνα με τον προμηθευτή, ε TurnoverPerProductInCommitmentAccountingNotRelevant=Αναφορά του κύκλου εργασιών ανά προϊόν, όταν χρησιμοποιείτε ταμειακής λογιστικής mode is not relevant. Η αναφορά αυτή είναι διαθέσιμη μόνο όταν χρησιμοποιείτε λογιστικής δέσμευσης τρόπος (ανατρέξτε στην ενότητα Ρύθμιση της μονάδας λογιστικής). CalculationMode=Τρόπο υπολογισμού AccountancyJournal=Λογιστικος Κωδικός περιοδικό -COMPTA_PRODUCT_BUY_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για να αγοράσουν τα προϊόντα -COMPTA_PRODUCT_SOLD_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την πώληση των προϊόντων -COMPTA_SERVICE_BUY_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την αγορά των υπηρεσιών -COMPTA_SERVICE_SOLD_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την πώληση υπηρεσιών -COMPTA_VAT_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την είσπραξη του ΦΠΑ -COMPTA_VAT_BUY_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την καταβολή του ΦΠΑ -COMPTA_ACCOUNT_CUSTOMER=Κωδικός Λογιστικής από προεπιλογή για πελάτη -COMPTA_ACCOUNT_SUPPLIER=Κωδικός Λογιστικής από προεπιλογή για προμηθευτή +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για να αγοράσουν τα προϊόντα +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την πώληση των προϊόντων +ACCOUNTING_SERVICE_BUY_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την αγορά των υπηρεσιών +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την πώληση υπηρεσιών +ACCOUNTING_VAT_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την είσπραξη του ΦΠΑ +ACCOUNTING_VAT_BUY_ACCOUNT=Προ επιλεγμένος κωδικός λογιστικής για την καταβολή του ΦΠΑ +ACCOUNTING_ACCOUNT_CUSTOMER=Κωδικός Λογιστικής από προεπιλογή για πελάτη +ACCOUNTING_ACCOUNT_SUPPLIER=Κωδικός Λογιστικής από προεπιλογή για προμηθευτή diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 3d9681774d8..cfcdec83c2f 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -87,10 +87,10 @@ ACCOUNTING_SOCIAL_JOURNAL=Social journal ACCOUNTING_ACCOUNT_TRANSFER_CASH=Account of transfer ACCOUNTING_ACCOUNT_SUSPENSE=Account of wait -COMPTA_PRODUCT_BUY_ACCOUNT=Accounting account by default for bought products (if not defined in the product sheet) -COMPTA_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (if not defined in the product sheet) -COMPTA_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (if not defined in the service sheet) -COMPTA_SERVICE_SOLD_ACCOUNT=Accounting account by default for the sold services (if not defined in the service sheet) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for bought products (if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (if not defined in the product sheet) +ACCOUNTING_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (if not defined in the service sheet) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Accounting account by default for the sold services (if not defined in the service sheet) Doctype=Type of document Docdate=Date diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 363f1f17395..5ec9bd62a54 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/es_DO/compta.lang b/htdocs/langs/es_DO/compta.lang index 0d837cbe9f6..4474b523ba5 100644 --- a/htdocs/langs/es_DO/compta.lang +++ b/htdocs/langs/es_DO/compta.lang @@ -24,5 +24,5 @@ RulesVATInServices=- Para los servicios, el informe incluye el ITBIS de los pago RulesVATInProducts=- Para los bienes materiales, incluye el ITBIS de las facturas basándose en la fecha de la factura. RulesVATDueServices=- Para los servicios, el informe incluye el ITBIS de las facturas debidas, pagadas o no basándose en la fecha de estas facturas. RulesVATDueProducts=- Para los bienes materiales, incluye el ITBIS de las facturas basándose en la fecha de la factura. -COMPTA_VAT_ACCOUNT=Código contable por defecto para el ITBIS repercutido -COMPTA_VAT_BUY_ACCOUNT=Código contable por defecto para el ITBIS soportado \ No newline at end of file +ACCOUNTING_VAT_ACCOUNT=Código contable por defecto para el ITBIS repercutido +ACCOUNTING_VAT_BUY_ACCOUNT=Código contable por defecto para el ITBIS soportado \ No newline at end of file diff --git a/htdocs/langs/es_ES/accountancy.lang b/htdocs/langs/es_ES/accountancy.lang index 4298ceddbc6..c715587994f 100644 --- a/htdocs/langs/es_ES/accountancy.lang +++ b/htdocs/langs/es_ES/accountancy.lang @@ -87,10 +87,10 @@ ACCOUNTINGEX_SOCIAL_JOURNAL=Diario social ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH=Cuenta de caja ACCOUNTINGEX_ACCOUNT_SUSPENSE=Cuenta operaciones pendientes de asignar -COMPTA_PRODUCT_BUY_ACCOUNT=Cuenta contable predeterminada para los productos comprados (si no se define en el producto) -COMPTA_PRODUCT_SOLD_ACCOUNT=Cuenta contable predeterminada para los productos vendidos (si no se define en el producto) -COMPTA_SERVICE_BUY_ACCOUNT=Cuenta contable predeterminada para los servicios comprados (si no se define en el servicio) -COMPTA_SERVICE_SOLD_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos (si no se define en el servico) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Cuenta contable predeterminada para los productos comprados (si no se define en el producto) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Cuenta contable predeterminada para los productos vendidos (si no se define en el producto) +ACCOUNTING_SERVICE_BUY_ACCOUNT=Cuenta contable predeterminada para los servicios comprados (si no se define en el servicio) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos (si no se define en el servico) Doctype=Tipo de documento Docdate=Fecha diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index 9fc192ecbb1..da1da3eb951 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=de acuerdo con el proveedor, seleccione el método a TurnoverPerProductInCommitmentAccountingNotRelevant=El informe de ventas por producto, cuando se utiliza en modo contabilidad de caja no es relevante. Este informe sólo está disponible cuando se utiliza en modo contabilidad de compromiso (consulte la configuración del módulo de contabilidad). CalculationMode=Modo de cálculo AccountancyJournal=Código contable diario -COMPTA_PRODUCT_BUY_ACCOUNT=Código contable por defecto para la compra de productos -COMPTA_PRODUCT_SOLD_ACCOUNT=Código contable por defecto para la venta de productos -COMPTA_SERVICE_BUY_ACCOUNT=Código contable por defecto para la compra de servicios -COMPTA_SERVICE_SOLD_ACCOUNT=Código contable por defecto para la venta de servicios -COMPTA_VAT_ACCOUNT=Código contable por defecto para el IVA repercutido -COMPTA_VAT_BUY_ACCOUNT=Código contable por defecto para el IVA soportado -COMPTA_ACCOUNT_CUSTOMER=Cuenta contable por defecto para clientes -COMPTA_ACCOUNT_SUPPLIER=Cuenta contable por defecto para proveedores +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Código contable por defecto para la compra de productos +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Código contable por defecto para la venta de productos +ACCOUNTING_SERVICE_BUY_ACCOUNT=Código contable por defecto para la compra de servicios +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Código contable por defecto para la venta de servicios +ACCOUNTING_VAT_ACCOUNT=Código contable por defecto para el IVA repercutido +ACCOUNTING_VAT_BUY_ACCOUNT=Código contable por defecto para el IVA soportado +ACCOUNTING_ACCOUNT_CUSTOMER=Cuenta contable por defecto para clientes +ACCOUNTING_ACCOUNT_SUPPLIER=Cuenta contable por defecto para proveedores diff --git a/htdocs/langs/es_HN/compta.lang b/htdocs/langs/es_HN/compta.lang index 29196f1372e..396d234b2df 100644 --- a/htdocs/langs/es_HN/compta.lang +++ b/htdocs/langs/es_HN/compta.lang @@ -22,4 +22,4 @@ SeeVATReportInInputOutputMode=Ver el informe %sISV pagado%s para un modo SeeVATReportInDueDebtMode=Ver el informe %sISV debido%s para un modo de cálculo con la opción sobre lo debido RulesVATIn=- Para los servicios, el informe incluye el ISV de los pagos efectivamente recibidos o emitidos basándose en la fecha del pago.
- Para los bienes materiales, incluye el ISV de las facturas basándose en la fecha de la factura. RulesVATDue=- Para los servicios, el informe incluye el ISV de las facturas debidas, pagadas o no basándose en la fecha de estas facturas.
- Para los bienes materiales, incluye el ISV de las facturas basándose en la fecha de la factura. -COMPTA_VAT_ACCOUNT=Código contable por defecto para el ISV (si no está definido en el diccionario "Tasas de ISV") +ACCOUNTING_VAT_ACCOUNT=Código contable por defecto para el ISV (si no está definido en el diccionario "Tasas de ISV") diff --git a/htdocs/langs/es_PE/compta.lang b/htdocs/langs/es_PE/compta.lang index 782dfe6ec94..2dbc3cc49b9 100644 --- a/htdocs/langs/es_PE/compta.lang +++ b/htdocs/langs/es_PE/compta.lang @@ -22,4 +22,4 @@ SeeVATReportInInputOutputMode=Ver el informe %sIGV pagado%s para un modo SeeVATReportInDueDebtMode=Ver el informe %sIGV debido%s para un modo de cálculo con la opción sobre lo debido RulesVATIn=- Para los servicios, el informe incluye el IGV de los pagos efectivamente recibidos o emitidos basándose en la fecha del pago.
- Para los bienes materiales, incluye el IGV de las facturas basándose en la fecha de la factura. RulesVATDue=- Para los servicios, el informe incluye el IGV de las facturas debidas, pagadas o no basándose en la fecha de estas facturas.
- Para los bienes materiales, incluye el IGV de las facturas basándose en la fecha de la factura. -COMPTA_VAT_ACCOUNT=Código contable por defecto para el IGV (si no está definido en el diccionario "Tasas de IGV") +ACCOUNTING_VAT_ACCOUNT=Código contable por defecto para el IGV (si no está definido en el diccionario "Tasas de IGV") diff --git a/htdocs/langs/es_PR/compta.lang b/htdocs/langs/es_PR/compta.lang index 0ba46f2c682..c9226abe8f1 100644 --- a/htdocs/langs/es_PR/compta.lang +++ b/htdocs/langs/es_PR/compta.lang @@ -22,4 +22,4 @@ SeeVATReportInInputOutputMode=Ver el informe %sIVU pagado%s para un modo SeeVATReportInDueDebtMode=Ver el informe %sIVU debido%s para un modo de cálculo con la opción sobre lo debido RulesVATIn=- Para los servicios, el informe incluye el IVU de los pagos efectivamente recibidos o emitidos basándose en la fecha del pago.
- Para los bienes materiales, incluye el IVU de las facturas basándose en la fecha de la factura. RulesVATDue=- Para los servicios, el informe incluye el IVU de las facturas debidas, pagadas o no basándose en la fecha de estas facturas.
- Para los bienes materiales, incluye el IVU de las facturas basándose en la fecha de la factura. -COMPTA_VAT_ACCOUNT=Código contable por defecto para el IVU (si no está definido en el diccionario "Tasas de IVU") +ACCOUNTING_VAT_ACCOUNT=Código contable por defecto para el IVU (si no está definido en el diccionario "Tasas de IVU") diff --git a/htdocs/langs/et_EE/compta.lang b/htdocs/langs/et_EE/compta.lang index 2dac123a3fe..8c7afa0e642 100644 --- a/htdocs/langs/et_EE/compta.lang +++ b/htdocs/langs/et_EE/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=vastavalt hankijale, vali sobiv meetod sama reegli r TurnoverPerProductInCommitmentAccountingNotRelevant=Käibearuanne toote kaupa, kassapõhist raamatupidamist kasutades pole režiim oluline. See aruanne on saadaval vaid tekkepõhist raamatupidamist kasutades (vaata raamatupidamise mooduli seadistust). CalculationMode=Arvutusrežiim AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Vaikimisi kasutatav raamatupidamise kood klientide loomisel -COMPTA_ACCOUNT_SUPPLIER=Vaikimisi kasutatav raamatupidamise kood hankijate loomisel +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Vaikimisi kasutatav raamatupidamise kood klientide loomisel +ACCOUNTING_ACCOUNT_SUPPLIER=Vaikimisi kasutatav raamatupidamise kood hankijate loomisel diff --git a/htdocs/langs/eu_ES/compta.lang b/htdocs/langs/eu_ES/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/eu_ES/compta.lang +++ b/htdocs/langs/eu_ES/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/fa_IR/compta.lang b/htdocs/langs/fa_IR/compta.lang index f6bdd7dca9a..252a2597b7c 100644 --- a/htdocs/langs/fa_IR/compta.lang +++ b/htdocs/langs/fa_IR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=با توجه به منبع، انتخاب روش م TurnoverPerProductInCommitmentAccountingNotRelevant=گزارش گردش مالی در هر محصول، در هنگام استفاده از حالت حسابداری نقدی مربوط نیست. این گزارش که با استفاده از تعامل حالت حسابداری (راه اندازی ماژول حسابداری را مشاهده کنید) فقط در دسترس است. CalculationMode=حالت محاسبه AccountancyJournal=کد حسابداری مجله -COMPTA_PRODUCT_BUY_ACCOUNT=کد پیش فرض حسابداری برای خرید محصولات -COMPTA_PRODUCT_SOLD_ACCOUNT=کد پیش فرض حسابداری برای فروش محصولات -COMPTA_SERVICE_BUY_ACCOUNT=کد پیش فرض حسابداری برای خرید خدمات -COMPTA_SERVICE_SOLD_ACCOUNT=کد پیش فرض حسابداری به فروش خدمات -COMPTA_VAT_ACCOUNT=پیش فرض کد حسابداری برای جمع آوری مالیات بر ارزش افزوده -COMPTA_VAT_BUY_ACCOUNT=پیش فرض کد حسابداری برای پرداخت مالیات بر ارزش افزوده -COMPTA_ACCOUNT_CUSTOMER=کد حسابداری به طور پیش فرض برای thirdparties مشتری -COMPTA_ACCOUNT_SUPPLIER=کد حسابداری به طور پیش فرض برای thirdparties منبع +ACCOUNTING_PRODUCT_BUY_ACCOUNT=کد پیش فرض حسابداری برای خرید محصولات +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=کد پیش فرض حسابداری برای فروش محصولات +ACCOUNTING_SERVICE_BUY_ACCOUNT=کد پیش فرض حسابداری برای خرید خدمات +ACCOUNTING_SERVICE_SOLD_ACCOUNT=کد پیش فرض حسابداری به فروش خدمات +ACCOUNTING_VAT_ACCOUNT=پیش فرض کد حسابداری برای جمع آوری مالیات بر ارزش افزوده +ACCOUNTING_VAT_BUY_ACCOUNT=پیش فرض کد حسابداری برای پرداخت مالیات بر ارزش افزوده +ACCOUNTING_ACCOUNT_CUSTOMER=کد حسابداری به طور پیش فرض برای thirdparties مشتری +ACCOUNTING_ACCOUNT_SUPPLIER=کد حسابداری به طور پیش فرض برای thirdparties منبع diff --git a/htdocs/langs/fi_FI/compta.lang b/htdocs/langs/fi_FI/compta.lang index 585b9bac3f8..e1d9de0c869 100644 --- a/htdocs/langs/fi_FI/compta.lang +++ b/htdocs/langs/fi_FI/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 8f66eb5319f..352b3902096 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -87,10 +87,10 @@ ACCOUNTING_SOCIAL_JOURNAL=Journal Social ACCOUNTING_ACCOUNT_TRANSFER_CASH=Compte de transfert espèce ACCOUNTING_ACCOUNT_SUSPENSE=Compte d'attente -COMPTA_PRODUCT_BUY_ACCOUNT=Compte comptable par défaut pour les produits achetés (si non défini dans la fiche produit) -COMPTA_PRODUCT_SOLD_ACCOUNT=Compte comptable par défaut pour les produits vendus (si non défini dans la fiche produit) -COMPTA_SERVICE_BUY_ACCOUNT=Compte comptable par défaut pour les services achetés (si non défini dans la fiche service) -COMPTA_SERVICE_SOLD_ACCOUNT=Compte comptable par défaut pour les services vendus (si non défini dans la fiche service) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Compte comptable par défaut pour les produits achetés (si non défini dans la fiche produit) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Compte comptable par défaut pour les produits vendus (si non défini dans la fiche produit) +ACCOUNTING_SERVICE_BUY_ACCOUNT=Compte comptable par défaut pour les services achetés (si non défini dans la fiche service) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Compte comptable par défaut pour les services vendus (si non défini dans la fiche service) Doctype=Type de document Docdate=Date diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index daf273cee3d..7e82771eec1 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=Selon le mode utilisé par le fournisseur, choisisse TurnoverPerProductInCommitmentAccountingNotRelevant=Le chiffre d'affaire par produit, dans une comptabilité en mode comptabilité de caisse n'est pas définissable. Ce rapport n'est disponible qu'en mode de comptabilité dit comptabilité d'engagement (voir la configuration du module de comptabilité). CalculationMode=Mode de calcul AccountancyJournal=Code journal comptabilité -COMPTA_PRODUCT_BUY_ACCOUNT=Code comptable par défaut pour l'achat de produits -COMPTA_PRODUCT_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits -COMPTA_SERVICE_BUY_ACCOUNT=Code comptable par défaut pour l'achat de services -COMPTA_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de services -COMPTA_VAT_ACCOUNT=Code comptable par défaut pour l'encaissement de TVA -COMPTA_VAT_BUY_ACCOUNT=Code comptable par défaut pour le versement de la TVA -COMPTA_ACCOUNT_CUSTOMER=Code comptable par défaut des tiers clients -COMPTA_ACCOUNT_SUPPLIER=Code comptable par défaut des tiers fournisseurs +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Code comptable par défaut pour l'achat de produits +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits +ACCOUNTING_SERVICE_BUY_ACCOUNT=Code comptable par défaut pour l'achat de services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de services +ACCOUNTING_VAT_ACCOUNT=Code comptable par défaut pour l'encaissement de TVA +ACCOUNTING_VAT_BUY_ACCOUNT=Code comptable par défaut pour le versement de la TVA +ACCOUNTING_ACCOUNT_CUSTOMER=Code comptable par défaut des tiers clients +ACCOUNTING_ACCOUNT_SUPPLIER=Code comptable par défaut des tiers fournisseurs diff --git a/htdocs/langs/he_IL/compta.lang b/htdocs/langs/he_IL/compta.lang index 22edf9746b3..bac153c241e 100644 --- a/htdocs/langs/he_IL/compta.lang +++ b/htdocs/langs/he_IL/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/hr_HR/compta.lang b/htdocs/langs/hr_HR/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/hr_HR/compta.lang +++ b/htdocs/langs/hr_HR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/hu_HU/compta.lang b/htdocs/langs/hu_HU/compta.lang index 357d0092b75..1acf7e994fe 100644 --- a/htdocs/langs/hu_HU/compta.lang +++ b/htdocs/langs/hu_HU/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/id_ID/compta.lang b/htdocs/langs/id_ID/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/id_ID/compta.lang +++ b/htdocs/langs/id_ID/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/is_IS/compta.lang b/htdocs/langs/is_IS/compta.lang index f31764f0036..d9148be61f3 100644 --- a/htdocs/langs/is_IS/compta.lang +++ b/htdocs/langs/is_IS/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/it_IT/compta.lang b/htdocs/langs/it_IT/compta.lang index 8c60b656a72..ec2601ed1b2 100644 --- a/htdocs/langs/it_IT/compta.lang +++ b/htdocs/langs/it_IT/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=in accordo con il fornitore, scegliere il metodo app TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Metodo di calcolo AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Codice contabile predefinito per acquistare prodotti -COMPTA_PRODUCT_SOLD_ACCOUNT=Codice contabile predefinito per vendere prodotti -COMPTA_SERVICE_BUY_ACCOUNT=Codice contabile predefinito per comprare servizi -COMPTA_SERVICE_SOLD_ACCOUNT=Codice contabile predefinito per vendere servizi -COMPTA_VAT_ACCOUNT=Codice contabile predefinito per IVA a credito -COMPTA_VAT_BUY_ACCOUNT=Codice contabile predefinito per IVA a debito -COMPTA_ACCOUNT_CUSTOMER=Codice contabile predefinito per clienti -COMPTA_ACCOUNT_SUPPLIER=Codice contabile predefinito per fornitori +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Codice contabile predefinito per acquistare prodotti +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Codice contabile predefinito per vendere prodotti +ACCOUNTING_SERVICE_BUY_ACCOUNT=Codice contabile predefinito per comprare servizi +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Codice contabile predefinito per vendere servizi +ACCOUNTING_VAT_ACCOUNT=Codice contabile predefinito per IVA a credito +ACCOUNTING_VAT_BUY_ACCOUNT=Codice contabile predefinito per IVA a debito +ACCOUNTING_ACCOUNT_CUSTOMER=Codice contabile predefinito per clienti +ACCOUNTING_ACCOUNT_SUPPLIER=Codice contabile predefinito per fornitori diff --git a/htdocs/langs/ja_JP/compta.lang b/htdocs/langs/ja_JP/compta.lang index 4520b58c2d3..a1d67ea4a1f 100644 --- a/htdocs/langs/ja_JP/compta.lang +++ b/htdocs/langs/ja_JP/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/ko_KR/compta.lang b/htdocs/langs/ko_KR/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/ko_KR/compta.lang +++ b/htdocs/langs/ko_KR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/lt_LT/compta.lang b/htdocs/langs/lt_LT/compta.lang index 3ddf4470a93..74afe6bd1e8 100644 --- a/htdocs/langs/lt_LT/compta.lang +++ b/htdocs/langs/lt_LT/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=Priklausomai nuo tiekėjo, pasirinkti tinkamą metod TurnoverPerProductInCommitmentAccountingNotRelevant=Apyvartos ataskaita pagal produktą, kai naudojamas Pinigų apskaita būdas nėra tinkamas. Ši ataskaita yra prieinama tik tada, kai naudojama Įsipareigojimų apskaita režimas (žr. Apskaitos modulio nustatymus). CalculationMode=Skaičiavimo metodas AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą produktų pirkimui -COMPTA_PRODUCT_SOLD_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą produktų pardavimui -COMPTA_SERVICE_BUY_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą paslaugų pirkimui -COMPTA_SERVICE_SOLD_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą paslaugų pardavimui -COMPTA_VAT_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą gaunama PVM -COMPTA_VAT_BUY_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą sumokamam PVM -COMPTA_ACCOUNT_CUSTOMER=Apskaitos taisyklės pagal nutylėjimą klientui trečiajai šaliai -COMPTA_ACCOUNT_SUPPLIER=Apskaitos taisyklės pagal nutylėjimą tiekėjams trečiosioms šalims +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą produktų pirkimui +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą produktų pardavimui +ACCOUNTING_SERVICE_BUY_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą paslaugų pirkimui +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą paslaugų pardavimui +ACCOUNTING_VAT_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą gaunama PVM +ACCOUNTING_VAT_BUY_ACCOUNT=Apskaitos taisyklės pagal nutylėjimą sumokamam PVM +ACCOUNTING_ACCOUNT_CUSTOMER=Apskaitos taisyklės pagal nutylėjimą klientui trečiajai šaliai +ACCOUNTING_ACCOUNT_SUPPLIER=Apskaitos taisyklės pagal nutylėjimą tiekėjams trečiosioms šalims diff --git a/htdocs/langs/lv_LV/compta.lang b/htdocs/langs/lv_LV/compta.lang index fcb2cd6b575..86edd4a2e0e 100644 --- a/htdocs/langs/lv_LV/compta.lang +++ b/htdocs/langs/lv_LV/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=no piegādātāja, izvēlēties piemērotu metodi pi TurnoverPerProductInCommitmentAccountingNotRelevant=Apgrozījums ziņojums par produktu, izmantojot skaidras naudas uzskaites režīmu nav nozīmes. Šis ziņojums ir pieejams tikai tad, ja izmanto saderināšanās grāmatvedības režīmu (skat. iestatīšanu grāmatvedības moduli). CalculationMode=Aprēķinu režīms AccountancyJournal=Kontu žurnāls -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Grāmatvedība kods pēc noklusējuma klientu thirdparties -COMPTA_ACCOUNT_SUPPLIER=Grāmatvedība kods pēc noklusējuma piegādātāja thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Grāmatvedība kods pēc noklusējuma klientu thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Grāmatvedība kods pēc noklusējuma piegādātāja thirdparties diff --git a/htdocs/langs/mk_MK/compta.lang b/htdocs/langs/mk_MK/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/mk_MK/compta.lang +++ b/htdocs/langs/mk_MK/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/nb_NO/compta.lang b/htdocs/langs/nb_NO/compta.lang index 53d0c060922..3c9ec2a9d79 100644 --- a/htdocs/langs/nb_NO/compta.lang +++ b/htdocs/langs/nb_NO/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/nl_NL/compta.lang b/htdocs/langs/nl_NL/compta.lang index 0d6f8ac174c..88556ef051e 100644 --- a/htdocs/langs/nl_NL/compta.lang +++ b/htdocs/langs/nl_NL/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=volgens de leverancier, kiest u geschikte methode om TurnoverPerProductInCommitmentAccountingNotRelevant=Omzet rapport per product, bij gebruik van een kas boukhoudings-modus is dit niet relevant. Dit rapport is alleen beschikbaar bij gebruik van betrokkenheid accountancy-modus (zie setup van boukhoud module). CalculationMode=Berekeningswijze AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Standaard boekhoud code om producten te kopen -COMPTA_PRODUCT_SOLD_ACCOUNT=Standaard boekhoud code om producten te verkopen -COMPTA_SERVICE_BUY_ACCOUNT=Standaard boekhoud code om diensten te kopen -COMPTA_SERVICE_SOLD_ACCOUNT=Standaard boekhoud code om diensten te verkopen -COMPTA_VAT_ACCOUNT=Standaard boekhoud code van te vorderen BTW -COMPTA_VAT_BUY_ACCOUNT=Standaard boekhoud code voor te betalen van btw -COMPTA_ACCOUNT_CUSTOMER=Standaard boekhoudkundige code voor klant relaties -COMPTA_ACCOUNT_SUPPLIER=Standaard boekhoudkundige code voor leverancier relaties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Standaard boekhoud code om producten te kopen +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Standaard boekhoud code om producten te verkopen +ACCOUNTING_SERVICE_BUY_ACCOUNT=Standaard boekhoud code om diensten te kopen +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Standaard boekhoud code om diensten te verkopen +ACCOUNTING_VAT_ACCOUNT=Standaard boekhoud code van te vorderen BTW +ACCOUNTING_VAT_BUY_ACCOUNT=Standaard boekhoud code voor te betalen van btw +ACCOUNTING_ACCOUNT_CUSTOMER=Standaard boekhoudkundige code voor klant relaties +ACCOUNTING_ACCOUNT_SUPPLIER=Standaard boekhoudkundige code voor leverancier relaties diff --git a/htdocs/langs/pl_PL/compta.lang b/htdocs/langs/pl_PL/compta.lang index 6525bb0d511..e4853c56231 100644 --- a/htdocs/langs/pl_PL/compta.lang +++ b/htdocs/langs/pl_PL/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/pt_BR/compta.lang b/htdocs/langs/pt_BR/compta.lang index 8da28ed9638..807892c8955 100644 --- a/htdocs/langs/pt_BR/compta.lang +++ b/htdocs/langs/pt_BR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=De acordo com o fornecedor, escolher o método adequ TurnoverPerProductInCommitmentAccountingNotRelevant=Relatório Volume de negócios por produto, quando se usa um modo de contabilidade de caixa não é relevante. Este relatório está disponível somente quando utilizar o modo de contabilidade engajamento (ver configuração do módulo de contabilidade). CalculationMode=Modo de cálculo AccountancyJournal=Codigo do jornal fiscal -COMPTA_PRODUCT_BUY_ACCOUNT=Código de contabilidade padrão para comprar produtos -COMPTA_PRODUCT_SOLD_ACCOUNT=Código de contabilidade padrão para vender produtos -COMPTA_SERVICE_BUY_ACCOUNT=Código de contabilidade padrão para comprar serviços -COMPTA_SERVICE_SOLD_ACCOUNT=Código de contabilidade padrão para vender serviços -COMPTA_VAT_ACCOUNT=Código de contabilidade padrão para cobrança do VAT -COMPTA_VAT_BUY_ACCOUNT=Código de contabilidade padrão para pagar o VAT -COMPTA_ACCOUNT_CUSTOMER=Código Contabilidade por padrão para fornecedores de clientes -COMPTA_ACCOUNT_SUPPLIER=Código da contabilidade por padrão para fornecedor +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Código de contabilidade padrão para comprar produtos +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Código de contabilidade padrão para vender produtos +ACCOUNTING_SERVICE_BUY_ACCOUNT=Código de contabilidade padrão para comprar serviços +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Código de contabilidade padrão para vender serviços +ACCOUNTING_VAT_ACCOUNT=Código de contabilidade padrão para cobrança do VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Código de contabilidade padrão para pagar o VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Código Contabilidade por padrão para fornecedores de clientes +ACCOUNTING_ACCOUNT_SUPPLIER=Código da contabilidade por padrão para fornecedor diff --git a/htdocs/langs/pt_PT/compta.lang b/htdocs/langs/pt_PT/compta.lang index f05ffdf57c7..fc482644769 100644 --- a/htdocs/langs/pt_PT/compta.lang +++ b/htdocs/langs/pt_PT/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Modo de cálculo AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/ro_RO/compta.lang b/htdocs/langs/ro_RO/compta.lang index d77a0d6abf8..333fabb0205 100644 --- a/htdocs/langs/ro_RO/compta.lang +++ b/htdocs/langs/ro_RO/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=în funcție de furnizor, alege metoda potrivită pe TurnoverPerProductInCommitmentAccountingNotRelevant=Raportul cifra de afaceri pe produs, atunci când se utilizează modul contabilitate de casă nu este relevant. Acest raport este disponibil numai atunci când se utilizează modul contabilitate de angajament (a se vedea configurarea modulului de contabilitate). CalculationMode=Mod calcul AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Contul contabil implicit pentru terţii clienţi -COMPTA_ACCOUNT_SUPPLIER=Contul contabil implicit pentru terţii furnizori +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Contul contabil implicit pentru terţii clienţi +ACCOUNTING_ACCOUNT_SUPPLIER=Contul contabil implicit pentru terţii furnizori diff --git a/htdocs/langs/ru_RU/compta.lang b/htdocs/langs/ru_RU/compta.lang index 25fc3fdd5dd..4dc595627ee 100644 --- a/htdocs/langs/ru_RU/compta.lang +++ b/htdocs/langs/ru_RU/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Режим вычислений AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/sk_SK/compta.lang b/htdocs/langs/sk_SK/compta.lang index 361ca593eef..a5164dc8c0f 100644 --- a/htdocs/langs/sk_SK/compta.lang +++ b/htdocs/langs/sk_SK/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=podľa dodávateľa zvoliť vhodnú metódu použiť TurnoverPerProductInCommitmentAccountingNotRelevant=Obrat správa za tovar, pri použití hotovosti evidencia režim nie je relevantná. Táto správa je k dispozícii len pri použití zásnubný evidencia režimu (pozri nastavenie účtovného modulu). CalculationMode=Výpočet režim AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Účtovníctvo štandardný kód pre zákaznícke thirdparties -COMPTA_ACCOUNT_SUPPLIER=Účtovníctvo štandardný kód pre dodávateľov thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Účtovníctvo štandardný kód pre zákaznícke thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Účtovníctvo štandardný kód pre dodávateľov thirdparties diff --git a/htdocs/langs/sl_SI/compta.lang b/htdocs/langs/sl_SI/compta.lang index 88bb0773392..d744d2d588c 100644 --- a/htdocs/langs/sl_SI/compta.lang +++ b/htdocs/langs/sl_SI/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/sq_AL/compta.lang b/htdocs/langs/sq_AL/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/sq_AL/compta.lang +++ b/htdocs/langs/sq_AL/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/sv_SE/compta.lang b/htdocs/langs/sv_SE/compta.lang index 21e59c35abb..f224a0b49a7 100644 --- a/htdocs/langs/sv_SE/compta.lang +++ b/htdocs/langs/sv_SE/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/th_TH/compta.lang b/htdocs/langs/th_TH/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/th_TH/compta.lang +++ b/htdocs/langs/th_TH/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/tr_TR/compta.lang b/htdocs/langs/tr_TR/compta.lang index 86bdd1945d3..2cdba02cd1b 100644 --- a/htdocs/langs/tr_TR/compta.lang +++ b/htdocs/langs/tr_TR/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=tedarikçiye göre, aynı hesaplama kuralını kulla TurnoverPerProductInCommitmentAccountingNotRelevant=Ürüne göre ciro raporu, nakit muhasebesimodu için uygun değildir. Bu rapor yalnızca, tahakkuk muhasebesi modu için uygundur (muhasebe modülü ayarlarına bakın). CalculationMode=Hesaplama modu AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Alınacak ürünler için varsayılan hesap kodu -COMPTA_PRODUCT_SOLD_ACCOUNT=Satılacak ürünler için varsayılan hesap kodu -COMPTA_SERVICE_BUY_ACCOUNT=Alınacak hizmetler için varsayılan hesap kodu -COMPTA_SERVICE_SOLD_ACCOUNT=Satılacak hizmetler için varsayılan hesap kodu -COMPTA_VAT_ACCOUNT=Alınacak KDV için varsayılan hesap kodu -COMPTA_VAT_BUY_ACCOUNT=Ödenecek KDV için varsayılan hesap kodu -COMPTA_ACCOUNT_CUSTOMER=Müşteri üçüncü partler için varsayılan muhasebe kodu -COMPTA_ACCOUNT_SUPPLIER=Tedarikçi üçüncü partler için varsayılan muhasebe kodu +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Alınacak ürünler için varsayılan hesap kodu +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Satılacak ürünler için varsayılan hesap kodu +ACCOUNTING_SERVICE_BUY_ACCOUNT=Alınacak hizmetler için varsayılan hesap kodu +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Satılacak hizmetler için varsayılan hesap kodu +ACCOUNTING_VAT_ACCOUNT=Alınacak KDV için varsayılan hesap kodu +ACCOUNTING_VAT_BUY_ACCOUNT=Ödenecek KDV için varsayılan hesap kodu +ACCOUNTING_ACCOUNT_CUSTOMER=Müşteri üçüncü partler için varsayılan muhasebe kodu +ACCOUNTING_ACCOUNT_SUPPLIER=Tedarikçi üçüncü partler için varsayılan muhasebe kodu diff --git a/htdocs/langs/uk_UA/compta.lang b/htdocs/langs/uk_UA/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/uk_UA/compta.lang +++ b/htdocs/langs/uk_UA/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/uz_UZ/compta.lang b/htdocs/langs/uz_UZ/compta.lang index 30b41b5316e..b44f52ee2fa 100644 --- a/htdocs/langs/uz_UZ/compta.lang +++ b/htdocs/langs/uz_UZ/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/vi_VN/compta.lang b/htdocs/langs/vi_VN/compta.lang index 73c0eb59742..996a4df1d34 100644 --- a/htdocs/langs/vi_VN/compta.lang +++ b/htdocs/langs/vi_VN/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties diff --git a/htdocs/langs/zh_CN/compta.lang b/htdocs/langs/zh_CN/compta.lang index 2813b899471..31c7f734728 100644 --- a/htdocs/langs/zh_CN/compta.lang +++ b/htdocs/langs/zh_CN/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=根据供应商,选择适当的方法来套用相 TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=计算模式 AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=买产品的缺省会计模式 -COMPTA_PRODUCT_SOLD_ACCOUNT=卖产品的缺省会计模式 -COMPTA_SERVICE_BUY_ACCOUNT=买服务的缺省会计模式 -COMPTA_SERVICE_SOLD_ACCOUNT=卖服务的缺省会计模式 -COMPTA_VAT_ACCOUNT=征收增值税的缺省会计模式 -COMPTA_VAT_BUY_ACCOUNT=支付增值税的缺省会计模式 -COMPTA_ACCOUNT_CUSTOMER=默认情况下,第三方客户的会计代码 -COMPTA_ACCOUNT_SUPPLIER=默认情况下,第三方供应商的会计代码 +ACCOUNTING_PRODUCT_BUY_ACCOUNT=买产品的缺省会计模式 +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=卖产品的缺省会计模式 +ACCOUNTING_SERVICE_BUY_ACCOUNT=买服务的缺省会计模式 +ACCOUNTING_SERVICE_SOLD_ACCOUNT=卖服务的缺省会计模式 +ACCOUNTING_VAT_ACCOUNT=征收增值税的缺省会计模式 +ACCOUNTING_VAT_BUY_ACCOUNT=支付增值税的缺省会计模式 +ACCOUNTING_ACCOUNT_CUSTOMER=默认情况下,第三方客户的会计代码 +ACCOUNTING_ACCOUNT_SUPPLIER=默认情况下,第三方供应商的会计代码 diff --git a/htdocs/langs/zh_TW/compta.lang b/htdocs/langs/zh_TW/compta.lang index 0277516591f..8d5b6d6e4f2 100644 --- a/htdocs/langs/zh_TW/compta.lang +++ b/htdocs/langs/zh_TW/compta.lang @@ -196,11 +196,11 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a cash accountancy mode is not relevant. This report is only available when using engagement accountancy mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -COMPTA_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products -COMPTA_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products -COMPTA_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services -COMPTA_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services -COMPTA_VAT_ACCOUNT=Default accountancy code for collecting VAT -COMPTA_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT -COMPTA_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties -COMPTA_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Default accountancy code to buy products +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Default accountancy code to sell products +ACCOUNTING_SERVICE_BUY_ACCOUNT=Default accountancy code to buy services +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default accountancy code to sell services +ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties +ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties From 1bcc2c92a3c4acedaf2200439d62ac66ab7a03df Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 21 Sep 2014 20:42:46 +0200 Subject: [PATCH 22/36] compta_mode -> accounting_mode --- htdocs/accountancy/admin/index.php | 14 +++++++------- htdocs/admin/compta.php | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index a61eb4852bd..8e548f8992e 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -63,22 +63,22 @@ $list = array ( * Actions */ -$compta_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; +$accounting_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; if ($action == 'update') { $error = 0; - $compta_modes = array( + $accounting_modes = array( 'RECETTES-DEPENSES', 'CREANCES-DETTES' ); - $compta_mode = GETPOST('compta_mode','alpha'); + $accounting_mode = GETPOST('accounting_mode','alpha'); - if (in_array($compta_mode,$compta_modes)) { + if (in_array($accounting_mode,$accounting_modes)) { - if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $compta_mode, 'chaine', 0, '', $conf->entity)) { + if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) { $error++; } } else { @@ -165,7 +165,7 @@ print '
'.$langs->trans('OptionMode').''.$langs->trans('Description').'
".$conf->global->COMPTA_JOURNAL_BUY."".dol_print_date($val["date"])."".$invoicestatic->getNomUrl(1)."".$k."".$line['label']."
".$conf->global->COMPTA_JOURNAL_SELL."".dol_print_date($val["date"])."".$invoicestatic->getNomUrl(1)."".$k."".$line['label']."".$langs->trans("Invoices")."".$langs->trans("TotalToPay")."
'; print ''; print ''; print "\n"; -print ''; +print ''; print '\n"; -print ''; +print ''; print '\n"; print ''; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 0bb83eae3c4..610bf371f29 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -53,23 +53,23 @@ $list = array( * Actions */ -$compta_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; +$accounting_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; if ($action == 'update') { $error = 0; - $compta_modes = array( + $accounting_modes = array( 'RECETTES-DEPENSES', 'CREANCES-DETTES' ); - $compta_mode = GETPOST('compta_mode','alpha'); + $accounting_mode = GETPOST('accounting_mode','alpha'); - if (in_array($compta_mode,$compta_modes)) { + if (in_array($accounting_mode,$accounting_modes)) { - if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $compta_mode, 'chaine', 0, '', $conf->entity)) { + if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) { $error++; } } else { @@ -118,7 +118,7 @@ print '
'.$langs->trans('OptionMode').''.$langs->trans('Description').'
'.$langs->trans('OptionModeTrue').'
'.$langs->trans('OptionModeTrue').''.nl2br($langs->trans('OptionModeTrueDesc')); // Write info on way to count VAT //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) @@ -179,7 +179,7 @@ print ''.nl2br($langs->trans('OptionModeTrueDesc')); // // print nl2br($langs->trans('OptionModeTrueInfoExpert')); //} print "
'.$langs->trans('OptionModeVirtual').'
'.$langs->trans('OptionModeVirtual').''.nl2br($langs->trans('OptionModeVirtualDesc'))."
'; print ''; print ''; print "\n"; -print ''; +print ''; print '\n"; -print ''; +print ''; print '\n"; print ''; From 4b4fe9811f9a4b85d3ad7847d42934f59f02bf8e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 21 Sep 2014 20:43:06 +0200 Subject: [PATCH 23/36] Changelog --- ChangeLog | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf0f0b2f922..d2d26bf6fc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -111,9 +111,11 @@ For developers: - New: renamed table llx_c_pays to llx_c_country & libelle field to label. - Qual: Renamed table llx_c_civilite into llx_c_civility, field civilite into label in the same table, - and field civilite into civility in other table -- Qual: Renamed all files & links "liste.php" into "list.php" -- Qual: Renamed all files & links "fiche.php" into "card.php" + and field civilite into civility in other table. +- Qual: Renamed all files & links "liste.php" into "list.php". +- Qual: Renamed all files & links "fiche.php" into "card.php". +- Qual: Replace all constants COMPTA_* by ACCOUNTING_*. +- Qual: Replace all constants ACCOUNTINGEX_* by ACCOUNTING_* to simplify migration of the module WARNING: Following changes may create regression for some external modules, but was necessary to make Dolibarr better: From 8e1f9c8d708abd69e79470703bec8db4147c27f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 22 Sep 2014 00:07:10 +0200 Subject: [PATCH 24/36] Added missing function in Expedition::generateDocument --- htdocs/expedition/class/expedition.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 9aea7ada0eb..f7edddc0d47 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1561,6 +1561,8 @@ class Expedition extends CommonObject $modelpath = "core/modules/expedition/doc/"; + $this->fetch_origin(); + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, 0, 0, 0); } From 9244ef23afbc25475acf1ba61b5b839d22e1b917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 22 Sep 2014 00:08:21 +0200 Subject: [PATCH 25/36] Removed 2nd argument of muscadet and canelle model __construct function --- .../supplier_invoice/pdf/pdf_canelle.modules.php | 15 +++++++-------- .../supplier_order/pdf/pdf_muscadet.modules.php | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) 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 f61f49cc471..151f2d856aa 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -58,9 +58,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * Constructor * * @param DoliDB $db Database handler - * @param Object $object Supplier invoice */ - function __construct($db,$object) + function __construct($db) { global $conf,$langs,$mysoc; @@ -91,12 +90,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->franchise=!$mysoc->tva_assuj; - // Get source company - if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); - if (! is_object($object->thirdparty)) $object->thirdparty=$mysoc; // If fetch_thirdparty fails, object has no socid (specimen) - $this->emetteur=$object->thirdparty; - if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined - // Defini position des colonnes $this->posxdesc=$this->marge_gauche+1; $this->posxtva=112; @@ -139,6 +132,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { global $user,$langs,$conf,$mysoc,$hookmanager; + // Get source company + if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); + if (! is_object($object->thirdparty)) $object->thirdparty=$mysoc; // If fetch_thirdparty fails, object has no socid (specimen) + $this->emetteur=$object->thirdparty; + if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined + if (! is_object($outputlangs)) $outputlangs=$langs; // 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'; 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 bb1a4233382..32fdc1bb960 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -61,9 +61,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders * Constructor * * @param DoliDB $db Database handler - * @param Object $object Supplier order */ - function __construct($db,$object) + function __construct($db) { global $conf,$langs,$mysoc; From 016c889aa8562944e1a270553940c8308578261c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 22 Sep 2014 00:15:32 +0200 Subject: [PATCH 26/36] Refactored CommandeFournisseur::generateDocument and FactureFournisseur::generateDocument --- .../class/fournisseur.commande.class.php | 82 +------------------ .../fourn/class/fournisseur.facture.class.php | 81 +----------------- 2 files changed, 5 insertions(+), 158 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 279050d0cd4..0961a244c65 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2019,18 +2019,9 @@ class CommandeFournisseur extends CommonOrder public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) { global $conf, $user, $langs; + $langs->load("suppliers"); - $error=0; - - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); - - $srctemplatepath=''; - // Sets the model on the model name to use if (! dol_strlen($modele)) { @@ -2044,76 +2035,9 @@ class CommandeFournisseur extends CommonOrder } } - // If selected model is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/supplier_order/pdf/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // We check the model location - $file=dol_buildpath($reldir."core/modules/supplier_order/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Load the model - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db,$this); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans supplier_order_pdf_create"); - dol_print_error($this->db,$obj->error); - return 0; - } - } - else - { - if (! $conf->global->COMMANDE_SUPPLIER_ADDON_PDF) - { - print $langs->trans("Error")." ".$langs->trans("Error_COMMANDE_SUPPLIER_ADDON_PDF_NotDefined"); - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - } - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index d4828338432..7a8cf50a335 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1687,16 +1687,6 @@ class FactureFournisseur extends CommonInvoice $langs->load("suppliers"); - $error=0; - - // Increase limit for PDF build - $err=error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); - - $srctemplatepath=''; - // Set the model on the model name to use if (! dol_strlen($modele)) { @@ -1710,76 +1700,9 @@ class FactureFournisseur extends CommonInvoice } } - // If selected modele is a filename template (then $modele="modelname:filename") - $tmp=explode(':',$modele,2); - if (! empty($tmp[1])) - { - $modele=$tmp[0]; - $srctemplatepath=$tmp[1]; - } + $modelpath = "core/modules/supplier_invoice/pdf/"; - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels,$conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - foreach(array('doc','pdf') as $prefix) - { - $file = $prefix."_".$modele.".modules.php"; - - // We checked the location of the model - $file=dol_buildpath($reldir."core/modules/supplier_invoice/pdf/".$file,0); - if (file_exists($file)) - { - $filefound=1; - $classname=$prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } - - // Load the model - if ($filefound) - { - require_once $file; - - $obj = new $classname($this->db,$this); - - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; - if ($obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { - $outputlangs->charset_output=$sav_charset_output; - - // we delete preview files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); - - return 1; - } - else - { - $outputlangs->charset_output=$sav_charset_output; - dol_syslog("Erreur dans supplier_invoice_pdf_create"); - dol_print_error($this->db,$obj->error); - return 0; - } - } - else - { - if (! $conf->global->INVOICE_SUPPLIER_ADDON_PDF) - { - print $langs->trans("Error")." ".$langs->trans("Error_INVOICE_SUPPLIER_ADDON_PDF_NotDefined"); - } - else - { - print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$file); - } - return 0; - } + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); } } From 8f492a6677e6e7abd78ce2c726f1fd98e0619439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 22 Sep 2014 00:18:36 +0200 Subject: [PATCH 27/36] Documented commonObject::commonGenerateDocument --- htdocs/core/class/commonobject.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index ebd5cb98a76..9503404350c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3475,6 +3475,17 @@ abstract class CommonObject return $result; } + /** + * Common function for all objects extending CommonObject for generating documents + * + * @param string $modelspath Relative folder where models are placed + * @param string $modele Model to use + * @param Translate $outputlangs Language to use + * @param int $hidedetails 1 to hide details. 0 by default + * @param int $hidedesc 1 to hide product description. 0 by default + * @param int $hideref 1 to hide product reference. 0 by default + * @return int 1 if OK -1 if not OK + */ protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref) { global $conf, $langs; From de0d53a2bbcc9b4c4a7e13b4f8534d1379ea6656 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Mon, 22 Sep 2014 16:31:58 +0200 Subject: [PATCH 28/36] ADD extrafields on usergroup --- htdocs/core/lib/usergroups.lib.php | 5 + .../install/mysql/migration/3.6.0-3.7.0.sql | 7 + .../tables/llx_usergroup_extrafields.key.sql | 20 +++ .../tables/llx_usergroup_extrafields.sql | 26 +++ htdocs/user/admin/group_extrafields.php | 155 ++++++++++++++++++ htdocs/user/class/usergroup.class.php | 70 +++++++- htdocs/user/group/fiche.php | 39 +++++ 7 files changed, 316 insertions(+), 6 deletions(-) create mode 100644 htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql create mode 100644 htdocs/install/mysql/tables/llx_usergroup_extrafields.sql create mode 100644 htdocs/user/admin/group_extrafields.php diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 276efe85f02..c76e2de77fc 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -195,6 +195,11 @@ function user_admin_prepare_head() $head[$h][0] = DOL_URL_ROOT.'/user/admin/user_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); $head[$h][2] = 'attributes'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/user/admin/group_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields")." ".$langs->trans("Groups"); + $head[$h][2] = 'attributes_group'; $h++; // Show more tabs from modules diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 24cb1a6203d..47ecd5efa58 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -1046,4 +1046,11 @@ CREATE TABLE llx_fichinterdet_extrafields ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields (fk_object); +CREATE TABLE IF NOT EXISTS llx_usergroup_extrafields ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=InnoDB ; +ALTER TABLE llx_usergroup_extrafields ADD INDEX idx_usergroup_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql b/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql new file mode 100644 index 00000000000..378f4514539 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2013 Alexis Algoud +-- +-- 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 . +-- +-- =================================================================== + + +ALTER TABLE llx_usergroup_extrafields ADD INDEX idx_usergroup_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql new file mode 100644 index 00000000000..333eb41ad08 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql @@ -0,0 +1,26 @@ +-- =================================================================== +-- Copyright (C) 2014 Alexis Algoud +-- +-- 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 . +-- +-- =================================================================== + +CREATE TABLE IF NOT EXISTS llx_usergroup_extrafields ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=InnoDB ; + + diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php new file mode 100644 index 00000000000..dbb9e863af4 --- /dev/null +++ b/htdocs/user/admin/group_extrafields.php @@ -0,0 +1,155 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Alexis Algoud + * + * 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/adherents/admin/adherent_extrafields.php + * \ingroup member + * \brief Page to setup extra fields of members + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +$langs->load("users"); +$langs->load("admin"); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label=ExtraFields::$type2label; +$type2label=array(''); +foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val); + +$action=GETPOST('action', 'alpha'); +$attrname=GETPOST('attrname', 'alpha'); +$elementtype='usergroup'; //Must be the $table_element of the class that manage extrafield + +if (!$user->admin) accessforbidden(); + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + +$textobject=$langs->transnoentitiesnoconv("Groups"); + +$help_url='EN:Module_Users|FR:Module_Utilisateurs|ES:Módulo_Usuarios'; +llxHeader('',$langs->trans("UsersSetup"),$help_url); + + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("UsersSetup"),$linkback,'setup'); + + +$head = user_admin_prepare_head(); + +dol_fiche_head($head, 'attributes_group', $langs->trans("Group"), 0, 'user'); + + +print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; +print '
'; + +// Load attribute_label +$extrafields->fetch_name_optionals_label($elementtype); + +print "
'.$langs->trans('OptionMode').''.$langs->trans('Description').'
'.$langs->trans('OptionModeTrue').'
'.$langs->trans('OptionModeTrue').''.nl2br($langs->trans('OptionModeTrueDesc')); // Write info on way to count VAT //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) @@ -132,7 +132,7 @@ print ''.nl2br($langs->trans('OptionModeTrueDesc')); // // print nl2br($langs->trans('OptionModeTrueInfoExpert')); //} print "
'.$langs->trans('OptionModeVirtual').'
'.$langs->trans('OptionModeVirtual').''.nl2br($langs->trans('OptionModeVirtualDesc'))."
"; + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; + +$var=True; +foreach($extrafields->attribute_type as $key => $value) +{ + $var=!$var; + print ""; + print "\n"; + print "\n"; + print "\n"; + print '\n"; + print '\n"; + print '\n"; + print '\n"; + print ""; + // $i++; +} + +print "
'.$langs->trans("Label").''.$langs->trans("AttributeCode").''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("Unique").''.$langs->trans("Required").' 
".$extrafields->attribute_label[$key]."".$key."".$type2label[$extrafields->attribute_type[$key]]."'.$extrafields->attribute_size[$key]."'.yn($extrafields->attribute_unique[$key])."'.yn($extrafields->attribute_required[$key])."'.img_edit().''; + print "  ".img_delete()."
"; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation d'un champ optionnel + /* */ +/* ************************************************************************** */ + +if ($action == 'create') +{ + print "
"; + print_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition d'un champ optionnel */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && ! empty($attrname)) +{ + print "
"; + print_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index b801c2660aa..3b6be065879 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -4,7 +4,8 @@ * Copyright (c) 2005-2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2014 Juanjo Menent - * + * Copyright (C) 2014 Alexis Algoud + * * 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 @@ -105,6 +106,15 @@ class UserGroup extends CommonObject $this->members=$this->listUsersForGroup(); + + // Retreive all extrafield for group + // fetch optionals attributes and labels + dol_include_once('/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + $this->fetch_optionals($this->id,$extralabels); + + // Sav current LDAP Current DN //$this->ldap_dn = $this->_load_ldap_dn($this->_load_ldap_info(),0); } @@ -539,6 +549,17 @@ class UserGroup extends CommonObject $sql .= " WHERE fk_usergroup = ".$this->id; $this->db->query($sql); + // Remove extrafields + if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used + { + $result=$this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup"; $sql .= " WHERE rowid = ".$this->id; $result=$this->db->query($sql); @@ -568,7 +589,7 @@ class UserGroup extends CommonObject */ function create($notrigger=0) { - global $user, $conf, $langs; + global $user, $conf, $langs, $hookmanager; $error=0; $now=dol_now(); @@ -605,8 +626,28 @@ class UserGroup extends CommonObject if ($result < 0) { $error++; $this->db->rollback(); return -1; } // End call triggers } - - $this->db->commit(); + + + // Actions on extra fields (by external module or standard code) + $hookmanager->initHooks(array('groupdao')); + $parameters=array(); + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($reshook)) + { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + } + else if ($reshook < 0) $error++; + + if ($error > 0) { $error++; $this->db->rollback(); return -1; } + else $this->db->commit(); + return $this->id; } else @@ -625,7 +666,7 @@ class UserGroup extends CommonObject */ function update($notrigger=0) { - global $user, $conf, $langs; + global $user, $conf, $langs, $hookmanager; $error=0; @@ -654,7 +695,24 @@ class UserGroup extends CommonObject if ($result < 0) { $error++; } // End call triggers } - + + // Actions on extra fields (by external module or standard code) + $hookmanager->initHooks(array('groupdao')); + $parameters=array(); + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($reshook)) + { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + } + else if ($reshook < 0) $error++; + if (! $error) { $this->db->commit(); diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index f97ef35ae6e..00dcc4c4cfb 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Herve Prot * Copyright (C) 2012 Florian Henry + * Copyright (C) 2014 Alexis Algoud * * 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 @@ -29,6 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; if(! empty($conf->multicompany->enabled)) dol_include_once('/multicompany/class/actions_multicompany.class.php'); +dol_include_once('/core/class/extrafields.class.php'); + // Defini si peux lire/modifier utilisateurs et permisssions $canreadperms=($user->admin || $user->rights->user->user->lire); $caneditperms=($user->admin || $user->rights->user->user->creer); @@ -59,6 +62,9 @@ if (! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->multico $object = new Usergroup($db); +$extrafields = new ExtraFields($db); +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); /** * Action remove group @@ -93,6 +99,9 @@ if ($action == 'add') $object->nom = trim($_POST["nom"]); $object->note = trim($_POST["note"]); + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) $object->entity = 0; else $object->entity = $_POST["entity"]; @@ -171,6 +180,9 @@ if ($action == 'update') $object->nom = trim($_POST["group"]); $object->note = dol_htmlcleanlastbr($_POST["note"]); + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); + if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) $object->entity = 0; else $object->entity = $_POST["entity"]; @@ -240,6 +252,15 @@ if ($action == 'create') $doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_8,90); $doleditor->Create(); print "
\n"; print '

'; @@ -311,6 +332,16 @@ else print '
'.$langs->trans("Note").''.dol_htmlentitiesbr($object->note).' 
\n"; print ''; @@ -495,6 +526,14 @@ else $doleditor->Create(); print '
\n"; print '

'; From f7f00597676afdd7f60ef05cf6b619082d7a9779 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Sep 2014 20:16:58 +0200 Subject: [PATCH 29/36] Missing hook to add button on intervention Prepare to move location into resource Can select which king of contact show into contact tab. --- htdocs/comm/action/class/actioncomm.class.php | 5 +- htdocs/comm/action/fiche.php | 20 ++- htdocs/core/class/commonobject.class.php | 42 +++++- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/class/interfaces.class.php | 4 +- htdocs/core/tpl/contacts.tpl.php | 22 ++- htdocs/fichinter/contact.php | 3 + htdocs/fichinter/fiche.php | 139 +++++++++--------- 8 files changed, 153 insertions(+), 84 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 4fe49999111..e08f5518c1f 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -534,9 +534,11 @@ class ActionComm extends CommonObject * @param int $fk_element Id of element action is linked to * @param string $elementtype Type of element action is linked to * @param string $filter Other filter + * @param string $sortfield Sort on this field + * @param string $sortorder ASC or DESC * @return array or string Error string if KO, array with actions if OK */ - static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='') + static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='', $sortorder='') { global $conf, $langs; @@ -552,6 +554,7 @@ class ActionComm extends CommonObject else $sql.= " AND a.fk_element = ".$fk_element." AND a.elementtype = '".$elementtype."'"; } if (! empty($filter)) $sql.= $filter; + if ($sortorder && $sortfield) $sql.=$db->order($sortfield, $sortorder); dol_syslog(get_class()."::getActions", LOG_DEBUG); $resql=$db->query($sql); diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 929600512c7..46e420866a2 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -638,7 +638,10 @@ if ($action == 'create') print '
'.$langs->trans("Location").'
'.$langs->trans("Location").'
'.$langs->trans("ActionAffectedTo").''; @@ -888,7 +891,10 @@ if ($id > 0) print '
'.$langs->trans("Location").'
'.$langs->trans("Location").'
'.$langs->trans("ActionAffectedTo").''; @@ -1020,13 +1026,16 @@ if ($id > 0) // Full day event print '
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent).'
'.$langs->trans("DateActionStart").''; if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour'); else print dol_print_date($object->datep,'day'); if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); print ''."\n"; + print ''."\n"; print '
'; print ''; print ''; @@ -1079,7 +1088,10 @@ if ($id > 0) print '
'.$langs->trans("Location").''.$object->location.'
'.$langs->trans("Location").''.$object->location.'
'.$langs->trans("ActionAffectedTo").''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1059d1af07d..82d838a30c8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2035,6 +2035,8 @@ abstract class CommonObject */ function setStatut($status,$elementId='',$elementType='') { + global $user,$langs,$conf; + $elementId = (!empty($elementId)?$elementId:$this->id); $elementTable = (!empty($elementType)?$elementType:$this->table_element); @@ -2050,9 +2052,36 @@ abstract class CommonObject dol_syslog(get_class($this)."::setStatut", LOG_DEBUG); if ($this->db->query($sql)) { - $this->db->commit(); - $this->statut = $status; - return 1; + if (! $error) + { + $trigkey=''; + if ($this->element == 'fichinter' && $status == 2) $trigkey='FICHINTER_CLASSIFYBILLED'; + + if ($trigkey) + { + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers($trigkey,$this,$user,$langs,$conf); + if ($result < 0) { + $error++; $this->errors=$interface->errors; + } + // Fin appel triggers + } + } + + if (! $error) + { + $this->db->commit(); + $this->statut = $status; + return 1; + } + else + { + $this->db->rollback(); + dol_syslog(get_class($this)."::setStatus ".$this->error,LOG_ERR); + return -1; + } } else { @@ -2133,8 +2162,10 @@ abstract class CommonObject * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label() * @return int <0 if error, 0 if no optionals to find nor found, 1 if a line is found and optional loaded */ - function fetch_optionals($rowid,$optionsArray='') + function fetch_optionals($rowid='',$optionsArray='') { + if (empty($rowid)) $rowid=$this->id; + if (! is_array($optionsArray)) { // optionsArray not already loaded, so we load it @@ -2143,7 +2174,6 @@ abstract class CommonObject $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); } - // Request to get complementary values if (count($optionsArray) > 0) { @@ -2170,7 +2200,7 @@ abstract class CommonObject if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key)) { // we can add this attribute to adherent object - $this->array_options["options_$key"]=$value; + $this->array_options["options_".$key]=$value; } } } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index d5d16efc2e9..a25115be878 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -514,7 +514,7 @@ class ExtraFields /** - * Load array this->attribute_label + * Load array this->attribute_xxx like attribute_label, attribute_type, ... * * @param string $elementtype Type of element ('adherent', 'commande', societe', 'facture', 'propal', 'product', ...) * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 50a9cced421..e441dbe5e96 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -60,7 +60,9 @@ class Interfaces // Check parameters if (! is_object($object) || ! is_object($conf)) // Error { - dol_syslog(get_class($this).'::run_triggers was called with wrong parameters action='.$action.' object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf), LOG_ERR); + $this->error='function run_triggers called with wrong parameters action='.$action.' object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf); + dol_syslog(get_class($this).'::run_triggers '.$this->error, LOG_ERR); + $this->errors[]=$this->error; return -1; } if (! is_object($user) || ! is_object($langs)) // Warning diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 35849720e7d..fda7aa00832 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -60,9 +60,13 @@ $userstatic=new User($db);
 
- - +
" /> @@ -77,7 +81,13 @@ $userstatic=new User($db);
">
- +
" /> @@ -109,7 +119,8 @@ $userstatic=new User($db);
- +
trans("Source"); ?>
@@ -123,7 +134,8 @@ $userstatic=new User($db); element == 'shipping' && is_object($objectsrc)) $tmpobject=$objectsrc; diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 8f540dd2ebd..b0f9ada3af7 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -144,6 +144,9 @@ if ($id > 0 || ! empty($ref)) print '
'; + if (! empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser=1; + if (! empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_THIPARTY)) $hideaddcontactforthirdparty=1; + // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; } diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index edd5372471e..56848fcb0bf 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -513,7 +513,7 @@ else if ($action == 'classifybilled' && $user->rights->ficheinter->creer) } else { - $mesg='
'.$object->error.'
'; + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1611,93 +1611,100 @@ else if ($id > 0 || ! empty($ref)) /* * Actions buttons */ + print '
'; - if ($user->societe_id == 0) + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been + // modified by hook + if (empty($reshook)) { - if ($action != 'editdescription' && ($action != 'presend')) + if ($user->societe_id == 0) { - // Validate - if ($object->statut == 0 && $user->rights->ficheinter->creer && (count($object->lines) > 0 || ! empty($conf->global->FICHINTER_DISABLE_DETAILS))) + if ($action != 'editdescription' && ($action != 'presend')) { - print ''; - } - - // Modify - if ($object->statut == 1 && $user->rights->ficheinter->creer) - { - print ''; - } - - // Send - if ($object->statut > 0) - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) + // Validate + if ($object->statut == 0 && $user->rights->ficheinter->creer && (count($object->lines) > 0 || ! empty($conf->global->FICHINTER_DISABLE_DETAILS))) { - print ''; + print ''; } - else print ''; - } - // Event agenda - if (! empty($conf->global->FICHINTER_ADDLINK_TO_EVENT)) - { - if (! empty($conf->agenda->enabled) && $object->statut > 0) + // Modify + if ($object->statut == 1 && $user->rights->ficheinter->creer) { - $langs->load("agenda"); + print ''; + } + + // Send + if ($object->statut > 0) + { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) + { + print ''; + } + else print ''; + } + + // Event agenda + if (! empty($conf->global->FICHINTER_ADDLINK_TO_EVENT)) + { + if (! empty($conf->agenda->enabled) && $object->statut > 0) + { + $langs->load("agenda"); + if ($object->statut < 2) + { + if ($user->rights->agenda->myactions->create) print ''; + else print ''; + } + } + } + + // Proposal + if (! empty($conf->propal->enabled) && $object->statut > 0) + { + $langs->load("propal"); if ($object->statut < 2) { - if ($user->rights->agenda->myactions->create) print ''; - else print ''; + if ($user->rights->propal->creer) print ''; + else print ''; } } - } - // Proposal - if (! empty($conf->propal->enabled) && $object->statut > 0) - { - $langs->load("propal"); - if ($object->statut < 2) + // Invoicing + if (! empty($conf->facture->enabled) && $object->statut > 0) { - if ($user->rights->propal->creer) print ''; - else print ''; - } - } - - // Invoicing - if (! empty($conf->facture->enabled) && $object->statut > 0) - { - $langs->load("bills"); - if ($object->statut < 2) - { - if ($user->rights->facture->creer) print ''; - else print ''; - } - - if (! empty($conf->global->FICHINTER_CLASSIFY_BILLED)) - { - if ($object->statut != 2) + $langs->load("bills"); + if ($object->statut < 2) { - print ''; + if ($user->rights->facture->creer) print ''; + else print ''; } - else + + if (! empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { - print ''; + if ($object->statut != 2) + { + print ''; + } + else + { + print ''; + } } } - } - // Delete - if (($object->statut == 0 && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) - { - print ''; - } + // Delete + if (($object->statut == 0 && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) + { + print ''; + } + } } } From 469ff4320a547d5160de751c66e416f055fa0ba5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Sep 2014 21:46:46 +0200 Subject: [PATCH 30/36] Uniformize export profiles. --- htdocs/core/modules/modCommande.class.php | 10 +++++++--- htdocs/core/modules/modPropale.class.php | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 7a9434ab934..545ae1b03a0 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -173,16 +173,20 @@ class modCommande extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("commande","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','co.label'=>'Country','co.code'=>"CountryCode",'s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note_public'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','co.label'=>'Country','co.code'=>"CountryCode",'s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note_public'=>"Note",'c.date_livraison'=>'DeliveryDate','c.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','c.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.label'=>'List:c_country:label:label','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.label'=>'List:c_country:label:label','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','co.label'=>'company','co.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // 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 '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'commande as c, '.MAIN_DB_PREFIX.'societe as s'; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; - $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commandedet as cd'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande as c'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON c.fk_user_author = uc.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uv ON c.fk_user_valid = uc.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_extrafields as extra ON c.rowid = extra.fk_object'; + $this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid'; $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_commande'; $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index e97005c37be..2a390118b72 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -169,7 +169,7 @@ class modPropale extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("propale","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','co.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note_public'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','co.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note_public'=>"Note",'c.date_livraison'=>'DeliveryDate','c.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','c.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','co.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note_public'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); @@ -178,7 +178,11 @@ class modPropale extends DolibarrModules $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s '; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; - $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'propal as c, '.MAIN_DB_PREFIX.'propaldet as cd'; + $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'propal as c'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON c.fk_user_author = uc.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uv ON c.fk_user_valid = uc.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'propal_extrafields as extra ON c.rowid = extra.fk_object'; + $this->export_sql_end[$r] .=', '.MAIN_DB_PREFIX.'propaldet as cd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)'; $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal'; $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; From e163b0237fccdbc99a981f2da1dfd27159d17df1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Sep 2014 23:39:26 +0200 Subject: [PATCH 31/36] Merge branch 'develop' of github.com:aspangaro/dolibarr into aspangaro-develop Conflicts: htdocs/fichinter/card.php --- htdocs/fichinter/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 91f1d51bf26..a300d11219d 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1626,14 +1626,14 @@ else if ($id > 0 || ! empty($ref)) // Validate if ($object->statut == 0 && $user->rights->ficheinter->creer && (count($object->lines) > 0 || ! empty($conf->global->FICHINTER_DISABLE_DETAILS))) { - print ''; } // Modify if ($object->statut == 1 && $user->rights->ficheinter->creer) { - print '
'; + print ''; @@ -1657,7 +1657,7 @@ else if ($id > 0 || ! empty($ref)) $langs->load("agenda"); if ($object->statut < 2) { - if ($user->rights->agenda->myactions->create) print ''; + if ($user->rights->agenda->myactions->create) print ''; else print ''; } } From aba4c90d2b11eaf7de92d962e98092a3af4ae9a7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Sep 2014 11:23:57 +0200 Subject: [PATCH 32/36] Trans --- htdocs/langs/fr_FR/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 08cc727600a..4bfd1addf7e 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -645,7 +645,7 @@ OptionalFieldsSetup=Configuration des attributs complémentaires URLPhoto=URL de la photo/logo SetLinkToThirdParty=Lier vers un autre tiers CreateDraft=Créer brouillon -SetToDraft=Back to draft +SetToDraft=Retour en brouillon ClickToEdit=Cliquer ici pour éditer ObjectDeleted=Objet %s supprimé ByCountry=Par pays From 640bf7c34b2d49c2d2815a1370f7938bab381d94 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Sep 2014 12:18:42 +0200 Subject: [PATCH 33/36] Uniformize field name --- htdocs/comm/action/card.php | 14 +++--- htdocs/comm/action/class/actioncomm.class.php | 49 +++++++++++++------ htdocs/comm/action/peruser.php | 2 +- .../install/mysql/migration/3.6.0-3.7.0.sql | 6 ++- .../mysql/tables/llx_actioncomm_resources.sql | 10 ++-- 5 files changed, 52 insertions(+), 29 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0e6a6c6fd10..237c55e7678 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -105,11 +105,11 @@ if (! empty($_POST['removedassigned'])) if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) { // Add a new user - if (GETPOST('affectedto') > 0) + if (GETPOST('assignedtouser') > 0) { $assignedtouser=array(); if (! empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); - $assignedtouser[GETPOST('affectedto')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1); + $assignedtouser[GETPOST('assignedtouser')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1); $_SESSION['assignedtouser']=dol_json_encode($assignedtouser); } $donotclearsession=1; @@ -647,11 +647,11 @@ if ($action == 'create') print '
'.$langs->trans("ActionAffectedTo").''; if (empty($donotclearsession)) { - $assignedtouser=GETPOST("affectedtouser")?GETPOST("affectedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id); + $assignedtouser=GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id); $_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('transparency'=>1,'mandatory'=>1))); } - print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'affectedto',1); - //print $form->select_dolusers(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); + print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'assignedtouser',1); + //print $form->select_dolusers(GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); print '
'; @@ -904,8 +904,8 @@ if ($id > 0) if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency); $_SESSION['assignedtouser']=dol_json_encode($listofuserid); } - print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'affectedto',1); - //print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'affectedto',1); + print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'assignedtouser',1); + //print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'assignedtouser',1); print '


'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 731d82dba2f..f1acf8c29b4 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -211,22 +211,43 @@ class ActionComm extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."actioncomm","id"); - // Actions on extra fields (by external module or standard code) - $hookmanager->initHooks(array('actioncommdao')); - $parameters=array('actcomm'=>$this->id); - $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if (empty($reshook)) + // Now insert assignedusers + if (! $error) + { + foreach($this->userassigned as $key => $val) + { + $sql ="INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)"; + $sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", 0, ".$val['transparency'].", 0)"; + + $resql = $this->db->query($sql); + if (! $resql) + { + $error++; + $this->errors[]=$this->db->lasterror(); + } + //var_dump($sql);exit; + } + } + + if (! $error) { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + // Actions on extra fields (by external module or standard code) + $hookmanager->initHooks(array('actioncommdao')); + $parameters=array('actcomm'=>$this->id); + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($reshook)) + { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + } + else if ($reshook < 0) $error++; } - else if ($reshook < 0) $error++; if (! $error && ! $notrigger) { diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index abd8b71a699..22f968e2b4a 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -656,7 +656,7 @@ jQuery(document).ready(function() { if (ids == \'none\') /* No event */ { /* alert(\'no event\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/card.php?action=create&affectedto="+userid+"&datep="+year+month+day+hour+min+"00&backtopage='.urlencode($_SERVER["PHP_SELF"].'?year='.$year.'&month='.$month.'&day='.$day).'" + url = "'.DOL_URL_ROOT.'/comm/action/card.php?action=create&assignedtouser="+userid+"&datep="+year+month+day+hour+min+"00&backtopage='.urlencode($_SERVER["PHP_SELF"].'?year='.$year.'&month='.$month.'&day='.$day).'" window.location.href = url; } else if (ids.indexOf(",") > -1) /* There is several events */ diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index dab26d32934..0ae4ee8bd22 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -131,6 +131,8 @@ ALTER TABLE llx_user ADD COLUMN weeklyhours double(16,8); ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date; +ALTER TABLE llx_actioncomm_resources CHANGE COLUMN transparent transparency smallint default 1; + -- Localtaxes by thirds ALTER TABLE llx_c_tva MODIFY COLUMN localtax1 varchar(10); @@ -1071,11 +1073,11 @@ CREATE TABLE llx_fichinterdet_extrafields ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields (fk_object); -CREATE TABLE IF NOT EXISTS llx_usergroup_extrafields ( +CREATE TABLE llx_usergroup_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, fk_object integer NOT NULL, import_key varchar(14) -- import key -) ENGINE=InnoDB ; +) ENGINE=innodb; ALTER TABLE llx_usergroup_extrafields ADD INDEX idx_usergroup_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql index bd48ad4f66d..484cd39fb82 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -23,10 +23,10 @@ create table llx_actioncomm_resources ( rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_actioncomm integer NOT NULL, - element_type varchar(50) NOT NULL, - fk_element integer NOT NULL, + fk_actioncomm integer NOT NULL, -- Id into llx_actioncomm + element_type varchar(50) NOT NULL, -- Type of resource ('user', 'resource') + fk_element integer NOT NULL, -- Id into table llx_user or llx_resource answer_status varchar(50) NULL, - mandatory smallint, - transparent smallint + mandatory smallint, + transparency smallint default 1 -- Used to say if event is 1=OPAQUE=busy or 0=TRANSPARENT ) ENGINE=innodb; From 7224f642240638205a99333d0066b45981e3da86 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Sep 2014 16:15:15 +0200 Subject: [PATCH 34/36] Work on multi user for events. Fix: Modules must be reloaded after migration. --- htdocs/comm/action/card.php | 92 +++++++++++++------ htdocs/comm/action/class/actioncomm.class.php | 55 ++++++++++- htdocs/core/class/html.form.class.php | 33 +++++-- htdocs/core/lib/json.lib.php | 2 +- htdocs/install/upgrade2.php | 4 +- 5 files changed, 141 insertions(+), 45 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 237c55e7678..7ca82a2751e 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -93,7 +93,10 @@ if (! empty($_POST['removedassigned'])) $idtoremove=$_POST['removedassigned']; if (! empty($_SESSION['assignedtouser'])) $tmpassigneduserids=dol_json_decode($_SESSION['assignedtouser'],1); else $tmpassigneduserids=array(); - unset($tmpassigneduserids[$idtoremove]); + foreach ($tmpassigneduserids as $key => $val) + { + if ($val['id'] == $idtoremove) unset($tmpassigneduserids[$key]); + } //var_dump($_POST['removedassigned']);exit; $_SESSION['assignedtouser']=dol_json_encode($tmpassigneduserids); $donotclearsession=1; @@ -108,8 +111,11 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) if (GETPOST('assignedtouser') > 0) { $assignedtouser=array(); - if (! empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); - $assignedtouser[GETPOST('assignedtouser')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1); + if (! empty($_SESSION['assignedtouser'])) + { + $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); + } + $assignedtouser[GETPOST('assignedtouser')]=array('id'=>GETPOST('assignedtouser'), 'transparency'=>GETPOST('transparency'),'mandatory'=>1); $_SESSION['assignedtouser']=dol_json_encode($assignedtouser); } $donotclearsession=1; @@ -202,22 +208,23 @@ if ($action == 'add') $object->percentage = $percentage; $object->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60; - $listofuserid=dol_json_decode($_SESSION['assignedtouser']); + $listofuserid=array(); + if (! empty($_SESSION['assignedtouser'])) $listofuserid=dol_json_decode($_SESSION['assignedtouser']); $i=0; foreach($listofuserid as $key => $value) { if ($i == 0) // First entry { $usertodo=new User($db); - if ($key > 0) + if ($value['id'] > 0) { - $usertodo->fetch($key); + $usertodo->fetch($value['id']); } $object->usertodo = $usertodo; $object->transparency = (GETPOST("transparency")=='on'?1:0); } - $object->userassigned[$key]=array('id'=>$key, 'transparency'=>(GETPOST("transparency")=='on'?1:0)); + $object->userassigned[$value['id']]=array('id'=>$value['id'], 'transparency'=>(GETPOST("transparency")=='on'?1:0)); $i++; } @@ -281,6 +288,8 @@ if ($action == 'add') { if (! $object->error) { + unset($_SESSION['assignedtouser']); + $db->commit(); if (! empty($backtopage)) { @@ -337,6 +346,7 @@ if ($action == 'update') if ($p2min == -1) $p2min='0'; $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"]); @@ -363,26 +373,26 @@ if ($action == 'update') setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")),$object->errors,'errors'); $action = 'edit'; } - // Users - $listofuserid=dol_json_decode($_SESSION['assignedtouser']); - $i=0; - foreach($listofuserid as $key => $value) + $listofuserid=array(); + //$assignedtouser=(GETPOST("assignedtouser") >0)?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : 0); + $assignedtouser=(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : 0); + if ($assignedtouser) $listofuserid[$assignedtouser]=array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>$object->transparency); // Owner first + + if (! empty($_SESSION['assignedtouser'])) { - if ($i == 0) // First entry + // Restore array with key with same value than param 'id' + $tmplist1=dol_json_decode($_SESSION['assignedtouser'], true); $tmplist2=array(); + foreach($tmplist1 as $key => $val) { - $usertodo=new User($db); - if ($key > 0) - { - $usertodo->fetch($key); - } - $object->usertodo = $usertodo; - $object->transparency=(GETPOST("transparency")=='on'?1:0); + if ($val['id'] && $val['id'] != $assignedtouser) $listofuserid[$val['id']]=$val; } + } - $object->userassigned[$key]=array('id'=>$key, 'transparency'=>(GETPOST("transparency")=='on'?1:0)); - - $i++; + $object->userassigned=array(); // Clear old content + foreach($listofuserid as $key => $val) + { + $object->userassigned[$val['id']]=array('id'=>$val['id'], 'mandatory'=>0, 'transparency'=>(GETPOST("transparency")=='on'?1:0)); } if (! empty($conf->global->AGENDA_ENABLE_DONEBY)) @@ -424,6 +434,8 @@ if ($action == 'update') if ($result > 0) { + unset($_SESSION['assignedtouser']); + $db->commit(); } else @@ -438,6 +450,7 @@ if ($action == 'update') { if (! empty($backtopage)) { + unset($_SESSION['assignedtouser']); header("Location: ".$backtopage); exit; } @@ -474,6 +487,8 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') if ($action == 'mupdate') { $object->fetch($id); + $object->fetch_userassigned(); + $shour = dol_print_date($object->datep,"%H"); $smin = dol_print_date($object->datep, "%M"); @@ -645,11 +660,19 @@ if ($action == 'create') // Assigned to print ''; @@ -771,10 +794,11 @@ if ($action == 'create') // View or edit if ($id > 0) { - $result=$object->fetch($id); - $object->fetch_optionals($id,$extralabels); + $result1=$object->fetch($id); + $result2=$object->fetch_userassigned(); + $result3=$object->fetch_optionals($id,$extralabels); - if ($result < 0) + if ($result1 < 0 || $result2 < 0 || $result3 < 0) { dol_print_error($db,$object->error); exit; @@ -901,7 +925,8 @@ if ($id > 0) $listofuserid=array(); if (empty($donotclearsession)) { - if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency); + if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency); // Owner first + $listofuserid=array_merge($listofuserid,$object->userassigned); $_SESSION['assignedtouser']=dol_json_encode($listofuserid); } print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'assignedtouser',1); @@ -1094,8 +1119,17 @@ if ($id > 0) } // Assigned to - print ''; print '
'.$langs->trans("ActionAffectedTo").''; + $listofuserid=array(); if (empty($donotclearsession)) { $assignedtouser=GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id); - $_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('transparency'=>1,'mandatory'=>1))); + if ($assignedtouser) $listofuserid[$assignedtouser]=array('id'=>$assignedtouser,'mandatory'=>0,'transparency'=>$object->transparency); // Owner first + $_SESSION['assignedtouser']=dol_json_encode($listofuserid); } + /* + if (empty($donotclearsession)) + { + $assignedtouser=GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id); + $_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('id'=>$assignedtouser,'transparency'=>1,'mandatory'=>1))); + }*/ print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'assignedtouser',1); //print $form->select_dolusers(GETPOST("assignedtouser")?GETPOST("assignedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); print '
'.$langs->trans("ActionAffectedTo").''; - if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1); + //if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1); + print '
'.$langs->trans("ActionAffectedTo").''; + $listofuserid=array(); + if (empty($donotclearsession)) + { + if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency); // Owner first + $listofuserid=array_merge($listofuserid,$object->userassigned); + $_SESSION['assignedtouser']=dol_json_encode($listofuserid); + //var_dump($_SESSION['assignedtouser']); + } + print $form->select_dolusers_forevent('view','assignedtouser',1); print '


'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index f1acf8c29b4..b12dc5fb702 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -62,7 +62,7 @@ class ActionComm extends CommonObject var $priority; // Small int (0 By default) var $note; // Description - var $userassigned; // Array of user ids + var $userassigned = array(); // Array of user ids var $usertodo; // Object user of owner var $userdone; // Object user that did action (deprecated) @@ -217,7 +217,7 @@ class ActionComm extends CommonObject foreach($this->userassigned as $key => $val) { $sql ="INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)"; - $sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", 0, ".$val['transparency'].", 0)"; + $sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".($val['mandatory']?$val['mandatory']:'0').", ".($val['transparency']?$val['transparency']:'0').", ".($val['answer_status']?$val['answer_status']:'0').")"; $resql = $this->db->query($sql); if (! $resql) @@ -375,6 +375,34 @@ class ActionComm extends CommonObject } } + + /** + * Initialize this->userassigned array + * + * @return int <0 if KO, >0 if OK + */ + function fetch_userassigned() + { + global $langs; + $sql.="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; + $sql.=" FROM ".MAIN_DB_PREFIX."actioncomm_resources"; + $sql.=" WHERE element_type = 'user' AND fk_actioncomm = ".$this->id; + $resql2=$this->db->query($sql); + if ($resql2) + { + while ($obj = $this->db->fetch_object($resql2)) + { + $this->userassigned[$obj->fk_element]=array('id'=>$obj->fk_element, 'mandatory'=>$obj->mandatory, 'answer_status'=>$obj->answer_status, 'transparency'=>$obj->transparency); + } + return 1; + } + else + { + dol_print_error($this->db); + return -1; + } + } + /** * Delete event from database * @@ -519,7 +547,28 @@ class ActionComm extends CommonObject } else if ($reshook < 0) $error++; - if (! $notrigger) + // Now insert assignedusers + if (! $error) + { + $sql ="DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources where fk_actioncomm = ".$this->id." AND element_type = 'user'"; + $resql = $this->db->query($sql); + + foreach($this->userassigned as $key => $val) + { + $sql ="INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)"; + $sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".($val['manadatory']?$val['manadatory']:'0').", ".($val['transparency']?$val['transparency']:'0').", ".($val['answer_status']?$val['answer_status']:'0').")"; + + $resql = $this->db->query($sql); + if (! $resql) + { + $error++; + $this->errors[]=$this->db->lasterror(); + } + //var_dump($sql);exit; + } + } + + if (! $error && ! $notrigger) { // Call trigger $result=$this->call_trigger('ACTION_MODIFY',$user); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 357270efb2d..08f384612f7 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1275,6 +1275,7 @@ class Form /** * Return select list of users. Selected users are stored into session. + * List of users are provided into $_SESSION['assignedtouser']. * * @param string $action Value for $action * @param string $htmlname Field name in form @@ -1295,23 +1296,35 @@ class Form global $conf,$user,$langs; $userstatic=new User($this->db); + $out=''; // Method with no ajax //$out.=''; - $out.=''; - $out.=''; - $out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); - $out.=''; + if ($action == 'view') + { + $out.=''; + } + else + { + $out.=''; + $out.=''; + $out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); + $out.=''; + } $assignedtouser=array(); - if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); - if (count($assignedtouser)) $out.='
'; - $i=0; + if (!empty($_SESSION['assignedtouser'])) + { + $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); + } + if (count($assignedtouser) && $action != 'view') $out.='
'; + $i=0; $ownerid=0; foreach($assignedtouser as $key => $value) { - $userstatic->fetch($key); + if ($value['id'] == $ownerid) continue; + $userstatic->fetch($value['id']); $out.=$userstatic->getNomUrl(1); - if ($i == 0) $out.=' ('.$langs->trans("Owner").')'; - $out.=' '; + if ($i == 0) { $ownerid = $value['id']; $out.=' ('.$langs->trans("Owner").')'; } + if ($i > 0 && $action != 'view') $out.=' '; //$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional")); //$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy")); $out.='
'; diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index 69dbb4eba1a..ba7f4cd3f90 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -254,7 +254,7 @@ function dol_json_decode($json, $assoc=false) foreach ($array as $key => $value) { - $object->{$key} = $value; + if ($key) $object->{$key} = $value; } return $object; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index f9fa76541a5..0bf76c7d729 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -343,8 +343,8 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) // No specific scripts // Tasks to do always and only into last targeted version - $afterversionarray=explode('.','3.4.9'); // target is after this - $beforeversionarray=explode('.','3.5.9'); // target is before this + $afterversionarray=explode('.','3.6.9'); // target is after this + $beforeversionarray=explode('.','3.7.9'); // target is before this if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { // Reload modules (this must be always and only into last targeted version) From dd864530201d3eb3c2ae9e5dfe3da26276898c8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Sep 2014 17:54:03 +0200 Subject: [PATCH 35/36] Add field color into table of type of events --- htdocs/admin/dict.php | 8 ++++---- htdocs/comm/action/class/actioncomm.class.php | 3 ++- htdocs/comm/action/peruser.php | 16 +++++++++++++++- htdocs/core/class/html.form.class.php | 6 ++++-- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 2 ++ htdocs/install/mysql/tables/llx_c_actioncomm.sql | 3 ++- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d9ebddf2b22..dd8fa456600 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -133,7 +133,7 @@ $tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libe $tabsql[3] = "SELECT r.rowid as rowid, r.code_region as code, r.nom as libelle, r.fk_pays as country_id, c.code as country_code, c.label as country, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_country as c WHERE r.fk_pays=c.rowid and c.active=1"; $tabsql[4] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_country"; $tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.label, c.active FROM ".MAIN_DB_PREFIX."c_civility AS c"; -$tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a"; +$tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.color, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a"; $tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, c.code as country_code, c.label as country, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_pays=c.rowid and c.active=1"; $tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country as country_id, c.code as country_code, c.label as country, t.active FROM ".MAIN_DB_PREFIX."c_typent as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON t.fk_country=c.rowid"; $tabsql[9] = "SELECT code_iso as code, label, unicode, active FROM ".MAIN_DB_PREFIX."c_currencies"; @@ -187,7 +187,7 @@ $tabfield[2] = "code,libelle,region_id,region,country"; // "code,libelle,regio $tabfield[3] = "code,libelle,country_id,country"; $tabfield[4] = "code,label"; $tabfield[5] = "code,label"; -$tabfield[6] = "code,libelle,type,position"; +$tabfield[6] = "code,libelle,type,color,position"; $tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; @@ -214,7 +214,7 @@ $tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region" $tabfieldvalue[3] = "code,libelle,country"; $tabfieldvalue[4] = "code,label"; $tabfieldvalue[5] = "code,label"; -$tabfieldvalue[6] = "code,libelle,type,position"; +$tabfieldvalue[6] = "code,libelle,type,color,position"; $tabfieldvalue[7] = "code,libelle,country,accountancy_code,deductible"; $tabfieldvalue[8] = "code,libelle,country"; $tabfieldvalue[9] = "code,label,unicode"; @@ -241,7 +241,7 @@ $tabfieldinsert[2] = "code_departement,nom,fk_region"; $tabfieldinsert[3] = "code_region,nom,fk_pays"; $tabfieldinsert[4] = "code,label"; $tabfieldinsert[5] = "code,label"; -$tabfieldinsert[6] = "code,libelle,type,position"; +$tabfieldinsert[6] = "code,libelle,type,color,position"; $tabfieldinsert[7] = "code,libelle,fk_pays,accountancy_code,deductible"; $tabfieldinsert[8] = "code,libelle,fk_country"; $tabfieldinsert[9] = "code_iso,label,unicode"; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index b12dc5fb702..ffe07614b7d 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -66,11 +66,12 @@ class ActionComm extends CommonObject var $usertodo; // Object user of owner var $userdone; // Object user that did action (deprecated) + var $socid; + var $contactid; var $societe; // Company linked to action (optional) var $contact; // Contact linked to action (optional) var $fk_project; // Id of project (optional) - // Properties for links to other objects var $fk_element; // Id of record var $elementtype; // Type of record. This if property ->element of object linked to. diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 22f968e2b4a..f6a616d3496 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -410,6 +410,8 @@ if ($resql) $event->location=$obj->location; $event->transparency=$obj->transparency; + $event->socid=$obj->fk_soc; + $event->contactid=$obj->fk_contact; $event->societe->id=$obj->fk_soc; $event->contact->id=$obj->fk_contact; @@ -779,7 +781,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & } //$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; - // Show rect of event + // Define all rects with event (cases1 is first half hour, cases2 is second half hour) for ($h = $begin_h; $h < $end_h; $h++) { $color = ''; //init @@ -797,12 +799,22 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $busy=$event->transparency; $cases1[$h][$event->id]['busy']=$busy; $cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour').' - '.dol_print_date($event->date_end_in_calendar,'dayhour').' - '.$event->label; + $cases1[$h][$event->id]['typecode']=$event->type_code; + if ($event->socid) + { + $cases1[$h][$event->id]['string'].='xxx'; + } } if ($event->date_start_in_calendar < $c && $dateendtouse > $b) { $busy=$event->transparency; $cases2[$h][$event->id]['busy']=$busy; $cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour').' - '.dol_print_date($event->date_end_in_calendar,'dayhour').' - '.$event->label; + $cases1[$h][$event->id]['typecode']=$event->type_code; + if ($event->socid) + { + $cases2[$h][$event->id]['string'].='xxx'; + } } } else @@ -812,6 +824,8 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $cases2[$h][$event->id]['busy']=$busy; $cases1[$h][$event->id]['string']=$event->label; $cases2[$h][$event->id]['string']=$event->label; + $cases1[$h][$event->id]['typecode']=$event->type_code; + $cases2[$h][$event->id]['typecode']=$event->type_code; break; } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 08f384612f7..0233706928c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -804,8 +804,10 @@ class Form // Construct $out and $outarray $out.= 'attribute_required [$key])) - print ' class="fieldrequired"'; + if (! empty($extrafields->attribute_required [$key])) print ' class="fieldrequired"'; print '>' . $label . ''; - $colspan='0'; - } - else - { - $out .= ''; - } - // Convert date into timestamp format - if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) - { - $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->db->jdate($this->array_options['options_'.$key]); - } - - if($extrafields->attribute_required[$key]) - $label = ''.$label.''; - - $out .= ''; - $out .=''; - - switch($mode) { - case "view": - $out .= $extrafields->showOutputField($key,$value); - break; - case "edit": - $out .= $extrafields->showInputField($key,$value,'',$keyprefix); - break; - } - - $out .= ''."\n"; - - if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; - else $out .= ''; - $e++; - } - } - $out .= "\n"; - $out .= ' '; - $out .= ' - '; - } - return $out; - } - - /** * Function to check if an object is used by others. * Check is done into this->childtables. There is no check into llx_element_element. @@ -3473,38 +3152,6 @@ abstract class CommonObject } } - /** - * Call trigger based on this instance - * NB: Error from trigger are stacked in interface->errors - * NB2: If return code of triggers are < 0, action calling trigger should cancel all transaction. - * - * @param string $trigger_name trigger's name to execute - * @param User $user Object user - * @return int Result of run_triggers - */ - function call_trigger($trigger_name, $user) - { - global $langs,$conf; - - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers($trigger_name,$this,$user,$langs,$conf); - - if ($result < 0) - { - if (!empty($this->errors)) - { - $this->errors=array_merge($this->errors,$interface->errors); - } - else - { - $this->errors=$interface->errors; - } - } - - return $result; - } - /** * Common function for all objects extending CommonObject for generating documents * @@ -3597,4 +3244,366 @@ abstract class CommonObject } } + + /* Functions common to commonobject and commonobjectline */ + + + /* For triggers */ + + + /** + * Call trigger based on this instance + * NB: Error from trigger are stacked in interface->errors + * NB2: If return code of triggers are < 0, action calling trigger should cancel all transaction. + * + * @param string $trigger_name trigger's name to execute + * @param User $user Object user + * @return int Result of run_triggers + */ + function call_trigger($trigger_name, $user) + { + global $langs,$conf; + + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers($trigger_name,$this,$user,$langs,$conf); + + if ($result < 0) + { + if (!empty($this->errors)) + { + $this->errors=array_merge($this->errors,$interface->errors); + } + else + { + $this->errors=$interface->errors; + } + } + + return $result; + } + + + /* Functions for extrafields */ + + + /** + * Function to get extra fields of a member into $this->array_options + * This method is in most cases called by method fetch of objects but you can call it separately. + * + * @param int $rowid Id of line + * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label() + * @return int <0 if error, 0 if no optionals to find nor found, 1 if a line is found and optional loaded + */ + function fetch_optionals($rowid='',$optionsArray='') + { + if (empty($rowid)) $rowid=$this->id; + + if (! is_array($optionsArray)) + { + // optionsArray not already loaded, so we load it + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + $extrafields = new ExtraFields($this->db); + $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); + } + + // Request to get complementary values + if (count($optionsArray) > 0) + { + $sql = "SELECT rowid"; + foreach ($optionsArray as $name => $label) + { + $sql.= ", ".$name; + } + $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields"; + $sql.= " WHERE fk_object = ".$rowid; + + dol_syslog(get_class($this)."::fetch_optionals", LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + $numrows=$this->db->num_rows($resql); + if ($numrows) + { + $tab = $this->db->fetch_array($resql); + + foreach ($tab as $key => $value) + { + // Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine) + if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key)) + { + // we can add this attribute to adherent object + $this->array_options["options_".$key]=$value; + } + } + } + + $this->db->free($resql); + + if ($numrows) return $numrows; + else return 0; + } + else + { + dol_print_error($this->db); + return -1; + } + } + return 0; + } + + /** + * Delete all extra fields values for the current object. + * + * @return int <0 if KO, >0 if OK + */ + function deleteExtraFields() + { + global $langs; + + $error=0; + + $this->db->begin(); + + $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; + dol_syslog(get_class($this)."::deleteExtraFields delete", LOG_DEBUG); + $resql=$this->db->query($sql_del); + if (! $resql) + { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + else + { + $this->db->commit(); + return 1; + } + } + + /** + * Add/Update all extra fields values for the current object. + * All data to describe values to insert are stored into $this->array_options=array('keyextrafield'=>'valueextrafieldtoadd') + * + * @return int -1=error, O=did nothing, 1=OK + */ + function insertExtraFields() + { + global $conf,$langs; + + $error=0; + + if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used + + if (! empty($this->array_options)) + { + // Check parameters + $langs->load('admin'); + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + $extrafields = new ExtraFields($this->db); + $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); + + foreach($this->array_options as $key => $value) + { + $attributeKey = substr($key,8); // Remove 'options_' prefix + $attributeType = $extrafields->attribute_type[$attributeKey]; + $attributeSize = $extrafields->attribute_size[$attributeKey]; + $attributeLabel = $extrafields->attribute_label[$attributeKey]; + switch ($attributeType) + { + case 'int': + if (!is_numeric($value) && $value!='') + { + $error++; $this->errors[]=$langs->trans("ExtraFieldHasWrongValue",$attributeLabel); + return -1; + } + elseif ($value=='') + { + $this->array_options[$key] = null; + } + break; + case 'price': + $this->array_options[$key] = price2num($this->array_options[$key]); + break; + case 'date': + $this->array_options[$key]=$this->db->idate($this->array_options[$key]); + break; + case 'datetime': + $this->array_options[$key]=$this->db->idate($this->array_options[$key]); + break; + } + } + $this->db->begin(); + + $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; + dol_syslog(get_class($this)."::insertExtraFields delete", LOG_DEBUG); + $this->db->query($sql_del); + $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."_extrafields (fk_object"; + foreach($this->array_options as $key => $value) + { + $attributeKey = substr($key,8); // Remove 'options_' prefix + // Add field of attribut + if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate + $sql.=",".$attributeKey; + } + $sql .= ") VALUES (".$this->id; + foreach($this->array_options as $key => $value) + { + $attributeKey = substr($key,8); // Remove 'options_' prefix + // Add field o fattribut + if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate) + { + if ($this->array_options[$key] != '') + { + $sql.=",'".$this->db->escape($this->array_options[$key])."'"; + } + else + { + $sql.=",null"; + } + } + } + $sql.=")"; + + dol_syslog(get_class($this)."::insertExtraFields insert", LOG_DEBUG); + $resql = $this->db->query($sql); + if (! $resql) + { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + else + { + $this->db->commit(); + return 1; + } + } + else return 0; + } + + /** + * Function to show lines of extrafields with output datas + * + * @param object $extrafields Extrafield Object + * @param string $mode Show output (view) or input (edit) for extrafield + * @param array $params Optionnal parameters + * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) + * + * @return string + */ + function showOptionals($extrafields, $mode='view', $params=0, $keyprefix='') + { + global $_POST, $conf; + + $out = ''; + + if (count($extrafields->attribute_label) > 0) + { + $out .= "\n"; + $out .= ' '; + $out .= "\n"; + + $e = 0; + foreach($extrafields->attribute_label as $key=>$label) + { + if (is_array($params) && count($params)>0) { + if (array_key_exists('colspan',$params)) { + $colspan=$params['colspan']; + } + }else { + $colspan='3'; + } + switch($mode) { + case "view": + $value=$this->array_options["options_".$key]; + break; + case "edit": + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]); + break; + } + if ($extrafields->attribute_type[$key] == 'separate') + { + $out .= $extrafields->showSeparator($key); + } + else + { + $csstyle=''; + if (is_array($params) && count($params)>0) { + if (array_key_exists('style',$params)) { + $csstyle=$params['style']; + } + } + if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) + { + $out .= ''; + $colspan='0'; + } + else + { + $out .= ''; + } + // Convert date into timestamp format + if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + { + $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->db->jdate($this->array_options['options_'.$key]); + } + + if($extrafields->attribute_required[$key]) + $label = ''.$label.''; + + $out .= ''; + $out .=''; + + switch($mode) { + case "view": + $out .= $extrafields->showOutputField($key,$value); + break; + case "edit": + $out .= $extrafields->showInputField($key,$value,'',$keyprefix); + break; + } + + $out .= ''."\n"; + + if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; + else $out .= ''; + $e++; + } + } + $out .= "\n"; + $out .= ' '; + $out .= ' + '; + } + return $out; + } + } diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 675e1cf0794..c3c8d823a34 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -26,36 +26,12 @@ * Parent class for class inheritance lines of business objects * This class is useless for the moment so no inherit are done on it */ -abstract class CommonObjectLine +abstract class CommonObjectLine extends CommonObject { - /** - * Call trigger based on this instance - * NB: Error from trigger are stacked in interface->errors - * NB2: If return code of triggers are < 0, action calling trigger should cancel all transaction. - * - * @param string $trigger_name trigger's name to execute - * @param User $user Object user - * @return int Result of run_triggers - */ - function call_trigger($trigger_name, $user) - { - global $langs,$conf; + // TODO - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers($trigger_name,$this,$user,$langs,$conf); - if ($result < 0) - { - if (!empty($this->errors)) - { - $this->errors=array_merge($this->errors,$interface->errors); - } - else - { - $this->errors=$interface->errors; - } - } - return $result; - } + // Currently we need function at end of file CommonObject for all object lines. Should find a way to avoid duplicate code. + + // For the moment we use the extends on CommonObject until PHP min is 5.4 so use Traits. } diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index c56ffc30aea..777732aa192 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -194,7 +194,8 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0; showOptionals($extrafieldsline,'view',array('style'=>$bcdd[$var],'colspan'=>$coldisplay)); } ?>
'; // Convert date into timestamp format if (in_array($extrafields->attribute_type [$key], array('date','datetime'))) { $value = isset($_POST ["options_" . $key]) ? dol_mktime($_POST ["options_" . $key . "hour"], $_POST ["options_" . $key . "min"], 0, $_POST ["options_" . $key . "month"], $_POST ["options_" . $key . "day"], $_POST ["options_" . $key . "year"]) : $db->jdate($object->array_options ['options_' . $key]); } - if ($action == 'edit_extras' && $user->rights->propal->creer && GETPOST('attribute') == $key) { + if ($action == 'edit_extras' && $user->rights->propal->creer && GETPOST('attribute') == $key) + { print ''; print ''; print ''; @@ -2041,7 +2051,9 @@ if ($action == 'create') print ''; print ''; - } else { + } + else + { print $extrafields->showOutputField($key, $value); if ($object->statut == 0 && $user->rights->propal->creer) print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f5d20936052..193443dd64d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -34,9 +34,9 @@ */ include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php'; -require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT .'/societe/class/client.class.php'; -require_once DOL_DOCUMENT_ROOT .'/margin/lib/margins.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; +require_once DOL_DOCUMENT_ROOT.'/margin/lib/margins.lib.php'; /** @@ -3263,11 +3263,10 @@ class Facture extends CommonInvoice /** - * \class FactureLigne - * \brief Classe permettant la gestion des lignes de factures - * Gere des lignes de la table llx_facturedet + * Class to manage invoice lines. + * Saved into database table llx_facturedet */ -class FactureLigne extends CommonInvoiceLine +class FactureLigne extends CommonInvoiceLine { var $db; var $error; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index f44efafbffa..90ad3e196e3 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -358,10 +358,14 @@ abstract class CommonInvoice extends CommonObject } } + + +require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php'; + /** * Parent class of all other business classes for details of elements (invoices, contracts, proposals, orders, ...) */ -abstract class CommonInvoiceLine extends CommonObject +abstract class CommonInvoiceLine extends CommonObjectLine { } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 60e59222c9e..e8dcce57ac4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2153,327 +2153,6 @@ abstract class CommonObject } } - - /** - * Function to get extra fields of a member into $this->array_options - * This method is in most cases called by method fetch of objects but you can call it separately. - * - * @param int $rowid Id of line - * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label() - * @return int <0 if error, 0 if no optionals to find nor found, 1 if a line is found and optional loaded - */ - function fetch_optionals($rowid='',$optionsArray='') - { - if (empty($rowid)) $rowid=$this->id; - - if (! is_array($optionsArray)) - { - // optionsArray not already loaded, so we load it - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); - } - - // Request to get complementary values - if (count($optionsArray) > 0) - { - $sql = "SELECT rowid"; - foreach ($optionsArray as $name => $label) - { - $sql.= ", ".$name; - } - $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields"; - $sql.= " WHERE fk_object = ".$rowid; - - dol_syslog(get_class($this)."::fetch_optionals", LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - $numrows=$this->db->num_rows($resql); - if ($numrows) - { - $tab = $this->db->fetch_array($resql); - - foreach ($tab as $key => $value) - { - // Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine) - if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key)) - { - // we can add this attribute to adherent object - $this->array_options["options_".$key]=$value; - } - } - } - - $this->db->free($resql); - - if ($numrows) return $numrows; - else return 0; - } - else - { - dol_print_error($this->db); - return -1; - } - } - return 0; - } - - /** - * Delete all extra fields values for the current object. - * - * @return int <0 if KO, >0 if OK - */ - function deleteExtraFields() - { - global $langs; - - $error=0; - - $this->db->begin(); - - $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::deleteExtraFields delete", LOG_DEBUG); - $resql=$this->db->query($sql_del); - if (! $resql) - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -1; - } - else - { - $this->db->commit(); - return 1; - } - } - - /** - * Add/Update all extra fields values for the current object. - * All data to describe values to insert are stored into $this->array_options=array('keyextrafield'=>'valueextrafieldtoadd') - * - * @return int -1=error, O=did nothing, 1=OK - */ - function insertExtraFields() - { - global $conf,$langs; - - $error=0; - - if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used - - if (! empty($this->array_options)) - { - // Check parameters - $langs->load('admin'); - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); - - foreach($this->array_options as $key => $value) - { - $attributeKey = substr($key,8); // Remove 'options_' prefix - $attributeType = $extrafields->attribute_type[$attributeKey]; - $attributeSize = $extrafields->attribute_size[$attributeKey]; - $attributeLabel = $extrafields->attribute_label[$attributeKey]; - switch ($attributeType) - { - case 'int': - if (!is_numeric($value) && $value!='') - { - $error++; $this->errors[]=$langs->trans("ExtraFieldHasWrongValue",$attributeLabel); - return -1; - } - elseif ($value=='') - { - $this->array_options[$key] = null; - } - break; - case 'price': - $this->array_options[$key] = price2num($this->array_options[$key]); - break; - case 'date': - $this->array_options[$key]=$this->db->idate($this->array_options[$key]); - break; - case 'datetime': - $this->array_options[$key]=$this->db->idate($this->array_options[$key]); - break; - } - } - $this->db->begin(); - - $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::insertExtraFields delete", LOG_DEBUG); - $this->db->query($sql_del); - $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."_extrafields (fk_object"; - foreach($this->array_options as $key => $value) - { - $attributeKey = substr($key,8); // Remove 'options_' prefix - // Add field of attribut - if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate - $sql.=",".$attributeKey; - } - $sql .= ") VALUES (".$this->id; - foreach($this->array_options as $key => $value) - { - $attributeKey = substr($key,8); // Remove 'options_' prefix - // Add field o fattribut - if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate) - { - if ($this->array_options[$key] != '') - { - $sql.=",'".$this->db->escape($this->array_options[$key])."'"; - } - else - { - $sql.=",null"; - } - } - } - $sql.=")"; - - dol_syslog(get_class($this)."::insertExtraFields insert", LOG_DEBUG); - $resql = $this->db->query($sql); - if (! $resql) - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -1; - } - else - { - $this->db->commit(); - return 1; - } - } - else return 0; - } - - /** - * Function to show lines of extrafields with output datas - * - * @param object $extrafields Extrafield Object - * @param string $mode Show output (view) or input (edit) for extrafield - * @param array $params Optionnal parameters - * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) - * - * @return string - */ - function showOptionals($extrafields, $mode='view', $params=0, $keyprefix='') - { - global $_POST, $conf; - - $out = ''; - - if (count($extrafields->attribute_label) > 0) - { - $out .= "\n"; - $out .= ' '; - $out .= "\n"; - - $e = 0; - foreach($extrafields->attribute_label as $key=>$label) - { - if (is_array($params) && count($params)>0) { - if (array_key_exists('colspan',$params)) { - $colspan=$params['colspan']; - } - }else { - $colspan='3'; - } - switch($mode) { - case "view": - $value=$this->array_options["options_".$key]; - break; - case "edit": - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]); - break; - } - if ($extrafields->attribute_type[$key] == 'separate') - { - $out .= $extrafields->showSeparator($key); - } - else - { - $csstyle=''; - if (is_array($params) && count($params)>0) { - if (array_key_exists('style',$params)) { - $csstyle=$params['style']; - } - } - if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) - { - $out .= '
'.$label.'
'.$label.'