Recording an advantage
I have a use case where my client needs to record an advantage amount and description.
Here's my analysis of what needs to happen, let me know thoughts!
- The addition of a
_cdntaxreceipts_modifyReceiptPdfhook that runs at the end of
_cdntaxreceipts_writeReceipt. This would allow developers to add additional lines on the receipt.
_cdntaxreceipts_eligiblecan't make a contribution with no deductible amount eligible. I would change:
if ( $contributionStatus == '1' && $contribution->is_test == 0 && $deductibleAmount > 0 && $hookOk )
if ( ($contributionStatus == '1' && $contribution->is_test == 0 && $deductibleAmount > 0) || $hookOk )
Thoughts? My concern on the second one is that it's breaking some expectations for users of that hook, but perhaps that could be made clear in upgrade text? It seems necessary if someone has customized their contribution statuses or needs to receipt a partially paid contribution.
I considered building support for recording advantages into the core of this extension, but the CRA requires you give a description of the advantage provided, which seems difficult to do in a generalized way.