Ejemplo n.º 1
0
if ($eucountries) {
    $additionalCountries = AkeebasubsHelperEuVATInfo::$EuropeanUnionVATInformation;
    foreach ($additionalCountries as $code => $info) {
        if (!in_array($code, $countryCodes)) {
            $countryCodes[] = $code;
        }
    }
}
if ($eubusiness && !in_array('EU-VIES', $countryCodes)) {
    $countryCodes[] = 'EU-VIES';
}
if ($international && !in_array('XX', $countryCodes)) {
    $countryCodes[] = 'XX';
}
$options = array();
$countryNames = AkeebasubsHelperSelect::getCountries();
foreach ($countryCodes as $code) {
    switch ($code) {
        case 'XX':
            $options[] = JHtml::_('select.option', $code, JText::_('MOD_AKTAXCOUNTRY_LBL_INTERNATIONAL'));
            break;
        case 'EU-VIES':
            $options[] = JHtml::_('select.option', $code, JText::_('MOD_AKTAXCOUNTRY_LBL_EUBUSINES'));
            break;
        default:
            if (array_key_exists($code, $countryNames)) {
                $options[] = JHtml::_('select.option', $code, $countryNames[$code]);
            } else {
                $options[] = JHtml::_('select.option', $code, $code);
            }
            break;