Get offline contribution-receipt fully working with preview screen
There is a long-term goal to get all templates working in the preview screen. This focusses on the backoffice contribution receipt.
Aside from the Usability benefit the process adds test cover and will eventually allow us to remove a significant amount of unreliable and hard-to-read code (even the first PR wound up removing some data leakage). It also means the templates can be fired form outside the forms and separates the logic from the forms - which is important for alternate form layers
This involves that all variables in it can be provided by the workflow-template / example combo
-
$lineItem
-> supported variable ->$lineItems
https://github.com/civicrm/civicrm-core/pull/23870 -
$getTaxDetails
- no longer used in default template https://github.com/civicrm/civicrm-core/pull/23870 -
$dataArray
-> supported variable ->$taxRateBreakdown
https://github.com/civicrm/civicrm-core/pull/23870 -
Amount before Tax - add a new token for this & use that - it is {contribution.total_amount}
-{contribution.tax_amount}
& can be added at apiv4 level - similar to https://github.com/civicrm/civicrm-core/pull/23802 -
$ccContribution
,$formValues.hidden_CreditCard
- probably of marginal value - check the specific values instead before displaying or not -
$billingName
,$address
- add billing tokens - builds on https://github.com/civicrm/civicrm-core/pull/23845 -
$credit_card_type
,$credit_card_number
,$credit_card_exp_date
- potentially Payment tokens? -
$customGroup
- propose removal #3693 (closed) -
$softCreditTypes
$softCredits
- fix is similar to line items - keep but rationalise & handle in WorkFlow Template -
$formValues.product_name
,$formValues.product_name
,$formValues.product_option
,$formValues.product_sku
$fulfilled_date
- fix is similar to line items - keep but rationalise & handle in WorkFlow Template
Note $formValues.receipt_text
REALLY IS tied to the form - as it is not stored in the DB - so that is an appropriate use of formValues.
Edited by eileen