@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user