Skip to content

Commit

Permalink
Reconciliaiton amount view edited
Browse files Browse the repository at this point in the history
  • Loading branch information
brkcvn committed Jul 12, 2021
1 parent fd3cf7c commit 9d62a23
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions resources/assets/js/views/banking/reconciliations.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,24 @@
if (this.form._method == 'PATCH') {
this.onCalculate();
}
this.currencyConversion();
},

methods:{
setDueMinDate(date) {
this.min_due_date = date;
},

currencyConversion() {
setTimeout(() => {
if(document.querySelectorAll('.js-conversion-input')) {
let currency_input = document.querySelectorAll('.js-conversion-input');
for(let input of currency_input) {
input.setAttribute('size', input.value.length);
}
}
}, 250)
},

onReconcilition() {
let form = document.getElementById('form-create-reconciliation');
Expand Down
8 changes: 4 additions & 4 deletions resources/views/banking/reconciliations/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,30 +104,30 @@
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.opening_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
<span>@money($opening_balance, $account->currency_code, true)</span>
<span class="w-auto position-absolute right-4 text-sm">@money($opening_balance, $account->currency_code, true)</span>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block pt-0">
<div class="mt-1">
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text'], 0.00, 'text-right disabled-money') }}
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text w-auto position-absolute right-4 text-sm js-conversion-input'], 0.00, 'text-right disabled-money') }}
</div>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th>
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block pt-0">
<div class="mt-1">
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text'], 0.00, 'text-right disabled-money') }}
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text w-auto position-absolute right-4 text-sm js-conversion-input'], 0.00, 'text-right disabled-money') }}
</div>
</td>
</tr>
<tr :class="difference" class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th>
<td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block pt-0">
<div class="mt-1 difference-money">
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.difference', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text'], 0.00, 'text-right disabled-money') }}
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.difference', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text w-auto position-absolute right-4 text-sm js-conversion-input'], 0.00, 'text-right disabled-money') }}
</div>
</td>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/banking/reconciliations/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,30 @@
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.opening_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
<span>@money($opening_balance, $account->currency_code, true)</span>
<span class="w-auto position-absolute right-4 text-sm">@money($opening_balance, $account->currency_code, true)</span>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block pt-0">
<div class="mt-1">
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text'], 0.00, 'text-right disabled-money') }}
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text w-auto position-absolute right-4 text-sm js-conversion-input'], 0.00, 'text-right disabled-money') }}
</div>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th>
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block pt-0">
<div class="mt-1">
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text'], 0.00, 'text-right disabled-money') }}
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text w-auto position-absolute right-4 text-sm js-conversion-input'], 0.00, 'text-right disabled-money') }}
</div>
</td>
</tr>
<tr :class="difference" class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th>
<td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block pt-0">
<div class="mt-1 difference-money">
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.difference', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text'], 0.00, 'text-right disabled-money') }}
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'row-input' => 'true', 'v-model' => 'totals.difference', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money banking-price-text w-auto position-absolute right-4 text-sm js-conversion-input'], 0.00, 'text-right disabled-money') }}
</div>
</td>
</tr>
Expand Down

0 comments on commit 9d62a23

Please sign in to comment.