Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ba1fb1a7

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID ba1fb1a762516678ff167c264e46dd84bcd21be9
  • Vorgänger 9c9e5cc5
  • Nachfolger 52600888

SEPA: Ausführungsdatum aus Fälligkeitsdatum übernehmen

Unterschiede anzeigen:

bin/mozilla/sepa.pl
53 53

  
54 54
  my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx');
55 55
  my %translations     = map { ( ($_->{language_id} || 'default') => $_->{translation} ) } @{ $translation_list };
56
  my $current_date     = DateTime->today_local;
56 57

  
57 58
  foreach my $invoice (@{ $invoices }) {
58 59
    my $prefix                    = $translations{ $invoice->{language_id} } || $translations{default} || $::locale->text('Invoice');
......
129 130
    $form->error($locale->text('You have selected none of the invoices.'));
130 131
  }
131 132

  
133
  my $current_date = DateTime->today_local;
134

  
135
  foreach my $item1 (@bank_transfers) {
136
    if ($vc eq 'customer' && !$form->{confirmation}) {
137
      $item1->{requested_execution_date} = $invoices_map{ $item1->{id} }->{duedate} if DateTime->from_kivitendo($invoices_map{ $item1->{id} }->{duedate}) > $current_date;
138
    }
139
  }
140

  
132 141
  my $total_trans = sum map { $_->{open_amount} } @bank_transfers;
133 142

  
134 143
  my ($vc_bank_info);
templates/webpages/sepa/bank_transfer_create.html
124 124
      </td>
125 125
      <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>
126 126
      <td nowrap>
127
	[%- IF !is_vendor %]
128
        [% L.date_tag('bank_transfers[].requested_execution_date', bank_transfer.requested_execution_date, readonly => 1) %]
129
	[%- ELSE %]
127 130
        [% L.date_tag('bank_transfers[].requested_execution_date', bank_transfer.requested_execution_date) %]
131
	[%- END %]
128 132
      </td>
129 133
     </tr>
130 134
    [%- END %]

Auch abrufbar als: Unified diff