Suponiendo que usas jQuery. He escrito el código a ciegas, no lo he probado, tendrás que retocarlo.
    
Código Javascript
:
Ver original//
// Aquí tendremos todos los objetos del DOM tr
var $rows = $('#detall > tbody tr'),
    rowsLength = $rows.length
    total = 0
    $row, $totalRow, 
    price, amount, totalProduct;
 
for (var i = 0; i < rowsLength; i++ ) {
  $row = $rows [i];
  $totalRow = $($row).find ('#importe');
 
  price = Number($($row).find('#moneda').val().split(',').join('.'));
  amount = Number($($row).find('#cantidad').val());
  totalProduct = price * amount;
 
  $totalProduct.val(totalProduct);
  total += totalProduct;
 
}