@bookmypuja-tech/bmp-pdf 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -49,6 +49,7 @@ interface IPujaReport {
49
49
  interface IQuickReport {
50
50
  templeName: string;
51
51
  receiptNumber: string;
52
+ address: string;
52
53
  pujas: {
53
54
  name: string;
54
55
  pujaQty?: number;
package/dist/index.js CHANGED
@@ -550,12 +550,21 @@ var getPujaReportReceipt2InchBase64Data = async (receiptData) => {
550
550
  import React6 from "react";
551
551
  import { Br as Br4, Cut as Cut4, Line as Line4, Printer as Printer4, render as render4, Text as Text6 } from "react-thermal-printer";
552
552
  var QuickReceipt2Inch = (data) => {
553
+ const timeRightNow = /* @__PURE__ */ new Date();
553
554
  return /* @__PURE__ */ React6.createElement(Printer4, { type: "epson", width: 32, characterSet: "iso8859_15_latin9" }, data.pujas.map((puja) => {
554
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Text6, { align: "center", bold: true }, data.templeName), /* @__PURE__ */ React6.createElement(Text6, { align: "center" }, data.receiptNumber), /* @__PURE__ */ React6.createElement(Line4, null), /* @__PURE__ */ React6.createElement(Text6, { bold: true, size: { height: 2, width: 1 } }, puja.name, Number(puja.pujaQty) > 1 && ` (Qty:${puja.pujaQty})`), /* @__PURE__ */ React6.createElement(Text6, { align: "left" }, puja.pujaDate.toLocaleDateString("en-US", {
555
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Text6, { align: "center", bold: true }, data.templeName), /* @__PURE__ */ React6.createElement(Text6, { align: "center" }, data.address), data.receiptNumber ? /* @__PURE__ */ React6.createElement(Text6, { align: "center" }, "Invoice no: ", String(data.receiptNumber)) : null, /* @__PURE__ */ React6.createElement(Text6, { align: "center" }, "Print:", " ", timeRightNow.toLocaleDateString("en-US", {
556
+ month: "short",
557
+ day: "numeric",
558
+ year: "numeric"
559
+ }), ",", " ", timeRightNow.toLocaleTimeString("en-US", {
560
+ hour: "numeric",
561
+ minute: "numeric",
562
+ hour12: true
563
+ }).toLowerCase()), /* @__PURE__ */ React6.createElement(Line4, null), /* @__PURE__ */ React6.createElement(Text6, { bold: true, size: { height: 2, width: 1 } }, puja.name, Number(puja.pujaQty) > 1 && ` (Qty:${puja.pujaQty})`), /* @__PURE__ */ React6.createElement(Text6, { align: "left" }, puja.pujaDate.toLocaleDateString("en-US", {
555
564
  month: "short",
556
565
  day: "numeric",
557
566
  year: "numeric"
558
- }), " ", "Rs ", Number(puja.pujaAmount).toLocaleString("en-IN")), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Cut4, null));
567
+ }), " ", "Rs ", Number(puja.pujaAmount).toLocaleString("en-IN")), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Br4, null), /* @__PURE__ */ React6.createElement(Line4, null), /* @__PURE__ */ React6.createElement(Text6, { align: "center" }, "Thank You"), /* @__PURE__ */ React6.createElement(Text6, { align: "center" }, "bookmypuja.app"), /* @__PURE__ */ React6.createElement(Cut4, { lineFeeds: 2 }));
559
568
  }));
560
569
  };
561
570
  var getQuickReceipt2InchBase64Data = async (receiptData) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bookmypuja-tech/bmp-pdf",
3
3
  "description": "PDF Report Generation for Temple360 and T-360 by BookMyPuja",
4
- "version": "0.1.8",
4
+ "version": "0.1.9",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",