From 947c9b34e0361275f21125be159c4cde801e5d5f Mon Sep 17 00:00:00 2001 From: Patrick Nagurny Date: Tue, 27 Nov 2018 16:52:55 -0500 Subject: [PATCH] update type descriptions --- src/app/transaction/new.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/transaction/new.ts b/src/app/transaction/new.ts index 1a3186d..180aacc 100644 --- a/src/app/transaction/new.ts +++ b/src/app/transaction/new.ts @@ -142,9 +142,8 @@ export class NewTransactionPage { let splits = this.form.get('splits') as FormArray; if (splits.length > 0) { - let account = this.getFirstAccount(); splits.at(0).patchValue({ - accountId: account.id + accountId: val }); } }); @@ -376,7 +375,17 @@ export class NewTransactionPage { let type = this.form.value.type; if (type) { - str += type.charAt(0).toUpperCase() + type.substr(1); + switch(type) { + case 'expense': + str += 'Expense'; + break; + case 'income': + str += 'Income'; + break; + case 'openingBalance': + str += 'Opening Balance'; + break; + } if (account) { str += ' (' + account.name + ')'; }