Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4e155b5c

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID 4e155b5c699331434f1aa51db578afe9b6756c04
  • Vorgänger 47df98d0
  • Nachfolger 37c03103

ActionBar: Verwendung bei SEPA-Einzügen/-Überweisungen

Unterschiede anzeigen:

bin/mozilla/sepa.pl
4 4
use List::Util qw(sum first);
5 5
use POSIX qw(strftime);
6 6

  
7
use Data::Dumper;
8 7
use SL::DB::BankAccount;
9 8
use SL::DB::SepaExport;
10 9
use SL::Chart;
11 10
use SL::CT;
12 11
use SL::Form;
13 12
use SL::GenericTranslations;
13
use SL::Locale::String qw(t8);
14 14
use SL::ReportGenerator;
15 15
use SL::SEPA;
16 16
use SL::SEPA::XML;
......
66 66
    $invoice->{reference_prefix_vc}  = ' '  . $prefix_vc_number unless $prefix_vc_number =~ m/^ /;
67 67
  }
68 68

  
69
  setup_sepa_add_transfer_action_bar();
70

  
69 71
  $form->header();
70 72
  print $form->parse_html_template('sepa/bank_transfer_add',
71 73
                                   { 'INVOICES'           => $invoices,
......
104 106
  # all the information from retrieve_open_invoices is then ADDED to what was passed via @{ $form->{bank_transfers} }
105 107
  # parse amount from the entry in the form, but take skonto_amount from PT again
106 108
  # the map inserts the values of invoice_map directly into the array of hashes
109
  my %selected_ids   = map { ($_ => 1) } @{ $form->{ids} || [] };
107 110
  my %invoices_map   = map { $_->{id} => $_ } @{ $invoices };
108 111
  my @bank_transfers =
109 112
    map  +{ %{ $invoices_map{ $_->{$arap_id} } }, %{ $_ } },
110
    grep  { $_->{selected} && (0 < $_->{amount}) && $invoices_map{ $_->{$arap_id} } }
113
    grep  { ($_->{selected} || $selected_ids{$_->{$arap_id}}) && (0 < $_->{amount}) && $invoices_map{ $_->{$arap_id} } }
111 114
    map   { $_->{amount} = $form->parse_amount($myconfig, $_->{amount}); $_ }
112 115
          @{ $form->{bank_transfers} || [] };
113 116

  
......
152 155
                                                   'id' => \@vc_ids);
153 156
    my @vc_bank_info           = sort { lc $a->{name} cmp lc $b->{name} } values %{ $vc_bank_info };
154 157

  
158
    setup_sepa_create_transfer_action_bar(is_vendor => $vc eq 'vendor');
159

  
155 160
    $form->header();
156 161
    print $form->parse_html_template('sepa/bank_transfer_create',
157 162
                                     { 'BANK_TRANSFERS'     => \@bank_transfers,
......
193 198

  
194 199
  $form->{title}    = $vc eq 'customer' ? $::locale->text('List of bank collections') : $locale->text('List of bank transfers');
195 200

  
201
  setup_sepa_search_transfer_action_bar();
202

  
196 203
  $form->header();
197 204
  print $form->parse_html_template('sepa/bank_transfer_search', { vc => $vc });
198 205

  
......
302 309
    $row->{$_}->{data} = $::form->format_amount(\%::myconfig, $row->{$_}->{data}, 2) for qw(sum_amounts);
303 310

  
304 311
    if (!$export->{closed}) {
305
      $row->{selected}->{raw_data} =
306
          $cgi->hidden(-name => "exports[+].id", -value => $export->{id})
307
        . $cgi->checkbox(-name => "exports[].selected", -value => 1, -label => '');
312
      $row->{selected}->{raw_data} = $cgi->checkbox(-name => "ids[]", -value => $export->{id}, -label => '');
308 313
    }
309 314

  
310 315
    $report->add_data($row);
311 316
  }
312 317

  
318
  setup_sepa_list_transfers_action_bar(show_buttons => $open_available, is_vendor => $vc eq 'vendor');
319

  
313 320
  $report->generate_with_headers();
314 321

  
315 322
  $main::lxdebug->leave_sub();
......
326 333
  if (!$form->{mode} || ($form->{mode} eq 'single')) {
327 334
    push @ids, $form->{id};
328 335
  } else {
329
    @ids = map $_->{id}, grep { $_->{selected} } @{ $form->{exports} || [] };
336
    @ids = @{ $form->{ids} || [] };
330 337

  
331 338
    if (!@ids) {
332 339
      $form->show_generic_error($locale->text('You have not selected any export.'));
......
360 367
    $form->error($locale->text('That export does not exist.'));
361 368
  }
362 369

  
370
  my $show_post_payments_button = any { !$_->{export_closed} && !$_->{executed} } @{ $export->{items} };
371
  my $has_executed              = any { $_->{executed}                          } @{ $export->{items} };
372

  
373
  setup_sepa_edit_transfer_action_bar(
374
    show_post_payments_button => $show_post_payments_button,
375
    has_executed              => $has_executed,
376
  );
377

  
363 378
  $form->{title}    = $locale->text('View SEPA export');
364 379
  $form->header();
365 380
  print $form->parse_html_template('sepa/bank_transfer_edit',
366
                                   { 'ids'                       => \@ids,
367
                                     'export'                    => $export,
368
                                     'current_date'              => $form->current_date(\%main::myconfig),
369
                                     'show_post_payments_button' => any { !$_->{export_closed} && !$_->{executed} } @{ $export->{items} },
381
                                   { ids                       => \@ids,
382
                                     export                    => $export,
383
                                     current_date              => $form->current_date(\%main::myconfig),
384
                                     show_post_payments_button => $show_post_payments_button,
370 385
                                   });
371 386

  
372 387
  $main::lxdebug->leave_sub();
......
379 394
  my $locale = $main::locale;
380 395
  my $vc     = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
381 396

  
382
  my @items  = grep { $_->{selected} } @{ $form->{items} || [] };
397
  my %selected = map { ($_ => 1) } @{ $form->{ids} || [] };
398
  my @items    = grep { $selected{$_->{id}} } @{ $form->{items} || [] };
383 399

  
384 400
  if (!@items) {
385 401
    $form->show_generic_error($locale->text('You have not selected any item.'));
......
418 434
  my $locale     = $main::locale;
419 435
  my $vc         = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
420 436

  
421
  my @ids        = @{ $form->{items} || [] };
422
  my @export_ids = uniq map { $_->{export_id} } @ids;
437
  my @ids        = @{ $form->{ids} || [] };
438
  my @export_ids = uniq map { $_->{sepa_export_id} } @{ $form->{items} || [] };
423 439

  
424 440
  $form->show_generic_error($locale->text('Multi mode not supported.')) if 1 != scalar @export_ids;
425 441

  
......
427 443
  my @items  = ();
428 444

  
429 445
  foreach my $id (@ids) {
430
    my $item = first { $_->{id} == $id->{id} } @{ $export->{items} };
446
    my $item = first { $_->{id} == $id } @{ $export->{items} };
431 447
    push @items, $item if $item;
432 448
  }
433 449

  
......
493 509

  
494 510
  my @ids;
495 511
  if ($form->{mode} && ($form->{mode} eq 'multi')) {
496
     @ids = map $_->{id}, grep { $_->{selected} } @{ $form->{exports} || [] };
512
     @ids = @{ $form->{ids} || [] };
497 513

  
498 514
  } else {
499 515
    @ids = ($form->{id});
......
576 592
  $main::lxdebug->leave_sub();
577 593
}
578 594

  
579
sub bank_transfer_mark_as_closed_step1 {
580
  $main::lxdebug->enter_sub();
581

  
582
  my $form       = $main::form;
583
  my $locale     = $main::locale;
584
  my $vc         = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
585

  
586
  my @export_ids = map { $_->{id} } grep { $_->{selected} } @{ $form->{exports} || [] };
587

  
588
  if (!@export_ids) {
589
    $form->show_generic_error($locale->text('You have not selected any export.'));
590
  }
591

  
592
  my @open_export_ids = ();
593
  foreach my $id (@export_ids) {
594
    my $export = SL::SEPA->retrieve_export('id' => $id, vc => $vc);
595
    push @open_export_ids, $id if (!$export->{closed});
596
  }
597

  
598
  if (!@open_export_ids) {
599
    $form->show_generic_error($locale->text('All of the exports you have selected were already closed.'));
600
  }
601

  
602
  $form->{title} = $locale->text('Close SEPA exports');
603
  $form->header();
604
  print $form->parse_html_template('sepa/bank_transfer_mark_as_closed_step1', { 'OPEN_EXPORT_IDS' => \@open_export_ids, vc => $vc });
605

  
606
  $main::lxdebug->leave_sub();
607
}
608

  
609
sub bank_transfer_mark_as_closed_step2 {
595
sub bank_transfer_mark_as_closed {
610 596
  $main::lxdebug->enter_sub();
611 597

  
612 598
  my $form       = $main::form;
613 599
  my $locale     = $main::locale;
614 600

  
615
  map { SL::SEPA->close_export('id' => $_); } @{ $form->{open_export_ids} || [] };
601
  map { SL::SEPA->close_export('id' => $_); } @{ $form->{ids} || [] };
616 602

  
617 603
  $form->{title} = $locale->text('Close SEPA exports');
618 604
  $form->header();
......
637 623
  $form->error($main::locale->text('No action defined.'));
638 624
}
639 625

  
626
sub setup_sepa_add_transfer_action_bar {
627
  my (%params) = @_;
628

  
629
  for my $bar ($::request->layout->get('actionbar')) {
630
    $bar->add(
631
      action => [
632
        t8('Step 2'),
633
        submit    => [ '#form', { action => "bank_transfer_create" } ],
634
        accesskey => 'enter',
635
        checks    => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ],
636
      ],
637
    );
638
  }
639
}
640

  
641
sub setup_sepa_create_transfer_action_bar {
642
  my (%params) = @_;
643

  
644
  for my $bar ($::request->layout->get('actionbar')) {
645
    $bar->add(
646
      action => [
647
        t8('Create'),
648
        submit    => [ '#form', { action => "bank_transfer_create" } ],
649
        accesskey => 'enter',
650
        tooltip   => $params{is_vendor} ? t8('Create bank transfer') : t8('Create bank collection'),
651
      ],
652
      action => [
653
        t8('Back'),
654
        call => [ 'kivi.history_back' ],
655
      ],
656
    );
657
  }
658
}
659

  
660
sub setup_sepa_search_transfer_action_bar {
661
  my (%params) = @_;
662

  
663
  for my $bar ($::request->layout->get('actionbar')) {
664
    $bar->add(
665
      action => [
666
        t8('Search'),
667
        submit    => [ '#form', { action => 'bank_transfer_list' } ],
668
        accesskey => 'enter',
669
      ],
670
    );
671
  }
672
}
673

  
674
sub setup_sepa_list_transfers_action_bar {
675
  my (%params) = @_;
676

  
677
  return unless $params{show_buttons};
678

  
679
  for my $bar ($::request->layout->get('actionbar')) {
680
    $bar->add(
681
      combobox => [
682
        action => [ t8('Actions') ],
683
        action => [
684
          t8('SEPA XML download'),
685
          submit => [ '#form', { action => 'bank_transfer_download_sepa_xml' } ],
686
          checks => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ],
687
        ],
688
        action => [
689
          t8('Post payments'),
690
          submit => [ '#form', { action => 'bank_transfer_edit' } ],
691
          checks => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ],
692
        ],
693
        action => [
694
          t8('Mark as closed'),
695
          submit => [ '#form', { action => 'bank_transfer_mark_as_closed' } ],
696
          checks => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ],
697
          confirm => [ $params{is_vendor} ? t8('Do you really want to close the selected SEPA exports? No payment will be recorded for bank transfers that haven\'t been marked as executed yet.')
698
                                          : t8('Do you really want to close the selected SEPA exports? No payment will be recorded for bank collections that haven\'t been marked as executed yet.') ],
699
        ],
700
      ], # end of combobox "Actions"
701
    );
702
  }
703
}
704

  
705
sub setup_sepa_edit_transfer_action_bar {
706
  my (%params) = @_;
707

  
708
  for my $bar ($::request->layout->get('actionbar')) {
709
    $bar->add(
710
      action => [
711
        t8('Post'),
712
        submit    => [ '#form', { action => 'bank_transfer_post_payments' } ],
713
        accesskey => 'enter',
714
        tooltip   => t8('Post payments for selected invoices'),
715
        checks    => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ],
716
        only_if   => $params{show_post_payments_button},
717
      ],
718
      action => [
719
        t8('Payment list'),
720
        submit    => [ '#form', { action => 'bank_transfer_payment_list_as_pdf' } ],
721
        accesskey => 'enter',
722
        tooltip   => t8('Download list of payments as PDF'),
723
        checks    => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ],
724
        not_if    => $params{show_post_payments_button},
725
      ],
726
    );
727
  }
728
}
729

  
640 730
1;
locale/de/all
141 141
  'Accrual'                     => 'Soll-Versteuerung',
