From f037b91a685e3ab5479cc5c7c77848c2b2f376a0 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 18 Oct 2024 14:49:51 +0000 Subject: [PATCH] Bug 38207: Update UI to use new field --- api/v1/swagger/definitions/vendor.yaml | 5 +++ .../prog/js/vue/components/Vendors/Main.vue | 1 + .../vue/components/Vendors/VendorFormAdd.vue | 2 + .../Vendors/VendorOrderingInformation.vue | 37 ++++++++++++++++++- .../prog/js/vue/stores/authorised-values.js | 1 + 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/api/v1/swagger/definitions/vendor.yaml b/api/v1/swagger/definitions/vendor.yaml index 0724ea69214..0260d357d13 100644 --- a/api/v1/swagger/definitions/vendor.yaml +++ b/api/v1/swagger/definitions/vendor.yaml @@ -114,6 +114,11 @@ properties: - string - "null" description: External id + payment_method: + type: + - string + - "null" + description: Payment method aliases: type: array description: List of aliases diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue index 620d679bade..7362c1af164 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue @@ -66,6 +66,7 @@ export default { const authorised_values = { av_vendor_types: "VENDOR_TYPE", av_vendor_interface_types: "VENDOR_INTERFACE_TYPE", + av_vendor_payment_methods: "VENDOR_PAYMENT_METHOD", } let av_cat_array = Object.keys(authorised_values).map(function ( diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue index a1663b61102..087524f457f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue @@ -61,6 +61,8 @@ export default { deliverytime: null, fax: "", external_id: "", + payment_method: [], + language: "", aliases: [], contacts: [], interfaces: [], diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorOrderingInformation.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorOrderingInformation.vue index bbcaaf74c66..d73b34f12a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorOrderingInformation.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorOrderingInformation.vue @@ -22,6 +22,12 @@ {{ vendor.invoice_currency }} +
  • + + + {{ displayPaymentMethods() }} + +
  • @@ -108,6 +114,17 @@ :options="currencies" />
  • +
  • + + +
  • { + const methodLib = get_lib_from_av( + "av_vendor_payment_methods", + method + ) + methods += methodLib + ", " + }) + return methods.substring(0, methods.length - 2) + } + return "" + }, formatTaxRate(taxRate) { if (!taxRate) return 0 const decimalPlaces = taxRate.toString().split(".")[1]?.length || 0 diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/authorised-values.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/authorised-values.js index ebe6a80b5fc..39f58bd3e4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/authorised-values.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/authorised-values.js @@ -44,6 +44,7 @@ export const useAVStore = defineStore("authorised_values", { av_item_reports_metrics: [], av_vendor_types: [], av_vendor_interface_types: [], + av_vendor_payment_methods: [], }), actions: { get_lib_from_av(arr_name, av) { -- 2.39.3 (Apple Git-146)