mirror of
https://github.com/frappe/books.git
synced 2025-02-02 20:18:26 +00:00
fix: party address doesn't show in print
This commit is contained in:
parent
8981dc3230
commit
82336e18bc
@ -3,7 +3,7 @@ import { fyo } from 'src/initFyo';
|
||||
export default {
|
||||
name: 'Base',
|
||||
props: { doc: Object, printSettings: Object },
|
||||
data: () => ({ party: null, companyAddress: null }),
|
||||
data: () => ({ party: null, companyAddress: null, partyAddress: null }),
|
||||
methods: {
|
||||
format(row, fieldname) {
|
||||
const value = row.get(fieldname);
|
||||
@ -11,10 +11,12 @@ export default {
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
await this.doc.loadLink('party');
|
||||
this.party = this.doc.getLink('party');
|
||||
await this.printSettings.loadLink('address');
|
||||
this.companyAddress = this.printSettings.getLink('address');
|
||||
|
||||
await this.doc.loadLink('party');
|
||||
this.party = this.doc.getLink('party');
|
||||
this.partyAddress = this.party.getLink('address')?.addressDisplay ?? null;
|
||||
},
|
||||
computed: {
|
||||
isSalesInvoice() {
|
||||
|
@ -49,10 +49,10 @@
|
||||
{{ party.name }}
|
||||
</div>
|
||||
<div
|
||||
v-if="party && party.addressDisplay"
|
||||
v-if="partyAddress"
|
||||
class="mt-1 text-xs text-gray-600 text-right"
|
||||
>
|
||||
{{ party.addressDisplay }}
|
||||
{{ partyAddress }}
|
||||
</div>
|
||||
<div
|
||||
v-if="party && party.gstin"
|
||||
|
@ -25,7 +25,10 @@
|
||||
</div>
|
||||
<div
|
||||
class="text-sm text-gray-800"
|
||||
v-if="fyo.singles.AccountingSettings && fyo.singles.AccountingSettings.gstin"
|
||||
v-if="
|
||||
fyo.singles.AccountingSettings &&
|
||||
fyo.singles.AccountingSettings.gstin
|
||||
"
|
||||
>
|
||||
GSTIN: {{ fyo.singles.AccountingSettings.gstin }}
|
||||
</div>
|
||||
@ -53,8 +56,8 @@
|
||||
<div class="font-semibold">
|
||||
{{ party.name }}
|
||||
</div>
|
||||
<div>
|
||||
{{ party.addressDisplay }}
|
||||
<div v-if="partyAddress">
|
||||
{{ partyAddress }}
|
||||
</div>
|
||||
<div v-if="party && party.gstin">GSTIN: {{ party.gstin }}</div>
|
||||
</div>
|
||||
@ -62,7 +65,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-12 py-12 text-lg">
|
||||
<div class="mb-4 flex font-semibold ">
|
||||
<div class="mb-4 flex font-semibold">
|
||||
<div class="w-4/12">Item</div>
|
||||
<div class="w-2/12 text-right">Quantity</div>
|
||||
<div class="w-3/12 text-right">Rate</div>
|
||||
@ -113,14 +116,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-12" v-if="doc.terms">
|
||||
<div
|
||||
class="text-lg font-semibold"
|
||||
>
|
||||
Notes
|
||||
</div>
|
||||
<div class="mt-4 text-lg whitespace-pre-line">
|
||||
{{ doc.terms }}
|
||||
</div>
|
||||
<div class="text-lg font-semibold">Notes</div>
|
||||
<div class="mt-4 text-lg whitespace-pre-line">
|
||||
{{ doc.terms }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -132,6 +131,6 @@ import Base from './BaseTemplate.vue';
|
||||
|
||||
export default {
|
||||
name: 'Business',
|
||||
extends: Base
|
||||
extends: Base,
|
||||
};
|
||||
</script>
|
||||
|
@ -30,7 +30,11 @@
|
||||
class="font-semibold text-xl"
|
||||
:style="{ color: printSettings.color }"
|
||||
>
|
||||
{{ doc.schemaName === 'SalesInvoice' ? t`Sales Invoice` : t`Purchase Invoice` }}
|
||||
{{
|
||||
doc.schemaName === 'SalesInvoice'
|
||||
? t`Sales Invoice`
|
||||
: t`Purchase Invoice`
|
||||
}}
|
||||
</div>
|
||||
<div>
|
||||
{{ doc.name }}
|
||||
@ -46,7 +50,7 @@
|
||||
</div>
|
||||
<div class="mt-4 text-black leading-relaxed text-lg">
|
||||
{{ party.name }} <br />
|
||||
{{ party.addressDisplay }}
|
||||
{{ partyAddress ? partyAddress : '' }}
|
||||
</div>
|
||||
<div
|
||||
class="mt-4 text-black leading-relaxed text-lg"
|
||||
@ -73,7 +77,10 @@
|
||||
</div>
|
||||
<div
|
||||
class="mt-4 ml-8 text-black leading-relaxed text-lg"
|
||||
v-if="fyo.singles.AccountingSettings && fyo.singles.AccountingSettings.gstin"
|
||||
v-if="
|
||||
fyo.singles.AccountingSettings &&
|
||||
fyo.singles.AccountingSettings.gstin
|
||||
"
|
||||
>
|
||||
GSTIN: {{ fyo.singles.AccountingSettings.gstin }}
|
||||
</div>
|
||||
|
@ -99,7 +99,7 @@
|
||||
text-sm text-gray-600
|
||||
flex
|
||||
justify-between
|
||||
overflow-x-scroll
|
||||
overflow-x-auto
|
||||
"
|
||||
>
|
||||
<p class="whitespace-nowrap mr-2">
|
||||
|
Loading…
x
Reference in New Issue
Block a user