142 142
  'Accrual accounting'          => 'Soll-Versteuerung',
143 143
  'Action'                      => 'Aktion',
144
  'Actions'                     => 'Aktionen',
144 145
  'Activate kivitendo module'   => 'Modul aktivieren',
145 146
  'Active'                      => 'Aktiv',
146 147
  'Active?'                     => 'Aktiviert?',
......
248 249
  'All general ledger entries'  => 'Alle Hauptbucheinträge',
249 250
  'All groups'                  => 'Alle Gruppen',
250 251
  'All modules'                 => 'Alle Module',
251
  'All of the exports you have selected were already closed.' => 'Alle von Ihnen ausgewählten Exporte sind bereits abgeschlossen.',
252 252
  'All partsgroups'             => 'Alle Warengruppen',
253 253
  'All price sources'           => 'Alle Preisquellen',
254 254
  'All reports'                 => 'Alle Berichte (Konten&uuml;bersicht, Summen- u. Saldenliste, Erfolgsrechnung, GuV, BWA, Bilanz, Projektbuchungen)',
......
982 982
  'Do you really want to cancel this general ledger transaction?' => 'Wollen Sie diese Dialogbuchung wirklich stornieren?',
983 983
  'Do you really want to cancel this invoice?' => 'Wollen Sie diese Rechnung wirklich stornieren?',
