solve unit tests

This commit is contained in:
harshjagad20
2021-12-01 13:25:24 +05:30
parent f57fa41640
commit 88bfb38b56
33 changed files with 205 additions and 219 deletions

View File

@ -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;
}