From eaa6987e8b6769af55c08868d3f4cc6731c7e167 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 8 Jul 2021 17:15:03 +0200 Subject: [PATCH 1/2] Fix: formconfim if type radio must be :checked to get correct value --- 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 1019e9623e4..ff6a1a4334a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4434,7 +4434,7 @@ class Form var more = ""; var inputvalue; if ($("input[name=\'" + inputname + "\']").attr("type") == "radio") { - inputvalue = $("input[name=\'" + inputname + "\']").val(); + inputvalue = $("input[name=\'" + inputname + "\']:checked").val(); } else { if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; } inputvalue = $("#" + inputname + more).val(); From cd215cda17f3e2c41f25de8304f207a13615e8f9 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 8 Jul 2021 21:49:53 +0200 Subject: [PATCH 2/2] FIX Accountancy - if we define a date start, automatic binding try to solve old binding --- htdocs/accountancy/customer/index.php | 3 +++ htdocs/accountancy/supplier/index.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 1a5098bda38..943d914a980 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -136,6 +136,9 @@ if ($action == 'validatehistory') { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } dol_syslog('htdocs/accountancy/customer/index.php'); $result = $db->query($sql); diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index 0dbe09fa468..f20c238514a 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -133,6 +133,9 @@ if ($action == 'validatehistory') { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } dol_syslog('htdocs/accountancy/supplier/index.php');