2
0
mirror of https://github.com/frappe/books.git synced 2025-01-23 15:18:24 +00:00

Merge pull request #924 from AbleKSaju/fix-QuoteDiscountAmount

feat: discount field in Sales Quote Print template
This commit is contained in:
Akshay 2024-08-13 10:35:27 +05:30 committed by GitHub
commit dbd09ecd25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);