diff --git a/doc/developper/Doxyfile b/doc/developper/Doxyfile index c827a12e4..bbe229171 100644 --- a/doc/developper/Doxyfile +++ b/doc/developper/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = noalyss # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = Version-7.1 +PROJECT_NUMBER = Version-7.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/html/image/logo7200.png b/html/image/logo7200.png new file mode 100644 index 000000000..57ba0e556 Binary files /dev/null and b/html/image/logo7200.png differ diff --git a/html/index.css b/html/index.css index 64116f601..48e2e126a 100644 --- a/html/index.css +++ b/html/index.css @@ -183,7 +183,7 @@ BODY { left:0px; top:20px; - /*! height: 15%; */ + height: 15%; } #login_frm { position:absolute; @@ -203,7 +203,7 @@ BODY { width: 20rem; } } -@media only screen and (max-width : 1100px) { +@media only screen and (min-width : 1100px) { #alternate_browser { position:absolute; bottom: 30px; @@ -229,7 +229,7 @@ BODY { } #recover_link { position:absolute; - /*! top:397px; */ + top:397px; left:539px; background-color: white; width:auto; @@ -259,10 +259,10 @@ BODY { #logo_id { z-index: -1; position: absolute; - width: 148px; + width: 140px; left: 5px; top: 22px; - height: 155px; + height: 140px; } #login_frm { position:absolute; @@ -274,11 +274,11 @@ BODY { width: 24rem; } #recover_link { - position:fixed; + position:absolute; + top:55%; left:55%; background-color: white; margin-top:0px; - bottom: 10px; } #recover_box { diff --git a/html/index.php b/html/index.php index 8d860843d..3edf9fa83 100644 --- a/html/index.php +++ b/html/index.php @@ -191,7 +191,7 @@ if (isset ($_REQUEST['reconnect']) && isset ($_REQUEST['backurl'])) { } echo ' -NOALYSS +NOALYSS
'. '

Noalyss

'. $goto . diff --git a/html/install.php b/html/install.php index b42c11ef2..06f6b28db 100644 --- a/html/install.php +++ b/html/install.php @@ -1,5 +1,5 @@ @@ -79,7 +79,7 @@ session_start();

- NOALYSS + NOALYSS

NOALYSS : comptabilité - accountancy

