From: Moritz Bunkus Date: Fri, 15 May 2009 10:40:24 +0000 (+0000) Subject: Funktion "Als Entwurf speichern" für Dialogbuchungen implementiert. X-Git-Tag: release-2.6.0rc1~52 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=25a5cdc82f6ca252d7030df5bf8e9343e9b53fb4;p=kivitendo-erp.git Funktion "Als Entwurf speichern" für Dialogbuchungen implementiert. Teil eines Fixes für Bug 612. --- diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 185e2a587..0bb5274ec 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -41,6 +41,7 @@ use SL::PE; use SL::ReportGenerator; require "bin/mozilla/common.pl"; +require "bin/mozilla/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; 1; @@ -80,6 +81,8 @@ sub add { $auth->assert('general_ledger'); + return $lxdebug->leave_sub() if (load_draft_maybe()); + $form->{title} = "Add"; $form->{callback} = "gl.pl?action=add" unless $form->{callback}; @@ -1292,9 +1295,20 @@ $follow_ups_block . qq|"> |; } else { + if ($form->{draft_id}) { + my $remove_draft_checked = 'checked' if ($form->{remove_draft}); + print qq|

\n| + . qq| | + . qq| \n| + . qq|

\n|; + } + print qq| - |; + | + . NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'), '-class' => 'submit')) + . $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) + . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]); } print " @@ -1519,6 +1533,8 @@ sub post { post_transaction(); + remove_draft() if $form->{remove_draft}; + $form->{callback} = build_std_url("action=add", "show_details"); $form->redirect($form->{callback}); diff --git a/locale/de/gl b/locale/de/gl index cae096396..fc9492b89 100644 --- a/locale/de/gl +++ b/locale/de/gl @@ -95,12 +95,14 @@ $self->{texts} = { 'Dec' => 'Dez', 'December' => 'Dezember', 'Delete' => 'Löschen', + 'Delete drafts' => 'Entwürfe löschen', 'Delivery Order' => 'Lieferschein', 'Department' => 'Abteilung', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', 'Description' => 'Beschreibung', 'Description missing!' => 'Beschreibung fehlt.', 'Directory' => 'Verzeichnis', + 'Draft saved.' => 'Entwurf gespeichert.', 'Dunning' => 'Mahnung', 'ELSE' => 'Zusatz', 'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten', @@ -189,6 +191,7 @@ $self->{texts} = { 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', 'Reference' => 'Referenz', 'Reference missing!' => 'Referenz fehlt!', + 'Remove Draft' => 'Entwurf löschen', 'Reports' => 'Berichte', 'Request quotation' => 'Preisanfrage', 'Revenue' => 'Erlöskonto', @@ -198,6 +201,7 @@ $self->{texts} = { 'Sales Invoice' => 'Rechnung', 'Sales Order' => 'Kundenauftrag', 'Sales quotation' => 'Angebot', + 'Save draft' => 'Entwurf speichern', 'Select a Customer' => 'Endkunde auswählen', 'Select a customer' => 'Einen Kunden auswählen', 'Select a part' => 'Artikel auswählen', @@ -205,6 +209,7 @@ $self->{texts} = { 'Sep' => 'Sep', 'September' => 'September', 'Show details' => 'Details anzeigen', + 'Skip' => 'Überspringen', 'Source' => 'Beleg', 'Storno' => 'Storno', 'Storno Invoice' => 'Stornorechnung', @@ -285,15 +290,20 @@ $self->{subs} = { 'cov_selection_internal' => 'cov_selection_internal', 'create_subtotal_row' => 'create_subtotal_row', 'delete' => 'delete', + 'delete_drafts' => 'delete_drafts', 'delivery_customer_selection' => 'delivery_customer_selection', 'display_form' => 'display_form', 'display_rows' => 'display_rows', + 'dont_load_draft' => 'dont_load_draft', + 'draft_action_dispatcher' => 'draft_action_dispatcher', 'edit' => 'edit', 'form_footer' => 'form_footer', 'form_header' => 'form_header', 'format_dates' => 'format_dates', 'generate_report' => 'generate_report', 'gl_transaction' => 'gl_transaction', + 'load_draft' => 'load_draft', + 'load_draft_maybe' => 'load_draft_maybe', 'mark_as_paid_common' => 'mark_as_paid_common', 'part_selection_internal' => 'part_selection_internal', 'post' => 'post', @@ -301,6 +311,7 @@ $self->{subs} = { 'post_transaction' => 'post_transaction', 'prepare_transaction' => 'prepare_transaction', 'reformat_numbers' => 'reformat_numbers', + 'remove_draft' => 'remove_draft', 'report_generator_back' => 'report_generator_back', 'report_generator_dispatcher' => 'report_generator_dispatcher', 'report_generator_do' => 'report_generator_do', @@ -309,6 +320,7 @@ $self->{subs} = { 'report_generator_set_default_sort' => 'report_generator_set_default_sort', 'retrieve_partunits' => 'retrieve_partunits', 'sales_invoice' => 'sales_invoice', + 'save_draft' => 'save_draft', 'search' => 'search', 'select_part' => 'select_part', 'select_part_internal' => 'select_part_internal', @@ -324,10 +336,13 @@ $self->{subs} = { 'debitorenbuchung' => 'ar_transaction', 'weiter' => 'continue', 'löschen' => 'delete', + 'entwürfe_löschen' => 'delete_drafts', 'dialogbuchung' => 'gl_transaction', 'neue_ware' => 'new_part', 'buchen' => 'post', 'rechnung' => 'sales_invoice', + 'entwurf_speichern' => 'save_draft', + 'Überspringen' => 'skip', 'storno' => 'storno', 'erneuern' => 'update', 'einkaufsrechnung' => 'vendor_invoice',