descuentosGlobalesFactura.js 417 Bytes
module.exports = function(comprobante, returnFloatByDecimals) {

  var comrpobanteArr = comprobante.split(';');

  return {
    descripcionDescuentoOIntereses: comrpobanteArr[1],
    porcentaje: returnFloatByDecimals(comrpobanteArr[2], 2),
    importeBase: returnFloatByDecimals(comrpobanteArr[3], 2),
    importe: returnFloatByDecimals(comrpobanteArr[4]),
    ClasificadorDescuentoOInteres: comrpobanteArr[5]
  };
}