diff --git a/html/js/scripts.js b/html/js/scripts.js index ab16f975a..8388f3bae 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -270,7 +270,7 @@ function compute_number(value) retval = eval(value); } catch (e) { - return 0; + return parseFloat(value); } /*pour gérer les divisions par 0*/ if (retval == Infinity) diff --git a/include/ajax/ajax_search_operation.php b/include/ajax/ajax_search_operation.php index 68988eab9..0c4701187 100644 --- a/include/ajax/ajax_search_operation.php +++ b/include/ajax/ajax_search_operation.php @@ -42,11 +42,12 @@ $base=basename($_SERVER['SCRIPT_NAME']); $inside=false; $tiers=$http->get("tiers", "string", ""); // With the amount id, we find the amount in a html elt +$http->set_empty(0); if (isset($_GET['amount_id'])) { put_global(array( - array("key"=>'amount_min', 'value'=>$_GET['amount_id']), - array("key"=>'amount_max', 'value'=>$_GET['amount_id']) + array("key"=>'amount_min', 'value'=>$http->get('amount_id',"number",0)), + array("key"=>'amount_max', 'value'=>$http->get('amount_id',"number",0)) )); } $target=$http->get("target", "string", ""); @@ -93,12 +94,14 @@ if (isset($_GET['viewsearch'])) // Navigation bar $step=MAX_RECONCILE; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; + $page=$http->get("page","number",1); + $offset=$http->get("offset","number",0); + if (count($_GET)==0) $array=null; else $array=$_GET; + $array['p_action']='ALL'; if (!isset($array['date_start'])||!isset($array['date_end'])) { diff --git a/include/class/acc_ledger_purchase.class.php b/include/class/acc_ledger_purchase.class.php index 91446a164..81ca78428 100644 --- a/include/class/acc_ledger_purchase.class.php +++ b/include/class/acc_ledger_purchase.class.php @@ -412,7 +412,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger $p_acc_operation->poste = $dna; $p_acc_operation->desc=$this->find_label($dna)." ND_TVA ".$p_fiche->strAttribut(ATTR_DEF_QUICKCODE); $j_id = $p_acc_operation->insert_jrnx(); - if ( $g_parameter->MY_ANALYTIC != "nu" ) + if ( $g_parameter->MY_ANALYTIC != "nu" + && $g_parameter->match_analytic($p_fiche->strAttribut(ATTR_DEF_ACCOUNT)) + ) { $op=new Anc_Operation($this->db); $op->oa_group=$p_group; @@ -451,7 +453,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger if ($p_nd_amount->nd_ded_vat > 0) $p_tot_debit = bcadd($p_tot_debit, $p_nd_amount->nd_ded_vat); $j_id = $p_acc_operation->insert_jrnx(); - if ( $g_parameter->MY_ANALYTIC != "nu" ) + if ( $g_parameter->MY_ANALYTIC != "nu" + && $g_parameter->match_analytic($p_fiche->strAttribut(ATTR_DEF_ACCOUNT)) + ) { $op=new Anc_Operation($this->db); $op->oa_group=$p_group; diff --git a/include/class/acc_ledger_search.class.php b/include/class/acc_ledger_search.class.php index 9ffc29292..198b0e7ac 100644 --- a/include/class/acc_ledger_search.class.php +++ b/include/class/acc_ledger_search.class.php @@ -19,8 +19,7 @@ */ // Copyright (2016) Author Dany De Bontridder -if (!defined('ALLOWED')) - die('Appel direct ne sont pas permis'); +// if (!defined('ALLOWED')) die('Appel direct ne sont pas permis'); /** * @file @@ -36,8 +35,8 @@ class Acc_Ledger_Search /** * @brief return a HTML string with the form for the search - * @param $p_type if the type of ledger possible values=ALL,VEN,ACH,ODS,FIN - * @param $all_type_ledger + * @param $p_type if the type of ledger possible values=ALL,VEN,ACH,ODS,FIN: uppercase ! + * @param $all_type_ledger * values : * - 1 means all the ledger of this type * - 0 No have the "Tous les journaux" availables @@ -50,7 +49,7 @@ class Acc_Ledger_Search function __construct($p_type, $p_all=1, $p_div="") { $this->cn=Dossier::connect(); - $this->type=$p_type; + $this->set_type($p_type); $this->all=$p_all; $this->div=$p_div; } @@ -72,6 +71,10 @@ class Acc_Ledger_Search public function set_type($type) { + if (! in_array($type, ["ALL","VEN","ACH","ODS","FIN"])) + { + throw new Exception ("ALS02 : type invalide $type",EXC_PARAM_VALUE); + } $this->type=$type; } @@ -265,7 +268,7 @@ class Acc_Ledger_Search * @brief this function will create a sql stmt to use to create the list for * the ledger, * @param $p_array is usually the $_GET, - * @param $p_order the order of the row + * @param $p_order the order of the row --> not used * @param $p_where is the sql condition if not null then the $p_array will not be used * \note the p_action will be used to filter the ledger but gl means ALL * struct array $p_array @@ -318,36 +321,81 @@ class Acc_Ledger_Search case when jrn_def_type='VEN' then (select ad_value from fiche_detail where ad_id=1 - and f_id=(select max(qs_client) from quant_sold join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) + and f_id=(select max(qs_client) from quant_sold join jrnx + using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) + where e.jr_id=x.jr_id)) when jrn_def_type = 'ACH' then - (select ad_value from fiche_detail where ad_id=1 - and f_id=(select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) + (select ad_value + from fiche_detail + where ad_id=1 + and f_id=(select max(qp_supplier) from quant_purchase + join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) when jrn_def_type = 'FIN' then (select ad_value from fiche_detail where ad_id=1 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) end as name, case - when jrn_def_type='VEN' then (select ad_value from fiche_detail where ad_id=32 and f_id=(select max(qs_client) from quant_sold join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'ACH' then (select ad_value from fiche_detail where ad_id=32 and f_id=(select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'FIN' then (select ad_value from fiche_detail where ad_id=32 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) + when jrn_def_type='VEN' then + (select ad_value from fiche_detail + where ad_id=32 + and f_id=(select max(qs_client) + from quant_sold + join jrnx using (j_id) + join jrn as e on (e.jr_grpt_id=j_grpt) + where e.jr_id=x.jr_id)) + when jrn_def_type = 'ACH' then (select ad_value + from fiche_detail + where ad_id=32 + and f_id=(select max(qp_supplier) + from quant_purchase + join jrnx using (j_id) + join jrn as e on (e.jr_grpt_id=j_grpt) + where e.jr_id=x.jr_id)) + when jrn_def_type = 'FIN' then (select ad_value + from fiche_detail + where ad_id=32 + and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) end as first_name, case - when jrn_def_type='VEN' then (select ad_value from fiche_detail where ad_id=23 and f_id=(select max(qs_client) from quant_sold join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'ACH' then (select ad_value from fiche_detail where ad_id=23 and f_id=(select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'FIN' then (select ad_value from fiche_detail where ad_id=23 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) + when jrn_def_type='VEN' then + (select ad_value + from fiche_detail + where ad_id=23 + and f_id=(select max(qs_client) + from quant_sold + join jrnx using (j_id) + join jrn as e on (e.jr_grpt_id=j_grpt) + where e.jr_id=x.jr_id)) + when jrn_def_type = 'ACH' then (select ad_value + from fiche_detail + where ad_id=23 + and f_id=(select max(qp_supplier) + from quant_purchase + join jrnx using (j_id) + join jrn as e on (e.jr_grpt_id=j_grpt) + where e.jr_id=x.jr_id)) + when jrn_def_type = 'FIN' then (select ad_value + from fiche_detail + where ad_id=23 + and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) end as quick_code, case when jrn_def_type='VEN' then (select sum(qs_price)+sum(vat) from - (select qs_internal,qs_price,case when qs_vat_sided<>0 then 0 else qs_vat end as vat from quant_sold where qs_internal=X.jr_internal) as ven_invoice + (select qs_internal,qs_price,case when qs_vat_sided<>0 then 0 + else qs_vat end as vat + from quant_sold + where qs_internal=X.jr_internal) as ven_invoice ) when jrn_def_type = 'ACH' then ( select sum(qp_price)+sum(vat)+sum(qp_nd_tva)+sum(qp_nd_tva_recup) from - (select qp_internal,qp_price,qp_nd_tva,qp_nd_tva_recup,qp_vat-qp_vat_sided as vat from quant_purchase where qp_internal=X.jr_internal) as invoice_purchase + (select qp_internal,qp_price,qp_nd_tva,qp_nd_tva_recup,qp_vat-qp_vat_sided as vat + from quant_purchase + where qp_internal=X.jr_internal) as invoice_purchase ) - else null + else jr_montant end as total_invoice, jr_date_paid, to_char(jr_date_paid,'DD.MM.YY') as str_jr_date_paid, @@ -407,7 +455,7 @@ class Acc_Ledger_Search $and=''; $g_user=new User($this->cn); - $p_action=$ledger_type; + $p_action=(isset ($ledger_type)) ? $ledger_type:$this->type; if ($p_action=='') $p_action='ALL'; if ($r_jrn==-1) @@ -571,6 +619,8 @@ class Acc_Ledger_Search $where=$fil_ledger.$fil_amount.$fil_date.$fil_desc.$fil_sec.$fil_amount. $fil_qcode.$fil_paid.$fil_account.$fil_date_paid.$fil_hide_operation; $sql.=" where ".$where; + + // Q?? Why do we return where if it is included in SQL ? return array($sql, $where); } @@ -583,6 +633,7 @@ class Acc_Ledger_Search */ function display_search_form() { + $http=new HttpInput(); $r=''; $r.='