Plugins  LAST
 All Data Structures Files Functions Variables Pages
key_detail.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of NOALYSS.
5  *
6  * NOALYSS is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * NOALYSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with NOALYSS; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 /* $Revision$ */
21 
22 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
23 
24 /**
25  * @file
26  * @brief detail of a key
27  *included from ajax_add_key or ajax_mod_key
28  */
29 ?>
30 <div class="content" style="margin-left: 20px">
31  <?php echo HtmlInput::button('rlist','Retour liste',' onclick="$(\'key_list\').show();$(\'keydetail_div\').hide()"')?>
32 <h1><?php echo $str_message?></h1>
33 
34 
35 <h2> Caractéristique</h2>
36 <table>
37  <tr>
38  <td>
39 
40  Nom
41  </td>
42  <td>
43  <?php echo $name->input()?>
44  </td>
45  </tr>
46  <tr>
47  <td>
48  Total tantième
49  </td>
50  <td>
51  <?php echo $tantieme->input()?>
52  </td>
53  </tr>
54  <tr>
55  <td>
56  Description
57  </td>
58  <td>
59  <?php echo $note->input()?>
60  </td>
61  </tr>
62 
63 </table>
64 <h2>Détail des lots</h2>
65 <table class="result">
66  <tr>
67  <th>QuickCode</th>
68  <th>Nom</th>
69  <th>Description</th>
70  <th>Copropriétaire</th>
71  <th>Bâtiment</th>
72  <th>Montant</th>
73  </tr>
74 <?php
75  for ($i=0;$i<count($alot);$i++):
76  if ( $alot[$i]['qcode'] == "" ) continue;
77 ?>
78  <tr>
79  <td>
80  <?php echo HtmlInput::card_detail($alot[$i]['qcode'],$alot[$i]['qcode'],' class="line"')?>
81  <?php echo HtmlInput::hidden('f_id[]',$alot[$i]['f_id'])?>
82  </td>
83  <td>
84  <?php echo $alot[$i]['name']?>
85  </td>
86  <td>
87  <?php echo $alot[$i]['desc']?>
88  </td>
89  <td>
90  <?php
91  $copro=$cn->get_value ("select ad_value
92  from fiche_Detail
93  where ad_id=1
94  and f_id = (select coprop_id::integer from coprop.summary where lot_id=$1)",array($alot[$i]['f_id']));
95  echo h($copro);
96  ?>
97  </td>
98  <td>
99  <?php
100  $batiment=$cn->get_value ("select ad_value
101  from fiche_Detail
102  where ad_id=1
103  and f_id = (select building_id::integer from coprop.summary where lot_id=$1)",array($alot[$i]['f_id']));
104  echo h($batiment);
105  ?>
106  </td>
107  <td>
108  <?php
109  $num=new INum('part'.$alot[$i]['f_id']);
110  $num->javascript='onchange="format_number(this,0);compute_key();"';
111  $num->value=round($alot[$i]['l_part'],0);
112  echo $num->input();
113  ?>
114  </td>
115  </tr>
116 <?php
117  endfor;
118 ?>
119 </table>
120 <p>
121 Total tantièmes : <span id="span_tantieme"><?php echo round($init_tantieme)?></span>
122 </p>
123 
124 <p>
125  Différence :
126 
127 <?php
128  bcscale(0);
129 if ( bcsub ($init_tantieme,$tantieme->value) != 0):
130 ?>
131 <span id="span_diff" style="color:red"><?php echo bcsub ($init_tantieme,$tantieme->value)?></span>
132 <?php
133 else:
134  ?>
135 <span id="span_diff" style="color:green"><?php echo bcsub ($init_tantieme,$tantieme->value)?></span>
136 <?php
137 endif;
138 ?>
139 
140 </p>
141 
142 </div>
$note style
$note
endif
Definition: detail_item.php:95
$str_message
$alot
endfor
Definition: key_detail.php:112
$tantieme
$batiment
Definition: key_detail.php:100
$categorie_appel table
$num
Definition: key_detail.php:109
$init_tantieme
global $cn
$name