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

feat: discount field in Sales Quote Print template

This commit is contained in:
AbleKSaju 2024-08-12 17:14:25 +05:30
parent 99e6cd5ec0
commit 3fa552a19b

View File

@ -56,8 +56,8 @@ export async function getPrintTemplatePropValues(
...printValues,
...accountingValues,
};
if (doc.schemaName?.endsWith('Invoice')) {
const discountSchema = ['Invoice', 'Quote'];
if (discountSchema.some(value => doc.schemaName?.endsWith(value))) {
(values.doc as PrintTemplateData).totalDiscount =
formattedTotalDiscount(doc);
(values.doc as PrintTemplateData).showHSN = showHSN(doc);