Skip to content

Commit

Permalink
[assistant-stock-transaction] in sell/cover-buy the cash may be zero.
Browse files Browse the repository at this point in the history
this may occur if the broker fee equals the total sale from the sale
of shares.
  • Loading branch information
christopherlam committed Dec 11, 2024
1 parent 996ce3a commit 8b9865e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnucash/gnome/assistant-stock-transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static const TxnTypeVec long_types
},
{
FieldMask::ENABLED_CREDIT | FieldMask::AMOUNT_CREDIT, // stock_amt
FieldMask::ENABLED_DEBIT, // cash_amt
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO, // cash_amt
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO, // fees_amt
FieldMask::DISABLED, // dividend_amt
FieldMask::ENABLED_CREDIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE | FieldMask::CAPGAINS_IN_STOCK, // capgains_amt
Expand Down Expand Up @@ -303,7 +303,7 @@ static const TxnTypeVec short_types
},
{
FieldMask::ENABLED_DEBIT | FieldMask::AMOUNT_DEBIT, // stock_amt
FieldMask::ENABLED_CREDIT, // cash_amt
FieldMask::ENABLED_CREDIT | FieldMask::ALLOW_ZERO, // cash_amt
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO, // fees_amt
FieldMask::DISABLED, // dividend_amt
FieldMask::ENABLED_CREDIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE | FieldMask::CAPGAINS_IN_STOCK, // capg_amt
Expand Down

0 comments on commit 8b9865e

Please sign in to comment.