From 613671e2d176fd0bccb69aadc94d1149c9852bb4 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Mon, 3 Apr 2023 14:35:04 -0400 Subject: [PATCH] Bug 26403: Move credit and debit types into translatable YAML files This patch moves account debit and credit types, as well as the CASH payment type, into YAML files under installer/data/en/mandatory. This should make the debit and credit types translatable (for new installations only). To test: 1. Apply patch 2. Update po files ./misc/translator/translate update xx-XX 3. View the xx-XX-installer.po file -->The default account debit and credit types (and cash payment type) should be available to be translated 4. Translate the strings 5. Apply the translations ./misc/translator/translate install xx-XX 6. Load the new translated YAML files (with a fresh install, or by deleting the values in the db and using ./misc/load_yaml.pl to load the files) 7. In the staff interface, go to Administration > Credit types --> They should be translated 8. Go to Administration > Debit types --> They should be translated Signed-off-by: Magnus Enger Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 002dbcdc7f52769e150f7ed788e37e9c08ffe02b) Signed-off-by: Matt Blenkinsop --- .../en/mandatory/account_credit_types.yml | 81 ++++++++++ .../en/mandatory/account_debit_types.yml | 138 ++++++++++++++++++ .../data/mysql/en/mandatory/auth_values.yml | 5 + 3 files changed, 224 insertions(+) create mode 100644 installer/data/mysql/en/mandatory/account_credit_types.yml create mode 100644 installer/data/mysql/en/mandatory/account_debit_types.yml diff --git a/installer/data/mysql/en/mandatory/account_credit_types.yml b/installer/data/mysql/en/mandatory/account_credit_types.yml new file mode 100644 index 0000000000..b5e95ac108 --- /dev/null +++ b/installer/data/mysql/en/mandatory/account_credit_types.yml @@ -0,0 +1,81 @@ +--- +# +# Copyright 2023 Koha Development Team +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +description: + - "Credit types used in Koha" + +tables: + - account_credit_types: + translatable: [ description ] + multiline: [] + rows: + - code: "OVERPAYMENT" + description: "Overpayment refund" + can_be_added_manually: "0" + is_system: "1" + + - code: "PAYMENT" + description: "Payment" + can_be_added_manually: "0" + is_system: "1" + + - code: "WRITEOFF" + description: "Writeoff" + can_be_added_manually: "0" + is_system: "1" + + - code: "FORGIVEN" + description: "Forgiven" + can_be_added_manually: "1" + is_system: "1" + + - code: "CREDIT" + description: "Credit" + can_be_added_manually: "1" + is_system: "1" + + - code: "DISCOUNT" + description: "A discount applied to a patrons fine" + can_be_added_manually: "0" + is_system: "1" + + - code: "REFUND" + description: "Refund" + can_be_added_manually: "0" + is_system: "1" + + - code: "LOST_FOUND" + description: "Lost item fee refund" + can_be_added_manually: "0" + is_system: "1" + + - code: "PURCHASE" + description: "Purchase" + can_be_added_manually: "0" + is_system: "1" + + - code: "CANCELLATION" + description: "Cancellation" + can_be_added_manually: "0" + is_system: "1" + + - code: "PROCESSING_FOUND" + description: "Lost item processing fee refund" + can_be_added_manually: "0" + is_system: "1" \ No newline at end of file diff --git a/installer/data/mysql/en/mandatory/account_debit_types.yml b/installer/data/mysql/en/mandatory/account_debit_types.yml new file mode 100644 index 0000000000..0c3ed6b277 --- /dev/null +++ b/installer/data/mysql/en/mandatory/account_debit_types.yml @@ -0,0 +1,138 @@ +--- +# +# Copyright 2023 Koha Development Team +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +description: + - "Debit types used in Koha" + +tables: + - account_debit_types: + translatable: [ description ] + multiline: [] + rows: + - code: "ACCOUNT" + description: "Account creation fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "ACCOUNT_RENEW" + description: "Account renewal fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "ARTICLE_REQUEST" + description: "Article request fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "LOST" + description: "Lost item" + can_be_invoiced: "1" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "MANUAL" + description: "Manual fee" + can_be_invoiced: "1" + can_be_sold: "0" + default_amount: ~ + is_system: "0" + + - code: "NEW_CARD" + description: "New card fee" + can_be_invoiced: "1" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "OVERDUE" + description: "Overdue fine" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "PROCESSING" + description: "Lost item processing fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "PAYOUT" + description: "Payment from library to patron" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "RENT" + description: "Rental fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "RENT_DAILY" + description: "Daily rental fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "RENT_DAILY_RENEW" + description: "Renewal of daily rental item" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "RENT_RENEW" + description: "Renewal of rental item" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "RESERVE" + description: "Hold fee" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "RESERVE_EXPIRED" + description: "Hold waiting too long" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" + + - code: "VOID" + description: "Credit has been voided" + can_be_invoiced: "0" + can_be_sold: "0" + default_amount: ~ + is_system: "1" \ No newline at end of file diff --git a/installer/data/mysql/en/mandatory/auth_values.yml b/installer/data/mysql/en/mandatory/auth_values.yml index 5bfea57674..17aa85fe87 100644 --- a/installer/data/mysql/en/mandatory/auth_values.yml +++ b/installer/data/mysql/en/mandatory/auth_values.yml @@ -50,6 +50,11 @@ tables: lib: "Creditcard via SIP2" lib_opac: "Creditcard" + - category: "PAYMENT_TYPE" + authorised_value: "CASH" + lib: "Cash" + lib_opac: "Cash" + - authorised_values: translatable: [ lib ] multiline: [] -- 2.39.5