# end of main
-sub add {
+# For locales.pl:
+# $locale->text('Edit the purchase_order');
+# $locale->text('Edit the sales_order');
+# $locale->text('Edit the request_quotation');
+# $locale->text('Edit the sales_quotation');
+
+# $locale->text('Workflow purchase_order');
+# $locale->text('Workflow sales_order');
+# $locale->text('Workflow request_quotation');
+# $locale->text('Workflow sales_quotation');
+
+sub set_headings {
$lxdebug->enter_sub();
+ my ($action) = @_;
+
if ($form->{type} eq 'purchase_order') {
- $form->{title} = $locale->text('Add Purchase Order');
- $form->{vc} = 'vendor';
+ $form->{title} = $action eq "edit" ?
+ $locale->text('Edit Purchase Order') :
+ $locale->text('Add Purchase Order');
+ $form->{heading} = $locale->text('Purchase Order');
+ $form->{vc} = 'vendor';
}
if ($form->{type} eq 'sales_order') {
- $form->{title} = $locale->text('Add Sales Order');
- $form->{vc} = 'customer';
+ $form->{title} = $action eq "edit" ?
+ $locale->text('Edit Sales Order') :
+ $locale->text('Add Sales Order');
+ $form->{heading} = $locale->text('Sales Order');
+ $form->{vc} = 'customer';
}
if ($form->{type} eq 'request_quotation') {
- $form->{title} = $locale->text('Add Request for Quotation');
- $form->{vc} = 'vendor';
+ $form->{title} = $action eq "edit" ?
+ $locale->text('Edit Request for Quotation') :
+ $locale->text('Add Request for Quotation');
+ $form->{heading} = $locale->text('Request for Quotation');
+ $form->{vc} = 'vendor';
}
if ($form->{type} eq 'sales_quotation') {
- $form->{title} = $locale->text('Add Quotation');
- $form->{vc} = 'customer';
+ $form->{title} = $action eq "edit" ?
+ $locale->text('Edit Quotation') :
+ $locale->text('Add Quotation');
+ $form->{heading} = $locale->text('Quotation');
+ $form->{vc} = 'customer';
}
+ $lxdebug->leave_sub();
+}
+
+sub add {
+ $lxdebug->enter_sub();
+
+ set_headings("add");
+
$form->{callback} =
"$form->{script}?action=add&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&path=$form->{path}&password=$form->{password}"
unless $form->{callback};
sub edit {
$lxdebug->enter_sub();
+ set_headings("edit");
+
# editing without stuff to edit? try adding it first
if ($form->{rowcount}) {
map { $id++ if $form->{"id_$_"} } (1 .. $form->{rowcount});
$printer_id = $form->{printer_id};
}
- if ($form->{type} eq 'purchase_order') {
- $form->{title} = $locale->text('Edit Purchase Order');
- $form->{heading} = $locale->text('Purchase Order');
- $form->{vc} = 'vendor';
- }
- if ($form->{type} eq 'sales_order') {
- $form->{title} = $locale->text('Edit Sales Order');
- $form->{heading} = $locale->text('Sales Order');
- $form->{vc} = 'customer';
- }
- if ($form->{type} eq 'request_quotation') {
- $form->{title} = $locale->text('Edit Request for Quotation');
- $form->{heading} = $locale->text('Request for Quotation');
- $form->{vc} = 'vendor';
- }
- if ($form->{type} eq 'sales_quotation') {
- $form->{title} = $locale->text('Edit Quotation');
- $form->{heading} = $locale->text('Quotation');
- $form->{vc} = 'customer';
- }
+ set_headings("edit");
&order_links;
&prepare_order;
</tr>
</table>
-Bearbeiten des $form->{heading}<br>
+| . $locale->text("Edit the $form->{type}") . qq|<br>
<input class=submit type=submit name=action value="|
. $locale->text('Update') . qq|">
<input class=submit type=submit name=action value="|
if (($form->{id})) {
print qq|
-<br>Workflow $form->{heading}<br>
+<br>| . $locale->text("Workflow $form->{type}") . qq|<br>
<input class=submit type=submit name=action value="|
. $locale->text('Save as new') . qq|">
<input class=submit type=submit name=action value="|
sub update {
$lxdebug->enter_sub();
+ set_headings($form->{"id"} ? "edit" : "add");
+
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
qw(exchangerate creditlimit creditremaining);
$form->{update} = 1;
OE->save(\%myconfig, \%$form);
$form->{simple_save} = 1;
if(!$form->{print_and_save}) {
+ set_headings("edit");
&update;
exit;
}
'Edit Vendor' => 'Lieferant editieren',
'Edit Vendor Invoice' => 'Einkaufsrechnung bearbeiten',
'Edit Warehouse' => 'Lager bearbeiten',
+ 'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
+ 'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
+ 'Edit the sales_order' => 'Bearbeiten des Auftrags',
+ 'Edit the sales_quotation' => 'Bearbeiten des Angebots',
'Edit units' => 'Einheiten bearbeiten',
'Employee' => 'Bearbeiter',
'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren',
'Folgekonto' => 'Folgekonto',
'Foreign Exchange Gain' => 'Wechselkurserträge',
'Foreign Exchange Loss' => 'Wechselkursaufwendungen',
+ 'Formula' => '',
'Free report period' => 'Freier Zeitraum',
'Fristsetzung' => '',
'From' => 'Von',
'Heading' => 'Überschrift',
'Help' => 'Hilfe',
'Help:' => 'Hilfe:',
- 'Hier den Berechnungszeitraum auswählen...' => 'Hier den Berechnungszeitraum auswählen...',
'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)',
'Hinweise' => 'Hinweise',
'Homepage' => 'Homepage',
'Weight Unit' => 'Gewichtseinheit',
'Weight/m' => 'Gewicht pro Meter',
'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Workflow purchase_order' => 'Workflow Lieferantenauftrag',
+ 'Workflow request_quotation' => 'Workflow Preisanfrage',
+ 'Workflow sales_order' => 'Workflow Auftrag',
+ 'Workflow sales_quotation' => 'Workflow Angebot',
'YYYY' => 'JJJJ',
'Year' => 'Jahr',
'Year End' => 'Jahresende',
'Fax' => 'Fax',
'Feb' => 'Feb',
'February' => 'Februar',
+ 'Formula' => 'Formula',
'From' => 'Von',
'Geschäftsvolumen' => 'Geschäftsvolumen',
'Group' => 'Warengruppe',
'Edit Quotation' => 'Angebot bearbeiten',
'Edit Request for Quotation' => 'Anfrage bearbeiten',
'Edit Sales Order' => 'Auftrag bearbeiten',
+ 'Edit the purchase_order' => 'Bearbeiten des Lieferantenauftrags',
+ 'Edit the request_quotation' => 'Bearbeiten der Preisanfrage',
+ 'Edit the sales_order' => 'Bearbeiten des Auftrags',
+ 'Edit the sales_quotation' => 'Bearbeiten des Angebots',
'Employee' => 'Bearbeiter',
'Exchangerate' => 'Wechselkurs',
'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'Warehouse' => 'Lager',
'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Workflow purchase_order' => 'Workflow Lieferantenauftrag',
+ 'Workflow request_quotation' => 'Workflow Preisanfrage',
+ 'Workflow sales_order' => 'Workflow Auftrag',
+ 'Workflow sales_quotation' => 'Workflow Angebot',
'Yes' => 'Ja',
'Zipcode' => 'PLZ',
'button' => '?',
'select_name' => 'select_name',
'select_project' => 'select_project',
'send_email' => 'send_email',
+ 'set_headings' => 'set_headings',
'set_pricegroup' => 'set_pricegroup',
'ship_receive' => 'ship_receive',
'ship_to' => 'ship_to',
'Firma' => 'Firma',
'Help' => 'Hilfe',
'Help:' => 'Hilfe:',
- 'Hier den Berechnungszeitraum auswählen...' => 'Hier den Berechnungszeitraum auswählen...',
'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)',
'Hinweise' => 'Hinweise',
'Impossible to create yearly Tax Report as PDF or PS.<br \> Not yet implemented!' => 'Umsatzsteuer Jahreserklärung als PDF wird noch nicht unterstützt.<br \> Bitte benutzen Sie das Ausgabeformat Vorschau.',