}
-sub delete {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my $locale = $main::locale;
-
- $main::auth->assert('invoice_edit');
-
- if ($form->{second_run}) {
- $form->{print_and_post} = 0;
- }
- $form->header;
-
- print qq|
-<form method="post" action="$form->{script}">
-|;
-
- # delete action variable
- map { delete $form->{$_} } qw(action header);
-
- foreach my $key (keys %$form) {
- next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
- $form->{$key} =~ s/\"/"/g;
- print qq|<input type="hidden" name="$key" value="$form->{$key}">\n|;
- }
-
- print qq|
-<h2 class="confirm">| . $locale->text('Confirm!') . qq|</h2>
-
-<h4>|
- . $locale->text('Are you sure you want to delete Invoice Number')
- . qq| $form->{invnumber}
-</h4>
-
-<p>
-<input name="action" class="submit" type="submit" value="|
- . $locale->text('Yes') . qq|">
-</form>
-|;
-
- $main::lxdebug->leave_sub();
-}
-
sub credit_note {
$main::lxdebug->enter_sub();
$::lxdebug->leave_sub;
}
-sub yes {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my %myconfig = %main::myconfig;
- my $locale = $main::locale;
-
- $main::auth->assert('invoice_edit');
+sub delete {
+ $::auth->assert('invoice_edit');
- if (IS->delete_invoice(\%myconfig, \%$form)) {
+ if (IS->delete_invoice(\%::myconfig, $::form)) {
# saving the history
- if(!exists $form->{addition}) {
- $form->{snumbers} = 'invnumber' .'_'. $form->{invnumber}; # ($form->{type} eq 'credit_note' ? 'cnnumber' : 'invnumber') .'_'. $form->{invnumber};
- $form->{what_done} = 'invoice';
- $form->{addition} = "DELETED";
- $form->save_history;
+ if(!exists $::form->{addition}) {
+ $::form->{snumbers} = 'invnumber' .'_'. $::form->{invnumber};
+ $::form->{what_done} = 'invoice';
+ $::form->{addition} = "DELETED";
+ $::form->save_history;
}
# /saving the history
- $form->redirect($locale->text('Invoice deleted!'));
+ $::form->redirect($::locale->text('Invoice deleted!'));
}
- $form->error($locale->text('Cannot delete invoice!'));
-
- $main::lxdebug->leave_sub();
+ $::form->error($::locale->text('Cannot delete invoice!'));
}
sub post_and_e_mail {
'Do you really want to delete AR transaction #1?' => 'Wollen Sie wirklich die Debitorenbuchung #1 löschen?',
'Do you really want to delete GL transaction #1?' => 'Wollen Sie wirklich die Dialogbuchung #1 löschen?',
'Do you really want to delete the selected links?' => 'Wollen Sie wirklich die ausgewählten Verknüpfungen löschen?',
+ 'Do you really want to delete this invoice?' => 'Wollen Sie diese Rechnung wirklich löschen?',
'Do you really want to delete this object?' => 'Wollen Sie dieses Objekt wirklich löschen?',
'Do you really want to delete this warehouse?' => 'Wollen Sie dieses Lager wirklich löschen?',
'Do you really want to revert to this version?' => 'Wollen Sie wirklich auf diese Version zurücksetzen?',
<p>[% print_options %]</p>
<input type="hidden" name="action" value="dispatcher">
- [% IF id %]
+ [% IF id %]
<input class="submit" type="submit" accesskey="u" name="action_update" id="update_button" value="[% 'Update' | $T8 %]">
<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
<input class="submit" type="submit" name="action_credit_note" value="[% 'Credit Note' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
[% END %]
[% IF show_delete && (!storno || storno_id) %]
- <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
+ [% L.submit_tag("action_delete", LxERP.t8("Delete"), confirm=LxERP.t8('Do you really want to delete this invoice?')) %]
[% END %]
[% IF show_delete && !storno %]
<input class="submit" type="submit" name="action_post" value="[% 'Post' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">