Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 88583bb3

Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt

  • ID 88583bb350e24b54422269fc36d6fd740c9c0b98
  • Vorgänger 377ff409
  • Nachfolger 8f98fc19

Stammdatenverwaltung: Anpassung von format_amount()-Aufrufen an die aktuell gültige Syntax. Preise nicht forciert auf zwei Stellen runden.

Unterschiede anzeigen:

bin/mozilla/ic.pl
$column_data{number} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{number}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{number})
. "</td>";
$column_data{partnumber} =
"<td align=$align>$ref->{partnumber}&nbsp;</a></td>";
......
$column_data{onhand} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{onhand})
. "</td>";
$column_data{sellprice} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{sellprice}, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{sellprice})
. "</td>";
$column_data{listprice} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{listprice}, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{listprice})
. "</td>";
$column_data{lastcost} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{lastcost}, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{lastcost})
. "</td>";
$column_data{linetotalsellprice} = "<td align=right>"
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
2, "&nbsp;")
. $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, "&nbsp;")
. $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, "&nbsp;")
. $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}, '', "&nbsp;") . "</td>";
. $form->format_amount(\%myconfig, $ref->{rop}) . "</td>";
$column_data{weight} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{weight}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{weight})
. "</td>";
$column_data{unit} = "<td>$ref->{unit}&nbsp;</td>";
$column_data{bin} = "<td>$ref->{bin}&nbsp;</td>";
......
map { $column_data{$_} = "<td>&nbsp;</td>" } @column_index;
$column_data{linetotalsellprice} =
"<th class=listtotal align=right>"
. $form->format_amount(\%myconfig, $totalsellprice, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $totalsellprice, 2)
. "</th>";
$column_data{linetotallastcost} =
"<th class=listtotal align=right>"
. $form->format_amount(\%myconfig, $totallastcost, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $totallastcost, 2)
. "</th>";
$column_data{linetotallistprice} =
"<th class=listtotal align=right>"
. $form->format_amount(\%myconfig, $totallistprice, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $totallistprice, 2)
. "</th>";
print "<tr class=listtotal>";
......
$column_data{onhand} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{onhand})
. "</td>";
$column_data{sellprice} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{sellprice}, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{sellprice}, -2)
. "</td>";
$column_data{listprice} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{listprice}, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{listprice}, -2)
. "</td>";
$column_data{lastcost} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{lastcost}, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{lastcost}, -2)
. "</td>";
$column_data{linetotalsellprice} = "<td align=right>"
. $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
2, "&nbsp;")
. $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, "&nbsp;")
. $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, "&nbsp;")
. $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}, '', "&nbsp;") . "</td>";
. $form->format_amount(\%myconfig, $ref->{rop}) . "</td>";
$column_data{weight} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{weight}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{weight})
. "</td>";
$column_data{unit} = "<td>$ref->{unit}&nbsp;</td>";
$column_data{bin} = "<td>$ref->{bin}&nbsp;</td>";
......
$column_data{soldtotal} =
"<td align=right>"
. $form->format_amount(\%myconfig, $ref->{soldtotal}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{soldtotal})
. "</td>";
$column_data{deliverydate} = "<td>$ref->{deliverydate}</td>";
......
map { $column_data{$_} = "<td>&nbsp;</td>" } @column_index;
$column_data{linetotalsellprice} =
"<th class=listtotal align=right>"
. $form->format_amount(\%myconfig, $totalsellprice, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $totalsellprice, 2)
. "</th>";
$column_data{linetotallastcost} =
"<th class=listtotal align=right>"
. $form->format_amount(\%myconfig, $totallastcost, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $totallastcost, 2)
. "</th>";
$column_data{linetotallistprice} =
"<th class=listtotal align=right>"
. $form->format_amount(\%myconfig, $totallistprice, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $totallistprice, 2)
. "</th>";
print "<tr class=listtotal>";
......
$column_data{onhand} =
"<th class=listsubtotal align=right>"
. $form->format_amount(\%myconfig, $subtotalonhand, '', "&nbsp;")
. $form->format_amount(\%myconfig, $subtotalonhand)
. "</th>";
$column_data{linetotalsellprice} =
"<th class=listsubtotal align=right>"
. $form->format_amount(\%myconfig, $subtotalsellprice, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $subtotalsellprice, 2)
. "</th>";
$column_data{linetotallistprice} =
"<th class=listsubtotal align=right>"
. $form->format_amount(\%myconfig, $subtotallistprice, 2, "&nbsp;")
. $form->format_amount(\%myconfig, $subtotallistprice, 2)
. "</th>";
$column_data{linetotallastcost} =
"<th class=listsubtotal align=right>"
. $form->format_amount(\%myconfig, $subtotallastcost, 2, "&nbsp;")
. $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}&nbsp;</td>|;
$column_data{onhand} =
qq|<td align=right>|
. $form->format_amount(\%myconfig, $ref->{onhand}, '', "&nbsp;")
. $form->format_amount(\%myconfig, $ref->{onhand})
. qq|</td>|;
$column_data{rop} =
qq|<td align=right>|
. $form->format_amount(\%myconfig, $ref->{rop}, '', "&nbsp;")
. $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