@bookmypuja-tech/bmp-pdf 0.1.8 → 0.2.0
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 +1 -0
- package/dist/index.js +13 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -28,8 +28,8 @@ var formatDate = (date) => {
|
|
|
28
28
|
|
|
29
29
|
// src/constants.ts
|
|
30
30
|
var bmpLogo = "https://res.cloudinary.com/dpaigt2bx/image/upload/f_auto,q_auto/v1/General%20BMP%20assets/vkesyodnuxuwevdwrk6m";
|
|
31
|
-
var robotoNormal = "https://
|
|
32
|
-
var robotoBold = "https://
|
|
31
|
+
var robotoNormal = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1742817493/fonts/ntbri6mclms8cfx3dk2e.ttf";
|
|
32
|
+
var robotoBold = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1742817493/fonts/ojiymraiiuw7juzkmmu8.ttf";
|
|
33
33
|
|
|
34
34
|
// src/sizes/A4Print.tsx
|
|
35
35
|
Font.register({
|
|
@@ -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.
|
|
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(
|
|
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