Revision 8c7e4493
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
bin/mozilla/io.pl | ||
---|---|---|
35 | 35 |
|
36 | 36 |
use CGI; |
37 | 37 |
use CGI::Ajax; |
38 |
use List::Util qw(max); |
|
38 |
use List::Util qw(max first);
|
|
39 | 39 |
|
40 | 40 |
use SL::Common; |
41 | 41 |
use SL::CT; |
42 | 42 |
use SL::IC; |
43 |
use SL::IO; |
|
43 | 44 |
|
44 | 45 |
require "bin/mozilla/common.pl"; |
45 | 46 |
|
... | ... | |
92 | 93 |
######################################## |
93 | 94 |
sub display_row { |
94 | 95 |
$lxdebug->enter_sub(); |
96 |
|
|
97 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
98 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
99 |
|
|
95 | 100 |
my $numrows = shift; |
96 | 101 |
|
102 |
my ($readonly, $stock_in_out, $stock_in_out_title); |
|
103 |
|
|
104 |
my $is_purchase = (first { $_ eq $form->{type} } qw(request_quotation purchase_order)) || ($form->{script} eq 'ir.pl'); |
|
105 |
|
|
97 | 106 |
# column_index |
98 | 107 |
my @header_sort = qw(runningnumber partnumber description ship qty unit sellprice_pg sellprice discount linetotal); |
99 | 108 |
my @HEADER = ( |
... | ... | |
103 | 112 |
{ id => 'ship', width => 5, value => ($form->{type} eq 'purchase_order' ? $locale->text('Ship rcvd') : $locale->text('Ship')), |
104 | 113 |
display => $form->{type} =~ /sales_order/ || ($form->{type} =~ /purchase_order/ && !($lizenzen && $form->{vc} eq "customer")) , }, |
105 | 114 |
{ id => 'qty', width => 5, value => $locale->text('Qty'), display => 1, }, |
115 |
{ id => 'price_factor', width => 5, value => $locale->text('Price Factor'), display => 1, }, |
|
106 | 116 |
{ id => 'unit', width => 5, value => $locale->text('Unit'), display => 1, }, |
107 | 117 |
{ id => 'license', width => 10, value => $locale->text('License'), display => 0, }, |
108 | 118 |
{ id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, }, |
109 | 119 |
{ id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, }, |
110 | 120 |
{ id => 'sellprice', width => 15, value => $locale->text('Price'), display => 1, }, |
111 |
{ id => 'sellprice_pg', width => 15, value => $locale->text('Pricegroup'), display => $form->{type} =~ /^sales_/, },
|
|
112 |
{ id => 'discount', width => 5, value => $locale->text('Discount'), display => $form->{vc} eq 'customer', },
|
|
121 |
{ id => 'sellprice_pg', width => 15, value => $locale->text('Pricegroup'), display => ($form->{type} =~ /^sales_/), },
|
|
122 |
{ id => 'discount', width => 5, value => $locale->text('Discount'), display => ($form->{vc} eq 'customer'), },
|
|
113 | 123 |
{ id => 'linetotal', width => 10, value => $locale->text('Extended'), display => 1, }, |
114 | 124 |
{ id => 'bin', width => 10, value => $locale->text('Bin'), display => 0, }, |
115 | 125 |
); |
... | ... | |
182 | 192 |
$this_unit = $form->{"selected_unit_$i"} if AM->convert_unit($this_unit, $form->{"selected_unit_$i"}, $all_units); |
183 | 193 |
$this_unit ||= "kg"; |
184 | 194 |
|
185 |
my $price_factor_select; |
|
186 | 195 |
if (0 < scalar @{ $form->{ALL_PRICE_FACTORS} }) { |
187 | 196 |
my @values = ('', map { $_->{id} } @{ $form->{ALL_PRICE_FACTORS} }); |
188 | 197 |
my %labels = map { $_->{id} => $_->{description} } @{ $form->{ALL_PRICE_FACTORS} }; |
189 | 198 |
|
190 |
$price_factor_select =
|
|
199 |
$column_data{price_factor} =
|
|
191 | 200 |
NTI($cgi->popup_menu('-name' => "price_factor_id_$i", |
192 | 201 |
'-default' => $form->{"price_factor_id_$i"}, |
193 | 202 |
'-values' => \@values, |
194 | 203 |
'-labels' => \%labels, |
195 |
'-style' => 'width:90px')) |
|
196 |
. ' '; |
|
204 |
'-style' => 'width:90px')); |
|
205 |
} else { |
|
206 |
$column_data{price_factor} = ' '; |
|
197 | 207 |
} |
198 | 208 |
|
199 |
$column_data{"unit"} = $price_factor_select . AM->unit_select_html($local_units, "unit_$i", $this_unit, $form->{"id_$i"} ? $form->{"unit_$i"} : undef);
|
|
209 |
$column_data{"unit"} = AM->unit_select_html($local_units, "unit_$i", $this_unit, $form->{"id_$i"} ? $form->{"unit_$i"} : undef); |
|
200 | 210 |
# / unit ending |
201 | 211 |
|
202 | 212 |
$form->{"sellprice_$i"} =~ /\.(\d+)/; |
... | ... | |
289 | 299 |
$marge_color, $locale->text('Ertrag'),$form->{"marge_absolut_$i"}, $form->{"marge_percent_$i"}, |
290 | 300 |
$locale->text('LP'), $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2), |
291 | 301 |
$locale->text('EK'), $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, 2) } |
292 |
if $form->{"id_$i"} && $form->{type} =~ /^sales_/; |
|
302 |
if $form->{"id_$i"} && $form->{type} =~ /^sales_/ && !$is_delivery_order;
|
|
293 | 303 |
# / marge calculations ending |
294 | 304 |
|
305 |
my @hidden_vars; |
|
306 |
|
|
307 |
push @hidden_vars, qw(partunit) if ($is_purchase); |
|
308 |
|
|
295 | 309 |
my @HIDDENS = map { value => $_}, ( |
296 | 310 |
$cgi->hidden("-name" => "unit_old_$i", "-value" => $form->{"selected_unit_$i"}), |
297 | 311 |
$cgi->hidden("-name" => "price_new_$i", "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"})), |
298 | 312 |
map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" } |
299 |
qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes |
|
300 |
income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber |
|
301 |
longdescription basefactor marge_absolut marge_percent marge_price_factor lastcost)
|
|
313 |
(qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes
|
|
314 |
income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber
|
|
315 |
longdescription basefactor marge_absolut marge_percent marge_price_factor lastcost), @hidden_vars)
|
|
302 | 316 |
); |
303 | 317 |
|
304 | 318 |
map { $form->{"${_}_base"} += $linetotal } (split(/ /, $form->{"taxaccounts_$i"})); |
305 | 319 |
|
306 | 320 |
$form->{invsubtotal} += $linetotal; |
307 | 321 |
|
308 |
push @ROWS, { ROW1 => \@ROW1, ROW2 => \@ROW2, HIDDENS => \@HIDDENS, colspan => $colspan, }; |
|
322 |
push @ROWS, { ROW1 => \@ROW1, ROW2 => \@ROW2, HIDDENS => \@HIDDENS, colspan => $colspan, error => $form->{"row_error_$i"}, };
|
|
309 | 323 |
} |
310 | 324 |
|
311 | 325 |
print $form->parse_html_template('oe/sales_order', { ROWS => \@ROWS, |
... | ... | |
324 | 338 |
|
325 | 339 |
sub set_pricegroup { |
326 | 340 |
$lxdebug->enter_sub(); |
341 |
|
|
342 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
343 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
344 |
|
|
327 | 345 |
my $rowcount = shift; |
328 | 346 |
for $j (1 .. $rowcount) { |
329 | 347 |
next unless $form->{PRICES}{$j}; |
... | ... | |
344 | 362 |
|
345 | 363 |
sub select_item { |
346 | 364 |
$lxdebug->enter_sub(); |
365 |
|
|
366 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
367 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
368 |
|
|
347 | 369 |
@column_index = qw(ndx partnumber description onhand unit sellprice); |
348 | 370 |
|
349 | 371 |
$column_data{ndx} = qq|<th> </th>|; |
... | ... | |
449 | 471 |
|
450 | 472 |
# save all other form variables |
451 | 473 |
foreach $key (keys %${form}) { |
474 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
452 | 475 |
$form->{$key} =~ s/\"/"/g; |
453 | 476 |
print qq|<input name="$key" type="hidden" value="$form->{$key}">\n|; |
454 | 477 |
} |
... | ... | |
471 | 494 |
sub item_selected { |
472 | 495 |
$lxdebug->enter_sub(); |
473 | 496 |
|
497 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
498 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
499 |
|
|
474 | 500 |
# replace the last row with the checked row |
475 | 501 |
$i = $form->{rowcount}; |
476 | 502 |
$i = $form->{assembly_rows} if ($form->{item} eq 'assembly'); |
... | ... | |
569 | 595 |
sub new_item { |
570 | 596 |
$lxdebug->enter_sub(); |
571 | 597 |
|
598 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
599 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
600 |
|
|
572 | 601 |
# change callback |
573 | 602 |
$form->{old_callback} = $form->escape($form->{callback}, 1); |
574 | 603 |
$form->{callback} = $form->escape("$form->{script}?action=display_form", 1); |
... | ... | |
580 | 609 |
push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{$_} }, qw(rowcount vc login password); |
581 | 610 |
push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{"${_}_$form->{rowcount}"} }, qw(partnumber description unit sellprice); |
582 | 611 |
push @HIDDENS, { 'name' => 'taxaccount2', 'value' => $form->{taxaccounts} }; |
612 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
583 | 613 |
|
584 | 614 |
$form->header(); |
585 | 615 |
print $form->parse_html_template("generic/new_item", { HIDDENS => [ sort { $a->{name} cmp $b->{name} } @HIDDENS ] } ); |
... | ... | |
589 | 619 |
|
590 | 620 |
sub check_form { |
591 | 621 |
$lxdebug->enter_sub(); |
622 |
|
|
623 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
624 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
625 |
|
|
592 | 626 |
my @a = (); |
593 | 627 |
my $count = 0; |
594 |
my @flds = (qw(id partnumber description qty ship sellprice unit discount inventory_accno income_accno expense_accno listprice taxaccounts bin assembly weight projectnumber project_id oldprojectnumber runningnumber serialnumber partsgroup payment_id not_discountable shop ve gv buchungsgruppen_id language_values sellprice_pg pricegroup_old price_old price_new unit_old ordnumber transdate longdescription basefactor marge_total marge_percent marge_price_factor lastcost price_factor_id)); |
|
628 |
|
|
629 |
my @flds = qw(id partnumber description qty ship sellprice unit |
|
630 |
discount inventory_accno income_accno expense_accno listprice |
|
631 |
taxaccounts bin assembly weight projectnumber project_id |
|
632 |
oldprojectnumber runningnumber serialnumber partsgroup payment_id |
|
633 |
not_discountable shop ve gv buchungsgruppen_id language_values |
|
634 |
sellprice_pg pricegroup_old price_old price_new unit_old ordnumber |
|
635 |
transdate longdescription basefactor marge_total marge_percent |
|
636 |
marge_price_factor lastcost price_factor_id); |
|
595 | 637 |
|
596 | 638 |
# remove any makes or model rows |
597 | 639 |
if ($form->{item} eq 'part') { |
598 | 640 |
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } |
599 | 641 |
qw(listprice sellprice lastcost weight rop); |
600 | 642 |
|
601 |
@flds = (make, model); |
|
602 |
for my $i (1 .. ($form->{makemodel_rows})) { |
|
603 |
if (($form->{"make_$i"} ne "") || ($form->{"model_$i"} ne "")) { |
|
604 |
push @a, {}; |
|
605 |
my $j = $#a; |
|
606 |
|
|
607 |
map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds; |
|
608 |
$count++; |
|
609 |
} |
|
610 |
} |
|
611 |
|
|
612 |
$form->redo_rows(\@flds, \@a, $count, $form->{makemodel_rows}); |
|
613 |
$form->{makemodel_rows} = $count; |
|
614 |
|
|
615 | 643 |
} elsif ($form->{item} eq 'assembly') { |
616 | 644 |
|
617 | 645 |
$form->{sellprice} = 0; |
... | ... | |
644 | 672 |
$form->redo_rows(\@flds, \@a, $count, $form->{assembly_rows}); |
645 | 673 |
$form->{assembly_rows} = $count; |
646 | 674 |
|
647 |
$count = 0; |
|
648 |
@flds = qw(make model); |
|
649 |
@a = (); |
|
650 |
|
|
651 |
for my $i (1 .. ($form->{makemodel_rows})) { |
|
652 |
if (($form->{"make_$i"} ne "") || ($form->{"model_$i"} ne "")) { |
|
653 |
push @a, {}; |
|
654 |
my $j = $#a; |
|
655 |
|
|
656 |
map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds; |
|
657 |
$count++; |
|
658 |
} |
|
659 |
} |
|
660 |
|
|
661 |
$form->redo_rows(\@flds, \@a, $count, $form->{makemodel_rows}); |
|
662 |
$form->{makemodel_rows} = $count; |
|
663 |
|
|
664 | 675 |
} elsif ($form->{item} eq 'service') { |
665 | 676 |
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(listprice sellprice lastcost); |
666 | 677 |
|
... | ... | |
716 | 727 |
sub invoicetotal { |
717 | 728 |
$lxdebug->enter_sub(); |
718 | 729 |
|
730 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
731 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
732 |
|
|
719 | 733 |
$form->{oldinvtotal} = 0; |
720 | 734 |
|
721 | 735 |
# add all parts and deduct paid |
... | ... | |
754 | 768 |
sub validate_items { |
755 | 769 |
$lxdebug->enter_sub(); |
756 | 770 |
|
771 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
772 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
773 |
|
|
757 | 774 |
# check if items are valid |
758 | 775 |
if ($form->{rowcount} == 1) { |
759 | 776 |
&update; |
... | ... | |
770 | 787 |
|
771 | 788 |
sub order { |
772 | 789 |
$lxdebug->enter_sub(); |
790 |
|
|
791 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
792 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
793 |
|
|
773 | 794 |
if ($form->{second_run}) { |
774 | 795 |
$form->{print_and_post} = 0; |
775 | 796 |
} |
... | ... | |
837 | 858 |
|
838 | 859 |
sub quotation { |
839 | 860 |
$lxdebug->enter_sub(); |
861 |
|
|
862 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
863 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
864 |
|
|
840 | 865 |
if ($form->{second_run}) { |
841 | 866 |
$form->{print_and_post} = 0; |
842 | 867 |
} |
... | ... | |
902 | 927 |
sub edit_e_mail { |
903 | 928 |
$lxdebug->enter_sub(); |
904 | 929 |
|
930 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
931 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
932 |
|
|
905 | 933 |
if ($form->{second_run}) { |
906 | 934 |
$form->{print_and_post} = 0; |
907 | 935 |
$form->{resubmit} = 0; |
... | ... | |
925 | 953 |
$form->header; |
926 | 954 |
|
927 | 955 |
my (@dont_hide_key_list, %dont_hide_key, @hidden_keys); |
928 |
@dont_hide_key_list = qw(action email cc bcc subject message sendmode format header override); |
|
956 |
@dont_hide_key_list = qw(action email cc bcc subject message sendmode format header override login password);
|
|
929 | 957 |
@dont_hide_key{@dont_hide_key_list} = (1) x @dont_hide_key_list; |
930 | 958 |
@hidden_keys = sort grep { !$dont_hide_key{$_} } grep { !ref $form->{$_} } keys %$form; |
931 | 959 |
|
... | ... | |
942 | 970 |
sub send_email { |
943 | 971 |
$lxdebug->enter_sub(); |
944 | 972 |
|
973 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
974 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
975 |
|
|
945 | 976 |
my $callback = $form->{script} . "?action=edit"; |
946 |
map({ $callback .= "\&${_}=" . E($form->{$_}); } |
|
947 |
qw(login password type id)); |
|
977 |
map({ $callback .= "\&${_}=" . E($form->{$_}); } qw(type id)); |
|
948 | 978 |
|
949 | 979 |
print_form("return"); |
950 | 980 |
|
... | ... | |
968 | 998 |
sub print_options { |
969 | 999 |
$lxdebug->enter_sub(); |
970 | 1000 |
|
1001 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1002 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | dunning_edit'); |
|
1003 |
|
|
971 | 1004 |
my %options = @_; |
972 | 1005 |
|
973 | 1006 |
# names 3 parameters and returns a hashref, for use in templates |
... | ... | |
1077 | 1110 |
sub print { |
1078 | 1111 |
$lxdebug->enter_sub(); |
1079 | 1112 |
|
1113 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1114 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | ' . |
|
1115 |
'order_request_edit_all | order_request_edit'); |
|
1116 |
|
|
1080 | 1117 |
if ($form->{print_nextsub}) { |
1081 | 1118 |
call_sub($form->{print_nextsub}); |
1082 | 1119 |
$lxdebug->leave_sub(); |
... | ... | |
1111 | 1148 |
|
1112 | 1149 |
sub print_form { |
1113 | 1150 |
$lxdebug->enter_sub(); |
1151 |
|
|
1152 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1153 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
1154 |
|
|
1114 | 1155 |
my ($old_form) = @_; |
1115 | 1156 |
|
1116 | 1157 |
$inv = "inv"; |
... | ... | |
1174 | 1215 |
if ($form->{formname} eq 'pick_list') { |
1175 | 1216 |
$inv = "ord"; |
1176 | 1217 |
$due = "req"; |
1177 |
$form->{"${inv}date"} = |
|
1178 |
($form->{transdate}) ? $form->{transdate} : $form->{invdate}; |
|
1179 |
$form->{label} = $locale->text('Pick List'); |
|
1180 |
$order = 1 unless $form->{type} eq 'invoice'; |
|
1218 |
$form->{"${inv}date"} = ($form->{transdate}) ? $form->{transdate} : $form->{invdate}; |
|
1219 |
$form->{label} = $locale->text('Pick List'); |
|
1220 |
$order = 1 unless $form->{type} eq 'invoice'; |
|
1181 | 1221 |
} |
1182 | 1222 |
if ($form->{formname} eq 'purchase_order') { |
1183 | 1223 |
$inv = "ord"; |
... | ... | |
1275 | 1315 |
$salesman_id_saved = $form->{salesman_id}; |
1276 | 1316 |
$cp_id_saved = $form->{cp_id}; |
1277 | 1317 |
|
1278 |
call_sub("$form->{vc}_details"); |
|
1318 |
call_sub("$form->{vc}_details") if ($form->{vc});
|
|
1279 | 1319 |
|
1280 | 1320 |
$form->{language_id} = $language_saved; |
1281 | 1321 |
$form->{payment_id} = $payment_id_saved; |
... | ... | |
1304 | 1344 |
($form->{employee}) = split /--/, $form->{employee}; |
1305 | 1345 |
|
1306 | 1346 |
# create the form variables |
1307 |
if ($order) { |
|
1347 |
if ($form->{formname} eq 'order_request') { |
|
1348 |
order_request_details(); |
|
1349 |
} elsif ($form->{formname} eq 'return_material_slip') { |
|
1350 |
rms_details(); |
|
1351 |
} elsif ($form->{formname} eq 'release_material_slip') { |
|
1352 |
rlms_details(); |
|
1353 |
} elsif ($form->{type} =~ /_delivery_order$/) { |
|
1354 |
DO->order_details(); |
|
1355 |
} elsif ($order) { |
|
1308 | 1356 |
OE->order_details(\%myconfig, \%$form); |
1309 | 1357 |
} else { |
1310 | 1358 |
IS->invoice_details(\%myconfig, \%$form, $locale); |
... | ... | |
1548 | 1596 |
sub post_as_new { |
1549 | 1597 |
$lxdebug->enter_sub(); |
1550 | 1598 |
|
1599 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1600 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
1601 |
|
|
1551 | 1602 |
$form->{postasnew} = 1; |
1552 | 1603 |
map { delete $form->{$_} } qw(printed emailed queued); |
1553 | 1604 |
|
... | ... | |
1558 | 1609 |
|
1559 | 1610 |
sub ship_to { |
1560 | 1611 |
$lxdebug->enter_sub(); |
1612 |
|
|
1613 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1614 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
1615 |
|
|
1561 | 1616 |
if ($form->{second_run}) { |
1562 | 1617 |
$form->{print_and_post} = 0; |
1563 | 1618 |
} |
... | ... | |
1686 | 1741 |
$form->{title} = $title; |
1687 | 1742 |
|
1688 | 1743 |
foreach $key (keys %$form) { |
1744 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
1689 | 1745 |
$form->{$key} =~ s/\"/"/g; |
1690 | 1746 |
print qq|<input type="hidden" name="$key" value="$form->{$key}">\n|; |
1691 | 1747 |
} |
... | ... | |
1709 | 1765 |
sub new_license { |
1710 | 1766 |
$lxdebug->enter_sub(); |
1711 | 1767 |
|
1768 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1769 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
1770 |
|
|
1712 | 1771 |
my $row = shift; |
1713 | 1772 |
|
1714 | 1773 |
# change callback |
... | ... | |
1724 | 1783 |
# save all other form variables in a previousform variable |
1725 | 1784 |
$form->{row} = $row; |
1726 | 1785 |
foreach $key (keys %$form) { |
1786 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
1727 | 1787 |
|
1728 | 1788 |
# escape ampersands |
1729 | 1789 |
$form->{$key} =~ s/&/%26/g; |
... | ... | |
1738 | 1798 |
map { $form->{$_} = $form->escape($form->{$_}, 1) } |
1739 | 1799 |
qw(partnumber description); |
1740 | 1800 |
$form->{callback} = |
1741 |
qq|$form->{script}?login=$form->{login}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&customer=$customer&partnumber=$form->{partnumber}&description=$form->{description}&previousform="$previousform"&initial=1|;
|
|
1801 |
qq|$form->{script}?action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&customer=$customer&partnumber=$form->{partnumber}&description=$form->{description}&previousform="$previousform"&initial=1|; |
|
1742 | 1802 |
$form->redirect; |
1743 | 1803 |
|
1744 | 1804 |
$lxdebug->leave_sub(); |
... | ... | |
1747 | 1807 |
sub relink_accounts { |
1748 | 1808 |
$lxdebug->enter_sub(); |
1749 | 1809 |
|
1810 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1811 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
1812 |
|
|
1750 | 1813 |
$form->{"taxaccounts"} =~ s/\s*$//; |
1751 | 1814 |
$form->{"taxaccounts"} =~ s/^\s*//; |
1752 | 1815 |
foreach my $accno (split(/\s*/, $form->{"taxaccounts"})) { |
... | ... | |
1766 | 1829 |
sub set_duedate { |
1767 | 1830 |
$lxdebug->enter_sub(); |
1768 | 1831 |
|
1832 |
$auth->assert('part_service_assembly_edit | vendor_invoice_edit | sales_order_edit | invoice_edit |' . |
|
1833 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit'); |
|
1834 |
|
|
1769 | 1835 |
$form->get_duedate(\%myconfig); |
1770 | 1836 |
|
1771 | 1837 |
my $q = new CGI; |
Auch abrufbar als: Unified diff
Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendung einer Authentifizierungsdatenbank.
Es ist erforderlich, die Dateien doc/UPGRADE und doc/INSTALL/index.html zu lesen und die angesprochenen Punkte auszuführen, um nach einem Upgrade weiter arbeiten zu können.