@bookmypuja-tech/bmp-pdf 0.2.1 → 0.2.3
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 +98 -1
- package/dist/index.js +1176 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -68,15 +68,112 @@ declare const T2Inch: ({ data, dates, }: {
|
|
|
68
68
|
dates: [string | Date, string | Date];
|
|
69
69
|
}) => React.JSX.Element;
|
|
70
70
|
|
|
71
|
+
interface KitchenReportData {
|
|
72
|
+
name: string;
|
|
73
|
+
quantity: number;
|
|
74
|
+
}
|
|
75
|
+
interface KitchenReportProps {
|
|
76
|
+
date: Date;
|
|
77
|
+
templeName: string;
|
|
78
|
+
data: KitchenReportData[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface ITransactionItem {
|
|
82
|
+
date: string;
|
|
83
|
+
time: string;
|
|
84
|
+
invoiceNumber: string;
|
|
85
|
+
bookingAmount: number;
|
|
86
|
+
creditedAmount: number;
|
|
87
|
+
}
|
|
88
|
+
interface ITransactionReport {
|
|
89
|
+
date: Date;
|
|
90
|
+
templeName: string;
|
|
91
|
+
data: ITransactionItem[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface IPrasadItem$1 {
|
|
95
|
+
invoiceNumber: string;
|
|
96
|
+
devoteeName: string;
|
|
97
|
+
pujaName: string;
|
|
98
|
+
address: string;
|
|
99
|
+
amount: number;
|
|
100
|
+
date: Date;
|
|
101
|
+
}
|
|
102
|
+
interface IPrasadDelivery {
|
|
103
|
+
date: Date;
|
|
104
|
+
templeName: string;
|
|
105
|
+
data: IPrasadItem$1[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface IPrasadItem {
|
|
109
|
+
invoiceNumber: string;
|
|
110
|
+
devoteeName: string;
|
|
111
|
+
prasadName: string;
|
|
112
|
+
quantity: number;
|
|
113
|
+
}
|
|
114
|
+
interface IPrasadReport {
|
|
115
|
+
date: Date;
|
|
116
|
+
templeName: string;
|
|
117
|
+
data: IPrasadItem[];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
interface IPuja {
|
|
121
|
+
name: string;
|
|
122
|
+
bookings: {
|
|
123
|
+
invoiceNumber: string;
|
|
124
|
+
devoteeName: string;
|
|
125
|
+
nakshatra: string;
|
|
126
|
+
quantity: string;
|
|
127
|
+
priestNote: string;
|
|
128
|
+
}[];
|
|
129
|
+
}
|
|
130
|
+
interface IPujaList {
|
|
131
|
+
date: Date;
|
|
132
|
+
templeName: string;
|
|
133
|
+
pujas: IPuja[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface ISummaryPuja {
|
|
137
|
+
name: string;
|
|
138
|
+
totalCount: number;
|
|
139
|
+
nakshatras: {
|
|
140
|
+
name: string;
|
|
141
|
+
count: number;
|
|
142
|
+
}[];
|
|
143
|
+
}
|
|
144
|
+
interface ISummaryPujaList {
|
|
145
|
+
date: Date;
|
|
146
|
+
templeName: string;
|
|
147
|
+
pujas: ISummaryPuja[];
|
|
148
|
+
}
|
|
149
|
+
|
|
71
150
|
type sizeOptions = "A4" | "2Inch";
|
|
72
151
|
declare const getPrintBlob: ({ size, data, dates, }: {
|
|
73
152
|
size: sizeOptions;
|
|
74
153
|
data: IPrintablePuja[];
|
|
75
154
|
dates: [string | Date, string | Date];
|
|
76
155
|
}) => Promise<Blob>;
|
|
156
|
+
declare const getA4SummaryBlob: () => Promise<Blob>;
|
|
77
157
|
declare const printDevoteeReceipt2Inch: (data: IPujaReceipt) => Promise<void>;
|
|
78
158
|
declare const printTotalReceipt2Inch: (data: ITotalReceipt) => Promise<void>;
|
|
79
159
|
declare const printePujaReport2Inch: (data: IPujaReport) => Promise<void>;
|
|
80
160
|
declare const printQuickPrintReceipt2Inch: (data: IQuickReport) => Promise<void>;
|
|
161
|
+
type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja" | "puja-summary";
|
|
162
|
+
type IReportSize = "A4";
|
|
163
|
+
type ReportDataTypes = {
|
|
164
|
+
kitchen: KitchenReportProps;
|
|
165
|
+
transaction: ITransactionReport;
|
|
166
|
+
"prasad-delivery": IPrasadDelivery;
|
|
167
|
+
prasad: IPrasadReport;
|
|
168
|
+
puja: IPujaList;
|
|
169
|
+
"puja-summary": ISummaryPujaList;
|
|
170
|
+
};
|
|
171
|
+
declare class reportPrinter<T extends IReportOptions> {
|
|
172
|
+
option: T;
|
|
173
|
+
size: IReportSize;
|
|
174
|
+
constructor(option: T, size: IReportSize);
|
|
175
|
+
print(data: ReportDataTypes[T]): Promise<Blob>;
|
|
176
|
+
getBlob(data: ReportDataTypes[T]): Promise<Blob>;
|
|
177
|
+
}
|
|
81
178
|
|
|
82
|
-
export { A4Print, type IPrintablePuja, type IPujaReceipt, T2Inch, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch };
|
|
179
|
+
export { A4Print, type KitchenReportProps as IKitchenReport, type IPrasadDelivery, type IPrasadReport, type IPrintablePuja, type IPujaReceipt, type IPujaList as IPujaReport, type ISummaryPujaList as ISummaryPujaReport, type ITransactionReport, T2Inch, getA4SummaryBlob, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch, reportPrinter };
|
package/dist/index.js
CHANGED
|
@@ -18,18 +18,21 @@ var formatDate = (date) => {
|
|
|
18
18
|
if (typeof date === "string") {
|
|
19
19
|
date = new Date(date);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const options2 = {
|
|
22
22
|
day: "2-digit",
|
|
23
23
|
month: "short",
|
|
24
24
|
year: "numeric"
|
|
25
25
|
};
|
|
26
|
-
return date.toLocaleDateString("en-GB",
|
|
26
|
+
return date.toLocaleDateString("en-GB", options2).replace(",", "");
|
|
27
27
|
};
|
|
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
31
|
var robotoNormal = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1742817493/fonts/ntbri6mclms8cfx3dk2e.ttf";
|
|
32
32
|
var robotoBold = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1742817493/fonts/ojiymraiiuw7juzkmmu8.ttf";
|
|
33
|
+
var notoSansRegular = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743420993/NotoSans-Regular_pmvebt.ttf";
|
|
34
|
+
var notoSansBold = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743431605/NotoSans-Bold_kagtvd.ttf";
|
|
35
|
+
var notoSansSemiBold = "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743431765/NotoSans-SemiBold_o96oas.ttf";
|
|
33
36
|
|
|
34
37
|
// src/sizes/A4Print.tsx
|
|
35
38
|
Font.register({
|
|
@@ -213,7 +216,7 @@ var A4Print = ({
|
|
|
213
216
|
var A4Print_default = A4Print;
|
|
214
217
|
|
|
215
218
|
// src/index.tsx
|
|
216
|
-
import
|
|
219
|
+
import React13 from "react";
|
|
217
220
|
|
|
218
221
|
// src/sizes/T2Inch.tsx
|
|
219
222
|
import React2 from "react";
|
|
@@ -572,20 +575,1121 @@ var getQuickReceipt2InchBase64Data = async (receiptData) => {
|
|
|
572
575
|
return btoa(String.fromCharCode.apply(null, Array.from(data)));
|
|
573
576
|
};
|
|
574
577
|
|
|
578
|
+
// src/sizes/a4/A4KitchenReport.tsx
|
|
579
|
+
import { Document as Document3, Image as Image5, Page as Page3, Text as Text7, View as View3 } from "@react-pdf/renderer";
|
|
580
|
+
import React7 from "react";
|
|
581
|
+
var A4KitchenReport = ({
|
|
582
|
+
date,
|
|
583
|
+
templeName,
|
|
584
|
+
data
|
|
585
|
+
}) => {
|
|
586
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(Document3, null, /* @__PURE__ */ React7.createElement(Page3, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React7.createElement(
|
|
587
|
+
Image5,
|
|
588
|
+
{
|
|
589
|
+
fixed: true,
|
|
590
|
+
style: {
|
|
591
|
+
height: 15,
|
|
592
|
+
width: 75,
|
|
593
|
+
marginBottom: 10
|
|
594
|
+
},
|
|
595
|
+
src: bmpLogo
|
|
596
|
+
}
|
|
597
|
+
), /* @__PURE__ */ React7.createElement(Text7, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React7.createElement(Text7, { style: { fontSize: 14, fontWeight: "bold" } }, "Temple Prasad (Kitchen) Report"), /* @__PURE__ */ React7.createElement(Text7, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React7.createElement(
|
|
598
|
+
View3,
|
|
599
|
+
{
|
|
600
|
+
style: {
|
|
601
|
+
display: "flex",
|
|
602
|
+
flexDirection: "column",
|
|
603
|
+
marginTop: 20
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
/* @__PURE__ */ React7.createElement(
|
|
607
|
+
View3,
|
|
608
|
+
{
|
|
609
|
+
style: {
|
|
610
|
+
display: "flex",
|
|
611
|
+
flexDirection: "row",
|
|
612
|
+
border: "1px solid #000",
|
|
613
|
+
fontSize: 10,
|
|
614
|
+
fontWeight: "semibold"
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
/* @__PURE__ */ React7.createElement(
|
|
618
|
+
View3,
|
|
619
|
+
{
|
|
620
|
+
style: {
|
|
621
|
+
padding: 6,
|
|
622
|
+
borderRight: "1px solid #000",
|
|
623
|
+
width: "20%"
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
/* @__PURE__ */ React7.createElement(Text7, null, "Sr no")
|
|
627
|
+
),
|
|
628
|
+
/* @__PURE__ */ React7.createElement(
|
|
629
|
+
View3,
|
|
630
|
+
{
|
|
631
|
+
style: {
|
|
632
|
+
padding: 6,
|
|
633
|
+
borderRight: "1px solid #000",
|
|
634
|
+
width: "60%"
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
/* @__PURE__ */ React7.createElement(Text7, null, "Prasad Name")
|
|
638
|
+
),
|
|
639
|
+
/* @__PURE__ */ React7.createElement(
|
|
640
|
+
View3,
|
|
641
|
+
{
|
|
642
|
+
style: {
|
|
643
|
+
padding: 6,
|
|
644
|
+
borderRight: "none",
|
|
645
|
+
width: "20%"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
/* @__PURE__ */ React7.createElement(Text7, null, "Quantity")
|
|
649
|
+
)
|
|
650
|
+
),
|
|
651
|
+
data.map((item, index) => {
|
|
652
|
+
return /* @__PURE__ */ React7.createElement(
|
|
653
|
+
View3,
|
|
654
|
+
{
|
|
655
|
+
style: {
|
|
656
|
+
display: "flex",
|
|
657
|
+
flexDirection: "row",
|
|
658
|
+
border: "1px solid #000",
|
|
659
|
+
borderTop: "none",
|
|
660
|
+
fontSize: 10
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
/* @__PURE__ */ React7.createElement(
|
|
664
|
+
View3,
|
|
665
|
+
{
|
|
666
|
+
style: {
|
|
667
|
+
padding: 6,
|
|
668
|
+
borderRight: "1px solid #000",
|
|
669
|
+
width: "20%"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
/* @__PURE__ */ React7.createElement(Text7, null, index + 1)
|
|
673
|
+
),
|
|
674
|
+
/* @__PURE__ */ React7.createElement(
|
|
675
|
+
View3,
|
|
676
|
+
{
|
|
677
|
+
style: {
|
|
678
|
+
padding: 6,
|
|
679
|
+
borderRight: "1px solid #000",
|
|
680
|
+
width: "60%"
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
/* @__PURE__ */ React7.createElement(Text7, null, item.name)
|
|
684
|
+
),
|
|
685
|
+
/* @__PURE__ */ React7.createElement(
|
|
686
|
+
View3,
|
|
687
|
+
{
|
|
688
|
+
style: {
|
|
689
|
+
padding: 6,
|
|
690
|
+
borderRight: "none",
|
|
691
|
+
width: "20%"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
/* @__PURE__ */ React7.createElement(Text7, null, item.quantity)
|
|
695
|
+
)
|
|
696
|
+
);
|
|
697
|
+
})
|
|
698
|
+
))));
|
|
699
|
+
};
|
|
700
|
+
var A4KitchenReport_default = A4KitchenReport;
|
|
701
|
+
|
|
702
|
+
// src/sizes/a4/A4TransactionReport.tsx
|
|
703
|
+
import { Document as Document4, Image as Image6, Page as Page4, Text as Text8, View as View4 } from "@react-pdf/renderer";
|
|
704
|
+
import React8 from "react";
|
|
705
|
+
var A4TransactionReport = ({
|
|
706
|
+
date,
|
|
707
|
+
templeName,
|
|
708
|
+
data
|
|
709
|
+
}) => {
|
|
710
|
+
const totalAmount = data.reduce((acc, item) => {
|
|
711
|
+
return acc + item.bookingAmount;
|
|
712
|
+
}, 0);
|
|
713
|
+
const totalCreditedAmount = data.reduce((acc, item) => {
|
|
714
|
+
return acc + item.creditedAmount;
|
|
715
|
+
}, 0);
|
|
716
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Document4, null, /* @__PURE__ */ React8.createElement(Page4, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React8.createElement(
|
|
717
|
+
Image6,
|
|
718
|
+
{
|
|
719
|
+
fixed: true,
|
|
720
|
+
style: {
|
|
721
|
+
height: 15,
|
|
722
|
+
width: 75,
|
|
723
|
+
marginBottom: 10
|
|
724
|
+
},
|
|
725
|
+
src: bmpLogo
|
|
726
|
+
}
|
|
727
|
+
), /* @__PURE__ */ React8.createElement(Text8, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React8.createElement(Text8, { style: { fontSize: 14, fontWeight: "bold" } }, "Transactions Report"), /* @__PURE__ */ React8.createElement(Text8, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React8.createElement(Text8, { style: { fontSize: 10, marginTop: 10 } }, "Total Bookings: ", totalAmount.toLocaleString("en-IN", {
|
|
728
|
+
maximumFractionDigits: 2,
|
|
729
|
+
style: "currency",
|
|
730
|
+
currency: "INR"
|
|
731
|
+
})), /* @__PURE__ */ React8.createElement(Text8, { style: { fontSize: 10 } }, "Total Credited Amount: ", totalCreditedAmount.toLocaleString("en-IN", {
|
|
732
|
+
maximumFractionDigits: 2,
|
|
733
|
+
style: "currency",
|
|
734
|
+
currency: "INR"
|
|
735
|
+
})), /* @__PURE__ */ React8.createElement(
|
|
736
|
+
View4,
|
|
737
|
+
{
|
|
738
|
+
style: {
|
|
739
|
+
display: "flex",
|
|
740
|
+
flexDirection: "column",
|
|
741
|
+
marginTop: 20
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
/* @__PURE__ */ React8.createElement(
|
|
745
|
+
View4,
|
|
746
|
+
{
|
|
747
|
+
style: {
|
|
748
|
+
display: "flex",
|
|
749
|
+
flexDirection: "row",
|
|
750
|
+
border: "1px solid black",
|
|
751
|
+
fontWeight: "semibold",
|
|
752
|
+
fontSize: 10
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
/* @__PURE__ */ React8.createElement(
|
|
756
|
+
View4,
|
|
757
|
+
{
|
|
758
|
+
style: {
|
|
759
|
+
padding: 6,
|
|
760
|
+
borderRight: "1px solid black",
|
|
761
|
+
width: "10%"
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
/* @__PURE__ */ React8.createElement(Text8, null, "Sr no")
|
|
765
|
+
),
|
|
766
|
+
/* @__PURE__ */ React8.createElement(
|
|
767
|
+
View4,
|
|
768
|
+
{
|
|
769
|
+
style: {
|
|
770
|
+
padding: 6,
|
|
771
|
+
borderRight: "1px solid black",
|
|
772
|
+
width: "15%"
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
/* @__PURE__ */ React8.createElement(Text8, null, "Date")
|
|
776
|
+
),
|
|
777
|
+
/* @__PURE__ */ React8.createElement(
|
|
778
|
+
View4,
|
|
779
|
+
{
|
|
780
|
+
style: {
|
|
781
|
+
padding: 6,
|
|
782
|
+
borderRight: "1px solid black",
|
|
783
|
+
width: "15%"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
/* @__PURE__ */ React8.createElement(Text8, null, "Time")
|
|
787
|
+
),
|
|
788
|
+
/* @__PURE__ */ React8.createElement(
|
|
789
|
+
View4,
|
|
790
|
+
{
|
|
791
|
+
style: {
|
|
792
|
+
padding: 6,
|
|
793
|
+
borderRight: "1px solid black",
|
|
794
|
+
width: "20%"
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
/* @__PURE__ */ React8.createElement(Text8, null, "Invoice Number")
|
|
798
|
+
),
|
|
799
|
+
/* @__PURE__ */ React8.createElement(
|
|
800
|
+
View4,
|
|
801
|
+
{
|
|
802
|
+
style: {
|
|
803
|
+
padding: 6,
|
|
804
|
+
borderRight: "1px solid black",
|
|
805
|
+
width: "20%"
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
/* @__PURE__ */ React8.createElement(Text8, null, "Booking Amount")
|
|
809
|
+
),
|
|
810
|
+
/* @__PURE__ */ React8.createElement(
|
|
811
|
+
View4,
|
|
812
|
+
{
|
|
813
|
+
style: {
|
|
814
|
+
padding: 6,
|
|
815
|
+
width: "20%"
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
/* @__PURE__ */ React8.createElement(Text8, null, "Credited Amount")
|
|
819
|
+
)
|
|
820
|
+
),
|
|
821
|
+
data.map((item, index) => {
|
|
822
|
+
return /* @__PURE__ */ React8.createElement(
|
|
823
|
+
View4,
|
|
824
|
+
{
|
|
825
|
+
style: {
|
|
826
|
+
display: "flex",
|
|
827
|
+
flexDirection: "row",
|
|
828
|
+
border: "1px solid black",
|
|
829
|
+
borderTop: "none",
|
|
830
|
+
fontSize: 10
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
/* @__PURE__ */ React8.createElement(
|
|
834
|
+
View4,
|
|
835
|
+
{
|
|
836
|
+
style: {
|
|
837
|
+
padding: 6,
|
|
838
|
+
borderRight: "1px solid black",
|
|
839
|
+
width: "10%"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
/* @__PURE__ */ React8.createElement(Text8, null, index + 1)
|
|
843
|
+
),
|
|
844
|
+
/* @__PURE__ */ React8.createElement(
|
|
845
|
+
View4,
|
|
846
|
+
{
|
|
847
|
+
style: {
|
|
848
|
+
padding: 6,
|
|
849
|
+
borderRight: "1px solid black",
|
|
850
|
+
width: "15%"
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
/* @__PURE__ */ React8.createElement(Text8, null, item.date)
|
|
854
|
+
),
|
|
855
|
+
/* @__PURE__ */ React8.createElement(
|
|
856
|
+
View4,
|
|
857
|
+
{
|
|
858
|
+
style: {
|
|
859
|
+
padding: 6,
|
|
860
|
+
borderRight: "1px solid black",
|
|
861
|
+
width: "15%"
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
/* @__PURE__ */ React8.createElement(Text8, null, item.time)
|
|
865
|
+
),
|
|
866
|
+
/* @__PURE__ */ React8.createElement(
|
|
867
|
+
View4,
|
|
868
|
+
{
|
|
869
|
+
style: {
|
|
870
|
+
padding: 6,
|
|
871
|
+
borderRight: "1px solid black",
|
|
872
|
+
width: "20%"
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
/* @__PURE__ */ React8.createElement(Text8, null, item.invoiceNumber)
|
|
876
|
+
),
|
|
877
|
+
/* @__PURE__ */ React8.createElement(
|
|
878
|
+
View4,
|
|
879
|
+
{
|
|
880
|
+
style: {
|
|
881
|
+
padding: 6,
|
|
882
|
+
borderRight: "1px solid black",
|
|
883
|
+
width: "20%"
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
/* @__PURE__ */ React8.createElement(Text8, null, item.bookingAmount.toLocaleString("en-IN", {
|
|
887
|
+
maximumFractionDigits: 2,
|
|
888
|
+
style: "currency",
|
|
889
|
+
currency: "INR"
|
|
890
|
+
}))
|
|
891
|
+
),
|
|
892
|
+
/* @__PURE__ */ React8.createElement(
|
|
893
|
+
View4,
|
|
894
|
+
{
|
|
895
|
+
style: {
|
|
896
|
+
padding: 6,
|
|
897
|
+
width: "20%"
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
/* @__PURE__ */ React8.createElement(Text8, null, item.creditedAmount.toLocaleString("en-IN", {
|
|
901
|
+
maximumFractionDigits: 2,
|
|
902
|
+
style: "currency",
|
|
903
|
+
currency: "INR"
|
|
904
|
+
}))
|
|
905
|
+
)
|
|
906
|
+
);
|
|
907
|
+
})
|
|
908
|
+
))));
|
|
909
|
+
};
|
|
910
|
+
var A4TransactionReport_default = A4TransactionReport;
|
|
911
|
+
|
|
912
|
+
// src/sizes/a4/A4PrasadDelivery.tsx
|
|
913
|
+
import { Document as Document5, Image as Image7, Page as Page5, Text as Text9, View as View5 } from "@react-pdf/renderer";
|
|
914
|
+
import React9 from "react";
|
|
915
|
+
var A4PrasadDelivery = ({
|
|
916
|
+
date,
|
|
917
|
+
templeName,
|
|
918
|
+
data
|
|
919
|
+
}) => {
|
|
920
|
+
return /* @__PURE__ */ React9.createElement(Document5, null, /* @__PURE__ */ React9.createElement(Page5, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React9.createElement(
|
|
921
|
+
Image7,
|
|
922
|
+
{
|
|
923
|
+
fixed: true,
|
|
924
|
+
style: {
|
|
925
|
+
height: 15,
|
|
926
|
+
width: 75,
|
|
927
|
+
marginBottom: 10
|
|
928
|
+
},
|
|
929
|
+
src: bmpLogo
|
|
930
|
+
}
|
|
931
|
+
), /* @__PURE__ */ React9.createElement(Text9, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React9.createElement(Text9, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Delivery Address"), /* @__PURE__ */ React9.createElement(Text9, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React9.createElement(
|
|
932
|
+
View5,
|
|
933
|
+
{
|
|
934
|
+
style: {
|
|
935
|
+
display: "flex",
|
|
936
|
+
flexDirection: "column",
|
|
937
|
+
marginTop: 20
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
/* @__PURE__ */ React9.createElement(
|
|
941
|
+
View5,
|
|
942
|
+
{
|
|
943
|
+
style: {
|
|
944
|
+
display: "flex",
|
|
945
|
+
flexDirection: "row",
|
|
946
|
+
border: "1px solid black",
|
|
947
|
+
fontWeight: "semibold",
|
|
948
|
+
fontSize: 10
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
/* @__PURE__ */ React9.createElement(
|
|
952
|
+
View5,
|
|
953
|
+
{
|
|
954
|
+
style: {
|
|
955
|
+
padding: 6,
|
|
956
|
+
borderRight: "1px solid black",
|
|
957
|
+
width: "10%"
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
/* @__PURE__ */ React9.createElement(Text9, null, "Date")
|
|
961
|
+
),
|
|
962
|
+
/* @__PURE__ */ React9.createElement(
|
|
963
|
+
View5,
|
|
964
|
+
{
|
|
965
|
+
style: {
|
|
966
|
+
padding: 6,
|
|
967
|
+
borderRight: "1px solid black",
|
|
968
|
+
width: "13%"
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
/* @__PURE__ */ React9.createElement(Text9, null, "Invoice")
|
|
972
|
+
),
|
|
973
|
+
/* @__PURE__ */ React9.createElement(
|
|
974
|
+
View5,
|
|
975
|
+
{
|
|
976
|
+
style: {
|
|
977
|
+
padding: 6,
|
|
978
|
+
borderRight: "1px solid black",
|
|
979
|
+
width: "18%"
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
/* @__PURE__ */ React9.createElement(Text9, null, "Devotee Name")
|
|
983
|
+
),
|
|
984
|
+
/* @__PURE__ */ React9.createElement(
|
|
985
|
+
View5,
|
|
986
|
+
{
|
|
987
|
+
style: {
|
|
988
|
+
padding: 6,
|
|
989
|
+
borderRight: "1px solid black",
|
|
990
|
+
width: "25%"
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
/* @__PURE__ */ React9.createElement(Text9, null, "Address")
|
|
994
|
+
),
|
|
995
|
+
/* @__PURE__ */ React9.createElement(
|
|
996
|
+
View5,
|
|
997
|
+
{
|
|
998
|
+
style: {
|
|
999
|
+
padding: 6,
|
|
1000
|
+
borderRight: "1px solid black",
|
|
1001
|
+
width: "20%"
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
/* @__PURE__ */ React9.createElement(Text9, null, "Puja Name")
|
|
1005
|
+
),
|
|
1006
|
+
/* @__PURE__ */ React9.createElement(
|
|
1007
|
+
View5,
|
|
1008
|
+
{
|
|
1009
|
+
style: {
|
|
1010
|
+
padding: 6,
|
|
1011
|
+
width: "15%"
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
/* @__PURE__ */ React9.createElement(Text9, null, "Amount")
|
|
1015
|
+
)
|
|
1016
|
+
),
|
|
1017
|
+
data.map((item, index) => {
|
|
1018
|
+
return /* @__PURE__ */ React9.createElement(
|
|
1019
|
+
View5,
|
|
1020
|
+
{
|
|
1021
|
+
style: {
|
|
1022
|
+
display: "flex",
|
|
1023
|
+
flexDirection: "row",
|
|
1024
|
+
border: "1px solid black",
|
|
1025
|
+
borderTop: "none",
|
|
1026
|
+
fontSize: 10
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
/* @__PURE__ */ React9.createElement(
|
|
1030
|
+
View5,
|
|
1031
|
+
{
|
|
1032
|
+
style: {
|
|
1033
|
+
padding: 6,
|
|
1034
|
+
borderRight: "1px solid black",
|
|
1035
|
+
width: "10%"
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
/* @__PURE__ */ React9.createElement(Text9, null, item.date.toLocaleDateString("en-GB", {
|
|
1039
|
+
day: "2-digit",
|
|
1040
|
+
month: "2-digit",
|
|
1041
|
+
year: "2-digit"
|
|
1042
|
+
}))
|
|
1043
|
+
),
|
|
1044
|
+
/* @__PURE__ */ React9.createElement(
|
|
1045
|
+
View5,
|
|
1046
|
+
{
|
|
1047
|
+
style: {
|
|
1048
|
+
padding: 6,
|
|
1049
|
+
borderRight: "1px solid black",
|
|
1050
|
+
width: "13%"
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
/* @__PURE__ */ React9.createElement(Text9, null, item.invoiceNumber)
|
|
1054
|
+
),
|
|
1055
|
+
/* @__PURE__ */ React9.createElement(
|
|
1056
|
+
View5,
|
|
1057
|
+
{
|
|
1058
|
+
style: {
|
|
1059
|
+
padding: 6,
|
|
1060
|
+
borderRight: "1px solid black",
|
|
1061
|
+
width: "18%"
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
/* @__PURE__ */ React9.createElement(Text9, null, item.devoteeName)
|
|
1065
|
+
),
|
|
1066
|
+
/* @__PURE__ */ React9.createElement(
|
|
1067
|
+
View5,
|
|
1068
|
+
{
|
|
1069
|
+
style: {
|
|
1070
|
+
padding: 6,
|
|
1071
|
+
borderRight: "1px solid black",
|
|
1072
|
+
width: "25%"
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
/* @__PURE__ */ React9.createElement(Text9, null, item.address)
|
|
1076
|
+
),
|
|
1077
|
+
/* @__PURE__ */ React9.createElement(
|
|
1078
|
+
View5,
|
|
1079
|
+
{
|
|
1080
|
+
style: {
|
|
1081
|
+
padding: 6,
|
|
1082
|
+
borderRight: "1px solid black",
|
|
1083
|
+
width: "20%"
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
/* @__PURE__ */ React9.createElement(Text9, null, item.pujaName)
|
|
1087
|
+
),
|
|
1088
|
+
/* @__PURE__ */ React9.createElement(
|
|
1089
|
+
View5,
|
|
1090
|
+
{
|
|
1091
|
+
style: {
|
|
1092
|
+
padding: 6,
|
|
1093
|
+
width: "15%"
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
/* @__PURE__ */ React9.createElement(Text9, null, item.amount.toLocaleString("en-IN", {
|
|
1097
|
+
maximumFractionDigits: 2,
|
|
1098
|
+
style: "currency",
|
|
1099
|
+
currency: "INR"
|
|
1100
|
+
}))
|
|
1101
|
+
)
|
|
1102
|
+
);
|
|
1103
|
+
})
|
|
1104
|
+
)));
|
|
1105
|
+
};
|
|
1106
|
+
var A4PrasadDelivery_default = A4PrasadDelivery;
|
|
1107
|
+
|
|
1108
|
+
// src/sizes/a4/A4PrasadReport.tsx
|
|
1109
|
+
import { Document as Document6, Image as Image8, Page as Page6, Text as Text10, View as View6 } from "@react-pdf/renderer";
|
|
1110
|
+
import React10 from "react";
|
|
1111
|
+
var A4PrasadReport = ({
|
|
1112
|
+
date,
|
|
1113
|
+
templeName,
|
|
1114
|
+
data
|
|
1115
|
+
}) => {
|
|
1116
|
+
const sortedPrasadItems = data.sort((a, b) => {
|
|
1117
|
+
return a.invoiceNumber.localeCompare(b.invoiceNumber);
|
|
1118
|
+
});
|
|
1119
|
+
return /* @__PURE__ */ React10.createElement(Document6, null, /* @__PURE__ */ React10.createElement(Page6, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React10.createElement(
|
|
1120
|
+
Image8,
|
|
1121
|
+
{
|
|
1122
|
+
fixed: true,
|
|
1123
|
+
style: {
|
|
1124
|
+
height: 15,
|
|
1125
|
+
width: 75,
|
|
1126
|
+
marginBottom: 10
|
|
1127
|
+
},
|
|
1128
|
+
src: bmpLogo
|
|
1129
|
+
}
|
|
1130
|
+
), /* @__PURE__ */ React10.createElement(Text10, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React10.createElement(Text10, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React10.createElement(Text10, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React10.createElement(
|
|
1131
|
+
View6,
|
|
1132
|
+
{
|
|
1133
|
+
style: {
|
|
1134
|
+
display: "flex",
|
|
1135
|
+
flexDirection: "column",
|
|
1136
|
+
marginTop: 20
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
/* @__PURE__ */ React10.createElement(
|
|
1140
|
+
View6,
|
|
1141
|
+
{
|
|
1142
|
+
style: {
|
|
1143
|
+
display: "flex",
|
|
1144
|
+
flexDirection: "row",
|
|
1145
|
+
border: "1px solid black",
|
|
1146
|
+
fontWeight: "semibold",
|
|
1147
|
+
fontSize: 10
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
/* @__PURE__ */ React10.createElement(
|
|
1151
|
+
View6,
|
|
1152
|
+
{
|
|
1153
|
+
style: {
|
|
1154
|
+
padding: 6,
|
|
1155
|
+
borderRight: "1px solid black",
|
|
1156
|
+
width: "10%"
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
/* @__PURE__ */ React10.createElement(Text10, null, "Sr no")
|
|
1160
|
+
),
|
|
1161
|
+
/* @__PURE__ */ React10.createElement(
|
|
1162
|
+
View6,
|
|
1163
|
+
{
|
|
1164
|
+
style: {
|
|
1165
|
+
padding: 6,
|
|
1166
|
+
borderRight: "1px solid black",
|
|
1167
|
+
width: "20%"
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
/* @__PURE__ */ React10.createElement(Text10, null, "Invoice Number")
|
|
1171
|
+
),
|
|
1172
|
+
/* @__PURE__ */ React10.createElement(
|
|
1173
|
+
View6,
|
|
1174
|
+
{
|
|
1175
|
+
style: {
|
|
1176
|
+
padding: 6,
|
|
1177
|
+
borderRight: "1px solid black",
|
|
1178
|
+
width: "30%"
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
/* @__PURE__ */ React10.createElement(Text10, null, "Devotee Name")
|
|
1182
|
+
),
|
|
1183
|
+
/* @__PURE__ */ React10.createElement(
|
|
1184
|
+
View6,
|
|
1185
|
+
{
|
|
1186
|
+
style: {
|
|
1187
|
+
padding: 6,
|
|
1188
|
+
borderRight: "1px solid black",
|
|
1189
|
+
width: "30%"
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
/* @__PURE__ */ React10.createElement(Text10, null, "Prasad Name")
|
|
1193
|
+
),
|
|
1194
|
+
/* @__PURE__ */ React10.createElement(
|
|
1195
|
+
View6,
|
|
1196
|
+
{
|
|
1197
|
+
style: {
|
|
1198
|
+
padding: 6,
|
|
1199
|
+
width: "10%"
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
/* @__PURE__ */ React10.createElement(Text10, null, "Qty")
|
|
1203
|
+
)
|
|
1204
|
+
),
|
|
1205
|
+
data.map((item, index) => {
|
|
1206
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1207
|
+
View6,
|
|
1208
|
+
{
|
|
1209
|
+
style: {
|
|
1210
|
+
display: "flex",
|
|
1211
|
+
flexDirection: "row",
|
|
1212
|
+
border: "1px solid black",
|
|
1213
|
+
borderTop: "none",
|
|
1214
|
+
fontSize: 10
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
/* @__PURE__ */ React10.createElement(
|
|
1218
|
+
View6,
|
|
1219
|
+
{
|
|
1220
|
+
style: {
|
|
1221
|
+
padding: 6,
|
|
1222
|
+
borderRight: "1px solid black",
|
|
1223
|
+
width: "10%"
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
/* @__PURE__ */ React10.createElement(Text10, null, index + 1)
|
|
1227
|
+
),
|
|
1228
|
+
/* @__PURE__ */ React10.createElement(
|
|
1229
|
+
View6,
|
|
1230
|
+
{
|
|
1231
|
+
style: {
|
|
1232
|
+
padding: 6,
|
|
1233
|
+
borderRight: "1px solid black",
|
|
1234
|
+
width: "20%"
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
/* @__PURE__ */ React10.createElement(Text10, null, item.invoiceNumber)
|
|
1238
|
+
),
|
|
1239
|
+
/* @__PURE__ */ React10.createElement(
|
|
1240
|
+
View6,
|
|
1241
|
+
{
|
|
1242
|
+
style: {
|
|
1243
|
+
padding: 6,
|
|
1244
|
+
borderRight: "1px solid black",
|
|
1245
|
+
width: "30%"
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
/* @__PURE__ */ React10.createElement(Text10, null, item.devoteeName)
|
|
1249
|
+
),
|
|
1250
|
+
/* @__PURE__ */ React10.createElement(
|
|
1251
|
+
View6,
|
|
1252
|
+
{
|
|
1253
|
+
style: {
|
|
1254
|
+
padding: 6,
|
|
1255
|
+
borderRight: "1px solid black",
|
|
1256
|
+
width: "30%"
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
/* @__PURE__ */ React10.createElement(Text10, null, item.prasadName)
|
|
1260
|
+
),
|
|
1261
|
+
/* @__PURE__ */ React10.createElement(
|
|
1262
|
+
View6,
|
|
1263
|
+
{
|
|
1264
|
+
style: {
|
|
1265
|
+
padding: 6,
|
|
1266
|
+
width: "10%"
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
/* @__PURE__ */ React10.createElement(Text10, null, item.quantity)
|
|
1270
|
+
)
|
|
1271
|
+
);
|
|
1272
|
+
})
|
|
1273
|
+
)));
|
|
1274
|
+
};
|
|
1275
|
+
var A4PrasadReport_default = A4PrasadReport;
|
|
1276
|
+
|
|
1277
|
+
// src/sizes/a4/A4PujaList.tsx
|
|
1278
|
+
import { Document as Document7, Image as Image9, Page as Page7, Text as Text11, View as View7 } from "@react-pdf/renderer";
|
|
1279
|
+
import React11 from "react";
|
|
1280
|
+
var A4PujaList = ({
|
|
1281
|
+
date,
|
|
1282
|
+
templeName,
|
|
1283
|
+
pujas
|
|
1284
|
+
}) => {
|
|
1285
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(Document7, null, /* @__PURE__ */ React11.createElement(Page7, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React11.createElement(
|
|
1286
|
+
Image9,
|
|
1287
|
+
{
|
|
1288
|
+
fixed: true,
|
|
1289
|
+
style: {
|
|
1290
|
+
height: 15,
|
|
1291
|
+
width: 75,
|
|
1292
|
+
marginBottom: 10
|
|
1293
|
+
},
|
|
1294
|
+
src: bmpLogo
|
|
1295
|
+
}
|
|
1296
|
+
), /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 14, fontWeight: "bold" } }, "Puja List"), /* @__PURE__ */ React11.createElement(Text11, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React11.createElement(
|
|
1297
|
+
View7,
|
|
1298
|
+
{
|
|
1299
|
+
style: {
|
|
1300
|
+
display: "flex",
|
|
1301
|
+
flexDirection: "column",
|
|
1302
|
+
marginTop: 20
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
pujas.map((puja, pujaIndex) => {
|
|
1306
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(View7, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React11.createElement(View7, null, /* @__PURE__ */ React11.createElement(
|
|
1307
|
+
Text11,
|
|
1308
|
+
{
|
|
1309
|
+
style: {
|
|
1310
|
+
fontSize: 10,
|
|
1311
|
+
fontWeight: "bold",
|
|
1312
|
+
border: "1px solid black",
|
|
1313
|
+
padding: 6,
|
|
1314
|
+
textAlign: "center",
|
|
1315
|
+
borderBottom: "none"
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
puja.name,
|
|
1319
|
+
" - ",
|
|
1320
|
+
puja.bookings.length
|
|
1321
|
+
)), /* @__PURE__ */ React11.createElement(
|
|
1322
|
+
View7,
|
|
1323
|
+
{
|
|
1324
|
+
style: {
|
|
1325
|
+
display: "flex",
|
|
1326
|
+
flexDirection: "row",
|
|
1327
|
+
border: "1px solid black"
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
/* @__PURE__ */ React11.createElement(
|
|
1331
|
+
View7,
|
|
1332
|
+
{
|
|
1333
|
+
style: {
|
|
1334
|
+
padding: 6,
|
|
1335
|
+
fontSize: 10,
|
|
1336
|
+
borderRight: "1px solid black",
|
|
1337
|
+
fontWeight: "semibold",
|
|
1338
|
+
width: "10%"
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Sr No")
|
|
1342
|
+
),
|
|
1343
|
+
/* @__PURE__ */ React11.createElement(
|
|
1344
|
+
View7,
|
|
1345
|
+
{
|
|
1346
|
+
style: {
|
|
1347
|
+
padding: 6,
|
|
1348
|
+
fontSize: 10,
|
|
1349
|
+
borderRight: "1px solid black",
|
|
1350
|
+
fontWeight: "semibold",
|
|
1351
|
+
width: "20%"
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Invoice No")
|
|
1355
|
+
),
|
|
1356
|
+
/* @__PURE__ */ React11.createElement(
|
|
1357
|
+
View7,
|
|
1358
|
+
{
|
|
1359
|
+
style: {
|
|
1360
|
+
padding: 6,
|
|
1361
|
+
fontSize: 10,
|
|
1362
|
+
borderRight: "1px solid black",
|
|
1363
|
+
fontWeight: "semibold",
|
|
1364
|
+
width: "35%"
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Devotee Name")
|
|
1368
|
+
),
|
|
1369
|
+
/* @__PURE__ */ React11.createElement(
|
|
1370
|
+
View7,
|
|
1371
|
+
{
|
|
1372
|
+
style: {
|
|
1373
|
+
padding: 6,
|
|
1374
|
+
fontSize: 10,
|
|
1375
|
+
borderRight: "1px solid black",
|
|
1376
|
+
fontWeight: "semibold",
|
|
1377
|
+
width: "25%"
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Nakshatra")
|
|
1381
|
+
),
|
|
1382
|
+
/* @__PURE__ */ React11.createElement(
|
|
1383
|
+
View7,
|
|
1384
|
+
{
|
|
1385
|
+
style: {
|
|
1386
|
+
padding: 6,
|
|
1387
|
+
fontSize: 10,
|
|
1388
|
+
borderRight: "none",
|
|
1389
|
+
fontWeight: "semibold",
|
|
1390
|
+
width: "10%"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
/* @__PURE__ */ React11.createElement(Text11, null, "Qty")
|
|
1394
|
+
)
|
|
1395
|
+
), puja.bookings.map((booking, bookingIndex) => {
|
|
1396
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
1397
|
+
View7,
|
|
1398
|
+
{
|
|
1399
|
+
style: {
|
|
1400
|
+
display: "flex",
|
|
1401
|
+
flexDirection: "row",
|
|
1402
|
+
border: "1px solid black",
|
|
1403
|
+
borderTop: "none",
|
|
1404
|
+
width: "100%"
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
/* @__PURE__ */ React11.createElement(
|
|
1408
|
+
View7,
|
|
1409
|
+
{
|
|
1410
|
+
style: {
|
|
1411
|
+
padding: 6,
|
|
1412
|
+
fontSize: 10,
|
|
1413
|
+
borderRight: "1px solid black",
|
|
1414
|
+
width: "10%"
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1417
|
+
/* @__PURE__ */ React11.createElement(Text11, null, bookingIndex + 1)
|
|
1418
|
+
),
|
|
1419
|
+
/* @__PURE__ */ React11.createElement(
|
|
1420
|
+
View7,
|
|
1421
|
+
{
|
|
1422
|
+
style: {
|
|
1423
|
+
display: "flex",
|
|
1424
|
+
flexDirection: "column",
|
|
1425
|
+
width: "90%"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
/* @__PURE__ */ React11.createElement(
|
|
1429
|
+
View7,
|
|
1430
|
+
{
|
|
1431
|
+
style: {
|
|
1432
|
+
display: "flex",
|
|
1433
|
+
flexDirection: "row"
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
/* @__PURE__ */ React11.createElement(
|
|
1437
|
+
View7,
|
|
1438
|
+
{
|
|
1439
|
+
style: {
|
|
1440
|
+
padding: 6,
|
|
1441
|
+
fontSize: 10,
|
|
1442
|
+
borderRight: "1px solid black",
|
|
1443
|
+
width: `${20 * 1.11111}%`
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.invoiceNumber)
|
|
1447
|
+
),
|
|
1448
|
+
/* @__PURE__ */ React11.createElement(
|
|
1449
|
+
View7,
|
|
1450
|
+
{
|
|
1451
|
+
style: {
|
|
1452
|
+
padding: 6,
|
|
1453
|
+
fontSize: 10,
|
|
1454
|
+
borderRight: "1px solid black",
|
|
1455
|
+
width: `${35 * 1.11111}%`
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.devoteeName)
|
|
1459
|
+
),
|
|
1460
|
+
/* @__PURE__ */ React11.createElement(
|
|
1461
|
+
View7,
|
|
1462
|
+
{
|
|
1463
|
+
style: {
|
|
1464
|
+
padding: 6,
|
|
1465
|
+
fontSize: 10,
|
|
1466
|
+
borderRight: "1px solid black",
|
|
1467
|
+
width: `${25 * 1.11111}%`
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.nakshatra)
|
|
1471
|
+
),
|
|
1472
|
+
/* @__PURE__ */ React11.createElement(
|
|
1473
|
+
View7,
|
|
1474
|
+
{
|
|
1475
|
+
style: {
|
|
1476
|
+
padding: 6,
|
|
1477
|
+
fontSize: 10,
|
|
1478
|
+
borderRight: "none",
|
|
1479
|
+
width: `${10 * 1.11111}%`
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.quantity)
|
|
1483
|
+
)
|
|
1484
|
+
),
|
|
1485
|
+
booking.priestNote && /* @__PURE__ */ React11.createElement(
|
|
1486
|
+
View7,
|
|
1487
|
+
{
|
|
1488
|
+
style: {
|
|
1489
|
+
padding: 6,
|
|
1490
|
+
fontSize: 10,
|
|
1491
|
+
borderTop: "1px solid black",
|
|
1492
|
+
width: "100%"
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
/* @__PURE__ */ React11.createElement(Text11, null, booking.priestNote)
|
|
1496
|
+
)
|
|
1497
|
+
)
|
|
1498
|
+
));
|
|
1499
|
+
})));
|
|
1500
|
+
})
|
|
1501
|
+
))));
|
|
1502
|
+
};
|
|
1503
|
+
var A4PujaList_default = A4PujaList;
|
|
1504
|
+
|
|
1505
|
+
// src/sizes/a4/A4Summary.tsx
|
|
1506
|
+
import React12 from "react";
|
|
1507
|
+
import {
|
|
1508
|
+
Page as Page8,
|
|
1509
|
+
Text as Text12,
|
|
1510
|
+
Document as Document8,
|
|
1511
|
+
Image as Image10,
|
|
1512
|
+
View as View8
|
|
1513
|
+
} from "@react-pdf/renderer";
|
|
1514
|
+
var A4Summary = ({
|
|
1515
|
+
templeName,
|
|
1516
|
+
date,
|
|
1517
|
+
pujas
|
|
1518
|
+
}) => {
|
|
1519
|
+
const sortedPujaList = pujas.sort((a, b) => {
|
|
1520
|
+
const aTotalCount = a.nakshatras.length;
|
|
1521
|
+
const bTotalCount = b.nakshatras.length;
|
|
1522
|
+
return bTotalCount - aTotalCount;
|
|
1523
|
+
});
|
|
1524
|
+
return /* @__PURE__ */ React12.createElement(Document8, null, /* @__PURE__ */ React12.createElement(
|
|
1525
|
+
Page8,
|
|
1526
|
+
{
|
|
1527
|
+
size: "A4",
|
|
1528
|
+
style: {
|
|
1529
|
+
padding: 30,
|
|
1530
|
+
fontFamily: "Noto Sans"
|
|
1531
|
+
}
|
|
1532
|
+
},
|
|
1533
|
+
/* @__PURE__ */ React12.createElement(
|
|
1534
|
+
Image10,
|
|
1535
|
+
{
|
|
1536
|
+
fixed: true,
|
|
1537
|
+
style: {
|
|
1538
|
+
height: 15,
|
|
1539
|
+
width: 75,
|
|
1540
|
+
marginBottom: 10
|
|
1541
|
+
},
|
|
1542
|
+
src: bmpLogo
|
|
1543
|
+
}
|
|
1544
|
+
),
|
|
1545
|
+
/* @__PURE__ */ React12.createElement(Text12, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()),
|
|
1546
|
+
/* @__PURE__ */ React12.createElement(Text12, { style: { fontSize: 14, fontWeight: "bold" } }, "Puja Summary"),
|
|
1547
|
+
/* @__PURE__ */ React12.createElement(Text12, { style: { fontSize: 12 } }, `${templeName}`),
|
|
1548
|
+
/* @__PURE__ */ React12.createElement(
|
|
1549
|
+
View8,
|
|
1550
|
+
{
|
|
1551
|
+
style: {
|
|
1552
|
+
display: "flex",
|
|
1553
|
+
flexDirection: "column",
|
|
1554
|
+
marginTop: 20
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
sortedPujaList.map((item, index) => {
|
|
1558
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(View8, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React12.createElement(View8, null, /* @__PURE__ */ React12.createElement(
|
|
1559
|
+
Text12,
|
|
1560
|
+
{
|
|
1561
|
+
style: {
|
|
1562
|
+
fontSize: 10,
|
|
1563
|
+
fontWeight: "bold",
|
|
1564
|
+
border: "1px solid black",
|
|
1565
|
+
padding: 6,
|
|
1566
|
+
textAlign: "center",
|
|
1567
|
+
borderBottom: "none"
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
item.name,
|
|
1571
|
+
" - ",
|
|
1572
|
+
item.totalCount
|
|
1573
|
+
)), /* @__PURE__ */ React12.createElement(
|
|
1574
|
+
View8,
|
|
1575
|
+
{
|
|
1576
|
+
style: {
|
|
1577
|
+
display: "flex",
|
|
1578
|
+
flexDirection: "row",
|
|
1579
|
+
border: "1px solid black"
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
/* @__PURE__ */ React12.createElement(
|
|
1583
|
+
View8,
|
|
1584
|
+
{
|
|
1585
|
+
style: {
|
|
1586
|
+
padding: 6,
|
|
1587
|
+
fontSize: 10,
|
|
1588
|
+
borderRight: "1px solid black",
|
|
1589
|
+
fontWeight: "semibold",
|
|
1590
|
+
width: "20%"
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
/* @__PURE__ */ React12.createElement(Text12, null, "Sr No")
|
|
1594
|
+
),
|
|
1595
|
+
/* @__PURE__ */ React12.createElement(
|
|
1596
|
+
View8,
|
|
1597
|
+
{
|
|
1598
|
+
style: {
|
|
1599
|
+
padding: 6,
|
|
1600
|
+
fontSize: 10,
|
|
1601
|
+
borderRight: "1px solid black",
|
|
1602
|
+
fontWeight: "semibold",
|
|
1603
|
+
width: "60%"
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
/* @__PURE__ */ React12.createElement(Text12, null, "Nakshatra")
|
|
1607
|
+
),
|
|
1608
|
+
/* @__PURE__ */ React12.createElement(
|
|
1609
|
+
View8,
|
|
1610
|
+
{
|
|
1611
|
+
style: {
|
|
1612
|
+
padding: 6,
|
|
1613
|
+
fontSize: 10,
|
|
1614
|
+
width: "20%",
|
|
1615
|
+
fontWeight: "semibold"
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
/* @__PURE__ */ React12.createElement(Text12, null, "Quantity")
|
|
1619
|
+
)
|
|
1620
|
+
), item.nakshatras.map((nakshatra, nakshatraIndex) => {
|
|
1621
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
|
|
1622
|
+
View8,
|
|
1623
|
+
{
|
|
1624
|
+
style: {
|
|
1625
|
+
display: "flex",
|
|
1626
|
+
flexDirection: "row",
|
|
1627
|
+
border: "1px solid black",
|
|
1628
|
+
borderTop: "none"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
/* @__PURE__ */ React12.createElement(
|
|
1632
|
+
View8,
|
|
1633
|
+
{
|
|
1634
|
+
style: {
|
|
1635
|
+
padding: 6,
|
|
1636
|
+
fontSize: 10,
|
|
1637
|
+
borderRight: "1px solid black",
|
|
1638
|
+
width: "20%"
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
/* @__PURE__ */ React12.createElement(Text12, null, nakshatraIndex + 1)
|
|
1642
|
+
),
|
|
1643
|
+
/* @__PURE__ */ React12.createElement(
|
|
1644
|
+
View8,
|
|
1645
|
+
{
|
|
1646
|
+
style: {
|
|
1647
|
+
padding: 6,
|
|
1648
|
+
fontSize: 10,
|
|
1649
|
+
borderRight: "1px solid black",
|
|
1650
|
+
width: "60%"
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
/* @__PURE__ */ React12.createElement(Text12, null, nakshatra.name)
|
|
1654
|
+
),
|
|
1655
|
+
/* @__PURE__ */ React12.createElement(
|
|
1656
|
+
View8,
|
|
1657
|
+
{
|
|
1658
|
+
style: {
|
|
1659
|
+
padding: 6,
|
|
1660
|
+
fontSize: 10,
|
|
1661
|
+
width: "20%"
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
/* @__PURE__ */ React12.createElement(Text12, null, nakshatra.count)
|
|
1665
|
+
)
|
|
1666
|
+
));
|
|
1667
|
+
})));
|
|
1668
|
+
})
|
|
1669
|
+
)
|
|
1670
|
+
));
|
|
1671
|
+
};
|
|
1672
|
+
var A4Summary_default = A4Summary;
|
|
1673
|
+
|
|
575
1674
|
// src/index.tsx
|
|
1675
|
+
import { Font as Font3 } from "@react-pdf/renderer";
|
|
576
1676
|
var getPrintBlob = ({
|
|
577
1677
|
size,
|
|
578
1678
|
data,
|
|
579
1679
|
dates
|
|
580
1680
|
}) => {
|
|
581
1681
|
if (size === "A4") {
|
|
582
|
-
const blob = pdf(/* @__PURE__ */
|
|
1682
|
+
const blob = pdf(/* @__PURE__ */ React13.createElement(A4Print_default, { data, dates })).toBlob();
|
|
583
1683
|
return blob;
|
|
584
1684
|
} else {
|
|
585
|
-
const blob = pdf(/* @__PURE__ */
|
|
1685
|
+
const blob = pdf(/* @__PURE__ */ React13.createElement(T2Inch_default, { data, dates })).toBlob();
|
|
586
1686
|
return blob;
|
|
587
1687
|
}
|
|
588
1688
|
};
|
|
1689
|
+
var getA4SummaryBlob = async () => {
|
|
1690
|
+
const blob = await pdf(/* @__PURE__ */ React13.createElement(A4Print_default, { data: [], dates: ["", ""] })).toBlob();
|
|
1691
|
+
return blob;
|
|
1692
|
+
};
|
|
589
1693
|
var printDevoteeReceipt2Inch = async (data) => {
|
|
590
1694
|
const base64DataObject = await getDevoteeReceipt2InchBase64Data(data);
|
|
591
1695
|
var S = "#Intent;scheme=rawbt;";
|
|
@@ -610,12 +1714,78 @@ var printQuickPrintReceipt2Inch = async (data) => {
|
|
|
610
1714
|
var P = "package=ru.a402d.rawbtprinter;end;";
|
|
611
1715
|
window.location.href = "intent:base64," + base64DataObject + S + P;
|
|
612
1716
|
};
|
|
1717
|
+
var options = {
|
|
1718
|
+
kitchen: {
|
|
1719
|
+
A4: A4KitchenReport_default
|
|
1720
|
+
},
|
|
1721
|
+
transaction: {
|
|
1722
|
+
A4: A4TransactionReport_default
|
|
1723
|
+
},
|
|
1724
|
+
"prasad-delivery": {
|
|
1725
|
+
A4: A4PrasadDelivery_default
|
|
1726
|
+
},
|
|
1727
|
+
prasad: {
|
|
1728
|
+
A4: A4PrasadReport_default
|
|
1729
|
+
},
|
|
1730
|
+
puja: {
|
|
1731
|
+
A4: A4PujaList_default
|
|
1732
|
+
},
|
|
1733
|
+
"puja-summary": {
|
|
1734
|
+
A4: A4Summary_default
|
|
1735
|
+
}
|
|
1736
|
+
};
|
|
1737
|
+
var reportPrinter = class {
|
|
1738
|
+
option;
|
|
1739
|
+
size;
|
|
1740
|
+
constructor(option, size) {
|
|
1741
|
+
this.option = option;
|
|
1742
|
+
this.size = size;
|
|
1743
|
+
Font3.register({
|
|
1744
|
+
family: "Noto Sans",
|
|
1745
|
+
fontWeight: "normal",
|
|
1746
|
+
src: notoSansRegular
|
|
1747
|
+
});
|
|
1748
|
+
Font3.register({
|
|
1749
|
+
family: "Noto Sans",
|
|
1750
|
+
fontWeight: "bold",
|
|
1751
|
+
src: notoSansBold
|
|
1752
|
+
});
|
|
1753
|
+
Font3.register({
|
|
1754
|
+
family: "Noto Sans",
|
|
1755
|
+
fontWeight: "semibold",
|
|
1756
|
+
src: notoSansSemiBold
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
async print(data) {
|
|
1760
|
+
const ReportComponent = options[this.option][this.size];
|
|
1761
|
+
const document = /* @__PURE__ */ React13.createElement(ReportComponent, { ...data });
|
|
1762
|
+
const blob = pdf(document).toBlob();
|
|
1763
|
+
blob.then((blob2) => {
|
|
1764
|
+
var blobURL = URL.createObjectURL(blob2);
|
|
1765
|
+
if (window != null) {
|
|
1766
|
+
const printWindow = window.open(blobURL, "_blank");
|
|
1767
|
+
setTimeout(() => {
|
|
1768
|
+
printWindow?.print();
|
|
1769
|
+
}, 1e3);
|
|
1770
|
+
}
|
|
1771
|
+
});
|
|
1772
|
+
return blob;
|
|
1773
|
+
}
|
|
1774
|
+
async getBlob(data) {
|
|
1775
|
+
const ReportComponent = options[this.option][this.size];
|
|
1776
|
+
const document = /* @__PURE__ */ React13.createElement(ReportComponent, { ...data });
|
|
1777
|
+
const blob = pdf(document).toBlob();
|
|
1778
|
+
return blob;
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
613
1781
|
export {
|
|
614
1782
|
A4Print_default as A4Print,
|
|
615
1783
|
T2Inch_default as T2Inch,
|
|
1784
|
+
getA4SummaryBlob,
|
|
616
1785
|
getPrintBlob,
|
|
617
1786
|
printDevoteeReceipt2Inch,
|
|
618
1787
|
printQuickPrintReceipt2Inch,
|
|
619
1788
|
printTotalReceipt2Inch,
|
|
620
|
-
printePujaReport2Inch
|
|
1789
|
+
printePujaReport2Inch,
|
|
1790
|
+
reportPrinter
|
|
621
1791
|
};
|
package/package.json
CHANGED