21 <h2
class=
"title">Modification de matériel</h2>
22 <form
id=
"amrt_detail" onsubmit=
"return confirm_save_modify('amrt_detail');return false">
25 <span
style=
"text-align:center;display:block;font-size:2em" id=
"p_card_label" ><?php echo $card->strAttribut(ATTR_DEF_NAME)?></span>
29 <td><?php echo HtmlInput::card_detail($card->strAttribut(ATTR_DEF_QUICKCODE))?></td>
33 <td>Date Acquisition</td>
37 <td>Montant à amortir</td>
42 <td>Année comptable d
'achat</td>
43 <td> <?php echo $p_year->input();?></td>
47 Poste comptable ou fiche
50 <?php echo $select_type->input(); ?>
53 <tr id="deb_use_account_tr_id">
54 <td>Poste de charge dotations amortissement (débit)</td>
55 <td><?php echo $p_deb->input(); ?></td>
56 <td><?php echo $deb_span->input()?></td>
58 <tr id="cred_use_account_tr_id">
59 <td>Poste amortissement en contrepartie</td>
60 <td><?php echo $p_cred->input();?></td>
61 <td><?php echo $cred_span->input();?></td>
63 <tr id="deb_use_card_tr_id">
64 <td>Fiche de charge pour amortissement (déb) </td>
65 <td><?php echo $p_card_deb->input()?><?php echo $p_card_deb->search()?></td>
67 <tr id="cred_use_card_tr_id">
68 <td>Fiche amortissement en contrepartie</td>
69 <td><?php echo $p_card_cred->input();?><?php echo $p_card_cred->search()?></td>
72 <td>Nombre d'années amortissement (non modifiable)</td>
76 <td>Visible <span
class=
"notice">Y pour oui ou N pour non</span></td>
77 <td><?php echo $p_visible->input();?></td>
89 echo HtmlInput::hidden(
'plugin_code',
$_REQUEST[
'plugin_code']);
90 echo dossier::hidden();
95 <span
class=
"notice"> En changeant le montant à amortir, l
'année ou le nombre d'années, les annuités seront recalculées et l
'historique effacé</span>
97 <fieldset><legend>Annuités</legend>
98 <table class="result">
101 <th>Amortissement acté</th>
113 for ($i=0;$i<count($array);$i++):
114 $pct=new INum('pct[]
');
115 $pct->value=$array[$i]->ad_percentage;
118 <td><?php echo HtmlInput::hidden('ad_year[]
',$array[$i]->ad_year)?>
119 <?php echo $array[$i]->ad_year?>
123 echo HtmlInput::hidden("ad_id[]",$array[$i]->ad_id);
124 $amount=new INum("amount[]");
125 $amount->value=$array[$i]->ad_amount;
126 echo $amount->input();
131 $annuite=bcadd($annuite,$array[$i]->ad_amount);
134 array($value_a_id,$array[$i]->ad_year));
135 if ( count ($x) == 1)
137 echo HtmlInput::hidden('h[]
',$x[0]['ha_id
']);
139 $done=bcadd($done,$x[0]['h_amount
']);
140 $acte=new INum('p_histo[]
');
141 $acte->value=$x[0]['h_amount
'];
142 echo td($acte->input());
144 $pj=new IText('p_pj[]
');
145 $pj->value=$x[0]['h_pj
'];
146 echo td($pj->input());
148 if ( $x[0]['jr_internal
'] != '' ) {
149 $jr_id=$cn->get_value('select jr_id from jrn where jr_internal=$1
',array($x[0]['jr_internal
']));
153 echo td(HtmlInput::detail_op($jr_id,$x[0]['jr_internal
']));
157 $concerne=new IConcerned('op_concerne[
'.$array[$i]->ad_id.']
');
158 $concerne->amount_id=$array[$i]->ad_amount;
159 echo '<td>
'.$concerne->input().'</td>
';
162 echo td($pct->input() );
171 <span style="font-size:120%;font-weight:bold;font-family:arial;font-style:italic;margin-right:10%">Total = <?php echo nbm($annuite)?></span>
172 <span style="font-size:120%;font-weight:bold;font-family:arial;font-style:italic;margin-right:10%">Amorti = <?php echo nbm($done)?></span>
173 <span style="font-size:120%;font-weight:bold;font-family:arial;font-style:italic;margin-right:10%">Reste = <?php echo nbm($p_amount->value-$done)?></span>
176 if ( $annuite != $p_amount->value)
178 printf ('<h2
class=
"error">
'._("Différence entre le montant à amortir et le montant amorti = %d'".'</h2>'),nbm($annuite - $p_amount->value));
185 <p style="text-align: center
">
187 echo HtmlInput::submit('sauver',_('Sauver'));
188 $rm=sprintf("remove_mat(%d,
'%s',%d)
",dossier::id(),$_REQUEST['plugin_code'],$value_a_id);
189 echo HtmlInput::button('remove',_('Effacer'),"onclick=\
"$rm\" ");
190 echo HtmlInput::button(
'close',_(
'Fermer'),
"onclick=\"removeDiv('bxmat');refresh_window()\" ");
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select h_pj
if($p_number->value==0) l années
function remove_mat(g_dossier, plugin_code, a_id)
function show_selected_material(obj)
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select ha_id
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select h_amount from amortissement amortissement_histo where a_id
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select jr_internal