commit compras 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 13:49:31 +02:00
parent dc73540558
commit e709d900d1
81 changed files with 5352 additions and 107 deletions
+2 -1
View File
@@ -125,7 +125,8 @@ class InvoiceWorkflow
}
}
$invoice = new Invoice(['tenant_id' => $user->tenant_id, 'purchase_order_id' => $order->id, 'supplier_id' => $order->supplier_id, 'created_by' => $user->id, 'number' => $number, 'issued_on' => $data['issued_on'], 'subtotal_minor' => $subtotal, 'tax_minor' => $tax, 'total_minor' => $subtotal + $tax, 'snapshot' => ['supplier' => $order->snapshot['supplier'], 'order_number' => $order->number, 'author' => $user->only(['id', 'name']), 'currency' => $order->currency,
...($order->currency === 'MZN' ? [] : ['exchange_basis' => $order->snapshot['exchange_basis']]),
...($order->currency === 'MZN' ? [] : ['exchange_basis' => $order->snapshot['exchange_basis'],
...(OrderPartsAccess::applies($order) ? ['exchange_sources' => $order->snapshot['exchange_sources']] : [])]),
'development_only' => true, 'matching_tolerance' => 'zero', 'rounding' => 'cumulative_half_up']]);
if (app(RequisitionBudgetDistributions::class)->applies($request)) {
$distribution = app(InvoiceBudgetDistributions::class)->prepare($user, $invoice, $order, $data, $lines);