use SL::ReportGenerator;
require "bin/mozilla/common.pl";
+require "bin/mozilla/drafts.pl";
require "bin/mozilla/reportgenerator.pl";
1;
$auth->assert('general_ledger');
+ return $lxdebug->leave_sub() if (load_draft_maybe());
+
$form->{title} = "Add";
$form->{callback} = "gl.pl?action=add" unless $form->{callback};
. qq|"> |;
} else {
+ if ($form->{draft_id}) {
+ my $remove_draft_checked = 'checked' if ($form->{remove_draft});
+ print qq|<p>\n|
+ . qq| <input name="remove_draft" id="remove_draft" type="checkbox" class="checkbox" ${remove_draft_checked}>|
+ . qq| <label for="remove_draft">| . $locale->text('Remove Draft') . qq|</label>\n|
+ . qq|</p>\n|;
+ }
+
print qq|
<input class=submit type=submit name=action id=update_button value="| . $locale->text('Update') . qq|">
- <input class=submit type=submit name=action value="| . $locale->text('Post') . qq|">|;
+ <input class=submit type=submit name=action value="| . $locale->text('Post') . 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 "
post_transaction();
+ remove_draft() if $form->{remove_draft};
+
$form->{callback} = build_std_url("action=add", "show_details");
$form->redirect($form->{callback});
'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',
'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',
'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',
'Sep' => 'Sep',
'September' => 'September',
'Show details' => 'Details anzeigen',
+ 'Skip' => 'Überspringen',
'Source' => 'Beleg',
'Storno' => 'Storno',
'Storno Invoice' => 'Stornorechnung',
'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',
'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',
'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',
'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',