Bug 722123 - Zero price entry added to price database on stock purchase

Ensure that a 0 price isn't written from the stock register.
This commit is contained in:
John Ralls 2014-02-22 17:53:27 -08:00
parent d0766a6bb4
commit e421123ef7

View File

@ -2247,6 +2247,7 @@ gnc_split_register_auto_calc (SplitRegister *reg, Split *split)
cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout, cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout,
PRIC_CELL); PRIC_CELL);
price = gnc_price_cell_get_value (cell); price = gnc_price_cell_get_value (cell);
if (price > 0)
record_price (reg, account, price); record_price (reg, account, price);
} }
return TRUE; return TRUE;