Reconcile action fixed..
This commit is contained in:
parent
2e10309210
commit
9c2a472357
@ -29,7 +29,7 @@ const app = new Vue({
|
|||||||
return {
|
return {
|
||||||
form: new Form('reconciliation'),
|
form: new Form('reconciliation'),
|
||||||
bulk_action: new BulkAction('reconciliations'),
|
bulk_action: new BulkAction('reconciliations'),
|
||||||
reconcile: true,
|
reconcile: false,
|
||||||
difference: null,
|
difference: null,
|
||||||
totals: {
|
totals: {
|
||||||
closing_balance: 0,
|
closing_balance: 0,
|
||||||
@ -54,7 +54,7 @@ const app = new Vue({
|
|||||||
setDueMinDate(date) {
|
setDueMinDate(date) {
|
||||||
this.min_due_date = date;
|
this.min_due_date = date;
|
||||||
},
|
},
|
||||||
|
|
||||||
onReconcilition() {
|
onReconcilition() {
|
||||||
let form = document.getElementById('form-create-reconciliation');
|
let form = document.getElementById('form-create-reconciliation');
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ const app = new Vue({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onCalculate() {
|
onCalculate() {
|
||||||
this.reconcile = true;
|
this.reconcile = false;
|
||||||
this.difference = null;
|
this.difference = null;
|
||||||
|
|
||||||
let transactions = this.form.transactions;
|
let transactions = this.form.transactions;
|
||||||
@ -106,10 +106,10 @@ const app = new Vue({
|
|||||||
|
|
||||||
if (difference != 0) {
|
if (difference != 0) {
|
||||||
this.difference = 'bg-orange-300';
|
this.difference = 'bg-orange-300';
|
||||||
this.reconcile = true;
|
this.reconcile = false;
|
||||||
} else {
|
} else {
|
||||||
this.difference = 'bg-green-100';
|
this.difference = 'bg-green-100';
|
||||||
this.reconcile = false;
|
this.reconcile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.totals.cleared_amount = parseFloat(cleared_amount);
|
this.totals.cleared_amount = parseFloat(cleared_amount);
|
||||||
|
@ -267,37 +267,38 @@
|
|||||||
class="flex items-center justify-center bg-transparent hover:bg-gray-200 px-3 py-1.5 text-base rounded-lg disabled:opacity-50"
|
class="flex items-center justify-center bg-transparent hover:bg-gray-200 px-3 py-1.5 text-base rounded-lg disabled:opacity-50"
|
||||||
override="class"
|
override="class"
|
||||||
>
|
>
|
||||||
<x-button.loading>
|
<x-button.loading action="! reconcile && form.loading">
|
||||||
{{ trans('reconciliations.save_draft') }}
|
{{ trans('reconciliations.save_draft') }}
|
||||||
</x-button.loading>
|
</x-button.loading>
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
<div v-if="reconcile">
|
<div v-if="! reconcile">
|
||||||
<x-tooltip id="tooltip-reconcile" placement="top" message="{{ trans('reconciliations.irreconcilable') }}">
|
<x-tooltip id="tooltip-reconcile" placement="top" message="{{ trans('reconciliations.irreconcilable') }}">
|
||||||
<x-button
|
<x-button
|
||||||
type="button"
|
type="button"
|
||||||
::disabled="reconcile || form.loading"
|
::disabled="! reconcile"
|
||||||
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue-300 hover:bg-blue-500 disabled:bg-blue-100"
|
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue hover:bg-blue-700 disabled:bg-blue-100"
|
||||||
override="class"
|
override="class"
|
||||||
@click="onReconcileSubmit"
|
@click="onReconcileSubmit"
|
||||||
data-loading-text="{{ trans('general.loading') }}"
|
data-loading-text="{{ trans('general.loading') }}"
|
||||||
>
|
>
|
||||||
<x-button.loading action="! reconcile">
|
<x-button.loading action="reconcile && form.loading">
|
||||||
{{ trans('reconciliations.reconcile') }}
|
{{ trans('reconciliations.reconcile') }}
|
||||||
</x-button.loading>
|
</x-button.loading>
|
||||||
</x-button>
|
</x-button>
|
||||||
</x-tooltip>
|
</x-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<x-button
|
<x-button
|
||||||
type="button"
|
type="button"
|
||||||
::disabled="reconcile || form.loading"
|
::disabled="! reconcile"
|
||||||
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue-300 hover:bg-blue-500 disabled:bg-blue-100"
|
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue hover:bg-blue-700 disabled:bg-blue-100"
|
||||||
override="class"
|
override="class"
|
||||||
@click="onReconcileSubmit"
|
@click="onReconcileSubmit"
|
||||||
data-loading-text="{{ trans('general.loading') }}"
|
data-loading-text="{{ trans('general.loading') }}"
|
||||||
>
|
>
|
||||||
<x-button.loading action="! reconcile">
|
<x-button.loading action="reconcile && form.loading">
|
||||||
{{ trans('reconciliations.reconcile') }}
|
{{ trans('reconciliations.reconcile') }}
|
||||||
</x-button.loading>
|
</x-button.loading>
|
||||||
</x-button>
|
</x-button>
|
||||||
|
@ -203,22 +203,22 @@
|
|||||||
class="relative flex items-center justify-center bg-transparent hover:bg-gray-200 px-3 py-1.5 text-base rounded-lg disabled:opacity-50"
|
class="relative flex items-center justify-center bg-transparent hover:bg-gray-200 px-3 py-1.5 text-base rounded-lg disabled:opacity-50"
|
||||||
override="class"
|
override="class"
|
||||||
>
|
>
|
||||||
<x-button.loading>
|
<x-button.loading action="! reconcile && form.loading">
|
||||||
{{ trans('general.save') }}
|
{{ trans('general.save') }}
|
||||||
</x-button.loading>
|
</x-button.loading>
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
<div v-if="reconcile">
|
<div v-if="! reconcile">
|
||||||
<x-tooltip id="tooltip-reconcile" placement="top" message="{{ trans('reconciliations.irreconcilable') }}">
|
<x-tooltip id="tooltip-reconcile" placement="top" message="{{ trans('reconciliations.irreconcilable') }}">
|
||||||
<x-button
|
<x-button
|
||||||
type="button"
|
type="button"
|
||||||
::disabled="reconcile || form.loading"
|
::disabled="! reconcile"
|
||||||
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue-300 hover:bg-blue-500 disabled:bg-blue-100"
|
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue hover:bg-blue-700 disabled:bg-blue-100"
|
||||||
override="class"
|
override="class"
|
||||||
@click="onReconcileSubmit"
|
@click="onReconcileSubmit"
|
||||||
data-loading-text="{{ trans('general.loading') }}"
|
data-loading-text="{{ trans('general.loading') }}"
|
||||||
>
|
>
|
||||||
<x-button.loading action="! reconcile">
|
<x-button.loading action="reconcile && form.loading">
|
||||||
{{ trans('reconciliations.reconcile') }}
|
{{ trans('reconciliations.reconcile') }}
|
||||||
</x-button.loading>
|
</x-button.loading>
|
||||||
</x-button>
|
</x-button>
|
||||||
@ -228,13 +228,13 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<x-button
|
<x-button
|
||||||
type="button"
|
type="button"
|
||||||
::disabled="reconcile || form.loading"
|
::disabled="! reconcile"
|
||||||
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue-300 hover:bg-blue-500 disabled:bg-blue-100"
|
class="relative flex items-center justify-center px-3 py-1.5 ltr:ml-2 rtl:mr-2 text-white text-base rounded-lg bg-blue hover:bg-blue-700 disabled:bg-blue-100"
|
||||||
override="class"
|
override="class"
|
||||||
@click="onReconcileSubmit"
|
@click="onReconcileSubmit"
|
||||||
data-loading-text="{{ trans('general.loading') }}"
|
data-loading-text="{{ trans('general.loading') }}"
|
||||||
>
|
>
|
||||||
<x-button.loading action="! reconcile">
|
<x-button.loading action="reconcile && form.loading">
|
||||||
{{ trans('reconciliations.reconcile') }}
|
{{ trans('reconciliations.reconcile') }}
|
||||||
</x-button.loading>
|
</x-button.loading>
|
||||||
</x-button>
|
</x-button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user