noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 07/16: Detail Operation for small screen


From: dwm
Subject: [Noalyss-commit] [noalyss] 07/16: Detail Operation for small screen
Date: Tue, 27 May 2025 09:26:08 -0400 (EDT)

sparkyx pushed a commit to branch unstable
in repository noalyss.

commit da1a6dbc394909522b5a1f912d1a11287e592635
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon May 19 19:38:32 2025 +0200

    Detail Operation for small screen
---
 include/class/acc_account_ledger.class.php | 81 +++++++++++++++++-------------
 include/class/fiche.class.php              | 61 +++++++++++-----------
 2 files changed, 76 insertions(+), 66 deletions(-)

diff --git a/include/class/acc_account_ledger.class.php 
b/include/class/acc_account_ledger.class.php
index ec62751e7..29da2c337 100644
--- a/include/class/acc_account_ledger.class.php
+++ b/include/class/acc_account_ledger.class.php
@@ -484,15 +484,15 @@ class Acc_Account_Ledger
         "<TH style=\"text-align:left\">"._('Pièce')." </TH>".
         "<TH style=\"text-align:left\">"._('Code')."</TH>".
         "<TH style=\"text-align:left\">"._('Interne')." </TH>".
-        "<TH style=\"text-align:left\">"._('Tiers')." </TH>".
-        "<TH style=\"text-align:left\">"._('Description')."</TH>".
-        "<TH style=\"text-align:left\">"._('Type')."</TH>".
-        "<TH style=\"text-align:left\">"._('ISO')."</TH>".
-        "<TH style=\"text-align:right\">"._('Dev.')."</TH>".
+        "<TH class=\"visible_gt800\"  style=\"text-align:left\">"._('Tiers')." 
</TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:left\">"._('Description')."</TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:left\">"._('Type')."</TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:left\">"._('ISO')."</TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:right\">"._('Dev.')."</TH>".
         "<TH style=\"text-align:right\">"._('Débit')."</TH>".
         "<TH style=\"text-align:right\">"._("Crédit")."</TH>".
         th('Prog.','style="text-align:right"').
-        th('Let.','style="text-align:right"');
+        th('Let.',' class="visible_gt800" '.'style="text-align:right"');
         "</TR>"
         ;
         $progress=0;$sum_deb=0;$sum_cred=0;
@@ -520,28 +520,32 @@ class Acc_Account_Ledger
            /*
             * reset prog. balance to zero if we change of exercice
             */
-           if ( $old_exercice != $op['p_exercice'])
-             {
-               if ( $old_exercice != '')
-                 {
-                   $progress=bcsub($sum_deb,$sum_cred);
-                       $side="&nbsp;".$this->get_amount_side($progress);
-                   echo "<TR class=\"highlight\">".
-                     "<TD>$old_exercice</TD>".
-                     "<TD></TD>".td().td().td().td().td().
-                     "<TD>"._("Totaux")."</TD>".td("").
-                     "<TD 
style=\"text-align:right;padding-left:10px;\">".nbm($sum_deb)."</TD>".
-                     "<TD 
style=\"text-align:right;padding-left:10px;\">".nbm($sum_cred)."</TD>".
-                     
td(nbm(abs($progress)).$side,'style="text-align:right;padding-left:10px;"').
-                     td('').
-                     "</TR>";
-                   $sum_cred=0;
-                   $sum_deb=0;
-                   $progress=0;
-
-                 }
-             }
-           $progress=bcadd($progress,$tmp_diff);
+           if ($old_exercice != $op['p_exercice']) {
+                if ($old_exercice != '') {
+                    $progress = bcsub($sum_deb, $sum_cred);
+                    $side = "&nbsp;" . $this->get_amount_side($progress);
+                    echo "<TR class=\"highlight\">" .
+                    td($op['p_exercice']) .
+                    td("", ' class="visible_gt800" ') .
+                    td("", ' class="visible_gt800" ') .
+                    td("", ' class="visible_gt800" ') .
+                    td("", ' class="visible_gt800" ') .
+                    td("", ' class="visible_gt800" ') .
+                    td() .
+                    "<TD >Totaux</TD>" . td("") .
+                    "<TD  style=\"text-align:right\">" . nbm($sum_deb) . 
"</TD>" .
+                    "<TD  style=\"text-align:right\">" . nbm($sum_cred) . 
"</TD>" .
+                    
td(nbm(abs($progress)).$side,'style="text-align:right;padding-left:10px;"').
+                    td("", ' class="visible_gt800" ') .
+                    "</TR>";
+                
+                   
+                    $sum_cred = 0;
+                    $sum_deb = 0;
+                    $progress = 0;
+                }
+            }
+            $progress=bcadd($progress,$tmp_diff);
                $side="&nbsp;".$this->get_amount_side($progress);
            $sum_cred=bcadd($sum_cred,$op['cred_montant']);
            $sum_deb=bcadd($sum_deb,$op['deb_montant']);
