|
|
|
|
@@ -10,6 +10,15 @@ import { Header } from '@/components/layouts/header';
|
|
|
|
|
import { Card, CardContent, Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Input } from '@horux/shared-ui';
|
|
|
|
|
import { useAuthStore } from '@/stores/auth-store';
|
|
|
|
|
import { formatCurrency } from '@/lib/utils';
|
|
|
|
|
|
|
|
|
|
function formatCurrencyConciliacion(value: number): string {
|
|
|
|
|
return new Intl.NumberFormat('es-MX', {
|
|
|
|
|
style: 'currency',
|
|
|
|
|
currency: 'MXN',
|
|
|
|
|
minimumFractionDigits: 2,
|
|
|
|
|
maximumFractionDigits: 2,
|
|
|
|
|
}).format(value);
|
|
|
|
|
}
|
|
|
|
|
import { exportToExcel } from '@/lib/export-excel';
|
|
|
|
|
import { Eye, Download, X, CheckCircle } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
@@ -167,14 +176,14 @@ export default function ConciliacionPage() {
|
|
|
|
|
<Card>
|
|
|
|
|
<CardContent className="p-4">
|
|
|
|
|
<p className="text-sm text-muted-foreground">Monto Conciliado</p>
|
|
|
|
|
<p className="text-2xl font-bold text-success">{formatCurrency(montoConciliado)}</p>
|
|
|
|
|
<p className="text-2xl font-bold text-success">{formatCurrencyConciliacion(montoConciliado)}</p>
|
|
|
|
|
<p className="text-xs text-muted-foreground mt-1">{conciliadas.length} CFDIs</p>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
<Card>
|
|
|
|
|
<CardContent className="p-4">
|
|
|
|
|
<p className="text-sm text-muted-foreground">Monto Pendiente de Conciliar</p>
|
|
|
|
|
<p className="text-2xl font-bold text-destructive">{formatCurrency(montoPendiente)}</p>
|
|
|
|
|
<p className="text-2xl font-bold text-destructive">{formatCurrencyConciliacion(montoPendiente)}</p>
|
|
|
|
|
<p className="text-xs text-muted-foreground mt-1">{pendientes.length} CFDIs</p>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
@@ -262,7 +271,7 @@ export default function ConciliacionPage() {
|
|
|
|
|
{cfdi.nombreReceptor}
|
|
|
|
|
</td>
|
|
|
|
|
<td className="py-2 text-right text-xs font-medium">
|
|
|
|
|
{formatCurrency(getMonto(cfdi))}
|
|
|
|
|
{formatCurrencyConciliacion(getMonto(cfdi))}
|
|
|
|
|
</td>
|
|
|
|
|
<td className="py-2 text-xs">{cfdi.metodoPago || '-'}</td>
|
|
|
|
|
<td className="py-2">
|
|
|
|
|
@@ -354,7 +363,7 @@ export default function ConciliacionPage() {
|
|
|
|
|
{cfdi.nombreEmisor}
|
|
|
|
|
</td>
|
|
|
|
|
<td className="py-2 text-right text-xs font-medium">
|
|
|
|
|
{formatCurrency(getMonto(cfdi))}
|
|
|
|
|
{formatCurrencyConciliacion(getMonto(cfdi))}
|
|
|
|
|
</td>
|
|
|
|
|
<td className="py-2 text-xs">
|
|
|
|
|
{cfdi.conciliacion?.fechaDePago
|
|
|
|
|
|