@@ -48,10 +48,12 @@ export default function Invoices({
|
||||
invoices,
|
||||
orders,
|
||||
canManage,
|
||||
payablesAvailable = false,
|
||||
}: {
|
||||
invoices: Page<Invoice>;
|
||||
orders: { id: number; number: string; supplier: string; items: Source[] }[];
|
||||
canManage: boolean;
|
||||
payablesAvailable?: boolean;
|
||||
}) {
|
||||
const { auth } = usePage().props;
|
||||
const [orderId, setOrderId] = useState('');
|
||||
@@ -69,6 +71,7 @@ export default function Invoices({
|
||||
return (
|
||||
<>
|
||||
<Head title="Facturas" />
|
||||
{payablesAvailable && <a className="m-6 inline-block underline" href="/obrigacoes-fornecedores">Obrigações a fornecedores — ensaio sintético</a>}
|
||||
<div className="mx-auto grid w-full max-w-6xl gap-6 p-6">
|
||||
<PageTitle
|
||||
eyebrow="SGC · Finanças"
|
||||
@@ -282,6 +285,13 @@ export default function Invoices({
|
||||
{money(invoice.tax_minor)} · Total{' '}
|
||||
{money(invoice.total_minor)}
|
||||
</p>
|
||||
{payablesAvailable && (
|
||||
<p className="my-3">
|
||||
<a className="underline" href={`/obrigacoes-fornecedores?invoice=${invoice.id}`}>
|
||||
Consultar ou preparar obrigação desta factura
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
<ul className="my-3 space-y-2">
|
||||
{invoice.items.map((l) => (
|
||||
<li key={l.id}>
|
||||
|
||||
Reference in New Issue
Block a user