From 2e9516a40fad065bd34622d5a20fa094a3c507b9 Mon Sep 17 00:00:00 2001 From: AbleKSaju <126228406+AbleKSaju@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:34:02 +0530 Subject: [PATCH] feat: print template for POS --- src/pages/TemplateBuilder/TemplateBuilder.vue | 10 +- templates/POS.template.html | 148 ++++++++++++++++++ 2 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 templates/POS.template.html diff --git a/src/pages/TemplateBuilder/TemplateBuilder.vue b/src/pages/TemplateBuilder/TemplateBuilder.vue index 3d99fc89..8db29cee 100644 --- a/src/pages/TemplateBuilder/TemplateBuilder.vue +++ b/src/pages/TemplateBuilder/TemplateBuilder.vue @@ -53,8 +53,13 @@ :template="doc.template!" :values="values!" :scale="scale" - :height="doc.height" - :width="doc.width" + :height="doc.name.startsWith('POS') ? 20 : doc.height" + :width=" + doc.name.startsWith('POS') && + fyo.singles.PrintSettings.posPrintWidth + ? fyo.singles.PrintSettings.posPrintWidth + : doc.width + " /> @@ -91,7 +96,6 @@ :container-styles="{ 'border-radius': '0px' }" @change="async (value) => await setType(value)" /> - + + + + + + + {{ print.companyName }} + + + + + + {{ print.email }} + {{ print.phone }} + + + + + {{ print.links.address.addressDisplay }} + GSTIN: {{ print.gstin }} + + + + + + + + {{ doc.name }} + {{ doc.date }} + + + + + {{ doc.party }} + + {{ doc.links.party.links.address.addressDisplay }} + + + GSTIN: {{ doc.partyGSTIN }} + + + + + + + + + {{ t`Item` }} + + {{ t`HSN/SAC` }} + + {{ t`Quantity` }} + {{ t`Rate` }} + {{ t`Amount` }} + + + + + {{ row.item }} + + {{ row.hsnCode }} + + {{ row.quantity }} + {{ row.rate }} + {{ row.amount }} + + + + + + \ No newline at end of file
{{ doc.date }}
+ {{ doc.links.party.links.address.addressDisplay }} +
+ GSTIN: {{ doc.partyGSTIN }} +