Beispiel #1
0
QString FLUtil::centenamillar( long n ) {
  QString buffer;

  if ( n < 10000 ) {
    buffer = decenasmillar( n );
    return buffer;
  }
  buffer = centenas( n / 1000 );
  buffer = buffer + " mil ";
  buffer = buffer + centenas( n % 1000 );

  return buffer;
}
Beispiel #2
0
QString FLUtil::enLetra(long n)
{
  QString buffer;

  if (n > 1000000000L) {
    buffer = QT_TR_NOOP("Sólo hay capacidad hasta mil millones");
    return buffer;
  }

  if (n < 1000000L) {
    buffer = centenamillar(n);
    return buffer;
  } else {
    if (n / 1000000L == 1)
      buffer = QT_TR_NOOP("un millon ");
    else {
      buffer = centenas((long)(n / 1000000L));
      buffer = buffer + " " + QT_TR_NOOP("millones") + " ";
    }
  }

  buffer = buffer + centenamillar(n % 1000000L);

  return buffer.upper();
}
Beispiel #3
0
QString FLUtil::decenasmillar(long n)
{
  QString buffer;

  if (n < 10000) {
    buffer = unidadesmillar(n);
    return buffer;
  }

  buffer = decenas(n / 1000);
  buffer = buffer + " " + QT_TR_NOOP("mil") + QString(" ");
  buffer = buffer + centenas(n % 10000);

  return (buffer);
}
Beispiel #4
0
QString FLUtil::unidadesmillar( long n ) {
  QString buffer;

  if ( n < 1000 )
    buffer = "";

  if ( n / 1000 == 1 )
    buffer = "mil ";

  if ( n / 1000 > 1 ) {
    buffer = unidades( n / 1000 );
    buffer = buffer + " mil ";
  }
  buffer = buffer + centenas( n % 1000 );

  return buffer;
}
Beispiel #5
0
QString FLUtil::unidadesmillar(long n)
{
  QString buffer;

  if (n < 1000)
    buffer = "";

  if (n / 1000 == 1)
    buffer = QT_TR_NOOP("mil") + QString(" ");

  if (n / 1000 > 1) {
    buffer = unidades(n / 1000);
    buffer = buffer + " " + QT_TR_NOOP("mil") + " ";
  }
  buffer = buffer + centenas(n % 1000);

  return buffer;
}