Revision c7b5d49e
Von Bernd Bleßmann vor etwa 3 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
1302 | 1302 |
my $sum = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $sinfo }); |
1303 | 1303 |
my $matches = $do_qty == $sum; |
1304 | 1304 |
|
1305 |
my $content = $form->format_amount_units('amount' => $sum * 1, |
|
1306 |
'part_unit' => $form->{"partunit_$i"}, |
|
1307 |
'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit}, |
|
1308 |
'conv_units' => 'convertible_not_smaller', |
|
1309 |
'max_places' => 2); |
|
1305 |
my $amount_unit = $all_units->{$form->{"partunit_$i"}}->{base_unit}; |
|
1306 |
my $content = $form->format_amount(\%::myconfig, AM->convert_unit($amount_unit, $form->{"unit_$i"}) * $sum * 1) . ' ' . $form->{"unit_$i"}; |
|
1307 |
|
|
1310 | 1308 |
$content = qq|<span id="stock_in_out_qty_display_${i}">${content}</span><input type=hidden id='stock_in_out_qty_matches_$i' value='$matches'> <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|; |
1311 | 1309 |
|
1312 | 1310 |
$main::lxdebug->leave_sub(); |
... | ... | |
1440 | 1438 |
my $form = $::form; |
1441 | 1439 |
my $all_units = AM->retrieve_all_units(); |
1442 | 1440 |
my $sum = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info }); |
1443 |
$form->{qty_display} = $form->format_amount_units(amount => $sum * 1, |
|
1444 |
part_unit => $form->{partunit}, |
|
1445 |
amount_unit => $all_units->{ $form->{partunit} }->{base_unit}, |
|
1446 |
conv_units => 'convertible_not_smaller', |
|
1447 |
max_places => 2); |
|
1441 |
my $amount_unit = $all_units->{$form->{"partunit"}}->{base_unit}; |
|
1442 |
$form->{qty_display} = $form->format_amount(\%::myconfig, AM->convert_unit($amount_unit, $form->{"do_unit"}) * $sum * 1) . ' ' . $form->{"do_unit"}; |
|
1448 | 1443 |
} |
1449 | 1444 |
|
1450 | 1445 |
sub set_stock_in { |
... | ... | |
1498 | 1493 |
|
1499 | 1494 |
if (!$form->{delivered}) { |
1500 | 1495 |
foreach my $row (@contents) { |
1501 |
$row->{available_qty} = $form->format_amount_units('amount' => $row->{qty} * 1, |
|
1502 |
'part_unit' => $part_info->{unit}, |
|
1503 |
'conv_units' => 'convertible_not_smaller', |
|
1504 |
'max_places' => 2); |
|
1496 |
$row->{available_qty} = $form->format_amount(\%::myconfig, $row->{qty} * 1) . ' ' . $part_info->{unit}; |
|
1505 | 1497 |
|
1506 | 1498 |
foreach my $sinfo (@{ $stock_info }) { |
1507 | 1499 |
next if (($row->{bin_id} != $sinfo->{bin_id}) || |
... | ... | |
1732 | 1724 |
$binfo->{bin_description}, |
1733 | 1725 |
$request->{chargenumber} ? $locale->text('chargenumber #1', $request->{chargenumber}) : $locale->text('no chargenumber'), |
1734 | 1726 |
$request->{bestbefore} ? $locale->text('bestbefore #1', $request->{bestbefore}) : $locale->text('no bestbefore'), |
1735 |
$form->format_amount_units('amount' => $request->{sum_base_qty}, |
|
1736 |
'part_unit' => $pinfo->{unit}, |
|
1737 |
'conv_units' => 'convertible_not_smaller')); |
|
1727 |
$form->format_amount(\%::myconfig, $request->{sum_base_qty}) . ' ' . $pinfo->{unit}); |
|
1738 | 1728 |
} else { |
1739 | 1729 |
push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, for the transfer of #5.", |
1740 | 1730 |
$pinfo->{description}, |
1741 | 1731 |
$binfo->{warehouse_description}, |
1742 | 1732 |
$binfo->{bin_description}, |
1743 | 1733 |
$request->{chargenumber} ? $locale->text('chargenumber #1', $request->{chargenumber}) : $locale->text('no chargenumber'), |
1744 |
$form->format_amount_units('amount' => $request->{sum_base_qty}, |
|
1745 |
'part_unit' => $pinfo->{unit}, |
|
1746 |
'conv_units' => 'convertible_not_smaller')); |
|
1734 |
$form->format_amount(\%::myconfig, $request->{sum_base_qty}) . ' ' . $pinfo->{unit}); |
|
1747 | 1735 |
} |
1748 | 1736 |
} |
1749 | 1737 |
} |
Auch abrufbar als: Unified diff
Lieferscheine: Formatierung der Mengen in verschiedenen Einheiten entfernt.
Die Formatierung der Einheiten der Form "3L 510,0 ml" wurde entfernt.
Das betrifft die Spalte Lagerein- bzw. -ausgang in den Positionszeilen,
den Lagerbestand in der Auslagermaske (?) und die evtl. Fehlermeldung,
wenn beim Auslagern des Belegs nicht genug vorhanden ist.
In den Positionszeilen wird die Menge jetzt in der in der Zeile gewählten
Einheit angezeigt, in den anderen Fällen in der Einheit des Artikels.