--- /dev/null
+#======================================================================
+# LX-Office ERP
+#
+#======================================================================
+#
+# Saving and loading drafts
+#
+#======================================================================
+
+package Drafts;
+
+use YAML;
+
+use SL::Common;
+use SL::DBUtils;
+
+sub get_module {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ my ($module, $submodule);
+
+ $module = $form->{"script"};
+ $module =~ s/\.pl$//;
+ if (grep({ $module eq $_ } qw(is ir ar ap))) {
+ $submodule = "invoice";
+ } else {
+ $submodule = "unknown";
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return ($module, $submodule);
+}
+
+sub save {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $draft_id, $draft_description) = @_;
+
+ my ($dbh, $sth, $query, %saved, @dont_save, $dumped);
+
+ $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($module, $submodule) = $self->get_module($form);
+
+ $query = "SELECT COUNT(*) FROM drafts WHERE id = ?";
+ my ($res) = selectrow_query($form, $dbh, $query, $draft_id);
+ if (!$res) {
+ $draft_id = $module . "-" . $submodule . "-" . Common::unique_id();
+ $query = "INSERT INTO drafts (id, module, submodule) VALUES (?, ?, ?)";
+ do_query($form, $dbh, $query, $draft_id, $module, $submodule);
+ }
+
+ @dont_save = qw(login password path action);
+ map({ $saved{$_} = $form->{$_};
+ delete($form->{$_}); } @dont_save);
+ $dumped = YAML::Dump($form);
+ map({ $form->{$_} = $saved{$_}; } @dont_save);
+
+ $query =
+ qq|UPDATE drafts SET description = ?, form = ?, employee_id = | .
+ qq| (SELECT id FROM employee WHERE login = ?) | .
+ qq|WHERE id = ?|;
+
+ do_query($form, $dbh, $query, $draft_description, $dumped,
+ $form->{login}, $draft_id);
+
+ $dbh->commit();
+ $dbh->disconnect();
+
+ $form->{draft_id} = $draft_id;
+ $form->{draft_description} = $draft_description;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub load {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $draft_id) = @_;
+
+ my ($dbh, $sth, $query, @values);
+
+ $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|SELECT id, description, form FROM drafts WHERE id = ?|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute($draft_id) || $form->dberror("$query ($draft_id)");
+
+ my @values;
+ if (my $ref = $sth->fetchrow_hashref()) {
+ @values = ($ref->{form}, $ref->{id}, $ref->{description});
+ }
+ $sth->finish();
+
+ do_query($form, $dbh, "DELETE FROM drafts WHERE id = ?", $draft_id);
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return @values;
+}
+
+sub remove {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $draft_id) = @_;
+
+ return $main::lxdebug->leave_sub() unless ($draft_id);
+
+ my ($dbh, $sth, $query, @values);
+
+ $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM drafts WHERE id = ?|;
+ do_query($form, $dbh, $query, $draft_id);
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+}
+
+sub list {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($dbh, $sth, $query, @values);
+
+ $dbh = $form->dbconnect($myconfig);
+
+ my ($module, $submodule) = $self->get_module($form);
+
+ my @list = ();
+ $query =
+ qq|SELECT d.id, d.description, d.itime::timestamp(0) AS itime, | .
+ qq| e.name AS employee_name | .
+ qq|FROM drafts d | .
+ qq|LEFT JOIN employee e ON d.employee_id = e.id | .
+ qq|WHERE (d.module = ?) AND (d.submodule = ?) | .
+ qq|ORDER BY d.itime|;
+ my @values = ($module, $submodule);
+
+ $sth = $dbh->prepare($query);
+ $sth->execute(@values) ||
+ $form->dberror($query . " (" . join(", ", @values) . ")");
+
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push(@list, $ref);
+ }
+ $sth->finish();
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return @list;
+}
+
+1;
require "$form->{path}/arap.pl";
require "bin/mozilla/common.pl";
+require "bin/mozilla/drafts.pl";
1;
sub add {
$lxdebug->enter_sub();
+ return $lxdebug->leave_sub() if (load_draft_maybe());
+
$form->{title} = "Add";
$form->{callback} =
<input type=hidden name=locked value=$form->{locked}>
<input type=hidden name=title value="$title">
+| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
+
<table width=100%>
<tr class=listtop>
<th class=listtop>$form->{title}</th>
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=login value=$form->{login}>
<input type=hidden name=password value=$form->{password}>
+|
+. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
+. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
+. qq|
<br>
|;
} elsif (($transdate > $closedto) && !$form->{id}) {
print qq|
<input class=submit type=submit name=action value="|
- . $locale->text('Post') . qq|">|;
+ . $locale->text('Post') . qq|"> | .
+ NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
+ '-class' => 'submit'));
}
# button for saving history
if($form->{id} ne "") {
$form->{taxkey} = $taxkey;
$form->{id} = 0 if $form->{postasnew};
- # saving the history
- if(!exists $form->{addition} && $form->{id} ne "") {
- $form->{addition} = "POSTED";
- $form->save_history($form->dbconnect(\%myconfig));
- }
- # /saving the history
- $form->redirect($locale->text('Transaction posted!'))
- if (AP->post_transaction(\%myconfig, \%$form));
+ if (AP->post_transaction(\%myconfig, \%$form)) {
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{addition} = "POSTED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+ remove_draft();
+ $form->redirect($locale->text('Transaction posted!'));
+ }
$form->error($locale->text('Cannot post transaction!'));
$lxdebug->leave_sub();
require "$form->{path}/arap.pl";
require "bin/mozilla/common.pl";
+require "bin/mozilla/drafts.pl";
1;
sub add {
$lxdebug->enter_sub();
-
+
+ return $lxdebug->leave_sub() if (load_draft_maybe());
+
# saving the history
if(!exists $form->{addition} && ($form->{id} ne "")) {
$form->{addition} = "ADDED";
<input type=hidden name=locked value=$form->{locked}>
<input type=hidden name=title value="$title">
+| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
+
<table width=100%>
<tr class=listtop>
<th class=listtop>$form->{title}</th>
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=login value=$form->{login}>
<input type=hidden name=password value=$form->{password}>
+|
+. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
+. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
+. qq|
<br>
|;
} else {
if ($transdate > $closedto) {
print qq|<input class=submit type=submit name=action value="|
- . $locale->text('Post') . qq|">|;
+ . $locale->text('Post') . qq|"> | .
+ NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
+ '-class' => 'submit'));
}
}
$form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
+ remove_draft();
$form->redirect($locale->text('Transaction posted!'));
}
$form->error($locale->text('Cannot post transaction!'));
$old_form =~ s|!r|\r|g;
$old_form =~ s|!n|\n|g;
$old_form =~ s|!!|!|g;
- $form = YAML::Load($old_form);
+ my $new_form = YAML::Load($old_form);
+ map({ $form->{$_} = $new_form->{$_}; } keys(%{$new_form}));
$lxdebug->leave_sub();
}
--- /dev/null
+#======================================================================
+# LX-Office ERP
+#
+#======================================================================
+#
+# Saving and loading drafts
+#
+#======================================================================
+
+use SL::Drafts;
+
+require "bin/mozilla/common.pl";
+
+sub save_draft {
+ $lxdebug->enter_sub();
+
+ if (!$form->{draft_id} && !$form->{draft_description}) {
+ restore_form($form->{SAVED_FORM}, 1) if ($form->{SAVED_FORM});
+ $form->{SAVED_FORM} = save_form();
+
+ $form->header();
+ print($form->parse_html_template("drafts/save_new"));
+ return $lxdebug->leave_sub();
+ }
+
+ my ($draft_id, $draft_description) =
+ ($form->{draft_id}, $form->{draft_description});
+
+ restore_form($form->{SAVED_FORM}, 1);
+ delete($form->{SAVED_FORM});
+
+ Drafts->save(\%myconfig, $form, $draft_id, $draft_description);
+
+ $form->{saved_message} = $locale->text("Draft saved.");
+
+ update();
+
+ $lxdebug->leave_sub();
+}
+
+sub remove_draft {
+ $lxdebug->enter_sub();
+
+ Drafts->remove(\%myconfig, $form, $form->{draft_id}) if ($form->{draft_id});
+
+ delete($form->{draft_id});
+ delete($form->{draft_description});
+
+ $lxdebug->leave_sub();
+}
+
+sub load_draft_maybe {
+ $lxdebug->enter_sub();
+
+ $lxdebug->leave_sub() and return 0 if ($form->{DONT_LOAD_DRAFT});
+
+ my ($draft_nextsub) = @_;
+
+ my @drafts = Drafts->list(\%myconfig, $form);
+
+ $lxdebug->leave_sub() and return 0 unless (@drafts);
+
+ $draft_nextsub = "add" unless ($draft_nextsub);
+
+ delete($form->{action});
+ my $saved_form = save_form();
+
+ $form->header();
+ print($form->parse_html_template("drafts/load",
+ { "DRAFTS" => \@drafts,
+ "SAVED_FORM" => $saved_form,
+ "draft_nextsub" => $draft_nextsub }));
+
+ $lxdebug->leave_sub();
+
+ return 1;
+}
+
+sub dont_load_draft {
+ $lxdebug->enter_sub();
+
+ my $draft_nextsub = $form->{draft_nextsub};
+ $draft_nextsub = "add" unless ($form->{draft_nextsub});
+ restore_form($form->{SAVED_FORM}, 1);
+ delete($form->{action});
+ $form->{DONT_LOAD_DRAFT} = 1;
+
+ &{ $draft_nextsub }();
+
+ $lxdebug->leave_sub();
+}
+
+sub load_draft {
+ $lxdebug->enter_sub();
+
+ my ($old_form, $id, $description) = Drafts->load(\%myconfig, $form, $form->{id});
+ if ($old_form) {
+ restore_form($old_form, 1);
+ $form->{draft_id} = $id;
+ $form->{draft_description} = $description;
+ $lxdebug->dump(0, "of", $old_form);
+ }
+
+ update();
+
+ $lxdebug->leave_sub();
+}
+
+1;
require "$form->{path}/io.pl";
require "$form->{path}/arap.pl";
require "$form->{path}/common.pl";
+require "bin/mozilla/drafts.pl";
1;
sub add {
$lxdebug->enter_sub();
+ return $lxdebug->leave_sub() if (load_draft_maybe());
+
$form->{title} = $locale->text('Add Vendor Invoice');
&invoice_links;
<input type=hidden name=storno value=$form->{storno}>
<input type=hidden name=storno_id value=$form->{storno_id}>
+| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
+
<table width=100%>
<tr class=listtop>
<th class=listtop>$form->{title}</th>
if (!$form->{id} && ($invdate > $closedto)) {
print qq| <input class=submit type=submit name=action value="|
- . $locale->text('Post') . qq|">|;
+ . $locale->text('Post') . qq|"> | .
+ NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
+ '-class' => 'submit'));
}
print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=login value=$form->{login}>
<input type=hidden name=password value=$form->{password}>
-|;
+|
+ . $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
+ . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]);
+
# button for saving history
if($form->{id} ne "") {
print qq|
relink_accounts();
- if (IR->post_invoice(\%myconfig, \%$form)){
+ if (IR->post_invoice(\%myconfig, \%$form)){
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{addition} = "POSTED";
$form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
+ remove_draft();
$form->redirect( $locale->text('Invoice')
. " $form->{invnumber} "
. $locale->text('posted!'));
require "$form->{path}/io.pl";
require "$form->{path}/arap.pl";
+require "bin/mozilla/drafts.pl";
1;
sub add {
$lxdebug->enter_sub();
-
+
+ return $lxdebug->leave_sub() if (load_draft_maybe());
+
if ($form->{type} eq "credit_note") {
$form->{title} = $locale->text('Add Credit Note');
<input type=hidden name=storno value=$form->{storno}>
<input type=hidden name=storno_id value=$form->{storno_id}>
-
+| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq|
<table width=100%>
<tr class=listtop>
<input class=submit type=submit name=action value="|
. $locale->text('Print and Post') . qq|">
<input class=submit type=submit name=action value="|
- . $locale->text('Post') . qq|">|;
+ . $locale->text('Post') . qq|"> | .
+ NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
+ '-class' => 'submit'));
}
}
<input type=hidden name=rowcount value=$form->{rowcount}>
<input name=callback type=hidden value="$form->{callback}">
-
+|
+. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
+. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
+. qq|
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=login value=$form->{login}>
<input type=hidden name=password value=$form->{password}>
if (!(IS->post_invoice(\%myconfig, \%$form))) {
$form->error($locale->text('Cannot post invoice!'));
}
+ remove_draft();
# saving the history
if(!exists $form->{addition}) {
$form->{addition} = "PRINTED AND POSTED";
# /saving the history
} else {
- if (IS->post_invoice(\%myconfig, \%$form)){
+ if (IS->post_invoice(\%myconfig, \%$form)){
+ remove_draft();
# saving the history
- if(!exists $form->{addition}) {
+ if(!exists $form->{addition}) {
if($form->{storno}) {
$form->{addition} = "STORNO";
}
####################################\r
2007-02-?? - Version 2.4.2\r
\r
+ - Einkaufs-, Verkaufs-, Debitoren- und Kreditorenrechnungen können\r
+ als Entwurf gespeichert und später weiter bearbeitet werden. Dabei\r
+ werden sie nicht gebucht.\r
- Vorlagenausdruck: Variablen "fax", "phone" und "email" bei\r
Kundenstammdaten werden nun auch als "customerfax",\r
"customerphone" und "customeremail" zur Verfügung gestellt.\r
'Directory' => 'Verzeichnis',
'Discount' => 'Rabatt',
'Done' => 'Fertig',
+ 'Draft saved.' => 'Entwurf gespeichert.',
'Drawing' => 'Zeichnung',
'Driver' => 'Treiber',
'Dropdown Limit' => 'Auswahllistenbegrenzung',
'Employee' => 'Bearbeiter',
'Empty transaction!' => 'Buchung ist leer!',
'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren',
+ 'Enter a description for this new draft.' => 'Geben Sie eine Beschreibung für diesen Entwurf ein.',
'Enter longdescription' => 'Langtext eingeben',
'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Geben Sie Ihre und weitere Währungen mit bis zu drei Buchstaben pro Währung und Währungen durch Doppelpunkte getrennt ein (z.B. EUR:USD:CAD)',
'Equity' => 'Passiva',
'List Pricegroups' => 'Preisgruppen anzeigen',
'List Printer' => 'Drucker anzeigen',
'List Transactions' => 'Buchungsliste',
+ 'Load draft' => 'Entwurf laden',
+ 'Loading a draft will remove it from this list until you click the \'Save Draft\' button again.' => 'Das Laden eines Entwurfs wird ihn aus dieser Liste entfernen, bis Sie erneut auf \'Entwurf Speichern\' klicken.',
'Local Tax Office Preferences' => 'Angaben zum Finanzamt',
'Lock System' => 'System sperren',
'Lockfile created!' => 'System gesperrt!',
'Save and Quotation' => 'Speichern und Angebot',
'Save and RFQ' => 'Speichern und Lieferantenanfrage',
'Save as new' => 'als neu speichern',
+ 'Save draft' => 'Entwurf speichern',
'Screen' => 'Bildschirm',
'Search Dunning' => 'Mahnung suchen',
'Select' => 'auswählen',
'Show details' => 'Details anzeigen',
'Show old dunnings' => 'Alte Mahnungen anzeigen',
'Signature' => 'Unterschrift',
+ 'Skip' => 'Überspringen',
'Skonto' => 'Skonto',
'Skonto Terms' => 'Zahlungsziel Skonto',
'Sold' => 'Verkauft',
'The following Buchungsgruppen have already been created:' => 'Die folgenden Buchungsgruppen wurden bereits angelegt:',
'The following Datasets are not in use and can be deleted' => 'Die folgenden Datenbanken sind nicht in Verwendung und können gelöscht werden',
'The following Datasets need to be updated' => 'Folgende Datenbanken müssen aktualisiert werden',
+ 'The following drafts have been saved and can be loaded.' => 'Die folgenden Entwürfe wurden gespeichert und können geladen werden.',
'The following units are unknown.' => 'Die folgenden Einheiten sind unbekannt.',
'The following units exist already:' => 'Die folgenden Einheiten existieren bereits:',
'The following warnings occured during an upgrade to the document templates:' => 'Die folgenden Warnungen traten während einer Aktualisierung der Dokumentenvorlagen auf:',
'Delete' => 'Löschen',
'Department' => 'Abteilung',
'Description' => 'Beschreibung',
+ 'Draft saved.' => 'Entwurf gespeichert.',
'Due Date' => 'Fälligkeitsdatum',
'Due Date missing!' => 'Fälligkeitsdatum fehlt!',
'ELSE' => 'Zusatz',
'SAVED' => 'Gespeichert',
'SAVED FOR DUNNING' => 'Gespeichert',
'SCREENED' => 'Angezeigt',
+ 'Save draft' => 'Entwurf speichern',
'Select a Customer' => 'Endkunde auswählen',
'Select a part' => 'Artikel auswählen',
'Select a project' => 'Projekt auswählen',
'delete' => 'delete',
'delivery_customer_selection' => 'delivery_customer_selection',
'display_form' => 'display_form',
+ 'dont_load_draft' => 'dont_load_draft',
'edit' => 'edit',
'employee_selection_internal' => 'employee_selection_internal',
'form_footer' => 'form_footer',
'form_header' => 'form_header',
'format_dates' => 'format_dates',
'gl_transaction' => 'gl_transaction',
+ 'load_draft' => 'load_draft',
+ 'load_draft_maybe' => 'load_draft_maybe',
'name_selected' => 'name_selected',
'part_selection_internal' => 'part_selection_internal',
'post' => 'post',
'project_selected' => 'project_selected',
'project_selection_internal' => 'project_selection_internal',
'reformat_numbers' => 'reformat_numbers',
+ 'remove_draft' => 'remove_draft',
'restore_form' => 'restore_form',
'sales_invoice' => 'sales_invoice',
+ 'save_draft' => 'save_draft',
'save_form' => 'save_form',
'search' => 'search',
'select_employee' => 'select_employee',
'kreditorenbuchung_bearbeiten' => 'edit_accounts_payables_transaction',
'buchen' => 'post',
'zahlung_buchen' => 'post_payment',
+ 'entwurf_speichern' => 'save_draft',
+ 'Überspringen' => 'skip',
'erneuern' => 'update',
'als_vorlage_verwenden' => 'use_as_template',
'einkaufsrechnung' => 'vendor_invoice',
'Delete' => 'Löschen',
'Department' => 'Abteilung',
'Description' => 'Beschreibung',
+ 'Draft saved.' => 'Entwurf gespeichert.',
'Due Date' => 'Fälligkeitsdatum',
'Due Date missing!' => 'Fälligkeitsdatum fehlt!',
'ELSE' => 'Zusatz',
'SCREENED' => 'Angezeigt',
'Sales Invoice' => 'Rechnung',
'Salesperson' => 'Verkäufer',
+ 'Save draft' => 'Entwurf speichern',
'Select a Customer' => 'Endkunde auswählen',
'Select a part' => 'Artikel auswählen',
'Select a project' => 'Projekt auswählen',
'delivery_customer_selection' => 'delivery_customer_selection',
'display' => 'display',
'display_form' => 'display_form',
+ 'dont_load_draft' => 'dont_load_draft',
'edit' => 'edit',
'employee_selection_internal' => 'employee_selection_internal',
'form_footer' => 'form_footer',
'form_header' => 'form_header',
'format_dates' => 'format_dates',
'gl_transaction' => 'gl_transaction',
+ 'load_draft' => 'load_draft',
+ 'load_draft_maybe' => 'load_draft_maybe',
'name_selected' => 'name_selected',
'part_selection_internal' => 'part_selection_internal',
'post' => 'post',
'project_selected' => 'project_selected',
'project_selection_internal' => 'project_selection_internal',
'reformat_numbers' => 'reformat_numbers',
+ 'remove_draft' => 'remove_draft',
'restore_form' => 'restore_form',
'sales_invoice' => 'sales_invoice',
+ 'save_draft' => 'save_draft',
'save_form' => 'save_form',
'search' => 'search',
'section_menu' => 'section_menu',
'buchen' => 'post',
'zahlung_buchen' => 'post_payment',
'rechnung' => 'sales_invoice',
+ 'entwurf_speichern' => 'save_draft',
+ 'Überspringen' => 'skip',
'erneuern' => 'update',
'als_vorlage_verwenden' => 'use_as_template',
'ja' => 'yes',
--- /dev/null
+$self->{texts} = {
+ 'ADDED' => 'Hinzugefügt',
+ 'Address' => 'Adresse',
+ 'Customer Number' => 'Kundennummer',
+ 'DELETED' => 'Gelöscht',
+ 'DUNNING STARTED' => 'DUNNING STARTED',
+ 'Draft saved.' => 'Entwurf gespeichert.',
+ 'ELSE' => 'Zusatz',
+ 'Enter longdescription' => 'Langtext eingeben',
+ 'History' => 'Historie',
+ 'MAILED' => 'Gesendet',
+ 'Name' => 'Name',
+ 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
+ 'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden',
+ 'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
+ 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
+ 'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
+ 'PAYMENT POSTED' => 'Rechung gebucht',
+ 'POSTED' => 'Gebucht',
+ 'POSTED AS NEW' => 'Als neu gebucht',
+ 'PRINTED' => 'Gedruckt',
+ 'Part Number' => 'Artikelnummer',
+ 'Part description' => 'Artikelbeschreibung',
+ 'Please enter values' => 'Bitte Werte eingeben',
+ 'Project Number' => 'Projektnummer',
+ 'Project description' => 'Projektbeschreibung',
+ 'SAVED' => 'Gespeichert',
+ 'SAVED FOR DUNNING' => 'Gespeichert',
+ 'SCREENED' => 'Angezeigt',
+ 'Select a Customer' => 'Endkunde auswählen',
+ 'Select a part' => 'Artikel auswählen',
+ 'Select a project' => 'Projekt auswählen',
+ 'Select an employee' => 'Angestellten auswählen',
+ 'Unit' => 'Einheit',
+ 'Value' => 'Wert',
+ 'Variable' => 'Variable',
+ 'bin_list' => 'Lagerliste',
+ 'invoice' => 'Rechnung',
+ 'packing_list' => 'Versandliste',
+ 'pick_list' => 'Entnahmeliste',
+ 'proforma' => 'Proforma',
+ 'purchase_order' => 'Auftrag',
+ 'request_quotation' => 'Angebotsanforderung',
+ 'sales_order' => 'Kundenauftrag',
+ 'sales_quotation' => 'Verkaufsangebot',
+};
+
+$self->{subs} = {
+ 'E' => 'E',
+ 'H' => 'H',
+ 'NTI' => 'NTI',
+ 'Q' => 'Q',
+ 'build_std_url' => 'build_std_url',
+ 'calculate_qty' => 'calculate_qty',
+ 'delivery_customer_selection' => 'delivery_customer_selection',
+ 'dont_load_draft' => 'dont_load_draft',
+ 'employee_selection_internal' => 'employee_selection_internal',
+ 'format_dates' => 'format_dates',
+ 'load_draft' => 'load_draft',
+ 'load_draft_maybe' => 'load_draft_maybe',
+ 'part_selection_internal' => 'part_selection_internal',
+ 'project_selection_internal' => 'project_selection_internal',
+ 'reformat_numbers' => 'reformat_numbers',
+ 'remove_draft' => 'remove_draft',
+ 'restore_form' => 'restore_form',
+ 'save_draft' => 'save_draft',
+ 'save_form' => 'save_form',
+ 'select_employee' => 'select_employee',
+ 'select_employee_internal' => 'select_employee_internal',
+ 'select_part' => 'select_part',
+ 'select_part_internal' => 'select_part_internal',
+ 'set_longdescription' => 'set_longdescription',
+ 'show_history' => 'show_history',
+ 'vendor_selection' => 'vendor_selection',
+ 'entwurf_speichern' => 'save_draft',
+ 'Überspringen' => 'skip',
+};
+
+1;
'Department' => 'Abteilung',
'Description' => 'Beschreibung',
'Discount' => 'Rabatt',
+ 'Draft saved.' => 'Entwurf gespeichert.',
'Due Date' => 'Fälligkeitsdatum',
'E-mail' => 'eMail',
'E-mail address missing!' => 'E-Mail-Adresse fehlt!',
'SAVED FOR DUNNING' => 'Gespeichert',
'SCREENED' => 'Angezeigt',
'Sales Order' => 'Kundenauftrag',
+ 'Save draft' => 'Entwurf speichern',
'Screen' => 'Bildschirm',
'Select a Customer' => 'Endkunde auswählen',
'Select a part' => 'Artikel auswählen',
'delivery_customer_selection' => 'delivery_customer_selection',
'display_form' => 'display_form',
'display_row' => 'display_row',
+ 'dont_load_draft' => 'dont_load_draft',
'e_mail' => 'e_mail',
'edit' => 'edit',
'employee_selection_internal' => 'employee_selection_internal',
'invoice_links' => 'invoice_links',
'invoicetotal' => 'invoicetotal',
'item_selected' => 'item_selected',
+ 'load_draft' => 'load_draft',
+ 'load_draft_maybe' => 'load_draft_maybe',
'name_selected' => 'name_selected',
'new_item' => 'new_item',
'new_license' => 'new_license',
'quotation' => 'quotation',
'reformat_numbers' => 'reformat_numbers',
'relink_accounts' => 'relink_accounts',
+ 'remove_draft' => 'remove_draft',
'request_for_quotation' => 'request_for_quotation',
'restore_form' => 'restore_form',
'sales_invoice' => 'sales_invoice',
+ 'save_draft' => 'save_draft',
'save_form' => 'save_form',
'select_employee' => 'select_employee',
'select_employee_internal' => 'select_employee_internal',
'löschen' => 'delete',
'buchen' => 'post',
'zahlung_buchen' => 'post_payment',
+ 'entwurf_speichern' => 'save_draft',
+ 'Überspringen' => 'skip',
'storno' => 'storno',
'erneuern' => 'update',
'als_vorlage_verwenden' => 'use_as_template',
'Department' => 'Abteilung',
'Description' => 'Beschreibung',
'Discount' => 'Rabatt',
+ 'Draft saved.' => 'Entwurf gespeichert.',
'Due Date' => 'Fälligkeitsdatum',
'Dunning Amount' => 'gemahnter Betrag',
'E-mail' => 'eMail',
'SCREENED' => 'Angezeigt',
'Sales Order' => 'Kundenauftrag',
'Salesperson' => 'Verkäufer',
+ 'Save draft' => 'Entwurf speichern',
'Screen' => 'Bildschirm',
'Select a Customer' => 'Endkunde auswählen',
'Select a part' => 'Artikel auswählen',
'delivery_customer_selection' => 'delivery_customer_selection',
'display_form' => 'display_form',
'display_row' => 'display_row',
+ 'dont_load_draft' => 'dont_load_draft',
'e_mail' => 'e_mail',
'edit' => 'edit',
'employee_selection_internal' => 'employee_selection_internal',
'invoice_links' => 'invoice_links',
'invoicetotal' => 'invoicetotal',
'item_selected' => 'item_selected',
+ 'load_draft' => 'load_draft',
+ 'load_draft_maybe' => 'load_draft_maybe',
'name_selected' => 'name_selected',
'new_item' => 'new_item',
'new_license' => 'new_license',
'quotation' => 'quotation',
'reformat_numbers' => 'reformat_numbers',
'relink_accounts' => 'relink_accounts',
+ 'remove_draft' => 'remove_draft',
'request_for_quotation' => 'request_for_quotation',
'restore_form' => 'restore_form',
'sales_invoice' => 'sales_invoice',
+ 'save_draft' => 'save_draft',
'save_form' => 'save_form',
'select_employee' => 'select_employee',
'select_employee_internal' => 'select_employee_internal',
'druckvorschau' => 'preview',
'drucken' => 'print',
'drucken_und_buchen' => 'print_and_post',
+ 'entwurf_speichern' => 'save_draft',
'lieferadresse' => 'ship_to',
+ 'Überspringen' => 'skip',
'storno' => 'storno',
'erneuern' => 'update',
'als_vorlage_verwenden' => 'use_as_template',
--- /dev/null
+-- @tag: drafts
+-- @description: Neue Tabelle zum Speichern von Entwürfen
+-- @depends: release_2_4_1
+CREATE TABLE drafts (
+ id varchar(50) NOT NULL,
+ module varchar(50) NOT NULL,
+ submodule varchar(50) NOT NULL,
+ description text,
+ itime timestamp DEFAULT now(),
+ form text,
+ employee_id integer,
+
+ PRIMARY KEY (id),
+ FOREIGN KEY (employee_id) REFERENCES employee (id)
+);