From 7f38f49986477d652e212cf82258ae93b1ca776b Mon Sep 17 00:00:00 2001 From: Dany wm Date: Thu, 18 Jul 2024 19:01:02 +0200 Subject: [PATCH 1/3] Documentation --- include/ajax/ajax_check_vatnumber.php | 1 + include/lib/itva_popup.class.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/ajax/ajax_check_vatnumber.php b/include/ajax/ajax_check_vatnumber.php index c97655630..120eaa850 100644 --- a/include/ajax/ajax_check_vatnumber.php +++ b/include/ajax/ajax_check_vatnumber.php @@ -91,6 +91,7 @@ EOF; } else { $obj->status = 'NOK'; + $obj->html=_('non valide'); } echo json_response($obj); diff --git a/include/lib/itva_popup.class.php b/include/lib/itva_popup.class.php index 6e248ffba..efcfce12b 100644 --- a/include/lib/itva_popup.class.php +++ b/include/lib/itva_popup.class.php @@ -110,7 +110,9 @@ class ITva_Popup extends HtmlInput return $r; } - /*!\brief show the html input of the widget*/ + /*! + \brief show the html input of the widget + */ public function input($p_name = null, $p_value = null) { $this->name = ($p_name == null) ? $this->name : $p_name; @@ -160,7 +162,7 @@ list="dl_tva_%s" autocomplete="off">'; } /** - * Set a filter to limit the choice of VAT ; + *@brief Set a filter to limit the choice of VAT ; * possible values are : * - sale if there is an accounting for sale * - purchase if there is an accounting for purchase From ec8aa1d1e0cb64b27d0a58e1ebb30bcd342a088d Mon Sep 17 00:00:00 2001 From: Dany wm Date: Fri, 19 Jul 2024 10:44:45 +0200 Subject: [PATCH 2/3] Ajax call check_vatnumber must no block --- html/ajax_misc.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/html/ajax_misc.php b/html/ajax_misc.php index e111760f4..0dbf4b460 100644 --- a/html/ajax_misc.php +++ b/html/ajax_misc.php @@ -36,13 +36,19 @@ * */ if ( ! defined('ALLOWED')) define ('ALLOWED',1); - require_once '../include/constant.php'; require_once NOALYSS_INCLUDE."/lib/ac_common.php"; global $http; $http=new HttpInput(); +try { + $op= $http->request("op"); + if ($op =='check_vatnumber') session_write_close(); + +} catch (\Exception $e) { + exit(); +} /* we ask a dg box for disconnecting */ if ($http->request('op',"string","") == 'disconnect') { @@ -60,24 +66,12 @@ if ( ! isset($_SESSION[SESSION_KEY."g_user"])) { mb_internal_encoding("UTF-8"); -$var = array( 'op'); -$cont = 0; -/* check if mandatory parameters are given */ -foreach ($var as $v) -{ - if (!isset($_REQUEST [$v])) - { - echo "$v is not set "; - $cont = 1; - } -} - // If not connected to a folder if ( ! isset($_REQUEST['gDossier'])) { $gDossier=0; } -if ($cont != 0) exit(); + extract($_REQUEST, EXTR_SKIP ); From e274cf5cf6c026815b017f64875c6d829db83442 Mon Sep 17 00:00:00 2001 From: Dany wm Date: Sat, 20 Jul 2024 14:48:38 +0200 Subject: [PATCH 3/3] bug : followup order --- include/class/follow_up.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index f33da7a71..1a90649cf 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -696,6 +696,7 @@ class Follow_Up { // for the sort $arg=HtmlInput::get_to_string(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "only_internal", "state", "qcode", "ag_dest_query", "action_query", "tdoc", "date_start", "date_end", "hsstate", "searchtag"),""); + $arg=($arg!="")?"&$arg":""; $url=$p_base.$arg; $table=new Sort_Table(); @@ -717,7 +718,7 @@ class Follow_Up //7 $table->add(_('Etat'), $url, 'order by s_value asc', 'order by s_value desc', 'ea', 'ed'); // 8 - $table->add(_('Dernier comm.'), $url, 'order by last_comment_date nulls last', 'order by last_comment_date desc nulls last', 'dca', 'dcd'); + $table->add(_('Dernier comm.'), $url, 'order by coalesce(last_comment_date, ag.ag_timestamp) asc', 'order by coalesce(last_comment_date, ag.ag_timestamp) desc', 'dca', 'dcd'); // 9 $table->add(_('Priorité'), $url, 'order by ag_priority ', 'order by ag_priority desc ', 'pra', 'prd'); $http=new HttpInput();