984 984
  'Do you really want to cancel?' => 'Wollen Sie wirklich abbrechen?',
985
  'Do you really want to close the following SEPA exports? No payment will be recorded for bank collections that haven\'t been marked as executed yet.' => 'Wollen Sie wirklich die folgenden SEPA-Exporte abschließen? Für Überweisungen, die noch nicht gebucht wurden, werden dann keine Zahlungen verbucht.',
986
  'Do you really want to close the following SEPA exports? No payment will be recorded for bank transfers that haven\'t been marked as executed yet.' => 'Wollen Sie wirklich die folgenden SEPA-Exporte abschließen? Für Überweisungen, die noch nicht gebucht wurden, werden dann keine Zahlungen verbucht.',
985
  'Do you really want to close the selected SEPA exports? No payment will be recorded for bank collections that haven\'t been marked as executed yet.' => 'Wollen Sie wirklich die ausgewählten SEPA-Exporte abschließen? Für Überweisungen, die noch nicht gebucht wurden, werden dann keine Zahlungen verbucht.',
986
  'Do you really want to close the selected SEPA exports? No payment will be recorded for bank transfers that haven\'t been marked as executed yet.' => 'Wollen Sie wirklich die ausgewählten SEPA-Exporte abschließen? Für Überweisungen, die noch nicht gebucht wurden, werden dann keine Zahlungen verbucht.',
