mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
solve unit tests
This commit is contained in:
@ -83,13 +83,15 @@ class RecurringInvoiceRequest extends FormRequest
|
||||
]
|
||||
];
|
||||
|
||||
$customerCurrency = Customer::find($this->customer_id)->currency_id;
|
||||
$customer = Customer::find($this->customer_id);
|
||||
|
||||
if ((string)$customerCurrency !== $companyCurrency) {
|
||||
$rules['exchange_rate'] = [
|
||||
'required',
|
||||
];
|
||||
};
|
||||
if ($customer && $companyCurrency) {
|
||||
if ((string)$customer->currency_id !== $companyCurrency) {
|
||||
$rules['exchange_rate'] = [
|
||||
'required',
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user