Skip to content

Commit

Permalink
[assistant-stock-transaction] input positive capgains for Credit inco…
Browse files Browse the repository at this point in the history
…me acct

In a long position, a positive capital gain indicates the unit price
has increased from Buy to Sell.

In a short position, a positive capital gain indicates the unit price
has decreased from Short Sell to Cover Buy.

i.e. when inputting capital gains, the UI amount being positive
indicates the income account has a credit value. i.e. the investor has
enjoyed a 'profit' on their transaction.
  • Loading branch information
christopherlam committed Oct 16, 2022
1 parent 95a8814 commit d27de50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnucash/gnome/assistant-stock-transaction.cpp
Expand Up @@ -292,7 +292,7 @@ static const TxnTypeVec short_types
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO, // fees_amt
false, // fees_capitalize
FieldMask::DISABLED, // dividend_amt
FieldMask::ENABLED_DEBIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capg_amt
FieldMask::ENABLED_CREDIT | FieldMask::ALLOW_ZERO | FieldMask::ALLOW_NEGATIVE, // capg_amt
// Translators: this is a stock transaction describing cover
// buying stock, and recording capital gain/loss
N_("Buy to cover short"),
Expand Down

0 comments on commit d27de50

Please sign in to comment.