Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #4551
James Colec32e09a2b3b6
diff --git a/frontend/src/components/transactions/Create.vue b/frontend/src/components/transactions/Create.vueindex c3c945fce7..f96d7b5953 100644--- a/frontend/src/components/transactions/Create.vue+++ b/frontend/src/components/transactions/Create.vue@@ -730,7 +730,6 @@ export default {// meta databudget_id: array.budget_id,category_name: array.category,- tags: array.tags,// optional date fields (6x):interest_date: array.interest_date,@@ -750,11 +749,28 @@ export default {zoom_level: array.zoom_level,longitude: array.longitude,latitude: array.latitude,+ tags: [],// from thing:order: 0,reconciled: false,};++ if (0 !== array.tags.length) {+ for (let i in array.tags) {+ if (array.tags.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {+ // array.tags+ let current = array.tags[i];+ if(typeof current === 'object' && null !== current) {+ currentSplit.tags.push(current.text);+ }+ if(typeof current === 'string') {+ currentSplit.tags.push(current);+ }+ }+ }+ }+// bills and piggy banksif (0 !== array.piggy_bank_id) {currentSplit.piggy_bank_id = array.piggy_bank_id;diff --git a/frontend/src/components/transactions/Edit.vue b/frontend/src/components/transactions/Edit.vueindex 84cdbf0197..f86b9c1df1 100644--- a/frontend/src/components/transactions/Edit.vue+++ b/frontend/src/components/transactions/Edit.vue@@ -500,7 +500,23 @@ export default {// console.log('tags are different');// console.log(currentTransaction.tags);// console.log(originalTransaction.tags);- diff.tags = currentTransaction.tags;+ diff.tags = [];//currentTransaction.tags;++ if (0 !== currentTransaction.tags.length) {+ for (let ii in currentTransaction.tags) {+ if (currentTransaction.tags.hasOwnProperty(ii) && /^0$|^[1-9]\d*$/.test(ii) && ii <= 4294967294) {+ // array.tags+ let currentTag = currentTransaction.tags[ii];+ if(typeof currentTag === 'object' && null !== currentTag) {+ diff.tags.push(currentTag.text);+ }+ if(typeof currentTag === 'string') {+ diff.tags.push(currentTag);+ }+ }+ }+ }+shouldSubmit = true;}