commit compras1 2811
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-28 07:11:35 +02:00
parent d58b75c87a
commit eb32c74c56
202 changed files with 17463 additions and 1526 deletions
@@ -0,0 +1,46 @@
import { Panel } from '@/components/procurement';
import { exactMinorAmount } from '@/components/procurement-payable-insights';
export type FrozenAccountAssignment = {
version: number;
snapshot: { line: { description: string } };
data: {
allocations: {
account: { id: number; code: string; label: string };
subtotal_minor: string;
total_minor: string;
}[];
};
};
export default function RequisitionAccountSummary({
records,
}: {
records?: Record<string, FrozenAccountAssignment>;
}) {
if (!records || Object.keys(records).length === 0) return null;
return (
<Panel
title="Contas da necessidade original"
description="Imputação da requisição conservada na emissão. As parcelas originais não representam valores contabilizados nem um rateio desta ordem parcial."
>
{Object.entries(records).map(([id, row]) => (
<section key={id} className="mb-4">
<h3 className="font-semibold">
{row.snapshot.line.description} · Versão {row.version}
</h3>
<ul>
{row.data.allocations.map((part) => (
<li key={part.account.id} className="break-words">
{part.account.code} · {part.account.label} ·
Base sem IVA:{' '}
{exactMinorAmount(part.subtotal_minor, 'MZN')} ·
Total:{' '}
{exactMinorAmount(part.total_minor, 'MZN')}
</li>
))}
</ul>
</section>
))}
</Panel>
);
}