mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-30 21:21:09 -04:00 
			
		
		
		
	solve unit tests
This commit is contained in:
		| @ -65,13 +65,15 @@ class PaymentRequest extends FormRequest | ||||
|  | ||||
|         $companyCurrency = CompanySetting::getSetting('currency', $this->header('company')); | ||||
|  | ||||
|         $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