Trying to record a Payment Entry against a Donation, but it throws my accounts out of whack, since the donation doesn’t get added to the accounts receivable (only paid from from it).
What am I doing wrong?
Pictured: the balance sheet after a payment entry against a 180$ donation (the $7.32 is the PayPal fee, listed on the payment entry as a deduction).
Have you booked this as income at any point, either via an invoice/receipt or a journal entry? Before you take money
out of accounts receivable, you need to get it in there first.
That’s exactly what I’m trying to figure out how to do.
As I mentioned, I created a Donation, and then am issuing a Payment Entry against that, as written in the Docs. Shouldn’t the donation be the income that gets it into accounts receivable? And if not, then what am I missing?
Ah, my apologies. I didn’t realize that “Donation” referred to a doctype. I haven’t used that domain before.
Have you checked the general ledger report to verify that an income/receivable entry is being created?
It seemingly does not. But the donation exists and is linked, and even gets marked as ‘Paid’ after the payment entry is submitted.
That’s really weird. Looking at the doctype code, nothing suggests that ledger entries are being created at any point. Without ledger entries, I’m not really sure what the point of the doctype actually is, since it’s not booking the income. It shouldn’t be too difficult to add this, but right now it doesn’t do that automatically.
This file has been truncated.
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from frappe import _
from frappe.email import sendmail_to_system_managers
from frappe.model.document import Document
from frappe.utils import flt, get_link_to_form, getdate
from erpnext.non_profit.doctype.membership.membership import verify_signature
if not self.donor or not frappe.db.exists('Donor', self.donor):
# for web forms
user_type = frappe.db.get_value('User', frappe.session.user, 'user_type')
Sadly python is beyond me.
How would you suggest I handle donations then? Just ignore the nonprofit domain and treat donors as customers with an item named ‘donation’?
Yeah, that’s probably how I’d do it. In theory, it could be done with a relatively simple custom script, but I’d be reluctant to do too much customization around ledger entries.