Revision eabcf7e4
Von Sven Schöling vor fast 11 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
1197 | 1197 |
# ... |
1198 | 1198 |
# also it doesn't make sense without bsooqr. disable and issue a warning too |
1199 | 1199 |
my @bsooqr = qw(sold bought onorder ordered rfq quoted); |
1200 |
if ($form->{l_subtotal} && 1 < grep { $form->{$_} } @bsooqr) { |
|
1200 |
my $bsooqr_mode = grep { $form->{$_} } @bsooqr; |
|
1201 |
if ($form->{l_subtotal} && 1 < $bsooqr_mode) { |
|
1201 | 1202 |
my $enabled = first { $form->{$_} } @bsooqr; |
1202 | 1203 |
$form->{$_} = '' for @bsooqr; |
1203 | 1204 |
$form->{$enabled} = 'Y'; |
1204 | 1205 |
|
1205 | 1206 |
push @options, $::locale->text('Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1', $optiontexts{$enabled}); |
1206 | 1207 |
} |
1207 |
if ($form->{l_soldtotal} && !grep { $form->{$_} } @bsooqr) {
|
|
1208 |
if ($form->{l_soldtotal} && !$bsooqr_mode) {
|
|
1208 | 1209 |
delete $form->{l_soldtotal}; |
1209 | 1210 |
|
1210 | 1211 |
flash('warning', $::locale->text('Soldtotal does not make sense without any bsooqr options')); |
... | ... | |
1323 | 1324 |
$ref->{lastcost} *= $ref->{exchangerate} / $ref->{price_factor}; |
1324 | 1325 |
|
1325 | 1326 |
# use this for assemblies |
1326 |
my $soldtotal = $ref->{soldtotal};
|
|
1327 |
my $soldtotal = $bsooqr_mode ? $ref->{soldtotal} : $ref->{onhand};
|
|
1327 | 1328 |
|
1328 | 1329 |
if ($ref->{assemblyitem}) { |
1329 | 1330 |
$row->{partnumber}{align} = 'right'; |
Auch abrufbar als: Unified diff
all_parts: Zeilensumme im normalen Lagermodus mit Lagermenge berechnen