diff --git a/src/main/resources/i18n/lift-core.properties b/src/main/resources/i18n/lift-core.properties index 093d250b..68f69056 100644 --- a/src/main/resources/i18n/lift-core.properties +++ b/src/main/resources/i18n/lift-core.properties @@ -13,7 +13,7 @@ bank_name = Bank name account_label = Account label income_description = Income description income_amount = Income amount -outcome_description = Outcome description -outcome_amount = Outcome amount +payment_description = payment description +payment_amount = payment amount income = Income -outcome = Outcome \ No newline at end of file +payment = Expenditure \ No newline at end of file diff --git a/src/main/resources/i18n/lift-core_en_GB.properties b/src/main/resources/i18n/lift-core_en_GB.properties index 093d250b..68f69056 100644 --- a/src/main/resources/i18n/lift-core_en_GB.properties +++ b/src/main/resources/i18n/lift-core_en_GB.properties @@ -13,7 +13,7 @@ bank_name = Bank name account_label = Account label income_description = Income description income_amount = Income amount -outcome_description = Outcome description -outcome_amount = Outcome amount +payment_description = payment description +payment_amount = payment amount income = Income -outcome = Outcome \ No newline at end of file +payment = Expenditure \ No newline at end of file diff --git a/src/main/resources/i18n/lift-core_it_IT.properties b/src/main/resources/i18n/lift-core_it_IT.properties index 0c40ecb2..5d39adc5 100644 --- a/src/main/resources/i18n/lift-core_it_IT.properties +++ b/src/main/resources/i18n/lift-core_it_IT.properties @@ -13,7 +13,7 @@ bank_name = nome della banca account_label = Etichetta dell'account income_description = Income description income_amount = Income amount -outcome_description = Outcome description -outcome_amount = Outcome amount +payment_description = payment description +payment_amount = payment amount income = Income -outcome = Outcome \ No newline at end of file +payment = payment \ No newline at end of file diff --git a/src/main/resources/props/sample.props.template b/src/main/resources/props/sample.props.template index 5e60895f..f3a920d7 100644 --- a/src/main/resources/props/sample.props.template +++ b/src/main/resources/props/sample.props.template @@ -75,10 +75,10 @@ display_twitter_link=true # Set Locale language_tag = en-GB -# Income account -income.bank_id=FILL_ME_IN -income.account_id=FILL_ME_IN +# Incoming account +incoming.bank_id=FILL_ME_IN +incoming.account_id=FILL_ME_IN -# Outcome account -outcome.bank_id=FILL_ME_IN -outcome.account_id=FILL_ME_IN \ No newline at end of file +# Outgoing account +outgoing.bank_id=FILL_ME_IN +outgoing.account_id=FILL_ME_IN \ No newline at end of file diff --git a/src/main/scala/bootstrap/liftweb/Boot.scala b/src/main/scala/bootstrap/liftweb/Boot.scala index 719af128..9840116f 100755 --- a/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/src/main/scala/bootstrap/liftweb/Boot.scala @@ -416,7 +416,7 @@ class Boot extends MdcLoggable{ Menu.params[List[BankJson400]]("CreateBankAccount", "Create bank account", getBanks _, x => List("")) / "banks" / * / "accounts" / "create-bank-account", Menu.params[List[String]]("CreateIncome", "Create Income", getAccountSettings _, x => List("")) / "banks" / * / "accounts" / * / "create-income", - Menu.params[List[String]]("CreateOutcome", "Create Outcome", getAccountSettings _, x => List("")) / "banks" / * / "accounts" / * / "create-outcome", + Menu.params[List[String]]("CreateExpenditure", "Create Expenditure", getAccountSettings _, x => List("")) / "banks" / * / "accounts" / * / "create-expenditure", Menu.params[ViewsDataJSON]("Views","Views Overview", getCompleteAccountViews _ , x => List("")) / "banks" / * / "accounts" / * / "views" / "list", diff --git a/src/main/scala/code/lib/ObpAPI.scala b/src/main/scala/code/lib/ObpAPI.scala index 4f4a59c9..2a33b282 100644 --- a/src/main/scala/code/lib/ObpAPI.scala +++ b/src/main/scala/code/lib/ObpAPI.scala @@ -169,8 +169,8 @@ object ObpAPI { ObpPost(s"/$versionOfApi/banks/" + urlEncode(bankId) + "/accounts", Extraction.decompose(json)) } def createIncome(bankId: String, accountId: String, incomeDescription: String, incomeAmount: String, incomeCurrency: String): Box[JValue] = { - val incomeBankId = Props.get("income.bank_id", "") - val incomeAccountId = Props.get("income.account_id", "") + val incomeBankId = Props.get("incoming.bank_id", "") + val incomeAccountId = Props.get("incoming.account_id", "") val utcZoneId = ZoneId.of("UTC") val zonedDateTime = ZonedDateTime.now val utcDateTime = zonedDateTime.withZoneSameInstant(utcZoneId) @@ -191,8 +191,8 @@ object ObpAPI { } def createOutcome(bankId: String, accountId: String, outcomeDescription: String, outcomeAmount: String, outcomeCurrency: String): Box[JValue] = { - val outcomeBankId = Props.get("outcome.bank_id", "outcome.bank_id") - val outcomeAccountId = Props.get("outcome.account_id", "outcome.account_id") + val outcomeBankId = Props.get("outgoing.bank_id", "outgoing.bank_id") + val outcomeAccountId = Props.get("outgoing.account_id", "outgoing.account_id") val utcZoneId = ZoneId.of("UTC") val zonedDateTime = ZonedDateTime.now val utcDateTime = zonedDateTime.withZoneSameInstant(utcZoneId) diff --git a/src/main/scala/code/snippet/CreateOutcome.scala b/src/main/scala/code/snippet/CreateExpenditure.scala similarity index 82% rename from src/main/scala/code/snippet/CreateOutcome.scala rename to src/main/scala/code/snippet/CreateExpenditure.scala index be751f16..5213d904 100644 --- a/src/main/scala/code/snippet/CreateOutcome.scala +++ b/src/main/scala/code/snippet/CreateExpenditure.scala @@ -12,14 +12,14 @@ import net.liftweb.util.Helpers._ import scala.xml.{NodeSeq, Text} -class CreateOutcome(params: List[String]) extends MdcLoggable { +class CreateExpenditure(params: List[String]) extends MdcLoggable { val bankId = params(0) val accountId = params(1) val accountJson = getAccount(bankId, accountId, CUSTOM_OWNER_VIEW_ID).openOrThrowException("Could not open accountJson") def accountTitle = ".account-title *" #> getAccountTitle(accountJson) //set up ajax handlers to edit account label - def addOutcome(xhtml: NodeSeq): NodeSeq = { + def addPayment(xhtml: NodeSeq): NodeSeq = { var outcomeDescription = "" var outcomeAmount = "0" @@ -37,10 +37,10 @@ class CreateOutcome(params: List[String]) extends MdcLoggable { } ( - "@outcome_description" #> SHtml.text("", s => outcomeDescription = s) & - "@outcome_amount" #> SHtml.text("", s => outcomeAmount = s) & + "@payment_description" #> SHtml.text("", s => outcomeDescription = s) & + "@payment_amount" #> SHtml.text("", s => outcomeAmount = s) & // Replace the type=submit with Javascript that makes the ajax call. - "type=submit" #> SHtml.ajaxSubmit("Add outcome", process) + "type=submit" #> SHtml.ajaxSubmit("Add payment", process) ).apply(xhtml) } } diff --git a/src/main/scala/code/snippet/Nav.scala b/src/main/scala/code/snippet/Nav.scala index 752d3720..8edc9952 100644 --- a/src/main/scala/code/snippet/Nav.scala +++ b/src/main/scala/code/snippet/Nav.scala @@ -160,9 +160,9 @@ class Nav { // Menu for adding an income def outcomeSettings : CssSel = { if (hasManagementAccess) { - val addIncomeUrl = "/banks/" + url(2) + "/accounts/" + url(4) + "/create-outcome" + val addIncomeUrl = "/banks/" + url(2) + "/accounts/" + url(4) + "/create-expenditure" ".navlink [href]" #> { addIncomeUrl } & - ".navlink *" #> "Create outcome" & + ".navlink *" #> "Create expenditure" & ".navlink [class+]" #> markIfSelected(addIncomeUrl) } else eraseMenu } diff --git a/src/main/webapp/banks/star/accounts/star/create-outcome.html b/src/main/webapp/banks/star/accounts/star/create-expenditure.html similarity index 76% rename from src/main/webapp/banks/star/accounts/star/create-outcome.html rename to src/main/webapp/banks/star/accounts/star/create-expenditure.html index 8e1e6454..cd1355ef 100644 --- a/src/main/webapp/banks/star/accounts/star/create-outcome.html +++ b/src/main/webapp/banks/star/accounts/star/create-expenditure.html @@ -35,7 +35,7 @@