Skip to content

Commit 01adefd

Browse files
committed
remover comas en cantidades ...
Signed-off-by: Mario Oyorzabal Salgado <tuxsoul@gmail.com>
1 parent d92876c commit 01adefd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cfdi.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ private function conceptos() {
307307

308308
$elemento->setAttribute('descripcion', $concepto['descripcion']);
309309
$elemento->setAttribute('unidad', $concepto['unidad']);
310-
$elemento->setAttribute('cantidad', $concepto['cantidad']);
311-
$elemento->setAttribute('valor', $concepto['valor']);
312-
$elemento->setAttribute('importe', $concepto['importe']);
310+
$elemento->setAttribute('cantidad', str_replace(',', '', $concepto['cantidad']));
311+
$elemento->setAttribute('valorUnitario', str_replace(',', '', $concepto['valorUnitario']));
312+
$elemento->setAttribute('importe', str_replace(',', '', $concepto['importe']));
313313

314314
unset($elemento);
315315
}
@@ -321,8 +321,8 @@ private function impuestos() {
321321

322322
// se agregan subtotal y total en el nodo Comprobante
323323
$nodo = $this->dom->getElementsByTagName('Comprobante')->item(0);
324-
$nodo->setAttribute('subTotal', $datos['subTotal']);
325-
$nodo->setAttribute('total', $datos['total']);
324+
$nodo->setAttribute('subTotal', str_replace(',', '', $datos['subTotal']));
325+
$nodo->setAttribute('total', str_replace(',', '', $datos['total']));
326326

327327
// datos de impuestos
328328
$nodo = $this->dom->createElement('cfdi:Impuestos');

0 commit comments

Comments
 (0)