From fc1d8a2c5bf134ed04f9d26b7f2abaa73dfc8251 Mon Sep 17 00:00:00 2001 From: ibuiv <50403308+ibuiv@users.noreply.github.com> Date: Tue, 2 Feb 2021 10:01:54 +0100 Subject: [PATCH 1/3] FIX(path) htdocs removed --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d7af9b46470..14589374e3d 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3234,7 +3234,7 @@ class CommandeFournisseur extends CommonOrder { if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0) { - require_once DOL_DOCUMENT_ROOT.'/htdocs/product/class/product.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $date_liv = dol_now(); // Build array with quantity deliverd by product From 3b050c34520fd072a95c529a920af50373ce0eca Mon Sep 17 00:00:00 2001 From: lvessiller Date: Tue, 2 Feb 2021 10:34:33 +0100 Subject: [PATCH 2/3] FIX select default mail template --- htdocs/core/class/html.formmail.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 855ce1ed7ad..d19269ffd5f 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -455,9 +455,11 @@ class FormMail extends Form // Zone to select email template if (count($modelmail_array) > 0) { + $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : $arraydefaultmessage->id; + // If list of template is filled $out .= '
'."\n"; - $out .= ''.$langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100'); + $out .= ''.$langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, $model_mail_selected_id, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100'); if ($user->admin) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1); $out .= '   '; $out .= ''; From 3132877349a342e0d52a7834b822cc647e7f76e1 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 2 Feb 2021 23:09:23 +0100 Subject: [PATCH 3/3] FIX cash fence for takepos with multientity --- htdocs/takepos/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 51b6334a2c9..2182973a219 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -730,10 +730,9 @@ $( document ).ready(function() { else print "TerminalsDialog();"; } if ($conf->global->TAKEPOS_CONTROL_CASH_OPENING) - { - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE "; - $sql .= "date(date_creation) = CURDATE() "; - $sql .= ""; + $sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; + $sql .= " entity = ".$conf->entity." AND "; + $sql .= " date(date_creation) = CURDATE()"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); @@ -917,8 +916,9 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { ); } -$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE "; -$sql .= "date(date_creation) = CURDATE() "; +$sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; +$sql .= " entity = ".$conf->entity." AND "; +$sql .= " date(date_creation) = CURDATE()"; $resql = $db->query($sql); if ($resql) {