warqadui 0.0.285 → 0.0.286
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.js +7 -30
- package/dist/index.mjs +7 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28789,7 +28789,7 @@ var StockLevel = ({
|
|
|
28789
28789
|
className: "text-xs whitespace-nowrap",
|
|
28790
28790
|
render: (row) => {
|
|
28791
28791
|
const yard = row?.yard || 0;
|
|
28792
|
-
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("p", { className: "font-bold text-black dark:text-white print:text-black", children: row.name }) });
|
|
28792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("p", { className: "font-bold uppercase text-black dark:text-white print:text-black", children: row.name }) });
|
|
28793
28793
|
}
|
|
28794
28794
|
},
|
|
28795
28795
|
...!value ? branchNames.map((branchName) => ({
|
|
@@ -28802,7 +28802,7 @@ var StockLevel = ({
|
|
|
28802
28802
|
"div",
|
|
28803
28803
|
{
|
|
28804
28804
|
className: qty > 0 ? "text-green-500 font-bold" : qty < 0 ? "text-red-500 font-bold" : "",
|
|
28805
|
-
children: Formats_default.
|
|
28805
|
+
children: Formats_default.Amount(qty, false)
|
|
28806
28806
|
}
|
|
28807
28807
|
);
|
|
28808
28808
|
}
|
|
@@ -28817,37 +28817,15 @@ var StockLevel = ({
|
|
|
28817
28817
|
"span",
|
|
28818
28818
|
{
|
|
28819
28819
|
className: total > 0 ? "text-green-500 font-bold" : total < 0 ? "text-red-500 font-bold" : "",
|
|
28820
|
-
children: Formats_default.
|
|
28820
|
+
children: Formats_default.Amount(total, false)
|
|
28821
28821
|
}
|
|
28822
28822
|
);
|
|
28823
28823
|
},
|
|
28824
28824
|
renderFooter: (data2) => {
|
|
28825
28825
|
const total = data2.reduce((acc, row) => acc + row.total, 0);
|
|
28826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("span", { className: " font-bold", children: Formats_default.
|
|
28826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("span", { className: " font-bold", children: Formats_default.Amount(total, false) });
|
|
28827
28827
|
}
|
|
28828
28828
|
},
|
|
28829
|
-
...showYard ? [
|
|
28830
|
-
{
|
|
28831
|
-
header: "total Yard",
|
|
28832
|
-
key: "yard",
|
|
28833
|
-
className: "text-xs whitespace-nowrap",
|
|
28834
|
-
render: (row) => {
|
|
28835
|
-
const yard = row?.yard || 0;
|
|
28836
|
-
const totalYard = yard * row.total;
|
|
28837
|
-
return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)("div", { className: "", children: [
|
|
28838
|
-
/* @__PURE__ */ (0, import_jsx_runtime162.jsx)("p", { className: "font-bold text-right text-black dark:text-white print:text-black", children: yard > 0 ? Formats_default.Qty(totalYard) : "" }),
|
|
28839
|
-
/* @__PURE__ */ (0, import_jsx_runtime162.jsx)("p", { className: "text-[10px] text-gray-500 text-right dark:text-gray-400", children: yard > 0 ? `per/ ${Formats_default.Amount(row.totalValue / totalYard, false)}` : "" })
|
|
28840
|
-
] });
|
|
28841
|
-
},
|
|
28842
|
-
renderFooter: (data2) => {
|
|
28843
|
-
const total = data2.reduce(
|
|
28844
|
-
(acc, row) => acc + (row.yard || 0) * row.total,
|
|
28845
|
-
0
|
|
28846
|
-
);
|
|
28847
|
-
return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("p", { className: " font-bold text-right", children: Formats_default.Qty(total) });
|
|
28848
|
-
}
|
|
28849
|
-
}
|
|
28850
|
-
] : [],
|
|
28851
28829
|
...value ? [
|
|
28852
28830
|
{
|
|
28853
28831
|
header: "Cost",
|
|
@@ -45978,7 +45956,6 @@ function SaleStockTable3({
|
|
|
45978
45956
|
adjustmentId
|
|
45979
45957
|
}) {
|
|
45980
45958
|
const { branchId } = useApp_default();
|
|
45981
|
-
const { currencies } = useWarqadConfig();
|
|
45982
45959
|
const { branches } = useAuth_default();
|
|
45983
45960
|
const branchCurrency = (branches || []).find(
|
|
45984
45961
|
(item) => item._id === branchId
|
|
@@ -46205,7 +46182,7 @@ function SaleStockTable3({
|
|
|
46205
46182
|
)
|
|
46206
46183
|
},
|
|
46207
46184
|
cell: ({ row }) => {
|
|
46208
|
-
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { children: Formats_default.
|
|
46185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { children: Formats_default.Amount(row.original?.lineQuantity || 0, false) });
|
|
46209
46186
|
}
|
|
46210
46187
|
},
|
|
46211
46188
|
{
|
|
@@ -46230,7 +46207,7 @@ function SaleStockTable3({
|
|
|
46230
46207
|
)
|
|
46231
46208
|
},
|
|
46232
46209
|
cell: ({ row }) => {
|
|
46233
|
-
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { children: Formats_default.
|
|
46210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { children: Formats_default.Amount(row.original?.lineSell || 0, false) });
|
|
46234
46211
|
}
|
|
46235
46212
|
},
|
|
46236
46213
|
{
|
|
@@ -46256,7 +46233,7 @@ function SaleStockTable3({
|
|
|
46256
46233
|
)
|
|
46257
46234
|
},
|
|
46258
46235
|
cell: ({ row }) => {
|
|
46259
|
-
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { children: Formats_default.Amount(row.original?.lineTotal || 0) });
|
|
46236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)("h2", { children: Formats_default.Amount(row.original?.lineTotal || 0, false) });
|
|
46260
46237
|
},
|
|
46261
46238
|
footer: ({ row }) => {
|
|
46262
46239
|
const total = data?.reduce((acc, row2) => acc + row2.lineTotal, 0);
|
package/dist/index.mjs
CHANGED
|
@@ -28887,7 +28887,7 @@ var StockLevel = ({
|
|
|
28887
28887
|
className: "text-xs whitespace-nowrap",
|
|
28888
28888
|
render: (row) => {
|
|
28889
28889
|
const yard = row?.yard || 0;
|
|
28890
|
-
return /* @__PURE__ */ jsx162("div", { className: "", children: /* @__PURE__ */ jsx162("p", { className: "font-bold text-black dark:text-white print:text-black", children: row.name }) });
|
|
28890
|
+
return /* @__PURE__ */ jsx162("div", { className: "", children: /* @__PURE__ */ jsx162("p", { className: "font-bold uppercase text-black dark:text-white print:text-black", children: row.name }) });
|
|
28891
28891
|
}
|
|
28892
28892
|
},
|
|
28893
28893
|
...!value ? branchNames.map((branchName) => ({
|
|
@@ -28900,7 +28900,7 @@ var StockLevel = ({
|
|
|
28900
28900
|
"div",
|
|
28901
28901
|
{
|
|
28902
28902
|
className: qty > 0 ? "text-green-500 font-bold" : qty < 0 ? "text-red-500 font-bold" : "",
|
|
28903
|
-
children: Formats_default.
|
|
28903
|
+
children: Formats_default.Amount(qty, false)
|
|
28904
28904
|
}
|
|
28905
28905
|
);
|
|
28906
28906
|
}
|
|
@@ -28915,37 +28915,15 @@ var StockLevel = ({
|
|
|
28915
28915
|
"span",
|
|
28916
28916
|
{
|
|
28917
28917
|
className: total > 0 ? "text-green-500 font-bold" : total < 0 ? "text-red-500 font-bold" : "",
|
|
28918
|
-
children: Formats_default.
|
|
28918
|
+
children: Formats_default.Amount(total, false)
|
|
28919
28919
|
}
|
|
28920
28920
|
);
|
|
28921
28921
|
},
|
|
28922
28922
|
renderFooter: (data2) => {
|
|
28923
28923
|
const total = data2.reduce((acc, row) => acc + row.total, 0);
|
|
28924
|
-
return /* @__PURE__ */ jsx162("span", { className: " font-bold", children: Formats_default.
|
|
28924
|
+
return /* @__PURE__ */ jsx162("span", { className: " font-bold", children: Formats_default.Amount(total, false) });
|
|
28925
28925
|
}
|
|
28926
28926
|
},
|
|
28927
|
-
...showYard ? [
|
|
28928
|
-
{
|
|
28929
|
-
header: "total Yard",
|
|
28930
|
-
key: "yard",
|
|
28931
|
-
className: "text-xs whitespace-nowrap",
|
|
28932
|
-
render: (row) => {
|
|
28933
|
-
const yard = row?.yard || 0;
|
|
28934
|
-
const totalYard = yard * row.total;
|
|
28935
|
-
return /* @__PURE__ */ jsxs137("div", { className: "", children: [
|
|
28936
|
-
/* @__PURE__ */ jsx162("p", { className: "font-bold text-right text-black dark:text-white print:text-black", children: yard > 0 ? Formats_default.Qty(totalYard) : "" }),
|
|
28937
|
-
/* @__PURE__ */ jsx162("p", { className: "text-[10px] text-gray-500 text-right dark:text-gray-400", children: yard > 0 ? `per/ ${Formats_default.Amount(row.totalValue / totalYard, false)}` : "" })
|
|
28938
|
-
] });
|
|
28939
|
-
},
|
|
28940
|
-
renderFooter: (data2) => {
|
|
28941
|
-
const total = data2.reduce(
|
|
28942
|
-
(acc, row) => acc + (row.yard || 0) * row.total,
|
|
28943
|
-
0
|
|
28944
|
-
);
|
|
28945
|
-
return /* @__PURE__ */ jsx162("p", { className: " font-bold text-right", children: Formats_default.Qty(total) });
|
|
28946
|
-
}
|
|
28947
|
-
}
|
|
28948
|
-
] : [],
|
|
28949
28927
|
...value ? [
|
|
28950
28928
|
{
|
|
28951
28929
|
header: "Cost",
|
|
@@ -46185,7 +46163,6 @@ function SaleStockTable3({
|
|
|
46185
46163
|
adjustmentId
|
|
46186
46164
|
}) {
|
|
46187
46165
|
const { branchId } = useApp_default();
|
|
46188
|
-
const { currencies } = useWarqadConfig();
|
|
46189
46166
|
const { branches } = useAuth_default();
|
|
46190
46167
|
const branchCurrency = (branches || []).find(
|
|
46191
46168
|
(item) => item._id === branchId
|
|
@@ -46412,7 +46389,7 @@ function SaleStockTable3({
|
|
|
46412
46389
|
)
|
|
46413
46390
|
},
|
|
46414
46391
|
cell: ({ row }) => {
|
|
46415
|
-
return /* @__PURE__ */ jsx255("h2", { children: Formats_default.
|
|
46392
|
+
return /* @__PURE__ */ jsx255("h2", { children: Formats_default.Amount(row.original?.lineQuantity || 0, false) });
|
|
46416
46393
|
}
|
|
46417
46394
|
},
|
|
46418
46395
|
{
|
|
@@ -46437,7 +46414,7 @@ function SaleStockTable3({
|
|
|
46437
46414
|
)
|
|
46438
46415
|
},
|
|
46439
46416
|
cell: ({ row }) => {
|
|
46440
|
-
return /* @__PURE__ */ jsx255("h2", { children: Formats_default.
|
|
46417
|
+
return /* @__PURE__ */ jsx255("h2", { children: Formats_default.Amount(row.original?.lineSell || 0, false) });
|
|
46441
46418
|
}
|
|
46442
46419
|
},
|
|
46443
46420
|
{
|
|
@@ -46463,7 +46440,7 @@ function SaleStockTable3({
|
|
|
46463
46440
|
)
|
|
46464
46441
|
},
|
|
46465
46442
|
cell: ({ row }) => {
|
|
46466
|
-
return /* @__PURE__ */ jsx255("h2", { children: Formats_default.Amount(row.original?.lineTotal || 0) });
|
|
46443
|
+
return /* @__PURE__ */ jsx255("h2", { children: Formats_default.Amount(row.original?.lineTotal || 0, false) });
|
|
46467
46444
|
},
|
|
46468
46445
|
footer: ({ row }) => {
|
|
46469
46446
|
const total = data?.reduce((acc, row2) => acc + row2.lineTotal, 0);
|