987 987
  'Do you really want to delete AP transaction #1?' => 'Wollen Sie wirklich die Kreditorenbuchung #1 löschen?',
988 988
  'Do you really want to delete AR transaction #1?' => 'Wollen Sie wirklich die Debitorenbuchung #1 löschen?',
989 989
  'Do you really want to delete GL transaction #1?' => 'Wollen Sie wirklich die Dialogbuchung #1 löschen?',
......
1019 1019
  'Download PDF'                => 'PDF herunterladen',
1020 1020
  'Download PDF, do not print'  => 'Nicht drucken, sondern PDF herunterladen',
1021 1021
  'Download SEPA XML export file' => 'SEPA-XML-Exportdatei herunterladen',
1022
  'Download list of payments as PDF' => 'Zahlungsliste als PDF herunterladen',
1022 1023
  'Download picture'            => 'Bild herunterladen',
1023 1024
  'Download sample file'        => 'Beispieldatei herunterladen',
1024 1025
  'Draft deleted'               => 'Entwurf gelöscht',
......
2085 2086
  'Payment Terms'               => 'Zahlungsbedingungen',
2086 2087
  'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ',
2087 2088
  'Payment date missing!'       => 'Tag der Zahlung fehlt!',
2088
  'Payment list as PDF'         => 'Zahlungsliste als PDF',
2089
  'Payment list'                => 'Zahlungsliste',
