Your trouble with the orphanage contributions stems from the fact that you were not spending money from the bank account. A Spend Money transaction credits the bank account, representing the actual removal of money from the company, which did not happen. It must be balanced by a debit, and debits drive liability accounts in the negative direction. So you say a negative balance.
Your contributions to the orphanage are not a reduction of revenue or income. Yes, they do offset the income account involved as far as net profit is concerned. But they are really an expense, a donation. From an accounting standpoint, they are actually unconnected in any way with the revenue from the particular source you mentioned. You just happen to base your planned donations on that source. Depending on your form of organization and local tax laws, they might not even be deductible for tax purposes. They may be charitable donations. Or they may be advertising, since you presumably derive some public relations benefit from them. Competent tax and legal advisors can resolve those issues.
From Manager’s perspective, I would handle the situation this way:
Periodically (this could be at every income transaction from the designated revenue source, or once a month, or once a year), use a journal entry to debit an expense account named something like Accrued Donations and credit a liability account with a similar name. This liability accounts functions much like Accounts Payable, but for the orphanage.
When the accrued donations reach sufficient value, Spend Money from a bank account (this is crediting the bank account) and allocate the payment to the Accrued Donations liability account (this is debiting that account). Because you built up the balance over time, this account will now never by negative. Your payment to the orphanage will zero it out.
By journal entry, debit an expense account named something like Donations and credit Accrued Donations. This makes it clear that the amounts set aside for the orphanage have actually been paid.
Now, that is a lot of work, but it gives you visibility along the way. A more streamlined method is to simply monitor the revenue coming from the designated source so you can keep track of what the designated percentage comes up to. When it is large enough, Spend Money and allocate the transaction to the Donations account. One step, but no formal interim visibility.
Some accountants would probably maintain that the liability account approach is incorrect, because you have no legal obligation to pay money to the orphanage (unless you actually have an enforceable contract with the orphanage). They would say that from an accounting perspective, you are just making decisions to donate to a charitable cause on a regular basis. Whether that is considered a normal, necessary, and therefore allowable cost of business is for local experts to decide. If it is not, the owner(s) can still decide to do with profits whatever they wish. Again, depending on local law, that might be more advantageous.