noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
operation_detail_misc.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 /* $Revision$ */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 
00023 /**
00024  * @file
00025  * @brief how detail of a misc operation
00026  *
00027  */
00028 ?>
00029 <table class="result">
00030 <tr>
00031 <?php 
00032     echo th(_('Poste Comptable'));
00033     echo th(_('Quick Code'));
00034     echo th(_('Libellé'));
00035 echo th(_('Débit'), 'style="text-align:right"');
00036 echo th(_('Crédit'), 'style="text-align:right"');
00037 echo '</tr>';
00038 $amount_idx=0;
00039 for ($e = 0; $e < count($obj->det->array); $e++)
00040 {
00041         $row = '';
00042         $q = $obj->det->array;
00043         $view_history = sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:view_history_account(\'%s\',\'%s\')" >%s</A>', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']);
00044 
00045         $row.=td($view_history);
00046 
00047         if ($q[$e]['j_qcode'] != '')
00048         {
00049                 $fiche = new Fiche($cn);
00050                 $fiche->get_by_qcode($q[$e]['j_qcode']);
00051                 $view_history = sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>', $fiche->id, $gDossier, $q[$e]['j_qcode']);
00052         }
00053         else
00054                 $view_history = '';
00055         $row.=td($view_history);
00056         $l_lib = $q[$e]['j_text'];
00057 
00058         if ($l_lib != '')
00059         {
00060                 $l_lib = $q[$e]['j_text'];
00061         }
00062         else if ($q[$e]['j_qcode'] != '')
00063         {
00064                 // nom de la fiche
00065                 $ff = new Fiche($cn);
00066                 $ff->get_by_qcode($q[$e]['j_qcode']);
00067                 $l_lib = $ff->strAttribut(ATTR_DEF_NAME);
00068         }
00069         else
00070         {
00071                 // libellé du compte
00072                 $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste']));
00073                 $l_lib = $name;
00074         }
00075         $l_lib = strip_tags($l_lib);
00076         $input = new ISpan("e_march" . $q[$e]['j_id'] . "_label");
00077         $input->value = $l_lib;
00078         $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']);
00079         $row.=td($input->input() . $hidden);
00080         $montant = td(nbm($q[$e]['j_montant']), 'class="num"');
00081         $row.=($q[$e]['j_debit'] == 't') ? $montant : td('');
00082         $row.=($q[$e]['j_debit'] == 'f') ? $montant : td('');
00083         echo tr($row);
00084 }
00085 ?>
00086 </table>
 All Data Structures Namespaces Files Functions Variables Enumerations