Coder Social home page Coder Social logo

php-numero-a-letras's People

Contributors

furiosojack avatar lecano avatar pedroxido avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-numero-a-letras's Issues

Función toMoney

Hola, felicitaciones por este excelente paquete, solo quería mostrarte mi caso.

   public static function getTextHas($has)
    {
        $formatter = new NumeroALetras;
        $formatter->apocope = true;
        if (intval($has) == 1) {
            $hasText = 'Hectárea';
        } else {
            $hasText = 'Hectáreas';
        }
        return self::textTitle($formatter->toMoney($has, 4, $hasText, 'Metros Cuadrados'));
    }
// $has = 2.8567
// Dos Hectáreas Con Ocho Mil Quinientos Sesenta y Siete Metros Cuadrados

Uso la función toMoney, pero no me siento cómodo con el nombre, talvez otra función más generalizada para hacer este tipo de encadenamientos.
De nuevo excelente trabajo.

Problemas con tildes

VEINTITRÉS lleva tilde, entiendo que es la unión de dos partes TRES, solo no lleva tilde pero si le unimos con VEINTI, ahora debería llevar tilde. No sé cuantos más de estos casos habrá. Si le parece, podría ser colaborador de este paquete para hacer este tipo de revisiones.

Problema de compatibilidad en Laravel

Hay alguna forma de que corra en laravel?
ya q intente implementar el paquete pero al correr la funcion toWords me manda el siguiente error

PHP Deprecated: Non-static method Luecano\NumeroALetras\NumeroALetras::toWords() should not be called statically in C:\xampp\htdocs\test\app\Helpers.php on line 35
PHP Error: Using $this when not in object context in C:\xampp\htdocs\test\vendor\luecano\numero-a-letras\src\NumeroALetras.php on line 95

a q se deberia o si no podria tratar de aportar en la solucion ya q la compatibilidad podria estar alli para usarlodentro de laravel

estoy usando laravel 8 con php 7.4.29

para q me funcione el Alias de laravel use esto

'Numero' => Luecano\NumeroALetras\NumeroALetras::class,

la forma en la q estoy invocando la funcion es la siguente:

return Numero::toWords(2022);

PHPDocs incorrect

Using PHPStorm, I saw the PHPDocs are incorrect, for example:

    /**
     * Formatea y ejecuta la función conversora con formato para facturación
     *
     * @param $number número a convertir
     * @param $decimals número de puntos decimales
     * @param $currency nombre de moneda
     * @return void
     */

In PHPDocs, that mean: $number is a type of "número".

To fix, I recommend add a type of variable in the docs or add mixed instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.