View | Details | Raw Unified | Return to bug 38207
Collapse All | Expand All

(-)a/api/v1/swagger/definitions/vendor.yaml (+5 lines)
Lines 114-119 properties: Link Here
114
      - string
114
      - string
115
      - "null"
115
      - "null"
116
    description: External id
116
    description: External id
117
  payment_method:
118
    type:
119
      - string
120
      - "null"
121
    description: Payment method
117
  aliases:
122
  aliases:
118
    type: array
123
    type: array
119
    description: List of aliases
124
    description: List of aliases
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue (+1 lines)
Lines 66-71 export default { Link Here
66
            const authorised_values = {
66
            const authorised_values = {
67
                av_vendor_types: "VENDOR_TYPE",
67
                av_vendor_types: "VENDOR_TYPE",
68
                av_vendor_interface_types: "VENDOR_INTERFACE_TYPE",
68
                av_vendor_interface_types: "VENDOR_INTERFACE_TYPE",
69
                av_vendor_payment_methods: "VENDOR_PAYMENT_METHOD",
69
            }
70
            }
70
71
71
            let av_cat_array = Object.keys(authorised_values).map(function (
72
            let av_cat_array = Object.keys(authorised_values).map(function (
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue (+2 lines)
Lines 61-66 export default { Link Here
61
                deliverytime: null,
61
                deliverytime: null,
62
                fax: "",
62
                fax: "",
63
                external_id: "",
63
                external_id: "",
64
                payment_method: [],
65
                language: "",
64
                aliases: [],
66
                aliases: [],
65
                contacts: [],
67
                contacts: [],
66
                interfaces: [],
68
                interfaces: [],
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorOrderingInformation.vue (-1 / +36 lines)
Lines 22-27 Link Here
22
                    {{ vendor.invoice_currency }}
22
                    {{ vendor.invoice_currency }}
23
                </span>
23
                </span>
24
            </li>
24
            </li>
25
            <li>
26
                <label>{{ $__("Payment method") }}:</label>
27
                <span>
28
                    {{ displayPaymentMethods() }}
29
                </span>
30
            </li>
25
            <li v-if="vendor.tax_rate">
31
            <li v-if="vendor.tax_rate">
26
                <label>{{ $__("Tax number registered") }}:</label>
32
                <label>{{ $__("Tax number registered") }}:</label>
27
                <span>
33
                <span>
Lines 108-113 Link Here
108
                    :options="currencies"
114
                    :options="currencies"
109
                />
115
                />
110
            </li>
116
            </li>
117
            <li>
118
                <label for="payment_method">{{ $__("Payment method") }}:</label>
119
                <v-select
120
                    id="payment_method"
121
                    v-model="vendor.payment_method"
122
                    label="description"
123
                    :reduce="av => av.value"
124
                    :options="av_vendor_payment_methods"
125
                    multiple
126
                />
127
            </li>
111
            <li>
128
            <li>
112
                <label for="gst">{{ $__("Tax number registered") }}:</label>
129
                <label for="gst">{{ $__("Tax number registered") }}:</label>
113
                <input
130
                <input
Lines 232-245 export default { Link Here
232
        const { currencies, gstValues } = storeToRefs(vendorStore)
249
        const { currencies, gstValues } = storeToRefs(vendorStore)
233
250
234
        const AVStore = inject("AVStore")
251
        const AVStore = inject("AVStore")
235
        const { get_lib_from_av } = AVStore
252
        const { get_lib_from_av, av_vendor_payment_methods } = AVStore
236
253
237
        return {
254
        return {
238
            currencies,
255
            currencies,
239
            gstValues,
256
            gstValues,
257
            av_vendor_payment_methods,
258
            get_lib_from_av,
240
        }
259
        }
241
    },
260
    },
242
    methods: {
261
    methods: {
262
        displayPaymentMethods() {
263
            let get_lib_from_av = this.get_lib_from_av
264
265
            if (this.vendor.payment_method) {
266
                let methods = ""
267
                this.vendor.payment_method.split("|").forEach(method => {
268
                    const methodLib = get_lib_from_av(
269
                        "av_vendor_payment_methods",
270
                        method
271
                    )
272
                    methods += methodLib + ", "
273
                })
274
                return methods.substring(0, methods.length - 2)
275
            }
276
            return ""
277
        },
243
        formatTaxRate(taxRate) {
278
        formatTaxRate(taxRate) {
244
            if (!taxRate) return 0
279
            if (!taxRate) return 0
245
            const decimalPlaces = taxRate.toString().split(".")[1]?.length || 0
280
            const decimalPlaces = taxRate.toString().split(".")[1]?.length || 0
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/authorised-values.js (-1 / +1 lines)
Lines 44-49 export const useAVStore = defineStore("authorised_values", { Link Here
44
        av_item_reports_metrics: [],
44
        av_item_reports_metrics: [],
45
        av_vendor_types: [],
45
        av_vendor_types: [],
46
        av_vendor_interface_types: [],
46
        av_vendor_interface_types: [],
47
        av_vendor_payment_methods: [],
47
    }),
48
    }),
48
    actions: {
49
    actions: {
49
        get_lib_from_av(arr_name, av) {
50
        get_lib_from_av(arr_name, av) {
50
- 

Return to bug 38207