feat(facturacion): precio unitario sin IVA en conceptos

- Cambia label de 'Precio Unitario (IVA incluido)' a 'Precio Unitario (sin IVA)'
- Elimina división interna price/(1+iva) en calcConcepto; ahora price es la base
- Cambia taxIncluded: true → false en payload enviado a backend
- Backend: tax_included default false en facturapi.service.ts y
  contribuyente-facturapi.service.ts
- Build y deploy exitosos
This commit is contained in:
Horux Dev
2026-05-22 22:23:38 +00:00
parent 1bde570035
commit 0c8ae05919
3 changed files with 5 additions and 6 deletions

View File

@@ -611,8 +611,7 @@ export default function FacturacionPage() {
// Cálculos
function calcConcepto(c: ConceptoForm) {
const trasladoRates = c.taxes.filter(t => t.category === 'traslado' && t.factor === 'Tasa').reduce((s, t) => s + t.rate, 0);
const unitPrice = trasladoRates > 0 ? c.price / (1 + trasladoRates) : c.price;
const base = unitPrice * c.quantity - c.discount;
const base = c.price * c.quantity - c.discount;
const traslados = c.taxes.filter(t => t.category === 'traslado' && t.factor === 'Tasa').reduce((s, t) => s + base * t.rate, 0);
const retenciones = c.taxes.filter(t => t.category === 'retencion').reduce((s, t) => s + base * t.rate, 0);
return { base, traslados, retenciones };
@@ -688,7 +687,7 @@ export default function FacturacionPage() {
quantity: c.quantity,
price: tipoComprobante === 'T' ? 0 : c.price,
discount: c.discount || 0,
taxIncluded: true,
taxIncluded: false,
objetoImp: c.objetoImp,
taxes: tipoComprobante === 'T' || c.objetoImp === '01' ? [] : c.taxes.map(t => ({
type: t.type,
@@ -1437,7 +1436,7 @@ export default function FacturacionPage() {
{tipoComprobante !== 'T' && (
<>
<div className="space-y-2">
<Label>Precio Unitario (IVA incluido)</Label>
<Label>Precio Unitario (sin IVA)</Label>
<Input type="number" min="0" step="0.01" value={c.price || ''} onChange={e => updateConcepto(idx, 'price', parseFloat(e.target.value) || 0)} placeholder="0.00" required />
</div>
<div className="space-y-2">