Skip to content
Snippets Groups Projects
Commit e50cc25c authored by Ryan Szrama's avatar Ryan Szrama
Browse files

Issue #1136866 by hunziker: fix the option group handling of VAT taxes on the...

Issue #1136866 by hunziker: fix the option group handling of VAT taxes on the product edit form when only a single tax rate exists and there are multiple price fields on the form.
parent e47deade
No related branches found
Tags 6.x-2.0-beta2
No related merge requests found
......@@ -363,18 +363,13 @@ function commerce_tax_field_attach_form($entity_type, $entity, &$form, &$form_st
}
}
// If there is only one option group, flatten the options array.
if (count($options) == 1) {
$options = reset($options);
}
$form[$key][$form[$key]['#language']][$delta]['currency_code']['#title'] = ' ';
$form[$key][$form[$key]['#language']][$delta]['include_tax'] = array(
'#type' => 'select',
'#title' => t('Include tax in this price'),
'#description' => t('Saving prices tax inclusive will bypass later calculations for the specified tax.'),
'#options' => $options,
'#options' => count($options) == 1 ? reset($options) : $options,
'#default_value' => $default,
'#required' => FALSE,
'#empty_value' => '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment