noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 11/13: Task #2373 : check security


From: dwm
Subject: [Noalyss-commit] [noalyss] 11/13: Task #2373 : check security
Date: Tue, 30 Jul 2024 04:48:03 -0400 (EDT)

sparkyx pushed a commit to branch unstable
in repository noalyss.

commit 707e1144ca7935bc052eb35256cb1fa7488a2540
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon Jul 29 16:28:01 2024 +0200

    Task #2373 : check security
---
 include/class/tax_detail.class.php           | 4 +++-
 include/template/tax_detail-display_form.php | 2 +-
 include/template/tax_detail-html.php         | 5 +----
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/class/tax_detail.class.php 
b/include/class/tax_detail.class.php
index 98906b6c6..1008cc6b3 100644
--- a/include/class/tax_detail.class.php
+++ b/include/class/tax_detail.class.php
@@ -58,7 +58,9 @@ class Tax_Detail
 
         // Security
         if ($g_user->get_status_security_ledger()==1 && $g_user->isAdmin()==0) 
 {
-            $filter_ledger.=$g_user->get_ledger_sql('ALL')."   and ";
+            $sSecurity=$g_user->get_ledger_sql('ALL')."   and ";
+            $sSecurity=str_replace('jrn_def_id','v1.jr_def_id',$sSecurity);
+            $filter_ledger.=$sSecurity;
         }
 
         // filter on the date
diff --git a/include/template/tax_detail-display_form.php 
b/include/template/tax_detail-display_form.php
index 31c5f2fac..14ba481b4 100644
--- a/include/template/tax_detail-display_form.php
+++ b/include/template/tax_detail-display_form.php
@@ -54,7 +54,7 @@ $idateend->value = $http->get('to', 'date', $a_limit[1]);
             <?php
             $a_ledger_purchase=$g_user->get_ledger('ACH',3);
             $a_ledger_sale=$g_user->get_ledger('VEN',3);
-            $a_ledger=array_merge($a_ledger_sale,$a_ledger_purchase);
+            $a_ledger=array_merge($a_ledger_sale??[],$a_ledger_purchase??[]);
             if ( DEBUGNOALYSS > 1 ) echo 
\Noalyss\Dbg::hidden_info("a_ledger",$a_ledger);
             $select_value=array();
             $select_value[]=array('value'=>-1,"label"=>'Tous vente et Achat');
diff --git a/include/template/tax_detail-html.php 
b/include/template/tax_detail-html.php
index a235d5e17..2269630af 100644
--- a/include/template/tax_detail-html.php
+++ b/include/template/tax_detail-html.php
@@ -52,10 +52,7 @@ foreach ($data as $item):
     $class=($idx%2==0)?'even':'odd';
     
$receipt_number=($item['jr_pj_number']=="")?$item['jr_internal']:$item['jr_pj_number'];
     $control=bcmul($item['tva_rate'],$item['j_montant'],4);
-    $delta_control=bcsub($control,$item['vat_amount']);
- //   $delta_control=bcsub($delta_control,$item['qp_nd_tva_recup']);
-  //  $delta_control=bcsub($delta_control,$item['qp_nd_tva']);
-  /*  $delta_control=bcsub($delta_control,$item['qp_dep_priv']);*/
+    $delta_control=bcsub($control,$item['vat_amount'],2);
     $delta_control=round($delta_control,2);
     $w_amount="";
     if ( $delta_control != 0 ) {



reply via email to

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