Fixed default account issue..
This commit is contained in:
@ -13,22 +13,6 @@ class Account extends Form
|
||||
|
||||
public $accounts;
|
||||
|
||||
/** @var bool */
|
||||
public $hideCurrency;
|
||||
|
||||
/** @var string */
|
||||
public $formGroupClass;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(bool $hideCurrency = false, string $formGroupClass = 'sm:col-span-3') {
|
||||
$this->hideCurrency = $hideCurrency;
|
||||
$this->formGroupClass = $formGroupClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ class Contact extends Form
|
||||
|
||||
$this->contacts = Model::customer()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
|
||||
|
||||
if (!empty($model) && $model->customer && ! $this->contacts->has($model->contact_id)) {
|
||||
if (! empty($model) && $model->customer && ! $this->contacts->has($model->contact_id)) {
|
||||
$this->contacts->put($model->customer->id, $model->customer->name);
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ class Contact extends Form
|
||||
|
||||
$this->contacts = Model::vendor()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
|
||||
|
||||
if (!empty($model) && $model->vendor && ! $this->contacts->has($model->contact_id)) {
|
||||
if (! empty($model) && $model->vendor && ! $this->contacts->has($model->contact_id)) {
|
||||
$this->contacts->put($model->vendor->id, $model->vendor->name);
|
||||
}
|
||||
}
|
||||
|
@ -8,18 +8,6 @@ class Country extends Form
|
||||
{
|
||||
public $type = 'country';
|
||||
|
||||
/** @var string */
|
||||
public $formGroupClass;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(string $formGroupClass = 'sm:col-span-3') {
|
||||
$this->formGroupClass = $formGroupClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
|
Reference in New Issue
Block a user