@@ -553,9 +557,9 @@ class Acc_Account_Ledger
              td(h($op['jr_pj_number'])).
              "<TD>".\HtmlInput::card_detail($op['j_qcode'])."</TD>".
              "<TD>".$vw_operation."</TD>".
-                "<TD>".$tiers."</TD>".
-             "<TD>".h($op['description']).$op_analytic."</TD>".
-                    td($op['jr_optype']);
+                "<TD class=\"visible_gt800\" >".$tiers."</TD>".
+             "<TD class=\"visible_gt800\" 
>".h($op['description']).$op_analytic."</TD>".
+                    td($op['jr_optype'],' class="visible_gt800" ');
                      /// If the currency is not the default one , then show 
the amount
             if ( $op['currency_id'] > 0  )
             {
@@ -565,7 +569,7 @@ class Acc_Account_Ledger
                echo   td($op['cr_code_iso']).
                     
td(nbm($currency_val,2),'style="text-align:right;padding-left:10px;"');
             } else {
-                echo td().td();
+                echo td('', 'class="visible_gt800" ').td('',' 
class="visible_gt800"' );
             }
             
             echo 
@@ -573,7 +577,7 @@ class Acc_Account_Ledger
              "<TD 
style=\"text-align:right;padding-left:10px;\">".nbm($op['cred_montant'])."</TD>".
              td(nbm(abs($progress)).$side,'style="text-align:right"').
 
-             td($html_let, ' style="color:red;text-align:right"') .
+             td($html_let, ' class="visible_gt800" '.' 
style="color:red;text-align:right"') .
                        "</TR>";
            $old_exercice=$op['p_exercice'];
         }
@@ -581,14 +585,19 @@ class Acc_Account_Ledger
         $solde_type=($sum_deb>$sum_cred)?_("solde débiteur"):_("solde 
créditeur");
         $diff=bcsub($sum_deb,$sum_cred);
                $side="&nbsp;".$this->get_amount_side($diff);
-        echo "<TR class=\"highlight\">".
+       echo "<TR class=\"highlight\">".
                 td($op['p_exercice']).
-                td().td().td().td().td().td().
+                 td("",' class="visible_gt800" ').
+                td("",' class="visible_gt800" ').
+                td("",' class="visible_gt800" ').
+                td("",' class="visible_gt800" ').
+                td("",' class="visible_gt800" ').
+                td().
         "<TD >Totaux</TD>".td("").
          "<TD  style=\"text-align:right\">".nbm($sum_deb)."</TD>".
          "<TD  style=\"text-align:right\">".nbm($sum_cred)."</TD>".
          "<TD style=\"text-align:right\">".nbm(abs($diff)).$side."</TD>".
-                td().
+                td("",' class="visible_gt800" ').
         "</TR>";
        echo   "<tr><TD>$solde_type</TD><td></td>".
          "<TD style=\"text-align:right\">".nbm(abs($diff))."</TD>".
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index bdf72501c..4c73081c0 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -998,14 +998,14 @@ class Fiche
         "<TH style=\"text-align:left\">"._('Poste')." </TH>".
         "<TH style=\"text-align:left\">"._('Interne')." </TH>".
         "<TH style=\"text-align:left\">"._('Tiers')." </TH>".
-        "<TH style=\"text-align:left\">"._('Description')." </TH>".
-        "<TH style=\"text-align:left\">"._('Type')."</TH>".
-        "<TH style=\"text-align:left\">"._('ISO')."</TH>".
-        "<TH style=\"text-align:right\">"._('Dev.')."</TH>".
+        "<TH class=\"visible_gt800\" 
style=\"text-align:left\">"._('Description')." </TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:left\">"._('Type')."</TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:left\">"._('ISO')."</TH>".
+        "<TH class=\"visible_gt800\"  
style=\"text-align:right\">"._('Dev.')."</TH>".
         "<TH style=\"text-align:right\">"._('Débit')."  </TH>".
         "<TH style=\"text-align:right\">"._('Crédit')." </TH>".
         th('Prog.','style="text-align:right"').
-        th('Let.','style="text-align:right"');
+        th('Let.','class="visible_gt800"  style="text-align:right"');
         "</TR>"
         ;
        $old_exercice="";$sum_deb=0;$sum_cred=0;
@@ -1035,19 +1035,20 @@ class Fiche
                    $progress=bcsub($sum_deb,$sum_cred);
                        $side="&nbsp;".$this->get_amount_side($progress);
                    echo "<TR class=\"highlight\">".
-                      "<TD>$old_exercice</TD>".
-                    td('').
-                     td('').
-                     "<TD></TD>".td().
-                     "<TD>Totaux</TD>".
+                            td($op['p_exercice']).
+                            td("",' class="visible_gt800" ').
+                            td("",' class="visible_gt800" ').
+                            td("",' class="visible_gt800" ').
                             td().
-                            td().
-                            td().
-                     "<TD style=\"text-align:right\">".nbm($sum_deb)."</TD>".
-                     "<TD style=\"text-align:right\">".nbm($sum_cred)."</TD>".
-                     td(nbm(abs($progress)).$side,'style="text-align:right"').
-                     td('').
-                     "</TR>";
+                            td(_('Totaux')).
+                            td("",' class="visible_gt800" ').
+                            td("",' class="" ').
+                            "<TD></TD>".
+                            "<TD  
style=\"text-align:right\">".nbm($sum_deb)."</TD>".
+                            "<TD  
style=\"text-align:right\">".nbm($sum_cred)."</TD>".
+                            
td(nbm(abs($progress)).$side,'style="text-align:right"').
+                           td("",' class="visible_gt800" ').
+                            "</TR>";
                    $sum_cred=0;
                    $sum_deb=0;
                    $progress=0;
@@ -1067,23 +1068,23 @@ class Fiche
              td(h($op['jr_pj_number'])).
                td($op['j_poste']).
             "<TD>".$vw_operation."</TD>".
-            td($tiers).
-            "<TD>".h($op['description']).$op_analytic."</TD>".
+            td($tiers, ' class="visible_gt800" ').
+            "<TD  class=\"visible_gt800\" 
>".h($op['description']).$op_analytic."</TD>".
                     td($op['jr_optype']);
             
             /// If the currency is not the default one , then show the amount
             if ( $op['currency_id'] > 0 && $op['oc_amount'] != 0)
             {
-             echo   td($op['cr_code_iso']).
-                    
td(nbm($op['oc_amount'],4),'style="text-align:right;padding-left:10px;"');
+             echo   td($op['cr_code_iso'], ' class="visible_gt800" ').
+                    td(nbm($op['oc_amount'],4),' class="visible_gt800"  
style="text-align:right;padding-left:10px;"');
             } else {
-                echo td().td();
+                echo td("",' class="visible_gt800" ').td("",' 
class="visible_gt800" ');
             }
             
             echo "<TD 
style=\"text-align:right\">".nbm($op['deb_montant'])."</TD>".
              "<TD 
style=\"text-align:right\">".nbm($op['cred_montant'])."</TD>".
              td(nbm(abs($progress)).$side,'style="text-align:right"').
-            td($html_let, ' style="text-align:right"') .
+            td($html_let, ' style="text-align:right"  class="visible_gt800" ') 
.
                        "</TR>";
            $old_exercice=$op['p_exercice'];
 
@@ -1094,18 +1095,18 @@ class Fiche
         echo '<tfoot>';
        echo "<TR class=\"highlight\">".
                td($op['p_exercice']).
-               td().
-               td().
-               td().
+                td("",' class="visible_gt800" ').
+                td("",' class="visible_gt800" ').
+                td("",' class="visible_gt800" ').
                td().
         td(_('Totaux')).
-               td().
-               td().
+                td("",' class="visible_gt800" ').
+                td("",' class="" ').
         "<TD></TD>".
         "<TD  style=\"text-align:right\">".nbm($sum_deb)."</TD>".
         "<TD  style=\"text-align:right\">".nbm($sum_cred)."</TD>".
-         "<TD style=\"text-align:right\">".nbm($diff)."</TD>".
-            td($solde_side).
+         "<TD style=\"text-align:right\">".nbm($diff).$solde_side."</TD>".
+            td("",' class="visible_gt800" ').
         "</TR>";
         echo "<TR style=\"font-weight:bold\">".
         "<TD>$solde_type</TD>".



reply via email to

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