Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cb0dfa9a

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID cb0dfa9a11519db929421ddc704a1f25b6a50668
  • Vorgänger 7130d91e
  • Nachfolger de6cead5

is form_footer: Fixes, Hooks und hiddens.

Unterschiede anzeigen:

bin/mozilla/is.pl
437 437

  
438 438
    # format amounts
439 439
    $totalpaid += $form->{"paid_$i"};
440
    if ($form->{"paid_$i"}) {
441
      $form->{"paid_$i"} = $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
442
    }
443
    $form->{"exchangerate_$i"} = $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
444
    $form->{"exchangerate_$i"} ||= "";
445 440
  }
446 441

  
447

  
448 442
  $form->{print_options} = print_options(inline => 1);
449 443

  
450 444
  print $form->parse_html_template('is/form_footer');
templates/webpages/is/_payments_de.html
23 23
     </tr>
24 24

  
25 25

  
26
[% paidaccounts %]
27

  
28 26
[% FOREACH i = paid_indices %]
29
[% SET row = {} %]
30
  [% SET row.datepaid    = 'datepaid_'    _ i %]
31
  [% SET row.source      = 'source_'      _ i %]
32
  [% SET row.memo        = 'memo_'        _ i %]
33
  [% SET row.paid        = 'paid_'        _ i %]
27
  [% SET datepaid      = 'datepaid_'      _ i %]
28
  [% SET source        = 'source_'        _ i %]
29
  [% SET memo          = 'memo_'          _ i %]
30
  [% SET paid          = 'paid_'          _ i %]
31
  [% SET selectAR_paid_ref = 'selectAR_paid_' _ i %]
34 32

  
35 33
     <tr>
36 34

  
37 35
    <td align="center">
38
      <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="$myconfig{dateformat}" value="[% row.datepaid %]" onBlur=\"check_right_date_format(this)\">
36
      <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="[% dateformat %]" value="[% $datepaid %]">
39 37
      <input type="button" name="datepaid_[% i %]" id="trigger_datepaid_[% i %]" value="?">
40 38
     </td>
41
     <td align=center><input name="source_[% i %]" size="11" value="[% row.source %]"></td>|;
42
     <td align="center"><input name="memo_[% i %]" size="11" value="[% row.memo %]"></td>|;
43
     <td align="center"><input name="paid_[% i %]" size="11" value="[% row.paid %]" onBlur=\"check_right_number_format(this)\"></td>|;
44
     <td align="center">
39
     <td align=center><input name="source_[% i %]" size="11" value="[% $source %]"></td>
40
     <td align="center"><input name="memo_[% i %]" size="11" value="[% $memo %]"></td>
41
     <td align="center"><input name="paid_[% i %]" size="11" value="[% LxERP.format_amount($paid, 2, 1) %]"></td>
45 42
[% IF show_exchangerate %]
43
     <td align="center">
46 44
  [% SET row.forex        = 'forex_'        _ i %]
47 45
  [% SET row.exchangerate = 'exchangerate_' _ i %]
48 46
  [% IF row.forex %]
49
        <input type="hidden" name="exchangerate_[% i %]" value="[% row.exchangerate %]">
50
        [% row.exchangerate | html %]
47
        <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2) %]">
48
        [% LxERP.format_amount(row.exchangerate, 2) %]
51 49
  [% ELSE %]
52
        <input name="exchangerate_[% i %]" size="10" value="[% row.exchangerate %]">
50
        <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
53 51
  [% END %]
54
        <input type="hidden" name="forex_[% i %]" value="[% row.forex %]">;
55
[% END %]
52
        <input type="hidden" name="forex_[% i %]" value="[% $forex %]">;
56 53
     </td>
57
     <td align="center"><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
54
[% END %]
55
     <td align="center"><select name="AR_paid_$i">[% $selectAR_paid_ref %]</select></td>
58 56

  
59 57
    </tr>
