2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 02:49:03 +00:00

feat: add option to enable/disable amount in words in print settings

This commit is contained in:
AbleKSaju 2024-10-10 16:18:41 +05:30
parent 3509ea9a89
commit b86bdc1fc2
4 changed files with 9 additions and 1 deletions

View File

@ -11,5 +11,6 @@ export class PrintSettings extends Doc {
color?: string; color?: string;
font?: string; font?: string;
displayLogo?: boolean; displayLogo?: boolean;
amountInWords?: boolean;
override hidden: HiddenMap = {}; override hidden: HiddenMap = {};
} }

View File

@ -114,6 +114,12 @@
"label": "Display Logo in Invoice", "label": "Display Logo in Invoice",
"fieldtype": "Check", "fieldtype": "Check",
"section": "Customizations" "section": "Customizations"
},
{
"fieldname": "amountInWords",
"label": "Display Amount In Words",
"fieldtype": "Check",
"section": "Customizations"
} }
] ]
} }

View File

@ -29,6 +29,7 @@ const printSettingsFields = [
'phone', 'phone',
'address', 'address',
'companyName', 'companyName',
'amountInWords',
]; ];
const accountingSettingsFields = ['gstin', 'taxId']; const accountingSettingsFields = ['gstin', 'taxId'];

View File

@ -126,7 +126,7 @@
<h3 class="text-lg font-semibold">Notes</h3> <h3 class="text-lg font-semibold">Notes</h3>
<p class="mt-4 text-lg whitespace-pre-line">{{ doc.terms }}</p> <p class="mt-4 text-lg whitespace-pre-line">{{ doc.terms }}</p>
</section> </section>
<div class="flex justify-end mt-10"> <div v-if="print.amountInWords" class="flex justify-end mt-10">
<h3 class="text-lg font-semibold mr-2">Grand Total In Words:</h3> <h3 class="text-lg font-semibold mr-2">Grand Total In Words:</h3>
<p>{{doc.grandTotalInWords}}</p> <p>{{doc.grandTotalInWords}}</p>
</div> </div>