@bookmypuja-tech/bmp-pdf 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +32 -2
- package/dist/index.js +507 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -189,6 +189,35 @@ interface ISettlementsReport {
|
|
|
189
189
|
settlements: ISettlementRow[];
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
interface IInvoiceData {
|
|
193
|
+
templeName: string;
|
|
194
|
+
templeAddress: string;
|
|
195
|
+
invoiceNumber: string;
|
|
196
|
+
status: string;
|
|
197
|
+
devoteeDetails: {
|
|
198
|
+
name: string;
|
|
199
|
+
phone: string;
|
|
200
|
+
};
|
|
201
|
+
bookingDate: string;
|
|
202
|
+
items: {
|
|
203
|
+
pujaId: string;
|
|
204
|
+
pujaName: string;
|
|
205
|
+
devoteesName: string;
|
|
206
|
+
quantity: string;
|
|
207
|
+
repeatCount?: string;
|
|
208
|
+
totalPrice: string;
|
|
209
|
+
basePujPrice: string;
|
|
210
|
+
repeatStartDate?: string;
|
|
211
|
+
repeatEndDate?: string;
|
|
212
|
+
}[];
|
|
213
|
+
platformCharges?: string;
|
|
214
|
+
gst?: string;
|
|
215
|
+
paymentGatewayCharges: string;
|
|
216
|
+
totalAmount: string;
|
|
217
|
+
subTotal: string;
|
|
218
|
+
paymentMethod: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
192
221
|
type sizeOptions = "A4" | "2Inch";
|
|
193
222
|
declare const getPrintBlob: ({ size, data, dates, }: {
|
|
194
223
|
size: sizeOptions;
|
|
@@ -200,7 +229,7 @@ declare const printDevoteeReceipt2Inch: (data: IPujaReceipt) => Promise<void>;
|
|
|
200
229
|
declare const printTotalReceipt2Inch: (data: ITotalReceipt) => Promise<void>;
|
|
201
230
|
declare const printePujaReport2Inch: (data: IPujaReport) => Promise<void>;
|
|
202
231
|
declare const printQuickPrintReceipt2Inch: (data: IQuickReport) => Promise<void>;
|
|
203
|
-
type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja-detailed" | "puja-summary" | "combined-report" | "multi-temple-payment" | "settlements-report";
|
|
232
|
+
type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja-detailed" | "puja-summary" | "combined-report" | "multi-temple-payment" | "settlements-report" | "invoice";
|
|
204
233
|
type IReportSize = "A4";
|
|
205
234
|
type ReportDataTypes = {
|
|
206
235
|
kitchen: KitchenReportProps;
|
|
@@ -212,6 +241,7 @@ type ReportDataTypes = {
|
|
|
212
241
|
"combined-report": CombinedReportData;
|
|
213
242
|
"multi-temple-payment": IMultiTemplePaymentReport;
|
|
214
243
|
"settlements-report": ISettlementsReport;
|
|
244
|
+
"invoice": IInvoiceData;
|
|
215
245
|
};
|
|
216
246
|
declare class reportPrinter<T extends IReportOptions> {
|
|
217
247
|
option: T;
|
|
@@ -221,4 +251,4 @@ declare class reportPrinter<T extends IReportOptions> {
|
|
|
221
251
|
getBlob(data: ReportDataTypes[T]): Promise<Blob>;
|
|
222
252
|
}
|
|
223
253
|
|
|
224
|
-
export { A4Print, type KitchenReportProps as IKitchenReport, type IMultiTemplePaymentReport, type IPrasadDelivery, type IPrasadReport, type IPrintablePuja, type IPujaReceipt, type IPujaList as IPujaReport, type ISettlementRow, type ISettlementsReport, type ISummaryPujaList as ISummaryPujaReport, type ITransactionReport, T2Inch, getA4SummaryBlob, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch, reportPrinter };
|
|
254
|
+
export { A4Print, type IInvoiceData, type KitchenReportProps as IKitchenReport, type IMultiTemplePaymentReport, type IPrasadDelivery, type IPrasadReport, type IPrintablePuja, type IPujaReceipt, type IPujaList as IPujaReport, type ISettlementRow, type ISettlementsReport, type ISummaryPujaList as ISummaryPujaReport, type ITransactionReport, T2Inch, getA4SummaryBlob, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch, reportPrinter };
|
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ var A4Print = ({
|
|
|
216
216
|
var A4Print_default = A4Print;
|
|
217
217
|
|
|
218
218
|
// src/index.tsx
|
|
219
|
-
import
|
|
219
|
+
import React18 from "react";
|
|
220
220
|
|
|
221
221
|
// src/sizes/T2Inch.tsx
|
|
222
222
|
import React2 from "react";
|
|
@@ -3023,6 +3023,504 @@ var A4SettlementsReport = ({
|
|
|
3023
3023
|
};
|
|
3024
3024
|
var A4SettlementsReport_default = A4SettlementsReport;
|
|
3025
3025
|
|
|
3026
|
+
// src/sizes/a4/A4Invoice.tsx
|
|
3027
|
+
import React17 from "react";
|
|
3028
|
+
import { Document as Document13, Image as Image14, Page as Page13, View as View12 } from "@react-pdf/renderer";
|
|
3029
|
+
var A4Invoice = ({ data }) => {
|
|
3030
|
+
return /* @__PURE__ */ React17.createElement(Document13, null, /* @__PURE__ */ React17.createElement(Page13, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React17.createElement(
|
|
3031
|
+
View12,
|
|
3032
|
+
{
|
|
3033
|
+
style: {
|
|
3034
|
+
display: "flex",
|
|
3035
|
+
flexDirection: "row"
|
|
3036
|
+
}
|
|
3037
|
+
},
|
|
3038
|
+
/* @__PURE__ */ React17.createElement(
|
|
3039
|
+
View12,
|
|
3040
|
+
{
|
|
3041
|
+
style: {
|
|
3042
|
+
backgroundColor: "#FFA823",
|
|
3043
|
+
width: 20,
|
|
3044
|
+
height: "100%"
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
),
|
|
3048
|
+
/* @__PURE__ */ React17.createElement(View12, { style: { marginLeft: 15, marginTop: 10, marginBottom: 0 } }, /* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 16, fontWeight: "bold" } }, data.templeName), /* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 10 } }, data.templeAddress), /* @__PURE__ */ React17.createElement(
|
|
3049
|
+
View12,
|
|
3050
|
+
{
|
|
3051
|
+
style: {
|
|
3052
|
+
display: "flex",
|
|
3053
|
+
flexDirection: "row",
|
|
3054
|
+
gap: 5,
|
|
3055
|
+
marginTop: 10
|
|
3056
|
+
}
|
|
3057
|
+
},
|
|
3058
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 10 } }, "Powered by"),
|
|
3059
|
+
/* @__PURE__ */ React17.createElement(
|
|
3060
|
+
Image14,
|
|
3061
|
+
{
|
|
3062
|
+
fixed: true,
|
|
3063
|
+
style: {
|
|
3064
|
+
height: 15,
|
|
3065
|
+
width: 75,
|
|
3066
|
+
marginBottom: 10
|
|
3067
|
+
},
|
|
3068
|
+
src: bmpLogo
|
|
3069
|
+
}
|
|
3070
|
+
)
|
|
3071
|
+
))
|
|
3072
|
+
), /* @__PURE__ */ React17.createElement(
|
|
3073
|
+
View12,
|
|
3074
|
+
{
|
|
3075
|
+
style: {
|
|
3076
|
+
display: "flex",
|
|
3077
|
+
flexDirection: "column",
|
|
3078
|
+
alignItems: "center",
|
|
3079
|
+
marginTop: 20
|
|
3080
|
+
}
|
|
3081
|
+
},
|
|
3082
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 12, marginTop: 5, fontWeight: "semibold" } }, "INVOICE #", data.invoiceNumber),
|
|
3083
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 10, marginTop: 2 } }, "Status: ", data.status == "confirmed" ? "PAID" : "PENDING")
|
|
3084
|
+
), /* @__PURE__ */ React17.createElement(
|
|
3085
|
+
View12,
|
|
3086
|
+
{
|
|
3087
|
+
style: {
|
|
3088
|
+
marginTop: 10
|
|
3089
|
+
}
|
|
3090
|
+
},
|
|
3091
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 11 } }, "Bill to:"),
|
|
3092
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 11 } }, data.devoteeDetails.name),
|
|
3093
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 11 } }, "+", data.devoteeDetails.phone),
|
|
3094
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 11 } }, data.bookingDate)
|
|
3095
|
+
), /* @__PURE__ */ React17.createElement(
|
|
3096
|
+
View12,
|
|
3097
|
+
{
|
|
3098
|
+
style: {
|
|
3099
|
+
display: "flex",
|
|
3100
|
+
flexDirection: "column",
|
|
3101
|
+
marginTop: 20
|
|
3102
|
+
}
|
|
3103
|
+
},
|
|
3104
|
+
/* @__PURE__ */ React17.createElement(
|
|
3105
|
+
View12,
|
|
3106
|
+
{
|
|
3107
|
+
style: {
|
|
3108
|
+
display: "flex",
|
|
3109
|
+
flexDirection: "row",
|
|
3110
|
+
borderBottom: "1px solid #757575",
|
|
3111
|
+
fontSize: 10,
|
|
3112
|
+
fontWeight: "semibold"
|
|
3113
|
+
}
|
|
3114
|
+
},
|
|
3115
|
+
/* @__PURE__ */ React17.createElement(
|
|
3116
|
+
View12,
|
|
3117
|
+
{
|
|
3118
|
+
style: {
|
|
3119
|
+
padding: 6,
|
|
3120
|
+
borderRight: "1px solid #b5b5b5",
|
|
3121
|
+
width: "50%"
|
|
3122
|
+
}
|
|
3123
|
+
},
|
|
3124
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Item Description")
|
|
3125
|
+
),
|
|
3126
|
+
/* @__PURE__ */ React17.createElement(
|
|
3127
|
+
View12,
|
|
3128
|
+
{
|
|
3129
|
+
style: {
|
|
3130
|
+
padding: 6,
|
|
3131
|
+
borderRight: "1px solid #b5b5b5",
|
|
3132
|
+
width: "15%",
|
|
3133
|
+
textAlign: "center"
|
|
3134
|
+
}
|
|
3135
|
+
},
|
|
3136
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Price")
|
|
3137
|
+
),
|
|
3138
|
+
/* @__PURE__ */ React17.createElement(
|
|
3139
|
+
View12,
|
|
3140
|
+
{
|
|
3141
|
+
style: {
|
|
3142
|
+
padding: 6,
|
|
3143
|
+
borderRight: "1px solid #b5b5b5",
|
|
3144
|
+
width: "15%",
|
|
3145
|
+
textAlign: "center"
|
|
3146
|
+
}
|
|
3147
|
+
},
|
|
3148
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Quantity")
|
|
3149
|
+
),
|
|
3150
|
+
/* @__PURE__ */ React17.createElement(
|
|
3151
|
+
View12,
|
|
3152
|
+
{
|
|
3153
|
+
style: {
|
|
3154
|
+
padding: 6,
|
|
3155
|
+
// borderRight: "1px solid #b5b5b5",
|
|
3156
|
+
width: "20%",
|
|
3157
|
+
textAlign: "center"
|
|
3158
|
+
}
|
|
3159
|
+
},
|
|
3160
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Total")
|
|
3161
|
+
)
|
|
3162
|
+
),
|
|
3163
|
+
data.items.map((item, index) => {
|
|
3164
|
+
return /* @__PURE__ */ React17.createElement(
|
|
3165
|
+
View12,
|
|
3166
|
+
{
|
|
3167
|
+
wrap: false,
|
|
3168
|
+
style: {
|
|
3169
|
+
display: "flex",
|
|
3170
|
+
flexDirection: "row",
|
|
3171
|
+
borderBottom: "1px solid #757575",
|
|
3172
|
+
fontSize: 10
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
/* @__PURE__ */ React17.createElement(
|
|
3176
|
+
View12,
|
|
3177
|
+
{
|
|
3178
|
+
style: {
|
|
3179
|
+
padding: 6,
|
|
3180
|
+
borderRight: "1px solid #b5b5b5",
|
|
3181
|
+
width: "50%"
|
|
3182
|
+
}
|
|
3183
|
+
},
|
|
3184
|
+
item.pujaName ? /* @__PURE__ */ React17.createElement(
|
|
3185
|
+
Text_default,
|
|
3186
|
+
{
|
|
3187
|
+
style: {
|
|
3188
|
+
fontSize: 11
|
|
3189
|
+
}
|
|
3190
|
+
},
|
|
3191
|
+
item.pujaName
|
|
3192
|
+
) : null,
|
|
3193
|
+
item.devoteesName ? /* @__PURE__ */ React17.createElement(
|
|
3194
|
+
Text_default,
|
|
3195
|
+
{
|
|
3196
|
+
style: {
|
|
3197
|
+
fontSize: 9,
|
|
3198
|
+
color: "#333333"
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
item.devoteesName
|
|
3202
|
+
) : null,
|
|
3203
|
+
item.repeatEndDate && item.repeatStartDate ? /* @__PURE__ */ React17.createElement(
|
|
3204
|
+
Text_default,
|
|
3205
|
+
{
|
|
3206
|
+
style: {
|
|
3207
|
+
fontSize: 9,
|
|
3208
|
+
color: "#333333"
|
|
3209
|
+
}
|
|
3210
|
+
},
|
|
3211
|
+
item.repeatStartDate,
|
|
3212
|
+
" to ",
|
|
3213
|
+
item.repeatEndDate
|
|
3214
|
+
) : null
|
|
3215
|
+
),
|
|
3216
|
+
/* @__PURE__ */ React17.createElement(
|
|
3217
|
+
View12,
|
|
3218
|
+
{
|
|
3219
|
+
style: {
|
|
3220
|
+
padding: 6,
|
|
3221
|
+
borderRight: "1px solid #b5b5b5",
|
|
3222
|
+
width: "15%",
|
|
3223
|
+
textAlign: "center",
|
|
3224
|
+
display: "flex",
|
|
3225
|
+
alignItems: "center",
|
|
3226
|
+
justifyContent: "center"
|
|
3227
|
+
}
|
|
3228
|
+
},
|
|
3229
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: {} }, item.basePujPrice)
|
|
3230
|
+
),
|
|
3231
|
+
/* @__PURE__ */ React17.createElement(
|
|
3232
|
+
View12,
|
|
3233
|
+
{
|
|
3234
|
+
style: {
|
|
3235
|
+
padding: 6,
|
|
3236
|
+
borderRight: "1px solid #b5b5b5",
|
|
3237
|
+
width: "15%",
|
|
3238
|
+
textAlign: "center",
|
|
3239
|
+
display: "flex",
|
|
3240
|
+
alignItems: "center",
|
|
3241
|
+
justifyContent: "center"
|
|
3242
|
+
}
|
|
3243
|
+
},
|
|
3244
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: {} }, `${item.quantity ? item.quantity : ""}${item.repeatCount ? ` x ${item.repeatCount}` : ""}`)
|
|
3245
|
+
),
|
|
3246
|
+
/* @__PURE__ */ React17.createElement(
|
|
3247
|
+
View12,
|
|
3248
|
+
{
|
|
3249
|
+
style: {
|
|
3250
|
+
padding: 6,
|
|
3251
|
+
width: "20%",
|
|
3252
|
+
textAlign: "center",
|
|
3253
|
+
display: "flex",
|
|
3254
|
+
alignItems: "center",
|
|
3255
|
+
justifyContent: "center"
|
|
3256
|
+
}
|
|
3257
|
+
},
|
|
3258
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: {} }, item.totalPrice)
|
|
3259
|
+
)
|
|
3260
|
+
);
|
|
3261
|
+
})
|
|
3262
|
+
), /* @__PURE__ */ React17.createElement(
|
|
3263
|
+
View12,
|
|
3264
|
+
{
|
|
3265
|
+
style: {
|
|
3266
|
+
display: "flex",
|
|
3267
|
+
flexDirection: "row",
|
|
3268
|
+
marginVertical: 40,
|
|
3269
|
+
marginHorizontal: 20
|
|
3270
|
+
}
|
|
3271
|
+
},
|
|
3272
|
+
/* @__PURE__ */ React17.createElement(
|
|
3273
|
+
View12,
|
|
3274
|
+
{
|
|
3275
|
+
style: {
|
|
3276
|
+
width: "50%",
|
|
3277
|
+
display: "flex",
|
|
3278
|
+
flexDirection: "column",
|
|
3279
|
+
justifyContent: "center",
|
|
3280
|
+
fontSize: 11
|
|
3281
|
+
}
|
|
3282
|
+
},
|
|
3283
|
+
/* @__PURE__ */ React17.createElement(
|
|
3284
|
+
Text_default,
|
|
3285
|
+
{
|
|
3286
|
+
style: {
|
|
3287
|
+
fontWeight: "bold"
|
|
3288
|
+
}
|
|
3289
|
+
},
|
|
3290
|
+
"Payment Method:"
|
|
3291
|
+
),
|
|
3292
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, data.paymentMethod)
|
|
3293
|
+
),
|
|
3294
|
+
/* @__PURE__ */ React17.createElement(
|
|
3295
|
+
View12,
|
|
3296
|
+
{
|
|
3297
|
+
style: {
|
|
3298
|
+
width: "50%",
|
|
3299
|
+
display: "flex",
|
|
3300
|
+
flexDirection: "column",
|
|
3301
|
+
justifyContent: "center",
|
|
3302
|
+
alignItems: "flex-end"
|
|
3303
|
+
}
|
|
3304
|
+
},
|
|
3305
|
+
/* @__PURE__ */ React17.createElement(
|
|
3306
|
+
View12,
|
|
3307
|
+
{
|
|
3308
|
+
style: {
|
|
3309
|
+
display: "flex",
|
|
3310
|
+
flexDirection: "row",
|
|
3311
|
+
gap: 10,
|
|
3312
|
+
fontSize: 10
|
|
3313
|
+
}
|
|
3314
|
+
},
|
|
3315
|
+
/* @__PURE__ */ React17.createElement(
|
|
3316
|
+
View12,
|
|
3317
|
+
{
|
|
3318
|
+
style: {
|
|
3319
|
+
width: "50%",
|
|
3320
|
+
textAlign: "right"
|
|
3321
|
+
}
|
|
3322
|
+
},
|
|
3323
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Subtotal: ")
|
|
3324
|
+
),
|
|
3325
|
+
/* @__PURE__ */ React17.createElement(
|
|
3326
|
+
View12,
|
|
3327
|
+
{
|
|
3328
|
+
style: {
|
|
3329
|
+
width: "30%",
|
|
3330
|
+
textAlign: "right"
|
|
3331
|
+
}
|
|
3332
|
+
},
|
|
3333
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, data.subTotal)
|
|
3334
|
+
)
|
|
3335
|
+
),
|
|
3336
|
+
/* @__PURE__ */ React17.createElement(
|
|
3337
|
+
View12,
|
|
3338
|
+
{
|
|
3339
|
+
style: {
|
|
3340
|
+
display: "flex",
|
|
3341
|
+
flexDirection: "row",
|
|
3342
|
+
gap: 10,
|
|
3343
|
+
fontSize: 10
|
|
3344
|
+
}
|
|
3345
|
+
},
|
|
3346
|
+
/* @__PURE__ */ React17.createElement(
|
|
3347
|
+
View12,
|
|
3348
|
+
{
|
|
3349
|
+
style: {
|
|
3350
|
+
width: "70%",
|
|
3351
|
+
textAlign: "right"
|
|
3352
|
+
}
|
|
3353
|
+
},
|
|
3354
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Payment Gateway Charges: ")
|
|
3355
|
+
),
|
|
3356
|
+
/* @__PURE__ */ React17.createElement(
|
|
3357
|
+
View12,
|
|
3358
|
+
{
|
|
3359
|
+
style: {
|
|
3360
|
+
width: "30%",
|
|
3361
|
+
textAlign: "right"
|
|
3362
|
+
}
|
|
3363
|
+
},
|
|
3364
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, data.paymentGatewayCharges)
|
|
3365
|
+
)
|
|
3366
|
+
),
|
|
3367
|
+
/* @__PURE__ */ React17.createElement(
|
|
3368
|
+
View12,
|
|
3369
|
+
{
|
|
3370
|
+
style: {
|
|
3371
|
+
display: "flex",
|
|
3372
|
+
flexDirection: "row",
|
|
3373
|
+
gap: 10,
|
|
3374
|
+
fontSize: 10
|
|
3375
|
+
}
|
|
3376
|
+
},
|
|
3377
|
+
/* @__PURE__ */ React17.createElement(
|
|
3378
|
+
View12,
|
|
3379
|
+
{
|
|
3380
|
+
style: {
|
|
3381
|
+
width: "70%",
|
|
3382
|
+
textAlign: "right"
|
|
3383
|
+
}
|
|
3384
|
+
},
|
|
3385
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Platform Charges: ")
|
|
3386
|
+
),
|
|
3387
|
+
/* @__PURE__ */ React17.createElement(
|
|
3388
|
+
View12,
|
|
3389
|
+
{
|
|
3390
|
+
style: {
|
|
3391
|
+
width: "30%",
|
|
3392
|
+
textAlign: "right"
|
|
3393
|
+
}
|
|
3394
|
+
},
|
|
3395
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, data.platformCharges)
|
|
3396
|
+
)
|
|
3397
|
+
),
|
|
3398
|
+
/* @__PURE__ */ React17.createElement(
|
|
3399
|
+
View12,
|
|
3400
|
+
{
|
|
3401
|
+
style: {
|
|
3402
|
+
display: "flex",
|
|
3403
|
+
flexDirection: "row",
|
|
3404
|
+
gap: 10,
|
|
3405
|
+
fontSize: 10
|
|
3406
|
+
}
|
|
3407
|
+
},
|
|
3408
|
+
/* @__PURE__ */ React17.createElement(
|
|
3409
|
+
View12,
|
|
3410
|
+
{
|
|
3411
|
+
style: {
|
|
3412
|
+
width: "70%",
|
|
3413
|
+
textAlign: "right"
|
|
3414
|
+
}
|
|
3415
|
+
},
|
|
3416
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "GST (18%): ")
|
|
3417
|
+
),
|
|
3418
|
+
/* @__PURE__ */ React17.createElement(
|
|
3419
|
+
View12,
|
|
3420
|
+
{
|
|
3421
|
+
style: {
|
|
3422
|
+
width: "30%",
|
|
3423
|
+
textAlign: "right"
|
|
3424
|
+
}
|
|
3425
|
+
},
|
|
3426
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, data.gst)
|
|
3427
|
+
)
|
|
3428
|
+
),
|
|
3429
|
+
/* @__PURE__ */ React17.createElement(
|
|
3430
|
+
View12,
|
|
3431
|
+
{
|
|
3432
|
+
style: {
|
|
3433
|
+
width: "60%",
|
|
3434
|
+
height: 1,
|
|
3435
|
+
backgroundColor: "#757575",
|
|
3436
|
+
marginVertical: 5
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
),
|
|
3440
|
+
/* @__PURE__ */ React17.createElement(
|
|
3441
|
+
View12,
|
|
3442
|
+
{
|
|
3443
|
+
style: {
|
|
3444
|
+
display: "flex",
|
|
3445
|
+
flexDirection: "row",
|
|
3446
|
+
gap: 10,
|
|
3447
|
+
fontSize: 10,
|
|
3448
|
+
fontWeight: "bold"
|
|
3449
|
+
}
|
|
3450
|
+
},
|
|
3451
|
+
/* @__PURE__ */ React17.createElement(
|
|
3452
|
+
View12,
|
|
3453
|
+
{
|
|
3454
|
+
style: {
|
|
3455
|
+
width: "70%",
|
|
3456
|
+
textAlign: "right"
|
|
3457
|
+
}
|
|
3458
|
+
},
|
|
3459
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "Total: ")
|
|
3460
|
+
),
|
|
3461
|
+
/* @__PURE__ */ React17.createElement(
|
|
3462
|
+
View12,
|
|
3463
|
+
{
|
|
3464
|
+
style: {
|
|
3465
|
+
width: "30%",
|
|
3466
|
+
textAlign: "right"
|
|
3467
|
+
}
|
|
3468
|
+
},
|
|
3469
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, data.totalAmount)
|
|
3470
|
+
)
|
|
3471
|
+
)
|
|
3472
|
+
)
|
|
3473
|
+
), /* @__PURE__ */ React17.createElement(
|
|
3474
|
+
View12,
|
|
3475
|
+
{
|
|
3476
|
+
style: {
|
|
3477
|
+
display: "flex",
|
|
3478
|
+
flexDirection: "column",
|
|
3479
|
+
marginHorizontal: 20,
|
|
3480
|
+
fontSize: 8,
|
|
3481
|
+
border: "1px solid #757575"
|
|
3482
|
+
}
|
|
3483
|
+
},
|
|
3484
|
+
/* @__PURE__ */ React17.createElement(
|
|
3485
|
+
View12,
|
|
3486
|
+
{
|
|
3487
|
+
style: {
|
|
3488
|
+
backgroundColor: "#FFA823",
|
|
3489
|
+
paddingHorizontal: 10,
|
|
3490
|
+
paddingVertical: 5
|
|
3491
|
+
}
|
|
3492
|
+
},
|
|
3493
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "IMPORTANT INSTRUCTIONS:")
|
|
3494
|
+
),
|
|
3495
|
+
/* @__PURE__ */ React17.createElement(
|
|
3496
|
+
View12,
|
|
3497
|
+
{
|
|
3498
|
+
style: {
|
|
3499
|
+
display: "flex",
|
|
3500
|
+
flexDirection: "column",
|
|
3501
|
+
gap: 5,
|
|
3502
|
+
marginVertical: 10,
|
|
3503
|
+
paddingHorizontal: 10
|
|
3504
|
+
}
|
|
3505
|
+
},
|
|
3506
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "1) Devotees who have booked Special Darshan are required to present the invoice at the temple counter to collect their Special Darshan and Prasadam coupons"),
|
|
3507
|
+
/* @__PURE__ */ React17.createElement(Text_default, null, "2) Prasadam Collection Schedule: Morning Pujas: Sundays, Tuesdays, and Fridays: Collect before 12:00 PM; Mondays, Wednesdays, Thursdays, and Saturdays: Collect before 11:00 AM. Evening Pujas: Collect before 8:00 PM")
|
|
3508
|
+
)
|
|
3509
|
+
), /* @__PURE__ */ React17.createElement(
|
|
3510
|
+
View12,
|
|
3511
|
+
{
|
|
3512
|
+
style: {
|
|
3513
|
+
display: "flex",
|
|
3514
|
+
flexDirection: "row",
|
|
3515
|
+
marginTop: 20
|
|
3516
|
+
}
|
|
3517
|
+
},
|
|
3518
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 8, fontWeight: "bold" } }, "Terms and Conditions:"),
|
|
3519
|
+
/* @__PURE__ */ React17.createElement(Text_default, { style: { fontSize: 8, marginLeft: 5 } }, "https://www.bookmypuja.app/terms-and-condition")
|
|
3520
|
+
)));
|
|
3521
|
+
};
|
|
3522
|
+
var A4Invoice_default = A4Invoice;
|
|
3523
|
+
|
|
3026
3524
|
// src/index.tsx
|
|
3027
3525
|
var getPrintBlob = ({
|
|
3028
3526
|
size,
|
|
@@ -3030,15 +3528,15 @@ var getPrintBlob = ({
|
|
|
3030
3528
|
dates
|
|
3031
3529
|
}) => {
|
|
3032
3530
|
if (size === "A4") {
|
|
3033
|
-
const blob = pdf(/* @__PURE__ */
|
|
3531
|
+
const blob = pdf(/* @__PURE__ */ React18.createElement(A4Print_default, { data, dates })).toBlob();
|
|
3034
3532
|
return blob;
|
|
3035
3533
|
} else {
|
|
3036
|
-
const blob = pdf(/* @__PURE__ */
|
|
3534
|
+
const blob = pdf(/* @__PURE__ */ React18.createElement(T2Inch_default, { data, dates })).toBlob();
|
|
3037
3535
|
return blob;
|
|
3038
3536
|
}
|
|
3039
3537
|
};
|
|
3040
3538
|
var getA4SummaryBlob = async () => {
|
|
3041
|
-
const blob = await pdf(/* @__PURE__ */
|
|
3539
|
+
const blob = await pdf(/* @__PURE__ */ React18.createElement(A4Print_default, { data: [], dates: ["", ""] })).toBlob();
|
|
3042
3540
|
return blob;
|
|
3043
3541
|
};
|
|
3044
3542
|
var printDevoteeReceipt2Inch = async (data) => {
|
|
@@ -3092,6 +3590,9 @@ var options = {
|
|
|
3092
3590
|
},
|
|
3093
3591
|
"settlements-report": {
|
|
3094
3592
|
A4: A4SettlementsReport_default
|
|
3593
|
+
},
|
|
3594
|
+
"invoice": {
|
|
3595
|
+
A4: A4Invoice_default
|
|
3095
3596
|
}
|
|
3096
3597
|
};
|
|
3097
3598
|
var reportPrinter = class {
|
|
@@ -3306,7 +3807,7 @@ var reportPrinter = class {
|
|
|
3306
3807
|
}
|
|
3307
3808
|
async print(data) {
|
|
3308
3809
|
const ReportComponent = options[this.option][this.size];
|
|
3309
|
-
const document = /* @__PURE__ */
|
|
3810
|
+
const document = /* @__PURE__ */ React18.createElement(ReportComponent, { ...data });
|
|
3310
3811
|
const blob = pdf(document).toBlob();
|
|
3311
3812
|
blob.then((blob2) => {
|
|
3312
3813
|
var blobURL = URL.createObjectURL(blob2);
|
|
@@ -3321,7 +3822,7 @@ var reportPrinter = class {
|
|
|
3321
3822
|
}
|
|
3322
3823
|
async getBlob(data) {
|
|
3323
3824
|
const ReportComponent = options[this.option][this.size];
|
|
3324
|
-
const document = /* @__PURE__ */
|
|
3825
|
+
const document = /* @__PURE__ */ React18.createElement(ReportComponent, { ...data });
|
|
3325
3826
|
const blob = pdf(document).toBlob();
|
|
3326
3827
|
return blob;
|
|
3327
3828
|
}
|
package/package.json
CHANGED