60 58
[%#     push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); %]
59
    <script type='text/javascript'>
60
     Calendar.setup({ inputField : "datepaid_[% i %]", ifFormat :"[% myconfig_jsc_dateformat %]", align : "TR", button : "trigger_datepaid_[% i %]" });
61
     $('input[name="paid_[% i %]"]').blur(function(){ check_right_number_format(this) });
62
     $('#datepaid_[% i %]').blur(function(){ check_right_date_format(this) });
63
    </script>
61 64

  
62 65
[% END # foreach %]
63 66

  
......
74 77
      <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
75 78
    </tr>
76 79

  
77
  <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
78
  <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
79
  <input type="hidden" name="oldinvtotal" value="[% rowcount %]">
80
     <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
81
     <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
82
     <input type="hidden" name="oldinvtotal" value="[% rowcount %]">
80 83

  
81
  <input type="hidden" name="oldtotalpaid" value="$totalpaid">
84
     <input type="hidden" name="oldtotalpaid" value="$totalpaid">
82 85
    </table>
83 86

  
84 87
    </td>
templates/webpages/is/_payments_master.html
23 23
     </tr>
24 24

  
25 25

  
26
[% paidaccounts %]
27

  
28 26
[% FOREACH i = paid_indices %]
29
[% SET row = {} %]
30
  [% SET row.datepaid    = 'datepaid_'    _ i %]
31
  [% SET row.source      = 'source_'      _ i %]
32
  [% SET row.memo        = 'memo_'        _ i %]
33
  [% SET row.paid        = 'paid_'        _ i %]
27
  [% SET datepaid      = 'datepaid_'      _ i %]
28
  [% SET source        = 'source_'        _ i %]
29
  [% SET memo          = 'memo_'          _ i %]
30
  [% SET paid          = 'paid_'          _ i %]
31
  [% SET selectAR_paid_ref = 'selectAR_paid_' _ i %]
34 32

  
35 33
     <tr>
36 34

  
37 35
    <td align="center">
38
      <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="$myconfig{dateformat}" value="[% row.datepaid %]" onBlur=\"check_right_date_format(this)\">
36
      <input id="datepaid_[% i %]" name="datepaid_[% i %]" size="11" title="[% dateformat %]" value="[% $datepaid %]">
39 37
      <input type="button" name="datepaid_[% i %]" id="trigger_datepaid_[% i %]" value="?">
40 38
     </td>
41
     <td align=center><input name="source_[% i %]" size="11" value="[% row.source %]"></td>|;
42
     <td align="center"><input name="memo_[% i %]" size="11" value="[% row.memo %]"></td>|;
43
     <td align="center"><input name="paid_[% i %]" size="11" value="[% row.paid %]" onBlur=\"check_right_number_format(this)\"></td>|;
44
     <td align="center">
39
     <td align=center><input name="source_[% i %]" size="11" value="[% $source %]"></td>
40
     <td align="center"><input name="memo_[% i %]" size="11" value="[% $memo %]"></td>
41
     <td align="center"><input name="paid_[% i %]" size="11" value="[% LxERP.format_amount($paid, 2, 1) %]"></td>
45 42
[% IF show_exchangerate %]
43
     <td align="center">
46 44
  [% SET row.forex        = 'forex_'        _ i %]
47 45
  [% SET row.exchangerate = 'exchangerate_' _ i %]
48 46
  [% IF row.forex %]
49
        <input type="hidden" name="exchangerate_[% i %]" value="[% row.exchangerate %]">
50
        [% row.exchangerate | html %]
47
        <input type="hidden" name="exchangerate_[% i %]" value="[% LxERP.format_amount($exchangerate, 2) %]">
48
        [% LxERP.format_amount(row.exchangerate, 2) %]
51 49
  [% ELSE %]
52
        <input name="exchangerate_[% i %]" size="10" value="[% row.exchangerate %]">
50
        <input name="exchangerate_[% i %]" size="10" value="[% LxERP.format_amount($exchangerate, 2, 1) %]">
53 51
  [% END %]
54
        <input type="hidden" name="forex_[% i %]" value="[% row.forex %]">;
55
[% END %]
52
        <input type="hidden" name="forex_[% i %]" value="[% $forex %]">;
56 53
     </td>
57
     <td align="center"><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
54
[% END %]
55
     <td align="center"><select name="AR_paid_$i">[% $selectAR_paid_ref %]</select></td>
58 56

  
59 57
    </tr>
60 58
[%#     push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); %]
59
    <script type='text/javascript'>
60
     Calendar.setup({ inputField : "datepaid_[% i %]", ifFormat :"[% myconfig_jsc_dateformat %]", align : "TR", button : "trigger_datepaid_[% i %]" });
61
     $('input[name="paid_[% i %]"]').blur(function(){ check_right_number_format(this) });
62
     $('#datepaid_[% i %]').blur(function(){ check_right_date_format(this) });
63
    </script>
61 64

  
62 65
[% END # foreach %]
63 66

  
......
74 77
      <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
75 78
    </tr>
76 79

  
77
  <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
78
  <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
79
  <input type="hidden" name="oldinvtotal" value="[% rowcount %]">
80
     <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
81
     <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
82
     <input type="hidden" name="oldinvtotal" value="[% rowcount %]">
80 83

  
81
  <input type="hidden" name="oldtotalpaid" value="$totalpaid">
84
     <input type="hidden" name="oldtotalpaid" value="$totalpaid">
82 85
    </table>
83 86

  
84 87
    </td>

Auch abrufbar als: Unified diff