2089 2090
  'Payment posted!'             => 'Zahlung gebucht!',
2090 2091
  'Payment terms'               => 'Zahlungsbedingungen',
2091 2092
  'Payment terms (database ID)' => 'Zahlungsbedingungen (Datenbank-ID)',
......
2162 2163
  'Post'                        => 'Buchen',
2163 2164
  'Post Payment'                => 'Zahlung buchen',
2164 2165
  'Post payments'               => 'Zahlungen buchen',
2166
  'Post payments for selected invoices' => 'Zahlungen für ausgewählten Rechnungen buchen',
2165 2167
  'Posting Configuration'       => 'Buchungskonfiguration',
2166 2168
  'Postscript'                  => 'Postscript',
2167 2169
  'Posustva_coa'                => 'USTVA Kennz.',
......
2464 2466
  'SEPA XML download'           => 'SEPA-XML-Download',
2465 2467
  'SEPA creditor ID'            => 'SEPA-Kreditoren-Identifikation',
2466 2468
  'SEPA exports'                => 'SEPA-Exporte',
2467
  'SEPA exports:'               => 'SEPA-Exporte:',
2468 2469
  'SEPA message ID'             => 'SEPA-Nachrichten-ID',
2469 2470
  'SEPA message IDs'            => 'SEPA-Nachrichten-IDs',
2470 2471
  'SEPA strings'                => 'SEPA-Überweisungen',
templates/webpages/sepa/bank_transfer_add.html
13 13

  
14 14
 <p><div class="listtop">[% title %]</div></p>
15 15

  
16
 <form action="sepa.pl" method="post">
16
 <form action="sepa.pl" method="post" id="form">
17 17
  <p>
18 18
   [%- IF is_vendor %]
19 19
    [% 'Please select the source bank account for the transfers:' | $T8 %]
......
55 55
     <tr class="listrow[% IF !invoice.vc_bank_info_ok && invoice.checked %]_error[% END %]">
56 56
      <td align="center">
57 57
       [%- IF invoice.vc_bank_info_ok %]
58
        <input type="checkbox" name="bank_transfers[].selected" value="1"[% IF invoice.checked %] checked[% END %]>
58
        [% L.checkbox_tag("ids[]", value=invoice.id, checked=checked) %]
59 59
       [%- END %]
60 60
      </td>
61 61
      <td>
......
131 131
   </p>
132 132
  [%- END %]
133 133

  
134
  <p>
135
   <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Step 2' | $T8 %]">
136
  </p>
137

  
138
  <input type="hidden" name="action" value="dispatcher">
139 134
  <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
140 135
 </form>
141 136

  
142 137
 <script type="text/javascript">
143 138
  <!--
144 139
    $(function() {
145
      $("#select_all").checkall('INPUT[name="bank_transfers[].selected"]');
140
      $("#select_all").checkall('INPUT[name="ids[]"]');
146 141
    });
147 142
    -->
148 143

  
templates/webpages/sepa/bank_transfer_create.html
17 17

  
18 18
 <p><div class="listtop">[% title %]</div></p>
19 19

  
20
 <form action="sepa.pl" method="post">
20
 <form action="sepa.pl" method="post" id="form">
21 21
  <p>1.
22 22
   [%- IF is_vendor %]
23 23
    [% 'Please select the source bank account for the transfers:' | $T8 %]
......
135 135
   [% 'Sum open amount' | $T8 %]: [% LxERP.format_amount(total_trans, -2) %]
136 136
  </p>
137 137

  
138
  <p>
139
   [%- IF is_vendor %]
140
    <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Create bank transfer' | $T8 %]">
141
   [%- ELSE %]
142
    <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Create bank collection' | $T8 %]">
143
   [%- END %]
144
  </p>
145

  
146
  <input type="hidden" name="action" value="dispatcher">
147 138
  <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
148 139
  <input type="hidden" name="confirmation" value="1">
149 140
 </form>
150 141

  
151 142
 <script type="text/javascript">
152

  
153
    // function toggle(id) {
154
    //   $('#skonto_' + id).change(function() {
155
    //     if($('#skonto_' + id).prop("checked")) {
156
    //         $('#' + id).val( $('#amount_less_skonto_' + id).val() );
157
    //     } else {
158
    //         $('#' + id).val( $('#invoice_open_amount_' + id).val() );
159
    //     }
160
    //   });
161
    // };
