[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:
John Ralls 2023-09-18 13:52:12 -07:00
parent 63f1b305ca
commit ee84938276

View File

@ -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)
{