Open Detsieber opened 4 months ago
I actually can't see a reason for custom search actions using Search Action Designer, as there already is a search action for contact search results (i.e. generating donation receipts for multiple contacts), see https://github.com/systopia/de.systopia.donrec/blob/7b3a011519f8512aa363c581305bcb249c4c889d/donrec.php#L39-L60
Could you provide some background for why the built-in forms don't work for you?
However, adding an API (v4) for creating donation receipts is a reasonable thing to do and should come with some refactoring of the (very) old code in this extension. This would allow for easier creation of actions for SearchKit-based searches of contacts and contributions. Something similar has been done in the CiviOffice extension, see systopia/de.systopia.civioffice#53
Refactoring should involve:
CRM_Donrec_Form_Task_Create
(which is actually not a task but a form controller used for a route), DonrecTask
and ContributeTask
in a trait (see CiviOffice's CreateDocumentsTrait
)CRM_Donrec_Logic_Selector::createSnapshot()
:
entity_type
and entity_ids
for receiving contact/contribution IDs@jensschuppe : Before civiCRM alle ZBW had be sent in paper form with a cover letter that where we easily could add personal notes. Now we switched to PFD ZWB's and it would be helpful to add personal comments to the existing eMail template. This could also be used to add seasonal greetings etc.
Using a Search action, even for a single ZWB would allow us to have all steps that we want to be done for sending out a ZWB within a single action. So the voluntieering team members do not need to recall every Single step.
It should be possible to create a donation receipt for one or many contacts using the SearchActionDesigner extension.
In order to achieve this, it probably would be necessary to create an API call to create donation receipts.