noalyss  Version-9
operation_detail_misc.php
Go to the documentation of this file.
1 <?php
2 /*
3  * This file is part of NOALYSS.
4  *
5  * NOALYSS is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * NOALYSS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with NOALYSS; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 /* $Revision$ */
20 
21 // Copyright Author Dany De Bontridder danydb@aevalys.eu
22 
23 /**
24  * @file
25  * @brief how detail of a misc operation
26  *
27  */
28 ?>
29 <table class="result">
30 <tr>
31 <?php
32  echo th(_('Poste Comptable'));
33  echo th(_('Quick Code'));
34  echo th(_('Libellé'));
35 echo th(_('Débit'), 'style="text-align:right"');
36 echo th(_('Crédit'), 'style="text-align:right"');
37 echo '</tr>';
39 for ($e = 0; $e < count($obj->det->array); $e++)
40 {
41  $row = '';
42  $q = $obj->det->array;
43  $view_history = HtmlInput::history_account($q[$e]['j_poste'], $q[$e]['j_poste'], "", $exercice);
44 
45  $row.=td($view_history);
46 
47  if ($q[$e]['j_qcode'] != '')
48  {
49  $fiche = new Fiche($cn);
50  $fiche->get_by_qcode($q[$e]['j_qcode']);
51  $view_history=HtmlInput::history_card($fiche->id, $q[$e]['j_qcode'], "", $exercice);
52 
53  }
54  else
55  $view_history = '';
56  $row.=td($view_history);
57  $l_lib = $q[$e]['j_text'];
58 
59  if ($l_lib != '')
60  {
61  $l_lib = $q[$e]['j_text'];
62  }
63  else if ($q[$e]['j_qcode'] != '')
64  {
65  // nom de la fiche
66  $ff = new Fiche($cn);
67  $ff->get_by_qcode($q[$e]['j_qcode']);
68  $l_lib = $ff->strAttribut(ATTR_DEF_NAME);
69  }
70  else
71  {
72  // libellé du compte
73  $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste']));
74  $l_lib = $name;
75  }
76  $l_lib = strip_tags($l_lib);
77  $input = new ISpan("e_march" . $q[$e]['j_id'] . "_label");
78  $input->value = $l_lib;
79  $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']);
80  $row.=td($input->input() . $hidden);
81  $montant = td(nbm($q[$e]['j_montant']), 'class="num"');
82  $row.=($q[$e]['j_debit'] == 't') ? $montant : td('');
83  $row.=($q[$e]['j_debit'] == 'f') ? $montant : td('');
84  echo tr($row);
85 }
86 ?>
87 </table>
nbm
nbm($p_number, $p_dec=2)
format the number with a sep.
Definition: ac_common.php:137
$e
$e
Definition: result_cat_card_summary.php:26
$q
$q
Definition: ajax_add_concerned_card.php:58
$name
$name
Definition: ajax_mod_predf_op.php:47
$exercice
catch(Exception $e) $exercice
Definition: ajax_display_letter.php:45
$fiche
$fiche
Definition: ajax_add_concerned_card.php:98
tr
tr($p_string, $p_extra='')
Definition: ac_common.php:88
ISpan
Html Input.
Definition: ispan.class.php:31
HtmlInput\history_card
static history_card($f_id, $p_mesg, $p_style="", $p_exercice="")
display a div with the history of the card
Definition: html_input.class.php:311
Fiche
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Definition: fiche.class.php:37
$amount_idx
$amount_idx
Definition: operation_detail_misc.php:38
$obj
$obj
Definition: ajax_accounting.php:43
$cn
$cn
Definition: ajax_anc_accounting.php:30
$input
$input
Definition: ajax_anc_plan.php:32
table
$all table
Definition: company.inc.php:138
$hidden
$hidden
Definition: impress_rapport.inc.php:236
th
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
td
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
ATTR_DEF_NAME
const ATTR_DEF_NAME
Definition: constant.php:206
HtmlInput\history_account
static history_account($p_account, $p_mesg, $p_style="", $p_exercice="")
display a div with the history of the account
Definition: html_input.class.php:349
HtmlInput\hidden
static hidden($p_name, $p_value, $p_id="")
Definition: html_input.class.php:218
$row
$row
Definition: ajax_anc_detail_operation.php:33