How to set the price without decimals? in my store, I want to set the products price without decimals,
e.g. "$500.00" ==> "$500"
I put following codes in the template.php:

function roomify_travel_commerce_currency_info_alter(&amp;$currencies){
  $currencies['TWD']['format_callback'] = 'roomify_travel_commerce_currency_format';
}

function roomify_travel_commerce_currency_format($amount, $currency, $object = NULL, $convert = TRUE) {
  $price = number_format(commerce_currency_round(abs($amount), $currency), 0, $currency['decimal_separator'], $currency['thousands_separator']);

  $replacements = array(
    '@code_before' =&gt; $currency['code_placement'] == 'before' ? $currency['code'] : '',
    '@symbol_before' =&gt; $currency['symbol_placement'] == 'before' ? $currency['symbol'] : '',
    '@price' =&gt; $price,
    '@symbol_after' =&gt; $currency['symbol_placement'] == 'after' ? $currency['symbol'] : '',
    '@code_after' =&gt; $currency['code_placement'] == 'after' ? $currency['code'] : '',
    '@negative' =&gt; $amount &lt; 0 ? '-' : '',
    '@symbol_spacer' =&gt; $currency['symbol_spacer'],
    '@code_spacer' =&gt; $currency['code_spacer'],
  );

    return trim(t('@code_before@code_spacer@negative@symbol_before@price@symbol_spacer@symbol_after@code_spacer@code_after', $replacements));
}


then the price became correct, but my admin page was broke!
and apache error log showed:

[Thu Feb 09 07:20:41.168665 2017] [proxy_fcgi:error] [pid 25564:tid 139845024192256] [client **.**.**.**:40368] AH01071: Got error 'PHP message: PHP Fatal error:  Call to undefined function mytheme_currency_format() in /opt/bitnami/apps/drupal/htdocs/profiles/roomify/modules/contrib/commerce/commerce.module on line 641\n', referer: http://**.**.**.**/drupal/?q=admin


please tell me where I went wrong! thank you!!
Your callback function is in your theme's template.php file, which is only loaded when that theme is being used.

I'm assuming your admin backend uses a different theme, so it can't find your callback function on admin pages.

The best solution would be to move the logic into a custom module; it's not theme related functionality so best practice would be to move it there anyway, even if it wasn't causing a problem.