2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00
books/models/baseModels/SalesInvoice/InvoiceTemplate.vue

29 lines
604 B
Vue

<template>
<component :is="printComponent" :doc="doc" :print-settings="printSettings" />
</template>
<script>
import Basic from './Templates/Basic';
import Minimal from './Templates/Minimal';
import Business from './Templates/Business';
export default {
name: 'InvoiceTemplate',
props: ['doc', 'printSettings'],
computed: {
printComponent() {
let type = this.printSettings.template;
let templates = {
Basic,
Minimal,
Business
};
if (!(type in templates)) {
type = 'Basic';
}
return templates[type];
}
}
};
</script>