$transdate = $form->datetonum($form->{transdate}, \%myconfig);
$closedto = $form->datetonum($form->{closedto}, \%myconfig);
- if ($form->{id} && $form->{radier}) {
+ if ($form->{id}) {
# print qq|<input class=submit type=submit name=action value="|.$locale->text('Update').qq|">
# |;
+ if ($form->{radier}) {
print qq|
<input class=submit type=submit name=action value="|
. $locale->text('Post') . qq|">
<input class=submit type=submit name=action value="|
. $locale->text('Delete') . qq|">
|;
+ }
-
- if ($transdate > $closedto) {
print qq|
<input class=submit type=submit name=action value="|
- . $locale->text('Post as new') . qq|">
+ . $locale->text('Use As Template') . qq|">
|;
- }
-
+
} else {
if (($transdate > $closedto) && !$form->{id}) {
print qq|<input class=submit type=submit name=action value="|
$lxdebug->leave_sub();
}
+sub use_as_template {
+ $lxdebug->enter_sub();
+
+ map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1);
+ $form->{paidaccounts} = 1;
+ $form->{rowcount}--;
+ $form->{invdate} = $form->current_date(\%myconfig);
+ &update;
+
+ $lxdebug->leave_sub();
+}
+
sub delete {
$lxdebug->enter_sub();
<input class=submit type=submit name=action value="|
. $locale->text('Delete') . qq|">
|;
-
+ }
if ($transdate > $closedto) {
print qq|
<input class=submit type=submit name=action value="|
- . $locale->text('Post as new') . qq|">
+ . $locale->text('Use As Template') . qq|">
|;
}
- }
+
} else {
if ($transdate > $closedto) {
print qq|<input class=submit type=submit name=action value="|
$lxdebug->leave_sub();
}
+sub use_as_template {
+ $lxdebug->enter_sub();
+
+ map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1);
+ $form->{paidaccounts} = 1;
+ $form->{rowcount}--;
+ $form->{invdate} = $form->current_date(\%myconfig);
+ &update;
+
+ $lxdebug->leave_sub();
+}
+
sub delete {
$lxdebug->enter_sub();
. $locale->text('Delete') . qq|">
|;
}
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Use As Template') . qq|">
+|;
} else {
if ($invdate > $closedto) {
print qq|<input class=submit type=submit name=action value="|
}
+sub use_as_template {
+ $lxdebug->enter_sub();
+
+ map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1);
+ $form->{paidaccounts} = 1;
+ $form->{rowcount}--;
+ $form->{invdate} = $form->current_date(\%myconfig);
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
sub post_payment {
$lxdebug->enter_sub();
for $i (1 .. $form->{paidaccounts}) {
. $locale->text('Storno') . qq|">| unless ($form->{storno});
print qq|<input class=submit type=submit name=action value="|
. $locale->text('Post Payment') . qq|">
+|;
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Use As Template') . qq|">
|;
if ($form->{id} && !($form->{type} eq "credit_note")) {
print qq|
}
+sub use_as_template {
+ $lxdebug->enter_sub();
+
+ map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1);
+ $form->{paidaccounts} = 1;
+ $form->{rowcount}--;
+ $form->{invdate} = $form->current_date(\%myconfig);
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
sub storno {
$lxdebug->enter_sub();
'The database update/creation did not succeed. The file <TMPL_VAR file ESCAPE=HTML> contained the following error:' => 'Die Datenbankaktualisierung/erstellung schlug fehl. Die Datei <TMPL_VAR file ESCAPE=HTML> enthielt den folgenden Fehler:',
'The database upgrade for the introduction of Buchungsgruppen is now complete.' => 'Das Datenbankupgrade für die Einführung von Buchungsgruppen ist jetzt beendet.',
'The database upgrade for the introduction of units is now complete.' => 'Das Datenbankupgrade zwecks Einführung von Einheiten ist nun beendet.',
+ 'The dunning process is started' => '',
'The dunning process started' => 'Der Mahnprozess ist gestartet.',
'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.',
'The factor is missing.' => 'Der Faktor fehlt.',
'Update complete' => 'Update beendet.',
'Update prices' => 'Preise aktualisieren',
'Updated' => 'Erneuert am',
+ 'Use As Template' => 'Als Vorlage verwenden',
'Use Templates' => 'benutze Vorlagen',
'User' => 'Benutzer',
'User deleted!' => 'Benutzer gelöscht!',
'Payment date missing!' => 'Tag der Zahlung fehlt!',
'Payments' => 'Zahlungsausgänge',
'Post' => 'Buchen',
- 'Post as new' => 'Neu buchen',
'Project' => 'Projekt',
'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
'Remaining' => 'Rest',
'Transaction deleted!' => 'Buchung gelöscht!',
'Transaction posted!' => 'Buchung verbucht!',
'Update' => 'Erneuern',
+ 'Use As Template' => 'Als Vorlage verwenden',
'Vendor' => 'Lieferant',
'Vendor Invoice' => 'Einkaufsrechnung',
'Vendor missing!' => 'Lieferant fehlt!',
'select_name' => 'select_name',
'select_project' => 'select_project',
'update' => 'update',
+ 'use_as_template' => 'use_as_template',
'vendor_invoice' => 'vendor_invoice',
'yes' => 'yes',
'kreditorenbuchung' => 'ap_transaction',
'löschen' => 'delete',
'kreditorenbuchung_bearbeiten' => 'edit_accounts_payables_transaction',
'buchen' => 'post',
- 'neu_buchen' => 'post_as_new',
'erneuern' => 'update',
+ 'als_vorlage_verwenden' => 'use_as_template',
'einkaufsrechnung' => 'vendor_invoice',
'ja' => 'yes',
};
'Paid' => 'bezahlt',
'Payment date missing!' => 'Tag der Zahlung fehlt!',
'Post' => 'Buchen',
- 'Post as new' => 'Neu buchen',
'Project' => 'Projekt',
'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
'Remaining' => 'Rest',
'Transaction deleted!' => 'Buchung gelöscht!',
'Transaction posted!' => 'Buchung verbucht!',
'Update' => 'Erneuern',
+ 'Use As Template' => 'Als Vorlage verwenden',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'Yes' => 'Ja',
'button' => '?',
'select_name' => 'select_name',
'select_project' => 'select_project',
'update' => 'update',
+ 'use_as_template' => 'use_as_template',
'vendor_invoice' => 'vendor_invoice',
'yes' => 'yes',
'debitorenbuchung' => 'ar_transaction',
'weiter' => 'continue',
'löschen' => 'delete',
'buchen' => 'post',
- 'neu_buchen' => 'post_as_new',
'rechnung' => 'sales_invoice',
'erneuern' => 'update',
+ 'als_vorlage_verwenden' => 'use_as_template',
'ja' => 'yes',
};
'Total' => 'Summe',
'Unit' => 'Einheit',
'Update' => 'Erneuern',
+ 'Use As Template' => 'Als Vorlage verwenden',
'Value' => 'Wert',
'Variable' => 'Variable',
'Vendor' => 'Lieferant',
'ship_to' => 'ship_to',
'storno' => 'storno',
'update' => 'update',
+ 'use_as_template' => 'use_as_template',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'vendor_invoice' => 'vendor_invoice',
'zahlung_buchen' => 'post_payment',
'storno' => 'storno',
'erneuern' => 'update',
+ 'als_vorlage_verwenden' => 'use_as_template',
'ja' => 'yes',
};
'Trade Discount' => 'Rabatt',
'Unit' => 'Einheit',
'Update' => 'Erneuern',
+ 'Use As Template' => 'Als Vorlage verwenden',
'Value' => 'Wert',
'Variable' => 'Variable',
'Vendor Number' => 'Lieferantennummer',
'ship_to' => 'ship_to',
'storno' => 'storno',
'update' => 'update',
+ 'use_as_template' => 'use_as_template',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'vendor_invoice' => 'vendor_invoice',
'lieferadresse' => 'ship_to',
'storno' => 'storno',
'erneuern' => 'update',
+ 'als_vorlage_verwenden' => 'use_as_template',
'ja' => 'yes',
};