noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 03/19: Documentation + bug cosmetic about TVA


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 03/19: Documentation + bug cosmetic about TVA_SIDED : total operation shown instead of total_invoice (VAT REVERSED)
Date: Thu, 12 Dec 2019 15:49:04 -0500 (EST)

sparkyx pushed a commit to tag rel7200
in repository noalyss.

commit 0d02e4cd370d7a31ca3aef3fd0bbe6e92ae8c4a3
Author: Dany De Bontridder <address@hidden>
Date:   Mon Dec 2 20:21:41 2019 +0100

    Documentation + bug cosmetic about TVA_SIDED : total operation shown
    instead of total_invoice (VAT REVERSED)
---
 doc/developper/Doxyfile                        |  2 +-
 include/ajax/ajax_search_operation.php         | 10 ++--
 include/class/acc_ledger_search.class.php      | 69 +++++++++++++++++++++-----
 include/class/anc_account_table.class.php      |  4 +-
 include/class/anc_balance_double.class.php     |  2 +-
 include/class/package_plugin.class.php         |  2 +-
 include/class/template_card_category.class.php |  2 +-
 include/class/tva_rate_mtable.class.php        |  2 +-
 include/export/export_gl_csv.php               |  4 +-
 include/lib/inplace_edit.class.php             |  4 +-
 include/lib/user_menu.php                      | 11 ++--
 11 files changed, 79 insertions(+), 33 deletions(-)

diff --git a/doc/developper/Doxyfile b/doc/developper/Doxyfile
index c827a12..bbe2291 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/include/ajax/ajax_search_operation.php 
b/include/ajax/ajax_search_operation.php
index 68988ea..9c3a5ef 100644
--- a/include/ajax/ajax_search_operation.php
+++ b/include/ajax/ajax_search_operation.php
@@ -45,8 +45,8 @@ $tiers=$http->get("tiers", "string", "");
 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 +93,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_search.class.php 
b/include/class/acc_ledger_search.class.php
index 12ba84e..6f4ea8c 100644
--- a/include/class/acc_ledger_search.class.php
+++ b/include/class/acc_ledger_search.class.php
@@ -321,34 +321,79 @@ 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
                end as total_invoice,
@@ -1069,7 +1114,7 @@ class Acc_Ledger_Search
             }
             $r.="<TD align=\"right\">";
 
-            $r.=( $positive!=0 )?"<font color=\"red\">  - 
".nbm($row['jr_montant'])."</font>":nbm($row['jr_montant']);
+            $r.=( $positive!=0 )?"<font color=\"red\">  - 
".nbm($row['total_invoice'])."</font>":nbm($row['total_invoice']);
             $r.="</TD>";
 
 
diff --git a/include/class/anc_account_table.class.php 
b/include/class/anc_account_table.class.php
index a1beb39..d92b0f9 100644
--- a/include/class/anc_account_table.class.php
+++ b/include/class/anc_account_table.class.php
@@ -28,7 +28,7 @@ if (!defined('ALLOWED'))
  * 
  */
 /**
- * @class
+ * @class Anc_Account_Table
  * @brief derived from Manage_Table_SQL , 
  */
 require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
@@ -90,4 +90,4 @@ class Anc_Account_Table extends Manage_Table_SQL
         if ($is_error==0)return TRUE;
         return FALSE;
     }
-}
\ No newline at end of file
+}
diff --git a/include/class/anc_balance_double.class.php 
b/include/class/anc_balance_double.class.php
index 0851e5b..f2cb55d 100644
--- a/include/class/anc_balance_double.class.php
+++ b/include/class/anc_balance_double.class.php
@@ -32,7 +32,7 @@ require_once  NOALYSS_INCLUDE.'/class/anc_print.class.php';
 require_once  NOALYSS_INCLUDE.'/class/anc_plan.class.php';
 require_once NOALYSS_INCLUDE.'/class/pdf.class.php';
 /**
- * @class
+ * @class Anc_Balance_Double
  * @brief Print the crossed balance between 2 plan
  *
  */
