mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 734183 - Set value to zero before calling gnc_exp_parser_parse.
This commit is contained in:
parent
f160937681
commit
240e36f73b
@ -709,7 +709,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
|||||||
gncEntrySetDateEntered (entry, today);
|
gncEntrySetDateEntered (entry, today);
|
||||||
gncEntrySetDescription (entry, desc);
|
gncEntrySetDescription (entry, desc);
|
||||||
gncEntrySetAction (entry, action);
|
gncEntrySetAction (entry, action);
|
||||||
|
value = gnc_numeric_zero();
|
||||||
gnc_exp_parser_parse (quantity, &value, NULL);
|
gnc_exp_parser_parse (quantity, &value, NULL);
|
||||||
gncEntrySetQuantity (entry, value);
|
gncEntrySetQuantity (entry, value);
|
||||||
acc = gnc_account_lookup_for_register (gnc_get_current_root_account (),
|
acc = gnc_account_lookup_for_register (gnc_get_current_root_account (),
|
||||||
@ -718,6 +718,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
|||||||
if (g_ascii_strcasecmp (type, "BILL") == 0)
|
if (g_ascii_strcasecmp (type, "BILL") == 0)
|
||||||
{
|
{
|
||||||
gncEntrySetBillAccount (entry, acc);
|
gncEntrySetBillAccount (entry, acc);
|
||||||
|
value = gnc_numeric_zero();
|
||||||
gnc_exp_parser_parse (price, &value, NULL);
|
gnc_exp_parser_parse (price, &value, NULL);
|
||||||
gncEntrySetBillPrice (entry, value);
|
gncEntrySetBillPrice (entry, value);
|
||||||
gncEntrySetBillTaxable (entry, text2bool (taxable));
|
gncEntrySetBillTaxable (entry, text2bool (taxable));
|
||||||
@ -730,11 +731,13 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
|||||||
{
|
{
|
||||||
gncEntrySetNotes (entry, notes);
|
gncEntrySetNotes (entry, notes);
|
||||||
gncEntrySetInvAccount (entry, acc);
|
gncEntrySetInvAccount (entry, acc);
|
||||||
|
value = gnc_numeric_zero();
|
||||||
gnc_exp_parser_parse (price, &value, NULL);
|
gnc_exp_parser_parse (price, &value, NULL);
|
||||||
gncEntrySetInvPrice (entry, value);
|
gncEntrySetInvPrice (entry, value);
|
||||||
gncEntrySetInvTaxable (entry, text2bool (taxable));
|
gncEntrySetInvTaxable (entry, text2bool (taxable));
|
||||||
gncEntrySetInvTaxIncluded (entry, text2bool (taxincluded));
|
gncEntrySetInvTaxIncluded (entry, text2bool (taxincluded));
|
||||||
gncEntrySetInvTaxTable (entry, gncTaxTableLookupByName (book, tax_table));
|
gncEntrySetInvTaxTable (entry, gncTaxTableLookupByName (book, tax_table));
|
||||||
|
value = gnc_numeric_zero();
|
||||||
gnc_exp_parser_parse (discount, &value, NULL);
|
gnc_exp_parser_parse (discount, &value, NULL);
|
||||||
gncEntrySetInvDiscount (entry, value);
|
gncEntrySetInvDiscount (entry, value);
|
||||||
gncEntrySetInvDiscountType (entry, text2disc_type (disc_type));
|
gncEntrySetInvDiscountType (entry, text2disc_type (disc_type));
|
||||||
|
Loading…
Reference in New Issue
Block a user