|
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 106-111
Link Here
|
| 106 |
:options="currencies" |
112 |
:options="currencies" |
| 107 |
/> |
113 |
/> |
| 108 |
</li> |
114 |
</li> |
|
|
115 |
<li> |
| 116 |
<label for="payment_method">{{ $__("Payment method") }}:</label> |
| 117 |
<v-select |
| 118 |
id="payment_method" |
| 119 |
v-model="vendor.payment_method" |
| 120 |
label="description" |
| 121 |
:reduce="av => av.value" |
| 122 |
:options="authorisedValues.av_vendor_payment_methods" |
| 123 |
multiple |
| 124 |
/> |
| 125 |
</li> |
| 109 |
<li> |
126 |
<li> |
| 110 |
<label for="gst">{{ $__("Tax number registered") }}:</label> |
127 |
<label for="gst">{{ $__("Tax number registered") }}:</label> |
| 111 |
<input |
128 |
<input |
|
Lines 237-250
export default {
Link Here
|
| 237 |
}, |
254 |
}, |
| 238 |
setup() { |
255 |
setup() { |
| 239 |
const vendorStore = inject("vendorStore"); |
256 |
const vendorStore = inject("vendorStore"); |
| 240 |
const { currencies, gstValues } = storeToRefs(vendorStore); |
257 |
const { currencies, gstValues, authorisedValues } = |
|
|
258 |
storeToRefs(vendorStore); |
| 259 |
const { get_lib_from_av } = vendorStore; |
| 241 |
|
260 |
|
| 242 |
return { |
261 |
return { |
| 243 |
currencies, |
262 |
currencies, |
| 244 |
gstValues, |
263 |
gstValues, |
|
|
264 |
authorisedValues, |
| 265 |
get_lib_from_av, |
| 245 |
}; |
266 |
}; |
| 246 |
}, |
267 |
}, |
| 247 |
methods: { |
268 |
methods: { |
|
|
269 |
displayPaymentMethods() { |
| 270 |
let get_lib_from_av = this.get_lib_from_av; |
| 271 |
|
| 272 |
if (this.vendor.payment_method) { |
| 273 |
let methods = ""; |
| 274 |
this.vendor.payment_method.split("|").forEach(method => { |
| 275 |
const methodLib = get_lib_from_av( |
| 276 |
"av_vendor_payment_methods", |
| 277 |
method |
| 278 |
); |
| 279 |
methods += methodLib + ", "; |
| 280 |
}); |
| 281 |
return methods.substring(0, methods.length - 2); |
| 282 |
} |
| 283 |
return ""; |
| 284 |
}, |
| 248 |
formatTaxRate(taxRate) { |
285 |
formatTaxRate(taxRate) { |
| 249 |
if (!taxRate) return 0; |
286 |
if (!taxRate) return 0; |
| 250 |
const decimalPlaces = taxRate.toString().split(".")[1]?.length || 0; |
287 |
const decimalPlaces = taxRate.toString().split(".")[1]?.length || 0; |