@bookmypuja-tech/bmp-pdf 0.2.12 → 0.2.14
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 +27 -4
- 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
|
))));
|
package/package.json
CHANGED