[assistant-stock-transaction] in sell/cover-buy the cash may be zero.

this may occur if the broker fee equals the total sale from the sale
of shares.
pull/2052/head
Christopher Lam 1 year ago
parent 996ce3a03e
commit 8b9865ee88

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

Loading…
Cancel
Save