Revision 83914eeb
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
178 | 178 |
@values = ($form->{"sellprice_$i"}, conv_i($form->{"id_$i"})); |
179 | 179 |
do_query($form, $dbh, $query, @values); |
180 | 180 |
|
181 |
$form->update_balance($dbh, "parts", "onhand", qq|id = ?|, $baseqty, $form->{"id_$i"}) if !$form->{shipped}; |
|
182 |
|
|
183 | 181 |
# check if we sold the item already and |
184 | 182 |
# make an entry for the expense and inventory |
185 | 183 |
$query = |
... | ... | |
572 | 570 |
|
573 | 571 |
next unless $ref->{inventory_accno_id}; |
574 | 572 |
|
575 |
# update onhand |
|
576 |
$form->update_balance($dbh, "parts", "onhand", qq|id = $ref->{parts_id}|, $ref->{qty}); |
|
577 |
|
|
578 | 573 |
# if $ref->{allocated} > 0 than we sold that many items |
579 | 574 |
next if ($ref->{allocated} <= 0); |
580 | 575 |
|
... | ... | |
1057 | 1052 |
$stw->finish(); |
1058 | 1053 |
chop $ref->{taxaccounts}; |
1059 | 1054 |
|
1055 |
$ref->{onhand} *= 1; |
|
1056 |
|
|
1060 | 1057 |
push @{ $form->{item_list} }, $ref; |
1061 | 1058 |
|
1062 | 1059 |
} |
Auch abrufbar als: Unified diff
Lagerverwaltung implementiert.