Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 71d5f17d

Von Hans P. Schlaepfer vor fast 5 Jahren hinzugefügt

  • ID 71d5f17dfe27a72d954e949c994deb0265be0393
  • Vorgänger 9404cfcc
  • Nachfolger 864c1a0c

Neues Design 2019 Standard-Code templates/webpages/sepa/bank_transfer_create.html

Unterschiede anzeigen:

templates/webpages/sepa/bank_transfer_create.html
4 4
[% USE LxERP %]
5 5

  
6 6
[% IF vc == 'vendor' %]
7
 [% SET is_vendor = 1 %]
8
 [% SET arap = 'ap' %]
9
 [% SET iris = 'ir' %]
7
  [% SET is_vendor = 1 %]
8
  [% SET arap = 'ap' %]
9
  [% SET iris = 'ir' %]
10 10
[% ELSE %]
11
 [% SET is_vendor = 0 %]
12
 [% SET arap = 'ar' %]
13
 [% SET iris = 'is' %]
14
[%- END %]
11
  [% SET is_vendor = 0 %]
12
  [% SET arap = 'ar' %]
13
  [% SET iris = 'is' %]
14
[% END %]
15 15

  
16
 [%- IF error_message %]
17
 <p><div class="message_error">[% error_message %]</div></p>
18
 [%- END %]
16
<h1>[% title %]</h1>
19 17

  
20
 <p><div class="listtop">[% title %]</div></p>
18
[% IF error_message %]
19
  <div class="message message_error">[% error_message %]</div>
20
[% END %]
21 21

  
22
 <form action="sepa.pl" method="post" id="form">
23
  <p>1.
24
   [%- IF is_vendor %]
22
<form action="sepa.pl" method="post" id="form">
23
<p>1.
24
  [% IF is_vendor %]
25 25
    [% 'Please select the source bank account for the transfers:' | $T8 %]
26
   [%- ELSE %]
26
  [% ELSE %]
27 27
    [% 'Please select the destination bank account for the collections:' | $T8 %]
28
   [%- END %]
29
   <br>
30
   [% L.select_tag('bank_account',
31
       BANK_ACCOUNTS,
32
       title_key='displayable_name',
33
       default=bank_account.id,
34
       with_empty=0,
35
       style='width:450px',
36
   ) %]
37
  </p>
28
  [% END %]
29
  <br>
30
  [% L.select_tag('bank_account',
31
     BANK_ACCOUNTS,
32
     title_key='displayable_name',
33
     default=bank_account.id,
34
     with_empty=0,
35
     style='width:450px',
36
  ) %]
37
</p>
38 38

  
39
  <p>
40
   2.
41
   [%- IF is_vendor %]
42
    [% 'Please Check the bank information for each vendor:' | $T8 %]
43
   [%- ELSE %]
44
    [% 'Please Check the bank information for each customer:' | $T8 %]
45
   [%- END %]
46
   <br>
47
   <table>
39
<p>2.
40
[% IF is_vendor %]
41
  [% 'Please Check the bank information for each vendor:' | $T8 %]
42
[% ELSE %]
43
  [% 'Please Check the bank information for each customer:' | $T8 %]
44
[% END %]
45
</p>
46

  
47
<table>
48
  <thead>
48 49
    <tr>
