Display the form for modifying or adding new predefined operation.
180 {
183
185
186 $f_add_button=
new IButton(
'add_card');
187 $f_add_button->tabindex=-1;
188 $f_add_button->label=_('Créer une nouvelle fiche');
189 $f_add_button->set_attribute('ipopup','ipop_newcard');
190 $f_add_button->set_attribute(
'jrn',
$p_array[
'p_jrn']);
191 $f_add_button->javascript="this.jrn=\$('p_jrn').value; select_card_type(this);";
192
193 $f_add_button2=
new IButton(
'add_card2');
194 $f_add_button2->tabindex=-1;
195 $f_add_button2->label=_('Créer une nouvelle fiche');
196 $f_add_button2->set_attribute('ipopup','ipop_newcard');
197 $f_add_button2->set_attribute(
'filter',
$ledger->get_all_fiche_def ());
198
199 $f_add_button2->javascript=" this.jrn=\$('p_jrn').value;select_card_type(this);";
200
201 $str_add_button="";
202 $str_add_button2="";
204 {
205 $str_add_button=$f_add_button->input();
206 $str_add_button2=$f_add_button2->input();
207 }
208
210 $r.=dossier::hidden();
211 $f_legend=_('En-tête facture fournisseur');
212
213
214
215
217
218
219
221 $e_client_label=" ";
222
223
224
225
226
228 {
230 $fClient->get_by_qcode($e_client);
235
236
237 }
238
240 $W1->label="Client ".Icon_Action::infobulle(0) ;
241 $W1->name="e_client";
242 $W1->tabindex=3;
243 $W1->value=$e_client;
244 $W1->table=0;
245 $W1->set_dblclick("fill_ipopcard(this);");
246 $W1->set_attribute('ipopup','ipopcard');
247
248
249 $W1->set_attribute('label','e_client_label');
250
251 $W1->set_attribute('typecard','cred');
252
253
254 $W1->set_callback('filter_card');
255 $W1->set_function('fill_data');
256 $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ',
257 $W1->name);
258 $f_client_qcode=$W1->input();
259 $client_label=
new ISpan();
260 $client_label->table=0;
261 $f_client=$client_label->input("e_client_label",$e_client_label);
262 $f_client_bt=$W1->search();
263
264
265
269
272 $r.=$Hid->input(
"nb_item",$p_article);
273
274 $f_legend_detail=_("Détail articles achetés");
275
276
277
279 {
280
281
283 ;
285 ;
287 {
288 $march_tva_id=(isset(
$p_array[
"e_march$i".
"_tva_id"]))?
$p_array[
"e_march$i".
"_tva_id"]:
"";
289 $march_tva_amount=(isset(
$p_array[
"e_march$i".
"_tva_amount"]))?
$p_array[
"e_march$i".
"_tva_amount"]:
"";
290 }
292
293
294
296 {
298 $fMarch->get_by_qcode($march);
300 if ( $flag_tva=='Y')
301 {
302 if ( ! (isset(
$p_array[
"e_march$i".
"_tva_id"])))
304 }
305 }
306
307
309 $W1->label="";
310 $W1->name="e_march".$i;
311 $W1->value=$march;
312 $W1->table=1;
313 $W1->set_attribute('typecard','deb');
314 $W1->set_dblclick("fill_ipopcard(this);");
315 $W1->set_attribute('ipopup','ipopcard');
316
317
318 $W1->set_attribute(
'label',
'e_march'.
$i.
'_label');
319
320 $W1->set_attribute(
'price',
'e_march'.
$i.
'_price');
321
322 $W1->set_attribute(
'tvaid',
'e_march'.
$i.
'_tva_id');
323
324 $W1->set_callback('filter_card');
325 $W1->set_function('fill_data');
326 $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ',
327 $W1->name);
328
329 $W1->readonly=false;
330
331 $array[
$i][
'quick_code']=$W1->input();
333
336
337 $htva=
new INum(
'htva_march'.
$i);
338 $htva->readOnly=1;
339 $htva->value=0;
341
343 $tvac=
new INum(
'tvac_march'.
$i);
344 else
346
347 $tvac->readOnly=1;
348 $tvac->value=0;
350
352 {
353 $Span=
new IText(
"e_march".
$i.
"_label");
354
355 $Span->css_size="100%";
356 } else
357 {
358 $Span=
new ISpan(
"e_march".
$i.
"_label");
359 }
360 $Span->value=$march_label;
361 $Span->setReadOnly(false);
362
363
364 $array[
$i][
'denom']=$Span->input(
"e_march".
$i.
"_label",$march_label);
365
367 $Price->setReadOnly(false);
368 $Price->prec=4;
369 $Price->size=9;
370 $Price->javascript="onBlur='format_number(this);clean_tva($i);compute_ledger($i)'";
371 $array[
$i][
'pu']=$Price->input(
"e_march".
$i.
"_price",$march_price);
374
375 if ( $flag_tva == 'Y' )
376 {
377
378
380 $Tva->in_table=true;
381 $Tva->set_attribute(
'compute',
$i);
382
383 $Tva->js=
'onblur="format_number(this);clean_tva('.$i.
');compute_ledger('.
$i.
')"';
384 $Tva->value=$march_tva_id;
385 $array[
$i][
'tva']=$Tva->input(
"e_march$i".
"_tva_id");
386
387
388 $wTva_amount=
new INum();
389 $wTva_amount->readOnly=false;
390 $wTva_amount->size=6;
391 $wTva_amount->javascript="onBlur='format_number(this);compute_ledger($i)'";
392 $array[
$i][
'amount_tva']=$wTva_amount->input(
"e_march".
$i.
"_tva_amount",$march_tva_amount);
393 }
394
395
397 ;
398 $Quantity=
new INum();
399 $Quantity->setReadOnly(false);
400 $Quantity->prec=4;
401 $Quantity->size=8;
402 $Quantity->javascript="onChange='format_number(this);clean_tva($i);compute_ledger($i)'";
403 $array[
$i][
'quantity']=$Quantity->input(
"e_quant".
$i,$quant);
404
405 }
406 $f_type=_('Client');
407
408
409 ob_start();
410 require_once NOALYSS_TEMPLATE.'/predf_ledger_detail.php';
411 $r.=ob_get_contents();
412 ob_end_clean();
413
414
415
416
419
421
422 }
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 purchase,.
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...