From 4bb612650b5498a165e863b884e41711b2df7908 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 10 Sep 2021 09:09:39 +0200 Subject: [PATCH 1/5] NEW Survey - Add a clickable link in email send --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- htdocs/opensurvey/fonctions.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 73c23e4d63b..63401ec2c30 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1124,11 +1124,11 @@ while ($i < min($num, $limit)) { // Other type } - print ''; + print ''; print ''; // Picto + Ref - print '
'; + print ''; if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') { print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 3d8d76c5c1e..9d56aa8eb00 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -198,6 +198,7 @@ function getUrlSondage($id, $admin = false) } else { $url = get_server_name().'/public/studs.php?sondage='.$id; } + $url = ''.$url.''; return $url; } From 2eef38e44a6f5ffb26e736b30766420c39e5d03a Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 10 Sep 2021 09:12:11 +0200 Subject: [PATCH 2/5] Fix PR --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 63401ec2c30..73c23e4d63b 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1124,11 +1124,11 @@ while ($i < min($num, $limit)) { // Other type } - print ''; + print ''; print ''; // Picto + Ref - print '
'; + print ''; if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') { print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); From 3a1a688ab2b39e262d97d49e893f9a88e4c51005 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Fri, 10 Sep 2021 15:03:08 +0200 Subject: [PATCH 3/5] Fix #18604 : fix percentage on variant product --- htdocs/variants/class/ProductCombination.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index d4fc03724d0..b7fc3d620f5 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -715,6 +715,10 @@ class ProductCombination $price_impact = $forced_pricevar; } + if (!array($price_var_percent)) { + $price_var_percent[1] = (float) $price_var_percent; + } + $newcomb = new ProductCombination($this->db); $existingCombination = $newcomb->fetchByProductCombination2ValuePairs($product->id, $combinations); @@ -787,7 +791,7 @@ class ProductCombination $newproduct->description .= ''.$prodattr->label.': '.$prodattrval->value; } - $newcomb->variation_price_percentage = $price_var_percent; + $newcomb->variation_price_percentage = $price_var_percent[1]; $newcomb->variation_price = $price_impact[1]; $newcomb->variation_weight = $weight_impact; $newcomb->variation_ref_ext = $this->db->escape($ref_ext); From b3984798ba0748c1978365677a7d97de05933959 Mon Sep 17 00:00:00 2001 From: Vincent Dieltiens Date: Fri, 10 Sep 2021 15:29:50 +0200 Subject: [PATCH 4/5] Add product-id and price-id in dataset of product select --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f9f596ad8c0..b78707b786a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3383,7 +3383,7 @@ class Form $opt .= ' disabled'; } if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) { - $opt .= ' data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'"'; + $opt .= ' data-product-id="'.$objp->rowid.'" data-price-id="'.$objp->idprodfournprice.'" data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'"'; } $opt .= ' data-description="'.dol_escape_htmltag($objp->description, 0, 1).'"'; $opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"'; From 26d5ccee6118362b4d40bc45c42acc17786c457d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 10 Sep 2021 16:58:29 +0200 Subject: [PATCH 5/5] NEW Survey - Add a clickable link in email send --- htdocs/opensurvey/fonctions.php | 1 - htdocs/public/opensurvey/studs.php | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 9d56aa8eb00..3d8d76c5c1e 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -198,7 +198,6 @@ function getUrlSondage($id, $admin = false) } else { $url = get_server_name().'/public/studs.php?sondage='.$id; } - $url = ''.$url.''; return $url; } diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 8b6da7e0b75..2a39e6e4730 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -165,7 +165,9 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // bo $application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM'); - $body = str_replace('\n', '
', $langs->transnoentities('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true))); + $link = getUrlSondage($numsondage, true); + $link = ''.$link.''; + $body = str_replace('\n', '
', $langs->transnoentities('EmailSomeoneVoted', $nom, $link)); //var_dump($body);exit; $cmailfile = new CMailFile("[".$application."] ".$langs->trans("Poll").': '.$object->title, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body, null, null, null, '', '', 0, -1);