diff --git a/include/class/package_plugin.class.php 
b/include/class/package_plugin.class.php
index 2a6ddc7..5d89b38 100644
--- a/include/class/package_plugin.class.php
+++ b/include/class/package_plugin.class.php
@@ -26,7 +26,7 @@
 require_once NOALYSS_INCLUDE."/class/package_noalyss.class.php";
 
 /**
- * @class
+ * @class Package_Plugin
  * @brief Manage the installation of plug
  */
 class Package_Plugin extends Package_Noalyss
diff --git a/include/class/template_card_category.class.php 
b/include/class/template_card_category.class.php
index ee2e743..fc8be4d 100644
--- a/include/class/template_card_category.class.php
+++ b/include/class/template_card_category.class.php
@@ -28,7 +28,7 @@ require_once 
NOALYSS_INCLUDE.'/database/fiche_def_ref_sql.class.php';
  */
 
 /**
- * @class
+ * @class Template_Card_Category
  * @brief Manage the template of card category
  */
 class Template_Card_Category extends Manage_Table_SQL
diff --git a/include/class/tva_rate_mtable.class.php 
b/include/class/tva_rate_mtable.class.php
index 4ffba15..403f513 100644
--- a/include/class/tva_rate_mtable.class.php
+++ b/include/class/tva_rate_mtable.class.php
@@ -29,7 +29,7 @@ require_once 
NOALYSS_INCLUDE."/database/v_tva_rate_sql.class.php";
 require_once NOALYSS_INCLUDE."/database/tva_rate_sql.class.php";
 
 /**
- * @class
+ * @class Tva_Rate_MTable
  * @brief Configure the tva : code , rate, label ...
  * When using Manage_Table_SQL
  */
diff --git a/include/export/export_gl_csv.php b/include/export/export_gl_csv.php
index a908c9a..0a23f8f 100644
--- a/include/export/export_gl_csv.php
+++ b/include/export/export_gl_csv.php
@@ -22,7 +22,7 @@
 /*! \file
  * \brief create GL comptes as CSV.
  * Argument $_GET
- * @code
+ @code
  * Array
 (
     [gDossier] => 10104
@@ -35,7 +35,7 @@
     [from_poste] => 
     [to_poste] => 
 )
- * @encode
+@encode
  */
 
 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
diff --git a/include/lib/inplace_edit.class.php 
b/include/lib/inplace_edit.class.php
index 3913757..0d372de 100644
--- a/include/lib/inplace_edit.class.php
+++ b/include/lib/inplace_edit.class.php
@@ -25,7 +25,7 @@
  * @brief Inplace_edit class for ajax update of HtmlInput object
  */
 /**
- * @class
+ * @class Inplace_Edit
  * @brief Inplace_edit class for ajax update of HtmlInput object.
  * You need an ajax to response and modify the data. Some parameters will be 
sent
  * by default when you click on the element
@@ -205,4 +205,4 @@ EOF;
     function set_message($p_str) {
         $this->message=$p_str;
     }
-}
\ No newline at end of file
+}
diff --git a/include/lib/user_menu.php b/include/lib/user_menu.php
index 6444cb3..2f33dca 100644
--- a/include/lib/user_menu.php
+++ b/include/lib/user_menu.php
@@ -27,11 +27,10 @@ require_once NOALYSS_INCLUDE.'/lib/idate.class.php';
 require_once NOALYSS_INCLUDE.'/lib/icard.class.php';
 require_once NOALYSS_INCLUDE.'/lib/ispan.class.php';
 
-/*!   MenuAdmin */
-/* \brief show the menu for user/database management
-/*
-/* \return HTML code with the menu
-*/
+/*!   MenuAdmin 
+ * \brief show the menu for user/database management
+ * \return HTML code with the menu
+ */
 
 function MenuAdmin()
 {
@@ -142,4 +141,4 @@ function menu_acc_plan($p_start=1)
 <div style="clear: both"></div>
 <?php
 }
-?>
\ No newline at end of file
+?>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]