import { controlClass } from '@/components/procurement'; export type BudgetDistributionInput = { allocation_key: string; line_id: number; centre_id: number; subtotal: string; total: string; }; export type BudgetDistributionOption = BudgetDistributionInput & { line_label: string; centre_label: string; }; export default function BudgetDistributionFields({ options, rows, onChange, reason, onReason, }: { options: BudgetDistributionOption[]; rows: BudgetDistributionInput[]; onChange: (rows: BudgetDistributionInput[]) => void; reason: string; onReason: (reason: string) => void; }) { return (
Distribuição explícita em MZN

Confira o valor sem IVA e o total de cada parcela com o documento actual. As parcelas conservam os artigos e centros aprovados. Nenhuma diferença será distribuída automaticamente.

{rows.map((row, index) => { const option = options.find( (item) => item.allocation_key === row.allocation_key, ); return (
{option?.line_label} · {option?.centre_label} {(['subtotal', 'total'] as const).map((field) => ( ))}
); })}