4?><TABLE
style=
"width: auto" class=
"nowrap">
6<TD><?php echo _(
'Type de journal')?> </TD>
14 <TD><?php echo _(
'Nom journal')?> </TD>
15 <TD> <INPUT TYPE=
"text" class=
"input_text" NAME=
"p_jrn_name" VALUE=
"<?php echo $name; ?>"></TD>
22if ( $new ||
$type==
'ODS' ):
25<
td style=
"white-space: nowrap"><?php echo _(
'Postes utilisables journal (débit/crédit) ')?>
31<?php echo _(
"Uniquement pour les journaux d'Opérations Diverses, les valeurs sont séparées par des espaces, on peut aussi
32 utiliser le * pour indiquer 'tous les postes qui en dépendent' exemple: 4*")?>
42if ( $new||
$type==
'FIN') :
45 <
td style=
"white-space: nowrap">
46 <?php echo _(
'Numérotation de chaque opération')?>
49 <?php echo $num_op->input();?>
53 <TD
style=
"white-space: nowrap">
54 <?php echo _(
'Compte en banque')?>
60 $card->extra=
$cn->make_list(
'select fd_id from fiche_def where frd_id=4');
61 $card->set_dblclick(
"fill_ipopcard(this);");
62 $card->set_function(
'fill_data');
63 $card->set_attribute(
'ipopup',
'ipop_card');
64 $list=
$cn->make_list(
'select fd_id from fiche_def where frd_id=4');
74 <
td class=
"notice" style=
"white-space: nowrap">
75 <?php echo _(
"Obligatoire pour les journaux FIN : donner ici la fiche du compte en banque utilisée")?>
91 <
td style=
"white-space: nowrap">
94 echo _(
"Uniquement note de débit ou crédit");
100 $negative->javascript=
"toggle_row_warning_enable('negative_amount','row_warning')";
101 echo $negative->input();
107 <
tr id=
"row_warning">
108 <
td style=
"white-space: nowrap">
109 <?php echo _(
"Avertissement montant positif"); ?>
112 <?php echo $negative_warning->input();?>
117 <?php echo _(
'Utilisation des quantités')?>
122 echo $quantity->input();
133 <
td style=
"white-space: nowrap"><?php echo _(
"Minimum de lignes à afficher")?></
td>
134<
td><?php echo $min_row->input()?></
td>
137<
td><INPUT TYPE=
"hidden" id=
"p_jrn_deb_max_line" NAME=
"p_jrn_deb_max_line" VALUE=
"10"></
td>
139<
tr><
td><INPUT TYPE=
"hidden" id=
"p_ech_lib" NAME=
"p_ech_lib" VALUE=
"echeance"></
td>
143 <?php echo _(
'Description') ?>
146 <?php echo $str_description; ?>
151<TD><?php echo _(
'Préfixe code interne')?> </TD><TD>
152<?php echo
$code?> </TD>
155<TD><?php echo _(
'Préfixe pièce justificative')?>
159<?php echo $pj_pref; ?>
163<?php
if ( $new == 0 ) : ?>
166 <?php echo _(
'Dernière pièce numérotée')?>
170 <?php echo $last_seq?>
175 <TD><?php echo _(
'N° pièce justificative')?>
185 <?=_(
"Journal actif")?>
195 if ( $new == 1 ||
$type ==
'FIN'):
199 <?php echo _(
"Devise")?>
212 if ( $new ==1 ||
$type==
'ACH' ) :
216 <TABLE
class=
"result" style=
"width:80%;margin-left:10%;">
219 <?php echo _(
"Services, fournitures ou biens achetés (D)");?>
222 <?php echo _(
"Fournisseurs (C)"); ?>
229 $Res=
$cn->exec_sql(
"select fd_id,fd_label from fiche_def order by fd_label");
234 $rdeb=$default_deb_purchase;
235 $rcred=$default_cred_purchase;
240 $CHECKED=
" unchecked";
241 foreach ( $rdeb as $element) {
242 if ( $element ==
$res[
'fd_id'] ) {
248 printf (
'<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="ACH_FICHEDEB[]" class="ach_fichedeb" %s>%s</TD>',
249 $res[
'fd_id'],$CHECKED,
$res[
'fd_label']);
250 $CHECKED=
" unchecked";
251 foreach ( $rcred as $element) {
252 if ( $element ==
$res[
'fd_id'] ) {
257 printf (
'<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="ACH_FICHECRED[]" class="ach_fichecred" %s>%s</TD>',
258 $res[
'fd_id'],$CHECKED,
$res[
'fd_label']);
269 if ( $new ==1 ||
$type==
'VEN' ) :
273 <TABLE
class=
"result" style=
"width:80%;margin-left:10%;">
277 <?php echo _(
"Clients (D)");?>
280 <?php echo _(
"Services, fournitures ou biens vendus (C)");?>
287 $Res=
$cn->exec_sql(
"select fd_id,fd_label from fiche_def order by fd_label");
292 $rdeb=$default_deb_sale;
293 $rcred=$default_cred_sale;
298 $CHECKED=
" unchecked";
299 foreach ( $rdeb as $element) {
300 if ( $element ==
$res[
'fd_id'] ) {
306 printf (
'<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="VEN_FICHEDEB[]" class="ven_fichedeb" %s>%s</TD>',
307 $res[
'fd_id'],$CHECKED,
$res[
'fd_label']);
308 $CHECKED=
" unchecked";
309 foreach ( $rcred as $element) {
310 if ( $element ==
$res[
'fd_id'] ) {
315 printf (
'<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="VEN_FICHECRED[]" class="ven_fichecred" %s>%s</TD>',
316 $res[
'fd_id'],$CHECKED,
$res[
'fd_label']);
327 if ( $new ==1 ||
$type==
'ODS' ) :
331 <TABLE
class=
"result" style=
"width:60%;margin-left:20%;">
334 <?php echo _(
"Fiches utilisables (D/C)"); ?>
342 $Res=
$cn->exec_sql(
"select fd_id,fd_label from fiche_def order by fd_label");
351 $CHECKED=
" unchecked";
352 foreach ( $rdeb as $element) {
353 if ( $element ==
$res[
'fd_id'] ) {
359 printf (
'<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="ODS_FICHEDEB[]" class="ods_fichedeb" %s>%s</TD>',
360 $res[
'fd_id'],$CHECKED,
$res[
'fd_label']);
361 $CHECKED=
" unchecked";
373 if ( $new ==1 ||
$type==
'FIN' ) :
377 <TABLE
class=
"result" style=
"width:60%;margin-left:20%;">
388 $Res=
$cn->exec_sql(
"select fd_id,fd_label from fiche_def order by fd_label");
397 $CHECKED=
" unchecked";
398 foreach ( $rdeb as $element) {
399 if ( $element ==
$res[
'fd_id'] ) {
405 printf (
'<TD> <INPUT TYPE="CHECKBOX" VALUE="%s" NAME="FIN_FICHEDEB[]" class="fin_fichedeb" %s>%s</TD>',
406 $res[
'fd_id'],$CHECKED,
$res[
'fd_label']);
407 $CHECKED=
" unchecked";
417<?php
if ( $new == 1 ) : ?>
419 var a_div=Array(
'VEN_div',
'ODS_div',
'ACH_div',
'FIN_div');
422 for (var i=0;i<a_div.length;i++)
424 $(a_div[i]).style.display=
'none';
429 $(
'type_ods').style.display=
'none';
430 $(
'type_fin').style.display=
'none';
431 $(
'type_fin2').style.display=
'none';
432 $(
'type_fin3').style.display=
'none';
433 $(
'neg_amount').style.display=
'none';
434 $(
'row_warning').style.display=
'none';
439 var ch=$(
'p_jrn_type_select_id').options[$(
'p_jrn_type_select_id').selectedIndex].value;
440 if ( ch != -1 ) { $(ch+
'_div').style.display=
'block';}
444 $(
'type_fin').style.display=
'table-row';
445 $(
'type_fin2').style.display=
'table-row';
446 $(
'type_fin3').style.display=
'table-row';
450 $(
'type_ods').style.display=
'table-row';
454 $(
'neg_amount').style.display=
'table-row';
455 toggle_row_warning_enable(
'negative_amount',
'row_warning');
460 $(
'neg_amount').style.display=
'table-row';
461 toggle_row_warning_enable(
'negative_amount',
'row_warning');
472 if (isset ($previous_p_jrn_type) ):
484toggle_row_warning_enable(
'negative_amount',
'row_warning');
491(
function () {var a_checkbox=[
'ach_fichecred',
'ach_fichedeb',
'ven_fichecred',
'ven_fichedeb',
'ods_fichedeb',
'fin_fichedeb'];
492 a_checkbox.forEach(element => activate_checkbox_range(element));})()
h2($p_string, $p_class="", $raw="")
th($p_string, $p_extra='', $raw='')
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
Input HTML for the card show buttons, in the file, you have to add card.js How to use :
static warnbulle($p_comment)
Display a warning in a bubble, text is in message_javascript.
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.