fixed transaction set contact on request witData ( #39nxc76 )
This commit is contained in:
@ -35,6 +35,18 @@ class Currency extends Form
|
||||
|
||||
$this->currencies = Model::enabled()->orderBy('name')->pluck('name', 'code');
|
||||
|
||||
$currency_id = old('currency.id', old('currency_id', null));
|
||||
|
||||
if (! empty($currency_id)) {
|
||||
$this->selected = $currency_id;
|
||||
|
||||
if (! $this->currencies->has($currency_id)) {
|
||||
$currency = Model::find($currency_id);
|
||||
|
||||
$this->currencies->put($currency->id, $currency->name);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->selected) && empty($this->getParentData('model'))) {
|
||||
$this->selected = setting('default.currency');
|
||||
}
|
||||
|
Reference in New Issue
Block a user