Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/wf_crm_webform_base.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ abstract class wf_crm_webform_base {
return $this->_contribution_page;

case 'tax_rate':
$taxSettings = wf_crm_get_civi_setting('contribution_invoice_settings');
if (is_array($taxSettings) && !empty($taxSettings['invoicing'])) {
$taxInvoiceSetting = wf_crm_get_civi_setting('invoicing');
if (!empty($taxInvoiceSetting)) {
Comment thread
shahrukh-compuco marked this conversation as resolved.
if ($this->contribution_page) {
// tax integration
$taxRates = CRM_Core_PseudoConstant::getTaxRates();
Expand Down
7 changes: 4 additions & 3 deletions includes/wf_crm_webform_preprocess.inc
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,11 @@ class wf_crm_webform_preprocess extends wf_crm_webform_base {

if (!is_null($itemTaxRate)) {
// Change the line item label to display the tax rate it contains
$taxSettings = wf_crm_get_civi_setting('contribution_invoice_settings');
$taxDisplaySetting = wf_crm_get_civi_setting('tax_display_settings');
$taxTerm = wf_crm_get_civi_setting('tax_term');

if (($taxSettings['tax_display_settings'] != 'Do_not_show') && ($itemTaxRate !== 0)) {
$item['label'] .= ' (' . t('includes !rate @tax', ['!rate' => (float)$itemTaxRate . '%', '@tax' => $taxSettings['tax_term']]) . ')';
if (($taxDisplaySetting != 'Do_not_show') && ($itemTaxRate !== 0)) {
$item['label'] .= ' (' . t('includes !rate @tax', ['!rate' => (float)$itemTaxRate . '%', '@tax' => $taxTerm]) . ')';
Comment thread
shahrukh-compuco marked this conversation as resolved.
}

// Add calculation for financial type that contains tax
Expand Down