admin/controllers/Invoice.php
public function _callbackValidCurrency($sCode)
    {
        $oFormValidation = Factory::service('FormValidation');
        $oFormValidation->set_message('_callbackValidCurrency', 'Invalid currency.');

        $oCurrency = Factory::service('Currency', 'nails/module-currency');
        $aEnabled  = $oCurrency->getAllEnabled();

        foreach ($aEnabled as $oCurrency) {
            if ($oCurrency->code === $sCode) {
                return true;
            }
        }

        return false;
    }
public function _callbackValidCurrency($sCode)
    {
        $oFormValidation = Factory::service('FormValidation');
        $oFormValidation->set_message('_callbackValidCurrency', 'Invalid currency.');

        $oCurrency = Factory::service('Currency', 'nails/module-currency');
        $aEnabled  = $oCurrency->getAllEnabled();

        foreach ($aEnabled as $oCurrency) {
            if ($oCurrency->code === $sCode) {
                return true;
            }
        }

        return false;
    }
public function _callbackValidCurrency ( $ sCode ) { $ oFormValidation = Factory :: service ( 'FormValidation' ) ; $ oFormValidation -> set_message ( '_callbackValidCurrency' , 'Invalid currency.' ) ; $ oCurrency = Factory :: service ( 'Currency' , 'nails/module-currency' ) ; $ aEnabled = $ oCurrency -> getAllEnabled ( ) ; foreach ( $ aEnabled as $ oCurrency ) { if ( $ oCurrency -> code === $ sCode ) { return true ; } } return false ; }
Form validation cal;back to validate currency selection

@param string $sCode the currency code

@return bool
@throws \Nails\Common\Exception\FactoryException
Form validation cal ; back to validate currency selection