From b01bd979b544c929483c61bd29e9250fae5f193c Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 30 Sep 2019 21:10:16 +0200 Subject: [PATCH 01/56] Unlock title button feature --- htdocs/core/lib/functions.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 287623c6c55..e860938398a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8262,7 +8262,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $class = 'btnTitle'; // hidden conf keep during button transition TODO: remove this block - if (empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)) { + if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { $class = 'butActionNew'; } if (! empty($params['morecss'])) $class.=' '.$params['morecss']; @@ -8280,7 +8280,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $attr['class'] .= ' refused'; // hidden conf keep during button transition TODO: remove this block - if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){ + if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){ $attr['class'] = 'butActionNewRefused'; } @@ -8342,7 +8342,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $button.= ''; // hidden conf keep during button transition TODO: remove this block - if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){ + if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){ $button='<'.$tag.' '.$compiledAttributes.' >'.$label.''; $button.= ''; $button.= ''; From 2149b155d196a826e485b0b40526a16534df685e Mon Sep 17 00:00:00 2001 From: "ro@t.com" Date: Thu, 10 Oct 2019 15:57:26 +0200 Subject: [PATCH 02/56] ADD option MAIN_DONT_KEEP_NOTE_ON_CLONING to remove note on cloning --- htdocs/comm/propal/class/propal.class.php | 6 +++++- htdocs/compta/facture/class/facture.class.php | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index e9d969e5ab8..6babe8076a8 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1287,7 +1287,11 @@ class Propal extends CommonObject $object->datep = $now; // deprecated $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = ''; - + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) + { + $object->note_private = ''; + $object->note_public = ''; + } // Create clone $object->context['createfromclone']='createfromclone'; $result=$object->create($user); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 09d3351fb4d..7f5432682ab 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1046,6 +1046,11 @@ class Facture extends CommonInvoice $object->close_code = ''; $object->close_note = ''; $object->products = $object->lines; // For backward compatibility + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) + { + $object->note_private = ''; + $object->note_public = ''; + } // Loop on each line of new invoice foreach($object->lines as $i => $line) From 9194eb4bec9bb95e1afb4b96b631f60df50f9617 Mon Sep 17 00:00:00 2001 From: John Botella Date: Fri, 11 Oct 2019 09:14:10 +0200 Subject: [PATCH 03/56] Fix block title height if no button --- htdocs/core/lib/functions.lib.php | 6 +++--- htdocs/theme/eldy/global.inc.php | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b9e6d17ccf5..450afe47a65 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4120,9 +4120,9 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict if ($picto == 'setup') $picto='generic'; $return.= "\n"; - $return.= ''; // maring bottom must be same than into print_barre_list - if ($picto) $return.= ''; - $return.= ''; + + print ''; print ''; print ''; $userstatic->id=$obj->uid; From 2fa3b23cf10c9e05afc81be1caec91c6b6990d74 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2019 19:36:36 +0200 Subject: [PATCH 07/56] Fix missing price level field --- htdocs/core/modules/modSociete.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index e41e96c5add..a0d190c65cd 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -270,6 +270,9 @@ class modSociete extends DolibarrModules 'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode' ); if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; + + if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; + if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level']='PriceLevel'; // Add multicompany field if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) { @@ -295,7 +298,8 @@ class modSociete extends DolibarrModules 's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text", 'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code', 'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text', - 'paymode.libelle'=>'Text','s.entity'=>'Numeric' + 'paymode.libelle'=>'Text','s.entity'=>'Numeric', + 's.price_level'=>'Numeric' ); $this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto From c3e8aec07c6be4e0c315409c34ef65de83b8ee12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 11 Oct 2019 23:54:05 +0200 Subject: [PATCH 08/56] fix translation for showemailing in lang files, it's ShowEMailing not ShowEmailing --- htdocs/comm/mailing/class/mailing.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 9df3a04a786..dba1de41cfd 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -548,7 +548,7 @@ class Mailing extends CommonObject $result = ''; $companylink = ''; - $label = '' . $langs->trans("ShowEmailing") . ''; + $label = '' . $langs->trans("ShowEMailing") . ''; $label.= '
'; $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; @@ -567,7 +567,7 @@ class Mailing extends CommonObject { if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $label=$langs->trans("ShowEmailing"); + $label=$langs->trans("ShowEMailing"); $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; From 33efd77fc7949e7d55ee7fe34bd906a302727091 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 12 Oct 2019 12:10:33 +0200 Subject: [PATCH 09/56] more internationalization --- htdocs/core/modules/action/modules_action.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php index 5199933c0a2..0a559ae2d92 100644 --- a/htdocs/core/modules/action/modules_action.php +++ b/htdocs/core/modules/action/modules_action.php @@ -47,23 +47,23 @@ abstract class ModeleAction extends CommonDocGenerator global $conf; $type='action'; - $liste=array(); + $list=array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste=getListOfModels($db, $type, $maxfilenamelength); + $list=getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** - * Create an product document on disk using template defined into PRODUCT_ADDON_PDF + * Create a product document on disk using template defined into PRODUCT_ADDON_PDF * - * @param DoliDB $db objet base de donnee + * @param DoliDB $db data base object * @param Object $object Object fichinter - * @param string $modele force le modele a utiliser ('' par defaut) - * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param string $modele forces the model to use ('' by default) + * @param Translate $outputlangs lang object to use for translation * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref @@ -79,7 +79,7 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h $srctemplatepath=''; - // Positionne modele sur le nom du modele de fichinter a utiliser + // Position modele on the name of fichinter model to use if (! dol_strlen($modele)) { if (! empty($conf->global->ACTION_EVENT_ADDON_PDF)) From 9871dd8770a4ffbe59f700a26191c260a5764d01 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Oct 2019 15:27:06 +0200 Subject: [PATCH 10/56] Debug variants --- htdocs/langs/en_US/products.lang | 4 ++-- htdocs/product/stock/product.php | 12 ++++++++---- htdocs/variants/combinations.php | 26 +++++++++++++++++--------- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 36ca0ede002..21f4d4947ce 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -208,8 +208,8 @@ UseMultipriceRules=Use price segment rules (defined into product module setup) t PercentVariationOver=%% variation over %s PercentDiscountOver=%% discount over %s KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products -VariantRefExample=Example: COL -VariantLabelExample=Example: Color +VariantRefExample=Examples: COL, SIZE +VariantLabelExample=Examples: Color, Size ### composition fabrication Build=Produce ProductsMultiPrice=Products and prices for each price segment diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 2c0515d309c..9ef671e9913 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -804,8 +804,8 @@ if (! $variants) { */ print '
'; + print '
'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).''; + $return.= ''; // maring bottom must be same than into print_barre_list + if ($picto) $return.= ''; + $return.= ''; if (dol_strlen($morehtmlcenter)) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index ddd865cbbb2..8d1b73080de 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3587,6 +3587,10 @@ div.titre, .secondary { color: rgb(); } +table.table-fiche-title .col-title div.titre{ + line-height: 40px; +} + #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } From 535a09e85699229d9b1d9e9d5de52e431cd1b3a1 Mon Sep 17 00:00:00 2001 From: John Botella Date: Fri, 11 Oct 2019 09:17:17 +0200 Subject: [PATCH 04/56] Fix block title height if no button MD --- htdocs/theme/md/style.css.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 72974ded51f..75c47ebe6f0 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3625,6 +3625,10 @@ div.titre, .secondary { color: rgb(); } +table.table-fiche-title .col-title div.titre{ + line-height: 40px; +} + #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } From d109341ebedd95d7b0eeaa84a4d9510e7db7fcfe Mon Sep 17 00:00:00 2001 From: JC Prieto Date: Fri, 11 Oct 2019 18:08:15 +0200 Subject: [PATCH 05/56] Update card.php Variable $mesg not do anything --- htdocs/fourn/card.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 5ebe8ffed56..5c183cc212b 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -85,10 +85,7 @@ if (empty($reshook)) $result=$object->fetch($id); $object->code_compta_fournisseur=$_POST["supplieraccountancycode"]; $result=$object->update($object->id, $user, 1, 0, 1); - if ($result < 0) - { - $mesg=join(',', $object->errors); - } + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // terms of the settlement if ($action == 'setconditions' && $user->rights->societe->creer) From f345b5fdb0d2b3bc4f2ce52d541393a1f1c7d050 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2019 19:32:45 +0200 Subject: [PATCH 06/56] Fix look and feel v10 --- htdocs/comm/multiprix.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 8a5226d36d2..6442bb45a88 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -91,15 +91,13 @@ if ($_socid > 0) dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company'); - print '
'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).''; $return.= '
'.$titre.'
'; $return.= '
'; - print '\n"; - - - print ""; - print "
'; - print ''; + print '
'; - print '"; + print '"; - print '
'; - print $langs->trans("PriceLevel").''.$objsoc->price_level."
'; + print $langs->trans("PriceLevel").''.$objsoc->price_level."
'; - print $langs->trans("NewValue").''; + print '
'; + print $langs->trans("NewValue").''; print '
"; - print "
"; - dol_fiche_end(); print '
'; @@ -157,8 +149,8 @@ if ($_socid > 0) while ($i < $num ) { $obj = $db->fetch_object($resql); - $tag = !$tag; - print '
'.dol_print_date($db->jdate($obj->dc), "dayhour").''.$obj->price_level.'
'; - print '
'; print ''; print ''; print ''; @@ -918,7 +918,8 @@ if (! $variants) { print ''; print ''; print ''; - print ''; + print ''; + print ''; } } } @@ -926,12 +927,13 @@ if (! $variants) { } } else dol_print_error($db); + // Total line print ''; print ''; print ''; -// Value purchase + // Value purchase print ''; @@ -939,12 +941,13 @@ if (! $variants) { if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : ' '); else print $langs->trans("Variable"); print ''; -// Value to sell + // Value to sell print ''; print ""; + print "
' . $langs->trans("Warehouse") . '' . $langs->trans("NumberOfUnit") . '' . dol_print_date($pdluo->eatby, 'day') . '' . dol_print_date($pdluo->sellby, 'day') . '' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '
' . $langs->trans("Total") . ':' . price2num($total, 'MS') . ''; print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : ' '); // This value may have rounding errors print ''; print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : ' '; print ''; if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1); else print $langs->trans("Variable"); print '
"; print ''; @@ -1067,6 +1070,7 @@ if (! $variants) { print ''; print ''.$langs->trans("Total").''; print ''.$stock_total.''; + print ''; print ''; } else diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 3239dbb5060..4a7774b1a08 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -377,6 +377,7 @@ if (! empty($id) || ! empty($ref)) dol_fiche_end(); + $listofvariantselected = ''; // Create or edit a varian if ($action == 'add' || ($action == 'edit')) { @@ -386,7 +387,7 @@ if (! empty($id) || ! empty($ref)) //print dol_fiche_head(); $features = $_SESSION['addvariant_'.$object->id]; //First, sanitize - print '
'; + $listofvariantselected = '
'; if (! empty($features)) { foreach ($features as $feature) { @@ -400,16 +401,14 @@ if (! empty($id) || ! empty($ref)) continue; } - print '' . $prodattr->label . ':'. $prodattr_val->value . ' '; + $listofvariantselected .= '' . $prodattr->label . ':'. $prodattr_val->value . ' '; } } - print '
'; - print '

