diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 2e70ac942..7cb77c916 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -1440,7 +1440,7 @@ function manage_search_filter(p_obj) { function save_filter(p_div,p_dossier) { var elt=['ledger_type','nb_jrn','date_start','date_end', 'date_paid_start','date_paid_end','desc','amount_min','amount_max','qcode','accounting', - 'operation_filter','tag_option','p_currency_code']; + 'operation_filter','tag_option','p_currency_code','tva_id_search']; var eltValue={}; var i =0; eltValue['gDossier']=p_dossier; @@ -1507,10 +1507,9 @@ function load_filter(p_div,p_dossier,p_filter_id) { onSuccess:function (req) { try { var answer=req.responseJSON; - console.log(answer); var elt=['ledger_type','date_start','date_end','date_paid_start','date_paid_end', 'desc','amount_min','amount_max','qcode','accounting','operation_filter','tag_option' - ,'p_currency_code']; + ,'p_currency_code','tva_id_search']; for (var i=0;isetp("operation_filter", $http->post("operation_filter", 'string', NULL)); $new->setp("filter_name", h($http->post("filter_name", 'string'))); $new->setp("uf_currency_code", h($http->post("p_currency_code", 'number',-1))); + $new->setp("tva_id_search", h($http->post("tva_id_search", 'number',null))); $tag=$http->post("tag","string",''); if (is_array($tag) ) diff --git a/include/database/user_filter_sql.class.php b/include/database/user_filter_sql.class.php index 71b724e83..5dd6560b7 100644 --- a/include/database/user_filter_sql.class.php +++ b/include/database/user_filter_sql.class.php @@ -62,6 +62,7 @@ class User_filter_SQL extends Table_Data_SQL ,'uf_tag'=>'uf_tag' ,'uf_tag_option'=>'uf_tag_option' ,'uf_currency_code'=>'uf_currency_code' + ,'tva_id_search'=>'tva_id_search' ); /* @@ -88,6 +89,7 @@ class User_filter_SQL extends Table_Data_SQL ,'uf_tag'=>'text' ,'uf_tag_option'=>'numeric' ,'uf_currency_code'=>'numeric' + ,'tva_id_search'=>'numeric' ); diff --git a/include/sql/patch/upgrade187.sql b/include/sql/patch/upgrade187.sql new file mode 100644 index 000000000..10544e551 --- /dev/null +++ b/include/sql/patch/upgrade187.sql @@ -0,0 +1,8 @@ +begin; + +alter table public.user_filter add tva_id_search integer; + +comment on column public.user_filter.tva_id_search is 'VAT id '; + +insert into version (val,v_description) values (188,'Filter for VAT id'); +commit; \ No newline at end of file