From ea64acb4065030b4bd1035b018fc2040397c9ba7 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Fri, 27 Mar 2026 12:40:20 -0700 Subject: [PATCH] container: hledger-flow: paypal-business: treat cash back rebate as expense reduction NOTE: since no description is given for *which* tx receives the rebate, manual intervention is required for per-subaccount calculations (either with custom rules or calculating outside of flow). --- .../accounts/paypal-business/paypal-business-shared.rules | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.rules b/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.rules index 9283db0..5249362 100644 --- a/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.rules +++ b/container/src/hledger-flow/accounts/paypal-business/paypal-business-shared.rules @@ -1,6 +1,6 @@ # docker-finance | modern accounting for the power-user # -# Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) +# Copyright (C) 2021-2026 Aaron Fiore (Founder, Evergreen Crypto LLC) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -99,9 +99,10 @@ if %from_email [a-z0-9] if %direction ^IN$ account2 income:paypal-business:%subaccount:%currency_ +# TODO: if a rebate is ever a non-fiat asset (e.g., BTC), reconcile the taxable event (cost-basis) if %direction ^IN$ & %type ^Debit Card Cash Back Bonus$ - account2 income:paypal-business:%subaccount:rebate:%currency_ + account2 expenses:paypal-business:%subaccount:%type:%currency_ comment type:%type, balance_impact:%balance_impact, status:%status_, to_email:%to_email, txid:%txid, direction:%direction, taxed_as:REBATE # All non-income considered capital contributions (use custom rules as needed)