mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798930 - invoices wont sequence to the next number
Because KVP can't magically cast between int64_t and double.
This commit is contained in:
parent
3d30e5978a
commit
7d5663899c
@ -457,9 +457,11 @@ GncOptionDB::save_to_kvp(QofBook* book, bool clear_options) const noexcept
|
||||
else if (is_qofinstance_ui_type(type))
|
||||
kvp = kvp_value_from_qof_instance_option(option);
|
||||
else if (type == GncOptionUIType::NUMBER_RANGE)
|
||||
/* The Gtk control uses a double so that's what we
|
||||
* have to store. */
|
||||
kvp = new KvpValue(option.template get_value<double>());
|
||||
{
|
||||
auto d_value{option.template get_value<double>()};
|
||||
auto value{static_cast<int64_t>(d_value)};
|
||||
kvp = new KvpValue(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto str{option.template get_value<std::string>()};
|
||||
|
Loading…
Reference in New Issue
Block a user