162

  
163 143
$( ".type_target" ).change(function() {
164 144
  type_id = $(this).attr('id');
165 145
  var id = type_id.match(/\d*$/);
templates/webpages/sepa/bank_transfer_edit.html
13 13
[%- END %]
14 14
<h1>[% title %]: [% HTML.escape(export.ids.join(', ')) %]</h1>
15 15

  
16
 <form action="sepa.pl" method="post">
17
  <input type="hidden" name="action" value="dispatcher">
18

  
16
 <form action="sepa.pl" method="post" id="form">
19 17
  <p>
20 18
   <table>
21 19
    <tr>
22
     [%- IF show_post_payments_button %]
23
      <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
24
     [%- END %]
20
     <th class="listheading" align="center"><input type="checkbox" id="select_all"></th>
25 21
     <th class="listheading">[% 'Invoice' | $T8 %]</th>
26 22
     <th class="listheading">[%- IF is_vendor %][% 'Vendor' | $T8 %][%- ELSE %][%- LxERP.t8('Customer') %][%- END %]</th>
27 23
     [%- IF is_vendor %]
......
42 38
     <th class="listheading" align="right">[% 'Execution date' | $T8 %]</th>
43 39
    </tr>
44 40
    <tr>
45
     <th class="listheading" colspan="[% IF show_post_payments_button %]3[% ELSE %]2[% END %]">&nbsp;</th>
41
     <th class="listheading" colspan="3">&nbsp;</th>
46 42
     <th class="listheading">[% 'IBAN' | $T8 %]</th>
47 43
     <th class="listheading">[% 'BIC' | $T8 %]</th>
48 44
     <th class="listheading">[% 'IBAN' | $T8 %]</th>
......
53 49
        [% L.date_tag('set_all_execution_date', '', onchange='set_all_execution_date_fields(this);') %]
54 50
      </th>
55 51
     [%- ELSE %]
56
      <th class="listheading" colspan="4">&nbsp;</th>
52
      <th class="listheading" colspan="[% IF vc == 'customer' %]7[% ELSE %]6[% END %]">&nbsp;</th>
57 53
     [%- END %]
58 54
    </tr>
59 55

  
60 56
    [%- FOREACH item = export.items %]
61
     <tr class="listrow[% loop.count % 2 %]">
62
      [%- IF show_post_payments_button %]
63
       <input type="hidden" name="items[+].id" value="[% HTML.escape(item.id) %]">
64
       <input type="hidden" name="items[].sepa_export_id" value="[% HTML.escape(item.sepa_export_id) %]">
65
       <td align="center">
66
        [%- UNLESS item.executed %]
67
        <input type="checkbox" name="items[].selected" value="1">
68
        [%- END %]
69
       </td>
70
      [%- END %]
57
     <tr class="listrow">
58
      <td align="center">
59
       [%- IF (show_post_payments_button && !item.executed) || (!show_post_payments_button && item.executed) %]
60
        [% L.hidden_tag("items[+].id", item.id) %]
61
        [% L.hidden_tag("items[].sepa_export_id", item.sepa_export_id) %]
62
        [% L.checkbox_tag("ids[]", value=item.id) %]
63
       [%- END %]
64
      </td>
71 65
      <td>
72 66
       <a href="[% IF item.invoice %][% iris %][% ELSE %][% arap %][% END %].pl?action=edit&type=invoice&id=[% IF is_vendor %][% HTML.url(item.ap_id) %][% ELSE %][% HTML.url(item.ar_id) %][% END %]">[% HTML.escape(item.invnumber) %]</a>
73 67
      </td>
......
98 92
   </table>
99 93
  </p>
100 94

  
101
  <p><hr></p>
102

  
103
  [%- IF show_post_payments_button %]
104
  <p>
105
   <input type="submit" class="submit" name="action_bank_transfer_post_payments" value="[% 'Post payments' | $T8 %]">
106
  </p>
107

  
108 95
  <script type="text/javascript">
109 96
   <!--
110 97
    function set_all_execution_date_fields(input) {
......
115 102
    }
116 103

  
117 104
    $(function() {
118
      $("#select_all").checkall('INPUT[name="items[].selected"]');
105
      $("#select_all").checkall('INPUT[name="ids[]"]');
119 106
    });
120 107
     -->
121 108
  </script>
122 109

  
123
  [%- ELSE %]
124
   [%- SET has_executed = 0;
125
       FOREACH item = export.items;
126
         IF item.executed;
127
           SET has_executed = 1;
128
         END ;
129
       END ;
130
       IF has_executed %]
131
  <p>
132
   <input type="submit" class="submit" name="action_bank_transfer_payment_list_as_pdf" value="[% 'Payment list as PDF' | $T8 %]">
133
  </p>
134

  
135
   [%- FOREACH item = export.items %]
136
    [%- IF item.executed %]
137
     <input type="hidden" name="items[+].id" value="[% HTML.escape(item.id) %]">
138
     <input type="hidden" name="items[].export_id" value="[% HTML.escape(item.export_id) %]">
139
    [%- END %]
140
   [%- END %]
141
  [%- END %]
142
  [% END %]
143

  
144 110
     <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
145 111
 </form>
templates/webpages/sepa/bank_transfer_list_bottom.html
2 2
[% USE HTML %]
3 3

  
4 4
[%- IF show_buttons %]
5
 <input type="hidden" name="action" value="dispatcher">
6 5
 <input type="hidden" name="mode" value="multi">
7 6
 <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
8 7

  
9
 <p>
10
  <input type="submit" class="submit" name="action_bank_transfer_download_sepa_xml" value="[% 'SEPA XML download' | $T8 %]">
11
  <input type="submit" class="submit" name="action_bank_transfer_edit" value="[% 'Post payments' | $T8 %]">
12
  <input type="submit" class="submit" name="action_bank_transfer_mark_as_closed_step1" value="[% 'Mark as closed' | $T8 %]">
13
 </p>
14

  
15 8
 <script type="text/javascript">
16 9
  <!--
17 10
    $(function() {
18
      $("#select_all").checkall('INPUT[name="exports[].selected"]');
11
      $("#select_all").checkall('INPUT[name="ids[]"]');
19 12
    });
20 13
    -->
21 14
 </script>
templates/webpages/sepa/bank_transfer_list_top.html
1
<form action="sepa.pl" method="post">
1
<form action="sepa.pl" method="post" id="form">
templates/webpages/sepa/bank_transfer_mark_as_closed_step1.html
1
[%- USE T8 %]
2
[% USE HTML %]
3
<h1>[% title %]</h1>
4

  
5
 <form action="sepa.pl" method="post">
6
  <p>
7
   [%- IF vc == 'vendor' %]
8
    [%- 'Do you really want to close the following SEPA exports? No payment will be recorded for bank transfers that haven\'t been marked as executed yet.' | $T8 %]
9
   [%- ELSE %]
10
    [%- 'Do you really want to close the following SEPA exports? No payment will be recorded for bank collections that haven\'t been marked as executed yet.' | $T8 %]
11
   [%- END %]
12
  </p>
13

  
14
  <p>
15
   [% 'SEPA exports:' | $T8 %]
16
   [%- FOREACH id = OPEN_EXPORT_IDS %]
17
    [%- UNLESS loop.first %], [%- END %]
18
    <input type="hidden" name="open_export_ids[]" value="[% HTML.escape(id) %]">
19
    <a href="sepa.pl?action=bank_transfer_edit&id=[% HTML.url(id) %]&vc=[% HTML.url(vc) %]">[% HTML.escape(id) %]</a>
20
   [%- END %]
21
  </p>
22

  
23
  <p>
24
   <input type="submit" class="submit" name="action_bank_transfer_mark_as_closed_step2" value="[% 'Mark as closed' | $T8 %]">
25
   <input type="button" class="submit" value="[% 'Back' | $T8 %]" onclick="history.back()">
26
  </p>
27

  
28
  <input type="hidden" name="action" value="dispatcher">
29
  <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
30
 </form>
31

  
templates/webpages/sepa/bank_transfer_search.html
4 4
[%- USE L %]
5 5
<h1>[% title %]</h1>
6 6

  
7
 <form action="sepa.pl" method="post">
7
 <form action="sepa.pl" method="post" id="form">
8 8
  <p>
9 9
   <table>
10 10
    <tr>
......
83 83
   </table>
84 84
  </p>
85 85

  
86
  <p>
87
   <input type="hidden" name="action" value="dispatcher">
88 86
   <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
89
   <input type="submit" class="submit" name="action_bank_transfer_list" value="[% 'Continue' | $T8 %]">
90
  </p>
91 87
 </form>

Auch abrufbar als: Unified diff