2
0
mirror of https://github.com/frappe/books.git synced 2025-01-03 15:17:30 +00:00

feat: mention tax invoice on print

This commit is contained in:
18alantom 2022-10-11 17:10:38 +05:30 committed by Alan
parent fc779de25d
commit 7899619ab4
5 changed files with 59 additions and 21 deletions

View File

@ -24,6 +24,11 @@
"label": "Display Logo in Invoice",
"fieldtype": "Check"
},
{
"fieldname": "displayTaxInvoice",
"label": "Display Tax Invoice",
"fieldtype": "Check"
},
{
"fieldname": "phone",
"label": "Phone",
@ -133,6 +138,7 @@
"quickEditFields": [
"logo",
"displayLogo",
"displayTaxInvoice",
"template",
"color",
"font",

View File

@ -82,6 +82,7 @@ export default {
color: this.printSettings.color,
showHSN: this.showHSN,
displayLogo: this.printSettings.displayLogo,
displayTaxInvoice: this.printSettings.displayTaxInvoice,
discountAfterTax: this.doc.discountAfterTax,
logo: this.printSettings.logo,
companyName: this.fyo.singles.AccountingSettings.companyName,

View File

@ -5,6 +5,12 @@
>
<div>
<div class="px-6 pt-6">
<h2
v-if="printObject.displayTaxInvoice"
class="font-semibold text-black text-2xl mb-4"
>
{{ t`Tax Invoice` }}
</h2>
<div class="flex text-sm text-gray-900 border-b pb-4">
<div class="w-1/3">
<div v-if="printObject.displayLogo">

View File

@ -4,6 +4,12 @@
:style="{ 'font-family': printObject.font }"
>
<div class="bg-gray-100 px-12 py-10">
<h2
v-if="printObject.displayTaxInvoice"
class="font-semibold text-gray-900 text-2xl mb-4"
>
{{ t`Tax Invoice` }}
</h2>
<div class="flex items-center">
<div class="flex items-center rounded h-16">
<div class="mr-4" v-if="printObject.displayLogo">

View File

@ -3,38 +3,57 @@
class="bg-white border h-full"
:style="{ 'font-family': printObject.font }"
>
<div class="flex items-center justify-between px-12 py-10 border-b">
<div class="flex items-center">
<div class="flex items-center rounded h-16">
<div class="mr-4" v-if="printObject.displayLogo">
<img class="h-12 max-w-32 object-contain" :src="printObject.logo" />
<div class="flex flex-col w-full px-12 py-10 border-b">
<h2
v-if="printObject.displayTaxInvoice"
class="
font-semibold
text-gray-800 text-sm
tracking-widest
uppercase
mb-4
"
>
{{ t`Tax Invoice` }}
</h2>
<div class="flex items-center justify-between w-full">
<div class="flex items-center">
<div class="flex items-center rounded h-16">
<div class="mr-4" v-if="printObject.displayLogo">
<img
class="h-12 max-w-32 object-contain"
:src="printObject.logo"
/>
</div>
</div>
<div>
<div
class="font-semibold text-xl"
:style="{ color: printObject.color }"
>
{{ printObject.companyName }}
</div>
<div>
{{ printObject.date }}
</div>
</div>
</div>
<div>
<div class="text-right">
<div
class="font-semibold text-xl"
:style="{ color: printObject.color }"
>
{{ printObject.companyName }}
{{
printObject.isSalesInvoice
? t`Sales Invoice`
: t`Purchase Invoice`
}}
</div>
<div>
{{ printObject.date }}
{{ printObject.invoiceName }}
</div>
</div>
</div>
<div class="text-right">
<div
class="font-semibold text-xl"
:style="{ color: printObject.color }"
>
{{
printObject.isSalesInvoice ? t`Sales Invoice` : t`Purchase Invoice`
}}
</div>
<div>
{{ printObject.invoiceName }}
</div>
</div>
</div>
<div class="flex px-12 py-10 border-b">
<div class="w-1/2" v-if="printObject.partyName">