1211 |
1211 |
}
|
1212 |
1212 |
|
1213 |
1213 |
sub delete {
|
1214 |
|
$main::lxdebug->enter_sub();
|
1215 |
|
|
1216 |
|
my $form = $main::form;
|
1217 |
|
my $locale = $main::locale;
|
|
1214 |
$::lxdebug->enter_sub;
|
1218 |
1215 |
|
1219 |
1216 |
check_oe_access();
|
1220 |
1217 |
|
1221 |
|
$form->header;
|
1222 |
|
|
1223 |
|
my ($msg, $ordnumber);
|
1224 |
|
if ($form->{type} =~ /_order$/) {
|
1225 |
|
$msg = $locale->text('Are you sure you want to delete Order Number');
|
1226 |
|
$ordnumber = 'ordnumber';
|
1227 |
|
} else {
|
1228 |
|
$msg = $locale->text('Are you sure you want to delete Quotation Number');
|
1229 |
|
$ordnumber = 'quonumber';
|
1230 |
|
}
|
1231 |
|
|
1232 |
|
print qq|
|
1233 |
|
<body>
|
1234 |
|
|
1235 |
|
<form method=post action=$form->{script}>
|
1236 |
|
|;
|
|
1218 |
$::form->header;
|
1237 |
1219 |
|
1238 |
1220 |
# delete action variable
|
1239 |
|
map { delete $form->{$_} } qw(action header);
|
|
1221 |
delete $::form->{$_} for qw(action header);
|
1240 |
1222 |
|
1241 |
|
foreach my $key (keys %$form) {
|
1242 |
|
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
|
1243 |
|
$form->{$key} =~ s/\"/"/g;
|
1244 |
|
print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
|
|
1223 |
my @hiddens;
|
|
1224 |
for my $key (keys %$::form) {
|
|
1225 |
next if $key eq 'login' || $key eq 'password' || '' ne ref $::form->{$key};
|
|
1226 |
push @hiddens, { key => $key, value => $::form->{$key} };
|
1245 |
1227 |
}
|
1246 |
1228 |
|
1247 |
|
print qq|
|
1248 |
|
<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
|
1249 |
|
|
1250 |
|
<h4>$msg $form->{$ordnumber}</h4>
|
1251 |
|
<p>
|
1252 |
|
<input type="hidden" name="yes_nextsub" value="delete_order_quotation">
|
1253 |
|
<input name=action class=submit type=submit value="|
|
1254 |
|
. $locale->text('Yes') . qq|">
|
1255 |
|
<button class=submit type=button onclick="history.back()">|
|
1256 |
|
. $locale->text('No') . qq|</button>
|
1257 |
|
</form>
|
|
1229 |
print $::form->parse_html_template('oe/delete', {
|
|
1230 |
hiddens => \@hiddens,
|
|
1231 |
is_order => scalar($::form->{type} =~ /_order$/),
|
|
1232 |
});
|
1258 |
1233 |
|
1259 |
|
</body>
|
1260 |
|
</html>
|
1261 |
|
|;
|
1262 |
1234 |
|
1263 |
|
$main::lxdebug->leave_sub();
|
|
1235 |
$::lxdebug->leave_sub;
|
1264 |
1236 |
}
|
1265 |
1237 |
|
1266 |
1238 |
sub delete_order_quotation {
|
delete in oe in templates ausgelgert