@fayz-ai/plugin-financial 0.29.1 → 0.29.3
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/{FinancialPage-BFC3K4WY.js → FinancialPage-LCKLEAM3.js} +27 -7
- package/dist/FinancialPage-LCKLEAM3.js.map +1 -0
- package/dist/components/ChartOfAccountsTree.d.ts.map +1 -1
- package/dist/index.js +251 -355
- package/dist/index.js.map +1 -1
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/views/InvoiceListView.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/FinancialPage-BFC3K4WY.js.map +0 -1
|
@@ -1122,7 +1122,9 @@ function InvoiceListView({ direction, onNew, onNewReceipt, onEdit }) {
|
|
|
1122
1122
|
costCenterId: "",
|
|
1123
1123
|
from: mesCorrente.from,
|
|
1124
1124
|
to: mesCorrente.to,
|
|
1125
|
-
preset: "custom"
|
|
1125
|
+
preset: "custom",
|
|
1126
|
+
/** Also list what fell due before the window and is still unpaid. Off: the period is the period. */
|
|
1127
|
+
overdue: false
|
|
1126
1128
|
},
|
|
1127
1129
|
{ persistKey: `financial.invoices.${direction}`, persistExclude: ["preset"] }
|
|
1128
1130
|
);
|
|
@@ -1216,7 +1218,7 @@ function InvoiceListView({ direction, onNew, onNewReceipt, onEdit }) {
|
|
|
1216
1218
|
// default month view hid every overdue line and people took them for lost.
|
|
1217
1219
|
// A window entirely in the past or future is a deliberate look at that
|
|
1218
1220
|
// period, and stays exactly that period.
|
|
1219
|
-
includeOverdue: windowReachesToday(emVigor.from, emVigor.to) || void 0
|
|
1221
|
+
includeOverdue: emVigor.overdue && windowReachesToday(emVigor.from, emVigor.to) || void 0
|
|
1220
1222
|
}), [direction, emVigor, search, effectiveUnitId, page, pageSize]);
|
|
1221
1223
|
useEffect(() => {
|
|
1222
1224
|
fetchInvoices(query);
|
|
@@ -1252,10 +1254,16 @@ function InvoiceListView({ direction, onNew, onNewReceipt, onEdit }) {
|
|
|
1252
1254
|
);
|
|
1253
1255
|
const summaries = useMemo(() => {
|
|
1254
1256
|
if (invoicesTotals) {
|
|
1255
|
-
|
|
1257
|
+
const merged = /* @__PURE__ */ new Map();
|
|
1258
|
+
for (const sum of invoicesTotals) {
|
|
1256
1259
|
const cur = resolveCurrency(currency, sum.currency);
|
|
1257
|
-
|
|
1258
|
-
|
|
1260
|
+
const row = merged.get(cur.code) ?? { currency: cur, totalAmount: 0, paidAmount: 0, openAmount: 0 };
|
|
1261
|
+
row.totalAmount += sum.total;
|
|
1262
|
+
row.paidAmount += sum.paid;
|
|
1263
|
+
row.openAmount = row.totalAmount - row.paidAmount;
|
|
1264
|
+
merged.set(cur.code, row);
|
|
1265
|
+
}
|
|
1266
|
+
return [...merged.values()];
|
|
1259
1267
|
}
|
|
1260
1268
|
const byCode = /* @__PURE__ */ new Map();
|
|
1261
1269
|
for (const inv of filtered) {
|
|
@@ -1474,6 +1482,18 @@ function InvoiceListView({ direction, onNew, onNewReceipt, onEdit }) {
|
|
|
1474
1482
|
},
|
|
1475
1483
|
preset
|
|
1476
1484
|
)),
|
|
1485
|
+
/* @__PURE__ */ jsx(
|
|
1486
|
+
Button,
|
|
1487
|
+
{
|
|
1488
|
+
variant: "bare",
|
|
1489
|
+
size: "bare",
|
|
1490
|
+
type: "button",
|
|
1491
|
+
"aria-pressed": draft.overdue,
|
|
1492
|
+
onClick: () => patch({ overdue: !draft.overdue }),
|
|
1493
|
+
className: `font-normal rounded-full border px-2 py-0.5 text-[10px] transition-colors ${draft.overdue ? "border-primary bg-primary/10 text-primary" : "border-transparent bg-muted/60 text-muted-foreground hover:bg-muted"}`,
|
|
1494
|
+
children: t("financial.invoice.filterIncludeOverdue")
|
|
1495
|
+
}
|
|
1496
|
+
),
|
|
1477
1497
|
/* @__PURE__ */ jsx("span", { className: "ml-auto text-[10px] text-muted-foreground", children: t("financial.invoice.filterMaxRange") })
|
|
1478
1498
|
] })
|
|
1479
1499
|
] });
|
|
@@ -6593,5 +6613,5 @@ function FinancialPage({ config: appConfig, provider, store, registries }) {
|
|
|
6593
6613
|
}
|
|
6594
6614
|
|
|
6595
6615
|
export { FinancialPage };
|
|
6596
|
-
//# sourceMappingURL=FinancialPage-
|
|
6597
|
-
//# sourceMappingURL=FinancialPage-
|
|
6616
|
+
//# sourceMappingURL=FinancialPage-LCKLEAM3.js.map
|
|
6617
|
+
//# sourceMappingURL=FinancialPage-LCKLEAM3.js.map
|