From 6c8293612d807d6eae8b9fd8daa45f7d962d96c1 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 26 Mar 2021 16:41:48 +0100 Subject: [PATCH 01/24] 13.0 --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 371c8be2f5e..18ae79180a0 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,10 @@ htdocs/includes/squizlabs/ htdocs/includes/webmozart/ htdocs/.well-known/apple-developer-merchantid-domain-association + +cyberoffice/ +mycyberoffice/ + # Node Modules build/yarn-error.log build/node_modules/ From f8fcf7c16b68fa4fe4bc80820be42808b5826df3 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Fri, 16 Apr 2021 16:55:19 +0200 Subject: [PATCH 02/24] FIX : type link extrafield case for advanced target emailing --- htdocs/comm/mailing/class/advtargetemailing.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 6987a27dacd..ff2e056344c 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -640,6 +640,10 @@ class AdvanceTargetingMailing extends CommonObject if ($arrayquery['options_'.$key]!=''){ $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; } + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { + if ($arrayquery['options_'.$key] > 0){ + $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; + } } else { if (is_array($arrayquery['options_'.$key])) { $sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))"; @@ -666,7 +670,6 @@ class AdvanceTargetingMailing extends CommonObject while ($i < $num) { $obj = $this->db->fetch_object($resql); - $this->thirdparty_lines[$i] = $obj->rowid; $i++; From 37f44f4a07d05bd25de1e7d4aa6a776ec52c9d9f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 16 Apr 2021 14:58:57 +0000 Subject: [PATCH 03/24] Fixing style errors. --- htdocs/comm/mailing/class/advtargetemailing.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index ff2e056344c..3a8a9396d29 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -643,7 +643,7 @@ class AdvanceTargetingMailing extends CommonObject } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { if ($arrayquery['options_'.$key] > 0){ $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; - } + } } else { if (is_array($arrayquery['options_'.$key])) { $sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))"; From 5b6439ca5eb742a41d13a40fbe1f33b00a5817f2 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Mon, 19 Apr 2021 09:15:47 +0200 Subject: [PATCH 04/24] FIX : cast int --- htdocs/comm/mailing/class/advtargetemailing.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index ff2e056344c..730ca263f1d 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -638,7 +638,7 @@ class AdvanceTargetingMailing extends CommonObject } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ - $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; + $sqlwhere[]= " (te.".$key." = ".((int)$arrayquery['options_'.$key]).")"; } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { if ($arrayquery['options_'.$key] > 0){ From 8c428081ab94113a19ae70e0b1d8b8be4eeab84c Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Mon, 19 Apr 2021 09:17:33 +0200 Subject: [PATCH 05/24] FIX : test on link type --- htdocs/comm/mailing/class/advtargetemailing.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 4356039d080..bb472753204 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -638,11 +638,11 @@ class AdvanceTargetingMailing extends CommonObject } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ - $sqlwhere[]= " (te.".$key." = ".((int)$arrayquery['options_'.$key]).")"; + $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { if ($arrayquery['options_'.$key] > 0){ - $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; + $sqlwhere[]= " (te.".$key." = ".((int)$arrayquery['options_'.$key]).")"; } } else { if (is_array($arrayquery['options_'.$key])) { From 318a783237afa2c4c06226d282f28bcaf1cb7e31 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 19 Apr 2021 07:19:45 +0000 Subject: [PATCH 06/24] Fixing style errors. --- htdocs/comm/mailing/class/advtargetemailing.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index bb472753204..cb539768cf9 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -642,7 +642,7 @@ class AdvanceTargetingMailing extends CommonObject } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { if ($arrayquery['options_'.$key] > 0){ - $sqlwhere[]= " (te.".$key." = ".((int)$arrayquery['options_'.$key]).")"; + $sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")"; } } else { if (is_array($arrayquery['options_'.$key])) { From 1729497d621851330cbb40311bfdc905818763cf Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 20 Apr 2021 13:56:58 +0200 Subject: [PATCH 07/24] FIX Accountancy - Quadra export - wrong data on credit --- htdocs/accountancy/class/accountancyexport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index e24b1abe8b1..f884add80de 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -555,7 +555,7 @@ class AccountancyExport $Tab['signe_montant'] = '+'; // The amount must be in centimes without decimal points. - $Tab['montant'] = str_pad(abs(($data->debit - $abs->credit) * 100), 12, '0', STR_PAD_LEFT); + $Tab['montant'] = str_pad(abs(($data->debit - $data->credit) * 100), 12, '0', STR_PAD_LEFT); $Tab['contrepartie'] = str_repeat(' ', 8); // Force date format : %d%m%y From 95c7657acef236f85c534f1300cc3a02d733c99f Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 20 Apr 2021 20:21:24 +0200 Subject: [PATCH 08/24] add gitingore for modulebuilders --- htdocs/modulebuilder/template/.gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/.gitignore b/htdocs/modulebuilder/template/.gitignore index 942cb8b03ba..150a55149b6 100644 --- a/htdocs/modulebuilder/template/.gitignore +++ b/htdocs/modulebuilder/template/.gitignore @@ -15,4 +15,6 @@ /.buildpath /.project # Other -*.back \ No newline at end of file +*.back +/.editorconfig +/.gitattributes From b2d6b73125ac16597b6d947519774c9f9bf6f6e2 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 20 Apr 2021 20:23:45 +0200 Subject: [PATCH 09/24] add gitingore for modulebuilders --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index 18ae79180a0..371c8be2f5e 100644 --- a/.gitignore +++ b/.gitignore @@ -43,10 +43,6 @@ htdocs/includes/squizlabs/ htdocs/includes/webmozart/ htdocs/.well-known/apple-developer-merchantid-domain-association - -cyberoffice/ -mycyberoffice/ - # Node Modules build/yarn-error.log build/node_modules/ From a15d58065facaf0ef2cd3e46f6f8222aa48d4a55 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 20 Apr 2021 20:25:51 +0200 Subject: [PATCH 10/24] =?UTF-8?q?=09modifi=C3=A9=C2=A0:=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 371c8be2f5e..a008514f2ee 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ yarn.lock package-lock.json doc/install.lock + +/htdocs/cyber* +/htdocs/mycyber* From efcc5e714a23eb4fe5a799ac7b2d2ea046014143 Mon Sep 17 00:00:00 2001 From: ksar <35605507+ksar-ksar@users.noreply.github.com> Date: Thu, 22 Apr 2021 15:49:37 +0200 Subject: [PATCH 11/24] FIX #17363 --- htdocs/admin/payment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 925c8fd6ff4..61f935572d2 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -184,7 +184,7 @@ foreach ($dirmodels as $reldir) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; From ee96fb64707b646873179171451c3a6efed2ec2a Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Thu, 22 Apr 2021 15:56:12 +0200 Subject: [PATCH 12/24] FIX: payment creation: re-generate invoice PDF with correct display options --- htdocs/compta/paiement/class/paiement.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 05d2fe0c08b..221ff3de042 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -440,8 +440,13 @@ class Paiement extends CommonObject $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } + + $hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0; + $hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0; + $hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0; + $ret = $invoice->fetch($facid); // Reload to get new records - $result = $invoice->generateDocument($invoice->modelpdf, $outputlangs); + $result = $invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) { setEventMessages($invoice->error, $invoice->errors, 'errors'); $error++; From ce022ab36cbbc4f2e1d46c02eefa5f90716f3443 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Thu, 22 Apr 2021 15:57:06 +0200 Subject: [PATCH 13/24] FIX: payment validation: invoices PDF were no re-generated, make it with correct display options --- htdocs/compta/paiement/card.php | 79 +++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 59da7387f62..f54417b8a6f 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -109,28 +109,71 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> $object->fetch($id); if ($object->valide($user) > 0) { - $db->commit(); - // Loop on each invoice linked to this payment to rebuild PDF - $factures = array(); - foreach ($factures as $id) - { - $fac = new Facture($db); - $fac->fetch($id); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $outputlangs = $langs; + if (!empty($_REQUEST['lang_id'])) + { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($_REQUEST['lang_id']); + } + + $hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0; + $hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0; + $hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0; + + $sql = 'SELECT f.rowid as facid'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s'; + $sql .= ' WHERE pf.fk_facture = f.rowid'; + $sql .= ' AND f.fk_soc = s.rowid'; + $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; + $sql .= ' AND pf.fk_paiement = '.$object->id; + $resql = $db->query($sql); + if ($resql) + { + $i = 0; + $num = $db->num_rows($resql); + + if ($num > 0) + { + while ($i < $num) + { + $objp = $db->fetch_object($resql); + + $invoice = new Facture($db); + + if ($invoice->fetch($objp->facid) <= 0) { + $errors++; + setEventMessage($invoice->error, $invoice->errors, 'errors'); + break; + } + + if ($invoice->generateDocument($fac->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref) < 0) { + $errors++; + setEventMessage($invoice->error, $invoice->errors, 'errors'); + break; + } + + $i++; + } + } + + $db->free($resql); + } + else + { + $errors++; + setEventMessage($db->error, $db->errors, 'errors'); + } - $outputlangs = $langs; - if (!empty($_REQUEST['lang_id'])) - { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($_REQUEST['lang_id']); - } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $fac->generateDocument($fac->modelpdf, $outputlangs); - } } - header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); - exit; + if (! $errors) { + $db->commit(); + + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); + exit; + } } else { From 196ebbb8e8d3edf924bcefbd280f6b670a4de03f Mon Sep 17 00:00:00 2001 From: Indelog Date: Thu, 22 Apr 2021 19:18:47 +0200 Subject: [PATCH 14/24] Fix : empty email on public membership form We can validate the public membership form whith an empty email when `$conf->global->ADHERENT_MAIL_REQUIRED` is set. This fix it. --- htdocs/public/members/new.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 1946125dbc2..f850cdff35c 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -208,9 +208,12 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
\n"; } - if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + if ($conf->global->ADHERENT_MAIL_REQUIRED && empty(GETPOST('email'))) { + $error++; + $errmsg .= $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Email'))."
\n"; + } elseif (GETPOST("email") && !isValidEmail(GETPOST("email"))) { ++ $langs->load('errors'); $error++; - $langs->load("errors"); $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; } $birthday = dol_mktime($_POST["birthhour"], $_POST["birthmin"], $_POST["birthsec"], $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]); @@ -586,7 +589,7 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print ''; } // EMail -print ''.$langs->trans("Email").' *'."\n"; +print ''.$langs->trans("Email").($conf->global->ADHERENT_MAIL_REQUIRED ? ' *' : '').''."\n"; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print ''.$langs->trans("Login").' *'."\n"; From e7a4699bd930c54372497f70bc3430d1d3f1c5c7 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 22 Apr 2021 17:26:46 +0000 Subject: [PATCH 15/24] Fixing style errors. --- htdocs/public/members/new.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index f850cdff35c..3d0ecc6fd16 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -212,7 +212,7 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Email'))."
\n"; } elseif (GETPOST("email") && !isValidEmail(GETPOST("email"))) { -+ $langs->load('errors'); + + $langs->load('errors'); $error++; $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; } From 3d3fb17da31e83aa78f8b32a738d9746bc91c5c5 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Fri, 23 Apr 2021 15:41:43 +0200 Subject: [PATCH 16/24] Add parameter "option" to hook formattachOptions --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 974bdce6d26..0bb30241062 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -268,7 +268,7 @@ class FormFile $out .= "\n\n"; } - $parameters = array('socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url'=>$url, 'perm'=>$perm); + $parameters = array('socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url'=>$url, 'perm'=>$perm, 'options'=>$options); $res = $hookmanager->executeHooks('formattachOptions', $parameters, $object); if (empty($res)) { From 8b49585b64137442fddeba4f51b7b43776236833 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 24 Apr 2021 18:21:36 +0200 Subject: [PATCH 17/24] fix: return invoice id when create from order --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 4ae9fe197fe..8d0e2bb8b47 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1387,7 +1387,7 @@ class Facture extends CommonInvoice if (!$error) { - return 1; + return $ret; } else return -1; } else return -1; } From e229348e2c52eec63e7a599658158a4a0e409e99 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 24 Apr 2021 18:24:25 +0200 Subject: [PATCH 18/24] .gitignre --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index a008514f2ee..371c8be2f5e 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,3 @@ yarn.lock package-lock.json doc/install.lock - -/htdocs/cyber* -/htdocs/mycyber* From bc924ca00ee4fd76270876a130df1a492d09700a Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 24 Apr 2021 18:27:43 +0200 Subject: [PATCH 19/24] .gitignre --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 8d0e2bb8b47..4ae9fe197fe 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1387,7 +1387,7 @@ class Facture extends CommonInvoice if (!$error) { - return $ret; + return 1; } else return -1; } else return -1; } From 09d68dd7a649a4d8e84461ac24c852393d0feb15 Mon Sep 17 00:00:00 2001 From: jpb Date: Mon, 26 Apr 2021 17:00:53 +0200 Subject: [PATCH 20/24] fix the productCombination class on updatePrice --- htdocs/variants/class/ProductCombination.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 9152336bbe4..d01fd5c37c7 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -534,7 +534,7 @@ class ProductCombination $new_price += $variation_price; } - $child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq); + $child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq,0, array(),$parent->default_vat_code); } } } else { From 8d07b43ccd9f19b3ea47d0fe7212e0b8049e274f Mon Sep 17 00:00:00 2001 From: jpb Date: Mon, 26 Apr 2021 17:05:21 +0200 Subject: [PATCH 21/24] space stickler --- htdocs/variants/class/ProductCombination.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index d01fd5c37c7..51499ead88d 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -534,7 +534,7 @@ class ProductCombination $new_price += $variation_price; } - $child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq,0, array(),$parent->default_vat_code); + $child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq,0, array(), $parent->default_vat_code); } } } else { From a8136a00b1933b8891e3e28b416767aedabccde3 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 26 Apr 2021 15:07:41 +0000 Subject: [PATCH 22/24] Fixing style errors. --- htdocs/variants/class/ProductCombination.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 51499ead88d..bc479b68653 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -534,7 +534,7 @@ class ProductCombination $new_price += $variation_price; } - $child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq,0, array(), $parent->default_vat_code); + $child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq, 0, array(), $parent->default_vat_code); } } } else { From e9b8e817738499d9470c34bbdb54fd2955270d21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Apr 2021 01:45:10 +0200 Subject: [PATCH 23/24] Update advtargetemailing.class.php --- htdocs/comm/mailing/class/advtargetemailing.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index cb539768cf9..b43daf4bf0c 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -641,8 +641,8 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') { - if ($arrayquery['options_'.$key] > 0){ - $sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")"; + if ($arrayquery['options_'.$key] > 0) { + $sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")"; } } else { if (is_array($arrayquery['options_'.$key])) { From 12a4bc64adb983e6a76325c8bd6183d7cde962d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Apr 2021 02:01:46 +0200 Subject: [PATCH 24/24] Remove $_REQUEST --- htdocs/compta/paiement/card.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index ff9f93bc297..680a8c501a2 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -109,14 +109,13 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->facture if ($object->validate($user) > 0) { $db->commit(); - + // Loop on each invoice linked to this payment to rebuild PDF if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; - if (!empty($_REQUEST['lang_id'])) - { + if (GETPOST('lang_id', 'aZ09')) { $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($_REQUEST['lang_id']); + $outputlangs->setDefaultLang(GETPOST('lang_id', 'aZ09')); } $hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;