'label_error' => $error,
};
- if ($params{action}) {
- my @vars;
-
- map { delete($self->{$_}); } qw(action);
- map { push @vars, { "name" => $_, "value" => $self->{$_} } if (!ref($self->{$_})); } keys %{ $self };
-
- $add_params->{SHOW_BUTTON} = 1;
- $add_params->{BUTTON_LABEL} = $params{label} || $params{action};
- $add_params->{VARIABLES} = \@vars;
-
- } elsif ($params{back_button}) {
- $add_params->{SHOW_BACK_BUTTON} = 1;
- }
-
$self->{title} = $params{title} if $params{title};
$self->header();
my @do_ids = map { $form->{"trans_id_$_"} } grep { $form->{"multi_id_$_"} } (1..$form->{rowcount});
if (!scalar @do_ids) {
- $form->show_generic_error($locale->text('You have not selected any delivery order.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have not selected any delivery order.'));
}
map { delete $form->{$_} } grep { m/^(?:trans|multi)_id_\d+/ } keys %{ $form };
my $locale = $main::locale;
if ($form->{id} && DO->is_marked_as_delivered(id => $form->{id})) {
- $form->show_generic_error($locale->text('The parts for this delivery order have already been transferred in.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('The parts for this delivery order have already been transferred in.'));
}
save(no_redirect => 1);
my $locale = $main::locale;
if ($form->{id} && DO->is_marked_as_delivered(id => $form->{id})) {
- $form->show_generic_error($locale->text('The parts for this delivery order have already been transferred out.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('The parts for this delivery order have already been transferred out.'));
}
save(no_redirect => 1);
my $base_unit_factor = $units->{ $part_info_map{$form->{"id_$i"}}->{unit} }->{factor} || 1;
my $qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
- $form->show_generic_error($locale->text("Cannot transfer negative entries." ), 'back_button' => 1) if ($qty < 0);
+ $form->show_generic_error($locale->text("Cannot transfer negative entries." )) if ($qty < 0);
# if we do not want to transfer services and this part is a service, set qty to zero
# ... and do not create a hash entry in %qty_parts below (will skip check for bins for the transfer == out case)
# ... and push only a empty (undef) element to @all_requests (will skip check for bin_id and warehouse_id and will not alter the row)
}
} else {
#$main::lxdebug->message(0, 'Fehlertext: ' . $fehlertext);
- $form->show_generic_error($locale->text("Cannot transfer. <br> Reason:<br>#1", $fehlertext ), 'back_button' => 1);
+ $form->show_generic_error($locale->text("Cannot transfer. <br> Reason:<br>#1", $fehlertext ));
}
}
}
$form->header();
if (@errors) {
- $form->show_generic_error(join('<br>', @errors), 'back_button' => 1);
+ $form->show_generic_error(join('<br>', @errors));
}
$form->{nextsub} = "update_prices";
$form->{ordlabel} = $locale->text('Quotation Number');
} else {
- $form->show_generic_error($locale->text('oe.pl::search called with unknown type'), back_button => 1);
+ $form->show_generic_error($locale->text('oe.pl::search called with unknown type'));
}
# setup vendor / customer data
@ids = map $_->{id}, grep { $_->{selected} } @{ $form->{exports} || [] };
if (!@ids) {
- $form->show_generic_error($locale->text('You have not selected any export.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have not selected any export.'));
}
}
$export->{items} = [ grep { !$_->{export_closed} && !$_->{executed} } @{ $export->{items} } ];
if (!@{ $export->{items} }) {
- $form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'));
}
} elsif (!$export) {
my @items = grep { $_->{selected} } @{ $form->{items} || [] };
if (!@items) {
- $form->show_generic_error($locale->text('You have not selected any item.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have not selected any item.'));
}
my @export_ids = uniq map { $_->{sepa_export_id} } @items;
my %exports = map { $_ => SL::SEPA->retrieve_export('id' => $_, 'details' => 1, vc => $vc) } @export_ids;
}
if (!@items_to_post) {
- $form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'));
}
if (any { !$_->{execution_date} } @items_to_post) {
- $form->show_generic_error($locale->text('You have to specify an execution date for each antry.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have to specify an execution date for each antry.'));
}
SL::SEPA->post_payment('items' => \@items_to_post, vc => $vc);
my @ids = @{ $form->{items} || [] };
my @export_ids = uniq map { $_->{export_id} } @ids;
- $form->show_generic_error($locale->text('Multi mode not supported.'), 'back_button' => 1) if 1 != scalar @export_ids;
+ $form->show_generic_error($locale->text('Multi mode not supported.')) if 1 != scalar @export_ids;
my $export = SL::SEPA->retrieve_export('id' => $export_ids[0], 'details' => 1, vc => $vc);
my @items = ();
push @items, $item if $item;
}
- $form->show_generic_error($locale->text('No transfers were executed in this export.'), 'back_button' => 1) if 1 > scalar @items;
+ $form->show_generic_error($locale->text('No transfers were executed in this export.')) if 1 > scalar @items;
my $report = SL::ReportGenerator->new(\%main::myconfig, $form);
my $defaults = SL::DB::Default->get;
if (!$defaults->company) {
- $form->show_generic_error($locale->text('You have to enter a company name in the client configuration.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have to enter a company name in the client configuration.'));
}
if (($vc eq 'customer') && !$defaults->sepa_creditor_id) {
- $form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in the client configuration.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in the client configuration.'));
}
my @ids;
}
if (!@ids) {
- $form->show_generic_error($locale->text('You have not selected any export.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have not selected any export.'));
}
my @items = ();
}
if (!@items) {
- $form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('All the selected exports have already been closed, or all of their items have already been executed.'));
}
my $message_id = strftime('MSG%Y%m%d%H%M%S', localtime) . sprintf('%06d', $$);
my @export_ids = map { $_->{id} } grep { $_->{selected} } @{ $form->{exports} || [] };
if (!@export_ids) {
- $form->show_generic_error($locale->text('You have not selected any export.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('You have not selected any export.'));
}
my @open_export_ids = ();
}
if (!@open_export_ids) {
- $form->show_generic_error($locale->text('All of the exports you have selected were already closed.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('All of the exports you have selected were already closed.'));
}
$form->{title} = $locale->text('Close SEPA exports');
$form->{qty} = $form->parse_amount(\%myconfig, $form->{qty});
if ($form->{qty} <= 0) {
- $form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('Invalid quantity.'));
}
# TODO Es wäre schön, hier schon die maximale Anzahl der zu fertigenden Erzeugnisse zu haben
#else { if ($form->{qty} > $maxcreate) { #s.o.
- # $form->show_generic_error($locale->text('Can not create that quantity with current stock'), 'back_button' => 1);
- # $form->show_generic_error('Maximale Stückzahl' . $maxcreate , 'back_button' => 1);
+ # $form->show_generic_error($locale->text('Can not create that quantity with current stock'));
+ # $form->show_generic_error('Maximale Stückzahl' . $maxcreate);
# }
# }
# Ideen? jb 18.3.09
if ($ret ne "1"){
# Die locale-Funktion kann keine Double-Quotes escapen, deswegen hier erstmal so (ein wahrscheinlich immerwährender Hotfix) s.a. Frage davor jb 25.4.09
- $form->show_generic_error($ret, 'back_button' => 1);
+ $form->show_generic_error($ret);
}
delete @{$form}{qw(parts_id partnumber description qty unit chargenumber bestbefore comment)};
$form->{qty} = $form->parse_amount(\%myconfig, $form->{qty});
if ($form->{qty} <= 0) {
- $form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
+ $form->show_generic_error($locale->text('Invalid quantity.'));
}
if (!$form->{warehouse_id} || !$form->{bin_id}) {
</div>
<p style="text-align: left;"><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
-
- [%- IF SHOW_BACK_BUTTON %]
- <form>
- <p>
- <!--- TODO: show back button always hack
- In which situation is it necessary to hide it?
- <input type="button" onclick="history.back()" value="[% 'Back' | $T8 %]">
- -->
- </p>
- </form>
-
- [%- ELSIF SHOW_BUTTON %]
-
- <form action="[% HTML.escape(script) %]" method="post">
-
- [%- FOREACH var = VARIABLES %]
- <input type="hidden" name="[% HTML.escape(var.name) %]" value="[% HTML.escape(var.value) %]">
- [%- END %]
-
- <input type="hidden" name="action" value="[% HTML.escape(action) %]">
-
- <p>
- <input type="submit" value="[% BUTTON_LABEL %]">
- </p>
- </form>
-
- [%- END %]
-