Revision 2952e413
Von G. Richardson vor fast 14 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
1251 | 1251 |
my $transdate = $form->{invdate} ? $dbh->quote($form->{invdate}) : "current_date"; |
1252 | 1252 |
my $taxzone_id = $form->{"taxzone_id"} * 1; |
1253 | 1253 |
my $query = |
1254 |
qq|SELECT i.id, i.trans_id, i.base_qty, i.allocated, i.sellprice, |
|
1254 |
qq|SELECT i.id, i.trans_id, i.base_qty, i.allocated, i.sellprice, i.price_factor,
|
|
1255 | 1255 |
c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from AS inventory_valid, |
1256 | 1256 |
c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from AS income_valid, |
1257 | 1257 |
c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from AS expense_valid |
... | ... | |
1277 | 1277 |
|
1278 | 1278 |
# total expenses and inventory |
1279 | 1279 |
# sellprice is the cost of the item |
1280 |
my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ( $basefactor || 1 ), 2);
|
|
1280 |
my $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / ($ref->{price_factor} * ( $basefactor || 1 )), 2);
|
|
1281 | 1281 |
|
1282 | 1282 |
if (!$main::eur) { |
1283 | 1283 |
$ref->{expense_accno} = ($form->{"expense_accno_$row"}) ? $form->{"expense_accno_$row"} : $ref->{expense_accno}; |
Auch abrufbar als: Unified diff
cogs-Bug behoben
price_factor wurde bei Warenbestandsbuchung nicht berücksichtigt. Wurde die
Ware z.B. mit "pro 100" eingekauft war die Bestandsbuchung um das 100fache zu
groß.
Ist das basefactor noch nötig?