Merge pull request #3269 from CihanSenturk/add-recurring-transaction-tax
Added recurring transaction tax
This commit is contained in:
commit
e06a26d62e
|
|
@ -13,6 +13,7 @@ use App\Models\Banking\Account;
|
|||
use App\Models\Banking\Transaction;
|
||||
use App\Models\Common\Recurring;
|
||||
use App\Models\Setting\Currency;
|
||||
use App\Models\Setting\Tax;
|
||||
use App\Traits\Currencies;
|
||||
use App\Traits\DateTime;
|
||||
use App\Traits\Transactions as TransactionsTrait;
|
||||
|
|
@ -76,13 +77,16 @@ class RecurringTransactions extends Controller
|
|||
|
||||
$currency = Currency::where('code', $account_currency_code)->first();
|
||||
|
||||
$taxes = Tax::enabled()->orderBy('name')->get();
|
||||
|
||||
return view('banking.recurring_transactions.create', compact(
|
||||
'type',
|
||||
'real_type',
|
||||
'number',
|
||||
'contact_type',
|
||||
'account_currency_code',
|
||||
'currency'
|
||||
'currency',
|
||||
'taxes'
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -173,6 +177,8 @@ class RecurringTransactions extends Controller
|
|||
|
||||
$currency = Currency::where('code', $recurring_transaction->currency_code)->first();
|
||||
|
||||
$taxes = Tax::enabled()->orderBy('name')->get();
|
||||
|
||||
$date_format = $this->getCompanyDateFormat();
|
||||
|
||||
return view('banking.recurring_transactions.edit', compact(
|
||||
|
|
@ -182,6 +188,7 @@ class RecurringTransactions extends Controller
|
|||
'contact_type',
|
||||
'recurring_transaction',
|
||||
'currency',
|
||||
'taxes',
|
||||
'date_format'
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
<x-form.group.category type="{{ $real_type }}" :selected="setting('default.' . $real_type . '_category')" />
|
||||
|
||||
<x-form.group.contact :type="$contact_type" not-required />
|
||||
|
||||
<x-form.group.tax name="tax_ids" multiple with-summary not-required :currency="$currency" change="onChangeTax" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
|
|
@ -108,6 +110,8 @@
|
|||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var transaction_taxes = {!! $taxes !!};
|
||||
|
||||
if (typeof aka_currency !== 'undefined') {
|
||||
aka_currency = {!! json_encode(! empty($currency) ? $currency : config('money.currencies.' . company()->currency)) !!};
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
<x-form.group.category type="{{ $real_type }}" />
|
||||
|
||||
<x-form.group.contact :type="$contact_type" not-required />
|
||||
|
||||
<x-form.group.tax name="tax_ids" multiple with-summary not-required :currency="$currency" change="onChangeTax" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
|
|
@ -113,6 +115,8 @@
|
|||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var transaction_taxes = {!! $taxes !!};
|
||||
|
||||
if (typeof aka_currency !== 'undefined') {
|
||||
aka_currency = {!! json_encode(! empty($recurring_transaction) ? $recurring_transaction->currency : config('money.currencies.' . company()->currency)) !!};
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue