Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

better CSV exports and sort fix and other bug fixes

aashu4e2608a31c2e
diff --git a/apps/erp/app/components/Table/Table.tsx b/apps/erp/app/components/Table/Table.tsx
index b41c09d78d..0f9fb0e0a0 100644
--- a/apps/erp/app/components/Table/Table.tsx
+++ b/apps/erp/app/components/Table/Table.tsx
@@ -79,7 +79,7 @@ import {
import type { ColumnFilter } from "./components/Filter/types";
import { useFilters } from "./components/Filter/useFilters";
import type { ColumnSizeMap } from "./types";
-import { getAccessorKey, updateNestedProperty } from "./utils";
+import { buildColumnMaps, getAccessorKey, updateNestedProperty } from "./utils";
interface TableProps<T extends object> {
columns: ColumnDef<T>[];
@@ -393,22 +393,12 @@ const Table = <T extends object>({
/* Sorting */
const { isSorted, toggleSortByAscending, toggleSortByDescending } = useSort();
- const columnAccessors = useMemo(
- () =>
- columns.reduce<Record<string, string>>((acc, column) => {
- const accessorKey: string | undefined = getAccessorKey(column);
- if (accessorKey?.includes("_"))
- throw new Error(
- `Invalid accessorKey ${accessorKey}. Cannot contain '_'`
- );
- if (accessorKey && column.header && typeof column.header === "string") {
- return {
- ...acc,
- [accessorKey]: translateLabel(column.header)
- };
- }
- return acc;
- }, {}),
+ const {
+ accessors: columnAccessors,
+ exportValues,
+ sortKeyToLabel
+ } = useMemo(
+ () => buildColumnMaps(columns, translateLabel),
[columns, translateLabel]
);
@@ -866,6 +856,8 @@ const Table = <T extends object>({
>
<TableHeader
columnAccessors={columnAccessors}
+ exportValues={exportValues}
+ sortKeyToLabel={sortKeyToLabel}
columnOrder={columnOrder}
columnPinning={columnPinning}
columnVisibility={columnVisibility}
@@ -981,7 +973,9 @@ const Table = <T extends object>({
accessorKey &&
!accessorKey.endsWith(".id") &&
header.column.columnDef.enableSorting !== false;
- const sorted = isSorted(accessorKey ?? "");
+ const sortKey =
+ header.column.columnDef.meta?.sortBy ?? accessorKey;
+ const sorted = isSorted(sortKey ?? "");
return (
<Th
@@ -1042,7 +1036,7 @@ const Table = <T extends object>({
>
<DropdownMenuRadioItem
onClick={() =>
- toggleSortByAscending(accessorKey!)
+ toggleSortByAscending(sortKey!)
}
value="1"
>
@@ -1051,7 +1045,7 @@ const Table = <T extends object>({
</DropdownMenuRadioItem>
<DropdownMenuRadioItem
onClick={() =>
- toggleSortByDescending(accessorKey!)
+ toggleSortByDescending(sortKey!)
}
value="-1"
>
diff --git a/apps/erp/app/components/Table/components/Download.tsx b/apps/erp/app/components/Table/components/Download.tsx
index 9658ba2f02..a308073e5f 100644
--- a/apps/erp/app/components/Table/components/Download.tsx
+++ b/apps/erp/app/components/Table/components/Download.tsx
@@ -13,13 +13,31 @@ import { useCustomers, useItems, usePeople, useSuppliers } from "~/stores";
type DownloadProps = {
data: object[];
columnAccessors: Record<string, string>;
+ exportValues: Record<string, (row: any) => unknown>;
columnOrder: string[];
columnVisibility: Record<string, boolean>;
};
+// Last-resort guardrail so an export never ships `[object Object]` or explodes a
+// nested object into stray columns. Arrays/dates/primitives are left untouched —
+// json2csv already serializes them consistently. A column whose value is a plain
+// object should supply a readable `exportValue` rather than rely on this.
+function serializeForCsv(value: unknown): unknown {
+ if (
+ value != null &&
+ typeof value === "object" &&
+ !Array.isArray(value) &&
+ !(value instanceof Date)
+ ) {
+ return JSON.stringify(value);
+ }
+ return value;
+}
+
const Download = ({
data,
columnAccessors,
+ exportValues,
columnOrder,
columnVisibility
}: DownloadProps) => {
@@ -63,10 +81,16 @@ const Download = ({
const rows = data.map((row) => {
const out: Record<string, unknown> = {};
for (const key of exportColumns) {
- const raw = (row as Record<string, unknown>)[key];
- const map = idNameMaps[key];
- out[columnAccessors[key]] =
- map && raw != null ? (map.get(String(raw)) ?? raw) : raw;
+ const exporter = exportValues[key];
+ let value: unknown;
+ if (exporter) {
+ value = exporter(row);
+ } else {
+ const raw = (row as Record<string, unknown>)[key];
+ const map = idNameMaps[key];
+ value = map && raw != null ? (map.get(String(raw)) ?? raw) : raw;
+ }
+ out[columnAccessors[key]] = serializeForCsv(value);
}
return out;
});
@@ -79,7 +103,7 @@ const Download = ({
a.download = "data.csv";
document.body.appendChild(a);
a.click();
- }, [data, exportColumns, idNameMaps, columnAccessors]);
+ }, [data, exportColumns, idNameMaps, columnAccessors, exportValues]);
if (!data?.length) {
return null;
diff --git a/apps/erp/app/components/Table/components/Sort/Sort.tsx b/apps/erp/app/components/Table/components/Sort/Sort.tsx
index af82607aa0..13966fc681 100644
--- a/apps/erp/app/components/Table/components/Sort/Sort.tsx
+++ b/apps/erp/app/components/Table/components/Sort/Sort.tsx
@@ -26,10 +26,10 @@ import { LuArrowUpDown, LuGripVertical } from "react-icons/lu";
import { useSort } from "./useSort";
type SortProps = {
- columnAccessors: Record<string, string>;
+ sortKeyToLabel: Record<string, string>;
};
-const Sort = ({ columnAccessors }: SortProps) => {
+const Sort = ({ sortKeyToLabel }: SortProps) => {
const { t } = useLingui();
const {
sorts,
@@ -90,7 +90,7 @@ const Sort = ({ columnAccessors }: SortProps) => {
variant="ghost"
/>
<span className="text-sm flex-grow">
- <>{columnAccessors[column] ?? ""}</>
+ <>{sortKeyToLabel[column] ?? ""}</>
</span>
<Switch
checked={direction === "asc"}
@@ -120,20 +120,20 @@ const Sort = ({ columnAccessors }: SortProps) => {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-48">
- {Object.keys(columnAccessors)
- .filter((columnAccessor) => {
+ {Object.keys(sortKeyToLabel)
+ .filter((sortKey) => {
return !sorts
.map((sort) => sort.split(":")[0])
- .includes(columnAccessor);
+ .includes(sortKey);
})
- .map((columnAccessor) => {
+ .map((sortKey) => {
return (
<DropdownMenuItem
- key={columnAccessor}
- onClick={() => toggleSortBy(columnAccessor)}
+ key={sortKey}
+ onClick={() => toggleSortBy(sortKey)}
>
<DropdownMenuIcon icon={<BsSortUp />} />
- {columnAccessors[columnAccessor]}
+ {sortKeyToLabel[sortKey]}
</DropdownMenuItem>
);
})}
diff --git a/apps/erp/app/components/Table/components/TableHeader.tsx b/apps/erp/app/components/Table/components/TableHeader.tsx
index 1a56d8518b..524a330274 100644
--- a/apps/erp/app/components/Table/components/TableHeader.tsx
+++ b/apps/erp/app/components/Table/components/TableHeader.tsx
@@ -60,6 +60,8 @@ import Sort from "./Sort";
type HeaderProps<T> = {
renderActions?: (selectedRows: T[]) => ReactNode;
columnAccessors: Record<string, string>;
+ exportValues: Record<string, (row: T) => unknown>;
+ sortKeyToLabel: Record<string, string>;
columnOrder: ColumnOrderState;
columnPinning: ColumnPinningState;
columnVisibility: Record<string, boolean>;
@@ -90,6 +92,8 @@ type HeaderProps<T> = {
const TableHeader = <T extends object>({
compact,
columnAccessors,
+ exportValues,
+ sortKeyToLabel,
columnOrder,
columnPinning,
columnVisibility,
@@ -301,11 +305,7 @@ const TableHeader = <T extends object>({
{!!filters?.length && <Filter filters={filters} />}
</HStack>
<HStack>
- {sort === undefined ? (
- <Sort columnAccessors={columnAccessors} />
- ) : (
- sort
- )}
+ {sort === undefined ? <Sort sortKeyToLabel={sortKeyToLabel} /> : sort}
<Columns
columnOrder={columnOrder}
@@ -341,6 +341,7 @@ const TableHeader = <T extends object>({
<Download
data={data}
columnAccessors={columnAccessors}
+ exportValues={exportValues}
columnOrder={columnOrder}
columnVisibility={columnVisibility}
/>
diff --git a/apps/erp/app/components/Table/types.ts b/apps/erp/app/components/Table/types.ts
index 06ef422805..22aa4d5948 100644
--- a/apps/erp/app/components/Table/types.ts
+++ b/apps/erp/app/components/Table/types.ts
@@ -20,6 +20,15 @@ declare module "@tanstack/react-table" {
| "-Infinity"
| "+Infinity"
) => string;
+ // CSV value for this column, given the full row. Overrides the raw-accessor
+ // read in Download.tsx. Use when the displayed value is derived/composite, or
+ // when the accessorKey is an id whose name lives in another row field.
+ exportValue?: (row: TData) => string | number | boolean | null | undefined;
+ // Server-sort column override. When set, the sort UI writes `?sort=<sortBy>:dir`
+ // instead of using the accessorKey. Use when a column must sort by a different
+ // field than its accessor (e.g. accessor `supplierTypeId`, sort by `type`).
+ // Must name a real column on the view.
+ sortBy?: string;
}
}
diff --git a/apps/erp/app/components/Table/utils.test.ts b/apps/erp/app/components/Table/utils.test.ts
new file mode 100644
index 0000000000..4413bbc912
--- /dev/null
+++ b/apps/erp/app/components/Table/utils.test.ts
@@ -0,0 +1,100 @@
+import type { ColumnDef } from "@tanstack/react-table";
+import { describe, expect, it } from "vitest";
+import { buildColumnMaps } from "./utils";
+
+type Row = {
+ id: string;
+ supplierTypeId: string;
+ type: string;
+ tags: string[];
+};
+
+const upper = (value: string) => value.toUpperCase();
+
+const cols = (...columns: ColumnDef<Row, unknown>[]) => columns;
+
+describe("buildColumnMaps", () => {
+ it("keeps today's behavior: accessorKey + string header -> accessors + sortKey", () => {
+ const { accessors, exportValues, sortKeyToLabel } = buildColumnMaps(
+ cols({ accessorKey: "type", header: "Type" }),
+ upper
+ );
+ expect(accessors).toEqual({ type: "TYPE" });
+ expect(exportValues).toEqual({});
+ expect(sortKeyToLabel).toEqual({ type: "TYPE" });
+ });
+
+ it("throws when an accessorKey contains an underscore", () => {
+ expect(() =>
+ buildColumnMaps(cols({ accessorKey: "a_b", header: "X" }), upper)
+ ).toThrow(/Cannot contain '_'/);
+ });
+
+ it("includes a display column (id, no accessor) that has exportValue", () => {
+ const exportValue = (row: Row) => row.tags.join(", ");
+ const { accessors, exportValues, sortKeyToLabel } = buildColumnMaps(
+ cols({ id: "labels", header: "Labels", meta: { exportValue } }),
+ upper
+ );
+ expect(accessors).toEqual({ labels: "LABELS" });
+ expect(exportValues.labels).toBe(exportValue);
+ // a display column is not sortable on the server
+ expect(sortKeyToLabel).toEqual({});
+ });
+
+ it("uses filterHeader as the export label for a JSX-header column", () => {
+ const exportValue = (row: Row) => row.type;
+ const { accessors, sortKeyToLabel } = buildColumnMaps(
+ cols({
+ id: "week1",
+ header: () => null,
+ meta: { filterHeader: "Week 1", exportValue }
+ }),
+ upper
+ );
+ expect(accessors).toEqual({ week1: "WEEK 1" });
+ // JSX-header columns never enter the sort picker
+ expect(sortKeyToLabel).toEqual({});
+ });
+
+ it("falls back to filterHeader when the string header is empty", () => {
+ const exportValue = (row: Row) => row.type;
+ const { accessors, sortKeyToLabel } = buildColumnMaps(
+ cols({
+ accessorKey: "type",
+ header: "",
+ meta: { filterHeader: "Unit of Measure", exportValue }
+ }),
+ upper
+ );
+ expect(accessors).toEqual({ type: "UNIT OF MEASURE" });
+ // an empty string header still yields a (blank) sort-picker label, unchanged
+ expect(sortKeyToLabel).toEqual({ type: "" });
+ });
+
+ it("ignores a JSX-header column with no exportValue and no filterHeader", () => {
+ const { accessors, exportValues, sortKeyToLabel } = buildColumnMaps(
+ cols({ id: "week1", header: () => null }),
+ upper
+ );
+ expect(accessors).toEqual({});
+ expect(exportValues).toEqual({});
+ expect(sortKeyToLabel).toEqual({});
+ });
+
+ it("decouples sort/export from the accessor (supplier-type class)", () => {
+ const exportValue = (row: Row) => row.type;
+ const { accessors, exportValues, sortKeyToLabel } = buildColumnMaps(
+ cols({
+ accessorKey: "supplierTypeId",
+ header: "Type",
+ meta: { sortBy: "type", exportValue }
+ }),
+ upper
+ );
+ // value + filter stay on the id; export + sort move to the name
+ expect(accessors).toEqual({ supplierTypeId: "TYPE" });
+ expect(exportValues.supplierTypeId).toBe(exportValue);
+ expect(sortKeyToLabel).toEqual({ type: "TYPE" });
+ });
+});
diff --git a/apps/erp/app/components/Table/utils.ts b/apps/erp/app/components/Table/utils.ts
index 278ebdc510..30badb2663 100644
--- a/apps/erp/app/components/Table/utils.ts
+++ b/apps/erp/app/components/Table/utils.ts
@@ -6,6 +6,70 @@ export function getAccessorKey<T>(columnDef: ColumnDef<T, unknown>) {
: undefined;
}
+export interface ColumnMaps<T> {
+ // accessorKey (or column id for display columns) -> translated header label
+ accessors: Record<string, string>;
+ // export key -> function returning the CSV value for the full row
+ exportValues: Record<string, (row: T) => unknown>;
+ // server sort key (`meta.sortBy ?? accessorKey`) -> translated header label
+ sortKeyToLabel: Record<string, string>;
+}
+
+// Derives every column-driven map the table header needs: CSV column headings,
+// per-column export overrides, and the sort-key -> label lookup used by the sort
+// UI. A column's accessorKey drives value + filter, but sort (meta.sortBy) and
+// export (meta.exportValue) can each point at a different field.
+export function buildColumnMaps<T>(
+ columns: ColumnDef<T, unknown>[],
+ translate: (value: string) => string
+): ColumnMaps<T> {
+ const accessors: Record<string, string> = {};
+ const exportValues: Record<string, (row: T) => unknown> = {};
+ const sortKeyToLabel: Record<string, string> = {};
+
+ for (const column of columns) {
+ const accessorKey = getAccessorKey(column);
+ if (accessorKey?.includes("_")) {
+ throw new Error(`Invalid accessorKey ${accessorKey}. Cannot contain '_'`);
+ }
+
+ const stringHeader =
+ typeof column.header === "string" ? column.header : undefined;
+ const filterHeader = column.meta?.filterHeader;
+ const exportValue = column.meta?.exportValue;
+ const exportKey = accessorKey ?? column.id;
+
+ // CSV heading: a non-empty string header wins, then filterHeader (covers
+ // JSX-header and blank-header columns), then a (possibly empty) string
+ // header — never invents a heading for a JSX header that lacks filterHeader.
+ const rawLabel =
+ stringHeader && stringHeader.length > 0
+ ? stringHeader
+ : (filterHeader ?? stringHeader);
+ const exportLabel =
+ rawLabel !== undefined ? translate(rawLabel) : undefined;
+
+ const includeInExport =
+ (!!accessorKey && stringHeader !== undefined) || !!exportValue;
+ if (includeInExport && exportKey && exportLabel !== undefined) {
+ accessors[exportKey] = exportLabel;
+ }
+
+ if (exportValue && exportKey) {
+ exportValues[exportKey] = exportValue;
+ }
+
+ // Sort picker stays keyed on string-header columns only, so JSX-header
+ // columns (e.g. MRP week columns with a filterHeader) never flood it.
+ if (accessorKey && stringHeader !== undefined) {
+ const sortKey = column.meta?.sortBy ?? accessorKey;
+ sortKeyToLabel[sortKey] = translate(stringHeader);
+ }
+ }
+
+ return { accessors, exportValues, sortKeyToLabel };
+}
+
export function updateNestedProperty(
obj: object,
path: string | string[],
diff --git a/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx b/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx
index 5c04a9d87a..7a50892c44 100644
--- a/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx
+++ b/apps/erp/app/modules/documents/ui/Documents/DocumentsTable.tsx
@@ -282,6 +282,7 @@ const DocumentsTable = memo(
),
meta: {
icon: <LuTag />,
+ exportValue: (row) => row.labels?.join(", "),
filter: {
type: "static",
options: labelOptions,
@@ -400,8 +401,7 @@ const DocumentsTable = memo(
extension: false,
createdAt: false,
updatedAt: false,
- updatedBy: false,
- description: false
+ updatedBy: false
};
const renderContextMenu = useMemo(() => {
diff --git a/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx b/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx
index 13b936fa04..cfd9eba2cb 100644
--- a/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx
+++ b/apps/erp/app/modules/inventory/ui/Inventory/InventoryTable.tsx
@@ -269,7 +269,7 @@ const InventoryTable = memo(
},
{
accessorKey: "quantityOnProductionDemand",
- header: t`On Jobs`,
+ header: t`On Production Demand`,
cell: ({ row }) =>
formatNumber(row.original.quantityOnProductionDemand),
meta: {
diff --git a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx
index 78b57ffe20..3cc2c7673a 100644
--- a/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx
+++ b/apps/erp/app/modules/inventory/ui/PickingLists/PickingListsTable.tsx
@@ -94,7 +94,8 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {
"Unassigned"
),
meta: {
- icon: <LuUser />
+ icon: <LuUser />,
+ exportValue: (row) => row.assigneeName
}
},
{
@@ -102,7 +103,8 @@ const PickingListsTable = memo(({ data, count }: PickingListsTableProps) => {
header: t`Location`,
cell: ({ row }) => row.original.locationName || "N/A",
meta: {
- icon: <LuMapPin />
+ icon: <LuMapPin />,
+ exportValue: (row) => row.locationName
}
},
{
diff --git a/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx b/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx
index 9e737ed823..34e3affa16 100644
--- a/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx
+++ b/apps/erp/app/modules/people/ui/Shifts/ShiftsTable.tsx
@@ -100,7 +100,23 @@ const ShiftsTable = memo(({ data, count, locations }: ShiftsTableProps) => {
// @ts-ignore
cell: ({ row }) => renderDays(row.original),
meta: {
- icon: <LuCalendarDays />
+ icon: <LuCalendarDays />,
+ filterHeader: t`Days`,
+ exportValue: (row) =>
+ (
+ [
+ ["monday", "M"],
+ ["tuesday", "Tu"],
+ ["wednesday", "W"],
+ ["thursday", "Th"],
+ ["friday", "F"],
+ ["saturday", "Sa"],
+ ["sunday", "Su"]
+ ] as const
+ )
+ .filter(([key]) => row[key])
+ .map(([, label]) => label)
+ .join(", ")
}
}
];
diff --git a/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx b/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx
index 62b64117e2..2a93cf7ab3 100644
--- a/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx
+++ b/apps/erp/app/modules/people/ui/Timecards/TimecardsTable.tsx
@@ -73,8 +73,16 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {
// Re-render every minute to update duration for active timecards
useInterval(() => setTick((t) => t + 1), 60000);
- const columns = useMemo<ColumnDef<TimeCardEntry>[]>(
- () => [
+ const columns = useMemo<ColumnDef<TimeCardEntry>[]>(() => {
+ // Shared by the cell and the CSV export so the two never drift.
+ const timeLabel = (value: string | null | undefined) =>
+ value ? formatTime(value, locale) : "—";
+ const durationLabel = (
+ clockIn: string | null | undefined,
+ clockOut: string | null | undefined
+ ) => (clockIn ? formatDuration(clockIn, clockOut ?? null) : "—");
+
+ return [
{
header: t`Employee`,
cell: ({ row }) => (
@@ -109,32 +117,29 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {
{
id: "clockInTime",
header: t`Clock In`,
- cell: ({ row }) =>
- row.original.clockIn ? formatTime(row.original.clockIn, locale) : "—",
+ cell: ({ row }) => timeLabel(row.original.clockIn),
meta: {
- icon: <LuClock />
+ icon: <LuClock />,
+ exportValue: (row) => timeLabel(row.clockIn)
}
},
{
id: "clockOutTime",
header: t`Clock Out`,
- cell: ({ row }) =>
- row.original.clockOut
- ? formatTime(row.original.clockOut, locale)
- : "—",
+ cell: ({ row }) => timeLabel(row.original.clockOut),
meta: {
- icon: <LuClock />
+ icon: <LuClock />,
+ exportValue: (row) => timeLabel(row.clockOut)
}
},
{
id: "duration",
header: t`Duration`,
- cell: ({ row }) => {
- if (!row.original.clockIn) return "—";
- return formatDuration(row.original.clockIn, row.original.clockOut);
- },
+ cell: ({ row }) =>
+ durationLabel(row.original.clockIn, row.original.clockOut),
meta: {
- icon: <LuClock />
+ icon: <LuClock />,
+ exportValue: (row) => durationLabel(row.clockIn, row.clockOut)
}
},
{
@@ -183,9 +188,8 @@ const TimecardsTable = memo(({ data, count }: TimecardsTableProps) => {
}
}
}
- ],
- [locations, t, formatDate, locale]
- );
+ ];
+ }, [locations, t, formatDate, locale]);
const renderContextMenu = useCallback(
(row: TimeCardEntry) => {
diff --git a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
index 9df2620ff8..c2d7bab6b8 100644
--- a/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
+++ b/apps/erp/app/modules/production/ui/Planning/ProductionPlanningTable.tsx
@@ -242,6 +242,15 @@ const ProductionPlanningTable = ({
{numberFormatter.format(value)}
</span>
);
+ },
+ meta: {
+ filterHeader: isCurrentWeek
+ ? t`Present Week`
+ : t`Week ${weekNumber}`,
+ exportValue: (row: ProductionPlanningItem) => {
+ const value = row[weekKey] as number | undefined;
+ return value === undefined ? null : value;
+ }
}
};
}
@@ -288,7 +297,13 @@ const ProductionPlanningTable = ({
)?.label ?? null
}
/>
- )
+ ),
+ meta: {
+ filterHeader: t`Unit of Measure`,
+ exportValue: (row: ProductionPlanningItem) =>
+ unitOfMeasures.find((uom) => uom.value === row.unitOfMeasureCode)
+ ?.label ?? null
+ }
},
{
accessorKey: "reorderingPolicy",
@@ -444,7 +459,6 @@ const ProductionPlanningTable = ({
);
const defaultColumnVisibility = {
- active: false,
type: false
};
diff --git a/apps/erp/app/modules/production/ui/Projection/DemandProjectionTable.tsx b/apps/erp/app/modules/production/ui/Projection/DemandProjectionTable.tsx
index 850790ae9d..fb02a0da50 100644
--- a/apps/erp/app/modules/production/ui/Projection/DemandProjectionTable.tsx
+++ b/apps/erp/app/modules/production/ui/Projection/DemandProjectionTable.tsx
@@ -86,6 +86,17 @@ const DemandProjectionsTable = memo(
if (value === undefined || value === null || value === 0)
return "-";
return <span>{numberFormatter.format(value)}</span>;
+ },
+ meta: {
+ filterHeader: isCurrentWeek
+ ? t`Present Week`
+ : t`Week ${weekNumber}`,
+ exportValue: (row: DemandProjection) => {
+ const value = row[weekKey] as number | undefined | null;
+ return value === undefined || value === null || value === 0
+ ? null
+ : value;
+ }
}
};
}
diff --git a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
index 7db58a920a..b6f6184452 100644
--- a/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Planning/PurchasingPlanningTable.tsx
@@ -339,6 +339,15 @@ const PlanningTable = memo(
{numberFormatter.format(value)}
</span>
);
+ },
+ meta: {
+ filterHeader: isCurrentWeek
+ ? t`Present Week`
+ : t`Week ${weekNumber}`,
+ exportValue: (row: PurchasingPlanningItem) => {
+ const value = row[weekKey] as number | undefined;
+ return value === undefined ? null : value;
+ }
}
};
}
@@ -384,7 +393,13 @@ const PlanningTable = memo(
)?.label ?? null
}
/>
- )
+ ),
+ meta: {
+ filterHeader: t`Unit of Measure`,
+ exportValue: (row: PurchasingPlanningItem) =>
+ unitOfMeasures.find((uom) => uom.value === row.unitOfMeasureCode)
+ ?.label ?? null
+ }
},
{
accessorKey: "preferredSupplierId",
diff --git a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx
index f35d902969..03537ca28c 100644
--- a/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrdersTable.tsx
@@ -226,7 +226,8 @@ const PurchaseOrdersTable = memo(
label: employee.name
}))
},
- icon: <LuUser />
+ icon: <LuUser />,
+ exportValue: (row) => row.assigneeFullName
}
},
@@ -291,7 +292,8 @@ const PurchaseOrdersTable = memo(
label: employee.name
}))
},
- icon: <LuUser />
+ icon: <LuUser />,
+ exportValue: (row) => row.createdByFullName
}
},
{
@@ -460,8 +462,6 @@ const PurchaseOrdersTable = memo(
left: ["purchaseOrderId"]
}}
defaultColumnVisibility={{
- shippingMethodName: false,
- paymentTermName: false,
dropShipment: false,
createdBy: false,
createdAt: false,
diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx
index ede8d9547e..32f4b3011f 100644
--- a/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SuppliersTable.tsx
@@ -115,15 +115,11 @@ const SuppliersTable = memo(({ data, count, tags }: SuppliersTableProps) => {
{
accessorKey: "supplierTypeId",
header: t`Type`,
- cell: (item) => {
- if (!item.getValue<string>()) return null;
- const supplierType = supplierTypes?.find(
- (type) => type.value === item.getValue<string>()
- )?.label;
- return <Enumerable value={supplierType ?? ""} />;
- },
+ cell: ({ row }) => <Enumerable value={row.original.type ?? ""} />,
meta: {
icon: <LuShapes />,
+ sortBy: "type",
+ exportValue: (row) => row.type,
filter: {
type: "static",
options: supplierTypes?.map((type) => ({
diff --git a/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx b/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx
index aadd2c7227..0610a27d46 100644
--- a/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx
+++ b/apps/erp/app/modules/quality/ui/Actions/ActionsTable.tsx
@@ -190,14 +190,6 @@ const ActionsTable = memo(
}
},
- {
- accessorKey: "dueDate",
- header: t`Due Date`,
- cell: ({ row }) => formatDate(row.original.dueDate),
- meta: {
- icon: <LuCalendar />
- }
- },
{
accessorKey: "completedDate",
header: t`Completed Date`,
diff --git a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx
index e91567265a..8baded2ff5 100644
--- a/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx
+++ b/apps/erp/app/modules/quality/ui/Documents/QualityDocumentsTable.tsx
@@ -168,7 +168,13 @@ const QualityDocumentsTable = memo(
);
},
meta: {
- icon: <LuGitPullRequest />
+ icon: <LuGitPullRequest />,
+ exportValue: (row) => {
+ const versions = ((row as any)?.versions ?? []) as Array<{
+ version: number;
+ }>;
+ return `${versions.length} Version${versions.length === 1 ? "" : "s"}`;
+ }
}
}
];
diff --git a/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx b/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx
index ea5085436e..b415713aab 100644
--- a/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx
+++ b/apps/erp/app/modules/quality/ui/Gauge/GaugesTable.tsx
@@ -52,12 +52,9 @@ type GaugesTableProps = {
};
const defaultColumnVisibility = {
- type: false,
- extension: false,
createdAt: false,
updatedAt: false,
- updatedBy: false,
- description: false
+ updatedBy: false
};
const GaugesTable = memo(({ data, types, count }: GaugesTableProps) => {
diff --git a/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionsTable.tsx b/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionsTable.tsx
index 568b5cb1bd..2a45e8df22 100644
--- a/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionsTable.tsx
+++ b/apps/erp/app/modules/quality/ui/InboundInspections/InboundInspectionsTable.tsx
@@ -103,7 +103,10 @@ const InboundInspectionsTable = memo(
</span>
</div>
),
- meta: { icon: <LuTruck /> }
+ meta: {
+ icon: <LuTruck />,
+ exportValue: (row) => (row as any).receipt?.receiptId ?? null
+ }
},
{
accessorKey: "lotSize",
diff --git a/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx b/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx
index 20a5d6865d..3adf39dcd2 100644
--- a/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx
+++ b/apps/erp/app/modules/quality/ui/RiskRegister/RiskRegistersTable.tsx
@@ -188,6 +188,7 @@ const RiskRegistersTable = memo(({ data, count }: RiskRegistersTableProps) => {
cell: ({ row }) => <Enumerable value={row.original.workCenterName} />,
meta: {
icon: <LuWrench />,
+ exportValue: (row) => row.workCenterName,
filter: {
type: "static",
options: workCenters.options.map((wc) => ({
diff --git a/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx b/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx
index 062ad32197..be6e6e0091 100644
--- a/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx
+++ b/apps/erp/app/modules/resources/ui/MaintenanceSchedule/MaintenanceSchedulesTable.tsx
@@ -105,7 +105,7 @@ const MaintenanceSchedulesTable = memo(
)
},
{
- accessorKey: "workCenter",
+ accessorKey: "workCenterName",
header: t`Work Center`,
cell: ({ row }) => <Enumerable value={row.original.workCenterName} />,
meta: {
diff --git a/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx b/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx
index a1c6ad843b..8b3b15559c 100644
--- a/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx
+++ b/apps/erp/app/modules/resources/ui/Processes/ProcessesTable.tsx
@@ -126,7 +126,12 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {
label: <Enumerable value={w.label} />
})),
isArray: true
- }
+ },
+ exportValue: (row) =>
+ ((row.workCenters ?? []) as Array<string>)
+ .map((wc) => workCenters.find((w) => w.value === wc)?.label)
+ .filter(Boolean)
+ .join(", ")
}
},
{
@@ -160,7 +165,11 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {
</AvatarGroup>
),
meta: {
- icon: <LuUsers />
+ icon: <LuUsers />,
+ exportValue: (row) =>
+ ((row.suppliers ?? []) as Array<{ name: string }>)
+ .map((s) => s.name)
+ .join(", ")
}
},
{
diff --git a/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx b/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx
index 69bf19cbf1..3089588a84 100644
--- a/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx
+++ b/apps/erp/app/modules/resources/ui/Suggestions/SuggestionsTable.tsx
@@ -72,6 +72,7 @@ const SuggestionsTable = memo(
),
meta: {
icon: <LuUser />,
+ exportValue: (row) => row.employeeName,
filter: {
type: "static",
options: people.map((employee) => ({
diff --git a/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx b/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx
index 9a059a92b4..1c89ea4b43 100644
--- a/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx
+++ b/apps/erp/app/modules/sales/ui/Pricing/PricingRulesTable.tsx
@@ -72,6 +72,17 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
const [items] = useItems();
const columns = useMemo<ColumnDef<(typeof data)[number]>[]>(() => {
+ // Shared by the Dates cell and its CSV export so the two never drift.
+ const formatValidRange = (
+ validFrom: string | null | undefined,
+ validTo: string | null | undefined
+ ) => {
+ if (!validFrom && !validTo) return t`Always`;
+ const from = validFrom ? formatDate(validFrom) : "…";
+ const to = validTo ? formatDate(validTo) : "…";
+ return `${from} – ${to}`;
+ };
+
const defaultColumns: ColumnDef<(typeof data)[number]>[] = [
{
accessorKey: "name",
@@ -151,7 +162,8 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
<div className="flex flex-col items-start gap-1">
{row.original.customerTypeIds.map((id) => {
const label =
- customerTypes?.find((ct) => ct.value === id)?.label ?? "Type";
+ customerTypes?.find((ct) => ct.value === id)?.label ??
+ t`Type`;
return <Enumerable key={id} value={label} />;
})}
</div>
@@ -208,7 +220,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
const label =
itemPostingGroups?.find(
(g) => g.value === row.original.itemPostingGroupId
- )?.label ?? "Item Group";
+ )?.label ?? t`Item Group`;
return <Enumerable value={label} />;
},
meta: {
@@ -237,7 +249,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
if (rule.customerTypeIds?.length) {
rule.customerTypeIds.forEach((id) => {
const label =
- customerTypes?.find((ct) => ct.value === id)?.label ?? "Type";
+ customerTypes?.find((ct) => ct.value === id)?.label ?? t`Type`;
parts.push(<Enumerable key={`ct-${id}`} value={label} />);
});
}
@@ -250,7 +262,23 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
return <div className="flex flex-col items-start gap-1">{parts}</div>;
},
meta: {
- icon: <LuSquareUser />
+ icon: <LuSquareUser />,
+ exportValue: (row) => {
+ const labels: string[] = [];
+ if (row.customerIds?.length) {
+ row.customerIds.forEach((id) => {
+ labels.push(customers?.find((c) => c.id === id)?.name ?? id);
+ });
+ }
+ if (row.customerTypeIds?.length) {
+ row.customerTypeIds.forEach((id) => {
+ labels.push(
+ customerTypes?.find((ct) => ct.value === id)?.label ?? t`Type`
+ );
+ });
+ }
+ return labels.length === 0 ? t`All` : labels.join(", ");
+ }
}
},
{
@@ -261,7 +289,7 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
const groupLabel = rule.itemPostingGroupId
? (itemPostingGroups?.find(
(g) => g.value === rule.itemPostingGroupId
- )?.label ?? "Item Group")
+ )?.label ?? t`Item Group`)
: null;
const itemIds = rule.itemIds ?? [];
const firstItem = itemIds[0]
@@ -308,7 +336,23 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
);
},
meta: {
- icon: <LuPackage />
+ icon: <LuPackage />,
+ exportValue: (row) => {
+ const labels: string[] = [];
+ if (row.itemPostingGroupId) {
+ labels.push(
+ itemPostingGroups?.find(
+ (g) => g.value === row.itemPostingGroupId
+ )?.label ?? t`Item Group`
+ );
+ }
+ (row.itemIds ?? []).forEach((id) => {
+ labels.push(
+ items?.find((i) => i.id === id)?.readableIdWithRevision ?? id
+ );
+ });
+ return labels.length === 0 ? t`All` : labels.join(", ");
+ }
}
},
{
@@ -321,12 +365,15 @@ const PricingRulesTable = memo(({ data, count }: PricingRulesTableProps) => {
<span className="text-muted-foreground text-sm">{t`Always`}</span>
);
}
- const from = validFrom ? formatDate(validFrom) : "…";
- const to = validTo ? formatDate(validTo) : "…";
- return <span className="text-sm">{`${from} – ${to}`}</span>;
+ return (
+ <span className="text-sm">
+ {formatValidRange(validFrom, validTo)}
+ </span>
+ );
},
meta: {
- icon: <LuCalendar />
+ icon: <LuCalendar />,
+ exportValue: (row) => formatValidRange(row.validFrom, row.validTo)
}
},
{
diff --git a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx
index 1371eac62e..b069f2de4c 100644
--- a/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx
+++ b/apps/erp/app/modules/sales/ui/SalesOrder/SalesOrdersTable.tsx
@@ -320,7 +320,11 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {
);
},
meta: {
- icon: <LuFactory />
+ icon: <LuFactory />,
+ exportValue: (row) => {
+ const jobs = (row.jobs ?? []) as SalesOrderJob[];
+ return jobs.map((job) => job.jobId).join(", ");
+ }
}
},
{
@@ -565,9 +569,6 @@ const SalesOrdersTable = memo(({ data, count }: SalesOrdersTableProps) => {
}}
defaultColumnVisibility={{
receiptPromisedDate: false,
- shippingMethodName: false,
- shippingTermName: false,
- paymentTermName: false,
dropShipment: false,
createdBy: false,
createdAt: false,
diff --git a/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx b/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx
index 85c1fdae64..d4999dc321 100644
--- a/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx
+++ b/apps/erp/app/modules/settings/ui/ApiKeys/ApiKeysTable.tsx
@@ -90,7 +90,17 @@ const ApiKeysTable = memo(({ data, count }: ApiKeysTableProps) => {
);
},
meta: {
- icon: <LuShield />
+ icon: <LuShield />,
+ exportValue: (row) => {
+ const scopes = (row as any).scopes as Record<
+ string,
+ string[]
+ > | null;
+ const scopeCount = getScopeCount(scopes);
+ return scopeCount === 0
+ ? t`No Access`
+ : t`${scopeCount} permissions`;
+ }
}
},
{
diff --git a/packages/database/supabase/migrations/20260626143817_sales-invoice-payment-term-name.sql b/packages/database/supabase/migrations/20260626143817_sales-invoice-payment-term-name.sql
new file mode 100644
index 0000000000..7aa143f569
--- /dev/null
+++ b/packages/database/supabase/migrations/20260626143817_sales-invoice-payment-term-name.sql
@@ -0,0 +1,91 @@
+-- The "salesInvoices" view exposed only "paymentTermId", so the table's
+-- "Payment Method" column (which reads "paymentTermName") rendered blank on
+-- screen and in CSV export. Recreate the view adding the resolved name, matching
+-- the "purchaseInvoices" view which already carries "paymentTermName".
+--
+-- CREATE OR REPLACE VIEW requires the replacement to keep every existing column
+-- with the same name, order, and type; new columns may only be appended at the
+-- end. So the body below is the current view verbatim (newest definition:
+-- 20260604120000_invoice-totals-computed-in-views.sql) with a single LEFT JOIN
+-- to "paymentTerm" and "paymentTermName" added as the LAST select column.
+
+CREATE OR REPLACE VIEW "salesInvoices" WITH(SECURITY_INVOKER=true) AS
+ SELECT
+ si."id",
+ si."invoiceId",
+ si."status",
+ si."customerId",
+ si."customerReference",
+ si."invoiceCustomerId",
+ si."invoiceCustomerLocationId",
+ si."invoiceCustomerContactId",
+ si."paymentTermId",
+ si."postingDate",
+ si."dateIssued",
+ si."dateDue",
+ si."datePaid",
+ si."locationId",
+ si."currencyCode",
+ COALESCE(sil."subtotal", 0) AS "subtotal",
+ si."totalDiscount",
+ COALESCE(sil."subtotal", 0) + COALESCE(sil."totalTax", 0) + COALESCE(ss."shippingCost", 0) AS "totalAmount",
+ COALESCE(sil."totalTax", 0) AS "totalTax",
+ si."balance",
+ si."exchangeRate",
+ si."exchangeRateUpdatedAt",
+ si."opportunityId",
+ si."shipmentId",
+ si."assignee",
+ si."companyId",
+ si."customFields",
+ si."internalNotes",
+ si."externalNotes",
+ si."tags",
+ si."createdAt",
+ si."createdBy",
+ si."updatedAt",
+ si."updatedBy",
+ sil."thumbnailPath",
+ sil."itemType",
+ COALESCE(sil."subtotal", 0) + COALESCE(sil."totalTax", 0) + COALESCE(ss."shippingCost", 0) AS "invoiceTotal",
+ sil."lines",
+ pt."name" AS "paymentTermName"
+ FROM "salesInvoice" si
+ LEFT JOIN (
+ SELECT
+ sil."invoiceId",
+ MIN(CASE
+ WHEN i."thumbnailPath" IS NULL AND mu."thumbnailPath" IS NOT NULL THEN mu."thumbnailPath"
+ ELSE i."thumbnailPath"
+ END) AS "thumbnailPath",
+ SUM(
+ COALESCE(sil."quantity", 0)*COALESCE(sil."unitPrice", 0)
+ + COALESCE(sil."addOnCost", 0)
+ + COALESCE(sil."nonTaxableAddOnCost", 0)
+ + COALESCE(sil."shippingCost", 0)
+ ) AS "subtotal",
+ SUM(
+ COALESCE(sil."taxPercent", 0) * (
+ COALESCE(sil."quantity", 0)*COALESCE(sil."unitPrice", 0)
+ + COALESCE(sil."addOnCost", 0)
+ + COALESCE(sil."shippingCost", 0)
+ )
+ ) AS "totalTax",
+ MIN(i."type") AS "itemType",
+ ARRAY_AGG(
+ json_build_object(
+ 'id', sil.id,
+ 'invoiceLineType', sil."invoiceLineType",
+ 'quantity', sil."quantity",
+ 'unitPrice', sil."unitPrice",
+ 'itemId', sil."itemId"
+ )
+ ) AS "lines"
+ FROM "salesInvoiceLine" sil
+ LEFT JOIN "item" i
+ ON i."id" = sil."itemId"
+ LEFT JOIN "modelUpload" mu ON mu.id = i."modelUploadId"
+ GROUP BY sil."invoiceId"
+ ) sil ON sil."invoiceId" = si."id"
+ JOIN "salesInvoiceShipment" ss ON ss."id" = si."id"
+ LEFT JOIN "paymentTerm" pt ON pt."id" = si."paymentTermId";
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 855270980d..b72f3c8e40 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -6799,6 +6799,9 @@ msgstr "In Aufträgen"
msgid "On order"
msgstr "Bestellt"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "In Bestellung"
@@ -7415,6 +7418,9 @@ msgstr "Vorauszahlungen (Standard)"
msgid "Prepayments (default)"
msgstr "Vorbeugungsmaßnahme"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Zurück"
@@ -11200,6 +11206,9 @@ msgstr "Mittwoch"
msgid "Week {0} ({formattedDate})"
msgstr "Woche {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Woche des {0}"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 53fe01eb75..9231158c13 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -6799,6 +6799,9 @@ msgstr "On Jobs"
msgid "On order"
msgstr "On order"
+msgid "On Production Demand"
+msgstr "On Production Demand"
+
msgid "On Purchase Order"
msgstr "On Purchase Order"
@@ -7415,6 +7418,9 @@ msgstr "Prepayments"
msgid "Prepayments (default)"
msgstr "Prepayments (default)"
+msgid "Present Week"
+msgstr "Present Week"
+
msgid "Prev"
msgstr "Prev"
@@ -11200,6 +11206,9 @@ msgstr "Wednesday"
msgid "Week {0} ({formattedDate})"
msgstr "Week {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr "Week {weekNumber}"
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Week of {0}"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 84a2829322..54cb3e36ca 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -6799,6 +6799,9 @@ msgstr "En Trabajos"
msgid "On order"
msgstr "Pedido realizado"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "En Orden de Compra"
@@ -7415,6 +7418,9 @@ msgstr "Anticipos (predeterminado)"
msgid "Prepayments (default)"
msgstr "Acción preventiva"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Anterior"
@@ -11200,6 +11206,9 @@ msgstr "Miércoles"
msgid "Week {0} ({formattedDate})"
msgstr "Semana {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Semana del {0}"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index 5d99152904..8c2e204fb2 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -6799,6 +6799,9 @@ msgstr "Sur les commandes"
msgid "On order"
msgstr "Commandé"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "En commande d'achat"
@@ -7415,6 +7418,9 @@ msgstr "Acomptes (par défaut)"
msgid "Prepayments (default)"
msgstr "Action préventive"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Précédent"
@@ -11200,6 +11206,9 @@ msgstr "Mercredi"
msgid "Week {0} ({formattedDate})"
msgstr "Semaine {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Semaine du {0}"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 9ef64d1f05..c344903c85 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -6799,6 +6799,9 @@ msgstr "नौकरियों पर"
msgid "On order"
msgstr "ऑर्डर पर"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "खरीद आदेश पर"
@@ -7415,6 +7418,9 @@ msgstr "अग्रिम भुगतान (डिफ़ॉल्ट)"
msgid "Prepayments (default)"
msgstr "निवारक कार्रवाई"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "पिछला"
@@ -11200,6 +11206,9 @@ msgstr "बुधवार"
msgid "Week {0} ({formattedDate})"
msgstr "सप्ताह {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "{0} का सप्ताह"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index 02dd98e6c6..dbd186b0e9 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -6799,6 +6799,9 @@ msgstr "Su Lavori"
msgid "On order"
msgstr "In ordine"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "In Ordine di Acquisto"
@@ -7415,6 +7418,9 @@ msgstr "Anticipi (predefinito)"
msgid "Prepayments (default)"
msgstr "Azione preventiva"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Prec"
@@ -11200,6 +11206,9 @@ msgstr "Mercoledì"
msgid "Week {0} ({formattedDate})"
msgstr "Settimana {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Settimana del {0}"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index f6ba885ef2..1ac7cb1d52 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -6799,6 +6799,9 @@ msgstr "ジョブ上"
msgid "On order"
msgstr "発注済み"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "購買注文中"
@@ -7415,6 +7418,9 @@ msgstr "前払金(デフォルト)"
msgid "Prepayments (default)"
msgstr "予防措置"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "前へ"
@@ -11200,6 +11206,9 @@ msgstr "水曜日"
msgid "Week {0} ({formattedDate})"
msgstr "週 {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "{0} の週"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 7a3fd16ba8..d65be2ff24 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -6799,6 +6799,9 @@ msgstr "Na zadaniach"
msgid "On order"
msgstr "Zamówione"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "Na zamówieniu zakupu"
@@ -7415,6 +7418,9 @@ msgstr "Przedpłaty (domyślnie)"
msgid "Prepayments (default)"
msgstr "Działanie zapobiegawcze"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Poprz"
@@ -11200,6 +11206,9 @@ msgstr "Środa"
msgid "Week {0} ({formattedDate})"
msgstr "Tydzień {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Tydzień z {0}"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index f54624ca8a..b946cbc5e5 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -6799,6 +6799,9 @@ msgstr "Em Trabalhos"
msgid "On order"
msgstr "Em pedido"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "Em Ordem de Compra"
@@ -7415,6 +7418,9 @@ msgstr "Adiantamentos (padrão)"
msgid "Prepayments (default)"
msgstr "Ação preventiva"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Anterior"
@@ -11200,6 +11206,9 @@ msgstr "Quarta-feira"
msgid "Week {0} ({formattedDate})"
msgstr "Semana {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Semana de {0}"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index 0eef5a6dd8..97e4aface6 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -6799,6 +6799,9 @@ msgstr "На заказах"
msgid "On order"
msgstr "Заказано"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "На заказе покупки"
@@ -7415,6 +7418,9 @@ msgstr "Авансовые платежи (по умолчанию)"
msgid "Prepayments (default)"
msgstr "Предупредительное действие"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Пред"
@@ -11200,6 +11206,9 @@ msgstr "Среда"
msgid "Week {0} ({formattedDate})"
msgstr "Неделя {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "Неделя {0}"
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 22e07b19a4..a2f2606e9f 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -6799,6 +6799,9 @@ msgstr "Üretimde"
msgid "On order"
msgstr "Siparişte"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "Satın Alma Siparişinde"
@@ -7415,6 +7418,9 @@ msgstr "Ön Ödemeler (varsayılan)"
msgid "Prepayments (default)"
msgstr "Önleyici İşlem"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "Önceki"
@@ -11200,6 +11206,9 @@ msgstr "Çarşamba"
msgid "Week {0} ({formattedDate})"
msgstr "Hafta {0} ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "{0} haftası"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 3b07338f79..13bcbf4248 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -6799,6 +6799,9 @@ msgstr "在工作中"
msgid "On order"
msgstr "已订购"
+msgid "On Production Demand"
+msgstr ""
+
msgid "On Purchase Order"
msgstr "采购订单上"
@@ -7415,6 +7418,9 @@ msgstr "预付款(默认)"
msgid "Prepayments (default)"
msgstr "预防措施"
+msgid "Present Week"
+msgstr ""
+
msgid "Prev"
msgstr "上一页"
@@ -11200,6 +11206,9 @@ msgstr "星期三"
msgid "Week {0} ({formattedDate})"
msgstr "第 {0} 周 ({formattedDate})"
+msgid "Week {weekNumber}"
+msgstr ""
+
#. placeholder {0}: dateFormatter.format(parseDate(d.startDate).toDate(getLocalTimeZone()))
msgid "Week of {0}"
msgstr "{0} 的周"