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
@@ -104,8 +104,9 @@ class InvestmentWorkflow
return null;
}
$policy = $this->requireCurrent();
$amount = $policy->includes_tax ? $quotation->total_minor : $quotation->subtotal_minor;
if ($amount > $policy->ceiling_minor || $quotation->currency !== 'MZN') {
$reference = app(QuotationExchange::class)->amounts($quotation);
$amount = $policy->includes_tax ? $reference['total_minor'] : $reference['subtotal_minor'];
if ($amount > $policy->ceiling_minor) {
throw ValidationException::withMessages(['investment' => 'O total do processo excede o tecto de investimento da empresa ou usa moeda não suportada. Não há dispensa automática.']);
}
app(EquipmentWorkflow::class)->assertTechnical($request);