@@ -1,7 +1,7 @@
<template lang="pug">
.summary
h2 {{ getTotal() }}
- h3 {{ customer.name }}
+ //- h3 {{ customer.name }}
</template>
<script>
@@ -10,11 +10,15 @@
export default {
computed: mapGetters({
total: 'getTotal',
- customer: 'getSelectedCustomer'
+ customer: 'getSelectedCustomer',
+ hasSelectedCustomer: 'hasSelectedCustomer'
}),
methods: {
getTotal() {
return accounting.formatMoney(this.total, '₲', 0, '.', ',')
+ },
+ getCustomer() {
+ return this.hasSelectedCustomer ? this.customer : {}
}