<?php

  error_reporting(E_ALL);
  ini_set('display_errors', 1);

  $Position = '../../../';
  require_once($Position.'funciones/funciones.php');

  /*$Total = $SubTotal + $TotalImpuesto;
  $whole = floor($Total);      // 1
  $fraction = $Total - $whole; // .25*/
  echo $Total = "16500.5048";
  echo "<br />";
  echo $whole = floor($Total);
  echo "<br />";
  echo $fraction = $Total - $whole;
  echo "<br />";
  echo $letras = NumeroALetras::convertir($Total, 'pesos');




?>


<div style="margin-right:20px;"><?php
$Total = $Subtotal + $TotalImpuesto;

$whole = floor($Total);      // 1
$fraction = $Total - $whole; // .25

$letras = NumeroALetras::convertir($whole, 'pesos');
echo str_replace(" ","&nbsp;",$letras);
echo "&nbsp;";
if( $fraction == 0 ){ $fraction = '00';}
$fraction  = number_format($fraction,2,'.',',');
$fraction = ltrim($fraction,'0.');
if( $fraction ){ echo $fraction; }else{ echo "00"; }
echo '/100';
?>&nbsp;M.N.</div>
