noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 02/02: Task #1656 - Historique : ordre des co


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/02: Task #1656 - Historique : ordre des colonnes #0001656: Historique : ordre des colonnes
Date: Sat, 21 Jul 2018 07:47:30 -0400 (EDT)

sparkyx pushed a commit to annotated tag rel7008
in repository noalyss.

commit 54216fe860db10946e8787dce99e70fbd55b1499
Author: Dany De Bontridder <address@hidden>
Date:   Sat Jul 21 13:07:44 2018 +0200

    Task #1656 - Historique : ordre des colonnes
    #0001656: Historique : ordre des colonnes
---
 include/class/acc_ledger_search.class.php | 62 ++++++++++++++++++++-----------
 include/history_operation.inc.php         |  7 +++-
 2 files changed, 47 insertions(+), 22 deletions(-)

diff --git a/include/class/acc_ledger_search.class.php 
b/include/class/acc_ledger_search.class.php
index 40cb608..f2fdb2b 100644
--- a/include/class/acc_ledger_search.class.php
+++ b/include/class/acc_ledger_search.class.php
@@ -660,24 +660,30 @@ class Acc_Ledger_Search
         $Max=Database::num_row($Res);
 
         if ($Max==0)
+        {
             return array(0, _("Aucun enregistrement trouvé"));
+        }
 
         $r.='<table class="result">';
 
 
         $r.="<tr >";
-        $r.="<th>"._("n° interne")."</th>";
-        if ($this->type=='ALL')
-        {
-            $r.=th('Journal');
-        }
         $r.='<th>'.$table->get_header(0).'</th>';
         if ($p_paid!=0)
+        {
             $r.='<th>'.$table->get_header(1).'</td>';
+        }
         if ($p_paid!=0)
+        {
             $r.='<th>'.$table->get_header(2).'</th>';
+        }
         $r.='<th>'.$table->get_header(3).'</th>';
-        $r.='<th>'.$table->get_header(4).'</th>';
+        $r.=th('Journal');
+        if ( $this->type != "ODS") 
+        {
+            $r.='<th>'.$table->get_header(4).'</th>';
+        }
+        $r.="<th>"._("n° interne")."</th>";
         $r.='<th>'.$table->get_header(6).'</th>';
         $r.=th('Notes', ' style="width:15%"');
         $r.='<th>'.$table->get_header(5).'</th>';
@@ -699,24 +705,18 @@ class Acc_Ledger_Search
             $row=Database::fetch_array($Res, $i);
 
             if ($i%2==0)
+            {
                 $tr='<TR class="odd">';
+            }
             else
+            {
                 $tr='<TR class="even">';
+            }
             $r.=$tr;
             //internal code
             // button  modify
-            $r.="<TD>";
-            // If url contains
-            //
-
-            $href=basename($_SERVER['PHP_SELF']);
-
-
-            $r.=sprintf('<A class="detail" style="text-decoration:underline" 
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
-                    $row['jr_id'], $gDossier, $row['jr_internal']);
-            $r.="</TD>";
-            if ($this->type=='ALL')
-                $r.=td($row['jrn_def_name']);
+           
+          
             // date
             $r.="<TD>";
             $r.=$row['str_jr_date'];
@@ -736,10 +736,24 @@ class Acc_Ledger_Search
             $r.="<TD>";
             $r.=$row['jr_pj_number'];
             $r.="</TD>";
+            
+            // Ledger
+            $r.=td($row['jrn_def_name']);
 
-            // Tiers
-            
$other=($row['quick_code']!='')?HtmlInput::card_detail($row['quick_code'],h($row['name'].'
 '.$row['first_name'])):'';
-            $r.=td($other);
+            
+            if ($this->type != 'ODS')
+            {
+                // Tiers
+                
$other=($row['quick_code']!='')?HtmlInput::card_detail($row['quick_code'],h($row['name'].'
 '.$row['first_name'])):'';
+                $r.=td($other);
+            }
+            
+            // Internal number
+            $r.="<TD>";
+            $r.=sprintf('<A class="detail" style="text-decoration:underline" 
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
+                    $row['jr_id'], $gDossier, $row['jr_internal']);
+            $r.="</TD>";
+            
             // comment
             $r.="<TD>";
             $tmp_jr_comment=h($row['jr_comment']);
@@ -757,7 +771,9 @@ class Acc_Ledger_Search
                 $positive=$this->cn->get_value("select qf_amount from 
quant_fin where jr_id=$1",
                         array($row['jr_id']));
                 if ($this->cn->count()!=0)
+                {
                     $positive=($positive<0)?1:0;
+                }
             }
             $r.="<TD align=\"right\">";
             $t_amount=$row['jr_montant'];
@@ -788,9 +804,13 @@ class Acc_Ledger_Search
                 $h->name="set_jr_id".$row['jr_id'];
                 $r.='<TD>'.$w->input().$h->input().'</TD>';
                 if ($row['jr_rapt']=='paid')
+                {
                     $amount_paid=bcadd($amount_paid, $t_amount);
+                }
                 else
+                {
                     $amount_unpaid=bcadd($amount_unpaid, $t_amount);
+                }
             }
 
             // Rapprochement
diff --git a/include/history_operation.inc.php 
b/include/history_operation.inc.php
index 2acc4fa..20113ba 100644
--- a/include/history_operation.inc.php
+++ b/include/history_operation.inc.php
@@ -42,6 +42,7 @@ switch($ledger_type)
 {
         case 'ACH':
                 $ask_pay=1;
+                $p_array['ledger_type']='ACH';
                 break;
         case 'ODS':
                 $ask_pay=0;
@@ -53,9 +54,11 @@ switch($ledger_type)
                 break;
         case 'VEN':
                 $ask_pay=1;
+                $p_array['ledger_type']='VEN';
                 break;
         case 'FIN':
                 $ask_pay=0;
+                $p_array['ledger_type']='FIN';
                 break;
 
 }
@@ -95,7 +98,9 @@ if (!isset($p_array['date_start']))
 }
 else
 {
-       $msg='<h2 class="info2">'._("Période ").$_GET['date_start']._(" au 
").$_GET['date_end'].'</h2>';
+    $date_start=$http->get("date_start","string","");
+    $date_end=$http->get("date_end","string","");
+    $msg='<h2 class="info2">'.sprintf(_("Période %s au %s 
"),$date_start,$date_end) .'</h2>';
 
 }
 /*  compute the sql stmt */



reply via email to

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