mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[stock-txn-asst] Reset entry amount/value to GNC_ERROR_ARG.
When the entry has been set to a number and is later unset.
This commit is contained in:
parent
63f1b305ca
commit
ee84938276
@ -631,7 +631,10 @@ void
|
||||
StockTransactionEntry::set_value(gnc_numeric amount)
|
||||
{
|
||||
if (gnc_numeric_check (amount))
|
||||
{
|
||||
m_value = gnc_numeric_error(GNC_ERROR_ARG);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gnc_numeric_negative_p (amount))
|
||||
{
|
||||
@ -794,7 +797,10 @@ void
|
||||
StockTransactionStockEntry::set_amount(gnc_numeric amount)
|
||||
{
|
||||
if (!m_amount_enabled || gnc_numeric_check(amount))
|
||||
return;
|
||||
{
|
||||
m_amount = gnc_numeric_error(GNC_ERROR_ARG);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_input_new_balance)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user