From 36fa7ae97e11265e11a09138e2fe45c2cee0caa7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 10 Apr 2021 17:25:00 +0200 Subject: [PATCH] Some new strings. --- resources/lang/en_US/firefly.php | 2 ++ resources/lang/en_US/validation.php | 1 + resources/views/v1/accounts/create.twig | 3 ++- resources/views/v1/list/groups.twig | 3 +++ resources/views/v1/transactions/show.twig | 6 ++++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index ba9bf9e640..c305df31b8 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1131,6 +1131,7 @@ return [ 'already_cleared_transactions' => 'Already cleared transactions (:count)', 'submitted_end_balance' => 'Submitted end balance', 'initial_balance_description' => 'Initial balance for ":account"', + 'liability_credit_description' => 'Liability credit for ":account"', 'interest_calc_' => 'unknown', 'interest_calc_daily' => 'Per day', 'interest_calc_monthly' => 'Per month', @@ -1321,6 +1322,7 @@ return [ 'account_type_Credit card' => 'Credit card', 'liability_direction_credit' => 'I am owed this debt', 'liability_direction_debit' => 'I owe this debt to somebody else', + 'Liability credit' => 'Liability credit', 'budgets' => 'Budgets', 'tags' => 'Tags', 'reports' => 'Reports', diff --git a/resources/lang/en_US/validation.php b/resources/lang/en_US/validation.php index 48540ee6fe..b7e6143ff5 100644 --- a/resources/lang/en_US/validation.php +++ b/resources/lang/en_US/validation.php @@ -200,6 +200,7 @@ return [ 'need_id_in_edit' => 'Each split must have transaction_journal_id (either valid ID or 0).', 'ob_source_need_data' => 'Need to get a valid source account ID and/or valid source account name to continue.', + 'lc_source_need_data' => 'Need to get a valid source account ID to continue.', 'ob_dest_need_data' => 'Need to get a valid destination account ID and/or valid destination account name to continue.', 'ob_dest_bad_data' => 'Could not find a valid destination account when searching for ID ":id" or name ":name".', diff --git a/resources/views/v1/accounts/create.twig b/resources/views/v1/accounts/create.twig index a74107c270..f5e4aeceb8 100644 --- a/resources/views/v1/accounts/create.twig +++ b/resources/views/v1/accounts/create.twig @@ -27,7 +27,8 @@ {% endif %} {% if objectType == 'liabilities' %} {{ ExpandedForm.select('liability_type_id', liabilityTypes) }} - {{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_, helpText: 'debt_start_amount_help'|_}) }} + {{ ExpandedForm.amountNoCurrency('opening_balance', null, {label:'debt_start_amount'|_}) }} + {{ ExpandedForm.select('liability_direction', liabilityDirections) }} {{ ExpandedForm.date('opening_balance_date', null, {label:'debt_start_date'|_}) }} {{ ExpandedForm.percentage('interest') }} {{ ExpandedForm.select('interest_period', interestPeriods, null, {helpText: 'interest_period_help'|_}) }} diff --git a/resources/views/v1/list/groups.twig b/resources/views/v1/list/groups.twig index 3b71fdb60d..5bef92952c 100644 --- a/resources/views/v1/list/groups.twig +++ b/resources/views/v1/list/groups.twig @@ -118,6 +118,9 @@ {% if transaction.transaction_type_type == 'Opening balance' %} {% endif %} + {% if transaction.transaction_type_type == 'Liability credit' %} + + {% endif %} diff --git a/resources/views/v1/transactions/show.twig b/resources/views/v1/transactions/show.twig index 47450983e0..e73ae146dc 100644 --- a/resources/views/v1/transactions/show.twig +++ b/resources/views/v1/transactions/show.twig @@ -39,6 +39,7 @@
  • {{ 'clone'|_ }}
  • {% endif %} + @@ -231,12 +232,17 @@ {{ journal.source_name }} → {% endif %} + {% if first.transactiontype.type == 'Withdrawal' or first.transactiontype.type == 'Deposit' %} {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places) }} {% elseif first.transactiontype.type == 'Transfer' or first.transactiontype.type == 'Opening balance' %} {{ formatAmountBySymbol(journal.amount, journal.currency_symbol, journal.currency_decimal_places, false) }} + {% elseif first.transactiontype.type == 'Liability credit' %} + + {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }} + {% endif %}