Se reparo el error con el calculo del IVA

This commit is contained in:
Guillermo Gutierrez
2024-04-24 13:09:35 -07:00
parent 78e6cc56fc
commit 7b9ec7d798

View File

@@ -123,10 +123,10 @@ class PrinterHandler{
$this->text(str_pad(substr($producto->codigo ,0,10),11)."".str_pad($producto->linea,6)."".str_pad($producto->ruta->prefijo,5)."".str_pad(substr($producto->descripcion,0,11),12)."".str_pad(intval($producto->pivot->unidades),5)."".round($producto->pivot->precio_unitario,8)); $this->text(str_pad(substr($producto->codigo ,0,10),11)."".str_pad($producto->linea,6)."".str_pad($producto->ruta->prefijo,5)."".str_pad(substr($producto->descripcion,0,11),12)."".str_pad(intval($producto->pivot->unidades),5)."".round($producto->pivot->precio_unitario,8));
} }
// $this->text(str_pad(substr($producto->codigo,0,9),10)."".str_pad($producto->prefijo,6)."".str_pad(substr($producto->descripcion,0,14),15)."".str_pad($producto->pivot->unidades,10)."".round($producto->pivot->unidades*$producto->pivot->precio_unitario/1.16,2)); // $this->text(str_pad(substr($producto->codigo,0,9),10)."".str_pad($producto->prefijo,6)."".str_pad(substr($producto->descripcion,0,14),15)."".str_pad($producto->pivot->unidades,10)."".round($producto->pivot->unidades*$producto->pivot->precio_unitario/1.16,2));
$subTotal+=$producto->pivot->unidades*$producto->pivot->precio_unitario/1.16; $subTotal+=$producto->pivot->unidades*$producto->pivot->precio_unitario/1.08;
} }
$this->text("________________________________________________"); $this->text("________________________________________________");
$IVA = $subTotal*0.16; $IVA = $subTotal*0.08;
$total = round($subTotal+$IVA,2); $total = round($subTotal+$IVA,2);
$this->feed(1); $this->feed(1);
$this->printer->setJustification(Printer::JUSTIFY_RIGHT); $this->printer->setJustification(Printer::JUSTIFY_RIGHT);