Revision 60b170eb
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
SL/SEPA.pm | ||
---|---|---|
11 | 11 |
use SL::DB; |
12 | 12 |
use SL::Locale::String qw(t8); |
13 | 13 |
use DateTime; |
14 |
use Carp; |
|
14 | 15 |
|
15 | 16 |
sub retrieve_open_invoices { |
16 | 17 |
$main::lxdebug->enter_sub(); |
... | ... | |
291 | 292 |
$main::lxdebug->leave_sub(); |
292 | 293 |
} |
293 | 294 |
|
295 |
sub undo_export { |
|
296 |
$main::lxdebug->enter_sub(); |
|
297 |
|
|
298 |
my $self = shift; |
|
299 |
my %params = @_; |
|
300 |
|
|
301 |
Common::check_params(\%params, qw(id)); |
|
302 |
|
|
303 |
my $sepa_export = SL::DB::Manager::SepaExport->find_by(id => $params{id}); |
|
304 |
|
|
305 |
croak "Not a valid SEPA Export id: $params{id}" unless $sepa_export; |
|
306 |
croak "Cannot undo closed exports." if $sepa_export->closed; |
|
307 |
croak "Cannot undo executed exports." if $sepa_export->executed; |
|
308 |
|
|
309 |
die "Could not undo $sepa_export->id" if !$sepa_export->delete(); |
|
310 |
|
|
311 |
$main::lxdebug->leave_sub(); |
|
312 |
} |
|
313 |
|
|
294 | 314 |
sub list_exports { |
295 | 315 |
$main::lxdebug->enter_sub(); |
296 | 316 |
|
... | ... | |
525 | 545 |
} |
526 | 546 |
|
527 | 547 |
1; |
548 |
|
|
549 |
|
|
550 |
__END__ |
|
551 |
|
|
552 |
=head1 NAME |
|
553 |
|
|
554 |
SL::SEPA - Base class for SEPA objects |
|
555 |
|
|
556 |
=head1 SYNOPSIS |
|
557 |
|
|
558 |
# get all open invoices we like to pay via SEPA |
|
559 |
my $invoices = SL::SEPA->retrieve_open_invoices(vc => 'vendor'); |
|
560 |
|
|
561 |
# add some IBAN and purposes for open transaction |
|
562 |
# and assign this to a SEPA export |
|
563 |
my $id = SL::SEPA->create_export('employee' => $::myconfig{login}, |
|
564 |
'bank_transfers' => \@bank_transfers, |
|
565 |
'vc' => 'vendor'); |
|
566 |
|
|
567 |
=head1 DESCRIPTIONS |
|
568 |
|
|
569 |
This is the base class for SEPA. SEPA and the underlying directories |
|
570 |
(SEPA::XML etc) are used to genereate valid XML files for the SEPA |
|
571 |
(Single European Payment Area) specification and offers this structure |
|
572 |
as a download via a xml file. |
|
573 |
|
|
574 |
An export can have one or more transaction which have to |
|
575 |
comply to the specification (IBAN, BIC, amount, purpose, etc). |
|
576 |
|
|
577 |
Furthermore kivitendo sepa exports have two |
|
578 |
valid states: Open or closed and executed or not executed. |
|
579 |
|
|
580 |
The state closed can be set via a user interface and the |
|
581 |
state executed is automatically assigned if the action payment |
|
582 |
is triggered. |
|
583 |
|
|
584 |
=head1 FUNCTIONS |
|
585 |
|
|
586 |
=head2 C<undo_export> $sepa_export_id |
|
587 |
|
|
588 |
Needs a valid sepa_export id and deletes the sepa export if |
|
589 |
the state of the export is neither executed nor closed. |
|
590 |
Returns undef if the deletion was successfully. |
|
591 |
Otherwise the function just dies with a short notice of the id. |
|
592 |
|
|
593 |
=cut |
|
594 |
|
|
595 |
|
|
596 |
|
|
597 |
|
bin/mozilla/sepa.pl | ||
---|---|---|
607 | 607 |
$main::lxdebug->leave_sub(); |
608 | 608 |
} |
609 | 609 |
|
610 |
sub bank_transfer_undo_sepa_xml { |
|
611 |
$main::lxdebug->enter_sub(); |
|
612 |
|
|
613 |
my $form = $main::form; |
|
614 |
my $locale = $main::locale; |
|
615 |
|
|
616 |
map { SL::SEPA->undo_export('id' => $_); } @{ $form->{ids} || [] }; |
|
617 |
|
|
618 |
$form->{title} = $locale->text('Undo SEPA exports'); |
|
619 |
$form->header(); |
|
620 |
$form->show_generic_information($locale->text('The selected exports have been undone.')); |
|
621 |
|
|
622 |
$main::lxdebug->leave_sub(); |
|
623 |
} |
|
624 |
|
|
610 | 625 |
sub dispatcher { |
611 | 626 |
my $form = $main::form; |
612 | 627 |
|
613 | 628 |
foreach my $action (qw(bank_transfer_create bank_transfer_edit bank_transfer_list |
614 | 629 |
bank_transfer_post_payments bank_transfer_download_sepa_xml |
615 | 630 |
bank_transfer_mark_as_closed_step1 bank_transfer_mark_as_closed_step2 |
616 |
bank_transfer_payment_list_as_pdf)) { |
|
631 |
bank_transfer_payment_list_as_pdf bank_transfer_undo_sepa_xml)) {
|
|
617 | 632 |
if ($form->{"action_${action}"}) { |
618 | 633 |
call_sub($action); |
619 | 634 |
return; |
... | ... | |
697 | 712 |
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 | 713 |
: 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 | 714 |
], |
715 |
action => [ |
|
716 |
t8('Undo SEPA exports'), |
|
717 |
submit => [ '#form', { action => 'bank_transfer_undo_sepa_xml' } ], |
|
718 |
checks => [ [ 'kivi.check_if_entries_selected', '[name="ids[]"]' ] ], |
|
719 |
confirm => [ t8('Do you really want to undo the selected SEPA exports? You have to reassign the export again.') ], |
|
720 |
], |
|
700 | 721 |
], # end of combobox "Actions" |
701 | 722 |
); |
702 | 723 |
} |
locale/de/all | ||
---|---|---|
991 | 991 |
'Do you really want to delete this record template?' => 'Wollen Sie diese Belegvorlage wirklich löschen?', |
992 | 992 |
'Do you really want to revert to this version?' => 'Wollen Sie wirklich auf diese Version zurücksetzen?', |
993 | 993 |
'Do you really want to save?' => 'Wollen Sie wirklich speichern?', |
994 |
'Do you really want to undo the selected SEPA exports? You have to reassign the export again.' => 'Möchten Sie wirklich die ausgewählten SEPA-Exports rückgängig machen? Der Export muss anschließend neu erzeugt werden.', |
|
994 | 995 |
'Do you really want to unimport the selected documents?' => 'Wollen Sie wirklich diese Dateien an die Quelle zurückgeben?', |
995 | 996 |
'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?', |
996 | 997 |
'Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?' => 'Wollen Sie diese Lieferadresse in den neuen Lieferantenauftrag übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?', |
... | ... | |
3107 | 3108 |
'The selected currency' => 'Die ausgewählte Währung', |
3108 | 3109 |
'The selected database is still configured for client "#1". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?' => 'Die auswählte Datenbank ist noch für Mandant "#1" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?', |
3109 | 3110 |
'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.', |
3111 |
'The selected exports have been undone.' => 'Die ausgwählten Exporte wurden rückgängig gemacht.', |
|
3110 | 3112 |
'The selected warehouse does not exist.' => 'Das ausgewählte Lager existiert nicht.', |
3111 | 3113 |
'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder in ihm wurden keine zu den Sucheinstellungen passenden eingelagerten Artikel gefunden.', |
3112 | 3114 |
'The session has expired. Please log in again.' => 'Die Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.', |
... | ... | |
3374 | 3376 |
'UStVa Einstellungen' => 'UStVa Einstellungen', |
3375 | 3377 |
'Unbalanced Ledger' => 'Bilanzfehler', |
3376 | 3378 |
'Unchecked custom variables will not appear in orders and invoices.' => 'Unmarkierte Variablen werden für diesen Artikel nicht in Aufträgen und Rechnungen angezeigt.', |
3379 |
'Undo SEPA exports' => 'SEPA-Exporte rückgängig machen', |
|
3377 | 3380 |
'Unfinished follow-ups' => 'Nicht erledigte Wiedervorlagen', |
3378 | 3381 |
'Unfortunately you have no warehouse defined.' => 'Leider, gibt es kein Lager in diesem Mandanten.', |
3379 | 3382 |
'Unimport all' => 'Alle zurück zur Quelle', |
Auch abrufbar als: Unified diff
SEPA-Export rückgängig machen
Noch nicht ausgeführte oder geschloßene SEPA-XML Exports
können wieder rückgängig gemacht werden, sodass der Anwender
hier die Chance hat Metadaten für die Banküberweisungen, z.B. IBAN
oder andere Fehleinträge, z.B Betrag, Termin erneut zu setzen.