@bookmypuja-tech/bmp-pdf 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -708,9 +708,15 @@ var A4TransactionReport = ({
|
|
|
708
708
|
data
|
|
709
709
|
}) => {
|
|
710
710
|
const totalAmount = data.reduce((acc, item) => {
|
|
711
|
+
if (item.status === "cancelled") {
|
|
712
|
+
return acc;
|
|
713
|
+
}
|
|
711
714
|
return acc + item.bookingAmount;
|
|
712
715
|
}, 0);
|
|
713
716
|
const totalCreditedAmount = data.reduce((acc, item) => {
|
|
717
|
+
if (item.status === "cancelled") {
|
|
718
|
+
return acc;
|
|
719
|
+
}
|
|
714
720
|
return acc + item.creditedAmount;
|
|
715
721
|
}, 0);
|
|
716
722
|
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Document4, null, /* @__PURE__ */ React8.createElement(Page4, { size: "A4", style: { padding: 30, fontFamily: "Noto Sans" } }, /* @__PURE__ */ React8.createElement(
|
|
@@ -874,7 +880,25 @@ var A4TransactionReport = ({
|
|
|
874
880
|
},
|
|
875
881
|
/* @__PURE__ */ React8.createElement(Text8, null, item.invoiceNumber)
|
|
876
882
|
),
|
|
877
|
-
/* @__PURE__ */ React8.createElement(
|
|
883
|
+
item.status == "cancelled" ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
884
|
+
View4,
|
|
885
|
+
{
|
|
886
|
+
style: {
|
|
887
|
+
padding: 6,
|
|
888
|
+
// borderRight: "1px solid black",
|
|
889
|
+
width: "40%"
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
/* @__PURE__ */ React8.createElement(
|
|
893
|
+
Text8,
|
|
894
|
+
{
|
|
895
|
+
style: {
|
|
896
|
+
textAlign: "center"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"CANCELLED"
|
|
900
|
+
)
|
|
901
|
+
)) : /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
878
902
|
View4,
|
|
879
903
|
{
|
|
880
904
|
style: {
|
|
@@ -888,8 +912,7 @@ var A4TransactionReport = ({
|
|
|
888
912
|
style: "currency",
|
|
889
913
|
currency: "INR"
|
|
890
914
|
}))
|
|
891
|
-
),
|
|
892
|
-
/* @__PURE__ */ React8.createElement(
|
|
915
|
+
), /* @__PURE__ */ React8.createElement(
|
|
893
916
|
View4,
|
|
894
917
|
{
|
|
895
918
|
style: {
|
|
@@ -902,7 +925,7 @@ var A4TransactionReport = ({
|
|
|
902
925
|
style: "currency",
|
|
903
926
|
currency: "INR"
|
|
904
927
|
}))
|
|
905
|
-
)
|
|
928
|
+
))
|
|
906
929
|
);
|
|
907
930
|
})
|
|
908
931
|
))));
|
|
@@ -1448,7 +1471,7 @@ var A4PujaList = ({
|
|
|
1448
1471
|
}
|
|
1449
1472
|
},
|
|
1450
1473
|
pujas.map((puja, pujaIndex) => {
|
|
1451
|
-
if (puja.bookings.
|
|
1474
|
+
if (puja.bookings.every((booking) => booking.is_early_reminder))
|
|
1452
1475
|
return null;
|
|
1453
1476
|
serialOfNormalPujas = 0;
|
|
1454
1477
|
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(View7, { wrap: false, style: { marginBottom: 25 } }, /* @__PURE__ */ React11.createElement(View7, null, /* @__PURE__ */ React11.createElement(
|
|
@@ -1541,6 +1564,7 @@ var A4PujaList = ({
|
|
|
1541
1564
|
/* @__PURE__ */ React11.createElement(Text11, null, "Qty")
|
|
1542
1565
|
)
|
|
1543
1566
|
), puja.bookings.map((booking, bookingIndex) => {
|
|
1567
|
+
if (booking.is_early_reminder) return null;
|
|
1544
1568
|
serialOfNormalPujas++;
|
|
1545
1569
|
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
1546
1570
|
View7,
|
|
@@ -1821,7 +1845,7 @@ var A4Summary = ({
|
|
|
1821
1845
|
var A4Summary_default = A4Summary;
|
|
1822
1846
|
|
|
1823
1847
|
// src/index.tsx
|
|
1824
|
-
import { Font as
|
|
1848
|
+
import { Font as Font4 } from "@react-pdf/renderer";
|
|
1825
1849
|
|
|
1826
1850
|
// src/sizes/a4/A4CombinedReport.tsx
|
|
1827
1851
|
import { Document as Document9, Image as Image11, Page as Page9, Text as Text13, View as View9 } from "@react-pdf/renderer";
|
|
@@ -2617,17 +2641,17 @@ var reportPrinter = class {
|
|
|
2617
2641
|
constructor(option, size) {
|
|
2618
2642
|
this.option = option;
|
|
2619
2643
|
this.size = size;
|
|
2620
|
-
|
|
2644
|
+
Font4.register({
|
|
2621
2645
|
family: "Noto Sans",
|
|
2622
2646
|
fontWeight: "normal",
|
|
2623
2647
|
src: notoSansRegular
|
|
2624
2648
|
});
|
|
2625
|
-
|
|
2649
|
+
Font4.register({
|
|
2626
2650
|
family: "Noto Sans",
|
|
2627
2651
|
fontWeight: "bold",
|
|
2628
2652
|
src: notoSansBold
|
|
2629
2653
|
});
|
|
2630
|
-
|
|
2654
|
+
Font4.register({
|
|
2631
2655
|
family: "Noto Sans",
|
|
2632
2656
|
fontWeight: "semibold",
|
|
2633
2657
|
src: notoSansSemiBold
|
package/package.json
CHANGED