dimanche 18 octobre 2020

Laravel NumberFormatter Output issue

I am trying to convert total into words and it gives me a wrong output.

I have to pass this in which is in laravel blade template into words

Here is my code

@php
    $num = $receipt_details->total;
    $f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
    echo $f->format($num);
@endphp 

The output I get is Zero for all the totals.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire