Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Cleanup JS
James Cole23356b388444
diff --git a/app/Repositories/Budget/NoBudgetRepository.php b/app/Repositories/Budget/NoBudgetRepository.phpindex 6f17f4a521..ade5f3fb90 100644--- a/app/Repositories/Budget/NoBudgetRepository.php+++ b/app/Repositories/Budget/NoBudgetRepository.php@@ -160,6 +160,9 @@ class NoBudgetRepository implements NoBudgetRepositoryInterface/** @noinspection MoreThanThreeArgumentsInspection *//**+ * TODO this method does not include foreign amount transactions. It only sums up "amount".+ * TODO this probably also applies to the other "sumExpenses" methods.+ ** @param Carbon $start* @param Carbon $end* @param Collection|null $accounts@@ -196,6 +199,7 @@ class NoBudgetRepository implements NoBudgetRepositoryInterface'currency_decimal_places' => $journal['currency_decimal_places'],];$array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->negative($journal['amount']));+}return $array;diff --git a/resources/assets/js/components/transactions/Amount.vue b/resources/assets/js/components/transactions/Amount.vueindex c4975c9914..7b1e7aa16a 100644--- a/resources/assets/js/components/transactions/Amount.vue+++ b/resources/assets/js/components/transactions/Amount.vue@@ -78,7 +78,7 @@ export default {return this.error.length > 0;},changeData: function () {- console.log('Triggered amount changeData()');+ //console.log('Triggered amount changeData()');let transactionType = this.transactionType;// reset of all are empty:if (!transactionType && !this.source.name && !this.destination.name) {@@ -130,23 +130,23 @@ export default {},watch: {source: function () {- console.log('amount: watch source triggered');+ // console.log('amount: watch source triggered');this.changeData();},value: function () {- console.log('amount: value changed');+ // console.log('amount: value changed');},destination: function () {- console.log('amount: watch destination triggered');+ // console.log('amount: watch destination triggered');this.changeData();},transactionType: function () {- console.log('amount: watch transaction type triggered');+ // console.log('amount: watch transaction type triggered');this.changeData();}},mounted() {- console.log('amount: mounted');+ // console.log('amount: mounted');this.changeData();}}diff --git a/resources/assets/js/components/transactions/Bill.vue b/resources/assets/js/components/transactions/Bill.vueindex d1f8b5d60c..4826fb2c89 100644--- a/resources/assets/js/components/transactions/Bill.vue+++ b/resources/assets/js/components/transactions/Bill.vue@@ -61,7 +61,7 @@ export default {no_bill: String,},mounted() {- console.log('bill: mounted');+ // console.log('bill: mounted');this.loadBills();},data() {@@ -72,7 +72,7 @@ export default {},watch: {value: function () {- console.log('bill: value changed to ' + this.value);+ // console.log('bill: value changed to ' + this.value);this.selected = this.value;}},diff --git a/resources/assets/js/components/transactions/Budget.vue b/resources/assets/js/components/transactions/Budget.vueindex 3086196c93..1b538c4501 100644--- a/resources/assets/js/components/transactions/Budget.vue+++ b/resources/assets/js/components/transactions/Budget.vue@@ -71,7 +71,7 @@ export default {},watch: {value: function () {- console.log('budget: value changed to ' + this.value);+ // console.log('budget: value changed to ' + this.value);this.selected = this.value;}},diff --git a/resources/assets/js/components/transactions/CustomTextarea.vue b/resources/assets/js/components/transactions/CustomTextarea.vueindex bfcbc9b1da..f3f67ef395 100644--- a/resources/assets/js/components/transactions/CustomTextarea.vue+++ b/resources/assets/js/components/transactions/CustomTextarea.vue@@ -65,6 +65,3 @@ export default {}</script>-<style scoped>--</style>\ No newline at end of filediff --git a/resources/assets/js/components/transactions/EditTransaction.vue b/resources/assets/js/components/transactions/EditTransaction.vueindex adb024ab63..f2ce40fba3 100644--- a/resources/assets/js/components/transactions/EditTransaction.vue+++ b/resources/assets/js/components/transactions/EditTransaction.vue@@ -243,11 +243,11 @@ export default {groupId: Number},mounted() {- console.log('EditTransaction: mounted()');+ // console.log('EditTransaction: mounted()');this.getGroup();},ready() {- console.log('EditTransaction: ready()');+ // console.log('EditTransaction: ready()');},methods: {positiveAmount(amount) {@@ -353,7 +353,7 @@ export default {// console.log(this.transactions[index].destination_account.allowed_types);},getGroup() {- console.log('EditTransaction: getGroup()');+ // console.log('EditTransaction: getGroup()');const page = window.location.href.split('/');const groupId = page[page.length - 1];@@ -372,7 +372,7 @@ export default {});},processIncomingGroup(data) {- console.log('EditTransaction: processIncomingGroup()');+ // console.log('EditTransaction: processIncomingGroup()');this.group_title = data.attributes.group_title;let transactions = data.attributes.transactions.reverse();for (let key in transactions) {@@ -390,7 +390,7 @@ export default {return null;},processIncomingGroupRow(transaction) {- console.log('EditTransaction: processIncomingGroupRow()');+ //console.log('EditTransaction: processIncomingGroupRow()');this.setTransactionType(transaction.type);let newTags = [];@@ -921,15 +921,15 @@ export default {}});let count = this.transactions.length;- console.log('Transactions length = ' + count);+ // console.log('Transactions length = ' + count);// also set accounts from previous entry, if present.if (this.transactions.length > 1) {- console.log('Adding split.');+ // console.log('Adding split.');this.transactions[count - 1].source_account = this.transactions[count - 2].source_account;this.transactions[count - 1].destination_account = this.transactions[count - 2].destination_account;this.transactions[count - 1].date = this.transactions[count - 2].date;}- console.log('Transactions length now = ' + this.transactions.length);+ // console.log('Transactions length now = ' + this.transactions.length);if (e) {e.preventDefault();diff --git a/resources/assets/js/components/transactions/ForeignAmountSelect.vue b/resources/assets/js/components/transactions/ForeignAmountSelect.vueindex 3fae76b307..a03455c082 100644--- a/resources/assets/js/components/transactions/ForeignAmountSelect.vue+++ b/resources/assets/js/components/transactions/ForeignAmountSelect.vue@@ -128,21 +128,21 @@ export default {// console.log(destType + ' (dest) is a liability: ' + destIsLiability);if (tType === 'transfer' || destIsLiability || sourceIsLiability) {- console.log('Source is liability OR dest is liability, OR transfer. Lock list on currency of destination.');- console.log('Length of currencies is ' + this.currencies.length);- console.log(this.currencies);+ // console.log('Source is liability OR dest is liability, OR transfer. Lock list on currency of destination.');+ // console.log('Length of currencies is ' + this.currencies.length);+ // console.log(this.currencies);this.liability = true;// lock dropdown list on on currencyID of destination.for (const key in this.currencies) {if (this.currencies.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {- console.log('this.currencies[key].id = ' + this.currencies[key].id);- console.log('this.destination.currency_id = ' + this.destination.currency_id);+ // console.log('this.currencies[key].id = ' + this.currencies[key].id);+ // console.log('this.destination.currency_id = ' + this.destination.currency_id);if (parseInt(this.currencies[key].id) === parseInt(this.destination.currency_id)) {this.enabledCurrencies.push(this.currencies[key]);}}}- console.log('Enabled currencies length is now ' + this.enabledCurrencies.length);+ // console.log('Enabled currencies length is now ' + this.enabledCurrencies.length);return;}@@ -207,7 +207,7 @@ export default {}}}- console.log(this.enabledCurrencies);+ // console.log(this.enabledCurrencies);});}}