Revision 8ae5d46d
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
43 | 43 |
use SL::DB::Tax; |
44 | 44 |
use SL::FU; |
45 | 45 |
use SL::GL; |
46 |
use SL::Helper::Flash qw(flash); |
|
46 |
use SL::Helper::Flash qw(flash flash_later);
|
|
47 | 47 |
use SL::IS; |
48 | 48 |
use SL::ReportGenerator; |
49 | 49 |
use SL::DBUtils qw(selectrow_query selectall_hashref_query); |
... | ... | |
1398 | 1398 |
1; |
1399 | 1399 |
}) or do { die SL::DB->client->error }; |
1400 | 1400 |
|
1401 |
if ($form->{callback} =~ /BankTransaction/ && $form->{bt_id}) { |
|
1402 |
print $form->redirect_header($form->{callback}); |
|
1403 |
$form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}); |
|
1404 |
} elsif ($::instance_conf->get_gl_add_doc && $::instance_conf->get_doc_storage) { |
|
1405 |
my $add_doc_url = build_std_url("script=gl.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs'); |
|
1406 |
print $form->redirect_header($add_doc_url); |
|
1407 |
$form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}); |
|
1408 |
} |
|
1409 |
|
|
1410 |
# remove or clarify |
|
1411 |
undef($form->{callback}); |
|
1412 | 1401 |
$main::lxdebug->leave_sub(); |
1413 | 1402 |
} |
1414 | 1403 |
|
... | ... | |
1434 | 1423 |
)->webdav_path; |
1435 | 1424 |
} |
1436 | 1425 |
|
1437 |
$form->{callback} = build_std_url("action=add", "show_details"); |
|
1438 |
$form->redirect($::locale->text("General ledger transaction '#1' posted", $form->{reference})); |
|
1426 |
my $msg = $::locale->text("General ledger transaction '#1' posted (ID: #2)", $form->{reference}, $form->{id}); |
|
1427 |
if ($form->{callback} =~ /BankTransaction/ && $form->{bt_id}) { |
|
1428 |
$form->redirect($msg); |
|
1429 |
|
|
1430 |
} elsif ($::instance_conf->get_gl_add_doc && $::instance_conf->get_doc_storage) { |
|
1431 |
# Redirect with callback containing a fragment does not work (by now) |
|
1432 |
# because the callback info is stored in the session an parsing the |
|
1433 |
# callback parameters does not support fragments (see SL::Form::redirect). |
|
1434 |
# So use flash_later for the message and redirect_headers for redirecting. |
|
1435 |
my $add_doc_url = build_std_url("script=gl.pl", 'action=edit', 'id=' . E($form->{id}), 'fragment=ui-tabs-docs'); |
|
1436 |
SL::Helper::Flash::flash_later('info', $msg); |
|
1437 |
print $form->redirect_header($add_doc_url); |
|
1438 |
$::dispatcher->end_request; |
|
1439 |
|
|
1440 |
} else { |
|
1441 |
$form->{callback} = build_std_url("action=add", "show_details"); |
|
1442 |
$form->redirect($msg); |
|
1443 |
} |
|
1439 | 1444 |
|
1440 | 1445 |
$main::lxdebug->leave_sub(); |
1441 | 1446 |
} |
locale/de/all | ||
---|---|---|
1583 | 1583 |
'GL Transactions' => 'Dialogbuchungen', |
1584 | 1584 |
'GL search' => 'FiBu Suche', |
1585 | 1585 |
'GL template suggestions' => 'Vorschlag Dialogbuchung', |
1586 |
'GL transaction posted.' => 'Dialogbuchung verbucht.', |
|
1587 | 1586 |
'GL transactions changeable' => 'Änderbarkeit von Dialogbuchungen', |
1588 | 1587 |
'GLN' => 'GLN', |
1589 | 1588 |
'Gegenkonto' => 'Gegenkonto', |
... | ... | |
1594 | 1593 |
'General Ledger Transaction' => 'Dialogbuchung', |
1595 | 1594 |
'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr', |
1596 | 1595 |
'General ledger corrections' => 'Korrekturen im Hauptbuch', |
1597 |
'General ledger transaction \'#1\' posted' => 'Dialogbuchung \'#1\' verbucht.',
|
|
1596 |
'General ledger transaction \'#1\' posted (ID: #2)' => 'Dialogbuchung \'#1\' verbucht (Buchungsnummer: #2)',
|
|
1598 | 1597 |
'General ledger transactions can only be changed on the day they are posted.' => 'Dialogbuchungen können nur am Buchungstag geändert werden.', |
1599 | 1598 |
'General settings' => 'Allgemeine Einstellungen', |
1600 | 1599 |
'Generate and print sales delivery orders' => 'Erzeuge und drucke Lieferscheine', |
locale/en/all | ||
---|---|---|
1583 | 1583 |
'GL Transactions' => '', |
1584 | 1584 |
'GL search' => '', |
1585 | 1585 |
'GL template suggestions' => '', |
1586 |
'GL transaction posted.' => '', |
|
1587 | 1586 |
'GL transactions changeable' => '', |
1588 | 1587 |
'GLN' => '', |
1589 | 1588 |
'Gegenkonto' => '', |
... | ... | |
1594 | 1593 |
'General Ledger Transaction' => '', |
1595 | 1594 |
'General ledger and cash' => '', |
1596 | 1595 |
'General ledger corrections' => '', |
1597 |
'General ledger transaction \'#1\' posted' => '', |
|
1596 |
'General ledger transaction \'#1\' posted (ID: #2)' => '',
|
|
1598 | 1597 |
'General ledger transactions can only be changed on the day they are posted.' => '', |
1599 | 1598 |
'General settings' => '', |
1600 | 1599 |
'Generate and print sales delivery orders' => '', |
Auch abrufbar als: Unified diff
Dialogbuchung: Redirects nach Buchen aufgeräumt …
- nicht in der transaction-subroutine, sondern in der Aktion, wo auch das
redirect für den "Normal-Fall" schon war. Damit sind die Redirects an
einer Stelle.
- kein redirect nach redirect_header. redirect schickt ruft auch
redirect_header auf, prüft aber, ob schon ein header geschickt wurde
und bricht dann ab.
- Einheitliche Info-Ausgabe.
Hinweis: callback und redirect mit Fragment geht (noch) nicht, da bei
redirect die callback-Parameter recht simple geparsed werden, um diese
in der Session zu hinterlegen. Das berücksichtigt das Fragment nicht.