11 <form method=
"POST" id=
"form1" onsubmit=
"return confirm('Vous confirmez?')">
13 echo HtmlInput::extension();
14 echo HtmlInput::get_to_hidden(array(
'sa',
'ac'));
15 echo Dossier::hidden();
18 <div
id=
"div_poste" class=
"inner_box" style=
"top:230;margin:5;overflow:visible;display:none;">
19 <h2
class=
"info">Poste comptable </h2>
20 <p
class=
"notice">Changera dans les opérations sélectionnées le poste comptable.Attention, cela ne changera pas la fiche, soyez prudent</p>
25 $target->set_attribute(
'jrn',0);
26 $target->set_attribute(
'account',
'tposte');
27 $target->set_attribute(
'label',
'tposte_label');
31 $source->set_attribute(
'jrn',0);
32 $source->set_attribute(
'account',
'sposte');
33 $source->set_attribute(
'label',
'sposte_label');
37 <TR><TD>Changer le poste comptable </TD>
40 <td> <span
id=
"sposte_label"></span></td>
41 <td>Par le poste comptable</td>
42 <td><?php echo
$target->input()?></td>
43 <td> <span
id=
"tposte_label"></span>
'</td>
45 <tr><TD><?php echo HtmlInput::submit('chg_poste
','Changer le poste comptable
')?></TD>
47 echo HtmlInput::button('accounting_hide_bt
','Annuler
','onclick=
"$(\'div_poste\').hide();"');
54 <div id="div_card" class="inner_box" style="top:230;margin:5;overflow:visible;display:none;">
55 <h2 class="info">Changer la fiche </h2>
56 <p class="notice">Attention, dans les opérations sélectionnées cela changera la fiche et le poste comptable: ce sera celui de la fiche qui sera utilisé, soyez prudent</p>
58 $csource=new ICard('csource
');
59 $csource->set_attribute('label','csource_label
');
60 $csource->set_dblclick("fill_ipopcard(this);");
61 $csource->javascript=sprintf(' onchange=
"fill_data_onchange(\'%s\');" ',
63 $csource->set_function('fill_data
');
64 $csource->set_attribute("typecard",'all
');
66 $ctarget=new ICard('ctarget
');
67 $ctarget->typecard='all
';
68 $ctarget->set_attribute('label','ctarget_label
');
69 $ctarget->javascript=sprintf(' onchange=
"fill_data_onchange(\'%s\');" ',
71 $ctarget->set_function('fill_data
');
72 $ctarget->set_dblclick("fill_ipopcard(this);");
73 $ctarget->set_attribute("typecard",'all
');
80 <TD><?php echo $csource->input();?></TD>
81 <td><?php echo $csource->search()?></td>
82 <td><span id="csource_label"></span></td>
87 <TD><?php echo $ctarget->input()?></TD>
88 <td><?php echo $ctarget->search()?></td>
89 <td><span id="ctarget_label"></span></td>
92 <?php echo HtmlInput::submit('chg_card
','Changer la fiche
'); ?>
94 echo HtmlInput::button('card_hide_bt
','Annuler
','onclick=
"$(\'div_card\').hide();"');
98 <div id="div_card_account" class="inner_box" style="top:230;margin:5;overflow:visible;display:none;">
99 <h2 class="info">Changer un poste comptable par une fiche</h2>
100 <p class="notice">Attention, dans les opérations sélectionnées, le poste comptable sera changé par une fiche et par son poste comptable, soyez prudent</p>
102 $csource=new IPoste('csource1
');
103 $csource->set_attribute('gDossier
',Dossier::id());
104 $csource->set_attribute('jrn
',0);
105 $csource->set_attribute('label','csource1_label
');
106 $csource->set_attribute('account
','csource1
');
109 $ctarget=new ICard('ctarget1
');
110 $ctarget->typecard='all
';
111 $ctarget->set_attribute('label','ctarget1_label
');
112 $ctarget->javascript=sprintf(' onchange=
"fill_data_onchange(\'%s\');" ',
114 $ctarget->set_dblclick("fill_ipopcard(this);");
115 $ctarget->set_attribute("typecard",'all
');
116 $ctarget->set_function('fill_data
');
123 <TD><?php echo $csource->input();?></TD>
124 <td><span id="csource1_label"></span></td>
129 <TD><?php echo $ctarget->input()?></TD>
130 <td><?php echo $ctarget->search()?></td>
131 <td><span id="ctarget1_label"></span></td>
134 <?php echo HtmlInput::submit('chg_card_account
','Changer le poste comptable par la fiche
'); ?>
136 echo HtmlInput::button('card_hide_bt
','Annuler
','onclick=
"$(\'div_card_account\').hide();"');
140 <div id="div_ledger" class="inner_box" style="top:230;margin:5;overflow:visible;display:none;">
141 <h2 class="info">Déplacer dans un autre journal </h2>
142 <p class="notice">Attention, pour les opérations sélectionnées,cela transfèrera les opérations vers le journal choisi mais il faut que ce journal soit de même type (achat vers achat, vente vers vente...), les pièces justificatives ne seront pas mises à jour, soyez prudent</p>
145 $sql="select jrn_def_id, '(
'||jrn_def_type||')
'||jrn_def_name from jrn_def order by jrn_def_name asc";
146 $aledger=$cn->make_array($sql);
147 $sledger=new ISelect('sledger
');
148 $sledger->value=$aledger;
149 $tledger=new ISelect('tledger
');
150 $tledger->value=$aledger;
153 Les opérations appartenant au journal <?php echo $sledger->input()?> vers le journal <?php echo $tledger->input()?>
155 <?php echo HtmlInput::submit('chg_ledger
','Déplacer dans le journal
'); ?>
157 echo HtmlInput::button('ledger_hide_bt
','Annuler
','onclick=
"$(\'div_ledger\').hide();"');
161 <table class="result">
163 echo HtmlInput::extension();
164 echo Dossier::hidden();
165 echo HtmlInput::hidden('sa
',$_REQUEST['sa
']);
173 <TH class="num">Montant</TH>
174 <TH><INPUT TYPE="CHECKBOX" onclick="toggle_checkbox('form1
')"></TH>
177 for ($i = 0;$i < $nb_row;$i++) :
178 $row=$cn->fetch_array($ret,$i);
179 $odd=($i%2==0)?' class=
"odd"':' class=
"even"';
180 $checkbox->value=$row['jr_id
'];
186 <TR <?php echo $odd?> >
187 <TD><?php echo $row['str_jr_date
']?></TD>
188 <td><?php echo HtmlInput::detail_op($row['jr_id
'],$row['jr_internal'])?></td>
189 <td><?php echo $row['jr_pj_number
']?></td>
190 <td><?php echo $row['jrn_def_name
']?></td>
191 <td><?php echo $row['jr_comment
']?></td>
195 // check sign for fin
196 if ( $row['jrn_def_type
'] == 'FIN
' )
198 $positive = $cn->get_value("select qf_amount from quant_fin where jr_id=$1",
199 array($row['jr_id
']));
200 if ( $cn->count() != 0)
201 $positive=($positive < 0)?1:0;
205 <td class="num"><?php echo ( $positive != 0 )?"<font color=\"red\"> - ".nbm($row['jr_montant
'])."</font>":nbm($row['jr_montant
'])?> </td>
206 <td><?php echo $checkbox->input();?></td>
213 <script type="text/javascript">
214 new Draggable('div_card
',{zindex:2});
215 new Draggable('div_ledger
',{zindex:2});
216 new Draggable('div_poste
',{zindex:2});
217 new Draggable('div_card_account
',{zindex:2});
if($p_number->value==0) l les annuités seront recalculées et l pct[] ad_year[] select jr_internal