X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fsepa.pl;h=ca4ad0aa1add784eb731e6e02d3c6e13971ab475;hb=0aab038387d45ae06b77892e0ea60f955bec22d6;hp=7218846a97fbadc47d671a3bbb430bebb45fba2b;hpb=a7b17d8cf379dfc5f34bb3179537148d0a986786;p=kivitendo-erp.git diff --git a/bin/mozilla/sepa.pl b/bin/mozilla/sepa.pl index 7218846a9..ca4ad0aa1 100755 --- a/bin/mozilla/sepa.pl +++ b/bin/mozilla/sepa.pl @@ -102,10 +102,11 @@ sub bank_transfer_create { my $arap_id = $vc eq 'customer' ? 'ar_id' : 'ap_id'; my $invoices = SL::SEPA->retrieve_open_invoices(vc => $vc); - # load all open invoices (again), but grep out the ones that were selected with checkboxes beforehand ($_->selected). At this stage we again have all the invoice information, including dropdown with payment_type options - # all the information from retrieve_open_invoices is then ADDED to what was passed via @{ $form->{bank_transfers} } - # parse amount from the entry in the form, but take skonto_amount from PT again - # the map inserts the values of invoice_map directly into the array of hashes + # Load all open invoices (again), but grep out the ones that were selected with checkboxes beforehand ($_->selected). + # At this stage we again have all the invoice information, including dropdown with payment_type options. + # All the information from retrieve_open_invoices is then ADDED to what was passed via @{ $form->{bank_transfers} }. + # Parse amount from the entry in the form, but take skonto_amount from PT again. + # The map inserts the values of invoice_map directly into the array of hashes. my %selected_ids = map { ($_ => 1) } @{ $form->{ids} || [] }; my %invoices_map = map { $_->{id} => $_ } @{ $invoices }; my @bank_transfers = @@ -748,7 +749,7 @@ sub setup_sepa_edit_transfer_action_bar { accesskey => 'enter', tooltip => t8('Post payments for selected invoices'), checks => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ], - only_if => $params{show_post_payments_button}, + disabled => $params{show_post_payments_button} ? undef : t8('All payments have already been posted.'), ], action => [ t8('Payment list'), @@ -756,7 +757,7 @@ sub setup_sepa_edit_transfer_action_bar { accesskey => 'enter', tooltip => t8('Download list of payments as PDF'), checks => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ], - not_if => $params{show_post_payments_button}, + disabled => $params{show_post_payments_button} ? t8('All payments must be posted before the payment list can be downloaded.') : undef, ], ); }