Add Tax to the email and pdf document
-
I need a mathematical field 🙂 in the html/pdf.
I need to calculate 19% tax in the amount of the donor and tried it with custom code.Can someone help me?
After this line:
Amount: {price}
I need something like:
tax within this amount 19%: {price/119*100}So I used custom code but when I use it there is a still no output?
// function für neuen tag hinzufügen
function my_custom_prefix_add_sample_referral_tag( $payment_id ) {
give_add_email_tag( ‘referral’, ‘This tag can be used to output the custom referral field’, ‘my_custom_prefix_get_donation_referral_data’ );
}// neuen tag hinzufügen
add_action( ‘give_add_email_tags’, ‘my_custom_prefix_add_sample_referral_tag’ );// die function welche dann entsprchend ersetzt
function my_custom_prefix_get_donation_referral_data( $payment_id ) {
$payment_meta = give_get_payment_meta( $payment_id );
$output = $payment_meta[‘price’] * 100 / 119; // like this
return $output;
}
- The topic ‘Add Tax to the email and pdf document’ is closed to new replies.