'; + $listofvariantselected .= '
'; //print dol_fiche_end(); } else { $title = $langs->trans('EditProductCombination'); } - print load_fiche_titre($title); if ($action == 'add') { $prodattr_all = $prodattr->fetchAll(); @@ -499,6 +498,10 @@ if (! empty($id) || ! empty($ref)) '; + + print load_fiche_titre($title); + print '
'."\n"; print ''; print ''."\n"; @@ -507,9 +510,9 @@ if (! empty($id) || ! empty($ref)) print ''."\n"; } - print dol_fiche_head(); + print dol_fiche_head(); - ?> + ?> @@ -524,6 +527,7 @@ if (! empty($id) || ! empty($ref)) print ''; foreach ($prodattr_all as $attr) { + //print ''; print ''; } print ''; @@ -561,6 +565,10 @@ if (! empty($id) || ! empty($ref)) "> + +
+ +
variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?> isProduct()) print ''.($currcomb->variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight').''; ?> - getLibStatut(2, 0) ?> - getLibStatut(2, 1) ?> + getLibStatut(2, 0) ?> + getLibStatut(2, 1) ?> From 67d76787eba1dd3493dc435c36d5695751584131 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Oct 2019 15:29:06 +0200 Subject: [PATCH 11/56] Add new hidden conf VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT --- htdocs/product/stock/product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 9ef671e9913..944b3ce96cd 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -764,7 +764,7 @@ if (empty($reshook)) if ($user->rights->stock->mouvement->creer) { - if (! $variants) { + if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { print '' . $langs->trans("CorrectStock") . ''; } else @@ -780,7 +780,7 @@ if (empty($reshook)) //if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch()) if ($user->rights->stock->mouvement->creer) { - if (! $variants) { + if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { print '' . $langs->trans("TransferStock") . ''; } else From cef935468d6669765ee563b97cb0275824e4799e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 12 Oct 2019 18:40:39 +0200 Subject: [PATCH 12/56] Update list.php --- htdocs/compta/bank/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 843b3b0e323..df5442f02d6 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -454,7 +454,7 @@ foreach ($accounts as $key=>$type) if (! empty($arrayfields['b.account_number']['checked'])) { print ''; - if (! empty($conf->accounting->enabled)) + if (! empty($conf->accounting->enabled) && ! empty($objecttmp->account_number)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objecttmp->account_number, 1); @@ -472,7 +472,7 @@ foreach ($accounts as $key=>$type) if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) { print ''; - if (! empty($conf->accounting->enabled)) + if (! empty($conf->accounting->enabled) && ! empty($objecttmp->fk_accountancy_journal)) { $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objecttmp->fk_accountancy_journal); From 9c94ffeea9cb61efd5cdb2dc3cf6693d9709ef3d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Oct 2019 18:40:41 +0200 Subject: [PATCH 13/56] Fix css --- htdocs/comm/mailing/cibles.php | 2 +- htdocs/theme/eldy/global.inc.php | 3 +++ htdocs/theme/md/style.css.php | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 3cc5f12566d..532e792bd6e 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -338,7 +338,7 @@ if ($object->fetch($id) >= 0) print '
'; if (empty($obj->picto)) $obj->picto='generic'; - print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto); + print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle pictomodule"'); print ' '; print $obj->getDesc(); print '
'; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 46d24b08cc6..0189a3988dd 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1293,6 +1293,9 @@ div.nopadding { .pictowarning { vertical-align: text-bottom; } +.pictomodule { + width: 14px; +} .fiche .arearef img.pictoedit, .fiche .arearef span.pictoedit, .fiche .fichecenter img.pictoedit, .fiche .fichecenter span.pictoedit, .tagtdnote span.pictoedit { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a9e94eb885c..8e0cf75047b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1483,6 +1483,9 @@ table.noborder tr.liste_titre td { .pictowarning { vertical-align: text-bottom; } +.pictomodule { + width: 14px; +} .fiche .arearef img.pictoedit, .fiche .arearef span.pictoedit, .fiche .fichecenter img.pictoedit, .fiche .fichecenter span.pictoedit, .tagtdnote span.pictoedit { From 650cd2b54ffe616cff7228a0478291812b08ffdd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Oct 2019 18:41:33 +0200 Subject: [PATCH 14/56] Prepare 10.0.3 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 94455858e8b..fffd9be3636 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION', '10.0.2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION', '10.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO', chr(128)); From b424fc6e274a2596428291cd8b4612978f6a1e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 12 Oct 2019 18:57:08 +0200 Subject: [PATCH 15/56] Update list.php --- htdocs/compta/bank/list.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 843b3b0e323..de8c743803c 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -505,8 +505,13 @@ foreach ($accounts as $key=>$type) if ($result<0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); } else { - print $result->nbtodo; - if ($result->nbtodolate) print '   ('.$result->nbtodolate.img_warning($langs->trans("Late")).')'; + print ''.$result->nbtodo.''; + if ($result->nbtodolate) { + print ' '; + print ''; + print ' '.$result->nbtodolate; + print ''; + } } } else print $langs->trans("FeatureDisabled"); From bb21d048f476d749836ddfb29ac196e6487787f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 12 Oct 2019 22:08:11 +0200 Subject: [PATCH 16/56] keep a copy of object for trigger --- htdocs/contact/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 4139176e84e..9de1672db90 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -250,6 +250,7 @@ if (empty($reshook)) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) { $result=$object->fetch($id); + $object->oldcopy = clone $object; $object->old_lastname = GETPOST("old_lastname"); $object->old_firstname = GETPOST("old_firstname"); From 2d3a6d2108f5aa09853830c26d05defd155ee0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:05:21 +0200 Subject: [PATCH 17/56] Update card.php --- htdocs/societe/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 39754b14fe0..e2a8f731856 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -817,6 +817,7 @@ if (empty($reshook)) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) { $object->fetch($socid); + $object->oldcopy = clone $object; $result = $object->delete($socid, $user); if ($result > 0) From f6a2fd6eb88a31cf2a96dcfdd2d061a829d66884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:08:32 +0200 Subject: [PATCH 18/56] Update card.php --- htdocs/user/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index bdef850fa6b..edcb99678bb 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -156,6 +156,7 @@ if (empty($reshook)) { $object = new User($db); $object->fetch($id); + $object->oldcopy = clone $object; $result = $object->delete($user); if ($result < 0) { From 9eaad235640851791a4ea6fa013446c33fcf78a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:12:53 +0200 Subject: [PATCH 19/56] Update api_contacts.class.php --- htdocs/societe/class/api_contacts.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index b2432afe243..cfddddb7b96 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -292,7 +292,7 @@ class Contacts extends DolibarrApi { throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); } - + $this->contact->oldcopy = clone $this->contact; return $this->contact->delete($id); } From 809d98129f5640ead0c2ee3601c66d66d5c13bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:14:45 +0200 Subject: [PATCH 20/56] Update api_thirdparties.class.php --- htdocs/societe/class/api_thirdparties.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 3d2104cc6f2..adcde4b0d5e 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -418,7 +418,7 @@ class Thirdparties extends DolibarrApi // External modules should update their ones too if (!$errors) { -$reshook = $hookmanager->executeHooks('replaceThirdparty', array( + $reshook = $hookmanager->executeHooks('replaceThirdparty', array( 'soc_origin' => $soc_origin->id, 'soc_dest' => $object->id ), $soc_dest, $action); @@ -488,6 +488,7 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array( if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->company->oldcopy = $this->company; return $this->company->delete($id); } From 0ae1e8c2a98990f7257c73d4a4a433849c5a257f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:17:57 +0200 Subject: [PATCH 21/56] Update api_users.class.php --- htdocs/user/class/api_users.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 72690c65dcb..9549fbe2ef1 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -350,7 +350,7 @@ class Users extends DolibarrApi { throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); } - + $this->useraccount->oldcopy = clone $this->useraccount; return $this->useraccount->delete(DolibarrApiAccess::$user); } From 352df8241e6e9c8405563a2a22db3f82f06ab88a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 06:19:40 +0200 Subject: [PATCH 22/56] Update api_thirdparties.class.php --- htdocs/societe/class/api_thirdparties.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index adcde4b0d5e..ed3b26e04ac 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -488,7 +488,7 @@ class Thirdparties extends DolibarrApi if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $this->company->oldcopy = $this->company; + $this->company->oldcopy = clone $this->company; return $this->company->delete($id); } From 499eb87173aa6b35a843808aca8a5e03e7414c5c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 13 Oct 2019 08:20:37 +0200 Subject: [PATCH 23/56] lang file for holidays is holiday --- htdocs/core/modules/holiday/modules_holiday.php | 4 ++-- htdocs/holiday/document.php | 4 +--- htdocs/holiday/list.php | 2 +- htdocs/index.php | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php index 9bd0a448ebc..8797d1f377c 100644 --- a/htdocs/core/modules/holiday/modules_holiday.php +++ b/htdocs/core/modules/holiday/modules_holiday.php @@ -96,7 +96,7 @@ class ModelNumRefHolidays public function info() { global $langs; - $langs->load("holidays"); + $langs->load("holiday"); return $langs->trans("NoDescription"); } @@ -108,7 +108,7 @@ class ModelNumRefHolidays public function getExample() { global $langs; - $langs->load("holidays"); + $langs->load("holiday"); return $langs->trans("NoExample"); } diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index a594a920e74..30803a9ecbc 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page -$langs->loadLangs(array('other', 'holidays', 'companies')); +$langs->loadLangs(array('other', 'holiday', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -48,8 +48,6 @@ $confirm = GETPOST('confirm', 'alpha'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'holiday', $id, 'holiday'); -$langs->load("holiday"); - // Get parameters $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index f74d731e8bd..1c03e3801b6 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('users', 'holidays', 'hrm')); +$langs->loadLangs(array('users', 'holiday', 'hrm')); // Protection if external user if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/index.php b/htdocs/index.php index d6ce8c90067..5eee02efa1e 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -218,7 +218,7 @@ if (empty($user->societe_id)) 'askprice', 'projects', 'expensereports', - 'holidays', + 'holiday', 'donations' ); // Dashboard Icon lines From 67278e4781505149fc806501de2a54c746281641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 10:18:41 +0200 Subject: [PATCH 24/56] Update box_last_ticket.php --- htdocs/core/boxes/box_last_ticket.php | 53 +++++++++++++++------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index 5469efd8fc5..18990cd8bb6 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -1,7 +1,8 @@ - * 2016 Christophe Battarel + * Copyright (C) 2013-2016 Jean-François FERRY + * Copyright (C) 2016 Christophe Battarel + * Copyright (C) 2018-2019 Frédéric France * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,7 +47,7 @@ class box_last_ticket extends ModeleBoxes /** * Constructor - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler * @param string $param More parameters */ public function __construct($db, $param = '') @@ -70,7 +71,7 @@ class box_last_ticket extends ModeleBoxes $this->max = $max; - dol_include_once("/ticket/class/ticket.class.php"); + require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; $text = $langs->trans("BoxLastTicketDescription", $max); $this->info_box_head = array( @@ -86,7 +87,7 @@ class box_last_ticket extends ModeleBoxes if ($user->rights->ticket->read) { $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; $sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; - $sql .= ", s.nom as company_name"; + $sql .= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur"; $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_type as type ON type.code=t.type_code"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_category as category ON category.code=t.category_code"; @@ -108,7 +109,6 @@ class box_last_ticket extends ModeleBoxes $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - $now = gmmktime(); $i = 0; @@ -120,22 +120,30 @@ class box_last_ticket extends ModeleBoxes $late = ''; $ticket = new Ticket($this->db); + $ticket->id = $objp->id; + $ticket->track_id = $objp->track_id; + $ticket->ref = $objp->ref; + $ticket->fk_statut = $objp->fk_statut; + $ticket->subject = $objp->subject; + if ($objp->fk_soc > 0) { + $thirdparty = new Societe($this->db); + $thirdparty->id = $objp->fk_soc; + $thirdparty->email = $objp->socemail; + $thirdparty->client = $objp->client; + $thirdparty->fournisseur = $objp->fournisseur; + $thirdparty->name = $objp->company_name; + $link = $thirdparty->getNomUrl(1); + } else { + $link = dol_print_email($objp->origin_email); + } $r = 0; - // Picto - $this->info_box_contents[$i][0] = array( - 'td' => 'class="left" width="16"', - 'logo' => $this->boximg, - 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), - ); - $r++; - - // Id + // Ticket $this->info_box_contents[$i][$r] = array( 'td' => 'class="left"', - 'text' => $objp->ref, - 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), + 'text' => $ticket->getNomUrl(1), + 'asis' => 1 ); $r++; @@ -143,16 +151,15 @@ class box_last_ticket extends ModeleBoxes $this->info_box_contents[$i][$r] = array( 'td' => 'class="left"', 'text' => $objp->subject, // Some event have no ref - 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), + 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id, ); $r++; // Customer $this->info_box_contents[$i][$r] = array( 'td' => 'class="left"', - 'logo' => ($objp->fk_soc > 0 ? 'company' : ''), - 'text' => ($objp->company_name ? $objp->company_name : $objp->origin_email), - 'url' => ($objp->fk_soc > 0 ? DOL_URL_ROOT . "/comm/card.php?socid=" . $objp->fk_soc : ''), + 'text' => $link, + 'asis' => 1, ); $r++; @@ -164,11 +171,9 @@ class box_last_ticket extends ModeleBoxes $r++; // Statut - $ticketstat = new Ticket($this->db); - $ticketstat->fk_statut = $objp->fk_statut; $this->info_box_contents[$i][$r] = array( 'td' => 'class="right"', - 'text' => $ticketstat->getLibStatut(3), + 'text' => $ticket->getLibStatut(3), ); $r++; From 92e4b962faa12b49f205e213bda3eaba7d002fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 13 Oct 2019 10:37:30 +0200 Subject: [PATCH 25/56] Update box_last_modified_ticket.php --- .../core/boxes/box_last_modified_ticket.php | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index 87d7e0f7d50..8f86be5a115 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -47,7 +47,7 @@ class box_last_modified_ticket extends ModeleBoxes /** * Constructor - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler * @param string $param More parameters */ public function __construct($db, $param = '') @@ -71,7 +71,7 @@ class box_last_modified_ticket extends ModeleBoxes $this->max = $max; - dol_include_once("/ticket/class/ticket.class.php"); + require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; $text = $langs->trans("BoxLastModifiedTicketDescription", $max); $this->info_box_head = array( @@ -87,7 +87,7 @@ class box_last_modified_ticket extends ModeleBoxes if ($user->rights->ticket->read) { $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; $sql.= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; - $sql.= ", s.nom as company_name"; + $sql.= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."ticket as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code"; @@ -107,7 +107,6 @@ class box_last_modified_ticket extends ModeleBoxes $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - $now=gmmktime(); $i = 0; @@ -119,23 +118,31 @@ class box_last_modified_ticket extends ModeleBoxes $late = ''; $ticket = new Ticket($this->db); + $ticket->id = $objp->id; + $ticket->track_id = $objp->track_id; + $ticket->ref = $objp->ref; + $ticket->fk_statut = $objp->fk_statut; + $ticket->subject = $objp->subject; + if ($objp->fk_soc > 0) { + $thirdparty = new Societe($this->db); + $thirdparty->id = $objp->fk_soc; + $thirdparty->email = $objp->socemail; + $thirdparty->client = $objp->client; + $thirdparty->fournisseur = $objp->fournisseur; + $thirdparty->name = $objp->company_name; + $link = $thirdparty->getNomUrl(1); + } else { + $link = dol_print_email($objp->origin_email); + } $r=0; - // Picto + // Ticket $this->info_box_contents[$i][0] = array( - 'td' => 'class="left" width="16"', - 'logo' => $this->boximg, - 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), - ); - $r++; - - // Id - $this->info_box_contents[$i][$r] = array( 'td' => 'class="left"', - 'text' => $objp->ref, - 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), + 'text' => $ticket->getNomUrl(1), + 'asis' => 1, ); $r++; @@ -143,16 +150,15 @@ class box_last_modified_ticket extends ModeleBoxes $this->info_box_contents[$i][$r] = array( 'td' => 'class="left"', 'text' => $objp->subject, // Some event have no ref - 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), + 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id, ); $r++; // Customer $this->info_box_contents[$i][$r] = array( 'td' => 'class="left"', - 'logo' => ($objp->fk_soc>0?'company':''), - 'text' => ($objp->company_name?$objp->company_name:$objp->origin_email), - 'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'') + 'text' => $link, + 'asis' => 1, ); $r++; @@ -165,11 +171,9 @@ class box_last_modified_ticket extends ModeleBoxes $r++; // Statut - $ticketstat = new Ticket($this->db); - $ticketstat->fk_statut = $objp->fk_statut; $this->info_box_contents[$i][$r] = array( 'td' => 'class="right"', - 'text' => $ticketstat->getLibStatut(3) + 'text' => $ticket->getLibStatut(3) ); $r++; From e50d32dc00536523090307691cd1c0b1d6518119 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 13 Oct 2019 13:20:45 +0200 Subject: [PATCH 26/56] Remove a duplicate line --- htdocs/core/modules/modSociete.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index a0d190c65cd..8d6490becfe 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -269,8 +269,6 @@ class modSociete extends DolibarrModules 't.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel', 'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode' ); - if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level']='PriceLevel'; // Add multicompany field From e2ca646b6e5f6238f2000700b379a2e87a0305f1 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Mon, 14 Oct 2019 10:22:47 +0200 Subject: [PATCH 27/56] Fix MS Outlook import error --- htdocs/core/lib/xcal.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index f0edbd6f877..a4ddb68dbd3 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -180,7 +180,9 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) if (! empty($location)) fwrite($calfileh, "LOCATION:".$encoding.$location."\n"); if ($fulldayevent) fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n"); - if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:1\n"); + + // see https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/0f262da6-c5fd-459e-9f18-145eba86b5d2 + if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\n"); // Date must be GMT dates // Current date From 4fd12e22cb52e4ba2d747a989c4f0ecd3f866102 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 12:27:44 +0200 Subject: [PATCH 28/56] Fix trans export --- htdocs/exports/export.php | 2 +- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index df298153062..c404fc2b264 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page -$langs->loadlangs(array('exports', 'other', 'users', 'companies', 'projects')); +$langs->loadlangs(array('admin', 'exports', 'other', 'users', 'companies', 'projects', 'suppliers', 'products')); // Everybody should be able to go on this page //if (! $user->admin) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5996d643624..bef32dfcd84 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1061,6 +1061,7 @@ CompanyTown=Town CompanyCountry=Country CompanyCurrency=Main currency CompanyObject=Object of the company +IDCountry=ID country Logo=Logo DoNotSuggestPaymentMode=Do not suggest NoActiveBankAccountDefined=No active bank account defined From b4827dbe067e6755665a268262c9ea2deb59f4fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 12:30:26 +0200 Subject: [PATCH 29/56] Prepare 10.0.3 --- ChangeLog | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee409bb7588..3583c10385b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,68 @@ English Dolibarr ChangeLog -------------------------------------------------------------- -***** ChangeLog for 10.0.2 compared to 10.0.1 ***** +***** ChangeLog for 10.0.3 compared to 10.0.2 ***** +FIX: #11702 +FIX: #11861 No consistent code to manage measuring units +FIX: #11942 +FIX: #12026 +FIX: #12040 +FIX: #12041 +FIX: #12054 +FIX: #12083 +FIX: #12088 +FIX: access to public interface when origin email has an alias. +FIX: Alias name is not into the email recipient label. +FIX: allow standalone credit note even if no invoice +FIX: an admin can not access his own permissions after enabling advanced +FIX: an admin can not access his own permissions after enabling advanced permissions +FIX: Attachement of linked files on ticket when sending a message +FIX: avoid non numeric warning +FIX: Bad currency var used in stripe for connect +FIX: Bad list of ticket on public interface for ticket emailcollector +FIX: Can't modify vendor invoice if transfered into accountancy +FIX: change product type must be allowed if we activate hidden conf +FIX: colspan on VAT quadri report +FIX: CSS +FIX: Debug feature orderstoinvoice for suppliers +FIX: do not output return code on screen after a select of bank account +FIX: Edit of ticket module parameters erased others +FIX: empty cache when we want to load specific warehouses in select +FIX: escape email alias +FIX: expedition.class.php +FIX: Export of leave request show the number of open days +FIX: Filtering the HTTP Header "Accept-Language". +FIX: Filter on project on ticket list +FIX: Filter "Open all" of ticket was ko. +FIX: Force downlaod of file with .noexe as octet-stream mime type +FIX: form not closed. +FIX: hidden conf to prevent from changing product_type +FIX: If product account not suggested during bind, it is not preselected +FIX: If we share invoice, we need to see discount created from a deposit on each entity +FIX: Import of product using units +FIX: label of thirdparty is wrong on open project list +FIX: Look and feel v10 +FIX: missing begin() +FIX: missing "$this->id" in "fetch" function +FIX: navigation on ticket tab of projects +FIX: new invoice with generic thirdparty in takepos +FIX: Pb in units of shipments +FIX: regression with option to hide picto on top menu +FIX: selection of project i am contact of. +FIX: Send email from expense report card. +FIX: shipping card: missing user error messages when classifying closed or billed +FIX: SQL injection on qty +FIX: stripe payment when there is a quote into address +FIX: Substitution of __PROJECT_XXX__ not done +FIX: TakePOS no invoice validation control and good payment translate +FIX: the access of the bank account of one user +FIX: top menu right padding +FIX: Update of leave request when CSRF with token is on +FIX: Var not enough sanitized +FIX: wrong test +FIX: XSS +***** ChangeLog for 10.0.2 compared to 10.0.1 ***** FIX: #10460 compatibility with MariaDB 10.4 FIX: #11401 Adherent unknown language key FIX: #11422 Can't edit his own events with standard rights From 4e52276d1f99e2aff354b9e32a849f38f95a37ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 14 Oct 2019 13:14:02 +0200 Subject: [PATCH 30/56] fix travis --- htdocs/product/inventory/inventory.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index c91834e54e5..c36dd3e47a6 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -288,9 +288,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''."\n"; } - include DOL_DOCUMENT_ROOT.'/product/inventory/tpl/inventory.tpl.php'; - } // End of page From 0a9cc9656405173ea79b765fbdd4cb6914f966d4 Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:01:57 +0200 Subject: [PATCH 31/56] Update document.php Add 2 hidden options for set by default a sort (sort and order) on document page --- htdocs/comm/propal/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 14b845a3e8a..8e3bf45bf68 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -60,6 +60,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} +if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From 720245422e6b2c18edba95fcf82dbe7b7dd3a134 Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:04:49 +0200 Subject: [PATCH 32/56] Update document.php add 2 hidden options for sort files on document page --- htdocs/commande/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 4d784e299fb..8a40ad83d25 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -59,6 +59,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} +if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From f6aafea33c42042fac243e5da992910153b5f63e Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:09:59 +0200 Subject: [PATCH 33/56] Update document.php add 2 hidden options for set a default field and a defaut order on document page --- htdocs/projet/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index e16e90982a6..b2065029b72 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} +if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From 6ebdce8a9db1dd739800ce3a727e57ef6caa8144 Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:13:07 +0200 Subject: [PATCH 34/56] Update document.php add 2 hidden options for set a default field and a default order on document page --- htdocs/societe/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 54a2bea1d41..5ea892f0670 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -55,6 +55,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} +if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="position_name"; From 83b4f41eb5749e267f2219ffe9a68dcf028690ba Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:15:34 +0200 Subject: [PATCH 35/56] Update document.php add 2 hidden options for set a default field sort and a default order on a document page --- htdocs/contact/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 6fb2803f715..b081582337e 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + + if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} + if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From 92c624daf0bdd80313bed5a4862e750775bf22de Mon Sep 17 00:00:00 2001 From: atm-greg Date: Mon, 14 Oct 2019 15:28:06 +0200 Subject: [PATCH 36/56] add security.lib.php for dol_hash --- htdocs/blockedlog/class/blockedlog.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index d7302a2c795..4413b78a6a4 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -1048,6 +1048,7 @@ class BlockedLog if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(1), '5'); From 4f10009113a776462c26c4500d3c24c593dc9d63 Mon Sep 17 00:00:00 2001 From: atm-josselin Date: Mon, 14 Oct 2019 15:39:38 +0200 Subject: [PATCH 37/56] Add fields definition in product batch class for extrafields compatibility --- htdocs/product/stock/class/productlot.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index f3cec8f9a98..dd811a66cf6 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -53,6 +53,19 @@ class Productlot extends CommonObject */ public $ismultientitymanaged = 1; + /** + * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + */ + public $fields=array( + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), + 'batch' =>array('type'=>'varchar(30)', 'label'=>'Batch', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'comment'=>'Batch'), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), + 'fk_user_author'=>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'), + 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511) + ); + /** * @var int Entity */ From e326c232452645506a11ffd295e0cc2f72c7d7fd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 14 Oct 2019 15:48:24 +0200 Subject: [PATCH 38/56] add missing translation --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index e6b960be0ce..c101f73fca0 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -307,7 +307,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right - // Positionne $this->atleastonediscount si on a au moins une remise + // Set $this->atleastonediscount if you have at least one discount for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) @@ -361,7 +361,7 @@ class pdf_einstein extends ModelePDFCommandes } } - // Affiche notes + // Displays notes $notetoshow=empty($object->note_public)?'':$object->note_public; if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { @@ -461,7 +461,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) @@ -503,7 +503,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($this->postotalht, $curY); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + // Collection of totals by value of vat in $this->vat["rate"] = total_tva if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; From fd90ebe63ba6780881497255567dc64617156a40 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 14 Oct 2019 15:57:29 +0200 Subject: [PATCH 39/56] add missing translation --- .../modules/commande/doc/pdf_eratosthene.modules.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 90efc67cd7f..9688d160303 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -430,7 +430,7 @@ class pdf_eratosthene extends ModelePDFCommandes { $pdf->rollbackTransaction(true); - // prepar pages to receive notes + // prepare pages to receive notes while ($pagenb < $pageposafternote) { $pdf->AddPage(); $pagenb++; @@ -464,7 +464,7 @@ class pdf_eratosthene extends ModelePDFCommandes } - // apply note frame to previus pages + // apply note frame to previous pages $i = $pageposbeforenote; while ($i < $pageposafternote) { $pdf->setPage($i); @@ -526,7 +526,7 @@ class pdf_eratosthene extends ModelePDFCommandes } - // Use new auto collum system + // Use new auto column system $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); // tab simulation to know line height @@ -636,7 +636,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->setPage($pageposafter); $curY = $tab_top_newpage; } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate if ($this->getColumnStatus('vat')) @@ -701,7 +701,7 @@ class pdf_eratosthene extends ModelePDFCommandes $reshook=$hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + // Collection of totals by value of vat in $this->vat["rate"] = total_tva if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; From 4b7987374b699fb7168bd238409f3a3083a955f8 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 14 Oct 2019 14:46:04 +0000 Subject: [PATCH 40/56] Fixing style errors. --- htdocs/comm/propal/class/propal.class.php | 4 ++-- htdocs/compta/facture/class/facture.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 6babe8076a8..45cc0399a93 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1287,11 +1287,11 @@ class Propal extends CommonObject $object->datep = $now; // deprecated $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = ''; - if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) { $object->note_private = ''; $object->note_public = ''; - } + } // Create clone $object->context['createfromclone']='createfromclone'; $result=$object->create($user); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7f5432682ab..70edd98a2f0 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1046,11 +1046,11 @@ class Facture extends CommonInvoice $object->close_code = ''; $object->close_note = ''; $object->products = $object->lines; // For backward compatibility - if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1) { $object->note_private = ''; $object->note_public = ''; - } + } // Loop on each line of new invoice foreach($object->lines as $i => $line) From 3b84e2bac34b72a200bdad73fed5710b0930e464 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 19:21:13 +0200 Subject: [PATCH 41/56] Use img-thumb css --- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/core/lib/website2.lib.php | 2 +- htdocs/theme/eldy/global.inc.php | 6 ++++++ htdocs/theme/eldy/theme_vars.inc.php | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 66698be76cc..be5871bf6e3 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -397,7 +397,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive"); else $title=$langs->trans("ShowPreview"); - print ''.$title.''; + print ''.$title.''; print '
'; if ($subdir == $selected_theme) { diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 9b2abe22904..ba2505cc15a 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -433,7 +433,7 @@ function showWebsiteTemplates(Website $website) if (! empty($urladvanced)) $ret.=''; else $ret.=''; print $ret; - print ''.$title.''; + print ''.$title.''; print ''; print '
'; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 2eb5a4d17e9..353c14041f4 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -789,6 +789,12 @@ table[summary="list_of_modules"] .fa-cog { min-width: 100px; } +.img-skinthumb { + width: 160px; + height: 120px; +} + + /* ============================================================================== */ /* Styles to hide objects */ /* ============================================================================== */ diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index f0f74cc1e44..37569ebcd6c 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -67,7 +67,7 @@ $colorbacklinepairhover='230,237,244'; // line hover $colorbacklinepairchecked='230,237,244'; // line checked $colorbacklinebreak='233,228,230'; // line break $colorbackbody='255,255,255'; -$colortexttitlenotab='110,80,20'; +$colortexttitlenotab='140,80,10'; // 140,80,10 or 10,140,80 $colortexttitle='0,0,0'; $colortext='0,0,0'; $colortextlink='10, 20, 110'; From 502d154cea7fd7c85415463762fca7ec7ad304b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 14 Oct 2019 20:01:35 +0200 Subject: [PATCH 42/56] Update check_notifications.php --- htdocs/core/ajax/check_notifications.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index dd994823a4b..02e304b3d44 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -1,6 +1,7 @@ * Copyright (C) 2017 Juanjo Menent + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +17,7 @@ * along with this program. If not, see . */ +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); From 45b3d623bbe90e57252377a6f6efc4404bf33a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 14 Oct 2019 20:30:31 +0200 Subject: [PATCH 43/56] Update list.php --- htdocs/fourn/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 8985ee33de2..1da06b03d63 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -805,7 +805,7 @@ if ($resql) if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'],$_SERVER["PHP_SELF"],"f.fk_mode_reglement","",$param,"",$sortfield,$sortorder); - if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total_ht','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'],$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'],$_SERVER['PHP_SELF'],'f.localtax1','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'],$_SERVER['PHP_SELF'],'f.localtax2','',$param,'align="right"',$sortfield,$sortorder); From 056f7f826bfaad2048597b4a785467176fcee0d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 20:41:28 +0200 Subject: [PATCH 44/56] Clean code --- htdocs/modulebuilder/template/myobject_card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 72bc424c53c..132bf158ac8 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -446,7 +446,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Clone if (! empty($user->rights->mymodule->write)) { - print ''; + print '' . $langs->trans("ToClone") . ''."\n"; } /* From 5a5599754075cdff0d484c9f43566ce3e89690d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 20:53:18 +0200 Subject: [PATCH 45/56] Update pdf_eratosthene.modules.php --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 9688d160303..d3f7f3016a0 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -701,7 +701,7 @@ class pdf_eratosthene extends ModelePDFCommandes $reshook=$hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook - // Collection of totals by value of vat in $this->vat["rate"] = total_tva + // Collection of totals by value of vat in $this->tva["rate"] = total_tva if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; From 3866ac60363a90376dfa6e4e906310888054bbcc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 21:18:22 +0200 Subject: [PATCH 46/56] Update document.php --- htdocs/societe/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 5ea892f0670..971944c4f30 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -56,8 +56,8 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} -if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="position_name"; From c8d3aea18ae84e43d8030224d181ad53baf0a8c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 21:20:17 +0200 Subject: [PATCH 47/56] Update document.php --- htdocs/commande/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 8a40ad83d25..515e14095bd 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -60,8 +60,8 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} -if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From 15d4a185996d3e29a7b5765a0b86121cea6513b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 21:21:04 +0200 Subject: [PATCH 48/56] Update document.php --- htdocs/projet/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index b2065029b72..10c7a140df7 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -63,8 +63,8 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} -if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From e5e94f5e7a0c938f3900b58e3e77214586d3aaa3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 21:23:08 +0200 Subject: [PATCH 49/56] Update document.php --- htdocs/contact/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index b081582337e..ad8bbb68e5f 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -63,8 +63,8 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; - if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} - if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } + if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From 176436ec341665648a8d75f07d5a7c674086ca2f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 21:23:52 +0200 Subject: [PATCH 50/56] Update document.php --- htdocs/comm/propal/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 8e3bf45bf68..eca5ce52fa7 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -61,8 +61,8 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} -if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} +if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; } +if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; } if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="name"; From 540f20c18f7c0df6726ee35d21d9d11c8d04a326 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Oct 2019 23:49:26 +0200 Subject: [PATCH 51/56] css --- htdocs/theme/eldy/global.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 353c14041f4..0fe2236c33a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1114,8 +1114,8 @@ div.blockvmenulogo } .menulogocontainer { margin: px; - margin-left: 12px; - margin-right: 4px; + margin-left: 11px; + margin-right: 9px; padding: 0; height: px; /* width: 100px; */ From 415379c4f2e4d9ffd19c454a92999d293e3c93ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Oct 2019 00:27:09 +0200 Subject: [PATCH 52/56] Link show tutorial in middle --- htdocs/accountancy/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 4eab81ea49f..0eeccbd3395 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -88,7 +88,7 @@ if ($conf->accounting->enabled) } - print load_fiche_titre($langs->trans("AccountancyArea"), $showtutorial . $resultboxes['selectboxlist'], 'accountancy'); + print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial); print '
'; // hideobject is to start hidden print "
\n"; From f50a75194c205863d4bd420e1f7be402be38d5ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Oct 2019 00:44:22 +0200 Subject: [PATCH 53/56] Removed warning --- htdocs/core/class/conf.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 535db40e0e4..60b33e51188 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -227,10 +227,7 @@ class Conf $filesList = explode(":", $this->global->LOCAL_CONSTS_FILES); foreach ($filesList as $file) { $file=dol_sanitizeFileName($file); - include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; - foreach ($file2bddconsts as $key=>$value) { - $this->global->$key=$value; - } + include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; // This file must set $this->global->XXX vars. } } @@ -669,6 +666,8 @@ class Conf if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1; + if (! isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 1; + if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567'; From a1c93cb2e6c5a42a496f2a24bd46dd8dc5d28704 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Oct 2019 02:45:12 +0200 Subject: [PATCH 54/56] MAIN_ACTIVATE_HTML5 is now always on now (so option removed). Look and feel v11 --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- htdocs/core/class/conf.class.php | 3 +-- htdocs/core/lib/functions.lib.php | 7 +++---- htdocs/exports/class/export.class.php | 3 +-- htdocs/theme/eldy/btn.inc.php | 22 ++++++++++++++------ htdocs/theme/eldy/dropdown.inc.php | 2 +- htdocs/theme/eldy/global.inc.php | 18 +++++++++++++--- htdocs/theme/eldy/theme_vars.inc.php | 2 +- htdocs/theme/md/style.css.php | 5 +++++ htdocs/ticket/card.php | 12 +++++++---- htdocs/ticket/class/actions_ticket.class.php | 4 ++-- 11 files changed, 55 insertions(+), 27 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b5f0c06738a..2958a229d24 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -518,9 +518,9 @@ else $buttonLabel = $langs->trans("ExportList"); // Button re-export if (! empty($conf->global->ACCOUNTING_REEXPORT)) { - $newcardbutton =''.img_picto($langs->trans("Activated"), 'switch_on').' '; + $newcardbutton =''.img_picto($langs->trans("Activated"), 'switch_on').' '; } else { - $newcardbutton =''.img_picto($langs->trans("Disabled"), 'switch_off').' '; + $newcardbutton =''.img_picto($langs->trans("Disabled"), 'switch_off').' '; } $newcardbutton.= ''.$langs->trans("IncludeDocsAlreadyExported").''; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 60b33e51188..287d8121213 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -439,7 +439,6 @@ class Conf // Set some default values //$this->global->MAIN_LIST_FILTER_ON_DAY=1; // On filter that show date, we must show input field for day before or after month - $this->global->MAIN_ACTIVATE_HTML5=1; $this->global->MAIN_MAIL_USE_MULTI_PART=1; // societe @@ -666,7 +665,7 @@ class Conf if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1; - if (! isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 1; + if (! isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f178a25f4c2..7bda225978f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4125,7 +4125,7 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict if ($picto == 'setup') $picto='generic'; $return.= "\n"; - $return.= ''; // maring bottom must be same than into print_barre_list + $return.= '
'; // maring bottom must be same than into print_barre_list if ($picto) $return.= ''; $return.= '
'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).''; $return.= '
'.$titre.'
'; @@ -4187,11 +4187,10 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', print "\n"; print "\n"; - print ''; // maring bottom must be same than into load_fiche_tire + print '
'; // maring bottom must be same than into load_fiche_tire // Left - //if ($picto && $titre) print ''; - print ''; // User assigned - print ''; // Progression diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 2a9fc198592..f6d03d3360a 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -197,7 +197,7 @@ class ActionsTicket print $langs->trans("InitialMessage"); print ''; @@ -208,7 +208,7 @@ class ActionsTicket $msg = GETPOST('message_initial', 'alpha') ? GETPOST('message_initial', 'alpha') : $object->message; include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; $uselocalbrowser = true; - $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET); + $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET, ROWS_4, '95%'); $doleditor->Create(); } else { // Deal with format differences (text / HTML) From 2ed96c9e5ffe5c6632bbc036d18d607f1e6e2040 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Oct 2019 02:54:19 +0200 Subject: [PATCH 55/56] Fix scrutinizer --- htdocs/contact/class/contact.class.php | 4 +-- .../box_accountancy_suspense_account.php | 4 +-- htdocs/core/lib/ticket.lib.php | 1 + ...rface_90_modSociete_ContactRoles.class.php | 25 +++++++++++-------- htdocs/ticket/class/ticket.class.php | 2 +- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 560a6e2bc0d..1d88ebc87aa 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1514,8 +1514,8 @@ class Contact extends CommonObject /** * Get Contact roles for a thirdparty * - * @param string $element element type - * @return array|int + * @param string $element Element type + * @return array|int Array of contact roles or -1 * @throws Exception */ public function getContactRoles($element = '') diff --git a/htdocs/core/boxes/box_accountancy_suspense_account.php b/htdocs/core/boxes/box_accountancy_suspense_account.php index 03c0f0ab7ae..86971e1e042 100644 --- a/htdocs/core/boxes/box_accountancy_suspense_account.php +++ b/htdocs/core/boxes/box_accountancy_suspense_account.php @@ -74,7 +74,7 @@ class box_accountancy_suspense_account extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; - $bookkeepingstatic = new BookKeeping($this->db); + //$bookkeepingstatic = new BookKeeping($this->db); $this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount")); @@ -103,7 +103,7 @@ class box_accountancy_suspense_account extends ModeleBoxes $this->info_box_contents[0][1] = array( 'td' => 'class="right"', - 'text' => '' . $nbSuspenseAccount . '', + 'text' => '' . $nbSuspenseAccount . '', 'asis' => 1 ); } else { diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 53afbe50dce..543bdb025fa 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -151,6 +151,7 @@ function showDirectPublicLink($object) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $email = CMailFile::getValidAddress($object->origin_email, 2); + $url = ''; if ($email) { $url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email; diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php index 13eb44d4eee..79b99e59a8f 100644 --- a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php +++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php @@ -90,20 +90,23 @@ class InterfaceContactRoles extends DolibarrTriggers if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal')); } - foreach($TContact as $i => $infos) { - foreach ($TContactAlreadyLinked as $contactData) { - if($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]); + if (is_array($TContact)) + { + foreach($TContact as $i => $infos) { + foreach ($TContactAlreadyLinked as $contactData) { + if ($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]); + } } - } - $nb = 0; - foreach($TContact as $infos) { - $res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']); - if($res > 0) $nb++; - } + $nb = 0; + foreach($TContact as $infos) { + $res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']); + if ($res > 0) $nb++; + } - if($nb > 0) { - setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs'); + if($nb > 0) { + setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs'); + } } } } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5443e943583..0daba74be77 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1609,7 +1609,7 @@ class Ticket extends CommonObject * @param array $filename_list List of files to attach (full path of filename on file system) * @param array $mimetype_list List of MIME type of attached files * @param array $mimefilename_list List of attached file name in message - * @return void + * @return int <0 if KO, >0 if OK */ public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array()) { From 33cc0c017cf43eb87bb784c5da9a1d480e589e90 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Oct 2019 04:20:51 +0200 Subject: [PATCH 56/56] responsive --- htdocs/hrm/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index ef8df639d26..80a9366186c 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -225,7 +225,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) print ''; print ''; - print ''; + print ''; print ''; $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; @@ -304,7 +304,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -376,7 +376,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire print ''; print ''; - print ''; + print ''; print ''; print ''; print '';
'.img_picto('', $picto, 'id="pictotitle"', $pictoisfullpath).''; + print ''; if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle opacityhigh pictotitle widthpictotitle"', $pictoisfullpath); print '
'.$titre; if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')'; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index cd4d70c2518..d6b6a8676ae 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -399,8 +399,7 @@ class Export $szFilterField=''; break; case 'Status': - if (! empty($conf->global->MAIN_ACTIVATE_HTML5)) $szFilterField=''; - else $szFilterField=''; + $szFilterField=''; break; case 'Boolean': $szFilterField='
' . $langs->trans("AssignedTo") . ''; + print '
'; + print ''; + } + print '
'; + print $langs->trans("AssignedTo"); + if ($object->fk_statut < 8 && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { + print '' . img_edit($langs->trans('Modify'), '') . '
'; + print '
'; if ($object->fk_user_assign > 0) { $userstat->fetch($object->fk_user_assign); print $userstat->getNomUrl(1); @@ -892,9 +899,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd print ' '; print ''; } - if ($object->fk_statut < 8 && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { - print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; - } print '
'; if ($user->rights->ticket->manage) { - print '' . img_edit($langs->trans('Modify')) . ''; + print '' . img_edit($langs->trans('Modify')) . ''; } print '
'.$holidaystatic->getNomUrl(1).''.$userstatic->getNomUrl(-1, 'leave').''.$userstatic->getNomUrl(-1, 'leave').''.$typeleaves[$obj->fk_type]['label'].'
'.$deplacementstatic->getNomUrl(1).''.$userstatic->getNomUrl(-1).''.$userstatic->getNomUrl(-1).''.$obj->km.''.dol_print_date($db->jdate($obj->dm), 'day').''.$deplacementstatic->LibStatut($obj->fk_statut, 3).'
'.$expensereportstatic->getNomUrl(1).''.$userstatic->getNomUrl(-1).''.$userstatic->getNomUrl(-1).''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->dm), 'day').''.$expensereportstatic->LibStatut($obj->status, 3).'