hledger-flow: coinbase: Coinbase Trade: remove comment2 overwrite
- Use Buy total for cost-basis instead of subtotal overwrite - Remove redundant Sell overwrite Fixup to pull request #49
This commit is contained in:
@@ -359,6 +359,7 @@ if %type ^buy$
|
||||
account2 assets:coinbase:%subaccount:%buy_total_currency
|
||||
comment type:%type, status:%status_, account_id:%account_id, coinbase_id:%coinbase_id, buy_id:%buy_id, taxed_as:BUY
|
||||
comment2 %created_at +0000,BUY,coinbase,%amount_currency,%amount_amount,%buy_total_currency,%buy_total_amount,,
|
||||
# NOTE: cost-basis = proceeds + fee = %buy_total_amount (but do *NOT* include Fee/FeeCurrency column)
|
||||
|
||||
if %type ^buy$
|
||||
& %buy_total_currency ^USDC$
|
||||
@@ -373,8 +374,6 @@ if %type ^buy$
|
||||
account3 assets:coinbase:%subaccount:%buy_fee_currency
|
||||
amount4 %buy_fee_amount %buy_fee_currency
|
||||
account4 expenses:coinbase:%subaccount:fees:trading:%buy_fee_currency
|
||||
comment2 %created_at +0000,BUY,coinbase,%amount_currency,%amount_amount,%buy_subtotal_currency,%buy_subtotal_amount,,
|
||||
# NOTE: cost-basis = proceeds + fee = %buy_subtotal_amount (but do *NOT* include Fee/FeeCurrency column)
|
||||
|
||||
if %type ^buy$
|
||||
& %buy_payment_method_name [a-z]
|
||||
@@ -405,6 +404,7 @@ if %type ^sell$
|
||||
account2 assets:coinbase:%subaccount:%sell_total_currency
|
||||
comment type:%type, status:%status_, account_id:%account_id, coinbase_id:%coinbase_id, sell_id:%sell_id, taxed_as:SELL
|
||||
comment2 %created_at +0000,SELL,coinbase,%amount_currency,%amount_amount,%sell_total_currency,%sell_total_amount,,
|
||||
# NOTE: cost-basis = sale - fee = %sell_total_amount (but do *NOT* include Fee/FeeCurrency column)
|
||||
|
||||
if %type ^sell$
|
||||
& %sell_total_currency ^USDC$
|
||||
@@ -419,8 +419,6 @@ if %type ^sell$
|
||||
account3 assets:coinbase:%subaccount:%sell_fee_currency
|
||||
amount4 %sell_fee_amount %sell_fee_currency
|
||||
account4 expenses:coinbase:%subaccount:fees:trading:%sell_fee_currency
|
||||
comment2 %created_at +0000,SELL,coinbase,%amount_currency,%amount_amount,%sell_total_currency,%sell_total_amount,,
|
||||
# NOTE: cost-basis = sale minus fee = %sell_total_amount (but do *NOT* include Fee/FeeCurrency column)
|
||||
|
||||
if %type ^sell$
|
||||
& %sell_payment_method_name [a-z]
|
||||
|
||||
Reference in New Issue
Block a user