49
     <th class="listheading">[%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
50
     <th class="listheading">[% 'IBAN' | $T8 %]</th>
51
     <th class="listheading">[% 'BIC' | $T8 %]</th>
52
     <th class="listheading">[% 'Bank' | $T8 %]</th>
53
     [% IF vc == 'customer' %]
54
      <th class="listheading">[% 'Mandator ID' | $T8 %]</th>
55
      <th class="listheading">[% 'Mandate Date of Signature' | $T8 %]</th>
56
     [%- END %]
50
      <th>[% IF is_vendor %][% 'Vendor' | $T8 %][% ELSE %][% LxERP.t8('Customer') %][% END %]</th>
51
      <th>[% 'IBAN' | $T8 %]</th>
52
      <th>[% 'BIC' | $T8 %]</th>
53
      <th>[% 'Bank' | $T8 %]</th>
54
      [% IF vc == 'customer' %]
55
        <th>[% 'Mandator ID' | $T8 %]</th>
56
        <th>[% 'Mandate Date of Signature' | $T8 %]</th>
57
      [% END %]
57 58
    </tr>
59
  </thead>
60
  <tbody>
61
    [% FOREACH vbi = VC_BANK_INFO %]
62
      <tr class="listrow[% loop.count % 1 %]">
63
        <td> <input type="hidden" name="vc_bank_info[+].id" value="[% HTML.escape(vbi.id) %]"> <input type="hidden" name="vc_bank_info[].name" value="[% HTML.escape(vbi.name) %]"> [% HTML.escape(vbi.name) %] </td>
64
        <td><input type="text" name="vc_bank_info[].iban" size="34" value="[% HTML.escape(vbi.iban.substr(0, 34)) %]" maxlength="34"></td>
65
        <td><input type="text" name="vc_bank_info[].bic" size="20" value="[% HTML.escape(vbi.bic.substr(0, 20)) %]" maxlength="20"></td>
66
        <td><input type="text" name="vc_bank_info[].bank" size="30" value="[% HTML.escape(vbi.bank) %]"></td>
67
        [% IF vc == 'customer' %]
68
          <td><input type="text" name="vc_bank_info[].mandator_id" size="30" value="[% HTML.escape(vbi.mandator_id) %]"></td>
69
          <td>[% L.date_tag("vc_bank_info[].mandate_date_of_signature", vbi.mandate_date_of_signature) %]</td>
70
        [% END %]
71
      </tr>
72
    [% END %]
73
  </tbody>
74
</table>
58 75

  
59
    [%- FOREACH vbi = VC_BANK_INFO %]
60
    <tr class="listrow[% loop.count % 1 %]">
61
     <td>
62
      <input type="hidden" name="vc_bank_info[+].id" value="[% HTML.escape(vbi.id) %]">
63
      <input type="hidden" name="vc_bank_info[].name" value="[% HTML.escape(vbi.name) %]">
64
      [% HTML.escape(vbi.name) %]
65
     </td>
66
     <td><input name="vc_bank_info[].iban" size="34" value="[% HTML.escape(vbi.iban.substr(0, 34)) %]" maxlength="34"></td>
67
     <td><input name="vc_bank_info[].bic" size="20" value="[% HTML.escape(vbi.bic.substr(0, 20)) %]" maxlength="20"></td>
68
     <td><input name="vc_bank_info[].bank" size="30" value="[% HTML.escape(vbi.bank) %]"></td>
69
     [% IF vc == 'customer' %]
70
      <td><input name="vc_bank_info[].mandator_id" size="30" value="[% HTML.escape(vbi.mandator_id) %]"></td>
71
      <td>[% L.date_tag("vc_bank_info[].mandate_date_of_signature", vbi.mandate_date_of_signature) %]</td>
72
     [%- END %]
73
    </tr>
74
    [%- END %]
75
   </table>
76
  </p>
76
<p>3. [% 'Enter the requested execution date or leave empty for the quickest possible execution:' | $T8 %]</p>
77 77

  
78
  <p>
79
   3. [% 'Enter the requested execution date or leave empty for the quickest possible execution:' | $T8 %]
80
   <br>
81
   <table>
78
<table class="tbl-list">
79
  <thead>
82 80
    <tr>
83
     <th class="listheading">[%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
84
     <th class="listheading">[% 'Invoice' | $T8 %]</th>
85
     <th class="listheading" align="right">[% 'Amount' | $T8 %]</th>
86
     <th class="listheading" align="right">[% 'Open amount' | $T8 %]</th>
87
     <th class="listheading">[% 'Purpose' | $T8 %]</th>
88
     <th class="listheading" align="right">[%- IF is_vendor %][% 'Bank transfer amount' | $T8 %][%- ELSE %][%- LxERP.t8('Bank collection amount') %][%- END %]</th>
89
     <th class="listheading" align="right">[% LxERP.t8('Payment type') %]</th>
90
     <th class="listheading" align="right">[% LxERP.t8('Skonto information') %]</th>
91
     <th class="listheading">[% 'Execution date' | $T8 %]</th>
81
      <th>[% IF is_vendor %][% 'Vendor' | $T8 %][% ELSE %][% LxERP.t8('Customer') %][% END %]</th>
82
      <th>[% 'Invoice' | $T8 %]</th>
83
      <th>[% 'Amount' | $T8 %]</th>
84
      <th>[% 'Open amount' | $T8 %]</th>
85
      <th>[% 'Purpose' | $T8 %]</th>
86
      <th>[% IF is_vendor %][% 'Bank transfer amount' | $T8 %][% ELSE %][% LxERP.t8('Bank collection amount') %][% END %]</th>
87
      <th>[% LxERP.t8('Payment type') %]</th>
88
      <th>[% LxERP.t8('Skonto information') %]</th>
89
      <th>[% 'Execution date' | $T8 %]</th>
92 90
    </tr>
91
  </thead>
92
  <tbody>
93
    [% FOREACH bank_transfer = BANK_TRANSFERS %]
94
      <tr>
95
        <td>
96
          <input type="hidden" name="bank_transfers[+].[% arap %]_id" value="[% HTML.escape(bank_transfer.id) %]">
97
          <input type="hidden" name="bank_transfers[].vc_id" value="[% HTML.escape(bank_transfer.vc_id) %]">
98
          <input type="hidden" name="bank_transfers[].selected" value="1">
99
          <input type="hidden" id="amount_less_skonto_[% loop.count %]" name="amount_less_skonto_[% loop.count %]" value="[% LxERP.format_amount(bank_transfer.amount_less_skonto, 2) %]">
100
          <input type="hidden" id="skonto_amount_[% loop.count %]" name="skonto_amount_[% loop.count %]" value="[% LxERP.format_amount(bank_transfer.skonto_amount, 2) %]">
101
          <input type="hidden" id="invoice_open_amount_[% loop.count %]" name="invoice_open_amount_[% loop.count %]" value="[% LxERP.format_amount(bank_transfer.open_amount, 2) %]">
102
          [% IF loop.first || (previous_vcname != bank_transfer.vcname) %]
103
            <a href="controller.pl?action=CustomerVendor/edit&db=[% vc %]&id=[% HTML.url(bank_transfer.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
104
              [% GET HTML.escape(bank_transfer.vcname); SET previous_vcname = bank_transfer.vcname; %]
105
            </a>
106
          [% END %]
107
        </td>
108
        <td><a href="[% IF bank_transfer.invoice %][% iris %][% ELSE %][% arap %][% END %].pl?action=edit&id=[% HTML.escape(bank_transfer.id) %]"> [% HTML.escape(bank_transfer.invnumber) %]</a></td>
109
        <td>[% LxERP.format_amount(bank_transfer.invoice_amount, -2) %]</td>
110
        <td>[% LxERP.format_amount(bank_transfer.open_amount, -2) %]</td>
111
        <td><input type="text" name="bank_transfers[].reference" value="[% HTML.escape(bank_transfer.reference.substr(0, 140)) %]" size="40" maxlength="140"></td>
112
        <td><input type="text" id="[%" loop.count %] name="bank_transfers[].amount" value="[% LxERP.format_amount(bank_transfer.amount, -2) %]" style="text-align: right" size="12"></td>
113
        <td>[% L.select_tag('bank_transfers[].payment_type', bank_transfer.payment_select_options, value_key => 'payment_type', title_key => 'display', id => 'payment_type_' _ loop.count, class => 'type_target' ) %]</td>
114
        <td[% if bank_transfer.within_skonto_period %] style="background-color:LightGreen"[% end %]>
115
          [% IF bank_transfer.skonto_amount %]
116
            [% LxERP.format_amount(bank_transfer.percent_skonto, 2) %] % = [% LxERP.format_amount(bank_transfer.skonto_amount, 2) %] € [% 'until' | $T8 %] [% bank_transfer.skonto_date %]
117
          [% END %]
118
        </td>
119
        <td>[% L.date_tag('bank_transfers[].requested_execution_date', bank_transfer.recommended_execution_date) %]</td>
120
      </tr>
121
    [% END %]
122
  </tbody>
123
</table>
93 124

  
94
    [%- FOREACH bank_transfer = BANK_TRANSFERS %]
95
     <input type="hidden" name="bank_transfers[+].[% arap %]_id" value="[% HTML.escape(bank_transfer.id) %]">
96
     <input type="hidden" name="bank_transfers[].vc_id" value="[% HTML.escape(bank_transfer.vc_id) %]">
97
     <input type="hidden" name="bank_transfers[].selected" value="1">
98
     <input type="hidden" id="amount_less_skonto_[% loop.count %]" name="amount_less_skonto_[% loop.count %]" value="[% LxERP.format_amount(bank_transfer.amount_less_skonto, 2) %]">
99
     <input type="hidden" id="skonto_amount_[% loop.count %]" name="skonto_amount_[% loop.count %]" value="[% LxERP.format_amount(bank_transfer.skonto_amount, 2) %]">
100
     <input type="hidden" id="invoice_open_amount_[% loop.count %]" name="invoice_open_amount_[% loop.count %]" value="[% LxERP.format_amount(bank_transfer.open_amount, 2) %]">
101

  
102
     <tr class="listrow[% loop.count % 2 %]">
103
      <td>
104
       [%- IF loop.first || (previous_vcname != bank_transfer.vcname) %]
105
        <a href="controller.pl?action=CustomerVendor/edit&db=[% vc %]&id=[% HTML.url(bank_transfer.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
106
         [%- GET HTML.escape(bank_transfer.vcname);
107
             SET previous_vcname = bank_transfer.vcname; -%]
108
        </a>
109
       [%- END -%]
110
      </td>
111

  
112
      <td>
113
       <a href="[% IF bank_transfer.invoice %][% iris %][% ELSE %][% arap %][% END %].pl?action=edit&id=[% HTML.escape(bank_transfer.id) %]">
114
        [% HTML.escape(bank_transfer.invnumber) %]
115
       </a>
116
      </td>
117

  
118
      <td align="right">[% LxERP.format_amount(bank_transfer.invoice_amount, -2) %]</td>
119
      <td align="right">[% LxERP.format_amount(bank_transfer.open_amount, -2) %]</td>
120
      <td>
121
       <input name="bank_transfers[].reference" value="[% HTML.escape(bank_transfer.reference.substr(0, 140)) %]" size="40" maxlength="140">
122
      </td>
123
      <td align="right"><input id=[% loop.count %] name="bank_transfers[].amount" value="[% LxERP.format_amount(bank_transfer.amount, -2) %]" style="text-align: right" size="12"></td>
124
      <td>
125
      [% L.select_tag('bank_transfers[].payment_type', bank_transfer.payment_select_options, value_key => 'payment_type', title_key => 'display', id => 'payment_type_' _ loop.count, class => 'type_target' ) %]
126
      </td>
127
      <td align="left" [%- IF bank_transfer.within_skonto_period %]style="background-color: LightGreen"[%- END %]>[%- IF bank_transfer.skonto_amount %] [% LxERP.format_amount(bank_transfer.percent_skonto, 2) %] % = [% LxERP.format_amount(bank_transfer.skonto_amount, 2) %] € [% 'until' | $T8 %] [% bank_transfer.skonto_date %] [% END %]</td>
128
      <td nowrap>
129
        [% L.date_tag('bank_transfers[].requested_execution_date', bank_transfer.recommended_execution_date) %]
130
      </td>
131
     </tr>
132
    [%- END %]
133
   </table>
134
  </p>
135

  
136
  <p>
137
   [% 'Sum open amount' | $T8 %]: [% LxERP.format_amount(total_trans, -2) %]
138
  </p>
125
<p>[% 'Sum open amount' | $T8 %]: [% LxERP.format_amount(total_trans, -2) %]</p>
139 126

  
140
  <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
141
  <input type="hidden" name="confirmation" value="1">
142
 </form>
127
<input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
128
<input type="hidden" name="confirmation" value="1">
143 129

  
144
 <script type="text/javascript">
145
$( ".type_target" ).change(function() {
146
  type_id = $(this).attr('id');
147
  var id = type_id.match(/\d*$/);
148
  // alert("found id " + id);
149
  if ( $(this).val() == "without_skonto" ) {
150
      $('#' + id).val( $('#invoice_open_amount_' + id).val() );
151
  } else if ( $(this).val() == "difference_as_skonto" ) {
152
      $('#' + id).val( $('#invoice_open_amount_' + id).val() );
153
  } else if ( $(this).val() == "with_skonto_pt" ) {
154
            $('#' + id).val( $('#amount_less_skonto_' + id).val() );
155
  }
156
});
130
</form>
157 131

  
132
<script type="text/javascript">
133
  $( ".type_target" ).change(function() {
134
    type_id = $(this).attr('id');
135
    var id = type_id.match(/\d*$/);
136
    // alert("found id " + id);
137
    if ( $(this).val() == "without_skonto" ) {
138
        $('#' + id).val( $('#invoice_open_amount_' + id).val() );
139
    } else if ( $(this).val() == "difference_as_skonto" ) {
140
        $('#' + id).val( $('#invoice_open_amount_' + id).val() );
141
    } else if ( $(this).val() == "with_skonto_pt" ) {
142
              $('#' + id).val( $('#amount_less_skonto_' + id).val() );
143
    }
144
  });
158 145
</script>

Auch abrufbar als: Unified diff