@bookmypuja-tech/bmp-pdf 0.3.45 → 0.3.47

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -4766
  2. package/package.json +16 -23
package/dist/index.js CHANGED
@@ -1,4766 +1,2 @@
1
- // src/index.tsx
2
- import { pdf } from "@react-pdf/renderer";
3
-
4
- // src/sizes/A4Print.tsx
5
- import React from "react";
6
- import {
7
- Document,
8
- Font,
9
- Image,
10
- Page,
11
- StyleSheet,
12
- Text,
13
- View
14
- } from "@react-pdf/renderer";
15
-
16
- // src/functions.ts
17
- var formatDate = (date) => {
18
- if (typeof date === "string") {
19
- date = new Date(date);
20
- }
21
- const options2 = {
22
- day: "2-digit",
23
- month: "short",
24
- year: "numeric"
25
- };
26
- return date.toLocaleDateString("en-GB", options2).replace(",", "");
27
- };
28
-
29
- // src/constants.ts
30
- var bmpLogo = "https://res.cloudinary.com/dpaigt2bx/image/upload/f_auto,q_auto/v1/General%20BMP%20assets/vkesyodnuxuwevdwrk6m";
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
- 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";
36
- var bmpLogo2 = "https://res.cloudinary.com/dpaigt2bx/image/upload/v1752653165/BookMyPuja_1_1_bd1xa0.png";
37
- var paidIcon = "https://res.cloudinary.com/dpaigt2bx/image/upload/v1752669810/paid-5025785_1280_afg4ob_gcacmg.png";
38
- var reportTimingsObj = {
39
- morning: "Morning",
40
- evening: "Evening"
41
- };
42
-
43
- // src/sizes/A4Print.tsx
44
- Font.register({
45
- family: "Roboto",
46
- fontWeight: "normal",
47
- src: robotoNormal
48
- });
49
- Font.register({
50
- family: "Roboto",
51
- fontWeight: "bold",
52
- src: robotoBold
53
- });
54
- var styles = StyleSheet.create({
55
- page: {
56
- padding: 30,
57
- fontFamily: "Roboto"
58
- },
59
- pujaTile: {
60
- padding: 10,
61
- fontSize: 9,
62
- border: "1px solid rgb(100,100,100)",
63
- borderRadius: 5,
64
- width: "100%",
65
- display: "flex",
66
- flexDirection: "row"
67
- }
68
- });
69
- var A4Print = ({
70
- data,
71
- dates
72
- }) => {
73
- const isSingleDate = formatDate(dates[0]) === formatDate(dates[1]);
74
- return /* @__PURE__ */ React.createElement(Document, null, /* @__PURE__ */ React.createElement(Page, { size: "A4", style: styles.page }, /* @__PURE__ */ React.createElement(
75
- Image,
76
- {
77
- fixed: true,
78
- style: {
79
- height: 15,
80
- width: 75,
81
- marginBottom: 10
82
- },
83
- src: bmpLogo
84
- }
85
- ), /* @__PURE__ */ React.createElement(Text, { style: { fontSize: 13, marginBottom: 2 } }, "Puja List"), /* @__PURE__ */ React.createElement(Text, { style: { fontSize: 10, marginBottom: 10 } }, "Date", ":", " ", isSingleDate ? formatDate(dates[0]) : `${formatDate(dates[0])} - ${formatDate(dates[1])}`), /* @__PURE__ */ React.createElement(
86
- View,
87
- {
88
- style: {
89
- display: "flex",
90
- flexDirection: "row",
91
- flexWrap: "wrap",
92
- justifyContent: "space-between",
93
- gap: 8
94
- }
95
- },
96
- data ? data.map((item, index) => {
97
- return /* @__PURE__ */ React.createElement(View, { wrap: false, key: index, style: styles.pujaTile }, /* @__PURE__ */ React.createElement(View, { style: { display: "flex", flexDirection: "row" } }, /* @__PURE__ */ React.createElement(
98
- Text,
99
- {
100
- style: {
101
- opacity: 0.6,
102
- marginRight: 10
103
- }
104
- },
105
- "#",
106
- (index + 1).toString().padStart(2, "0")
107
- )), /* @__PURE__ */ React.createElement(
108
- View,
109
- {
110
- style: {
111
- flexGrow: 1
112
- }
113
- },
114
- /* @__PURE__ */ React.createElement(
115
- View,
116
- {
117
- style: {
118
- display: "flex",
119
- flexDirection: "row",
120
- marginBottom: 3,
121
- gap: 3
122
- }
123
- },
124
- /* @__PURE__ */ React.createElement(Text, { style: { fontSize: 10, fontWeight: "bold" } }, item.participantName),
125
- /* @__PURE__ */ React.createElement(Text, { style: { fontSize: 10, fontWeight: "bold" } }, "-"),
126
- /* @__PURE__ */ React.createElement(Text, { style: { fontSize: 10, fontWeight: "bold" } }, item.participantNakshatra)
127
- ),
128
- /* @__PURE__ */ React.createElement(
129
- View,
130
- {
131
- style: {
132
- display: "flex",
133
- flexDirection: "row",
134
- alignContent: "flex-end",
135
- gap: 10
136
- }
137
- },
138
- /* @__PURE__ */ React.createElement(
139
- View,
140
- {
141
- style: {
142
- display: "flex",
143
- flexDirection: "row",
144
- alignContent: "flex-end"
145
- }
146
- },
147
- /* @__PURE__ */ React.createElement(Text, null, "Puja name : "),
148
- /* @__PURE__ */ React.createElement(Text, { style: { fontSize: 10, fontWeight: "bold" } }, item.pujaName)
149
- ),
150
- isSingleDate ? null : /* @__PURE__ */ React.createElement(
151
- View,
152
- {
153
- style: {
154
- display: "flex",
155
- flexDirection: "row",
156
- alignContent: "flex-end"
157
- }
158
- },
159
- /* @__PURE__ */ React.createElement(Text, null, "Date: "),
160
- /* @__PURE__ */ React.createElement(Text, { style: { fontWeight: "bold" } }, formatDate(item.date))
161
- )
162
- ),
163
- /* @__PURE__ */ React.createElement(
164
- View,
165
- {
166
- style: {
167
- display: "flex",
168
- flexDirection: "row",
169
- alignContent: "flex-end",
170
- gap: 10
171
- }
172
- }
173
- ),
174
- item.priestNote !== "" && item.priestNote !== null && item.priestNote !== void 0 ? /* @__PURE__ */ React.createElement(
175
- View,
176
- {
177
- style: {
178
- display: "flex",
179
- flexDirection: "row",
180
- justifyContent: "space-between",
181
- marginTop: 3
182
- }
183
- },
184
- /* @__PURE__ */ React.createElement(Text, null, "Priest Note: ", item.priestNote)
185
- ) : null
186
- ), /* @__PURE__ */ React.createElement(
187
- View,
188
- {
189
- style: {
190
- display: "flex",
191
- flexDirection: "column",
192
- alignItems: "flex-end"
193
- }
194
- },
195
- /* @__PURE__ */ React.createElement(Text, { style: { fontWeight: "bold", fontSize: 10 } }, "Rs ", item.amount),
196
- item.paymentStatus == "pending" ? /* @__PURE__ */ React.createElement(
197
- View,
198
- {
199
- style: {
200
- backgroundColor: "#000000",
201
- paddingVertical: 3,
202
- paddingHorizontal: 5,
203
- borderRadius: 5,
204
- marginTop: 3
205
- }
206
- },
207
- /* @__PURE__ */ React.createElement(
208
- Text,
209
- {
210
- style: {
211
- color: "#ffffff",
212
- fontSize: 8
213
- }
214
- },
215
- "Pending"
216
- )
217
- ) : null
218
- ));
219
- }) : null
220
- )));
221
- };
222
- var A4Print_default = A4Print;
223
-
224
- // src/index.tsx
225
- import React19 from "react";
226
-
227
- // src/sizes/T2Inch.tsx
228
- import React2 from "react";
229
- import {
230
- Document as Document2,
231
- Font as Font2,
232
- Image as Image2,
233
- Page as Page2,
234
- StyleSheet as StyleSheet2,
235
- Text as Text2,
236
- View as View2
237
- } from "@react-pdf/renderer";
238
- Font2.register({
239
- family: "Roboto",
240
- fontWeight: "normal",
241
- src: robotoNormal
242
- });
243
- Font2.register({
244
- family: "Roboto",
245
- fontWeight: "bold",
246
- src: robotoBold
247
- });
248
- var scalingFactor = 1;
249
- var globalFontSize = 25 * scalingFactor;
250
- var styles2 = StyleSheet2.create({
251
- page: {
252
- padding: 10 * scalingFactor,
253
- fontFamily: "Roboto"
254
- },
255
- pujaTile: {
256
- paddingVertical: 10 * scalingFactor,
257
- paddingHorizontal: 10 * scalingFactor,
258
- fontSize: globalFontSize,
259
- border: `${5 * scalingFactor}px solid black`,
260
- borderRadius: 5 * scalingFactor,
261
- width: "100%",
262
- display: "flex",
263
- flexDirection: "column"
264
- }
265
- });
266
- var T2Inch = ({
267
- data,
268
- dates
269
- }) => {
270
- const isSingleDate = formatDate(dates[0]) === formatDate(dates[1]);
271
- return /* @__PURE__ */ React2.createElement(Document2, null, /* @__PURE__ */ React2.createElement(Page2, { dpi: 200, size: [457 * scalingFactor], style: styles2.page }, /* @__PURE__ */ React2.createElement(
272
- Image2,
273
- {
274
- fixed: true,
275
- style: {
276
- height: 55 * scalingFactor,
277
- width: 274 * scalingFactor,
278
- marginBottom: 10 * scalingFactor,
279
- marginHorizontal: "auto"
280
- },
281
- src: bmpLogo
282
- }
283
- ), /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: 25 * scalingFactor, marginBottom: 5 * scalingFactor, marginHorizontal: "auto" } }, "Puja List"), /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: 20 * scalingFactor, marginBottom: 5 * scalingFactor, marginHorizontal: "auto", fontWeight: "bold" } }, "Date", ":", " ", isSingleDate ? formatDate(dates[0]) : `${formatDate(dates[0])} - ${formatDate(dates[1])}`), /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: 17 * scalingFactor, marginBottom: 20 * scalingFactor, marginHorizontal: "auto" } }, "Printed at : ", (/* @__PURE__ */ new Date()).toLocaleString()), /* @__PURE__ */ React2.createElement(
284
- View2,
285
- {
286
- style: {
287
- display: "flex",
288
- flexDirection: "row",
289
- flexWrap: "wrap",
290
- justifyContent: "space-between",
291
- gap: 15 * scalingFactor
292
- }
293
- },
294
- data ? data.map((item, index) => {
295
- return /* @__PURE__ */ React2.createElement(View2, { wrap: false, key: index, style: styles2.pujaTile }, /* @__PURE__ */ React2.createElement(View2, { style: { display: "flex", flexDirection: "row", justifyContent: "space-between", marginBottom: 5 * scalingFactor } }, /* @__PURE__ */ React2.createElement(
296
- Text2,
297
- {
298
- style: {
299
- opacity: 0.6,
300
- marginRight: 10 * scalingFactor
301
- }
302
- },
303
- "#",
304
- (index + 1).toString().padStart(2, "0")
305
- ), /* @__PURE__ */ React2.createElement(
306
- View2,
307
- {
308
- style: {
309
- display: "flex",
310
- flexDirection: "row",
311
- alignItems: "flex-end",
312
- gap: 10 * scalingFactor
313
- }
314
- },
315
- item.paymentStatus == "pending" ? /* @__PURE__ */ React2.createElement(
316
- View2,
317
- {
318
- style: {
319
- backgroundColor: "#000000",
320
- paddingVertical: 3 * scalingFactor,
321
- paddingHorizontal: 5 * scalingFactor,
322
- borderRadius: 5 * scalingFactor,
323
- marginTop: 3 * scalingFactor
324
- }
325
- },
326
- /* @__PURE__ */ React2.createElement(
327
- Text2,
328
- {
329
- style: {
330
- color: "#ffffff",
331
- fontSize: globalFontSize
332
- }
333
- },
334
- "Pending"
335
- )
336
- ) : null,
337
- /* @__PURE__ */ React2.createElement(Text2, { style: { fontWeight: "bold", fontSize: globalFontSize } }, "Rs ", item.amount)
338
- )), /* @__PURE__ */ React2.createElement(
339
- View2,
340
- {
341
- style: {
342
- flexGrow: 1
343
- }
344
- },
345
- /* @__PURE__ */ React2.createElement(
346
- View2,
347
- {
348
- style: {
349
- display: "flex",
350
- flexDirection: "row",
351
- flexWrap: "wrap",
352
- marginBottom: 3 * scalingFactor,
353
- gap: 3 * scalingFactor
354
- }
355
- },
356
- /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: globalFontSize, fontWeight: "bold" } }, item.participantName),
357
- /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: globalFontSize, fontWeight: "bold" } }, "-"),
358
- /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: globalFontSize, fontWeight: "bold" } }, item.participantNakshatra)
359
- ),
360
- /* @__PURE__ */ React2.createElement(
361
- View2,
362
- {
363
- style: {
364
- display: "flex",
365
- flexDirection: "column",
366
- alignContent: "flex-end",
367
- gap: 10 * scalingFactor
368
- }
369
- },
370
- /* @__PURE__ */ React2.createElement(
371
- View2,
372
- {
373
- style: {
374
- display: "flex",
375
- flexDirection: "row",
376
- flexWrap: "wrap",
377
- alignContent: "flex-end"
378
- }
379
- },
380
- /* @__PURE__ */ React2.createElement(Text2, null, "Puja name : "),
381
- /* @__PURE__ */ React2.createElement(Text2, { style: { fontSize: globalFontSize, fontWeight: "bold" } }, item.pujaName)
382
- ),
383
- isSingleDate ? null : /* @__PURE__ */ React2.createElement(
384
- View2,
385
- {
386
- style: {
387
- display: "flex",
388
- flexDirection: "row",
389
- alignContent: "flex-end"
390
- }
391
- },
392
- /* @__PURE__ */ React2.createElement(Text2, null, "Date: "),
393
- /* @__PURE__ */ React2.createElement(Text2, { style: { fontWeight: "bold" } }, formatDate(item.date))
394
- )
395
- ),
396
- /* @__PURE__ */ React2.createElement(
397
- View2,
398
- {
399
- style: {
400
- display: "flex",
401
- flexDirection: "row",
402
- alignContent: "flex-end",
403
- gap: 10 * scalingFactor
404
- }
405
- }
406
- ),
407
- item.priestNote !== "" && item.priestNote !== null && item.priestNote !== void 0 ? /* @__PURE__ */ React2.createElement(
408
- View2,
409
- {
410
- style: {
411
- display: "flex",
412
- flexDirection: "row",
413
- justifyContent: "space-between",
414
- marginTop: 3 * scalingFactor
415
- }
416
- },
417
- /* @__PURE__ */ React2.createElement(Text2, null, "Priest Note: ", item.priestNote)
418
- ) : null
419
- ));
420
- }) : null
421
- )));
422
- };
423
- var T2Inch_default = T2Inch;
424
-
425
- // src/sizes/a4/A4KitchenReport.tsx
426
- import { Document as Document4, Image as Image3, Page as Page4, View as View3 } from "@react-pdf/renderer";
427
-
428
- // src/components/Text.tsx
429
- import { Text as Text3 } from "@react-pdf/renderer";
430
- import { maxBy } from "lodash";
431
- import React3 from "react";
432
- var majorLanguagesRanges = {
433
- Latin: /[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,
434
- SC: /[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,
435
- Cyrillic: /[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,
436
- Arabic: /[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,
437
- Bengali: /[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,
438
- Devanagari: /[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,
439
- JP: /[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,
440
- KR: /[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,
441
- Tamil: /[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,
442
- Kannada: /[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,
443
- Myanmar: /[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,
444
- Ethiopic: /[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,
445
- Thai: /[\u0E01-\u0E3A\u0E40-\u0E5B]/g,
446
- Greek: /[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,
447
- Khmer: /[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,
448
- Armenian: /[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,
449
- Hebrew: /[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,
450
- Georgian: /[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,
451
- Lao: /[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,
452
- "Canadian Aboriginal": /[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,
453
- Sinhala: /[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,
454
- "Ol Chiki": /[\u1C50-\u1C7F]/g,
455
- Tibetan: /[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,
456
- Tifinagh: /[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,
457
- Yi: /[\uA000-\uA48C\uA490-\uA4C6]/g,
458
- Syriac: /[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,
459
- Thaana: /[\u0780-\u07B1]/g,
460
- Vai: /[\uA500-\uA62B]/g,
461
- Cherokee: /[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,
462
- "Tai Tham": /[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,
463
- "Tai Viet": /[\uAA80-\uAAC2\uAADB-\uAADF]/g,
464
- Javanese: /[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,
465
- Telugu: /[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,
466
- Gujarati: /[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,
467
- Malayalam: /[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,
468
- Gurmukhi: /[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g
469
- };
470
- var TextParsedAfterDetectingLanguage = ({ style = {}, children }) => {
471
- const detectScript = (char) => {
472
- const entry = maxBy(
473
- Object.entries(majorLanguagesRanges),
474
- ([_, test]) => {
475
- const match = char.match(test);
476
- return match ? match.length : 0;
477
- }
478
- );
479
- return entry ? entry[0] : "Latin";
480
- };
481
- const containsDate = (str) => {
482
- const datePatterns = [
483
- /\b\d{2}\/\d{2}\/\d{4}\b/,
484
- // DD/MM/YYYY
485
- /\b\d{2}\s\w{3}\s\d{4}\b/
486
- // DD MMM YYYY (e.g., 14 Aug 2024)
487
- ];
488
- return datePatterns.some((pattern) => pattern.test(str));
489
- };
490
- function replaceFullWidthChars(text) {
491
- return text.replace(/[\uFF01-\uFF5E]/g, (char) => {
492
- return `${String.fromCharCode(char.charCodeAt(0) - 65248)} `;
493
- });
494
- }
495
- const splitTextByScript = (text) => {
496
- const parts = [];
497
- let currentScript = null;
498
- let currentPart = "";
499
- for (let char of text) {
500
- char = replaceFullWidthChars(char);
501
- const script = detectScript(char);
502
- if (script !== currentScript) {
503
- if (currentPart)
504
- parts.push({ text: currentPart, script: currentScript });
505
- currentScript = script;
506
- currentPart = char;
507
- } else {
508
- currentPart += char;
509
- }
510
- }
511
- if (currentPart) parts.push({ text: currentPart, script: currentScript });
512
- return parts;
513
- };
514
- let finalText = [];
515
- if (children && typeof children === "string" && !Array.isArray(children) && !containsDate(children)) {
516
- const textParts = splitTextByScript(children);
517
- textParts.forEach((part, index) => {
518
- const fontFamily = part.script === "Latin" || !part.script ? "Noto Sans" : `Noto Sans ${part.script}`;
519
- finalText.push(
520
- /* @__PURE__ */ React3.createElement(Text3, { key: index, style: { fontFamily } }, part.text)
521
- );
522
- });
523
- }
524
- let finalStyles = [];
525
- const defaultStyle = { fontFamily: "Noto Sans" };
526
- if (Array.isArray(style)) {
527
- finalStyles = [...style, defaultStyle];
528
- } else if (style && Object.keys(style).length > 0) {
529
- finalStyles = [style, defaultStyle];
530
- } else {
531
- finalStyles = [defaultStyle];
532
- }
533
- return /* @__PURE__ */ React3.createElement(Text3, { style: finalStyles }, finalText?.length ? finalText : children);
534
- };
535
- var Text_default = TextParsedAfterDetectingLanguage;
536
-
537
- // src/sizes/a4/A4KitchenReport.tsx
538
- import React4 from "react";
539
- var A4KitchenReport = ({
540
- date,
541
- templeName,
542
- data,
543
- reportTiming
544
- }) => {
545
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Document4, null, /* @__PURE__ */ React4.createElement(Page4, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React4.createElement(
546
- Image3,
547
- {
548
- fixed: true,
549
- style: {
550
- height: 15,
551
- width: 75,
552
- marginBottom: 10
553
- },
554
- src: bmpLogo
555
- }
556
- ), /* @__PURE__ */ React4.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React4.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React4.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Temple Prasad (Kitchen) Report"), /* @__PURE__ */ React4.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React4.createElement(
557
- View3,
558
- {
559
- style: {
560
- display: "flex",
561
- flexDirection: "column",
562
- marginTop: 20
563
- }
564
- },
565
- /* @__PURE__ */ React4.createElement(
566
- View3,
567
- {
568
- style: {
569
- display: "flex",
570
- flexDirection: "row",
571
- border: "1px solid #000",
572
- fontSize: 10,
573
- fontWeight: "semibold"
574
- }
575
- },
576
- /* @__PURE__ */ React4.createElement(
577
- View3,
578
- {
579
- style: {
580
- padding: 6,
581
- borderRight: "1px solid #000",
582
- width: "20%"
583
- }
584
- },
585
- /* @__PURE__ */ React4.createElement(Text_default, null, "Sr no")
586
- ),
587
- /* @__PURE__ */ React4.createElement(
588
- View3,
589
- {
590
- style: {
591
- padding: 6,
592
- borderRight: "1px solid #000",
593
- width: "60%"
594
- }
595
- },
596
- /* @__PURE__ */ React4.createElement(Text_default, null, "Prasad Name")
597
- ),
598
- /* @__PURE__ */ React4.createElement(
599
- View3,
600
- {
601
- style: {
602
- padding: 6,
603
- borderRight: "none",
604
- width: "20%"
605
- }
606
- },
607
- /* @__PURE__ */ React4.createElement(Text_default, null, "Quantity")
608
- )
609
- ),
610
- data.map((item, index) => {
611
- return /* @__PURE__ */ React4.createElement(
612
- View3,
613
- {
614
- style: {
615
- display: "flex",
616
- flexDirection: "row",
617
- border: "1px solid #000",
618
- borderTop: "none",
619
- fontSize: 10
620
- }
621
- },
622
- /* @__PURE__ */ React4.createElement(
623
- View3,
624
- {
625
- style: {
626
- padding: 6,
627
- borderRight: "1px solid #000",
628
- width: "20%"
629
- }
630
- },
631
- /* @__PURE__ */ React4.createElement(Text_default, null, index + 1)
632
- ),
633
- /* @__PURE__ */ React4.createElement(
634
- View3,
635
- {
636
- style: {
637
- padding: 6,
638
- borderRight: "1px solid #000",
639
- width: "60%"
640
- }
641
- },
642
- /* @__PURE__ */ React4.createElement(Text_default, null, item.name)
643
- ),
644
- /* @__PURE__ */ React4.createElement(
645
- View3,
646
- {
647
- style: {
648
- padding: 6,
649
- borderRight: "none",
650
- width: "20%"
651
- }
652
- },
653
- /* @__PURE__ */ React4.createElement(Text_default, null, item.quantity)
654
- )
655
- );
656
- })
657
- ) : /* @__PURE__ */ React4.createElement(
658
- Text_default,
659
- {
660
- style: {
661
- fontSize: 18,
662
- textAlign: "center",
663
- marginTop: 100
664
- }
665
- },
666
- "No data available for the selected date range"
667
- ))));
668
- };
669
- var A4KitchenReport_default = A4KitchenReport;
670
-
671
- // src/sizes/a4/A4TransactionReport.tsx
672
- import { Document as Document5, Image as Image4, Page as Page5, View as View4 } from "@react-pdf/renderer";
673
- import React5 from "react";
674
- var A4TransactionReport = ({
675
- date,
676
- templeName,
677
- data
678
- }) => {
679
- const totalAmount = data.reduce((acc, item) => {
680
- if (item.status === "cancelled") {
681
- return acc;
682
- }
683
- return acc + item.bookingAmount;
684
- }, 0);
685
- const totalCreditedAmount = data.reduce((acc, item) => {
686
- if (item.status === "cancelled") {
687
- return acc;
688
- }
689
- return acc + item.creditedAmount;
690
- }, 0);
691
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Document5, null, /* @__PURE__ */ React5.createElement(Page5, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React5.createElement(
692
- Image4,
693
- {
694
- fixed: true,
695
- style: {
696
- height: 15,
697
- width: 75,
698
- marginBottom: 10
699
- },
700
- src: bmpLogo
701
- }
702
- ), /* @__PURE__ */ React5.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React5.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Transactions Report"), /* @__PURE__ */ React5.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Text_default, { style: { fontSize: 10, marginTop: 10 } }, "Total Bookings: ", totalAmount.toLocaleString("en-IN", {
703
- maximumFractionDigits: 2,
704
- style: "currency",
705
- currency: "INR"
706
- })), /* @__PURE__ */ React5.createElement(Text_default, { style: { fontSize: 10 } }, "Total Credited Amount: ", totalCreditedAmount.toLocaleString("en-IN", {
707
- maximumFractionDigits: 2,
708
- style: "currency",
709
- currency: "INR"
710
- })), /* @__PURE__ */ React5.createElement(
711
- View4,
712
- {
713
- style: {
714
- display: "flex",
715
- flexDirection: "column",
716
- marginTop: 20
717
- }
718
- },
719
- /* @__PURE__ */ React5.createElement(
720
- View4,
721
- {
722
- style: {
723
- display: "flex",
724
- flexDirection: "row",
725
- border: "1px solid black",
726
- fontWeight: "semibold",
727
- fontSize: 10
728
- }
729
- },
730
- /* @__PURE__ */ React5.createElement(
731
- View4,
732
- {
733
- style: {
734
- padding: 6,
735
- borderRight: "1px solid black",
736
- width: "8%"
737
- }
738
- },
739
- /* @__PURE__ */ React5.createElement(Text_default, null, "Sr no")
740
- ),
741
- /* @__PURE__ */ React5.createElement(
742
- View4,
743
- {
744
- style: {
745
- padding: 6,
746
- borderRight: "1px solid black",
747
- width: "23%"
748
- }
749
- },
750
- /* @__PURE__ */ React5.createElement(Text_default, null, "Date")
751
- ),
752
- /* @__PURE__ */ React5.createElement(
753
- View4,
754
- {
755
- style: {
756
- padding: 6,
757
- borderRight: "1px solid black",
758
- width: "19%"
759
- }
760
- },
761
- /* @__PURE__ */ React5.createElement(Text_default, null, "Invoice")
762
- ),
763
- /* @__PURE__ */ React5.createElement(
764
- View4,
765
- {
766
- style: {
767
- padding: 6,
768
- borderRight: "1px solid black",
769
- width: "15%"
770
- }
771
- },
772
- /* @__PURE__ */ React5.createElement(Text_default, null, "Booking Amt")
773
- ),
774
- /* @__PURE__ */ React5.createElement(
775
- View4,
776
- {
777
- style: {
778
- padding: 6,
779
- width: "15%",
780
- borderRight: "1px solid black"
781
- }
782
- },
783
- /* @__PURE__ */ React5.createElement(Text_default, null, "Credited Amt")
784
- ),
785
- /* @__PURE__ */ React5.createElement(
786
- View4,
787
- {
788
- style: {
789
- padding: 6,
790
- width: "20%"
791
- }
792
- },
793
- /* @__PURE__ */ React5.createElement(Text_default, null, "Transaction ID")
794
- )
795
- ),
796
- data.map((item, index) => {
797
- return /* @__PURE__ */ React5.createElement(
798
- View4,
799
- {
800
- style: {
801
- display: "flex",
802
- flexDirection: "row",
803
- border: "1px solid black",
804
- borderTop: "none",
805
- fontSize: 10
806
- }
807
- },
808
- /* @__PURE__ */ React5.createElement(
809
- View4,
810
- {
811
- style: {
812
- padding: 6,
813
- borderRight: "1px solid black",
814
- width: "8%"
815
- }
816
- },
817
- /* @__PURE__ */ React5.createElement(Text_default, null, index + 1)
818
- ),
819
- /* @__PURE__ */ React5.createElement(
820
- View4,
821
- {
822
- style: {
823
- padding: 6,
824
- borderRight: "1px solid black",
825
- width: "23%"
826
- }
827
- },
828
- /* @__PURE__ */ React5.createElement(Text_default, null, item.date, " ", item.time)
829
- ),
830
- /* @__PURE__ */ React5.createElement(
831
- View4,
832
- {
833
- style: {
834
- padding: 6,
835
- borderRight: "1px solid black",
836
- width: "19%"
837
- }
838
- },
839
- /* @__PURE__ */ React5.createElement(Text_default, null, item.invoiceNumber)
840
- ),
841
- item.status == "cancelled" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
842
- View4,
843
- {
844
- style: {
845
- padding: 6,
846
- width: "50%"
847
- }
848
- },
849
- /* @__PURE__ */ React5.createElement(
850
- Text_default,
851
- {
852
- style: {
853
- textAlign: "center"
854
- }
855
- },
856
- "CANCELLED"
857
- )
858
- )) : /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
859
- View4,
860
- {
861
- style: {
862
- padding: 6,
863
- borderRight: "1px solid black",
864
- width: "15%"
865
- }
866
- },
867
- /* @__PURE__ */ React5.createElement(Text_default, null, item.bookingAmount.toLocaleString("en-IN", {
868
- maximumFractionDigits: 2,
869
- style: "currency",
870
- currency: "INR"
871
- }))
872
- ), /* @__PURE__ */ React5.createElement(
873
- View4,
874
- {
875
- style: {
876
- padding: 6,
877
- width: "15%",
878
- borderRight: "1px solid black"
879
- }
880
- },
881
- /* @__PURE__ */ React5.createElement(Text_default, null, item.creditedAmount.toLocaleString("en-IN", {
882
- maximumFractionDigits: 2,
883
- style: "currency",
884
- currency: "INR"
885
- }))
886
- ), /* @__PURE__ */ React5.createElement(
887
- View4,
888
- {
889
- style: {
890
- padding: 6,
891
- width: "20%"
892
- }
893
- },
894
- /* @__PURE__ */ React5.createElement(Text_default, null, item.transactionId)
895
- ))
896
- );
897
- })
898
- )) : /* @__PURE__ */ React5.createElement(
899
- Text_default,
900
- {
901
- style: {
902
- fontSize: 18,
903
- textAlign: "center",
904
- marginTop: 100
905
- }
906
- },
907
- "No data available for the selected date range"
908
- ))));
909
- };
910
- var A4TransactionReport_default = A4TransactionReport;
911
-
912
- // src/sizes/a4/A4PrasadDelivery.tsx
913
- import { Document as Document6, Image as Image5, Page as Page6, View as View5 } from "@react-pdf/renderer";
914
- import React6 from "react";
915
- var A4PrasadDelivery = ({
916
- date,
917
- templeName,
918
- data
919
- }) => {
920
- data = data.map((item) => {
921
- let address = "";
922
- try {
923
- const parsedAddress = JSON.parse(item.address);
924
- address = `${parsedAddress.address}, ${parsedAddress.locality}, ${parsedAddress.state} - ${parsedAddress.pincode}`;
925
- } catch (e) {
926
- console.error("Error parsing address:", e);
927
- address = item.address;
928
- }
929
- return {
930
- ...item,
931
- address
932
- };
933
- });
934
- return /* @__PURE__ */ React6.createElement(Document6, null, /* @__PURE__ */ React6.createElement(Page6, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React6.createElement(
935
- Image5,
936
- {
937
- fixed: true,
938
- style: {
939
- height: 15,
940
- width: 75,
941
- marginBottom: 10
942
- },
943
- src: bmpLogo
944
- }
945
- ), /* @__PURE__ */ React6.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React6.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Delivery Address"), /* @__PURE__ */ React6.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React6.createElement(
946
- View5,
947
- {
948
- style: {
949
- display: "flex",
950
- flexDirection: "column",
951
- marginTop: 20
952
- }
953
- },
954
- /* @__PURE__ */ React6.createElement(
955
- View5,
956
- {
957
- style: {
958
- display: "flex",
959
- flexDirection: "row",
960
- border: "1px solid black",
961
- fontWeight: "semibold",
962
- fontSize: 10
963
- }
964
- },
965
- /* @__PURE__ */ React6.createElement(
966
- View5,
967
- {
968
- style: {
969
- padding: 6,
970
- borderRight: "1px solid black",
971
- width: "10%"
972
- }
973
- },
974
- /* @__PURE__ */ React6.createElement(Text_default, null, "Date")
975
- ),
976
- /* @__PURE__ */ React6.createElement(
977
- View5,
978
- {
979
- style: {
980
- padding: 6,
981
- borderRight: "1px solid black",
982
- width: "13%"
983
- }
984
- },
985
- /* @__PURE__ */ React6.createElement(Text_default, null, "Invoice")
986
- ),
987
- /* @__PURE__ */ React6.createElement(
988
- View5,
989
- {
990
- style: {
991
- padding: 6,
992
- borderRight: "1px solid black",
993
- width: "18%"
994
- }
995
- },
996
- /* @__PURE__ */ React6.createElement(Text_default, null, "Devotee Name")
997
- ),
998
- /* @__PURE__ */ React6.createElement(
999
- View5,
1000
- {
1001
- style: {
1002
- padding: 6,
1003
- borderRight: "1px solid black",
1004
- width: "25%"
1005
- }
1006
- },
1007
- /* @__PURE__ */ React6.createElement(Text_default, null, "Address")
1008
- ),
1009
- /* @__PURE__ */ React6.createElement(
1010
- View5,
1011
- {
1012
- style: {
1013
- padding: 6,
1014
- borderRight: "1px solid black",
1015
- width: "20%"
1016
- }
1017
- },
1018
- /* @__PURE__ */ React6.createElement(Text_default, null, "Puja Name")
1019
- ),
1020
- /* @__PURE__ */ React6.createElement(
1021
- View5,
1022
- {
1023
- style: {
1024
- padding: 6,
1025
- width: "15%"
1026
- }
1027
- },
1028
- /* @__PURE__ */ React6.createElement(Text_default, null, "Amount")
1029
- )
1030
- ),
1031
- data.map((item, index) => {
1032
- return /* @__PURE__ */ React6.createElement(
1033
- View5,
1034
- {
1035
- style: {
1036
- display: "flex",
1037
- flexDirection: "row",
1038
- border: "1px solid black",
1039
- borderTop: "none",
1040
- fontSize: 10
1041
- }
1042
- },
1043
- /* @__PURE__ */ React6.createElement(
1044
- View5,
1045
- {
1046
- style: {
1047
- padding: 6,
1048
- borderRight: "1px solid black",
1049
- width: "10%"
1050
- }
1051
- },
1052
- /* @__PURE__ */ React6.createElement(Text_default, null, new Date(item.date).toLocaleDateString("en-GB", {
1053
- day: "2-digit",
1054
- month: "2-digit",
1055
- year: "2-digit"
1056
- }))
1057
- ),
1058
- /* @__PURE__ */ React6.createElement(
1059
- View5,
1060
- {
1061
- style: {
1062
- padding: 6,
1063
- borderRight: "1px solid black",
1064
- width: "13%"
1065
- }
1066
- },
1067
- /* @__PURE__ */ React6.createElement(Text_default, null, item.invoiceNumber)
1068
- ),
1069
- /* @__PURE__ */ React6.createElement(
1070
- View5,
1071
- {
1072
- style: {
1073
- padding: 6,
1074
- borderRight: "1px solid black",
1075
- width: "18%"
1076
- }
1077
- },
1078
- /* @__PURE__ */ React6.createElement(Text_default, null, item.devoteeName)
1079
- ),
1080
- /* @__PURE__ */ React6.createElement(
1081
- View5,
1082
- {
1083
- style: {
1084
- padding: 6,
1085
- borderRight: "1px solid black",
1086
- width: "25%"
1087
- }
1088
- },
1089
- /* @__PURE__ */ React6.createElement(Text_default, null, item.address)
1090
- ),
1091
- /* @__PURE__ */ React6.createElement(
1092
- View5,
1093
- {
1094
- style: {
1095
- padding: 6,
1096
- borderRight: "1px solid black",
1097
- width: "20%"
1098
- }
1099
- },
1100
- /* @__PURE__ */ React6.createElement(Text_default, null, item.pujaName)
1101
- ),
1102
- /* @__PURE__ */ React6.createElement(
1103
- View5,
1104
- {
1105
- style: {
1106
- padding: 6,
1107
- width: "15%"
1108
- }
1109
- },
1110
- /* @__PURE__ */ React6.createElement(Text_default, null, item.amount.toLocaleString("en-IN", {
1111
- maximumFractionDigits: 2,
1112
- style: "currency",
1113
- currency: "INR"
1114
- }))
1115
- )
1116
- );
1117
- })
1118
- ) : /* @__PURE__ */ React6.createElement(
1119
- Text_default,
1120
- {
1121
- style: {
1122
- fontSize: 18,
1123
- textAlign: "center",
1124
- marginTop: 100
1125
- }
1126
- },
1127
- "No data available for the selected date range"
1128
- )));
1129
- };
1130
- var A4PrasadDelivery_default = A4PrasadDelivery;
1131
-
1132
- // src/sizes/a4/A4PrasadReport.tsx
1133
- import { Document as Document7, Image as Image6, Page as Page7, View as View6 } from "@react-pdf/renderer";
1134
- import React7 from "react";
1135
- var A4PrasadReport = ({
1136
- date,
1137
- templeName,
1138
- data,
1139
- reportTiming
1140
- }) => {
1141
- const sortedPrasadItems = data.sort((a, b) => {
1142
- return a.invoiceNumber.localeCompare(b.invoiceNumber);
1143
- });
1144
- return /* @__PURE__ */ React7.createElement(Document7, null, /* @__PURE__ */ React7.createElement(Page7, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React7.createElement(
1145
- Image6,
1146
- {
1147
- fixed: true,
1148
- style: {
1149
- height: 15,
1150
- width: 75,
1151
- marginBottom: 10
1152
- },
1153
- src: bmpLogo
1154
- }
1155
- ), /* @__PURE__ */ React7.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React7.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React7.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React7.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React7.createElement(
1156
- View6,
1157
- {
1158
- style: {
1159
- display: "flex",
1160
- flexDirection: "column",
1161
- marginTop: 20
1162
- }
1163
- },
1164
- /* @__PURE__ */ React7.createElement(
1165
- View6,
1166
- {
1167
- style: {
1168
- display: "flex",
1169
- flexDirection: "row",
1170
- border: "1px solid black",
1171
- fontWeight: "semibold",
1172
- fontSize: 10
1173
- }
1174
- },
1175
- /* @__PURE__ */ React7.createElement(
1176
- View6,
1177
- {
1178
- style: {
1179
- padding: 6,
1180
- borderRight: "1px solid black",
1181
- width: "10%"
1182
- }
1183
- },
1184
- /* @__PURE__ */ React7.createElement(Text_default, null, "Sr no")
1185
- ),
1186
- /* @__PURE__ */ React7.createElement(
1187
- View6,
1188
- {
1189
- style: {
1190
- padding: 6,
1191
- borderRight: "1px solid black",
1192
- width: "20%"
1193
- }
1194
- },
1195
- /* @__PURE__ */ React7.createElement(Text_default, null, "Invoice Number")
1196
- ),
1197
- /* @__PURE__ */ React7.createElement(
1198
- View6,
1199
- {
1200
- style: {
1201
- padding: 6,
1202
- borderRight: "1px solid black",
1203
- width: "23%"
1204
- }
1205
- },
1206
- /* @__PURE__ */ React7.createElement(Text_default, null, "Devotee Name")
1207
- ),
1208
- /* @__PURE__ */ React7.createElement(
1209
- View6,
1210
- {
1211
- style: {
1212
- padding: 6,
1213
- borderRight: "1px solid black",
1214
- width: "30%"
1215
- }
1216
- },
1217
- /* @__PURE__ */ React7.createElement(Text_default, null, "Prasad Name")
1218
- ),
1219
- /* @__PURE__ */ React7.createElement(
1220
- View6,
1221
- {
1222
- style: {
1223
- padding: 6,
1224
- width: "10%",
1225
- borderRight: "1px solid black"
1226
- }
1227
- },
1228
- /* @__PURE__ */ React7.createElement(Text_default, null, "Qty")
1229
- ),
1230
- /* @__PURE__ */ React7.createElement(
1231
- View6,
1232
- {
1233
- style: {
1234
- padding: 6,
1235
- width: "7%"
1236
- }
1237
- },
1238
- /* @__PURE__ */ React7.createElement(Text_default, null, "Mode")
1239
- )
1240
- ),
1241
- data.map((item, index) => {
1242
- return /* @__PURE__ */ React7.createElement(
1243
- View6,
1244
- {
1245
- style: {
1246
- display: "flex",
1247
- flexDirection: "row",
1248
- border: "1px solid black",
1249
- borderTop: "none",
1250
- fontSize: 10
1251
- }
1252
- },
1253
- /* @__PURE__ */ React7.createElement(
1254
- View6,
1255
- {
1256
- style: {
1257
- padding: 6,
1258
- borderRight: "1px solid black",
1259
- width: "10%"
1260
- }
1261
- },
1262
- /* @__PURE__ */ React7.createElement(Text_default, null, index + 1)
1263
- ),
1264
- /* @__PURE__ */ React7.createElement(
1265
- View6,
1266
- {
1267
- style: {
1268
- padding: 6,
1269
- borderRight: "1px solid black",
1270
- width: "20%"
1271
- }
1272
- },
1273
- /* @__PURE__ */ React7.createElement(Text_default, null, item.invoiceNumber)
1274
- ),
1275
- /* @__PURE__ */ React7.createElement(
1276
- View6,
1277
- {
1278
- style: {
1279
- padding: 6,
1280
- borderRight: "1px solid black",
1281
- width: "23%",
1282
- fontSize: 9,
1283
- flexWrap: "wrap"
1284
- }
1285
- },
1286
- /* @__PURE__ */ React7.createElement(Text_default, null, item.devoteeName)
1287
- ),
1288
- /* @__PURE__ */ React7.createElement(
1289
- View6,
1290
- {
1291
- style: {
1292
- padding: 6,
1293
- borderRight: "1px solid black",
1294
- width: "30%"
1295
- }
1296
- },
1297
- /* @__PURE__ */ React7.createElement(Text_default, null, item.prasadName)
1298
- ),
1299
- /* @__PURE__ */ React7.createElement(
1300
- View6,
1301
- {
1302
- style: {
1303
- padding: 6,
1304
- width: "10%",
1305
- borderRight: "1px solid black"
1306
- }
1307
- },
1308
- /* @__PURE__ */ React7.createElement(Text_default, null, item.quantity)
1309
- ),
1310
- /* @__PURE__ */ React7.createElement(
1311
- View6,
1312
- {
1313
- style: {
1314
- padding: 6,
1315
- width: "7%"
1316
- }
1317
- },
1318
- /* @__PURE__ */ React7.createElement(Text_default, null, item.collectionMode)
1319
- )
1320
- );
1321
- })
1322
- ) : /* @__PURE__ */ React7.createElement(
1323
- Text_default,
1324
- {
1325
- style: {
1326
- fontSize: 18,
1327
- textAlign: "center",
1328
- marginTop: 100
1329
- }
1330
- },
1331
- "No data available for the selected date range"
1332
- )));
1333
- };
1334
- var A4PrasadReport_default = A4PrasadReport;
1335
-
1336
- // src/sizes/a4/A4PujaList.tsx
1337
- import { Document as Document8, Image as Image7, Page as Page8, View as View7 } from "@react-pdf/renderer";
1338
- import React8 from "react";
1339
- var A4PujaList = ({
1340
- date,
1341
- templeName,
1342
- pujas,
1343
- reportTiming
1344
- }) => {
1345
- let serialOfNormalPujas = 0;
1346
- let serialOfEarlyReminders = 0;
1347
- let pujasRequiresCoupon = pujas.some(
1348
- (puja) => puja.bookings.some((booking) => booking.requires_coupon)
1349
- );
1350
- if (!pujas || pujas.length === 0) {
1351
- return /* @__PURE__ */ React8.createElement(Document8, null, /* @__PURE__ */ React8.createElement(Page8, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React8.createElement(
1352
- Image7,
1353
- {
1354
- fixed: true,
1355
- style: {
1356
- height: 15,
1357
- width: 75,
1358
- marginBottom: 10
1359
- },
1360
- src: bmpLogo
1361
- }
1362
- ), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold", marginTop: 10 } }, "Puja List"), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 12, marginTop: 100, textAlign: "center" } }, "No data available for the selected date range")));
1363
- }
1364
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Document8, null, /* @__PURE__ */ React8.createElement(Page8, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React8.createElement(
1365
- Image7,
1366
- {
1367
- fixed: true,
1368
- style: {
1369
- height: 15,
1370
- width: 75,
1371
- marginBottom: 10
1372
- },
1373
- src: bmpLogo
1374
- }
1375
- ), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, pujas.some(
1376
- (puja) => puja.bookings.some((booking) => booking.is_early_reminder)
1377
- ) && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold", marginTop: 10 } }, "Early Reminders for Upcoming Pujas"), /* @__PURE__ */ React8.createElement(View7, { wrap: false, style: { marginTop: 10 } }, /* @__PURE__ */ React8.createElement(
1378
- View7,
1379
- {
1380
- style: {
1381
- display: "flex",
1382
- flexDirection: "row",
1383
- border: "1px solid black"
1384
- }
1385
- },
1386
- /* @__PURE__ */ React8.createElement(
1387
- View7,
1388
- {
1389
- style: {
1390
- padding: 6,
1391
- fontSize: 10,
1392
- borderRight: "1px solid black",
1393
- fontWeight: "semibold",
1394
- width: "10%"
1395
- }
1396
- },
1397
- /* @__PURE__ */ React8.createElement(Text_default, null, "Sr No")
1398
- ),
1399
- /* @__PURE__ */ React8.createElement(
1400
- View7,
1401
- {
1402
- style: {
1403
- padding: 6,
1404
- fontSize: 10,
1405
- borderRight: "1px solid black",
1406
- fontWeight: "semibold",
1407
- width: "60%"
1408
- }
1409
- },
1410
- /* @__PURE__ */ React8.createElement(Text_default, null, "Puja Name")
1411
- ),
1412
- /* @__PURE__ */ React8.createElement(
1413
- View7,
1414
- {
1415
- style: {
1416
- padding: 6,
1417
- fontSize: 10,
1418
- borderRight: "1px solid black",
1419
- fontWeight: "semibold",
1420
- width: "10%"
1421
- }
1422
- },
1423
- /* @__PURE__ */ React8.createElement(Text_default, null, "Qty")
1424
- ),
1425
- /* @__PURE__ */ React8.createElement(
1426
- View7,
1427
- {
1428
- style: {
1429
- padding: 6,
1430
- fontSize: 10,
1431
- borderRight: "none",
1432
- fontWeight: "semibold",
1433
- width: "20%"
1434
- }
1435
- },
1436
- /* @__PURE__ */ React8.createElement(Text_default, null, "Date")
1437
- )
1438
- ))), pujas.some(
1439
- (puja) => puja.bookings.some(
1440
- (booking) => booking.is_early_reminder && !booking.requires_coupon
1441
- )
1442
- ) ? pujas.flatMap(
1443
- (puja, pujaIndex) => puja.bookings.filter(
1444
- (booking) => booking.is_early_reminder && !booking.requires_coupon
1445
- ).map((booking, bookingIndex) => {
1446
- serialOfEarlyReminders++;
1447
- return /* @__PURE__ */ React8.createElement(
1448
- View7,
1449
- {
1450
- key: `${pujaIndex}-${bookingIndex}`,
1451
- style: {
1452
- display: "flex",
1453
- flexDirection: "row",
1454
- border: "1px solid black",
1455
- borderTop: "none"
1456
- }
1457
- },
1458
- /* @__PURE__ */ React8.createElement(
1459
- View7,
1460
- {
1461
- style: {
1462
- padding: 6,
1463
- fontSize: 10,
1464
- borderRight: "1px solid black",
1465
- width: "10%"
1466
- }
1467
- },
1468
- /* @__PURE__ */ React8.createElement(Text_default, null, serialOfEarlyReminders)
1469
- ),
1470
- /* @__PURE__ */ React8.createElement(
1471
- View7,
1472
- {
1473
- style: {
1474
- padding: 6,
1475
- fontSize: 10,
1476
- borderRight: "1px solid black",
1477
- width: "60%"
1478
- }
1479
- },
1480
- /* @__PURE__ */ React8.createElement(Text_default, null, puja.name)
1481
- ),
1482
- /* @__PURE__ */ React8.createElement(
1483
- View7,
1484
- {
1485
- style: {
1486
- padding: 6,
1487
- fontSize: 10,
1488
- borderRight: "1px solid black",
1489
- width: "10%"
1490
- }
1491
- },
1492
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.quantity)
1493
- ),
1494
- /* @__PURE__ */ React8.createElement(
1495
- View7,
1496
- {
1497
- style: {
1498
- padding: 6,
1499
- fontSize: 10,
1500
- borderRight: "none",
1501
- width: "20%"
1502
- }
1503
- },
1504
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.date ? new Date(booking.date).toDateString() : "")
1505
- )
1506
- );
1507
- })
1508
- ) : null, /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold", marginTop: 20 } }, "Puja List"), /* @__PURE__ */ React8.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React8.createElement(
1509
- View7,
1510
- {
1511
- style: {
1512
- display: "flex",
1513
- flexDirection: "column",
1514
- marginTop: 10
1515
- }
1516
- },
1517
- pujas.map((puja, pujaIndex) => {
1518
- if (puja.bookings.every(
1519
- (booking) => booking.is_early_reminder || booking.requires_coupon
1520
- ))
1521
- return null;
1522
- serialOfNormalPujas = 0;
1523
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(View7, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React8.createElement(View7, null, /* @__PURE__ */ React8.createElement(
1524
- Text_default,
1525
- {
1526
- style: {
1527
- fontSize: 10,
1528
- fontWeight: "bold",
1529
- border: "1px solid black",
1530
- padding: 6,
1531
- textAlign: "center",
1532
- borderBottom: "none"
1533
- }
1534
- },
1535
- `${puja.name} - ${puja.bookings.length}`
1536
- )), /* @__PURE__ */ React8.createElement(
1537
- View7,
1538
- {
1539
- style: {
1540
- display: "flex",
1541
- flexDirection: "row",
1542
- border: "1px solid black"
1543
- }
1544
- },
1545
- /* @__PURE__ */ React8.createElement(
1546
- View7,
1547
- {
1548
- style: {
1549
- padding: 6,
1550
- fontSize: 10,
1551
- borderRight: "1px solid black",
1552
- fontWeight: "semibold",
1553
- width: "10%"
1554
- }
1555
- },
1556
- /* @__PURE__ */ React8.createElement(Text_default, null, "Sr No")
1557
- ),
1558
- /* @__PURE__ */ React8.createElement(
1559
- View7,
1560
- {
1561
- style: {
1562
- padding: 6,
1563
- fontSize: 10,
1564
- borderRight: "1px solid black",
1565
- fontWeight: "semibold",
1566
- width: "20%"
1567
- }
1568
- },
1569
- /* @__PURE__ */ React8.createElement(Text_default, null, "Invoice No")
1570
- ),
1571
- /* @__PURE__ */ React8.createElement(
1572
- View7,
1573
- {
1574
- style: {
1575
- padding: 6,
1576
- fontSize: 10,
1577
- borderRight: "1px solid black",
1578
- fontWeight: "semibold",
1579
- width: "35%"
1580
- }
1581
- },
1582
- /* @__PURE__ */ React8.createElement(Text_default, null, "Devotee Name")
1583
- ),
1584
- /* @__PURE__ */ React8.createElement(
1585
- View7,
1586
- {
1587
- style: {
1588
- padding: 6,
1589
- fontSize: 10,
1590
- borderRight: "1px solid black",
1591
- fontWeight: "semibold",
1592
- width: "25%"
1593
- }
1594
- },
1595
- /* @__PURE__ */ React8.createElement(Text_default, null, "Nakshatra")
1596
- ),
1597
- /* @__PURE__ */ React8.createElement(
1598
- View7,
1599
- {
1600
- style: {
1601
- padding: 6,
1602
- fontSize: 10,
1603
- borderRight: "none",
1604
- fontWeight: "semibold",
1605
- width: "10%"
1606
- }
1607
- },
1608
- /* @__PURE__ */ React8.createElement(Text_default, null, "Qty")
1609
- )
1610
- ), puja.bookings.map((booking, bookingIndex) => {
1611
- if (booking.is_early_reminder || booking.requires_coupon)
1612
- return null;
1613
- serialOfNormalPujas++;
1614
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
1615
- View7,
1616
- {
1617
- style: {
1618
- display: "flex",
1619
- flexDirection: "row",
1620
- border: "1px solid black",
1621
- borderTop: "none",
1622
- width: "100%"
1623
- }
1624
- },
1625
- /* @__PURE__ */ React8.createElement(
1626
- View7,
1627
- {
1628
- style: {
1629
- padding: 6,
1630
- fontSize: 10,
1631
- borderRight: "1px solid black",
1632
- width: "10%"
1633
- }
1634
- },
1635
- /* @__PURE__ */ React8.createElement(Text_default, null, serialOfNormalPujas)
1636
- ),
1637
- /* @__PURE__ */ React8.createElement(
1638
- View7,
1639
- {
1640
- style: {
1641
- display: "flex",
1642
- flexDirection: "column",
1643
- width: "90%"
1644
- }
1645
- },
1646
- /* @__PURE__ */ React8.createElement(
1647
- View7,
1648
- {
1649
- style: {
1650
- display: "flex",
1651
- flexDirection: "row"
1652
- }
1653
- },
1654
- /* @__PURE__ */ React8.createElement(
1655
- View7,
1656
- {
1657
- style: {
1658
- padding: 6,
1659
- fontSize: 10,
1660
- borderRight: "1px solid black",
1661
- width: `${20 * 1.11111}%`
1662
- }
1663
- },
1664
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.invoiceNumber)
1665
- ),
1666
- /* @__PURE__ */ React8.createElement(
1667
- View7,
1668
- {
1669
- style: {
1670
- padding: 6,
1671
- fontSize: 10,
1672
- borderRight: "1px solid black",
1673
- width: `${35 * 1.11111}%`
1674
- }
1675
- },
1676
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.devoteeName)
1677
- ),
1678
- /* @__PURE__ */ React8.createElement(
1679
- View7,
1680
- {
1681
- style: {
1682
- padding: 6,
1683
- fontSize: 10,
1684
- borderRight: "1px solid black",
1685
- width: `${25 * 1.11111}%`
1686
- }
1687
- },
1688
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.nakshatra)
1689
- ),
1690
- /* @__PURE__ */ React8.createElement(
1691
- View7,
1692
- {
1693
- style: {
1694
- padding: 6,
1695
- fontSize: 10,
1696
- borderRight: "none",
1697
- width: `${10 * 1.11111}%`
1698
- }
1699
- },
1700
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.quantity)
1701
- )
1702
- ),
1703
- booking.priestNote && /* @__PURE__ */ React8.createElement(
1704
- View7,
1705
- {
1706
- style: {
1707
- padding: 6,
1708
- fontSize: 10,
1709
- borderTop: "1px solid black",
1710
- width: "100%"
1711
- }
1712
- },
1713
- /* @__PURE__ */ React8.createElement(Text_default, null, booking.priestNote)
1714
- )
1715
- )
1716
- ));
1717
- })));
1718
- })
1719
- )), pujasRequiresCoupon ? /* @__PURE__ */ React8.createElement(Page8, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React8.createElement(
1720
- Image7,
1721
- {
1722
- fixed: true,
1723
- style: {
1724
- height: 15,
1725
- width: 75,
1726
- marginBottom: 10
1727
- },
1728
- src: bmpLogo
1729
- }
1730
- ), /* @__PURE__ */ React8.createElement(
1731
- View7,
1732
- {
1733
- style: {
1734
- display: "flex",
1735
- flexDirection: "column",
1736
- marginTop: 10,
1737
- gap: 15
1738
- }
1739
- },
1740
- (() => {
1741
- const allCouponBookings = pujas.flatMap(
1742
- (puja) => puja.bookings.filter((booking) => booking.requires_coupon).map((booking) => ({ ...booking, pujaName: puja.name }))
1743
- );
1744
- const grouped = {};
1745
- for (const booking of allCouponBookings) {
1746
- if (!grouped[booking.invoiceNumber])
1747
- grouped[booking.invoiceNumber] = [];
1748
- grouped[booking.invoiceNumber].push(booking);
1749
- }
1750
- return Object.entries(grouped).map(
1751
- ([invoiceNumber, bookings], groupIdx) => {
1752
- const bookingsArr = bookings;
1753
- const first = bookingsArr[0];
1754
- return /* @__PURE__ */ React8.createElement(
1755
- View7,
1756
- {
1757
- key: invoiceNumber,
1758
- style: {
1759
- marginBottom: 10,
1760
- fontSize: 18,
1761
- padding: 10,
1762
- border: "1px dotted black",
1763
- position: "relative"
1764
- },
1765
- wrap: false
1766
- },
1767
- /* @__PURE__ */ React8.createElement(
1768
- View7,
1769
- {
1770
- style: {
1771
- display: "flex",
1772
- flexDirection: "row",
1773
- justifyContent: "space-between",
1774
- gap: 10
1775
- }
1776
- },
1777
- /* @__PURE__ */ React8.createElement(
1778
- View7,
1779
- {
1780
- style: {
1781
- display: "flex",
1782
- flexDirection: "row",
1783
- gap: 10
1784
- }
1785
- },
1786
- /* @__PURE__ */ React8.createElement(Text_default, { style: { fontWeight: "semibold" } }, invoiceNumber),
1787
- /* @__PURE__ */ React8.createElement(Text_default, null, first.date ? new Date(first.date).toDateString() : date.toDateString())
1788
- ),
1789
- /* @__PURE__ */ React8.createElement(Text_default, null, first.phone_number)
1790
- ),
1791
- /* @__PURE__ */ React8.createElement(View7, { style: { height: 15, width: "100%" } }),
1792
- bookingsArr.map(
1793
- (booking, idx) => /* @__PURE__ */ React8.createElement(
1794
- View7,
1795
- {
1796
- key: idx,
1797
- style: {
1798
- display: "flex",
1799
- flexDirection: "row",
1800
- marginTop: 25
1801
- }
1802
- },
1803
- /* @__PURE__ */ React8.createElement(Text_default, null, `${booking.devoteeName} ----- ${booking.nakshatra} ----- ${booking.pujaName}`)
1804
- )
1805
- ),
1806
- /* @__PURE__ */ React8.createElement(View7, null, /* @__PURE__ */ React8.createElement(
1807
- Text_default,
1808
- {
1809
- style: {
1810
- textAlign: "center",
1811
- marginTop: 10,
1812
- fontSize: 10,
1813
- opacity: 0.5
1814
- }
1815
- },
1816
- `~~~ bookmypuja.app - Your Puja, Our Commitment ~~~`
1817
- ))
1818
- );
1819
- }
1820
- );
1821
- })()
1822
- )) : null));
1823
- };
1824
- var A4PujaList_default = A4PujaList;
1825
-
1826
- // src/sizes/a4/A4Summary.tsx
1827
- import React9 from "react";
1828
- import { Page as Page9, Document as Document9, Image as Image8, View as View8 } from "@react-pdf/renderer";
1829
- var A4Summary = ({
1830
- templeName,
1831
- date,
1832
- pujas,
1833
- reportTiming
1834
- }) => {
1835
- const sortedPujaList = pujas.sort((a, b) => {
1836
- const aTotalCount = a.nakshatras.length;
1837
- const bTotalCount = b.nakshatras.length;
1838
- return bTotalCount - aTotalCount;
1839
- });
1840
- return /* @__PURE__ */ React9.createElement(Document9, null, /* @__PURE__ */ React9.createElement(
1841
- Page9,
1842
- {
1843
- size: "A4",
1844
- style: {
1845
- padding: 30,
1846
- fontFamily: "Noto Sans"
1847
- }
1848
- },
1849
- /* @__PURE__ */ React9.createElement(
1850
- Image8,
1851
- {
1852
- fixed: true,
1853
- style: {
1854
- height: 15,
1855
- width: 75,
1856
- marginBottom: 10
1857
- },
1858
- src: bmpLogo
1859
- }
1860
- ),
1861
- /* @__PURE__ */ React9.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()),
1862
- reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React9.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null,
1863
- /* @__PURE__ */ React9.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Puja Summary"),
1864
- /* @__PURE__ */ React9.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`),
1865
- pujas.length > 0 ? /* @__PURE__ */ React9.createElement(
1866
- View8,
1867
- {
1868
- style: {
1869
- display: "flex",
1870
- flexDirection: "column",
1871
- marginTop: 20
1872
- }
1873
- },
1874
- sortedPujaList.map((item, index) => {
1875
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(View8, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React9.createElement(View8, null, /* @__PURE__ */ React9.createElement(
1876
- Text_default,
1877
- {
1878
- style: {
1879
- fontSize: 10,
1880
- fontWeight: "bold",
1881
- border: "1px solid black",
1882
- padding: 6,
1883
- textAlign: "center",
1884
- borderBottom: "none"
1885
- }
1886
- },
1887
- `${item.name} - ${item.totalCount}`
1888
- )), /* @__PURE__ */ React9.createElement(
1889
- View8,
1890
- {
1891
- style: {
1892
- display: "flex",
1893
- flexDirection: "row",
1894
- border: "1px solid black"
1895
- }
1896
- },
1897
- /* @__PURE__ */ React9.createElement(
1898
- View8,
1899
- {
1900
- style: {
1901
- padding: 6,
1902
- fontSize: 10,
1903
- borderRight: "1px solid black",
1904
- fontWeight: "semibold",
1905
- width: "20%"
1906
- }
1907
- },
1908
- /* @__PURE__ */ React9.createElement(Text_default, null, "Sr No")
1909
- ),
1910
- /* @__PURE__ */ React9.createElement(
1911
- View8,
1912
- {
1913
- style: {
1914
- padding: 6,
1915
- fontSize: 10,
1916
- borderRight: "1px solid black",
1917
- fontWeight: "semibold",
1918
- width: "60%"
1919
- }
1920
- },
1921
- /* @__PURE__ */ React9.createElement(Text_default, null, "Nakshatra")
1922
- ),
1923
- /* @__PURE__ */ React9.createElement(
1924
- View8,
1925
- {
1926
- style: {
1927
- padding: 6,
1928
- fontSize: 10,
1929
- width: "20%",
1930
- fontWeight: "semibold"
1931
- }
1932
- },
1933
- /* @__PURE__ */ React9.createElement(Text_default, null, "Quantity")
1934
- )
1935
- ), item.nakshatras.map((nakshatra, nakshatraIndex) => {
1936
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(
1937
- View8,
1938
- {
1939
- style: {
1940
- display: "flex",
1941
- flexDirection: "row",
1942
- border: "1px solid black",
1943
- borderTop: "none"
1944
- }
1945
- },
1946
- /* @__PURE__ */ React9.createElement(
1947
- View8,
1948
- {
1949
- style: {
1950
- padding: 6,
1951
- fontSize: 10,
1952
- borderRight: "1px solid black",
1953
- width: "20%"
1954
- }
1955
- },
1956
- /* @__PURE__ */ React9.createElement(Text_default, null, nakshatraIndex + 1)
1957
- ),
1958
- /* @__PURE__ */ React9.createElement(
1959
- View8,
1960
- {
1961
- style: {
1962
- padding: 6,
1963
- fontSize: 10,
1964
- borderRight: "1px solid black",
1965
- width: "60%"
1966
- }
1967
- },
1968
- /* @__PURE__ */ React9.createElement(Text_default, null, nakshatra.name)
1969
- ),
1970
- /* @__PURE__ */ React9.createElement(
1971
- View8,
1972
- {
1973
- style: {
1974
- padding: 6,
1975
- fontSize: 10,
1976
- width: "20%"
1977
- }
1978
- },
1979
- /* @__PURE__ */ React9.createElement(Text_default, null, nakshatra.count)
1980
- )
1981
- ));
1982
- })));
1983
- })
1984
- ) : /* @__PURE__ */ React9.createElement(
1985
- Text_default,
1986
- {
1987
- style: {
1988
- fontSize: 18,
1989
- textAlign: "center",
1990
- marginTop: 100
1991
- }
1992
- },
1993
- "No data available for the selected date range"
1994
- )
1995
- ));
1996
- };
1997
- var A4Summary_default = A4Summary;
1998
-
1999
- // src/index.tsx
2000
- import { Font as Font5 } from "@react-pdf/renderer";
2001
-
2002
- // src/sizes/a4/A4CombinedReport.tsx
2003
- import { Document as Document10, Image as Image9, Page as Page10, View as View9 } from "@react-pdf/renderer";
2004
- import React10 from "react";
2005
- var A4CombinedReport = ({
2006
- date,
2007
- templeName,
2008
- pujaData,
2009
- prasadData,
2010
- deliveryData,
2011
- reportTiming
2012
- }) => {
2013
- deliveryData = deliveryData.map((item) => {
2014
- let address = "";
2015
- try {
2016
- const parsedAddress = JSON.parse(item.address);
2017
- address = `${parsedAddress.address}, ${parsedAddress.locality}, ${parsedAddress.state} - ${parsedAddress.pincode}`;
2018
- } catch (e) {
2019
- console.error("Error parsing address:", e);
2020
- address = item.address;
2021
- }
2022
- return {
2023
- ...item,
2024
- address
2025
- };
2026
- });
2027
- let serialOfNormalPujas = 0;
2028
- let serialOfEarlyReminders = 0;
2029
- const pujasRequiresCoupon = pujaData.some(
2030
- (puja) => puja.bookings.some((booking) => booking.requires_coupon)
2031
- );
2032
- if (pujaData.length == 0 && prasadData.length == 0 && deliveryData.length == 0) {
2033
- return /* @__PURE__ */ React10.createElement(Document10, null, /* @__PURE__ */ React10.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React10.createElement(
2034
- Image9,
2035
- {
2036
- fixed: true,
2037
- style: {
2038
- height: 15,
2039
- width: 75,
2040
- marginBottom: 10
2041
- },
2042
- src: bmpLogo
2043
- }
2044
- ), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Combined Report"), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 12, marginTop: 100, textAlign: "center" } }, "No data available for the selected date range")));
2045
- }
2046
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Document10, null, pujaData.length > 0 && /* @__PURE__ */ React10.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React10.createElement(
2047
- Image9,
2048
- {
2049
- fixed: true,
2050
- style: {
2051
- height: 15,
2052
- width: 75,
2053
- marginBottom: 10
2054
- },
2055
- src: bmpLogo
2056
- }
2057
- ), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, pujaData.some(
2058
- (puja) => puja.bookings.some((booking) => booking.is_early_reminder)
2059
- ) && /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
2060
- Text_default,
2061
- {
2062
- style: { fontSize: 14, fontWeight: "bold", marginTop: 10 }
2063
- },
2064
- "Early Reminders for Upcoming Pujas"
2065
- ), /* @__PURE__ */ React10.createElement(View9, { wrap: false, style: { marginTop: 10 } }, /* @__PURE__ */ React10.createElement(
2066
- View9,
2067
- {
2068
- style: {
2069
- display: "flex",
2070
- flexDirection: "row",
2071
- border: "1px solid black"
2072
- }
2073
- },
2074
- /* @__PURE__ */ React10.createElement(
2075
- View9,
2076
- {
2077
- style: {
2078
- padding: 6,
2079
- fontSize: 10,
2080
- borderRight: "1px solid black",
2081
- fontWeight: "semibold",
2082
- width: "10%"
2083
- }
2084
- },
2085
- /* @__PURE__ */ React10.createElement(Text_default, null, "Sr No")
2086
- ),
2087
- /* @__PURE__ */ React10.createElement(
2088
- View9,
2089
- {
2090
- style: {
2091
- padding: 6,
2092
- fontSize: 10,
2093
- borderRight: "1px solid black",
2094
- fontWeight: "semibold",
2095
- width: "60%"
2096
- }
2097
- },
2098
- /* @__PURE__ */ React10.createElement(Text_default, null, "Puja Name")
2099
- ),
2100
- /* @__PURE__ */ React10.createElement(
2101
- View9,
2102
- {
2103
- style: {
2104
- padding: 6,
2105
- fontSize: 10,
2106
- borderRight: "1px solid black",
2107
- fontWeight: "semibold",
2108
- width: "10%"
2109
- }
2110
- },
2111
- /* @__PURE__ */ React10.createElement(Text_default, null, "Qty")
2112
- ),
2113
- /* @__PURE__ */ React10.createElement(
2114
- View9,
2115
- {
2116
- style: {
2117
- padding: 6,
2118
- fontSize: 10,
2119
- borderRight: "none",
2120
- fontWeight: "semibold",
2121
- width: "20%"
2122
- }
2123
- },
2124
- /* @__PURE__ */ React10.createElement(Text_default, null, "Date")
2125
- )
2126
- ))), pujaData.some(
2127
- (puja) => puja.bookings.some(
2128
- (booking) => booking.is_early_reminder && !booking.requires_coupon
2129
- )
2130
- ) ? pujaData.flatMap(
2131
- (puja, pujaIndex) => puja.bookings.filter(
2132
- (booking) => booking.is_early_reminder && !booking.requires_coupon
2133
- ).map((booking, bookingIndex) => {
2134
- serialOfEarlyReminders++;
2135
- return /* @__PURE__ */ React10.createElement(
2136
- View9,
2137
- {
2138
- key: `${pujaIndex}-${bookingIndex}`,
2139
- style: {
2140
- display: "flex",
2141
- flexDirection: "row",
2142
- border: "1px solid black",
2143
- borderTop: "none"
2144
- }
2145
- },
2146
- /* @__PURE__ */ React10.createElement(
2147
- View9,
2148
- {
2149
- style: {
2150
- padding: 6,
2151
- fontSize: 10,
2152
- borderRight: "1px solid black",
2153
- width: "10%"
2154
- }
2155
- },
2156
- /* @__PURE__ */ React10.createElement(Text_default, null, serialOfEarlyReminders)
2157
- ),
2158
- /* @__PURE__ */ React10.createElement(
2159
- View9,
2160
- {
2161
- style: {
2162
- padding: 6,
2163
- fontSize: 10,
2164
- borderRight: "1px solid black",
2165
- width: "60%"
2166
- }
2167
- },
2168
- /* @__PURE__ */ React10.createElement(Text_default, null, puja.name)
2169
- ),
2170
- /* @__PURE__ */ React10.createElement(
2171
- View9,
2172
- {
2173
- style: {
2174
- padding: 6,
2175
- fontSize: 10,
2176
- borderRight: "1px solid black",
2177
- width: "10%"
2178
- }
2179
- },
2180
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.quantity)
2181
- ),
2182
- /* @__PURE__ */ React10.createElement(
2183
- View9,
2184
- {
2185
- style: {
2186
- padding: 6,
2187
- fontSize: 10,
2188
- borderRight: "none",
2189
- width: "20%"
2190
- }
2191
- },
2192
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.date ? new Date(booking.date).toDateString() : "")
2193
- )
2194
- );
2195
- })
2196
- ) : null, /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold", marginTop: 20 } }, "Puja List"), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React10.createElement(
2197
- View9,
2198
- {
2199
- style: {
2200
- display: "flex",
2201
- flexDirection: "column",
2202
- marginTop: 10
2203
- }
2204
- },
2205
- pujaData.map((puja, pujaIndex) => {
2206
- if (puja.bookings.every(
2207
- (booking) => booking.is_early_reminder || booking.requires_coupon
2208
- ))
2209
- return null;
2210
- serialOfNormalPujas = 0;
2211
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(View9, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React10.createElement(View9, null, /* @__PURE__ */ React10.createElement(
2212
- Text_default,
2213
- {
2214
- style: {
2215
- fontSize: 10,
2216
- fontWeight: "bold",
2217
- border: "1px solid black",
2218
- padding: 6,
2219
- textAlign: "center",
2220
- borderBottom: "none"
2221
- }
2222
- },
2223
- `${puja.name} - ${puja.bookings.length}`
2224
- )), /* @__PURE__ */ React10.createElement(
2225
- View9,
2226
- {
2227
- style: {
2228
- display: "flex",
2229
- flexDirection: "row",
2230
- border: "1px solid black"
2231
- }
2232
- },
2233
- /* @__PURE__ */ React10.createElement(
2234
- View9,
2235
- {
2236
- style: {
2237
- padding: 6,
2238
- fontSize: 10,
2239
- borderRight: "1px solid black",
2240
- fontWeight: "semibold",
2241
- width: "10%"
2242
- }
2243
- },
2244
- /* @__PURE__ */ React10.createElement(Text_default, null, "Sr No")
2245
- ),
2246
- /* @__PURE__ */ React10.createElement(
2247
- View9,
2248
- {
2249
- style: {
2250
- padding: 6,
2251
- fontSize: 10,
2252
- borderRight: "1px solid black",
2253
- fontWeight: "semibold",
2254
- width: "20%"
2255
- }
2256
- },
2257
- /* @__PURE__ */ React10.createElement(Text_default, null, "Invoice No")
2258
- ),
2259
- /* @__PURE__ */ React10.createElement(
2260
- View9,
2261
- {
2262
- style: {
2263
- padding: 6,
2264
- fontSize: 10,
2265
- borderRight: "1px solid black",
2266
- fontWeight: "semibold",
2267
- width: "35%"
2268
- }
2269
- },
2270
- /* @__PURE__ */ React10.createElement(Text_default, null, "Devotee Name")
2271
- ),
2272
- /* @__PURE__ */ React10.createElement(
2273
- View9,
2274
- {
2275
- style: {
2276
- padding: 6,
2277
- fontSize: 10,
2278
- borderRight: "1px solid black",
2279
- fontWeight: "semibold",
2280
- width: "25%"
2281
- }
2282
- },
2283
- /* @__PURE__ */ React10.createElement(Text_default, null, "Nakshatra")
2284
- ),
2285
- /* @__PURE__ */ React10.createElement(
2286
- View9,
2287
- {
2288
- style: {
2289
- padding: 6,
2290
- fontSize: 10,
2291
- borderRight: "none",
2292
- fontWeight: "semibold",
2293
- width: "10%"
2294
- }
2295
- },
2296
- /* @__PURE__ */ React10.createElement(Text_default, null, "Qty")
2297
- )
2298
- ), puja.bookings.map((booking, bookingIndex) => {
2299
- if (booking.is_early_reminder || booking.requires_coupon)
2300
- return null;
2301
- serialOfNormalPujas++;
2302
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
2303
- View9,
2304
- {
2305
- style: {
2306
- display: "flex",
2307
- flexDirection: "row",
2308
- border: "1px solid black",
2309
- borderTop: "none",
2310
- width: "100%"
2311
- }
2312
- },
2313
- /* @__PURE__ */ React10.createElement(
2314
- View9,
2315
- {
2316
- style: {
2317
- padding: 6,
2318
- fontSize: 10,
2319
- borderRight: "1px solid black",
2320
- width: "10%"
2321
- }
2322
- },
2323
- /* @__PURE__ */ React10.createElement(Text_default, null, serialOfNormalPujas)
2324
- ),
2325
- /* @__PURE__ */ React10.createElement(
2326
- View9,
2327
- {
2328
- style: {
2329
- display: "flex",
2330
- flexDirection: "column",
2331
- width: "90%"
2332
- }
2333
- },
2334
- /* @__PURE__ */ React10.createElement(
2335
- View9,
2336
- {
2337
- style: {
2338
- display: "flex",
2339
- flexDirection: "row"
2340
- }
2341
- },
2342
- /* @__PURE__ */ React10.createElement(
2343
- View9,
2344
- {
2345
- style: {
2346
- padding: 6,
2347
- fontSize: 10,
2348
- borderRight: "1px solid black",
2349
- width: `${20 * 1.11111}%`
2350
- }
2351
- },
2352
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.invoiceNumber)
2353
- ),
2354
- /* @__PURE__ */ React10.createElement(
2355
- View9,
2356
- {
2357
- style: {
2358
- padding: 6,
2359
- fontSize: 10,
2360
- borderRight: "1px solid black",
2361
- width: `${35 * 1.11111}%`
2362
- }
2363
- },
2364
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.devoteeName)
2365
- ),
2366
- /* @__PURE__ */ React10.createElement(
2367
- View9,
2368
- {
2369
- style: {
2370
- padding: 6,
2371
- fontSize: 10,
2372
- borderRight: "1px solid black",
2373
- width: `${25 * 1.11111}%`
2374
- }
2375
- },
2376
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.nakshatra)
2377
- ),
2378
- /* @__PURE__ */ React10.createElement(
2379
- View9,
2380
- {
2381
- style: {
2382
- padding: 6,
2383
- fontSize: 10,
2384
- borderRight: "none",
2385
- width: `${10 * 1.11111}%`
2386
- }
2387
- },
2388
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.quantity)
2389
- )
2390
- ),
2391
- booking.priestNote && /* @__PURE__ */ React10.createElement(
2392
- View9,
2393
- {
2394
- style: {
2395
- padding: 6,
2396
- fontSize: 10,
2397
- borderTop: "1px solid black",
2398
- width: "100%"
2399
- }
2400
- },
2401
- /* @__PURE__ */ React10.createElement(Text_default, null, booking.priestNote)
2402
- )
2403
- )
2404
- ));
2405
- })));
2406
- })
2407
- )), pujaData.length > 0 && pujasRequiresCoupon && /* @__PURE__ */ React10.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React10.createElement(
2408
- Image9,
2409
- {
2410
- fixed: true,
2411
- style: {
2412
- height: 15,
2413
- width: 75,
2414
- marginBottom: 10
2415
- },
2416
- src: bmpLogo
2417
- }
2418
- ), /* @__PURE__ */ React10.createElement(
2419
- View9,
2420
- {
2421
- style: {
2422
- display: "flex",
2423
- flexDirection: "column",
2424
- marginTop: 10,
2425
- gap: 15
2426
- }
2427
- },
2428
- (() => {
2429
- const allCouponBookings = pujaData.flatMap(
2430
- (puja) => puja.bookings.filter((booking) => booking.requires_coupon).map((booking) => ({ ...booking, pujaName: puja.name }))
2431
- );
2432
- const grouped = {};
2433
- for (const booking of allCouponBookings) {
2434
- if (!grouped[booking.invoiceNumber])
2435
- grouped[booking.invoiceNumber] = [];
2436
- grouped[booking.invoiceNumber].push(booking);
2437
- }
2438
- return Object.entries(grouped).map(
2439
- ([invoiceNumber, bookings], groupIdx) => {
2440
- const bookingsArr = bookings;
2441
- const first = bookingsArr[0];
2442
- return /* @__PURE__ */ React10.createElement(
2443
- View9,
2444
- {
2445
- key: invoiceNumber,
2446
- style: {
2447
- marginBottom: 10,
2448
- fontSize: 18,
2449
- padding: 10,
2450
- border: "1px dotted black"
2451
- },
2452
- wrap: false
2453
- },
2454
- /* @__PURE__ */ React10.createElement(
2455
- View9,
2456
- {
2457
- style: {
2458
- display: "flex",
2459
- flexDirection: "row",
2460
- justifyContent: "space-between",
2461
- gap: 10
2462
- }
2463
- },
2464
- /* @__PURE__ */ React10.createElement(
2465
- View9,
2466
- {
2467
- style: {
2468
- display: "flex",
2469
- flexDirection: "row",
2470
- gap: 10
2471
- }
2472
- },
2473
- /* @__PURE__ */ React10.createElement(Text_default, { style: { fontWeight: "semibold" } }, invoiceNumber),
2474
- /* @__PURE__ */ React10.createElement(Text_default, null, first.date ? new Date(first.date).toDateString() : date.toDateString())
2475
- ),
2476
- /* @__PURE__ */ React10.createElement(Text_default, null, first.phone_number)
2477
- ),
2478
- /* @__PURE__ */ React10.createElement(View9, { style: { height: 15, width: "100%" } }),
2479
- bookingsArr.map(
2480
- (booking, idx) => /* @__PURE__ */ React10.createElement(
2481
- View9,
2482
- {
2483
- key: idx,
2484
- style: {
2485
- display: "flex",
2486
- flexDirection: "row",
2487
- marginTop: 25
2488
- }
2489
- },
2490
- /* @__PURE__ */ React10.createElement(Text_default, null, `${booking.devoteeName} ----- ${booking.nakshatra} ----- ${booking.pujaName}`)
2491
- )
2492
- )
2493
- );
2494
- }
2495
- );
2496
- })()
2497
- )), prasadData.length > 0 && /* @__PURE__ */ React10.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React10.createElement(
2498
- Image9,
2499
- {
2500
- fixed: true,
2501
- style: {
2502
- height: 15,
2503
- width: 75,
2504
- marginBottom: 10
2505
- },
2506
- src: bmpLogo
2507
- }
2508
- ), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Report"), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React10.createElement(
2509
- View9,
2510
- {
2511
- style: {
2512
- display: "flex",
2513
- flexDirection: "column",
2514
- marginTop: 20
2515
- }
2516
- },
2517
- /* @__PURE__ */ React10.createElement(
2518
- View9,
2519
- {
2520
- style: {
2521
- display: "flex",
2522
- flexDirection: "row",
2523
- border: "1px solid black",
2524
- fontWeight: "semibold",
2525
- fontSize: 10
2526
- }
2527
- },
2528
- /* @__PURE__ */ React10.createElement(
2529
- View9,
2530
- {
2531
- style: {
2532
- padding: 6,
2533
- borderRight: "1px solid black",
2534
- width: "10%"
2535
- }
2536
- },
2537
- /* @__PURE__ */ React10.createElement(Text_default, null, "Sr no")
2538
- ),
2539
- /* @__PURE__ */ React10.createElement(
2540
- View9,
2541
- {
2542
- style: {
2543
- padding: 6,
2544
- borderRight: "1px solid black",
2545
- width: "20%"
2546
- }
2547
- },
2548
- /* @__PURE__ */ React10.createElement(Text_default, null, "Invoice Number")
2549
- ),
2550
- /* @__PURE__ */ React10.createElement(
2551
- View9,
2552
- {
2553
- style: {
2554
- padding: 6,
2555
- borderRight: "1px solid black",
2556
- width: "30%"
2557
- }
2558
- },
2559
- /* @__PURE__ */ React10.createElement(Text_default, null, "Devotee Name")
2560
- ),
2561
- /* @__PURE__ */ React10.createElement(
2562
- View9,
2563
- {
2564
- style: {
2565
- padding: 6,
2566
- borderRight: "1px solid black",
2567
- width: "30%"
2568
- }
2569
- },
2570
- /* @__PURE__ */ React10.createElement(Text_default, null, "Prasad Name")
2571
- ),
2572
- /* @__PURE__ */ React10.createElement(
2573
- View9,
2574
- {
2575
- style: {
2576
- padding: 6,
2577
- width: "10%"
2578
- }
2579
- },
2580
- /* @__PURE__ */ React10.createElement(Text_default, null, "Qty")
2581
- )
2582
- ),
2583
- prasadData.map((item, index) => {
2584
- return /* @__PURE__ */ React10.createElement(
2585
- View9,
2586
- {
2587
- style: {
2588
- display: "flex",
2589
- flexDirection: "row",
2590
- border: "1px solid black",
2591
- borderTop: "none",
2592
- fontSize: 10
2593
- }
2594
- },
2595
- /* @__PURE__ */ React10.createElement(
2596
- View9,
2597
- {
2598
- style: {
2599
- padding: 6,
2600
- borderRight: "1px solid black",
2601
- width: "10%"
2602
- }
2603
- },
2604
- /* @__PURE__ */ React10.createElement(Text_default, null, index + 1)
2605
- ),
2606
- /* @__PURE__ */ React10.createElement(
2607
- View9,
2608
- {
2609
- style: {
2610
- padding: 6,
2611
- borderRight: "1px solid black",
2612
- width: "20%"
2613
- }
2614
- },
2615
- /* @__PURE__ */ React10.createElement(Text_default, null, item.invoiceNumber)
2616
- ),
2617
- /* @__PURE__ */ React10.createElement(
2618
- View9,
2619
- {
2620
- style: {
2621
- padding: 6,
2622
- borderRight: "1px solid black",
2623
- width: "30%"
2624
- }
2625
- },
2626
- /* @__PURE__ */ React10.createElement(Text_default, null, item.devoteeName)
2627
- ),
2628
- /* @__PURE__ */ React10.createElement(
2629
- View9,
2630
- {
2631
- style: {
2632
- padding: 6,
2633
- borderRight: "1px solid black",
2634
- width: "30%"
2635
- }
2636
- },
2637
- /* @__PURE__ */ React10.createElement(Text_default, null, item.prasadName)
2638
- ),
2639
- /* @__PURE__ */ React10.createElement(
2640
- View9,
2641
- {
2642
- style: {
2643
- padding: 6,
2644
- width: "10%"
2645
- }
2646
- },
2647
- /* @__PURE__ */ React10.createElement(Text_default, null, item.quantity)
2648
- )
2649
- );
2650
- })
2651
- )), deliveryData.length > 0 && /* @__PURE__ */ React10.createElement(Page10, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React10.createElement(
2652
- Image9,
2653
- {
2654
- fixed: true,
2655
- style: {
2656
- height: 15,
2657
- width: 75,
2658
- marginBottom: 10
2659
- },
2660
- src: bmpLogo
2661
- }
2662
- ), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), reportTiming && Object.keys(reportTimingsObj).includes(reportTiming) ? /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, reportTimingsObj[reportTiming], " Report") : null, /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Delivery Postal Report"), /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), /* @__PURE__ */ React10.createElement(
2663
- View9,
2664
- {
2665
- style: {
2666
- display: "flex",
2667
- flexDirection: "row",
2668
- marginTop: 20,
2669
- width: "100%",
2670
- gap: 20,
2671
- flexWrap: "wrap"
2672
- }
2673
- },
2674
- deliveryData && deliveryData.map((item) => {
2675
- return /* @__PURE__ */ React10.createElement(
2676
- View9,
2677
- {
2678
- key: item.id,
2679
- style: {
2680
- width: "46%",
2681
- display: "flex",
2682
- flexDirection: "column",
2683
- border: "1px solid black",
2684
- borderStyle: "dotted",
2685
- borderWidth: 1.5,
2686
- padding: 6
2687
- }
2688
- },
2689
- /* @__PURE__ */ React10.createElement(
2690
- View9,
2691
- {
2692
- style: {
2693
- flexGrow: 1
2694
- }
2695
- },
2696
- /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 10, fontWeight: "bold" } }, item.name),
2697
- /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 10 } }, item.address),
2698
- /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 10 } }, item.phone)
2699
- ),
2700
- /* @__PURE__ */ React10.createElement(
2701
- View9,
2702
- {
2703
- style: {
2704
- borderTop: "1px solid black",
2705
- marginTop: 5,
2706
- paddingTop: 3,
2707
- borderStyle: "dotted"
2708
- }
2709
- }
2710
- ),
2711
- /* @__PURE__ */ React10.createElement(Text_default, { style: { fontSize: 9, marginTop: 3 } }, "Note: ", item.pujaDetails)
2712
- );
2713
- })
2714
- ))));
2715
- };
2716
- var A4CombinedReport_default = A4CombinedReport;
2717
-
2718
- // src/sizes/a4/A4MultiTemplePaymentReport.tsx
2719
- import { Document as Document11, Image as Image10, Page as Page11, View as View10 } from "@react-pdf/renderer";
2720
- import React11 from "react";
2721
- var A4MultiTemplePaymentReport = ({
2722
- startDate,
2723
- endDate,
2724
- data
2725
- }) => {
2726
- return /* @__PURE__ */ React11.createElement(Document11, null, /* @__PURE__ */ React11.createElement(Page11, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React11.createElement(
2727
- Image10,
2728
- {
2729
- fixed: true,
2730
- style: {
2731
- height: 15,
2732
- width: 75,
2733
- marginBottom: 10
2734
- },
2735
- src: bmpLogo
2736
- }
2737
- ), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", startDate.toDateString(), " - ", endDate.toDateString()), /* @__PURE__ */ React11.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Temple Payment Report"), /* @__PURE__ */ React11.createElement(
2738
- View10,
2739
- {
2740
- style: {
2741
- display: "flex",
2742
- flexDirection: "column",
2743
- marginTop: 20
2744
- }
2745
- },
2746
- /* @__PURE__ */ React11.createElement(
2747
- View10,
2748
- {
2749
- style: {
2750
- display: "flex",
2751
- flexDirection: "row",
2752
- border: "1px solid black",
2753
- fontWeight: "semibold",
2754
- fontSize: 10
2755
- }
2756
- },
2757
- /* @__PURE__ */ React11.createElement(
2758
- View10,
2759
- {
2760
- style: {
2761
- padding: 6,
2762
- borderRight: "1px solid black",
2763
- width: "10%"
2764
- }
2765
- },
2766
- /* @__PURE__ */ React11.createElement(Text_default, null, "S.No.")
2767
- ),
2768
- /* @__PURE__ */ React11.createElement(
2769
- View10,
2770
- {
2771
- style: {
2772
- padding: 6,
2773
- borderRight: "1px solid black",
2774
- width: "55%"
2775
- }
2776
- },
2777
- /* @__PURE__ */ React11.createElement(Text_default, null, "Temple Name")
2778
- ),
2779
- /* @__PURE__ */ React11.createElement(
2780
- View10,
2781
- {
2782
- style: {
2783
- padding: 6,
2784
- borderRight: "1px solid black",
2785
- width: "15%"
2786
- }
2787
- },
2788
- /* @__PURE__ */ React11.createElement(Text_default, null, "Bookings")
2789
- ),
2790
- /* @__PURE__ */ React11.createElement(
2791
- View10,
2792
- {
2793
- style: {
2794
- padding: 6,
2795
- width: "20%"
2796
- }
2797
- },
2798
- /* @__PURE__ */ React11.createElement(Text_default, null, "Revenue")
2799
- )
2800
- ),
2801
- data?.map((temple, index) => {
2802
- return /* @__PURE__ */ React11.createElement(
2803
- View10,
2804
- {
2805
- key: index,
2806
- style: {
2807
- display: "flex",
2808
- flexDirection: "row",
2809
- border: "1px solid black",
2810
- borderTop: "none",
2811
- fontSize: 10
2812
- }
2813
- },
2814
- /* @__PURE__ */ React11.createElement(
2815
- View10,
2816
- {
2817
- style: {
2818
- padding: 6,
2819
- borderRight: "1px solid black",
2820
- width: "10%"
2821
- }
2822
- },
2823
- /* @__PURE__ */ React11.createElement(Text_default, null, index + 1)
2824
- ),
2825
- /* @__PURE__ */ React11.createElement(
2826
- View10,
2827
- {
2828
- style: {
2829
- padding: 6,
2830
- borderRight: "1px solid black",
2831
- width: "55%"
2832
- }
2833
- },
2834
- /* @__PURE__ */ React11.createElement(Text_default, null, temple.name)
2835
- ),
2836
- /* @__PURE__ */ React11.createElement(
2837
- View10,
2838
- {
2839
- style: {
2840
- padding: 6,
2841
- borderRight: "1px solid black",
2842
- width: "15%"
2843
- }
2844
- },
2845
- /* @__PURE__ */ React11.createElement(Text_default, null, temple.bookings)
2846
- ),
2847
- /* @__PURE__ */ React11.createElement(
2848
- View10,
2849
- {
2850
- style: {
2851
- padding: 6,
2852
- width: "20%"
2853
- }
2854
- },
2855
- /* @__PURE__ */ React11.createElement(Text_default, null, "\u20B9", temple.revenue)
2856
- )
2857
- );
2858
- })
2859
- )));
2860
- };
2861
- var A4MultiTemplePaymentReport_default = A4MultiTemplePaymentReport;
2862
-
2863
- // src/sizes/a4/A4SettlementsReport.tsx
2864
- import React12 from "react";
2865
- import { Page as Page12, Document as Document12, Image as Image11, View as View11 } from "@react-pdf/renderer";
2866
- var A4SettlementsReport = ({
2867
- startDate,
2868
- endDate,
2869
- templeName,
2870
- data
2871
- }) => {
2872
- return /* @__PURE__ */ React12.createElement(Document12, null, /* @__PURE__ */ React12.createElement(
2873
- Page12,
2874
- {
2875
- size: "A4",
2876
- style: {
2877
- padding: 30,
2878
- fontFamily: "Noto Sans"
2879
- }
2880
- },
2881
- /* @__PURE__ */ React12.createElement(
2882
- Image11,
2883
- {
2884
- fixed: true,
2885
- style: {
2886
- height: 15,
2887
- width: 75,
2888
- marginBottom: 10
2889
- },
2890
- src: bmpLogo
2891
- }
2892
- ),
2893
- /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Dates: ", startDate.toDateString(), " - ", endDate.toDateString()),
2894
- /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Settlements Report"),
2895
- /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`),
2896
- /* @__PURE__ */ React12.createElement(Text_default, { style: { fontSize: 10, marginTop: 10 } }, "Total Credited Amount: ", data.totalCreditedAmount),
2897
- data.settlements.length > 0 ? /* @__PURE__ */ React12.createElement(
2898
- View11,
2899
- {
2900
- style: {
2901
- display: "flex",
2902
- flexDirection: "column",
2903
- marginTop: 20
2904
- }
2905
- },
2906
- /* @__PURE__ */ React12.createElement(
2907
- View11,
2908
- {
2909
- style: {
2910
- display: "flex",
2911
- flexDirection: "row",
2912
- border: "1px solid #000",
2913
- fontSize: 10,
2914
- fontWeight: "semibold"
2915
- }
2916
- },
2917
- /* @__PURE__ */ React12.createElement(
2918
- View11,
2919
- {
2920
- style: {
2921
- padding: 6,
2922
- borderRight: "1px solid #000",
2923
- width: "10%"
2924
- }
2925
- },
2926
- /* @__PURE__ */ React12.createElement(Text_default, null, "Sr no")
2927
- ),
2928
- /* @__PURE__ */ React12.createElement(
2929
- View11,
2930
- {
2931
- style: {
2932
- padding: 6,
2933
- borderRight: "1px solid #000",
2934
- width: "15%"
2935
- }
2936
- },
2937
- /* @__PURE__ */ React12.createElement(Text_default, null, "Date")
2938
- ),
2939
- /* @__PURE__ */ React12.createElement(
2940
- View11,
2941
- {
2942
- style: {
2943
- padding: 6,
2944
- borderRight: "1px solid #000",
2945
- width: "15%"
2946
- }
2947
- },
2948
- /* @__PURE__ */ React12.createElement(Text_default, null, "Settlement")
2949
- ),
2950
- /* @__PURE__ */ React12.createElement(
2951
- View11,
2952
- {
2953
- style: {
2954
- padding: 6,
2955
- borderRight: "1px solid #000",
2956
- width: "20%"
2957
- }
2958
- },
2959
- /* @__PURE__ */ React12.createElement(Text_default, null, "UTR")
2960
- ),
2961
- /* @__PURE__ */ React12.createElement(
2962
- View11,
2963
- {
2964
- style: {
2965
- padding: 6,
2966
- borderRight: "1px solid #000",
2967
- width: "25%"
2968
- }
2969
- },
2970
- /* @__PURE__ */ React12.createElement(Text_default, null, "Invoice")
2971
- ),
2972
- /* @__PURE__ */ React12.createElement(
2973
- View11,
2974
- {
2975
- style: {
2976
- padding: 6,
2977
- // borderRight: "1px solid #000",
2978
- width: "20%"
2979
- }
2980
- },
2981
- /* @__PURE__ */ React12.createElement(Text_default, null, "Settlement ID")
2982
- )
2983
- ),
2984
- data.settlements?.map((item, index) => {
2985
- return /* @__PURE__ */ React12.createElement(
2986
- View11,
2987
- {
2988
- style: {
2989
- display: "flex",
2990
- flexDirection: "row",
2991
- border: "1px solid #000",
2992
- borderTop: "none",
2993
- fontSize: 10
2994
- }
2995
- },
2996
- /* @__PURE__ */ React12.createElement(
2997
- View11,
2998
- {
2999
- style: {
3000
- padding: 6,
3001
- borderRight: "1px solid #000",
3002
- width: "10%"
3003
- }
3004
- },
3005
- /* @__PURE__ */ React12.createElement(Text_default, null, index + 1)
3006
- ),
3007
- /* @__PURE__ */ React12.createElement(
3008
- View11,
3009
- {
3010
- style: {
3011
- padding: 6,
3012
- width: "15%",
3013
- // fontSize: 7,
3014
- borderRight: "1px solid #000"
3015
- }
3016
- },
3017
- /* @__PURE__ */ React12.createElement(Text_default, null, item.date)
3018
- ),
3019
- /* @__PURE__ */ React12.createElement(
3020
- View11,
3021
- {
3022
- style: {
3023
- padding: 6,
3024
- borderRight: "1px solid #000",
3025
- width: "15%"
3026
- }
3027
- },
3028
- /* @__PURE__ */ React12.createElement(Text_default, null, item.settlement_amount)
3029
- ),
3030
- /* @__PURE__ */ React12.createElement(
3031
- View11,
3032
- {
3033
- style: {
3034
- padding: 6,
3035
- borderRight: "1px solid #000",
3036
- width: "20%",
3037
- fontSize: 9
3038
- }
3039
- },
3040
- /* @__PURE__ */ React12.createElement(Text_default, null, item.utr.split("").map((line, index2) => /* @__PURE__ */ React12.createElement(Text_default, { key: index2 }, line)))
3041
- ),
3042
- /* @__PURE__ */ React12.createElement(
3043
- View11,
3044
- {
3045
- style: {
3046
- padding: 6,
3047
- borderRight: "1px solid #000",
3048
- width: "25%",
3049
- fontSize: 9
3050
- }
3051
- },
3052
- /* @__PURE__ */ React12.createElement(
3053
- View11,
3054
- {
3055
- style: {
3056
- display: "flex",
3057
- flexDirection: "column"
3058
- }
3059
- },
3060
- item.invoices.map((invoice, idx) => /* @__PURE__ */ React12.createElement(Text_default, { key: idx }, invoice.number, " (", invoice.amount, ")"))
3061
- )
3062
- ),
3063
- /* @__PURE__ */ React12.createElement(
3064
- View11,
3065
- {
3066
- style: {
3067
- padding: 6,
3068
- // borderRight: "1px solid #000",
3069
- width: "20%"
3070
- }
3071
- },
3072
- /* @__PURE__ */ React12.createElement(Text_default, null, item.settlement_id)
3073
- )
3074
- );
3075
- })
3076
- ) : /* @__PURE__ */ React12.createElement(
3077
- Text_default,
3078
- {
3079
- style: {
3080
- fontSize: 18,
3081
- textAlign: "center",
3082
- marginTop: 100
3083
- }
3084
- },
3085
- "No data available for the selected date range"
3086
- )
3087
- ));
3088
- };
3089
- var A4SettlementsReport_default = A4SettlementsReport;
3090
-
3091
- // src/sizes/a4/A4Invoice.tsx
3092
- import React13 from "react";
3093
- import { Document as Document13, Image as Image12, Page as Page13, View as View12 } from "@react-pdf/renderer";
3094
- var A4Invoice = ({ data }) => {
3095
- return /* @__PURE__ */ React13.createElement(Document13, null, /* @__PURE__ */ React13.createElement(Page13, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React13.createElement(
3096
- View12,
3097
- {
3098
- style: {
3099
- display: "flex",
3100
- flexDirection: "row"
3101
- }
3102
- },
3103
- /* @__PURE__ */ React13.createElement(
3104
- View12,
3105
- {
3106
- style: {
3107
- backgroundColor: "#FFA823",
3108
- width: 20,
3109
- height: "100%"
3110
- }
3111
- }
3112
- ),
3113
- /* @__PURE__ */ React13.createElement(View12, { style: { marginLeft: 15, marginTop: 10, marginBottom: 0 } }, /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 16, fontWeight: "bold" } }, data.templeName), /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 10 } }, data.templeAddress), /* @__PURE__ */ React13.createElement(
3114
- View12,
3115
- {
3116
- style: {
3117
- display: "flex",
3118
- flexDirection: "row",
3119
- gap: 5,
3120
- marginTop: 10,
3121
- alignItems: "center"
3122
- }
3123
- },
3124
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 10, marginTop: -5 } }, "Powered by"),
3125
- /* @__PURE__ */ React13.createElement(
3126
- Image12,
3127
- {
3128
- style: {
3129
- height: 25,
3130
- width: 95,
3131
- // marginBottom: 5,
3132
- objectFit: "contain"
3133
- },
3134
- src: bmpLogo2
3135
- }
3136
- )
3137
- ))
3138
- ), /* @__PURE__ */ React13.createElement(
3139
- View12,
3140
- {
3141
- style: {
3142
- display: "flex",
3143
- flexDirection: "column",
3144
- alignItems: "center",
3145
- marginTop: 20,
3146
- position: "relative"
3147
- }
3148
- },
3149
- data.status === "confirmed" ? /* @__PURE__ */ React13.createElement(
3150
- Image12,
3151
- {
3152
- style: {
3153
- height: 85,
3154
- width: 85,
3155
- marginBottom: 5,
3156
- objectFit: "contain",
3157
- position: "absolute",
3158
- right: "0",
3159
- bottom: "0"
3160
- },
3161
- src: paidIcon
3162
- }
3163
- ) : null,
3164
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 12, marginTop: 5, fontWeight: "semibold" } }, "INVOICE #", data.invoiceNumber),
3165
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 10, marginTop: 2 } }, "Status: ", data.status == "confirmed" ? "PAID" : "PENDING")
3166
- ), /* @__PURE__ */ React13.createElement(
3167
- View12,
3168
- {
3169
- style: {
3170
- marginTop: 10
3171
- }
3172
- },
3173
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 11 } }, "Bill to:"),
3174
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 11 } }, data.devoteeDetails.name),
3175
- data.devoteeDetails.phone ? /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 11 } }, data.devoteeDetails.phone) : null,
3176
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 11 } }, data.bookingDate)
3177
- ), /* @__PURE__ */ React13.createElement(
3178
- View12,
3179
- {
3180
- style: {
3181
- display: "flex",
3182
- flexDirection: "column",
3183
- marginTop: 20
3184
- }
3185
- },
3186
- /* @__PURE__ */ React13.createElement(
3187
- View12,
3188
- {
3189
- style: {
3190
- display: "flex",
3191
- flexDirection: "row",
3192
- borderBottom: "1px solid #757575",
3193
- fontSize: 10,
3194
- fontWeight: "semibold"
3195
- }
3196
- },
3197
- /* @__PURE__ */ React13.createElement(
3198
- View12,
3199
- {
3200
- style: {
3201
- padding: 6,
3202
- borderRight: "1px solid #b5b5b5",
3203
- width: "50%"
3204
- }
3205
- },
3206
- /* @__PURE__ */ React13.createElement(Text_default, null, "Item Description")
3207
- ),
3208
- /* @__PURE__ */ React13.createElement(
3209
- View12,
3210
- {
3211
- style: {
3212
- padding: 6,
3213
- borderRight: "1px solid #b5b5b5",
3214
- width: "15%",
3215
- textAlign: "center"
3216
- }
3217
- },
3218
- /* @__PURE__ */ React13.createElement(Text_default, null, "Price")
3219
- ),
3220
- /* @__PURE__ */ React13.createElement(
3221
- View12,
3222
- {
3223
- style: {
3224
- padding: 6,
3225
- borderRight: "1px solid #b5b5b5",
3226
- width: "15%",
3227
- textAlign: "center"
3228
- }
3229
- },
3230
- /* @__PURE__ */ React13.createElement(Text_default, null, "Quantity")
3231
- ),
3232
- /* @__PURE__ */ React13.createElement(
3233
- View12,
3234
- {
3235
- style: {
3236
- padding: 6,
3237
- // borderRight: "1px solid #b5b5b5",
3238
- width: "20%",
3239
- textAlign: "center"
3240
- }
3241
- },
3242
- /* @__PURE__ */ React13.createElement(Text_default, null, "Total")
3243
- )
3244
- ),
3245
- data.items.map((item, index) => {
3246
- return /* @__PURE__ */ React13.createElement(
3247
- View12,
3248
- {
3249
- wrap: false,
3250
- style: {
3251
- display: "flex",
3252
- flexDirection: "row",
3253
- borderBottom: "1px solid #757575",
3254
- fontSize: 10
3255
- }
3256
- },
3257
- /* @__PURE__ */ React13.createElement(
3258
- View12,
3259
- {
3260
- style: {
3261
- padding: 6,
3262
- borderRight: "1px solid #b5b5b5",
3263
- width: "50%"
3264
- }
3265
- },
3266
- item.pujaName ? /* @__PURE__ */ React13.createElement(
3267
- Text_default,
3268
- {
3269
- style: {
3270
- fontSize: 11
3271
- }
3272
- },
3273
- item.pujaName
3274
- ) : null,
3275
- item.devoteesName ? /* @__PURE__ */ React13.createElement(
3276
- Text_default,
3277
- {
3278
- style: {
3279
- fontSize: 9,
3280
- color: "#333333"
3281
- }
3282
- },
3283
- item.devoteesName
3284
- ) : null,
3285
- item.pujaDate ? /* @__PURE__ */ React13.createElement(
3286
- Text_default,
3287
- {
3288
- style: {
3289
- fontSize: 9,
3290
- color: "#333333"
3291
- }
3292
- },
3293
- item.pujaDate,
3294
- " ",
3295
- item.timing ? `- ${item.timing}` : null
3296
- ) : null,
3297
- item.repeatEndDate && item.repeatStartDate ? /* @__PURE__ */ React13.createElement(
3298
- Text_default,
3299
- {
3300
- style: {
3301
- fontSize: 9,
3302
- color: "#333333"
3303
- }
3304
- },
3305
- item.repeatStartDate,
3306
- " to ",
3307
- item.repeatEndDate,
3308
- " ",
3309
- item.timing ? `- ${item.timing}` : null
3310
- ) : null
3311
- ),
3312
- /* @__PURE__ */ React13.createElement(
3313
- View12,
3314
- {
3315
- style: {
3316
- padding: 6,
3317
- borderRight: "1px solid #b5b5b5",
3318
- width: "15%",
3319
- textAlign: "center",
3320
- display: "flex",
3321
- alignItems: "center",
3322
- justifyContent: "center"
3323
- }
3324
- },
3325
- /* @__PURE__ */ React13.createElement(Text_default, { style: {} }, item.basePujPrice)
3326
- ),
3327
- /* @__PURE__ */ React13.createElement(
3328
- View12,
3329
- {
3330
- style: {
3331
- padding: 6,
3332
- borderRight: "1px solid #b5b5b5",
3333
- width: "15%",
3334
- textAlign: "center",
3335
- display: "flex",
3336
- alignItems: "center",
3337
- justifyContent: "center"
3338
- }
3339
- },
3340
- /* @__PURE__ */ React13.createElement(Text_default, { style: {} }, `${item.quantity ? item.quantity : ""}${item.repeatCount ? ` x ${item.repeatCount}` : ""}`)
3341
- ),
3342
- /* @__PURE__ */ React13.createElement(
3343
- View12,
3344
- {
3345
- style: {
3346
- padding: 6,
3347
- width: "20%",
3348
- textAlign: "center",
3349
- display: "flex",
3350
- alignItems: "center",
3351
- justifyContent: "center"
3352
- }
3353
- },
3354
- /* @__PURE__ */ React13.createElement(Text_default, { style: {} }, item.totalPrice)
3355
- )
3356
- );
3357
- })
3358
- ), /* @__PURE__ */ React13.createElement(
3359
- View12,
3360
- {
3361
- style: {
3362
- display: "flex",
3363
- flexDirection: "row",
3364
- marginVertical: 40,
3365
- marginHorizontal: 20
3366
- }
3367
- },
3368
- /* @__PURE__ */ React13.createElement(
3369
- View12,
3370
- {
3371
- style: {
3372
- width: "50%",
3373
- display: "flex",
3374
- flexDirection: "column",
3375
- justifyContent: "center",
3376
- fontSize: 11
3377
- }
3378
- },
3379
- /* @__PURE__ */ React13.createElement(
3380
- Text_default,
3381
- {
3382
- style: {
3383
- fontWeight: "bold"
3384
- }
3385
- },
3386
- "Payment Method:"
3387
- ),
3388
- /* @__PURE__ */ React13.createElement(Text_default, null, data.paymentMethod)
3389
- ),
3390
- /* @__PURE__ */ React13.createElement(
3391
- View12,
3392
- {
3393
- style: {
3394
- width: "50%",
3395
- display: "flex",
3396
- flexDirection: "column",
3397
- justifyContent: "center",
3398
- alignItems: "flex-end"
3399
- }
3400
- },
3401
- /* @__PURE__ */ React13.createElement(
3402
- View12,
3403
- {
3404
- style: {
3405
- display: "flex",
3406
- flexDirection: "row",
3407
- gap: 10,
3408
- fontSize: 10
3409
- }
3410
- },
3411
- /* @__PURE__ */ React13.createElement(
3412
- View12,
3413
- {
3414
- style: {
3415
- width: "50%",
3416
- textAlign: "right"
3417
- }
3418
- },
3419
- /* @__PURE__ */ React13.createElement(Text_default, null, "Subtotal: ")
3420
- ),
3421
- /* @__PURE__ */ React13.createElement(
3422
- View12,
3423
- {
3424
- style: {
3425
- width: "30%",
3426
- textAlign: "right"
3427
- }
3428
- },
3429
- /* @__PURE__ */ React13.createElement(Text_default, null, data.subTotal)
3430
- )
3431
- ),
3432
- data.postalCharges ? /* @__PURE__ */ React13.createElement(
3433
- View12,
3434
- {
3435
- style: {
3436
- display: "flex",
3437
- flexDirection: "row",
3438
- gap: 10,
3439
- fontSize: 10
3440
- }
3441
- },
3442
- /* @__PURE__ */ React13.createElement(
3443
- View12,
3444
- {
3445
- style: {
3446
- width: "70%",
3447
- textAlign: "right"
3448
- }
3449
- },
3450
- /* @__PURE__ */ React13.createElement(Text_default, null, "Postal Charges: ")
3451
- ),
3452
- /* @__PURE__ */ React13.createElement(
3453
- View12,
3454
- {
3455
- style: {
3456
- width: "30%",
3457
- textAlign: "right"
3458
- }
3459
- },
3460
- /* @__PURE__ */ React13.createElement(Text_default, null, data.postalCharges)
3461
- )
3462
- ) : null,
3463
- /* @__PURE__ */ React13.createElement(
3464
- View12,
3465
- {
3466
- style: {
3467
- display: "flex",
3468
- flexDirection: "row",
3469
- gap: 10,
3470
- fontSize: 10
3471
- }
3472
- },
3473
- /* @__PURE__ */ React13.createElement(
3474
- View12,
3475
- {
3476
- style: {
3477
- width: "70%",
3478
- textAlign: "right"
3479
- }
3480
- },
3481
- /* @__PURE__ */ React13.createElement(Text_default, null, "Payment Gateway Charges: ")
3482
- ),
3483
- /* @__PURE__ */ React13.createElement(
3484
- View12,
3485
- {
3486
- style: {
3487
- width: "30%",
3488
- textAlign: "right"
3489
- }
3490
- },
3491
- /* @__PURE__ */ React13.createElement(Text_default, null, data.paymentGatewayCharges)
3492
- )
3493
- ),
3494
- /* @__PURE__ */ React13.createElement(
3495
- View12,
3496
- {
3497
- style: {
3498
- display: "flex",
3499
- flexDirection: "row",
3500
- gap: 10,
3501
- fontSize: 10
3502
- }
3503
- },
3504
- /* @__PURE__ */ React13.createElement(
3505
- View12,
3506
- {
3507
- style: {
3508
- width: "70%",
3509
- textAlign: "right"
3510
- }
3511
- },
3512
- /* @__PURE__ */ React13.createElement(Text_default, null, "Platform Charges: ")
3513
- ),
3514
- /* @__PURE__ */ React13.createElement(
3515
- View12,
3516
- {
3517
- style: {
3518
- width: "30%",
3519
- textAlign: "right"
3520
- }
3521
- },
3522
- /* @__PURE__ */ React13.createElement(Text_default, null, data.platformCharges)
3523
- )
3524
- ),
3525
- /* @__PURE__ */ React13.createElement(
3526
- View12,
3527
- {
3528
- style: {
3529
- display: "flex",
3530
- flexDirection: "row",
3531
- gap: 10,
3532
- fontSize: 10
3533
- }
3534
- },
3535
- /* @__PURE__ */ React13.createElement(
3536
- View12,
3537
- {
3538
- style: {
3539
- width: "70%",
3540
- textAlign: "right"
3541
- }
3542
- },
3543
- /* @__PURE__ */ React13.createElement(Text_default, null, "GST (18%): ")
3544
- ),
3545
- /* @__PURE__ */ React13.createElement(
3546
- View12,
3547
- {
3548
- style: {
3549
- width: "30%",
3550
- textAlign: "right"
3551
- }
3552
- },
3553
- /* @__PURE__ */ React13.createElement(Text_default, null, data.gst)
3554
- )
3555
- ),
3556
- /* @__PURE__ */ React13.createElement(
3557
- View12,
3558
- {
3559
- style: {
3560
- width: "60%",
3561
- height: 1,
3562
- backgroundColor: "#757575",
3563
- marginVertical: 5
3564
- }
3565
- }
3566
- ),
3567
- /* @__PURE__ */ React13.createElement(
3568
- View12,
3569
- {
3570
- style: {
3571
- display: "flex",
3572
- flexDirection: "row",
3573
- gap: 10,
3574
- fontSize: 10,
3575
- fontWeight: "bold"
3576
- }
3577
- },
3578
- /* @__PURE__ */ React13.createElement(
3579
- View12,
3580
- {
3581
- style: {
3582
- width: "70%",
3583
- textAlign: "right"
3584
- }
3585
- },
3586
- /* @__PURE__ */ React13.createElement(Text_default, null, "Total: ")
3587
- ),
3588
- /* @__PURE__ */ React13.createElement(
3589
- View12,
3590
- {
3591
- style: {
3592
- width: "30%",
3593
- textAlign: "right"
3594
- }
3595
- },
3596
- /* @__PURE__ */ React13.createElement(Text_default, null, data.totalAmount)
3597
- )
3598
- )
3599
- )
3600
- ), data.prasads && (data.prasads.morning.length > 0 || data.prasads.afternoon.length > 0 || data.prasads.evening.length > 0) ? /* @__PURE__ */ React13.createElement(
3601
- View12,
3602
- {
3603
- style: {
3604
- display: "flex",
3605
- flexDirection: "column",
3606
- marginBottom: 30
3607
- }
3608
- },
3609
- /* @__PURE__ */ React13.createElement(
3610
- View12,
3611
- {
3612
- style: {
3613
- backgroundColor: "#FF266F",
3614
- padding: 5
3615
- }
3616
- },
3617
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 10, fontWeight: "bold", color: "white" } }, "Prasadsam Details")
3618
- ),
3619
- data.prasads.morning.length > 0 ? /* @__PURE__ */ React13.createElement(
3620
- View12,
3621
- {
3622
- wrap: false,
3623
- style: {
3624
- display: "flex",
3625
- flexDirection: "column",
3626
- paddingHorizontal: 10,
3627
- paddingVertical: 5,
3628
- borderBottom: "1px solid #757575",
3629
- borderRight: "1px solid #757575",
3630
- borderLeft: "1px solid #757575"
3631
- }
3632
- },
3633
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 9, fontWeight: "bold" } }, "Morning:"),
3634
- data.prasads.morning.map((prasad, index) => /* @__PURE__ */ React13.createElement(Text_default, { key: index, style: { fontSize: 10 } }, index + 1, ". ", prasad.name, " (", prasad.timings, ")"))
3635
- ) : null,
3636
- data.prasads.afternoon.length > 0 ? /* @__PURE__ */ React13.createElement(
3637
- View12,
3638
- {
3639
- wrap: false,
3640
- style: {
3641
- display: "flex",
3642
- flexDirection: "column",
3643
- paddingHorizontal: 10,
3644
- paddingVertical: 5,
3645
- borderBottom: "1px solid #757575",
3646
- borderRight: "1px solid #757575",
3647
- borderLeft: "1px solid #757575"
3648
- }
3649
- },
3650
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 9, fontWeight: "bold" } }, "Afternoon:"),
3651
- data.prasads.afternoon.map((prasad, index) => /* @__PURE__ */ React13.createElement(Text_default, { key: index, style: { fontSize: 10 } }, index + 1, ". ", prasad.name, " (", prasad.timings, ")"))
3652
- ) : null,
3653
- data.prasads.evening.length > 0 ? /* @__PURE__ */ React13.createElement(
3654
- View12,
3655
- {
3656
- wrap: false,
3657
- style: {
3658
- display: "flex",
3659
- flexDirection: "column",
3660
- paddingHorizontal: 10,
3661
- paddingVertical: 5,
3662
- borderBottom: "1px solid #757575",
3663
- borderRight: "1px solid #757575",
3664
- borderLeft: "1px solid #757575"
3665
- }
3666
- },
3667
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 9, fontWeight: "bold" } }, "Evening:"),
3668
- data.prasads.evening.map((prasad, index) => /* @__PURE__ */ React13.createElement(Text_default, { key: index, style: { fontSize: 10 } }, index + 1, ". ", prasad.name, " (", prasad.timings, ")"))
3669
- ) : null
3670
- ) : null, data.instructions.length > 0 ? /* @__PURE__ */ React13.createElement(
3671
- View12,
3672
- {
3673
- style: {
3674
- display: "flex",
3675
- flexDirection: "column",
3676
- marginHorizontal: 20,
3677
- fontSize: 8,
3678
- border: "1px solid #757575"
3679
- }
3680
- },
3681
- /* @__PURE__ */ React13.createElement(
3682
- View12,
3683
- {
3684
- style: {
3685
- backgroundColor: "#FFA823",
3686
- paddingHorizontal: 10,
3687
- paddingVertical: 5
3688
- }
3689
- },
3690
- /* @__PURE__ */ React13.createElement(Text_default, null, "IMPORTANT INSTRUCTIONS:")
3691
- ),
3692
- /* @__PURE__ */ React13.createElement(
3693
- View12,
3694
- {
3695
- style: {
3696
- display: "flex",
3697
- flexDirection: "column",
3698
- gap: 5,
3699
- marginVertical: 10,
3700
- paddingHorizontal: 10
3701
- }
3702
- },
3703
- data.instructions.map((instruction, index) => /* @__PURE__ */ React13.createElement(Text_default, { key: index, style: { fontSize: 8 } }, index + 1, ") ", instruction.instruction))
3704
- )
3705
- ) : null, /* @__PURE__ */ React13.createElement(
3706
- View12,
3707
- {
3708
- style: {
3709
- display: "flex",
3710
- flexDirection: "row",
3711
- marginTop: 20
3712
- }
3713
- },
3714
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 8, fontWeight: "bold" } }, "Terms and Conditions:"),
3715
- /* @__PURE__ */ React13.createElement(Text_default, { style: { fontSize: 8, marginLeft: 5 } }, "https://www.bookmypuja.app/terms-and-condition")
3716
- )));
3717
- };
3718
- var A4Invoice_default = A4Invoice;
3719
-
3720
- // src/sizes/a4/A4PostalReport.tsx
3721
- import { Document as Document14, Image as Image13, Page as Page14, View as View13 } from "@react-pdf/renderer";
3722
- import React14 from "react";
3723
- var A4PostalReport = ({ date, templeName, data }) => {
3724
- return /* @__PURE__ */ React14.createElement(Document14, null, /* @__PURE__ */ React14.createElement(Page14, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React14.createElement(
3725
- Image13,
3726
- {
3727
- fixed: true,
3728
- style: {
3729
- height: 15,
3730
- width: 75,
3731
- marginBottom: 10
3732
- },
3733
- src: bmpLogo
3734
- }
3735
- ), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Date: ", date.toDateString()), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Prasad Delivery Postal Report"), /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data && data.length > 0 ? /* @__PURE__ */ React14.createElement(
3736
- View13,
3737
- {
3738
- style: {
3739
- display: "flex",
3740
- flexDirection: "row",
3741
- marginTop: 20,
3742
- width: "100%",
3743
- gap: 20,
3744
- flexWrap: "wrap"
3745
- }
3746
- },
3747
- data.map((item) => {
3748
- return /* @__PURE__ */ React14.createElement(
3749
- View13,
3750
- {
3751
- key: item.id,
3752
- style: {
3753
- width: "46%",
3754
- display: "flex",
3755
- flexDirection: "column",
3756
- border: "1px solid black",
3757
- borderStyle: "dotted",
3758
- borderWidth: 1.5,
3759
- padding: 6
3760
- }
3761
- },
3762
- /* @__PURE__ */ React14.createElement(
3763
- View13,
3764
- {
3765
- style: {
3766
- flexGrow: 1
3767
- }
3768
- },
3769
- /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 10, fontWeight: "bold" } }, item.name),
3770
- /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 10 } }, item.address),
3771
- /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 10 } }, item.phone)
3772
- ),
3773
- /* @__PURE__ */ React14.createElement(
3774
- View13,
3775
- {
3776
- style: {
3777
- borderTop: "1px solid black",
3778
- marginTop: 5,
3779
- paddingTop: 3,
3780
- borderStyle: "dotted"
3781
- }
3782
- }
3783
- ),
3784
- /* @__PURE__ */ React14.createElement(Text_default, { style: { fontSize: 9, marginTop: 3 } }, "Note: ", item.pujaDetails)
3785
- );
3786
- })
3787
- ) : /* @__PURE__ */ React14.createElement(
3788
- Text_default,
3789
- {
3790
- style: {
3791
- fontSize: 18,
3792
- textAlign: "center",
3793
- marginTop: 100
3794
- }
3795
- },
3796
- "No data available for the selected date range"
3797
- )));
3798
- };
3799
- var A4PostalReport_default = A4PostalReport;
3800
-
3801
- // src/sizes/a4/A4PaymentSettlementReport.tsx
3802
- import { Document as Document15, Image as Image14, Page as Page15, View as View15 } from "@react-pdf/renderer";
3803
- import React16 from "react";
3804
-
3805
- // src/components/BrokenText.tsx
3806
- import React15 from "react";
3807
- import { View as View14 } from "@react-pdf/renderer";
3808
- var BrokenText = ({ children }) => {
3809
- if (!children || typeof children !== "string") return null;
3810
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
3811
- View14,
3812
- {
3813
- style: {
3814
- display: "flex",
3815
- flexDirection: "row",
3816
- flexWrap: "wrap"
3817
- }
3818
- },
3819
- children.split("").map((char, charIndex) => /* @__PURE__ */ React15.createElement(Text_default, { key: charIndex }, char))
3820
- ));
3821
- };
3822
- var BrokenText_default = BrokenText;
3823
-
3824
- // src/sizes/a4/A4PaymentSettlementReport.tsx
3825
- var A4PaymentSettlementReport = ({
3826
- startDate,
3827
- endDate,
3828
- templeName,
3829
- data
3830
- }) => {
3831
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Document15, null, /* @__PURE__ */ React16.createElement(Page15, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React16.createElement(
3832
- Image14,
3833
- {
3834
- fixed: true,
3835
- style: {
3836
- height: 15,
3837
- width: 75,
3838
- marginBottom: 10
3839
- },
3840
- src: bmpLogo
3841
- }
3842
- ), /* @__PURE__ */ React16.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Dates: ", startDate.toDateString(), " - ", endDate.toDateString()), /* @__PURE__ */ React16.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Payment Settlement Report"), /* @__PURE__ */ React16.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React16.createElement(
3843
- View15,
3844
- {
3845
- style: {
3846
- display: "flex",
3847
- flexDirection: "column",
3848
- marginTop: 20
3849
- }
3850
- },
3851
- /* @__PURE__ */ React16.createElement(
3852
- View15,
3853
- {
3854
- style: {
3855
- display: "flex",
3856
- flexDirection: "row",
3857
- border: "1px solid #000",
3858
- fontSize: 10,
3859
- fontWeight: "semibold"
3860
- }
3861
- },
3862
- /* @__PURE__ */ React16.createElement(
3863
- View15,
3864
- {
3865
- style: {
3866
- padding: 6,
3867
- borderRight: "1px solid #000",
3868
- width: "10%"
3869
- }
3870
- },
3871
- /* @__PURE__ */ React16.createElement(Text_default, null, "Sr no")
3872
- ),
3873
- /* @__PURE__ */ React16.createElement(
3874
- View15,
3875
- {
3876
- style: {
3877
- padding: 6,
3878
- borderRight: "1px solid #000",
3879
- width: "15%"
3880
- }
3881
- },
3882
- /* @__PURE__ */ React16.createElement(Text_default, null, "Invoice No")
3883
- ),
3884
- /* @__PURE__ */ React16.createElement(
3885
- View15,
3886
- {
3887
- style: {
3888
- padding: 6,
3889
- borderRight: "1px solid #000",
3890
- width: "15%"
3891
- }
3892
- },
3893
- /* @__PURE__ */ React16.createElement(Text_default, null, "Amount")
3894
- ),
3895
- /* @__PURE__ */ React16.createElement(
3896
- View15,
3897
- {
3898
- style: {
3899
- padding: 6,
3900
- borderRight: "1px solid #000",
3901
- width: "20%"
3902
- }
3903
- },
3904
- /* @__PURE__ */ React16.createElement(Text_default, null, "Payment Date")
3905
- ),
3906
- /* @__PURE__ */ React16.createElement(
3907
- View15,
3908
- {
3909
- style: {
3910
- padding: 6,
3911
- borderRight: "1px solid #000",
3912
- width: "20%"
3913
- }
3914
- },
3915
- /* @__PURE__ */ React16.createElement(Text_default, null, "Settlement Date")
3916
- ),
3917
- /* @__PURE__ */ React16.createElement(
3918
- View15,
3919
- {
3920
- style: {
3921
- padding: 6,
3922
- // borderRight: "1px solid #000",
3923
- borderRight: "none",
3924
- width: "25%"
3925
- }
3926
- },
3927
- /* @__PURE__ */ React16.createElement(Text_default, null, "Bank UTR No")
3928
- )
3929
- ),
3930
- data.map((item, index) => {
3931
- return /* @__PURE__ */ React16.createElement(
3932
- View15,
3933
- {
3934
- style: {
3935
- display: "flex",
3936
- flexDirection: "row",
3937
- border: "1px solid #000",
3938
- borderTop: "none",
3939
- fontSize: 10
3940
- }
3941
- },
3942
- /* @__PURE__ */ React16.createElement(
3943
- View15,
3944
- {
3945
- style: {
3946
- padding: 6,
3947
- borderRight: "1px solid #000",
3948
- width: "10%"
3949
- }
3950
- },
3951
- /* @__PURE__ */ React16.createElement(Text_default, null, index + 1)
3952
- ),
3953
- /* @__PURE__ */ React16.createElement(
3954
- View15,
3955
- {
3956
- style: {
3957
- padding: 6,
3958
- borderRight: "1px solid #000",
3959
- width: "15%"
3960
- }
3961
- },
3962
- /* @__PURE__ */ React16.createElement(BrokenText_default, null, item.invoiceNo)
3963
- ),
3964
- /* @__PURE__ */ React16.createElement(
3965
- View15,
3966
- {
3967
- style: {
3968
- padding: 6,
3969
- borderRight: "1px solid #000",
3970
- width: "15%"
3971
- }
3972
- },
3973
- /* @__PURE__ */ React16.createElement(BrokenText_default, null, item.amount)
3974
- ),
3975
- /* @__PURE__ */ React16.createElement(
3976
- View15,
3977
- {
3978
- style: {
3979
- padding: 6,
3980
- borderRight: "1px solid #000",
3981
- width: "20%"
3982
- }
3983
- },
3984
- /* @__PURE__ */ React16.createElement(BrokenText_default, null, item.paymentDate)
3985
- ),
3986
- /* @__PURE__ */ React16.createElement(
3987
- View15,
3988
- {
3989
- style: {
3990
- padding: 6,
3991
- borderRight: "1px solid #000",
3992
- width: "20%"
3993
- }
3994
- },
3995
- /* @__PURE__ */ React16.createElement(BrokenText_default, null, item.settlementDate)
3996
- ),
3997
- /* @__PURE__ */ React16.createElement(
3998
- View15,
3999
- {
4000
- style: {
4001
- padding: 6,
4002
- // borderRight: "1px solid #000",
4003
- borderRight: "none",
4004
- width: "25%"
4005
- }
4006
- },
4007
- /* @__PURE__ */ React16.createElement(BrokenText_default, null, item.bankUtrNo)
4008
- )
4009
- );
4010
- })
4011
- ) : /* @__PURE__ */ React16.createElement(
4012
- Text_default,
4013
- {
4014
- style: {
4015
- fontSize: 18,
4016
- textAlign: "center",
4017
- marginTop: 100
4018
- }
4019
- },
4020
- "No data available for the selected date range"
4021
- ))));
4022
- };
4023
- var A4PaymentSettlementReport_default = A4PaymentSettlementReport;
4024
-
4025
- // src/sizes/a4/A4InvoiceLevelBreakup.tsx
4026
- import { Document as Document16, Image as Image15, Page as Page16, View as View16 } from "@react-pdf/renderer";
4027
- import React17 from "react";
4028
- var A4InvoiceLevelBreakup = ({
4029
- startDate,
4030
- endDate,
4031
- templeName,
4032
- data
4033
- }) => {
4034
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Document16, null, /* @__PURE__ */ React17.createElement(Page16, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React17.createElement(
4035
- Image15,
4036
- {
4037
- fixed: true,
4038
- style: {
4039
- height: 15,
4040
- width: 75,
4041
- marginBottom: 10
4042
- },
4043
- src: bmpLogo
4044
- }
4045
- ), /* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Dates: ", startDate.toDateString(), " - ", endDate.toDateString()), /* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Invoice Level Breakup"), /* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React17.createElement(
4046
- View16,
4047
- {
4048
- style: {
4049
- display: "flex",
4050
- flexDirection: "column",
4051
- marginTop: 20
4052
- }
4053
- },
4054
- /* @__PURE__ */ React17.createElement(
4055
- View16,
4056
- {
4057
- style: {
4058
- display: "flex",
4059
- flexDirection: "row",
4060
- border: "1px solid #000",
4061
- fontSize: 8,
4062
- fontWeight: "semibold"
4063
- }
4064
- },
4065
- /* @__PURE__ */ React17.createElement(
4066
- View16,
4067
- {
4068
- style: {
4069
- padding: 3,
4070
- borderRight: "1px solid #000",
4071
- width: "4%"
4072
- }
4073
- },
4074
- /* @__PURE__ */ React17.createElement(Text_default, null, "Sr no")
4075
- ),
4076
- /* @__PURE__ */ React17.createElement(
4077
- View16,
4078
- {
4079
- style: {
4080
- padding: 3,
4081
- borderRight: "1px solid #000",
4082
- width: "9%"
4083
- }
4084
- },
4085
- /* @__PURE__ */ React17.createElement(Text_default, null, "Invoice Number")
4086
- ),
4087
- /* @__PURE__ */ React17.createElement(
4088
- View16,
4089
- {
4090
- style: {
4091
- padding: 3,
4092
- borderRight: "1px solid #000",
4093
- width: "9%"
4094
- }
4095
- },
4096
- /* @__PURE__ */ React17.createElement(Text_default, null, "Base Amount")
4097
- ),
4098
- /* @__PURE__ */ React17.createElement(
4099
- View16,
4100
- {
4101
- style: {
4102
- padding: 3,
4103
- borderRight: "1px solid #000",
4104
- width: "9%"
4105
- }
4106
- },
4107
- /* @__PURE__ */ React17.createElement(Text_default, null, "Platform Fees")
4108
- ),
4109
- /* @__PURE__ */ React17.createElement(
4110
- View16,
4111
- {
4112
- style: {
4113
- padding: 3,
4114
- borderRight: "1px solid #000",
4115
- width: "9%"
4116
- }
4117
- },
4118
- /* @__PURE__ */ React17.createElement(Text_default, null, "Platform Fees GST")
4119
- ),
4120
- /* @__PURE__ */ React17.createElement(
4121
- View16,
4122
- {
4123
- style: {
4124
- padding: 3,
4125
- borderRight: "1px solid #000",
4126
- width: "9%"
4127
- }
4128
- },
4129
- /* @__PURE__ */ React17.createElement(Text_default, null, "Gateway Charges")
4130
- ),
4131
- /* @__PURE__ */ React17.createElement(
4132
- View16,
4133
- {
4134
- style: {
4135
- padding: 3,
4136
- borderRight: "1px solid #000",
4137
- width: "9%"
4138
- }
4139
- },
4140
- /* @__PURE__ */ React17.createElement(Text_default, null, "Gateway GST")
4141
- ),
4142
- /* @__PURE__ */ React17.createElement(
4143
- View16,
4144
- {
4145
- style: {
4146
- padding: 3,
4147
- borderRight: "1px solid #000",
4148
- width: "9%"
4149
- }
4150
- },
4151
- /* @__PURE__ */ React17.createElement(Text_default, null, "Payment Mode")
4152
- ),
4153
- /* @__PURE__ */ React17.createElement(
4154
- View16,
4155
- {
4156
- style: {
4157
- padding: 3,
4158
- borderRight: "1px solid #000",
4159
- width: "9%"
4160
- }
4161
- },
4162
- /* @__PURE__ */ React17.createElement(Text_default, null, "Booking Date")
4163
- ),
4164
- /* @__PURE__ */ React17.createElement(
4165
- View16,
4166
- {
4167
- style: {
4168
- padding: 3,
4169
- borderRight: "1px solid #000",
4170
- width: "9%"
4171
- }
4172
- },
4173
- /* @__PURE__ */ React17.createElement(Text_default, null, "Settlement Date")
4174
- ),
4175
- /* @__PURE__ */ React17.createElement(
4176
- View16,
4177
- {
4178
- style: {
4179
- padding: 3,
4180
- borderRight: "none",
4181
- width: "12%"
4182
- }
4183
- },
4184
- /* @__PURE__ */ React17.createElement(Text_default, null, "UTR Number")
4185
- )
4186
- ),
4187
- data.map((item, index) => {
4188
- return /* @__PURE__ */ React17.createElement(
4189
- View16,
4190
- {
4191
- key: index,
4192
- style: {
4193
- display: "flex",
4194
- flexDirection: "row",
4195
- border: "1px solid #000",
4196
- borderTop: "none",
4197
- fontSize: 8
4198
- }
4199
- },
4200
- /* @__PURE__ */ React17.createElement(
4201
- View16,
4202
- {
4203
- style: {
4204
- padding: 3,
4205
- borderRight: "1px solid #000",
4206
- width: "4%"
4207
- }
4208
- },
4209
- /* @__PURE__ */ React17.createElement(Text_default, null, index + 1)
4210
- ),
4211
- /* @__PURE__ */ React17.createElement(
4212
- View16,
4213
- {
4214
- style: {
4215
- padding: 3,
4216
- borderRight: "1px solid #000",
4217
- width: "9%"
4218
- }
4219
- },
4220
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.invoiceNumber)
4221
- ),
4222
- /* @__PURE__ */ React17.createElement(
4223
- View16,
4224
- {
4225
- style: {
4226
- padding: 3,
4227
- borderRight: "1px solid #000",
4228
- width: "9%"
4229
- }
4230
- },
4231
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.baseAmount)
4232
- ),
4233
- /* @__PURE__ */ React17.createElement(
4234
- View16,
4235
- {
4236
- style: {
4237
- padding: 3,
4238
- borderRight: "1px solid #000",
4239
- width: "9%"
4240
- }
4241
- },
4242
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.platformFees)
4243
- ),
4244
- /* @__PURE__ */ React17.createElement(
4245
- View16,
4246
- {
4247
- style: {
4248
- padding: 3,
4249
- borderRight: "1px solid #000",
4250
- width: "9%"
4251
- }
4252
- },
4253
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.platformFeesGST)
4254
- ),
4255
- /* @__PURE__ */ React17.createElement(
4256
- View16,
4257
- {
4258
- style: {
4259
- padding: 3,
4260
- borderRight: "1px solid #000",
4261
- width: "9%"
4262
- }
4263
- },
4264
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.gatewayCharges)
4265
- ),
4266
- /* @__PURE__ */ React17.createElement(
4267
- View16,
4268
- {
4269
- style: {
4270
- padding: 3,
4271
- borderRight: "1px solid #000",
4272
- width: "9%"
4273
- }
4274
- },
4275
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.gatewayChargesGST)
4276
- ),
4277
- /* @__PURE__ */ React17.createElement(
4278
- View16,
4279
- {
4280
- style: {
4281
- padding: 3,
4282
- borderRight: "1px solid #000",
4283
- width: "9%"
4284
- }
4285
- },
4286
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.paymentMode)
4287
- ),
4288
- /* @__PURE__ */ React17.createElement(
4289
- View16,
4290
- {
4291
- style: {
4292
- padding: 3,
4293
- borderRight: "1px solid #000",
4294
- width: "9%",
4295
- fontSize: 7
4296
- }
4297
- },
4298
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.bookingDate)
4299
- ),
4300
- /* @__PURE__ */ React17.createElement(
4301
- View16,
4302
- {
4303
- style: {
4304
- padding: 3,
4305
- borderRight: "1px solid #000",
4306
- width: "9%",
4307
- fontSize: 7
4308
- }
4309
- },
4310
- /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.settlementDate)
4311
- ),
4312
- /* @__PURE__ */ React17.createElement(View16, { style: { padding: 3, width: "12%" } }, /* @__PURE__ */ React17.createElement(BrokenText_default, null, item.utrNumber))
4313
- );
4314
- })
4315
- ) : /* @__PURE__ */ React17.createElement(
4316
- Text_default,
4317
- {
4318
- style: {
4319
- fontSize: 18,
4320
- textAlign: "center",
4321
- marginTop: 100
4322
- }
4323
- },
4324
- "No data available for the selected date range"
4325
- ))));
4326
- };
4327
- var A4InvoiceLevelBreakup_default = A4InvoiceLevelBreakup;
4328
-
4329
- // src/sizes/a4/A4PujaCountReport.tsx
4330
- import { Document as Document17, Image as Image16, Page as Page17, View as View17 } from "@react-pdf/renderer";
4331
- import React18 from "react";
4332
- var A4PujaCountReport = ({
4333
- startDate,
4334
- endDate,
4335
- templeName,
4336
- data
4337
- }) => {
4338
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(Document17, null, /* @__PURE__ */ React18.createElement(Page17, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React18.createElement(
4339
- Image16,
4340
- {
4341
- fixed: true,
4342
- style: {
4343
- height: 15,
4344
- width: 75,
4345
- marginBottom: 10
4346
- },
4347
- src: bmpLogo
4348
- }
4349
- ), /* @__PURE__ */ React18.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Dates: ", startDate.toDateString(), " - ", endDate.toDateString()), /* @__PURE__ */ React18.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Total Puja Count Report"), /* @__PURE__ */ React18.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`), data.length > 0 ? /* @__PURE__ */ React18.createElement(
4350
- View17,
4351
- {
4352
- style: {
4353
- display: "flex",
4354
- flexDirection: "column",
4355
- marginTop: 20
4356
- }
4357
- },
4358
- /* @__PURE__ */ React18.createElement(
4359
- View17,
4360
- {
4361
- style: {
4362
- display: "flex",
4363
- flexDirection: "row",
4364
- border: "1px solid #000",
4365
- fontSize: 10,
4366
- fontWeight: "semibold"
4367
- }
4368
- },
4369
- /* @__PURE__ */ React18.createElement(
4370
- View17,
4371
- {
4372
- style: {
4373
- padding: 6,
4374
- borderRight: "1px solid #000",
4375
- width: "10%"
4376
- }
4377
- },
4378
- /* @__PURE__ */ React18.createElement(Text_default, null, "Sr no")
4379
- ),
4380
- /* @__PURE__ */ React18.createElement(
4381
- View17,
4382
- {
4383
- style: {
4384
- padding: 6,
4385
- borderRight: "1px solid #000",
4386
- width: "40%"
4387
- }
4388
- },
4389
- /* @__PURE__ */ React18.createElement(Text_default, null, "Puja Name")
4390
- ),
4391
- /* @__PURE__ */ React18.createElement(
4392
- View17,
4393
- {
4394
- style: {
4395
- padding: 6,
4396
- borderRight: "1px solid #000",
4397
- width: "15%"
4398
- }
4399
- },
4400
- /* @__PURE__ */ React18.createElement(Text_default, null, "Total Count")
4401
- ),
4402
- /* @__PURE__ */ React18.createElement(
4403
- View17,
4404
- {
4405
- style: {
4406
- padding: 6,
4407
- borderRight: "none",
4408
- width: "35%"
4409
- }
4410
- },
4411
- /* @__PURE__ */ React18.createElement(Text_default, null, "Remarks")
4412
- )
4413
- ),
4414
- data.map((item, index) => {
4415
- return /* @__PURE__ */ React18.createElement(
4416
- View17,
4417
- {
4418
- style: {
4419
- display: "flex",
4420
- flexDirection: "row",
4421
- border: "1px solid #000",
4422
- borderTop: "none",
4423
- fontSize: 10
4424
- }
4425
- },
4426
- /* @__PURE__ */ React18.createElement(
4427
- View17,
4428
- {
4429
- style: {
4430
- padding: 6,
4431
- borderRight: "1px solid #000",
4432
- width: "10%"
4433
- }
4434
- },
4435
- /* @__PURE__ */ React18.createElement(Text_default, null, index + 1)
4436
- ),
4437
- /* @__PURE__ */ React18.createElement(
4438
- View17,
4439
- {
4440
- style: {
4441
- padding: 6,
4442
- borderRight: "1px solid #000",
4443
- width: "40%"
4444
- }
4445
- },
4446
- /* @__PURE__ */ React18.createElement(Text_default, null, item.name)
4447
- ),
4448
- /* @__PURE__ */ React18.createElement(
4449
- View17,
4450
- {
4451
- style: {
4452
- padding: 6,
4453
- borderRight: "1px solid #000",
4454
- width: "15%"
4455
- }
4456
- },
4457
- /* @__PURE__ */ React18.createElement(Text_default, null, item.quantity)
4458
- ),
4459
- /* @__PURE__ */ React18.createElement(
4460
- View17,
4461
- {
4462
- style: {
4463
- padding: 6,
4464
- borderRight: "none",
4465
- width: "35%"
4466
- }
4467
- }
4468
- )
4469
- );
4470
- })
4471
- ) : /* @__PURE__ */ React18.createElement(
4472
- Text_default,
4473
- {
4474
- style: {
4475
- fontSize: 18,
4476
- textAlign: "center",
4477
- marginTop: 100
4478
- }
4479
- },
4480
- "No data available for the selected date range"
4481
- ))));
4482
- };
4483
- var A4PujaCountReport_default = A4PujaCountReport;
4484
-
4485
- // src/index.tsx
4486
- var options = {
4487
- kitchen: {
4488
- A4: A4KitchenReport_default
4489
- },
4490
- transaction: {
4491
- A4: A4TransactionReport_default
4492
- },
4493
- "prasad-delivery": {
4494
- A4: A4PrasadDelivery_default
4495
- },
4496
- prasad: {
4497
- A4: A4PrasadReport_default
4498
- },
4499
- "puja-detailed": {
4500
- A4: A4PujaList_default
4501
- },
4502
- "puja-summary": {
4503
- A4: A4Summary_default
4504
- },
4505
- "combined-report": {
4506
- A4: A4CombinedReport_default
4507
- },
4508
- "multi-temple-payment": {
4509
- A4: A4MultiTemplePaymentReport_default
4510
- },
4511
- "settlements-report": {
4512
- A4: A4SettlementsReport_default
4513
- },
4514
- "invoice": {
4515
- A4: A4Invoice_default
4516
- },
4517
- "postal-report": {
4518
- A4: A4PostalReport_default
4519
- },
4520
- "payment-settlement-report": {
4521
- A4: A4PaymentSettlementReport_default
4522
- },
4523
- "invoice-breakup": {
4524
- A4: A4InvoiceLevelBreakup_default
4525
- },
4526
- "puja-count": {
4527
- A4: A4PujaCountReport_default
4528
- }
4529
- };
4530
- var reportPrinter = class {
4531
- option;
4532
- size;
4533
- constructor(option, size) {
4534
- this.option = option;
4535
- this.size = size;
4536
- const fontFamilies = [
4537
- {
4538
- family: "Noto Sans SC",
4539
- // Simplified Chinese
4540
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"
4541
- },
4542
- {
4543
- family: "Noto Sans Arabic",
4544
- // arabic , urdu
4545
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"
4546
- },
4547
- {
4548
- family: "Noto Sans Devanagari",
4549
- //hindi
4550
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"
4551
- },
4552
- {
4553
- family: "Noto Sans Kannada",
4554
- //kannada
4555
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"
4556
- },
4557
- {
4558
- family: "Noto Sans Tamil",
4559
- //tamil
4560
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"
4561
- },
4562
- {
4563
- family: "Noto Sans Gurmukhi",
4564
- //punjabi
4565
- src: "https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"
4566
- },
4567
- {
4568
- family: "Noto Sans Lao",
4569
- //lao
4570
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"
4571
- },
4572
- {
4573
- family: "Noto Sans Thai",
4574
- //thai
4575
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"
4576
- },
4577
- {
4578
- family: "Noto Sans Kr",
4579
- //korean
4580
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"
4581
- },
4582
- {
4583
- family: "Noto Sans Bengali",
4584
- //bengali
4585
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"
4586
- },
4587
- {
4588
- family: "Noto Sans Cyrillic",
4589
- //russian
4590
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"
4591
- },
4592
- {
4593
- family: "Noto Sans JP",
4594
- //japanese
4595
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"
4596
- },
4597
- {
4598
- family: "Noto Sans Greek",
4599
- //greek
4600
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"
4601
- },
4602
- {
4603
- family: "Noto Sans Latin",
4604
- //latin
4605
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"
4606
- },
4607
- {
4608
- family: "Noto Sans Myanmar",
4609
- //Myanmar
4610
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"
4611
- },
4612
- {
4613
- family: "Noto Sans Ethiopic",
4614
- //Ethiopic
4615
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"
4616
- },
4617
- {
4618
- family: "Noto Sans Khmer",
4619
- //Khmer
4620
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"
4621
- },
4622
- {
4623
- family: "Noto Sans Armenian",
4624
- //Armenian
4625
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"
4626
- },
4627
- {
4628
- family: "Noto Sans Hebrew",
4629
- //Hebrew
4630
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"
4631
- },
4632
- {
4633
- family: "Noto Sans Georgian",
4634
- //Georgian
4635
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"
4636
- },
4637
- {
4638
- family: "Noto Sans Canadian Aboriginal",
4639
- //Canadian Aboriginal
4640
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"
4641
- },
4642
- {
4643
- family: "Noto Sans Sinhala",
4644
- //Sinhala
4645
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"
4646
- },
4647
- {
4648
- family: "Noto Sans Ol Chiki",
4649
- //Ol Chiki
4650
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"
4651
- },
4652
- {
4653
- family: "Noto Sans Tibetan",
4654
- //Tibetan
4655
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"
4656
- },
4657
- {
4658
- family: "Noto Sans Tifinagh",
4659
- //Tifinagh
4660
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"
4661
- },
4662
- {
4663
- family: "Noto Sans Yi",
4664
- //Yi
4665
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"
4666
- },
4667
- {
4668
- family: "Noto Sans Syriac",
4669
- //Syriac
4670
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"
4671
- },
4672
- {
4673
- family: "Noto Sans Thaana",
4674
- //Thaana
4675
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"
4676
- },
4677
- {
4678
- family: "Noto Sans Vai",
4679
- //Vai
4680
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"
4681
- },
4682
- {
4683
- family: "Noto Sans Cherokee",
4684
- //Cherokee
4685
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"
4686
- },
4687
- {
4688
- family: "Noto Sans Tai Tham",
4689
- //Tai Tham
4690
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"
4691
- },
4692
- {
4693
- family: "Noto Sans Tai Viet",
4694
- //Tai Viet
4695
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"
4696
- },
4697
- {
4698
- family: "Noto Sans Javanese",
4699
- //Javanese
4700
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"
4701
- },
4702
- {
4703
- family: "Noto Sans Gujarati",
4704
- //Gujarati
4705
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"
4706
- },
4707
- {
4708
- family: "Noto Sans Malayalam",
4709
- //Malayalam
4710
- src: "https://res.cloudinary.com/dpaigt2bx/raw/upload/v1748450359/Manjari-Regular_nrgfti.ttf"
4711
- },
4712
- {
4713
- family: "Noto Sans Telugu",
4714
- //Telugu
4715
- src: "https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"
4716
- }
4717
- ];
4718
- fontFamilies.forEach(
4719
- ({ family, src }) => Font5.register({
4720
- family,
4721
- src
4722
- })
4723
- );
4724
- Font5.register({
4725
- family: "Noto Sans",
4726
- fontWeight: "normal",
4727
- src: notoSansRegular
4728
- });
4729
- Font5.register({
4730
- family: "Noto Sans",
4731
- fontWeight: "bold",
4732
- src: notoSansBold
4733
- });
4734
- Font5.register({
4735
- family: "Noto Sans",
4736
- fontWeight: "semibold",
4737
- src: notoSansSemiBold
4738
- });
4739
- }
4740
- async print(data) {
4741
- const ReportComponent = options[this.option][this.size];
4742
- const document = /* @__PURE__ */ React19.createElement(ReportComponent, { ...data });
4743
- const blob = pdf(document).toBlob();
4744
- blob.then((blob2) => {
4745
- var blobURL = URL.createObjectURL(blob2);
4746
- if (window != null) {
4747
- const printWindow = window.open(blobURL, "_blank");
4748
- setTimeout(() => {
4749
- printWindow?.print();
4750
- }, 1e3);
4751
- }
4752
- });
4753
- return blob;
4754
- }
4755
- async getBlob(data) {
4756
- const ReportComponent = options[this.option][this.size];
4757
- const document = /* @__PURE__ */ React19.createElement(ReportComponent, { ...data });
4758
- const blob = pdf(document).toBlob();
4759
- return blob;
4760
- }
4761
- };
4762
- export {
4763
- A4Print_default as A4Print,
4764
- T2Inch_default as T2Inch,
4765
- reportPrinter
4766
- };
1
+ import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import t from'react';import {maxBy}from'lodash';var Ke=Object.defineProperty;var Ue=(r,i,n)=>i in r?Ke(r,i,{enumerable:true,configurable:true,writable:true,value:n}):r[i]=n;var ue=(r,i,n)=>Ue(r,typeof i!="symbol"?i+"":i,n);var M=r=>{typeof r=="string"&&(r=new Date(r));let i={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("en-GB",i).replace(",","")};var Z="https://res.cloudinary.com/dpaigt2bx/image/upload/f_auto,q_auto/v1/General%20BMP%20assets/vkesyodnuxuwevdwrk6m",re="https://res.cloudinary.com/dpaigt2bx/raw/upload/v1742817493/fonts/ntbri6mclms8cfx3dk2e.ttf",ne="https://res.cloudinary.com/dpaigt2bx/raw/upload/v1742817493/fonts/ojiymraiiuw7juzkmmu8.ttf",ge="https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743420993/NotoSans-Regular_pmvebt.ttf",fe="https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743431605/NotoSans-Bold_kagtvd.ttf",ye="https://res.cloudinary.com/dpaigt2bx/raw/upload/v1743431765/NotoSans-SemiBold_o96oas.ttf";var xe="https://res.cloudinary.com/dpaigt2bx/image/upload/v1752653165/BookMyPuja_1_1_bd1xa0.png",De="https://res.cloudinary.com/dpaigt2bx/image/upload/v1752669810/paid-5025785_1280_afg4ob_gcacmg.png",pe={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:re});Font.register({family:"Roboto",fontWeight:"bold",src:ne});var he=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Xe=({data:r,dates:i})=>{let n=M(i[0])===M(i[1]);return t.createElement(Document,null,t.createElement(Page,{size:"A4",style:he.page},t.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Z}),t.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),t.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",n?M(i[0]):`${M(i[0])} - ${M(i[1])}`),t.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},r?r.map((l,a)=>t.createElement(View,{wrap:false,key:a,style:he.pujaTile},t.createElement(View,{style:{display:"flex",flexDirection:"row"}},t.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(a+1).toString().padStart(2,"0"))),t.createElement(View,{style:{flexGrow:1}},t.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},t.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantName),t.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),t.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantNakshatra)),t.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},t.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},t.createElement(Text,null,"Puja name : "),t.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.pujaName)),n?null:t.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},t.createElement(Text,null,"Date: "),t.createElement(Text,{style:{fontWeight:"bold"}},M(l.date)))),t.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?t.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},t.createElement(Text,null,"Priest Note: ",l.priestNote)):null),t.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},t.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",l.amount),l.paymentStatus=="pending"?t.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},t.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},Re=Xe;Font.register({family:"Roboto",fontWeight:"normal",src:re});Font.register({family:"Roboto",fontWeight:"bold",src:ne});var C=1,te=25*C,be=StyleSheet.create({page:{padding:10*C,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*C,paddingHorizontal:10*C,fontSize:te,border:`${5*C}px solid black`,borderRadius:5*C,width:"100%",display:"flex",flexDirection:"column"}}),rt=({data:r,dates:i})=>{let n=M(i[0])===M(i[1]);return t.createElement(Document,null,t.createElement(Page,{dpi:200,size:[457*C],style:be.page},t.createElement(Image,{fixed:true,style:{height:55*C,width:274*C,marginBottom:10*C,marginHorizontal:"auto"},src:Z}),t.createElement(Text,{style:{fontSize:25*C,marginBottom:5*C,marginHorizontal:"auto"}},"Puja List"),t.createElement(Text,{style:{fontSize:20*C,marginBottom:5*C,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",n?M(i[0]):`${M(i[0])} - ${M(i[1])}`),t.createElement(Text,{style:{fontSize:17*C,marginBottom:20*C,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),t.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*C}},r?r.map((l,a)=>t.createElement(View,{wrap:false,key:a,style:be.pujaTile},t.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*C}},t.createElement(Text,{style:{opacity:.6,marginRight:10*C}},"#",(a+1).toString().padStart(2,"0")),t.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*C}},l.paymentStatus=="pending"?t.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*C,paddingHorizontal:5*C,borderRadius:5*C,marginTop:3*C}},t.createElement(Text,{style:{color:"#ffffff",fontSize:te}},"Pending")):null,t.createElement(Text,{style:{fontWeight:"bold",fontSize:te}},"Rs ",l.amount))),t.createElement(View,{style:{flexGrow:1}},t.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*C,gap:3*C}},t.createElement(Text,{style:{fontSize:te,fontWeight:"bold"}},l.participantName),t.createElement(Text,{style:{fontSize:te,fontWeight:"bold"}},"-"),t.createElement(Text,{style:{fontSize:te,fontWeight:"bold"}},l.participantNakshatra)),t.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*C}},t.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},t.createElement(Text,null,"Puja name : "),t.createElement(Text,{style:{fontSize:te,fontWeight:"bold"}},l.pujaName)),n?null:t.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},t.createElement(Text,null,"Date: "),t.createElement(Text,{style:{fontWeight:"bold"}},M(l.date)))),t.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*C}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?t.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*C}},t.createElement(Text,null,"Priest Note: ",l.priestNote)):null))):null)))},nt=rt;var lt={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},dt=({style:r={},children:i})=>{let n=d=>{let y=maxBy(Object.entries(lt),([f,c])=>{let O=d.match(c);return O?O.length:0});return y?y[0]:"Latin"},l=d=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(f=>f.test(d));function a(d){return d.replace(/[\uFF01-\uFF5E]/g,y=>`${String.fromCharCode(y.charCodeAt(0)-65248)} `)}let u=d=>{let y=[],f=null,c="";for(let O of d){O=a(O);let X=n(O);X!==f?(c&&y.push({text:c,script:f}),f=X,c=O):c+=O;}return c&&y.push({text:c,script:f}),y},T=[];i&&typeof i=="string"&&!Array.isArray(i)&&!l(i)&&u(i).forEach((y,f)=>{let c=y.script==="Latin"||!y.script?"Noto Sans":`Noto Sans ${y.script}`;T.push(t.createElement(Text,{key:f,style:{fontFamily:c}},y.text));});let h=[],k={fontFamily:"Noto Sans"};return Array.isArray(r)?h=[...r,k]:r&&Object.keys(r).length>0?h=[r,k]:h=[k],t.createElement(Text,{style:h},T?.length?T:i)},e=dt;var ut=({startDate:r,endDate:i,reportTiming:n,templeName:l,reportName:a})=>t.createElement(t.Fragment,null,t.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Z}),i?t.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",r.toDateString()," - ",i.toDateString()):t.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",r.toDateString()),n&&Object.keys(pe).includes(n)?t.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},pe[n]," Report"):null,t.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},a),t.createElement(e,{style:{fontSize:12}},`${l}`)),S=ut;var gt=({date:r,templeName:i,data:n,reportTiming:l})=>t.createElement(t.Fragment,null,t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,templeName:i,reportTiming:l,reportName:"Temple Prasad (Kitchen) Report"}),n.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},t.createElement(e,null,"Prasad Name")),t.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},t.createElement(e,null,"Quantity"))),n.map((a,u)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(e,null,u+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},t.createElement(e,null,a.name)),t.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},t.createElement(e,null,a.quantity))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Se=gt;var xt=({date:r,templeName:i,data:n})=>{let l=n.reduce((u,T)=>T.status==="cancelled"?u:u+T.bookingAmount,0),a=n.reduce((u,T)=>T.status==="cancelled"?u:u+T.creditedAmount,0);return t.createElement(t.Fragment,null,t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportName:"Transactions Report",templeName:i}),n.length>0?t.createElement(t.Fragment,null,t.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Bookings: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),t.createElement(e,{style:{fontSize:10}},"Total Credited Amount: ",a.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"8%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},t.createElement(e,null,"Date")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},t.createElement(e,null,"Invoice")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},t.createElement(e,null,"Booking Amt")),t.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid black"}},t.createElement(e,null,"Credited Amt")),t.createElement(View,{style:{padding:6,width:"20%"}},t.createElement(e,null,"Transaction ID"))),n.map((u,T)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"8%"}},t.createElement(e,null,T+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},t.createElement(e,null,u.date," ",u.time)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},t.createElement(e,null,u.invoiceNumber)),u.status=="cancelled"?t.createElement(t.Fragment,null,t.createElement(View,{style:{padding:6,width:"50%"}},t.createElement(e,{style:{textAlign:"center"}},"CANCELLED"))):t.createElement(t.Fragment,null,t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},t.createElement(e,null,u.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),t.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid black"}},t.createElement(e,null,u.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),t.createElement(View,{style:{padding:6,width:"20%"}},t.createElement(e,null,u.transactionId))))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Ve=xt;var wt=({date:r,templeName:i,data:n})=>(n=n.map(l=>{let a="";try{let u=JSON.parse(l.address);a=`${u.address}, ${u.locality}, ${u.state} - ${u.pincode}`;}catch(u){console.error("Error parsing address:",u),a=l.address;}return {...l,address:a}}),t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportName:"Prasad Delivery Address",templeName:i}),n.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,"Date")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},t.createElement(e,null,"Invoice")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},t.createElement(e,null,"Devotee Name")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},t.createElement(e,null,"Address")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,"Puja Name")),t.createElement(View,{style:{padding:6,width:"15%"}},t.createElement(e,null,"Amount"))),n.map((l,a)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,new Date(l.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},t.createElement(e,null,l.invoiceNumber)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},t.createElement(e,null,l.devoteeName)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},t.createElement(e,null,l.address)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,l.pujaName)),t.createElement(View,{style:{padding:6,width:"15%"}},t.createElement(e,null,l.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ce=wt;var Ft=({date:r,templeName:i,data:n,reportTiming:l})=>{n.sort((u,T)=>u.invoiceNumber.localeCompare(T.invoiceNumber));return t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportName:"Prasad Report",templeName:i,reportTiming:l}),n.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,"Invoice Number")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},t.createElement(e,null,"Devotee Name")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},t.createElement(e,null,"Prasad Name")),t.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},t.createElement(e,null,"Qty")),t.createElement(View,{style:{padding:6,width:"7%"}},t.createElement(e,null,"Mode"))),n.map((u,T)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,T+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,u.invoiceNumber)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},t.createElement(e,null,u.devoteeName)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},t.createElement(e,null,u.prasadName)),t.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},t.createElement(e,null,u.quantity)),t.createElement(View,{style:{padding:6,width:"7%"}},t.createElement(e,null,u.collectionMode))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ne=Ft;var St=({date:r,templeName:i,pujas:n,reportTiming:l})=>{let a=0,u=0,T=n.some(h=>h.bookings.some(k=>k.requires_coupon));return !n||n.length===0?t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportName:"Puja List",templeName:i,reportTiming:l}),t.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):t.createElement(t.Fragment,null,t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportTiming:l,reportName:"",templeName:""}),n.some(h=>h.bookings.some(k=>k.is_early_reminder))&&t.createElement(t.Fragment,null,t.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),t.createElement(View,{wrap:false,style:{marginTop:10}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Sr No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},t.createElement(e,null,"Puja Name")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Qty")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},t.createElement(e,null,"Date"))))),n.some(h=>h.bookings.some(k=>k.is_early_reminder&&!k.requires_coupon))?n.flatMap((h,k)=>h.bookings.filter(d=>d.is_early_reminder&&!d.requires_coupon).map((d,y)=>(u++,t.createElement(View,{key:`${k}-${y}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,u)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},t.createElement(e,null,h.name)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,d.quantity)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},t.createElement(e,null,d.date?new Date(d.date).toDateString():"")))))):null,t.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),t.createElement(e,{style:{fontSize:12}},`${i}`),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},n.map((h,k)=>h.bookings.every(d=>d.is_early_reminder||d.requires_coupon)?null:(a=0,t.createElement(t.Fragment,null,t.createElement(View,{wrap:false,style:{marginBottom:25}},t.createElement(View,null,t.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${h.name} - ${h.bookings.length}`)),t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Sr No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},t.createElement(e,null,"Invoice No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},t.createElement(e,null,"Devotee Name")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},t.createElement(e,null,"Nakshatra")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Qty"))),h.bookings.map((d,y)=>d.is_early_reminder||d.requires_coupon?null:(a++,t.createElement(t.Fragment,null,t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,a)),t.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},t.createElement(View,{style:{display:"flex",flexDirection:"row"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},t.createElement(e,null,d.invoiceNumber)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${35*1.11111}%`}},t.createElement(e,null,d.devoteeName)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${25*1.11111}%`}},t.createElement(e,null,d.nakshatra)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${10*1.11111}%`}},t.createElement(e,null,d.quantity))),d.priestNote&&t.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},t.createElement(e,null,d.priestNote))))))))))))),T?t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Z}),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let h=n.flatMap(d=>d.bookings.filter(y=>y.requires_coupon).map(y=>({...y,pujaName:d.name}))),k={};for(let d of h)k[d.invoiceNumber]||(k[d.invoiceNumber]=[]),k[d.invoiceNumber].push(d);return Object.entries(k).map(([d,y],f)=>{let c=y,O=c[0];return t.createElement(View,{key:d,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},t.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},t.createElement(e,{style:{fontWeight:"semibold"}},d),t.createElement(e,null,O.date?new Date(O.date).toDateString():r.toDateString())),t.createElement(e,null,O.phone_number)),t.createElement(View,{style:{height:15,width:"100%"}}),c.map((X,ie)=>t.createElement(View,{key:ie,style:{display:"flex",flexDirection:"row",marginTop:25}},t.createElement(e,null,`${X.devoteeName} ----- ${X.nakshatra} ----- ${X.pujaName}`))),t.createElement(View,null,t.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ie=St;var Nt=({templeName:r,date:i,pujas:n,reportTiming:l})=>{let a=n.sort((u,T)=>{let h=u.nakshatras.length;return T.nakshatras.length-h});return t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:i,reportTiming:l,reportName:"Puja Summary",templeName:r}),n.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a.map((u,T)=>t.createElement(t.Fragment,null,t.createElement(View,{wrap:false,style:{marginBottom:25}},t.createElement(View,null,t.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${u.name} - ${u.totalCount}`)),t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},t.createElement(e,null,"Sr No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},t.createElement(e,null,"Nakshatra")),t.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},t.createElement(e,null,"Quantity"))),u.nakshatras.map((h,k)=>t.createElement(t.Fragment,null,t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,k+1)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},t.createElement(e,null,h.name)),t.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},t.createElement(e,null,h.count))))))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Be=Nt;var It=({date:r,templeName:i,pujaData:n,prasadData:l,deliveryData:a,reportTiming:u})=>{a=a.map(d=>{let y="";try{let f=JSON.parse(d.address);y=`${f.address}, ${f.locality}, ${f.state} - ${f.pincode}`;}catch(f){console.error("Error parsing address:",f),y=d.address;}return {...d,address:y}});let T=0,h=0,k=n.some(d=>d.bookings.some(y=>y.requires_coupon));return n.length==0&&l.length==0&&a.length==0?t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportTiming:u,reportName:"Combined Report",templeName:i}),t.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):t.createElement(t.Fragment,null,t.createElement(Document,null,n.length>0&&t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportTiming:u,reportName:"",templeName:""}),n.some(d=>d.bookings.some(y=>y.is_early_reminder))&&t.createElement(t.Fragment,null,t.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),t.createElement(View,{wrap:false,style:{marginTop:10}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Sr No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},t.createElement(e,null,"Puja Name")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Qty")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},t.createElement(e,null,"Date"))))),n.some(d=>d.bookings.some(y=>y.is_early_reminder&&!y.requires_coupon))?n.flatMap((d,y)=>d.bookings.filter(f=>f.is_early_reminder&&!f.requires_coupon).map((f,c)=>(h++,t.createElement(View,{key:`${y}-${c}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,h)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},t.createElement(e,null,d.name)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,f.quantity)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},t.createElement(e,null,f.date?new Date(f.date).toDateString():"")))))):null,t.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),t.createElement(e,{style:{fontSize:12}},`${i}`),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},n.map((d,y)=>d.bookings.every(f=>f.is_early_reminder||f.requires_coupon)?null:(T=0,t.createElement(t.Fragment,null,t.createElement(View,{wrap:false,style:{marginBottom:25}},t.createElement(View,null,t.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.bookings.length}`)),t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Sr No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},t.createElement(e,null,"Invoice No")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},t.createElement(e,null,"Devotee Name")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},t.createElement(e,null,"Nakshatra")),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"10%"}},t.createElement(e,null,"Qty"))),d.bookings.map((f,c)=>f.is_early_reminder||f.requires_coupon?null:(T++,t.createElement(t.Fragment,null,t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,T)),t.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},t.createElement(View,{style:{display:"flex",flexDirection:"row"}},t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},t.createElement(e,null,f.invoiceNumber)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${35*1.11111}%`}},t.createElement(e,null,f.devoteeName)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${25*1.11111}%`}},t.createElement(e,null,f.nakshatra)),t.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${10*1.11111}%`}},t.createElement(e,null,f.quantity))),f.priestNote&&t.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},t.createElement(e,null,f.priestNote))))))))))))),n.length>0&&k&&t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Z}),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let d=n.flatMap(f=>f.bookings.filter(c=>c.requires_coupon).map(c=>({...c,pujaName:f.name}))),y={};for(let f of d)y[f.invoiceNumber]||(y[f.invoiceNumber]=[]),y[f.invoiceNumber].push(f);return Object.entries(y).map(([f,c],O)=>{let X=c,ie=X[0];return t.createElement(View,{key:f,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black"},wrap:false},t.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},t.createElement(e,{style:{fontWeight:"semibold"}},f),t.createElement(e,null,ie.date?new Date(ie.date).toDateString():r.toDateString())),t.createElement(e,null,ie.phone_number)),t.createElement(View,{style:{height:15,width:"100%"}}),X.map((ae,Ge)=>t.createElement(View,{key:Ge,style:{display:"flex",flexDirection:"row",marginTop:25}},t.createElement(e,null,`${ae.devoteeName} ----- ${ae.nakshatra} ----- ${ae.pujaName}`))))})})())),l.length>0&&t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportTiming:u,reportName:"Prasad Report",templeName:i}),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,"Invoice Number")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},t.createElement(e,null,"Devotee Name")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},t.createElement(e,null,"Prasad Name")),t.createElement(View,{style:{padding:6,width:"10%"}},t.createElement(e,null,"Qty"))),l.map((d,y)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,y+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},t.createElement(e,null,d.invoiceNumber)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},t.createElement(e,null,d.devoteeName)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},t.createElement(e,null,d.prasadName)),t.createElement(View,{style:{padding:6,width:"10%"}},t.createElement(e,null,d.quantity)))))),a.length>0&&t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportTiming:u,reportName:"Prasad Delivery Postal Report",templeName:i}),t.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},a&&a.map(d=>t.createElement(View,{key:d.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},t.createElement(View,{style:{flexGrow:1}},t.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},d.name),t.createElement(e,{style:{fontSize:10}},d.address),t.createElement(e,{style:{fontSize:10}},d.phone)),t.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),t.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",d.pujaDetails)))))))},ce=It;var ct=({startDate:r,endDate:i,data:n})=>t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,endDate:i,reportName:"Temple Payment Report",templeName:""}),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,"S.No.")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},t.createElement(e,null,"Temple Name")),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},t.createElement(e,null,"Bookings")),t.createElement(View,{style:{padding:6,width:"20%"}},t.createElement(e,null,"Revenue"))),n?.map((l,a)=>t.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},t.createElement(e,null,a+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},t.createElement(e,null,l.name)),t.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},t.createElement(e,null,l.bookings)),t.createElement(View,{style:{padding:6,width:"20%"}},t.createElement(e,null,"\u20B9",l.revenue))))))),Ee=ct;var vt=({startDate:r,endDate:i,templeName:n,data:l})=>t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,endDate:i,reportName:"Settlements Report",templeName:n}),t.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,"Date")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,"Settlement")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(e,null,"UTR")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},t.createElement(e,null,"Invoice")),t.createElement(View,{style:{padding:6,width:"20%"}},t.createElement(e,null,"Settlement ID"))),l.settlements?.map((a,u)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},t.createElement(e,null,u+1)),t.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},t.createElement(e,null,a.date)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,a.settlement_amount)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},t.createElement(e,null,a.utr.split("").map((T,h)=>t.createElement(e,{key:h},T)))),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},t.createElement(View,{style:{display:"flex",flexDirection:"column"}},a.invoices.map((T,h)=>t.createElement(e,{key:h},T.number," (",T.amount,")")))),t.createElement(View,{style:{padding:6,width:"20%"}},t.createElement(e,null,a.settlement_id))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),ze=vt;var Lt=({data:r})=>t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(View,{style:{display:"flex",flexDirection:"row"}},t.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),t.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0}},t.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},r.templeName),t.createElement(e,{style:{fontSize:10}},r.templeAddress),t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},t.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),t.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:xe})))),t.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},r.status==="confirmed"?t.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:De}):null,t.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",r.invoiceNumber),t.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",r.status=="confirmed"?"PAID":"PENDING")),t.createElement(View,{style:{marginTop:10}},t.createElement(e,{style:{fontSize:11}},"Bill to:"),t.createElement(e,{style:{fontSize:11}},r.devoteeDetails.name),r.devoteeDetails.phone?t.createElement(e,{style:{fontSize:11}},r.devoteeDetails.phone):null,t.createElement(e,{style:{fontSize:11}},r.bookingDate)),t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},t.createElement(e,null,"Item Description")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},t.createElement(e,null,"Price")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},t.createElement(e,null,"Quantity")),t.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},t.createElement(e,null,"Total"))),r.items.map((i,n)=>t.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},i.pujaName?t.createElement(e,{style:{fontSize:11}},i.pujaName):null,i.devoteesName?t.createElement(e,{style:{fontSize:9,color:"#333333"}},i.devoteesName):null,i.pujaDate?t.createElement(e,{style:{fontSize:9,color:"#333333"}},i.pujaDate," ",i.timing?`- ${i.timing}`:null):null,i.repeatEndDate&&i.repeatStartDate?t.createElement(e,{style:{fontSize:9,color:"#333333"}},i.repeatStartDate," to ",i.repeatEndDate," ",i.timing?`- ${i.timing}`:null):null),t.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(e,{style:{}},i.basePujPrice)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(e,{style:{}},`${i.quantity?i.quantity:""}${i.repeatCount?` x ${i.repeatCount}`:""}`)),t.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(e,{style:{}},i.totalPrice))))),t.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:40,marginHorizontal:20}},t.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},t.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),t.createElement(e,null,r.paymentMethod)),t.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},t.createElement(View,{style:{width:"50%",textAlign:"right"}},t.createElement(e,null,"Subtotal: ")),t.createElement(View,{style:{width:"30%",textAlign:"right"}},t.createElement(e,null,r.subTotal))),r.postalCharges?t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},t.createElement(View,{style:{width:"70%",textAlign:"right"}},t.createElement(e,null,"Postal Charges: ")),t.createElement(View,{style:{width:"30%",textAlign:"right"}},t.createElement(e,null,r.postalCharges))):null,t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},t.createElement(View,{style:{width:"70%",textAlign:"right"}},t.createElement(e,null,"Payment Gateway Charges: ")),t.createElement(View,{style:{width:"30%",textAlign:"right"}},t.createElement(e,null,r.paymentGatewayCharges))),t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},t.createElement(View,{style:{width:"70%",textAlign:"right"}},t.createElement(e,null,"Platform Charges: ")),t.createElement(View,{style:{width:"30%",textAlign:"right"}},t.createElement(e,null,r.platformCharges))),t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},t.createElement(View,{style:{width:"70%",textAlign:"right"}},t.createElement(e,null,"GST (18%): ")),t.createElement(View,{style:{width:"30%",textAlign:"right"}},t.createElement(e,null,r.gst))),t.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),t.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},t.createElement(View,{style:{width:"70%",textAlign:"right"}},t.createElement(e,null,"Total: ")),t.createElement(View,{style:{width:"30%",textAlign:"right"}},t.createElement(e,null,r.totalAmount))))),r.prasads&&(r.prasads.morning.length>0||r.prasads.afternoon.length>0||r.prasads.evening.length>0)?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginBottom:30}},t.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},t.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),r.prasads.morning.length>0?t.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},t.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),r.prasads.morning.map((i,n)=>t.createElement(e,{key:n,style:{fontSize:10}},n+1,". ",i.name," (",i.timings,")"))):null,r.prasads.afternoon.length>0?t.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},t.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),r.prasads.afternoon.map((i,n)=>t.createElement(e,{key:n,style:{fontSize:10}},n+1,". ",i.name," (",i.timings,")"))):null,r.prasads.evening.length>0?t.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},t.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),r.prasads.evening.map((i,n)=>t.createElement(e,{key:n,style:{fontSize:10}},n+1,". ",i.name," (",i.timings,")"))):null):null,r.instructions.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},t.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},t.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),t.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},r.instructions.map((i,n)=>t.createElement(e,{key:n,style:{fontSize:8}},n+1,") ",i.instruction)))):null,t.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},t.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),t.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),je=Lt;var Mt=({date:r,templeName:i,data:n})=>t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,reportName:"Prasad Delivery Postal Report",templeName:i}),n&&n.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},n.map(l=>t.createElement(View,{key:l.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},t.createElement(View,{style:{flexGrow:1}},t.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.name),t.createElement(e,{style:{fontSize:10}},l.address),t.createElement(e,{style:{fontSize:10}},l.phone)),t.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),t.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",l.pujaDetails)))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),We=Mt;var Ot=({children:r})=>!r||typeof r!="string"?null:t.createElement(t.Fragment,null,t.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},r.split("").map((i,n)=>t.createElement(e,{key:n},i)))),v=Ot;var Kt=({startDate:r,endDate:i,templeName:n,data:l})=>t.createElement(t.Fragment,null,t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,endDate:i,reportName:"Payment Settlement Report",templeName:n}),l.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,"Invoice No")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,"Amount")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(e,null,"Payment Date")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(e,null,"Settlement Date")),t.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},t.createElement(e,null,"Bank UTR No"))),l.map((a,u)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},t.createElement(e,null,u+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(v,null,a.invoiceNo)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(v,null,a.amount)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(v,null,a.paymentDate)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},t.createElement(v,null,a.settlementDate)),t.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},t.createElement(v,null,a.bankUtrNo))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Le=Kt;var Jt=({startDate:r,endDate:i,templeName:n,data:l})=>t.createElement(t.Fragment,null,t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,endDate:i,reportName:"Invoice Level Breakup",templeName:n}),l.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Invoice Number")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Base Amount")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Platform Fees")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Platform Fees GST")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Gateway Charges")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Gateway GST")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Payment Mode")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Booking Date")),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(e,null,"Settlement Date")),t.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},t.createElement(e,null,"UTR Number"))),l.map((a,u)=>t.createElement(View,{key:u,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},t.createElement(e,null,u+1)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.invoiceNumber)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.baseAmount)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.platformFees)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.platformFeesGST)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.gatewayCharges)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.gatewayChargesGST)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},t.createElement(v,null,a.paymentMode)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},t.createElement(v,null,a.bookingDate)),t.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},t.createElement(v,null,a.settlementDate)),t.createElement(View,{style:{padding:3,width:"12%"}},t.createElement(v,null,a.utrNumber))))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),_e=Jt;var Xt=({startDate:r,endDate:i,templeName:n,data:l})=>t.createElement(t.Fragment,null,t.createElement(Document,null,t.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},t.createElement(S,{startDate:r,endDate:i,reportName:"Total Puja Count Report",templeName:n}),l.length>0?t.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},t.createElement(e,null,"Sr no")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},t.createElement(e,null,"Puja Name")),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,"Total Count")),t.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},t.createElement(e,null,"Remarks"))),l.map((a,u)=>t.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},t.createElement(e,null,u+1)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},t.createElement(e,null,a.name)),t.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},t.createElement(e,null,a.quantity)),t.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}})))):t.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),$e=Xt;var Oe={kitchen:{A4:Se},transaction:{A4:Ve},"prasad-delivery":{A4:Ce},prasad:{A4:Ne},"puja-detailed":{A4:Ie},"puja-summary":{A4:Be},"combined-report":{A4:ce},"multi-temple-payment":{A4:Ee},"settlements-report":{A4:ze},invoice:{A4:je},"postal-report":{A4:We},"payment-settlement-report":{A4:Le},"invoice-breakup":{A4:_e},"puja-count":{A4:$e}},He=class{constructor(i,n){ue(this,"option");ue(this,"size");this.option=i,this.size=n,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dpaigt2bx/raw/upload/v1748450359/Manjari-Regular_nrgfti.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:a,src:u})=>Font.register({family:a,src:u})),Font.register({family:"Noto Sans",fontWeight:"normal",src:ge}),Font.register({family:"Noto Sans",fontWeight:"bold",src:fe}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:ye});}async print(i){let n=Oe[this.option][this.size],l=t.createElement(n,{...i}),a=pdf(l).toBlob();return a.then(u=>{var T=URL.createObjectURL(u);if(window!=null){let h=window.open(T,"_blank");setTimeout(()=>{h?.print();},1e3);}}),a}async getBlob(i){let n=Oe[this.option][this.size],l=t.createElement(n,{...i});return pdf(l).toBlob()}};
2
+ export{Re as A4Print,nt as T2Inch,He as reportPrinter};