diff --git a/resources/assets/js/components/AkauntingConnectTransactions.vue b/resources/assets/js/components/AkauntingConnectTransactions.vue
index 3b4b33078..0978c75a8 100644
--- a/resources/assets/js/components/AkauntingConnectTransactions.vue
+++ b/resources/assets/js/components/AkauntingConnectTransactions.vue
@@ -171,7 +171,7 @@
@@ -320,9 +320,45 @@ export default {
},
transaction_amount: "",
money: {},
+ totalAmount: 0,
+ differenceAmount: 0,
};
},
+ created() {
+ this.totalAmount = this.total_amount;
+ this.differenceAmount = this.difference_amount;
+ },
+
+ computed: {
+ total_amount: function () {
+ let amount = 0;
+
+ this.form.items.forEach(function(item) {
+ amount += this.convertMoneyToFloat(item.amount);
+ }, this);
+
+ this.totalAmount = parseFloat(amount.toFixed(this.currency.precision));
+
+ return parseFloat(amount.toFixed(this.currency.precision));
+ },
+
+ difference_amount: function () {
+ if (! this.transaction_amount) {
+ this.differenceAmount = 0;
+
+ return 0;
+ }
+
+ let transaction_amount = this.convertMoneyToFloat(this.transaction_amount);
+ let amount = parseFloat((this.total_amount - transaction_amount).toFixed(this.currency.precision));
+
+ this.differenceAmount = amount;
+
+ return amount;
+ }
+ },
+
mounted() {
window.addEventListener('keyup',(e) => {
if (e.key === 'Escape') {
@@ -418,9 +454,11 @@ export default {
this.form.items = [];
}
},
+
transaction: function (transaction) {
this.transaction_amount = transaction.amount;
},
+
currency: function (currency) {
this.money = {
decimal: currency.decimal_mark,
@@ -431,26 +469,5 @@ export default {
};
}
},
-
- computed: {
- total_amount: function () {
- let amount = 0;
-
- this.form.items.forEach(function(item) {
- amount += this.convertMoneyToFloat(item.amount);
- }, this);
-
- return parseFloat(amount.toFixed(this.currency.precision));
- },
- difference_amount: function () {
- if (!this.transaction_amount) {
- return 0;
- }
-
- let transaction_amount = this.convertMoneyToFloat(this.transaction_amount);
-
- return parseFloat((this.total_amount - transaction_amount).toFixed(this.currency.precision));
- }
- },
}
diff --git a/resources/views/components/documents/show/get-paid.blade.php b/resources/views/components/documents/show/get-paid.blade.php
index 35d39cfed..d49c4b78e 100644
--- a/resources/views/components/documents/show/get-paid.blade.php
+++ b/resources/views/components/documents/show/get-paid.blade.php
@@ -27,7 +27,7 @@
@if (! $hideAcceptPayment)
{{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
-
+
-
diff --git a/resources/views/components/documents/show/make-payment.blade.php b/resources/views/components/documents/show/make-payment.blade.php
index ef98d25f6..67773333b 100644
--- a/resources/views/components/documents/show/make-payment.blade.php
+++ b/resources/views/components/documents/show/make-payment.blade.php
@@ -26,7 +26,7 @@
@stack('timeline_get_paid_body_button_payment_end')
-
+
{{ trans('bills.payment_made') }} :
@@ -45,13 +45,17 @@
@if (! empty($transaction->contact) && $transaction->contact->email)
- id) }}')">
- {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
+ id) }}')">
+
+ {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
+
@else
-
- {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
+
+
+ {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }}
+
@endif
@@ -61,10 +65,12 @@
id }}')"
id="button-edit-payment"
- class="text-purple"
+ class="text-purple mt-1"
override="class"
>
- {{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
+
+ {{ trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]) }}
+
-
@@ -82,8 +88,8 @@
:title="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
:message="$message"
:label="trans('general.title.delete', ['type' => trans_choice('general.payments', 1)])"
- class="text-purple"
- text-class="text-purple"
+ class="text-purple mt-1"
+ text-class="border-b border-transparent transition-all hover:border-purple"
override="class"
/>
|