map { print "\n$column_data{$_}" } @column_index;
- print qq|
- </tr>
-|;
-map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
- ("orderitems_id_$i", "bo_$i", "pricegroup_old_$i", "price_old_$i", "selected_unit_$i", "id_$i", "inventory_accno_$i", "bin_$i",
- "partsgroup_$i", "partnotes_$i", "income_accno_$i", "expense_accno_$i", "listprice_$i", "assembly_$i", "taxaccounts_$i",
- "ordnumber_$i", "transdate_$i", "cusordnumber_$i", "longdescription_$i", "basefactor_$i"));
-print qq|
-<input type="hidden" name="price_new_$i" value="|
- . $form->format_amount(\%myconfig, $form->{"price_new_$i"}) . qq|">
-|;
+ print("</tr>\n" .
+ $cgi->hidden("-name" => "unit_old_$i",
+ "-value" => $form->{"selected_unit_$i"})
+ . "\n" .
+ $cgi->hidden("-name" => "price_new_$i",
+ "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"}))
+ . "\n");
+ map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_}) . "\n"); }
+ ("orderitems_id_$i", "bo_$i", "pricegroup_old_$i", "price_old_$i",
+ "id_$i", "inventory_accno_$i", "bin_$i", "partsgroup_$i", "partnotes_$i",
+ "income_accno_$i", "expense_accno_$i", "listprice_$i", "assembly_$i",
+ "taxaccounts_$i", "ordnumber_$i", "transdate_$i", "cusordnumber_$i",
+ "longdescription_$i", "basefactor_$i"));
########################################
# Eintrag fuer Version 2.2.0 geaendert #
$column_data{partnumber} =
qq|<td><input name="new_partnumber_$i" type="hidden" value="$ref->{partnumber}">$ref->{partnumber}</td>|;
$column_data{description} =
- qq|<td><input name="new_description_$i" type="hidden" value=$ref->{description}>$ref->{description}</td>|;
+ qq|<td><input name="new_description_$i" type="hidden" value="$ref->{description}">$ref->{description}</td>|;
$column_data{sellprice} =
qq|<td align="right"><input name="new_sellprice_$i" type="hidden" value="$ref->{sellprice}">|
. $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
map { print "\n$column_data{$_}" } @column_index;
- print qq|
-</tr>
-|;
-map({ print($cgi->hidden("-name" => "new_$__$i", "-value" => $ref->{$_})); }
- qw(bin listprice inventory_accno income_accno expense_accno unit weight assembly taxaccounts partsgroup
- formel logdescription not_discountable part_payment_id partnodes id));
-if ($lizenzen) {
- print qq|
-<input name="new_lizenzen_$i" type="hidden" value="$ref->{lizenzen}">
-|;
- }
+ print("</tr>\n");
+
+ my @new_fields =
+ qw(bin listprice inventory_accno income_accno expense_accno unit weight
+ assembly taxaccounts partsgroup formel logdescription not_discountable
+ part_payment_id partnodes id);
+ push(@new_fields, "lizenzen") if ($lizenzen);
+ map({ print($cgi->hidden("-name" => "new_${_}_$i",
+ "-value" => $ref->{$_})); } @new_fields);
}
print qq|
. $locale->text('Service');
print $cgi->hidden("-name" => "previousform", "-value" => $previousform);
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
- ("partnumber_$i", "description_$i", "rowcount", "taxaccounts", "vc", "path", "login", "password"));
-
-#<input type="hidden" name="partnumber" value="$form->{"partnumber_$i"}">
-#<input type="hidden" name="description" value="$form->{"description_$i"}">
-#<input type="hidden" name="rowcount" value="$form->{rowcount}">
-#<input type="hidden" name="taxaccount2" value="$form->{taxaccounts}">
-#<input type="hidden" name="vc" value="$form->{vc}">
-#
-#<input type="hidden" name="path" value="$form->{path}">
-#<input type="hidden" name="login" value="$form->{login}">
-#<input type="hidden" name="password" value="$form->{password}">
+ ("rowcount", "vc", "path", "login", "password"));
+ map({ print($cgi->hidden("-name" => $_, "-value" => $form->{"$__$i"})); }
+ ("partnumber", "description"));
+print $cgi->hidden("-name" => "taxaccount2", "-value" => $form->{taxaccounts});
print qq|
<input type="hidden" name="nextsub" value="add">
sub send_email {
$lxdebug->enter_sub();
- $old_form = new Form;
+ my $callback = $form->{script} . "?action=edit";
+ map({ $callback .= "\&${_}=" . E($form->{$_}); }
+ qw(login password path type id));
- map { $old_form->{$_} = $form->{$_} } keys %$form;
- $old_form->{media} = $form->{oldmedia};
+ print_form("return");
- &print_form($old_form);
+ $form->{callback} = $callback;
+ $form->redirect();
$lxdebug->leave_sub();
}
if (ref $form->{languages} eq 'ARRAY');
push @PRINTER_ID,
- map { opthash($_->{id}, ($_->{id} eq $form->{printer_id} ? 'selected' : ''), $_->{description}) } +{}, @{ $form->{printers} }
+ map { opthash($_->{id}, ($_->{id} eq $form->{printer_id} ? 'selected' : ''), $_->{printer_description}) } +{}, @{ $form->{printers} }
if (ref $form->{printers} eq 'ARRAY');
@SELECTS = map { sname => lc $_, DATA => \@$_, show => scalar @$_ }, qw(FORMNAME LANGUAGE_ID FORMAT SENDMODE MEDIA PRINTER_ID);
$form->update_status(\%myconfig)
if ($form->{media} eq 'queue' && $form->{id});
+ return $lxdebug->leave_sub() if ($old_form eq "return");
+
if ($old_form) {
$old_form->{"${inv}number"} = $form->{"${inv}number"};
</td>
</tr>
</table>
-| . $cgi->hidden("-name" => "nexsub", "-value" => $nextsub);
+| . $cgi->hidden("-name" => "nextsub", "-value" => $nextsub);
;