Display the form for modifying or adding new predefined operation.
165 {
167
170
171 $f_add_button=
new IButton(
'add_card');
172 $f_add_button->tabindex=-1;
173 $f_add_button->label=_('Créer une nouvelle fiche');
174 $f_add_button->set_attribute('ipopup','ipop_newcard');
175 $f_add_button->set_attribute(
'jrn',
$p_array[
'p_jrn']);
176 $f_add_button->javascript="this.jrn=\$('p_jrn').value; select_card_type(this);";
177
178 $f_add_button2=
new IButton(
'add_card2');
179 $f_add_button2->tabindex=-1;
180 $f_add_button2->label=_('Créer une nouvelle fiche');
181 $f_add_button2->set_attribute('ipopup','ipop_newcard');
182 $f_add_button2->set_attribute(
'filter',
$ledger->get_all_fiche_def ());
183
184 $f_add_button2->javascript=" this.jrn=\$('p_jrn').value;select_card_type(this);";
185
186 $str_add_button="";
187 $str_add_button2="";
189 {
190 $str_add_button=$f_add_button->input();
191 $str_add_button2=$f_add_button2->input();
192 }
193
195 $r.=dossier::hidden();
196 $f_legend=_('En-tête facture client');
197
198
199
200
201
202
204
205
206
208 $e_client_label=" ";
209
210
211
212
213
215 {
217 $fClient->get_by_qcode($e_client);
222
223
224 }
225
227 $W1->label="Client ".Icon_Action::infobulle(0) ;
228 $W1->name="e_client";
229 $W1->tabindex=3;
230 $W1->value=$e_client;
231 $W1->table=0;
232 $W1->set_dblclick("fill_ipopcard(this);");
233 $W1->set_attribute('ipopup','ipopcard');
234
235
236 $W1->set_attribute('label','e_client_label');
237
238 $W1->set_attribute('typecard','deb');
239
240
241 $W1->set_callback('filter_card');
242 $W1->set_function('fill_data');
243 $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ',
244 $W1->name);
245 $f_client_qcode=$W1->input();
246 $client_label=
new ISpan();
247 $client_label->table=0;
248 $f_client=$client_label->input("e_client_label",$e_client_label);
249 $f_client_bt=$W1->search();
250
251
252
256
259 $r.=$Hid->input(
"nb_item",$p_article);
260
261 $f_legend_detail=_("Détail articles vendus");
262
263
264
266 {
267
268
270 ;
272 ;
274 {
275 $march_tva_id=(isset(
$p_array[
"e_march$i".
"_tva_id"]))?
$p_array[
"e_march$i".
"_tva_id"]:
"";
276 $march_tva_amount=(isset(
$p_array[
"e_march$i".
"_tva_amount"]))?
$p_array[
"e_march$i".
"_tva_amount"]:
"";
277 }
279
280
281
283 {
285 $fMarch->get_by_qcode($march);
287 if ( $flag_tva=='Y')
288 {
289 if ( ! (isset(
$p_array[
"e_march$i".
"_tva_id"])))
291 }
292 }
293
294
296 $W1->label="";
297 $W1->name="e_march".$i;
298 $W1->value=$march;
299 $W1->table=1;
300 $W1->set_attribute('typecard','cred');
301 $W1->set_dblclick("fill_ipopcard(this);");
302 $W1->set_attribute('ipopup','ipopcard');
303
304
305 $W1->set_attribute(
'label',
'e_march'.
$i.
'_label');
306
307 $W1->set_attribute(
'price',
'e_march'.
$i.
'_price');
308
309 $W1->set_attribute(
'tvaid',
'e_march'.
$i.
'_tva_id');
310
311 $W1->set_callback('filter_card');
312 $W1->set_function('fill_data');
313 $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ',
314 $W1->name);
315
316 $W1->readonly=false;
317
318 $array[
$i][
'quick_code']=$W1->input();
320
323
324 $htva=
new INum(
'htva_march'.
$i);
325 $htva->readOnly=1;
326 $htva->value=0;
328
330 $tvac=
new INum(
'tvac_march'.
$i);
331 else
333
334 $tvac->readOnly=1;
335 $tvac->value=0;
337
339 {
340 $Span=
new IText(
"e_march".
$i.
"_label");
341
342 $Span->css_size="100%";
343 } else
344 {
345 $Span=
new ISpan(
"e_march".
$i.
"_label");
346 }
347 $Span->value=$march_label;
348 $Span->setReadOnly(false);
349
350
351 $array[
$i][
'denom']=$Span->input(
"e_march".
$i.
"_label",$march_label);
352
354 $Price->setReadOnly(false);
355 $Price->prec=4;
356 $Price->size=9;
357 $Price->javascript="onBlur='format_number(this);clean_tva($i);compute_ledger($i)'";
358 $array[
$i][
'pu']=$Price->input(
"e_march".
$i.
"_price",$march_price);
361
362 if ( $flag_tva == 'Y' )
363 {
364
365
367 $Tva->in_table=true;
368 $Tva->set_attribute(
'compute',
$i);
369
370 $Tva->js=
'onblur="format_number(this);clean_tva('.$i.
');compute_ledger('.
$i.
')"';
371 $Tva->value=$march_tva_id;
372 $array[
$i][
'tva']=$Tva->input(
"e_march$i".
"_tva_id");
373
374
375 $wTva_amount=
new INum();
376 $wTva_amount->readOnly=false;
377 $wTva_amount->size=6;
378 $wTva_amount->javascript="onBlur='format_number(this);compute_ledger($i)'";
379 $array[
$i][
'amount_tva']=$wTva_amount->input(
"e_march".
$i.
"_tva_amount",$march_tva_amount);
380 }
381
382
384 ;
385 $Quantity=
new INum();
386 $Quantity->setReadOnly(false);
387 $Quantity->prec=4;
388 $Quantity->size=8;
389 $Quantity->javascript="onChange='format_number(this);clean_tva($i);compute_ledger($i)'";
390 $array[
$i][
'quantity']=$Quantity->input(
"e_quant".
$i,$quant);
391
392 }
393 $f_type=_('Client');
394
395
396 ob_start();
397 require_once NOALYSS_TEMPLATE.'/predf_ledger_detail.php';
398 $r.=ob_get_contents();
399 ob_end_clean();
400
401
402
403
406
408 }
noalyss_strlentrim($p_string)
global $g_user
if no group available , then stop
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
Handle the ledger of sold,.
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Input HTML for the card show buttons, in the file, you have to add card.js How to use :
This class handles only the numeric input, the input will call a javascript to change comma to period...