@bookmypuja-tech/bmp-pdf 0.3.2 → 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 +51 -2
- package/dist/index.js +716 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -171,6 +171,53 @@ interface IMultiTemplePaymentReport {
|
|
|
171
171
|
data: ITempleData[];
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
interface ISettlementRow {
|
|
175
|
+
srNo: number;
|
|
176
|
+
settlement_amount: string;
|
|
177
|
+
utr: string;
|
|
178
|
+
invoices: {
|
|
179
|
+
number: string;
|
|
180
|
+
amount: string;
|
|
181
|
+
}[];
|
|
182
|
+
transaction_id: string;
|
|
183
|
+
remarks: string;
|
|
184
|
+
}
|
|
185
|
+
interface ISettlementsReport {
|
|
186
|
+
startDate: Date;
|
|
187
|
+
endDate: Date;
|
|
188
|
+
templeName: string;
|
|
189
|
+
settlements: ISettlementRow[];
|
|
190
|
+
}
|
|
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
|
+
|
|
174
221
|
type sizeOptions = "A4" | "2Inch";
|
|
175
222
|
declare const getPrintBlob: ({ size, data, dates, }: {
|
|
176
223
|
size: sizeOptions;
|
|
@@ -182,7 +229,7 @@ declare const printDevoteeReceipt2Inch: (data: IPujaReceipt) => Promise<void>;
|
|
|
182
229
|
declare const printTotalReceipt2Inch: (data: ITotalReceipt) => Promise<void>;
|
|
183
230
|
declare const printePujaReport2Inch: (data: IPujaReport) => Promise<void>;
|
|
184
231
|
declare const printQuickPrintReceipt2Inch: (data: IQuickReport) => Promise<void>;
|
|
185
|
-
type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja-detailed" | "puja-summary" | "combined-report" | "multi-temple-payment";
|
|
232
|
+
type IReportOptions = "kitchen" | "transaction" | "prasad-delivery" | "prasad" | "puja-detailed" | "puja-summary" | "combined-report" | "multi-temple-payment" | "settlements-report" | "invoice";
|
|
186
233
|
type IReportSize = "A4";
|
|
187
234
|
type ReportDataTypes = {
|
|
188
235
|
kitchen: KitchenReportProps;
|
|
@@ -193,6 +240,8 @@ type ReportDataTypes = {
|
|
|
193
240
|
"puja-summary": ISummaryPujaList;
|
|
194
241
|
"combined-report": CombinedReportData;
|
|
195
242
|
"multi-temple-payment": IMultiTemplePaymentReport;
|
|
243
|
+
"settlements-report": ISettlementsReport;
|
|
244
|
+
"invoice": IInvoiceData;
|
|
196
245
|
};
|
|
197
246
|
declare class reportPrinter<T extends IReportOptions> {
|
|
198
247
|
option: T;
|
|
@@ -202,4 +251,4 @@ declare class reportPrinter<T extends IReportOptions> {
|
|
|
202
251
|
getBlob(data: ReportDataTypes[T]): Promise<Blob>;
|
|
203
252
|
}
|
|
204
253
|
|
|
205
|
-
export { A4Print, type KitchenReportProps as IKitchenReport, type IMultiTemplePaymentReport, type IPrasadDelivery, type IPrasadReport, type IPrintablePuja, type IPujaReceipt, type IPujaList as IPujaReport, type ISummaryPujaList as ISummaryPujaReport, type ITransactionReport, T2Inch, getA4SummaryBlob, getPrintBlob, printDevoteeReceipt2Inch, printQuickPrintReceipt2Inch, printTotalReceipt2Inch, printePujaReport2Inch, reportPrinter };
|
|
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";
|
|
@@ -2817,6 +2817,710 @@ var A4MultiTemplePaymentReport = ({
|
|
|
2817
2817
|
};
|
|
2818
2818
|
var A4MultiTemplePaymentReport_default = A4MultiTemplePaymentReport;
|
|
2819
2819
|
|
|
2820
|
+
// src/sizes/a4/A4SettlementsReport.tsx
|
|
2821
|
+
import React16 from "react";
|
|
2822
|
+
import { Page as Page12, Document as Document12, Image as Image13, View as View11 } from "@react-pdf/renderer";
|
|
2823
|
+
var A4SettlementsReport = ({
|
|
2824
|
+
startDate,
|
|
2825
|
+
endDate,
|
|
2826
|
+
templeName,
|
|
2827
|
+
settlements
|
|
2828
|
+
}) => {
|
|
2829
|
+
return /* @__PURE__ */ React16.createElement(Document12, null, /* @__PURE__ */ React16.createElement(
|
|
2830
|
+
Page12,
|
|
2831
|
+
{
|
|
2832
|
+
size: "A4",
|
|
2833
|
+
style: {
|
|
2834
|
+
padding: 30,
|
|
2835
|
+
fontFamily: "Noto Sans"
|
|
2836
|
+
}
|
|
2837
|
+
},
|
|
2838
|
+
/* @__PURE__ */ React16.createElement(
|
|
2839
|
+
Image13,
|
|
2840
|
+
{
|
|
2841
|
+
fixed: true,
|
|
2842
|
+
style: {
|
|
2843
|
+
height: 15,
|
|
2844
|
+
width: 75,
|
|
2845
|
+
marginBottom: 10
|
|
2846
|
+
},
|
|
2847
|
+
src: bmpLogo
|
|
2848
|
+
}
|
|
2849
|
+
),
|
|
2850
|
+
/* @__PURE__ */ React16.createElement(Text_default, { style: { fontSize: 11, marginTop: 5, textAlign: "right" } }, "Dates: ", startDate.toDateString(), " - ", endDate.toDateString()),
|
|
2851
|
+
/* @__PURE__ */ React16.createElement(Text_default, { style: { fontSize: 14, fontWeight: "bold" } }, "Settlements Report"),
|
|
2852
|
+
/* @__PURE__ */ React16.createElement(Text_default, { style: { fontSize: 12 } }, `${templeName}`),
|
|
2853
|
+
/* @__PURE__ */ React16.createElement(
|
|
2854
|
+
View11,
|
|
2855
|
+
{
|
|
2856
|
+
style: {
|
|
2857
|
+
display: "flex",
|
|
2858
|
+
flexDirection: "column",
|
|
2859
|
+
marginTop: 20
|
|
2860
|
+
}
|
|
2861
|
+
},
|
|
2862
|
+
/* @__PURE__ */ React16.createElement(
|
|
2863
|
+
View11,
|
|
2864
|
+
{
|
|
2865
|
+
style: {
|
|
2866
|
+
display: "flex",
|
|
2867
|
+
flexDirection: "row",
|
|
2868
|
+
border: "1px solid #000",
|
|
2869
|
+
fontSize: 10,
|
|
2870
|
+
fontWeight: "semibold"
|
|
2871
|
+
}
|
|
2872
|
+
},
|
|
2873
|
+
/* @__PURE__ */ React16.createElement(
|
|
2874
|
+
View11,
|
|
2875
|
+
{
|
|
2876
|
+
style: {
|
|
2877
|
+
padding: 6,
|
|
2878
|
+
borderRight: "1px solid #000",
|
|
2879
|
+
width: "10%"
|
|
2880
|
+
}
|
|
2881
|
+
},
|
|
2882
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, "Sr no")
|
|
2883
|
+
),
|
|
2884
|
+
/* @__PURE__ */ React16.createElement(
|
|
2885
|
+
View11,
|
|
2886
|
+
{
|
|
2887
|
+
style: {
|
|
2888
|
+
padding: 6,
|
|
2889
|
+
borderRight: "1px solid #000",
|
|
2890
|
+
width: "15%"
|
|
2891
|
+
}
|
|
2892
|
+
},
|
|
2893
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, "Settlement")
|
|
2894
|
+
),
|
|
2895
|
+
/* @__PURE__ */ React16.createElement(
|
|
2896
|
+
View11,
|
|
2897
|
+
{
|
|
2898
|
+
style: {
|
|
2899
|
+
padding: 6,
|
|
2900
|
+
borderRight: "1px solid #000",
|
|
2901
|
+
width: "20%"
|
|
2902
|
+
}
|
|
2903
|
+
},
|
|
2904
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, "UTR")
|
|
2905
|
+
),
|
|
2906
|
+
/* @__PURE__ */ React16.createElement(
|
|
2907
|
+
View11,
|
|
2908
|
+
{
|
|
2909
|
+
style: {
|
|
2910
|
+
padding: 6,
|
|
2911
|
+
borderRight: "1px solid #000",
|
|
2912
|
+
width: "25%"
|
|
2913
|
+
}
|
|
2914
|
+
},
|
|
2915
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, "Invoice")
|
|
2916
|
+
),
|
|
2917
|
+
/* @__PURE__ */ React16.createElement(
|
|
2918
|
+
View11,
|
|
2919
|
+
{
|
|
2920
|
+
style: {
|
|
2921
|
+
padding: 6,
|
|
2922
|
+
borderRight: "1px solid #000",
|
|
2923
|
+
width: "20%"
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, "Transaction ID")
|
|
2927
|
+
),
|
|
2928
|
+
/* @__PURE__ */ React16.createElement(
|
|
2929
|
+
View11,
|
|
2930
|
+
{
|
|
2931
|
+
style: {
|
|
2932
|
+
padding: 6,
|
|
2933
|
+
// borderRight: "1px solid #000",
|
|
2934
|
+
width: "15%"
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2937
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, "Remarks")
|
|
2938
|
+
)
|
|
2939
|
+
),
|
|
2940
|
+
settlements?.map((item, index) => {
|
|
2941
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2942
|
+
View11,
|
|
2943
|
+
{
|
|
2944
|
+
style: {
|
|
2945
|
+
display: "flex",
|
|
2946
|
+
flexDirection: "row",
|
|
2947
|
+
border: "1px solid #000",
|
|
2948
|
+
borderTop: "none",
|
|
2949
|
+
fontSize: 10
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
/* @__PURE__ */ React16.createElement(
|
|
2953
|
+
View11,
|
|
2954
|
+
{
|
|
2955
|
+
style: {
|
|
2956
|
+
padding: 6,
|
|
2957
|
+
borderRight: "1px solid #000",
|
|
2958
|
+
width: "10%"
|
|
2959
|
+
}
|
|
2960
|
+
},
|
|
2961
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, index + 1)
|
|
2962
|
+
),
|
|
2963
|
+
/* @__PURE__ */ React16.createElement(
|
|
2964
|
+
View11,
|
|
2965
|
+
{
|
|
2966
|
+
style: {
|
|
2967
|
+
padding: 6,
|
|
2968
|
+
borderRight: "1px solid #000",
|
|
2969
|
+
width: "15%"
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, item.settlement_amount)
|
|
2973
|
+
),
|
|
2974
|
+
/* @__PURE__ */ React16.createElement(
|
|
2975
|
+
View11,
|
|
2976
|
+
{
|
|
2977
|
+
style: {
|
|
2978
|
+
padding: 6,
|
|
2979
|
+
borderRight: "1px solid #000",
|
|
2980
|
+
width: "20%",
|
|
2981
|
+
fontSize: 9
|
|
2982
|
+
}
|
|
2983
|
+
},
|
|
2984
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, item.utr)
|
|
2985
|
+
),
|
|
2986
|
+
/* @__PURE__ */ React16.createElement(
|
|
2987
|
+
View11,
|
|
2988
|
+
{
|
|
2989
|
+
style: {
|
|
2990
|
+
padding: 6,
|
|
2991
|
+
borderRight: "1px solid #000",
|
|
2992
|
+
width: "25%",
|
|
2993
|
+
fontSize: 9
|
|
2994
|
+
}
|
|
2995
|
+
},
|
|
2996
|
+
/* @__PURE__ */ React16.createElement(
|
|
2997
|
+
View11,
|
|
2998
|
+
{
|
|
2999
|
+
style: {
|
|
3000
|
+
display: "flex",
|
|
3001
|
+
flexDirection: "column"
|
|
3002
|
+
}
|
|
3003
|
+
},
|
|
3004
|
+
item.invoices.map((invoice, idx) => /* @__PURE__ */ React16.createElement(Text_default, { key: idx }, invoice.number, " (", invoice.amount, ")"))
|
|
3005
|
+
)
|
|
3006
|
+
),
|
|
3007
|
+
/* @__PURE__ */ React16.createElement(
|
|
3008
|
+
View11,
|
|
3009
|
+
{
|
|
3010
|
+
style: {
|
|
3011
|
+
padding: 6,
|
|
3012
|
+
borderRight: "1px solid #000",
|
|
3013
|
+
width: "20%"
|
|
3014
|
+
}
|
|
3015
|
+
},
|
|
3016
|
+
/* @__PURE__ */ React16.createElement(Text_default, null, item.transaction_id)
|
|
3017
|
+
),
|
|
3018
|
+
/* @__PURE__ */ React16.createElement(View11, { style: { padding: 6, width: "15%", fontSize: 7 } }, /* @__PURE__ */ React16.createElement(Text_default, null, item.remarks))
|
|
3019
|
+
);
|
|
3020
|
+
})
|
|
3021
|
+
)
|
|
3022
|
+
));
|
|
3023
|
+
};
|
|
3024
|
+
var A4SettlementsReport_default = A4SettlementsReport;
|
|
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
|
+
|
|
2820
3524
|
// src/index.tsx
|
|
2821
3525
|
var getPrintBlob = ({
|
|
2822
3526
|
size,
|
|
@@ -2824,15 +3528,15 @@ var getPrintBlob = ({
|
|
|
2824
3528
|
dates
|
|
2825
3529
|
}) => {
|
|
2826
3530
|
if (size === "A4") {
|
|
2827
|
-
const blob = pdf(/* @__PURE__ */
|
|
3531
|
+
const blob = pdf(/* @__PURE__ */ React18.createElement(A4Print_default, { data, dates })).toBlob();
|
|
2828
3532
|
return blob;
|
|
2829
3533
|
} else {
|
|
2830
|
-
const blob = pdf(/* @__PURE__ */
|
|
3534
|
+
const blob = pdf(/* @__PURE__ */ React18.createElement(T2Inch_default, { data, dates })).toBlob();
|
|
2831
3535
|
return blob;
|
|
2832
3536
|
}
|
|
2833
3537
|
};
|
|
2834
3538
|
var getA4SummaryBlob = async () => {
|
|
2835
|
-
const blob = await pdf(/* @__PURE__ */
|
|
3539
|
+
const blob = await pdf(/* @__PURE__ */ React18.createElement(A4Print_default, { data: [], dates: ["", ""] })).toBlob();
|
|
2836
3540
|
return blob;
|
|
2837
3541
|
};
|
|
2838
3542
|
var printDevoteeReceipt2Inch = async (data) => {
|
|
@@ -2883,6 +3587,12 @@ var options = {
|
|
|
2883
3587
|
},
|
|
2884
3588
|
"multi-temple-payment": {
|
|
2885
3589
|
A4: A4MultiTemplePaymentReport_default
|
|
3590
|
+
},
|
|
3591
|
+
"settlements-report": {
|
|
3592
|
+
A4: A4SettlementsReport_default
|
|
3593
|
+
},
|
|
3594
|
+
"invoice": {
|
|
3595
|
+
A4: A4Invoice_default
|
|
2886
3596
|
}
|
|
2887
3597
|
};
|
|
2888
3598
|
var reportPrinter = class {
|
|
@@ -3097,7 +3807,7 @@ var reportPrinter = class {
|
|
|
3097
3807
|
}
|
|
3098
3808
|
async print(data) {
|
|
3099
3809
|
const ReportComponent = options[this.option][this.size];
|
|
3100
|
-
const document = /* @__PURE__ */
|
|
3810
|
+
const document = /* @__PURE__ */ React18.createElement(ReportComponent, { ...data });
|
|
3101
3811
|
const blob = pdf(document).toBlob();
|
|
3102
3812
|
blob.then((blob2) => {
|
|
3103
3813
|
var blobURL = URL.createObjectURL(blob2);
|
|
@@ -3112,7 +3822,7 @@ var reportPrinter = class {
|
|
|
3112
3822
|
}
|
|
3113
3823
|
async getBlob(data) {
|
|
3114
3824
|
const ReportComponent = options[this.option][this.size];
|
|
3115
|
-
const document = /* @__PURE__ */
|
|
3825
|
+
const document = /* @__PURE__ */ React18.createElement(ReportComponent, { ...data });
|
|
3116
3826
|
const blob = pdf(document).toBlob();
|
|
3117
3827
|
return blob;
|
|
3118
3828
|
}
|
package/package.json
CHANGED