Revision 06110580
Von Sven Schöling vor fast 13 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
984 | 984 |
my $in_out = $form->{type} =~ /^sales/ ? 'out' : 'in'; |
985 | 985 |
my $sinfo = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_${i}"}); |
986 | 986 |
|
987 |
my $do_qty = AM->sum_with_unit($::form->{"qty_$i"}, $::form->{"unit_$i"}); |
|
987 | 988 |
my $sum = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $sinfo }); |
989 |
my $matches = $do_qty == $sum; |
|
988 | 990 |
|
989 | 991 |
my $content = $form->format_amount_units('amount' => $sum * 1, |
990 | 992 |
'part_unit' => $form->{"partunit_$i"}, |
991 | 993 |
'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit}, |
992 | 994 |
'conv_units' => 'convertible_not_smaller', |
993 | 995 |
'max_places' => 2); |
994 |
$content = qq|<span id="stock_in_out_qty_display_${i}">${content}</span> <input type="button" onclick="open_stock_in_out_window('${in_out}', $i);" value="?">|; |
|
996 |
$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="?">|;
|
|
995 | 997 |
|
996 | 998 |
$main::lxdebug->leave_sub(); |
997 | 999 |
|
... | ... | |
1146 | 1148 |
|
1147 | 1149 |
_stock_in_out_set_qty_display($stock_info); |
1148 | 1150 |
|
1151 |
my $do_qty = AM->sum_with_unit($::form->parse_amount(\%::myconfig, $::form->{do_qty}), $::form->{do_unit}); |
|
1152 |
my $transfer_qty = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info }); |
|
1153 |
|
|
1149 | 1154 |
$form->header(); |
1150 |
print $form->parse_html_template('do/set_stock_in_out'); |
|
1155 |
print $form->parse_html_template('do/set_stock_in_out', { |
|
1156 |
qty_matches => $do_qty == $transfer_qty, |
|
1157 |
}); |
|
1151 | 1158 |
|
1152 | 1159 |
$main::lxdebug->leave_sub(); |
1153 | 1160 |
} |
... | ... | |
1241 | 1248 |
} else { |
1242 | 1249 |
_stock_in_out_set_qty_display($stock_info); |
1243 | 1250 |
|
1251 |
my $do_qty = AM->sum_with_unit($::form->parse_amount(\%::myconfig, $::form->{do_qty}), $::form->{do_unit}); |
|
1252 |
my $transfer_qty = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info }); |
|
1253 |
|
|
1244 | 1254 |
$form->header(); |
1245 |
print $form->parse_html_template('do/set_stock_in_out'); |
|
1255 |
print $form->parse_html_template('do/set_stock_in_out', { |
|
1256 |
qty_matches => $do_qty == $transfer_qty, |
|
1257 |
}); |
|
1246 | 1258 |
} |
1247 | 1259 |
|
1248 | 1260 |
$main::lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
Lieferscheine einlagern/auslagern fragt jetzt nach, wenn die Menge nicht mit der angegeben übereinstimmt.
Zu Bug 1717.