/**
 * Module dependencies
 */
var accounting = require('accounting')
  , util = require('util')
  , currency = require('currency-symbol-map');

/**
 * formatPrice - format currency code and price nicely
 * @param {Object} value
 * @returns {String} formatted price
 * @note Value is expected to be of the form:
 *   { 
 *     CurrencyCode: [ 'EUR' ],
 *     Amount: [ '130' ] // Cents
 *   }
 */
module.exports.formatPrice = function (val) {
  var code = val && val.CurrencyCode && val.CurrencyCode[0]
    , amount = val && val.Amount && val.Amount[0];

  if (!code || !amount) return null;

  return accounting.formatMoney(amount / 100, currency(code));
};

@@ -545,18 +545,42 @@
 mount%5B0%5D
+%0A    , decimal, thousand
 ;%0A
-
 %0A  if (!
@@ -610,16 +610,168 @@
  null;%0A%0A
+  // Set separator%0A  if (~%5B'DE'%5D.indexOf(this.country)) %7B%0A    decimal = ',';%0A    thousand = '.';%0A  %7D else %7B%0A    decimal = '.';%0A    thousand = ',';%0A  %7D%0A%0A
   return
@@ -822,14 +822,36 @@
 cy(code)
+, 2, thousand, decimal
 );%0A%7D;%0A

Format prices differently for germany