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

This commit is contained in:
2026-11-21 21:04:40 +02:00
parent 976271f948
commit 12dd6df28a
108 changed files with 4391 additions and 408 deletions
+3 -2
View File
@@ -82,9 +82,10 @@ class OrderCancellationWorkflow
private function source(PurchaseOrder $order): void
{
if ($order->getRawOriginal('status') !== 'issued' || $order->currency !== 'MZN' || GoodsReceipt::query()->where('purchase_order_id', $order->id)->exists()
app(QuotationExchange::class)->orderAmounts($order, $order->subtotal_minor, $order->tax_minor);
if ($order->getRawOriginal('status') !== 'issued' || GoodsReceipt::query()->where('purchase_order_id', $order->id)->exists()
|| Invoice::query()->where('purchase_order_id', $order->id)->exists()) {
throw ValidationException::withMessages(['order' => 'Este circuito exige ordem emitida em MZN sem qualquer recepção, factura ou pagamento.']);
throw ValidationException::withMessages(['order' => 'Este circuito exige ordem emitida sem qualquer recepção, factura ou pagamento.']);
}
}