Merge branch 'akaunting:master' into master
This commit is contained in:
commit
37f59eb310
@ -34,7 +34,9 @@ class Content extends Component
|
|||||||
$this->counts = [];
|
$this->counts = [];
|
||||||
|
|
||||||
// Handle documents
|
// Handle documents
|
||||||
$this->documents = $this->contact->documents()->with('transactions')->get();
|
$docs = $this->contact->isCustomer() ? 'invoices' : 'bills';
|
||||||
|
|
||||||
|
$this->documents = $this->contact->$docs()->with('transactions')->get();
|
||||||
|
|
||||||
$this->counts['documents'] = $this->documents->count();
|
$this->counts['documents'] = $this->documents->count();
|
||||||
|
|
||||||
|
@ -37,6 +37,10 @@ class Category extends Form
|
|||||||
$this->categories->put($model->category->id, $model->category->name);
|
$this->categories->put($model->category->id, $model->category->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($model = $this->getParentData('model')) {
|
||||||
|
$this->selected = $model->category_id;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($this->selected) && (in_array($type, ['income', 'expense']))) {
|
if (empty($this->selected) && (in_array($type, ['income', 'expense']))) {
|
||||||
$this->selected = setting('default.' . $type . '_category');
|
$this->selected = setting('default.' . $type . '_category');
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,12 @@
|
|||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<x-slot name="body">
|
<x-slot name="body">
|
||||||
|
@if (empty($document))
|
||||||
|
<x-form.group.recurring :type="$type" @started="onChangeRecurringDate()" />
|
||||||
|
@else
|
||||||
<x-form.group.recurring
|
<x-form.group.recurring
|
||||||
:type="$type"
|
:type="$type"
|
||||||
@started="onChangeRecurringDate"
|
@started="onChangeRecurringDate()"
|
||||||
:frequency="$document ? $document->recurring->frequency : null"
|
:frequency="$document ? $document->recurring->frequency : null"
|
||||||
:custom-frequency="$document ? $document->recurring->custom_frequency : null"
|
:custom-frequency="$document ? $document->recurring->custom_frequency : null"
|
||||||
:limit="$document ? $document->recurring->limit_by : null"
|
:limit="$document ? $document->recurring->limit_by : null"
|
||||||
@ -14,5 +17,6 @@
|
|||||||
:limit-count="$document ? $document->recurring->limit_count : null"
|
:limit-count="$document ? $document->recurring->limit_count : null"
|
||||||
:limit-date-value="$document ? $document->recurring->limit_date : null"
|
:limit-date-value="$document ? $document->recurring->limit_date : null"
|
||||||
/>
|
/>
|
||||||
|
@endif
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-form.section>
|
</x-form.section>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user