-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to post a LedgerEntry with cash
and long-term notes payable
#240
Comments
This change may be related 9cf5161#diff-e87e7cb3044355d202364afd9ea5674cf814050b951c8ca9c1a1720ba3173b16 |
One idea is to enhance the logic below: django-ledger/django_ledger/models/journal_entry.py Lines 947 to 949 in 0486004
With something like:
But it will return with no activity set, which is better than through the unexpected exception. Later we can enhance the logic to come up with a better way to determine the activity type. The other option is to pass the |
(This isn't happening with short-term notes payable accounts, I will use those for now) |
This is not an option. Every single Journal Entry that involves cash must have an activity. Otherwise it is not possible to produce an accurate statement of cash flows. |
Thanks for the accounting education, @elarroba. It makes sense! In that case, I can prepare and submit a PR, with few comments just before raising the exception, with the reasoning and recommendation, so that others can understand why and what can they do. |
I actually added an entry twice to by-pass the validation and keeping the balance 0, as follows:
|
@iocampomx Have you tried instead of 1, to use 0.001? If I remember correctly the tolerance system should interpret that as a 0.00 in the end. |
Describe the bug
When trying to post a ledger entry that involves one cash account and one long-term note payable, it throws the error:
Multiple activities detected in roles JE {'lia_ltl_notes'}.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The ledger entry should be able to be posted without any error
Additional context
LIABILITY_LTL_NOTES_PAYABLE (lia_ltl_notes) is defined in:
Within the
get_activity_from_roles
method the following three conditions raises True:is_investing_for_ppe
, which checks forGROUP_CFS_INVESTING_PPE
is_investing_for_securities
, which checks forGROUP_CFS_INVESTING_SECURITIES
is_financing_lt_debt
, which checks forGROUP_CFS_FIN_LT_DEBT_PAYMENTS
LIABILITY_LTL_NOTES_PAYABLE
is directly and indirectly included inGROUP_CFS_INVESTING_PPE
,GROUP_CFS_INVESTING_SECURITIES
andGROUP_CFS_FIN_LT_DEBT_PAYMENTS
As such, the
get_activity_from_roles
function is raising theMultiple activities detected in roles JE {lia_ltl_notes}.
exception.I don't have the accounting background to come-up with a recommendation, but I hope this helps @elarroba or someone else to fix it :). Thanks!
The text was updated successfully, but these errors were encountered: