noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 02/04: Task #1045 - Amélioration apparence


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/04: Task #1045 - Amélioration apparence : Comptabilité analytique ajoutée dans fenêtre détail opération
Date: Sun, 16 Nov 2014 19:13:36 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit ea5d24ec9d813d8297648803a5bef5773fbee424
Author: Dany De Bontridder <address@hidden>
Date:   Sun Nov 16 20:09:49 2014 +0100

    Task #1045 - Amélioration apparence  :
    Comptabilité analytique ajoutée dans fenêtre détail opération
---
 include/template/ledger_detail_ach.php |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/include/template/ledger_detail_ach.php 
b/include/template/ledger_detail_ach.php
index 5752e88..3522dc0 100644
--- a/include/template/ledger_detail_ach.php
+++ b/include/template/ledger_detail_ach.php
@@ -1,6 +1,7 @@
 <?php
 //This file is part of NOALYSS and is under GPL 
 //see licence.txt
+$str_anc="";
 ?><?php require_once('template/ledger_detail_top.php'); ?>
 <div class="content" style="padding:0;">
     <?php
@@ -137,16 +138,16 @@
                 } else
                     echo th(_('Total'), 'style="text-align:right"');
 
-                if ($owner->MY_ANALYTIC != 'nu' && $div == 'popup')
+                if ($owner->MY_ANALYTIC != 'nu' )
                 {
                     $anc = new Anc_Plan($cn);
                     $a_anc = $anc->get_list(' order by pa_id ');
                     $x = count($a_anc);
                     /* set the width of the col */
-                    echo '<th colspan="' . $x . '">' . _('Compt. Analytique') 
. '</th>';
+                    $str_anc.='<tr><th>Code</th><th>Montant</th><th colspan="' 
. $x . '">' . _('Compt. Analytique') . '</th>';
 
                     /* add hidden variables pa[] to hold the value of pa_id */
-                    echo Anc_Plan::hidden($a_anc);
+                    $str_anc.=Anc_Plan::hidden($a_anc);
                 }
                 echo '</tr>';
                 for ($e = 0; $e < count($obj->det->array); $e++)
@@ -154,7 +155,8 @@
                     $row = '';
                     $q = $obj->det->array[$e];
                     $fiche = new Fiche($cn, $q['qp_fiche']);
-                    $view_card_detail = 
HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE), "", ' 
class="line" ');
+                    $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE);
+                    $view_card_detail = HtmlInput::card_detail($qcode, "", ' 
class="line" ');
                     $row = td($view_card_detail);
                     $sym_tva = '';
 
@@ -212,18 +214,21 @@
                     $total_tvac+=$tvac;
                     $total_htva+=$htva;
                     /* Analytic accountancy */
-                    if ($owner->MY_ANALYTIC != "nu" && $div == 'popup')
+                    if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/ )
                     {
                         $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
                         if (preg_match('/^(6|7)/', $poste))
                         {
                             $anc_op = new Anc_Operation($cn);
                             $anc_op->j_id = $q['j_id'];
+                            $anc_op->in_div=$div;
                             echo HtmlInput::hidden('op[]', $anc_op->j_id);
                             /* compute total price */
                             bcscale(2);
-
-                            $row.=$anc_op->display_table(1, $htva, $div);
+                            $str_anc.='<tr>';
+                            $str_anc.=td($qcode);
+                            $str_anc.=td(nbm($htva));
+                            $str_anc.='<td>'.$anc_op->display_table(1, $htva, 
$div).'</td>';
                         } else
                         {
                             $row.=td('');



reply via email to

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