Revision 88583bb3
Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
|
||
$column_data{number} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{number}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{number})
|
||
. "</td>";
|
||
$column_data{partnumber} =
|
||
"<td align=$align>$ref->{partnumber} </a></td>";
|
||
... | ... | |
|
||
$column_data{onhand} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand})
|
||
. "</td>";
|
||
$column_data{sellprice} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{sellprice})
|
||
. "</td>";
|
||
$column_data{listprice} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{listprice}, 2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{listprice})
|
||
. "</td>";
|
||
$column_data{lastcost} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{lastcost}, 2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{lastcost})
|
||
. "</td>";
|
||
|
||
$column_data{linetotalsellprice} = "<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
|
||
2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice}, 2)
|
||
. "</td>";
|
||
$column_data{linetotallastcost} = "<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
|
||
2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost}, 2)
|
||
. "</td>";
|
||
$column_data{linetotallistprice} = "<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
|
||
2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice}, 2)
|
||
. "</td>";
|
||
|
||
if (!$ref->{assemblyitem}) {
|
||
... | ... | |
|
||
$column_data{rop} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{rop}, '', " ") . "</td>";
|
||
. $form->format_amount(\%myconfig, $ref->{rop}) . "</td>";
|
||
$column_data{weight} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{weight}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{weight})
|
||
. "</td>";
|
||
$column_data{unit} = "<td>$ref->{unit} </td>";
|
||
$column_data{bin} = "<td>$ref->{bin} </td>";
|
||
... | ... | |
map { $column_data{$_} = "<td> </td>" } @column_index;
|
||
$column_data{linetotalsellprice} =
|
||
"<th class=listtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $totalsellprice, 2, " ")
|
||
. $form->format_amount(\%myconfig, $totalsellprice, 2)
|
||
. "</th>";
|
||
$column_data{linetotallastcost} =
|
||
"<th class=listtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $totallastcost, 2, " ")
|
||
. $form->format_amount(\%myconfig, $totallastcost, 2)
|
||
. "</th>";
|
||
$column_data{linetotallistprice} =
|
||
"<th class=listtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $totallistprice, 2, " ")
|
||
. $form->format_amount(\%myconfig, $totallistprice, 2)
|
||
. "</th>";
|
||
|
||
print "<tr class=listtotal>";
|
||
... | ... | |
|
||
$column_data{onhand} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand})
|
||
. "</td>";
|
||
$column_data{sellprice} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{sellprice}, -2)
|
||
. "</td>";
|
||
$column_data{listprice} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{listprice}, 2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{listprice}, -2)
|
||
. "</td>";
|
||
$column_data{lastcost} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{lastcost}, 2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{lastcost}, -2)
|
||
. "</td>";
|
||
|
||
$column_data{linetotalsellprice} = "<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
|
||
2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice}, 2)
|
||
. "</td>";
|
||
$column_data{linetotallastcost} = "<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
|
||
2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost}, 2)
|
||
. "</td>";
|
||
$column_data{linetotallistprice} = "<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
|
||
2, " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice}, 2)
|
||
. "</td>";
|
||
|
||
if (!$ref->{assemblyitem}) {
|
||
... | ... | |
|
||
$column_data{rop} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{rop}, '', " ") . "</td>";
|
||
. $form->format_amount(\%myconfig, $ref->{rop}) . "</td>";
|
||
$column_data{weight} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{weight}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{weight})
|
||
. "</td>";
|
||
$column_data{unit} = "<td>$ref->{unit} </td>";
|
||
$column_data{bin} = "<td>$ref->{bin} </td>";
|
||
... | ... | |
|
||
$column_data{soldtotal} =
|
||
"<td align=right>"
|
||
. $form->format_amount(\%myconfig, $ref->{soldtotal}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{soldtotal})
|
||
. "</td>";
|
||
|
||
$column_data{deliverydate} = "<td>$ref->{deliverydate}</td>";
|
||
... | ... | |
map { $column_data{$_} = "<td> </td>" } @column_index;
|
||
$column_data{linetotalsellprice} =
|
||
"<th class=listtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $totalsellprice, 2, " ")
|
||
. $form->format_amount(\%myconfig, $totalsellprice, 2)
|
||
. "</th>";
|
||
$column_data{linetotallastcost} =
|
||
"<th class=listtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $totallastcost, 2, " ")
|
||
. $form->format_amount(\%myconfig, $totallastcost, 2)
|
||
. "</th>";
|
||
$column_data{linetotallistprice} =
|
||
"<th class=listtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $totallistprice, 2, " ")
|
||
. $form->format_amount(\%myconfig, $totallistprice, 2)
|
||
. "</th>";
|
||
|
||
print "<tr class=listtotal>";
|
||
... | ... | |
|
||
$column_data{onhand} =
|
||
"<th class=listsubtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $subtotalonhand, '', " ")
|
||
. $form->format_amount(\%myconfig, $subtotalonhand)
|
||
. "</th>";
|
||
|
||
$column_data{linetotalsellprice} =
|
||
"<th class=listsubtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $subtotalsellprice, 2, " ")
|
||
. $form->format_amount(\%myconfig, $subtotalsellprice, 2)
|
||
. "</th>";
|
||
$column_data{linetotallistprice} =
|
||
"<th class=listsubtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $subtotallistprice, 2, " ")
|
||
. $form->format_amount(\%myconfig, $subtotallistprice, 2)
|
||
. "</th>";
|
||
$column_data{linetotallastcost} =
|
||
"<th class=listsubtotal align=right>"
|
||
. $form->format_amount(\%myconfig, $subtotallastcost, 2, " ")
|
||
. $form->format_amount(\%myconfig, $subtotallastcost, 2)
|
||
. "</th>";
|
||
|
||
$subtotalonhand = 0;
|
||
... | ... | |
sub form_header {
|
||
$lxdebug->enter_sub();
|
||
|
||
my $dec = '';
|
||
|
||
#decimalplaces for listprice
|
||
($dec) = ($form->{listprice} =~ /\.(\d+)/);
|
||
$dec = length $dec;
|
||
my $decimalplaces = ($dec == 2) ? $dec : 2;
|
||
$form->{listprice} =
|
||
$form->format_amount(\%myconfig, $form->{listprice}, $decimalplaces);
|
||
|
||
#decimalplaces for sellprice and gv
|
||
($dec) = ($form->{sellprice} =~ /\.(\d+)/);
|
||
$dec = length $dec;
|
||
my $decimalplaces = ($dec == 2) ? $dec : 2;
|
||
|
||
map {
|
||
$form->{$_} =
|
||
$form->format_amount(\%myconfig, $form->{$_}, $decimalplaces)
|
||
} qw(sellprice gv);
|
||
|
||
($dec) = ($form->{lastcost} =~ /\.(\d+)/);
|
||
$dec = length $dec;
|
||
my $decimalplaces = ($dec == 2) ? $dec : 2;
|
||
|
||
$form->{lastcost} =
|
||
$form->format_amount(\%myconfig, $form->{lastcost}, $decimalplaces);
|
||
map({ $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}, -2) }
|
||
qw(sellprice listprice lastcost gv));
|
||
|
||
map { $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}) }
|
||
qw(weight rop stock);
|
||
... | ... | |
$column_data{bin} = qq|<td>$ref->{bin} </td>|;
|
||
$column_data{onhand} =
|
||
qq|<td align=right>|
|
||
. $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{onhand})
|
||
. qq|</td>|;
|
||
$column_data{rop} =
|
||
qq|<td align=right>|
|
||
. $form->format_amount(\%myconfig, $ref->{rop}, '', " ")
|
||
. $form->format_amount(\%myconfig, $ref->{rop})
|
||
. qq|</td>|;
|
||
$column_data{stock} = qq|<td width=10%><input name="qty_$i" size=10></td>|;
|
||
|
Auch abrufbar als: Unified diff
Stammdatenverwaltung: Anpassung von format_amount()-Aufrufen an die aktuell gültige Syntax. Preise nicht forciert auf zwei Stellen runden.