Revision eed84962
Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
789 | 789 |
|
790 | 790 |
if ($form->{l_subtotal} eq 'Y' && !$ref->{assemblyitem}) { |
791 | 791 |
if ($sameitem ne $ref->{ $form->{sort} }) { |
792 |
&parts_subtotal;
|
|
792 |
parts_subtotal(\@column_index, \$subtotalonhand, \$subtotalsellprice, \$subtotallastcost, \$subtotallistprice);
|
|
793 | 793 |
$sameitem = $ref->{ $form->{sort} }; |
794 | 794 |
} |
795 | 795 |
} |
... | ... | |
912 | 912 |
} |
913 | 913 |
|
914 | 914 |
if ($form->{l_subtotal} eq 'Y') { |
915 |
&parts_subtotal;
|
|
915 |
parts_subtotal(\@column_index, \$subtotalonhand, \$subtotalsellprice, \$subtotallastcost, \$subtotallistprice);
|
|
916 | 916 |
} #fi |
917 | 917 |
|
918 | 918 |
if ($form->{"l_linetotal"}) { |
... | ... | |
1365 | 1365 |
|
1366 | 1366 |
$auth->assert('part_service_assembly_edit'); |
1367 | 1367 |
|
1368 |
# imports |
|
1369 |
our (%column_data, @column_index); |
|
1370 |
our ($subtotalonhand, $totalsellprice, $totallastcost, $totallistprice, $subtotalsellprice, $subtotallastcost, $subtotallistprice); |
|
1368 |
my (%column_data); |
|
1369 |
my ($column_index, $subtotalonhand, $subtotalsellprice, $subtotallastcost, $subtotallistprice) = @_; |
|
1371 | 1370 |
|
1372 |
map { $column_data{$_} = "<td> </td>" } @column_index;
|
|
1373 |
$subtotalonhand = 0 if ($form->{searchitems} eq 'assembly' && $form->{bom}); |
|
1371 |
map { $column_data{$_} = "<td> </td>" } @{ $column_index };
|
|
1372 |
$$subtotalonhand = 0 if ($form->{searchitems} eq 'assembly' && $form->{bom});
|
|
1374 | 1373 |
|
1375 | 1374 |
$column_data{onhand} = |
1376 | 1375 |
"<th class=listsubtotal align=right>" |
1377 |
. $form->format_amount(\%myconfig, $subtotalonhand) |
|
1376 |
. $form->format_amount(\%myconfig, $$subtotalonhand)
|
|
1378 | 1377 |
. "</th>"; |
1379 | 1378 |
|
1380 | 1379 |
$column_data{linetotalsellprice} = |
1381 | 1380 |
"<th class=listsubtotal align=right>" |
1382 |
. $form->format_amount(\%myconfig, $subtotalsellprice, 2) |
|
1381 |
. $form->format_amount(\%myconfig, $$subtotalsellprice, 2)
|
|
1383 | 1382 |
. "</th>"; |
1384 | 1383 |
$column_data{linetotallistprice} = |
1385 | 1384 |
"<th class=listsubtotal align=right>" |
1386 |
. $form->format_amount(\%myconfig, $subtotallistprice, 2) |
|
1385 |
. $form->format_amount(\%myconfig, $$subtotallistprice, 2)
|
|
1387 | 1386 |
. "</th>"; |
1388 | 1387 |
$column_data{linetotallastcost} = |
1389 | 1388 |
"<th class=listsubtotal align=right>" |
1390 |
. $form->format_amount(\%myconfig, $subtotallastcost, 2) |
|
1389 |
. $form->format_amount(\%myconfig, $$subtotallastcost, 2)
|
|
1391 | 1390 |
. "</th>"; |
1392 | 1391 |
|
1393 |
$subtotalonhand = 0; |
|
1394 |
$subtotalsellprice = 0; |
|
1395 |
$subtotallistprice = 0; |
|
1396 |
$subtotallastcost = 0; |
|
1392 |
$$subtotalonhand = 0;
|
|
1393 |
$$subtotalsellprice = 0;
|
|
1394 |
$$subtotallistprice = 0;
|
|
1395 |
$$subtotallastcost = 0;
|
|
1397 | 1396 |
|
1398 | 1397 |
print "<tr class=listsubtotal>"; |
1399 | 1398 |
|
1400 |
map { print "\n$column_data{$_}" } @column_index;
|
|
1399 |
map { print "\n$column_data{$_}" } @{ $column_index };
|
|
1401 | 1400 |
|
1402 | 1401 |
print qq| |
1403 | 1402 |
</tr> |
... | ... | |
1590 | 1589 |
my (@column_index); |
1591 | 1590 |
my ($nochange, $callback, $previousform, $linetotal, $line_purchase_price, $href); |
1592 | 1591 |
|
1593 |
our ($deliverydate); # ToDO: check if this indeed comes from global context |
|
1594 |
|
|
1595 | 1592 |
@column_index = qw(runningnumber qty unit bom partnumber description partsgroup lastcost total); |
1596 | 1593 |
|
1597 | 1594 |
if ($form->{previousform}) { |
... | ... | |
1679 | 1676 |
|
1680 | 1677 |
$row{lastcost}{data} = $line_purchase_price; |
1681 | 1678 |
$row{total}{data} = $linetotal; |
1682 |
$row{deliverydate}{data} = $deliverydate; |
|
1683 | 1679 |
$row{lastcost}{align} = 'right'; |
1684 | 1680 |
$row{total}{align} = 'right'; |
1685 | 1681 |
$row{deliverydate}{align} = 'right'; |
... | ... | |
1976 | 1972 |
|
1977 | 1973 |
$auth->assert('part_service_assembly_edit'); |
1978 | 1974 |
|
1979 |
our ($onload, $callback); |
|
1980 |
|
|
1981 | 1975 |
my $languages = IC->retrieve_languages(\%myconfig, $form); |
1982 | 1976 |
|
1983 | 1977 |
if ($form->{language_values} ne "") { |
... | ... | |
2002 | 1996 |
my @header = |
2003 | 1997 |
map(+{ "column_title" => $header_title{$_}, |
2004 | 1998 |
"column" => $_, |
2005 |
"callback" => $callback, |
|
2006 | 1999 |
}, |
2007 | 2000 |
@header_sort); |
2008 | 2001 |
|
2009 | 2002 |
$form->{"title"} = $locale->text("Language Values"); |
2010 | 2003 |
$form->header(); |
2011 | 2004 |
print $form->parse_html_template("ic/parts_language_selection", { "HEADER" => \@header, |
2012 |
"LANGUAGES" => $languages, |
|
2013 |
"onload" => $onload }); |
|
2005 |
"LANGUAGES" => $languages, }); |
|
2014 | 2006 |
|
2015 | 2007 |
$lxdebug->leave_sub(); |
2016 | 2008 |
} |
Auch abrufbar als: Unified diff
Globale Variablen entfernt.