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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat(erp): delete selected BOM and BOP lines in one action (#1952)
Brad Barbinbec5c3cd653d
diff --git a/apps/erp/app/modules/items/AGENTS.md b/apps/erp/app/modules/items/AGENTS.mdindex 01c57c1f40..c3325c5221 100644--- a/apps/erp/app/modules/items/AGENTS.md+++ b/apps/erp/app/modules/items/AGENTS.md@@ -87,7 +87,7 @@ Each is a `defineServiceFn` const in `items.server.ts`. The route calls it as `a- `updateItemManufacturing` and `updateItemPlanning` (the four item types' planning tabs) save, then re-plan the item (`replanAfterItemChange`, `production.server.ts`); planning refuses a responsible employee who is not an active employee.- `setItemSupersession` (the part's own supersession), `addItemPredecessor` (written on the predecessor). Both return a loop as `rule`, which the planning route shows as a field error.- `createSupplierPart`, `updateSupplierPart` (with the drawer's price breaks, replaced in one transaction).-- `copyMethod` (Get Method and Save Method, behind `checkRevisionLock`), `createMethodVersion`, `syncOnshapeMethod` (the Onshape panel's Sync, `api+/integrations.onshape.sync.ts`: `syncMakeMethod` (`items.service.ts`, ported from the `sync` server function) rewrites the bill of materials, then the item is mapped to its Onshape document). `deleteMethodOperation` (behind `checkRevisionLock`). Every other published bill of materials / process write holds the same lock its `methods+/` route checks: material, operation, parameter, tool and step create / update / delete, `activateMethodVersion` (`checkRevisionLocks` checks both the row's own method and the one an update names). With release control on warn the write goes ahead and returns the lock's message as `notice` (`withLockNotice`). `updateMaterialOrder` / `updateOperationOrder` (the `methods+/*.order.tsx` routes) take rows of ONE make method and write the order with `updateSortOrder`. Step, slide and step-link writes also need a Draft method (`methodStepRefusal`); `assertMethodOperationIsDraft` returns that refusal as `rule`. `recalculateItemCost` (the costing card's Recalculate).+- `copyMethod` (Get Method and Save Method, behind `checkRevisionLock`), `createMethodVersion`, `syncOnshapeMethod` (the Onshape panel's Sync, `api+/integrations.onshape.sync.ts`: `syncMakeMethod` (`items.service.ts`, ported from the `sync` server function) rewrites the bill of materials, then the item is mapped to its Onshape document). `deleteMethodOperation` (behind `checkRevisionLock`). `deleteMethodMaterials` / `deleteMethodOperations` (unpublished; the bill of material and bill of process Delete Selected, `methods+/material.delete.tsx` and `operation.delete.tsx`) take rows of ONE make method (`getSingleMakeMethodId`) and check that method's lock once. Every other published bill of materials / process write holds the same lock its `methods+/` route checks: material, operation, parameter, tool and step create / update / delete, `activateMethodVersion` (`checkRevisionLocks` checks both the row's own method and the one an update names). With release control on warn the write goes ahead and returns the lock's message as `notice` (`withLockNotice`). `updateMaterialOrder` / `updateOperationOrder` (the `methods+/*.order.tsx` routes) take rows of ONE make method and write the order with `updateSortOrder`. Step, slide and step-link writes also need a Draft method (`methodStepRefusal`); `assertMethodOperationIsDraft` returns that refusal as `rule`. `recalculateItemCost` (the costing card's Recalculate).- `createChangeNotice` (with the picked parts), `createChangeNoticeForItem`, `setChangeNoticeStatus` (the approval gate, the release through `applyChangeNotice`, the stage notifications), `decideChangeNoticeApproval`. The notice and child writes (`updateChangeNotice`, the affected-item and action-task operations) hold `requireChangeNoticeEditable` themselves: engineering scope for affected items and the narrative, workflow scope for action tasks and header fields; a child row addressed by its own id resolves its notice through `requireChangeNoticeChildEditable`.The building blocks they call are in `items.service.ts` (`upsertPart`, `upsertItemPlanning`, `upsertItemManufacturing`, `upsertItemSupersession`, `upsertSupplierPart`, `copyItem`, `copyMakeMethod`, `upsertMakeMethodVersion`, `insertChangeNotice`, `updateChangeNoticeStatus`, `cascadeItemTrackingType`, `updateItemMethodAndSourcing`). A building block is never a tool. Import other modules' code from the file that defines it (`*.service.ts`, `*.models.ts`).diff --git a/apps/erp/app/modules/items/items.server.ts b/apps/erp/app/modules/items/items.server.tsindex a77832843d..ed89d6aae2 100644--- a/apps/erp/app/modules/items/items.server.ts+++ b/apps/erp/app/modules/items/items.server.ts@@ -1113,6 +1113,60 @@ export const deleteMethodOperation = defineServiceFn({}});+/**+ * Delete several operations of one make method's bill of process.+ *+ * @remarks+ * The bill of process's Delete Selected. Every operation must belong to the+ * same make method; the method's release lock is checked once, as+ * `deleteMethodOperation` checks it for one.+ */+export const deleteMethodOperations = defineServiceFn({+ input: z.object({ ids: z.array(z.string()).min(1) }),+ permission: { delete: "parts" },++ async run(ctx, { ids }) {+ const client = ctx.asCaller.supabase;+ const companyId = ctx.company.id;+ const makeMethod = await service.getSingleMakeMethodId(+ client,+ companyId,+ "methodOperation",+ ids+ );+ if (makeMethod.error) {+ return ctx.error(+ "internal",+ "Failed to load the operations",+ makeMethod.error+ );+ }+ if (!makeMethod.data) {+ return ctx.error(+ "validation",+ "The operations must belong to one bill of process"+ );+ }+ const lock = await service.checkRevisionLock(client, {+ kind: "makeMethod",+ id: makeMethod.data,+ companyId+ });+ if (!lock.ok) return ctx.error("rule", lock.message);++ const deleted = await client+ .from("methodOperation")+ .delete()+ .in("id", ids)+ .eq("makeMethodId", makeMethod.data)+ .eq("companyId", companyId);+ if (deleted.error) {+ return ctx.error("internal", deleted.error.message, deleted.error);+ }+ return { ids, notice: lock.warn ? lock.message : undefined };+ }+});+/*** Recalculate a made item's unit cost from its make method.*@@ -1979,6 +2033,64 @@ export const deleteMethodMaterial = defineServiceFn({}});+/**+ * Delete several materials of one make method's bill of material.+ *+ * @remarks+ * The bill of material's Delete Selected. Every material must belong to the+ * same make method; the method's release lock is checked once, as+ * `deleteMethodMaterial` checks it for one.+ */+export const deleteMethodMaterials = defineServiceFn({+ input: z.object({ ids: z.array(z.string()).min(1) }),+ permission: { delete: "parts" },++ async run(ctx, { ids }) {+ const client = ctx.asCaller.supabase;+ const companyId = ctx.company.id;+ const makeMethod = await service.getSingleMakeMethodId(+ client,+ companyId,+ "methodMaterial",+ ids+ );+ if (makeMethod.error) {+ return ctx.error(+ "internal",+ "Failed to load the materials",+ makeMethod.error+ );+ }+ if (!makeMethod.data) {+ return ctx.error(+ "validation",+ "The materials must belong to one bill of material"+ );+ }+ const lock = await service.checkRevisionLock(client, {+ kind: "makeMethod",+ id: makeMethod.data,+ companyId+ });+ if (!lock.ok) return ctx.error("rule", lock.message);++ const deleted = await client+ .from("methodMaterial")+ .delete()+ .in("id", ids)+ .eq("makeMethodId", makeMethod.data)+ .eq("companyId", companyId);+ if (deleted.error) {+ return ctx.error(+ "internal",+ "Failed to delete method material",+ deleted.error+ );+ }+ return { ids, notice: lock.warn ? lock.message : undefined };+ }+});+/*** Assert method operation is draft*diff --git a/apps/erp/app/modules/items/items.service.ts b/apps/erp/app/modules/items/items.service.tsindex 552c9555df..dfa293538b 100644--- a/apps/erp/app/modules/items/items.service.ts+++ b/apps/erp/app/modules/items/items.service.ts@@ -9354,6 +9354,31 @@ export async function checkRevisionLock(* The first refusal among several locks, else the first warning. An update* that can move a row checks both the method it leaves and the one it joins.*/+/**+ * The one make method that every row in `ids` belongs to, or null when the+ * rows are missing or span several methods. A bulk bill of material or bill of+ * process write checks one method's lock, so its rows must share it.+ */+export async function getSingleMakeMethodId(+ client: SupabaseClient<Database>,+ companyId: string,+ table: "methodMaterial" | "methodOperation",+ ids: string[]+) {+ const rows = await client+ .from(table)+ .select("makeMethodId")+ .in("id", ids)+ .eq("companyId", companyId);+ const makeMethodIds = new Set(+ (rows.data ?? []).map((row) => row.makeMethodId)+ );+ return {+ data: makeMethodIds.size === 1 ? [...makeMethodIds][0] : null,+ error: rows.error+ };+}+export async function checkRevisionLocks(client: SupabaseClient<Database>,companyId: string,diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsxindex e2ae9aa6e1..7d55ee987c 100644--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx@@ -6,6 +6,7 @@import { useCarbon } from "@carbon/auth";import type { Database } from "@carbon/database";import { ValidatedForm } from "@carbon/form";+import { useAction } from "@carbon/query";import {Badge,Button,@@ -49,6 +50,7 @@ import {LuPackage,LuRedoDot,LuSquareFunction,+ LuTrash,LuTruck} from "react-icons/lu";import {@@ -201,6 +203,7 @@ const BillOfMaterial = ({const [items] = useItems();const itemName = getItemById(items, makeMethod.itemId)?.name;const fetcher = useFetcher<{}>();+ const deleteMaterialFetcher = useAction();const [searchParams] = useSearchParams();const makeMethodId = makeMethod.id;@@ -302,29 +305,38 @@ const BillOfMaterial = ({}));};- const onRemoveItem = async (id: string) => {+ // One request for every saved row, so "Delete Selected" removes the checked+ // rows together rather than racing one fetcher submit per row.+ const onRemoveItems = (ids: string[]) => {if (isReadOnly) return;- // Check if this is a temporary item (exists in temporaryItems state)- if (temporaryItems[id]) {- setTemporaryItems((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });- } else {- fetcher.submit(new FormData(), {+ const without = <T,>(state: Record<string, T>) =>+ Object.fromEntries(+ Object.entries(state).filter(([id]) => !ids.includes(id))+ );++ // Temporary rows were never saved: dropping them from state is enough.+ setTemporaryItems(without);+ const savedIds = ids.filter((id) => !temporaryItems[id]);+ if (savedIds.length > 0) {+ const formData = new FormData();+ for (const id of savedIds) formData.append("id", id);+ deleteMaterialFetcher.submit(formData, {method: "post",- action: path.to.deleteMethodMaterial(id)+ action: path.to.deleteMethodMaterials});}setSelectedItemId(null);- setOrderState((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });+ setOrderState(without);+ setCheckedState(without);};+ const onRemoveItem = (id: string) => onRemoveItems([id]);+ const checkedIds = materials+ .filter((item) => item.checked)+ .map((item) => item.id);+const updateSortOrder = useThrottle((updates: Record<string, number>) => {let formData = new FormData();formData.append("updates", JSON.stringify(updates));@@ -497,6 +509,16 @@ const BillOfMaterial = ({<CardAction><div className="flex items-center gap-2">+ {checkedIds.length > 1 && (+ <Button+ variant="destructive"+ leftIcon={<LuTrash />}+ isDisabled={isReadOnly}+ onClick={() => onRemoveItems(checkedIds)}+ >+ <Trans>Delete Selected</Trans>+ </Button>+ )}<Buttonref={addItemButtonRef}variant="secondary"diff --git a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsxindex 6ac5bd46e5..8ca101883a 100644--- a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx+++ b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx@@ -72,6 +72,7 @@ import {LuMaximize2,LuMinimize2,LuSquareFunction,+ LuTrash,LuTriangleAlert,LuWorkflow} from "react-icons/lu";@@ -466,35 +467,38 @@ const BillOfProcess = ({setSelectedItemId(operationId);};- const onRemoveItem = async (id: string) => {+ // One request for every saved row, so "Delete Selected" removes the checked+ // rows together rather than racing one fetcher submit per row.+ const onRemoveItems = (ids: string[]) => {if (isReadOnly) return;- const operation = operationsById.get(id);- if (!operation) return;+ const without = <T,>(state: Record<string, T>) =>+ Object.fromEntries(+ Object.entries(state).filter(([id]) => !ids.includes(id))+ );- // Check if this is a temporary item (exists in temporaryItems state)- if (temporaryItems[id]) {- setTemporaryItems((prev) => {- const { [id]: _, ...rest } = prev;- return rest;+ // Temporary rows were never saved: dropping them from state is enough.+ setTemporaryItems(without);+ const savedIds = ids.filter((id) => !temporaryItems[id]);+ if (savedIds.length > 0) {+ const formData = new FormData();+ for (const id of savedIds) formData.append("id", id);+ deleteOperationFetcher.submit(formData, {+ method: "post",+ action: path.to.methodOperationsDelete});- } else {- deleteOperationFetcher.submit(- { id },- {- method: "post",- action: path.to.methodOperationsDelete- }- );}setSelectedItemId(null);- setOrderState((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });+ setOrderState(without);+ setCheckedState(without);};+ const onRemoveItem = (id: string) => onRemoveItems([id]);+ const checkedIds = items+ .filter((item) => item.checked)+ .map((item) => item.id);+const [tabChangeRerender, setTabChangeRerender] = useState<number>(1);const renderListItem = ({item,@@ -849,6 +853,16 @@ const BillOfProcess = ({<CardAction><div className="flex items-center gap-2">+ {checkedIds.length > 1 && (+ <Button+ variant="destructive"+ leftIcon={<LuTrash />}+ isDisabled={isReadOnly}+ onClick={() => onRemoveItems(checkedIds)}+ >+ <Trans>Delete Selected</Trans>+ </Button>+ )}<Buttonref={addOperationButtonRef}variant="secondary"diff --git a/apps/erp/app/modules/production/AGENTS.md b/apps/erp/app/modules/production/AGENTS.mdindex c4d9edd046..97f16d67ae 100644--- a/apps/erp/app/modules/production/AGENTS.md+++ b/apps/erp/app/modules/production/AGENTS.md@@ -120,7 +120,7 @@ pnpm --filter erp test- `nextJobPriority(siblings, deadlineType)` — pure: a job's fractional priority among the jobs already on its date, by deadline type; `calculateJobPriority` reads the siblings and calls it, the planning date apply places a batch with it. `deadlineTypeForPlanningDate(deadlineType)` — the type a job carries once planning gives it a date (No Deadline → Soft Deadline)- **Job status** (`production.server.ts`, all published except `planDraftJob`) — the job header's buttons post to `x+/job+/$jobId.status.tsx`, which maps the status to one operation: Planned → `planDraftJob` (Draft only), Paused → `pauseJob` (from Ready / In Progress), Ready → `resumeJob` (from Paused; refuses blocked manufacturing and the Make to Asset rules, then recalculates and runs MRP), Draft / In Progress → `reopenJob` (Cancelled → Draft, Completed → In Progress), Closed → `closeJob` (from Completed, then `service.closeJob` writes the remaining WIP off as production variance), Cancelled → `cancelJob`. Each flip is guarded on its from-statuses (`moveJobStatus`). Complete is `completeJob` (`x+/job+/$jobId.complete.tsx`): `complete_job_to_inventory`, then the picked-material return (a failure there is a `warning`).- **Job edits** (`production.server.ts`, published) — `updateJobDetails` (the details form), `configureJob`, `createJob` (`x+/job+/new.tsx`: the records must be the company's, refused for an item an unreleased change notice holds and for a Make to Asset item that cannot complete to an asset; the route shows those two on the item field), `createJobs` (`x+/job+/bulk.new.tsx`), `insertJob` (the API's and workflows' create: Draft or Planned only), `createSalesOrderLineJob` (unpublished, `x+/sales-order+/$orderId.$lineId.job.tsx`; the line must be on the order) and `convertSalesOrderLinesToJobs` (`$orderId.lines.jobs.tsx`). Every job creation goes through `jobCreationRefusal` (the records are the company's, no unreleased change notice holds the item, the Make to Asset rule); `orderPlannedJobs` skips an item a change notice holds. `deleteJobs` and the property panel's / jobs table's field writes through `x+/job+/update.tsx` — `setJobItem` (re-pulls the method), `setJobDeadline` (re-ranks priority, one read and one write for all jobs), `setJobQuantity` (recalculates), `setJobSalesOrderLine`, `setJobFields` — and `updateJobDetails` and `configureJob` refuse a locked job (`readUnlockedJobs` / `requireJob`).-- **Job method** (`production.server.ts`, published) — Get Method is `copyMethodToJob` (`upsertJobMethod`, then the job's requirements and dependencies) and `copyMethodToMaterial`; `createJobMaterial` / `updateJobMaterial` / `deleteJobMaterial` and `createJobOperation` / `updateJobOperation` / `deleteJobOperation` / `reorderJobOperations` / `setJobOperationStatus` (a Done operation returns its unconsumed picks) / `setJobOperationDueDate` / `syncJobOperationProcedure` back the bill of material and bill of process routes under `x+/job+/methods+/`; Get Method and the material, operation and procedure writes refuse a locked job (`requireJob`). Save Method (`x+/job+/methods+/save.tsx`) is `upsertMakeMethodFromJob` / `upsertMakeMethodFromJobMethod`: parts update and the target method's revision lock, as the items' Save Method. `completeOperation` (published) reports a good quantity on an untracked operation: it records it, backflushes (`issue`), and at the target sets the operation Done, posts its ended events and returns its picks. `createProductionEvent` / `updateProductionEvent` save a production event and post an ended one to the GL (`post-production-event`; a skipped posting is returned as `postingError`). `createProductionQuantity` records a production quantity (refuses a locked job, keeps a scrap reason only on Scrap); `updateProductionQuantity` corrects one and needs accounting update, so it is not published. The procedure properties panel posts to `setProcedureFields`. The bare row writes (`upsertJobMaterial`, `upsertJobOperation`, `upsertJobMethod`, `upsertProductionEvent`, `updateJob`) are building blocks in `production.service.ts` and are never tools.+- **Job method** (`production.server.ts`, published) — Get Method is `copyMethodToJob` (`upsertJobMethod`, then the job's requirements and dependencies) and `copyMethodToMaterial`; `createJobMaterial` / `updateJobMaterial` / `deleteJobMaterial` / `deleteJobMaterials` and `createJobOperation` / `updateJobOperation` / `deleteJobOperation` / `deleteJobOperations` (the plural two are unpublished: Delete Selected, one recalculation) / `reorderJobOperations` / `setJobOperationStatus` (a Done operation returns its unconsumed picks) / `setJobOperationDueDate` / `syncJobOperationProcedure` back the bill of material and bill of process routes under `x+/job+/methods+/`; Get Method and the material, operation and procedure writes refuse a locked job (`requireJob`). Save Method (`x+/job+/methods+/save.tsx`) is `upsertMakeMethodFromJob` / `upsertMakeMethodFromJobMethod`: parts update and the target method's revision lock, as the items' Save Method. `completeOperation` (published) reports a good quantity on an untracked operation: it records it, backflushes (`issue`), and at the target sets the operation Done, posts its ended events and returns its picks. `createProductionEvent` / `updateProductionEvent` save a production event and post an ended one to the GL (`post-production-event`; a skipped posting is returned as `postingError`). `createProductionQuantity` records a production quantity (refuses a locked job, keeps a scrap reason only on Scrap); `updateProductionQuantity` corrects one and needs accounting update, so it is not published. The procedure properties panel posts to `setProcedureFields`. The bare row writes (`upsertJobMaterial`, `upsertJobOperation`, `upsertJobMethod`, `upsertProductionEvent`, `updateJob`) are building blocks in `production.service.ts` and are never tools.- `cancelJob` (`production.server.ts`, published as `production_cancelJob`) — the one cancel path, used by the job page's Cancel (`x+/job+/$jobId.cancel.tsx`), the status route and planning's Cancel action: refuses another company's job (`notFound`), sets Cancelled and clears the assignee only while the job is in `fromStatuses` (default `CANCELLABLE_JOB_STATUSES`; a refusal is a `conflict` and changes nothing), then returns its unconsumed picked material (`post-picking` `returnJobRemainders`, which sweeps only a Completed or Cancelled job) and cancels its open picking-list lines; a failure of either is a `warning`, the job stays Cancelled. Pinned by `test/database/cancel-job.test.ts`. Planning edits a job only while `isJobEditableFromPlanning` (`production.models.ts`: Draft / Planned)- `getPlanningActions` / `getPlanningActionsByIds` — the persisted MRP worklist (`planningAction`, written by `generatePlanningActions` in `@carbon/planning` after every MRP run; statuses `Open` / `Dismissed` / `Actioned`). `dismissPlanningActions` / `reopenDismissedPlanningActions` (Dismissed ↔ Open; both return the ids they changed, which the routes report), `markPlanningActionsActioned` (the conditional Open → Actioned claim that is the apply path's lock — an empty result means another apply got there first; it returns the row's suggested quantity and date, which Apply writes instead of the page's possibly stale read) and `reopenPlanningActions` (its rollback, Actioned → Open), `assignPlanningActions` (sets the assignee and marks it overridden so the next MRP run keeps it; Open and Dismissed rows only, returning the ids it changed). `settleNewSupplyPlanningActions` is the page's Order button's settle: the suggested orders it submits carry no action id, so after the PO lines (`Order`) or jobs (`Make`) are created it flips the Open / Dismissed action of each ordered (item, week) pair at the location to Actioned — otherwise the suggestion stayed on the page beside its order until the next MRP run. An Apply reads its actions (`getPlanningActionsByIds`) and their jobs / PO lines in one statement each (Kysely, the ids as parameters — never a PostgREST URL), then applies set-based: `applyProductionPlanningDateActions(db, …)` moves every Expedite / Defer in one transaction (the claim, the jobs, the jobs already on the target dates, one UPDATE of due date + deadline type + priority via the pure `nextJobPriority` — a "No Deadline" job becomes `Soft Deadline`, `deadlineTypeForPlanningDate`, since the job form hides the due date for No Deadline), and the route sends one `schedule-inputs-changed` event for the batch; Increase / Decrease / Cancel call postings with their own transactions, so they run per job, three jobs at a time, each claimed right before its change. The transaction-scoped claim and release live in `planning-action-claims.ts` (`claimPlanningActions` / `releasePlanningActionClaims`), shared with purchasing's `applyPurchasingPlanningActions`. Bad input to either planning route answers 400, a failed read or write 500. `releasePlanningActionClaim` gives a failed per-job apply's claim back (deleting it instead when MRP has already written an Open row for the same need), and `updatePlanningJob` is planning's single-job write (the drawer's inline edit, and Increase / Decrease), guarded on Draft / Planned in the UPDATE itself; a quantity change restates `scrapQuantity` from the item's scrap rate. `planDraftJob` (`production.server.ts`) is the drawer's Plan on a Draft job (`planJob` intent), in `releaseJobs`' order: the requirements recalculation (a failure leaves the job Draft), the guarded Draft → Planned flip, then MRP, so the job counts as supply. It sends no scheduler notice — the scheduler places only released jobs. `replanAfterItemChange` (`production.server.ts`) runs MRP after an item's planning or manufacturing settings are saved, so the planning pages follow them at once. `planningAction` is read-only through the API; its writers use the service role. Applied from `x+/production+/planning.update.tsx` (one service-function call per `action`: `order` (`orderPlannedJobs`), `updateJob` (`updatePlannedJob`), `planJob` (`planJobFromPlanning`), `apply` and its typed aliases (`applyPlanningActions`), `dismiss` (`dismissProductionPlanningActions`), `reopen` (`reopenProductionPlanningActions`), `assign` (`assignProductionPlanningActions`); a dismiss / reopen / assign that changes nothing is a `conflict`) and `x+/purchasing+/planning.update.tsx`; `usePlanningActions` reads both routes' answers; UI in `ui/Planning/`: `ProductionPlanningTable` + `ProductionPlanningOrderDrawer`, `planningColumns.tsx` (the column set shared with purchasing: the Stock Availability week strip via `PlanningWeekStrip` + `planning-week-geometry.ts`, `LatestOrderDate`, `PlanningFence` + `planning-fence.ts`), `PlanningActionLines` (the expanded row), `PlanningOrderGrids` + `PlanningDrawerParts` (the drawer's suggested / open-order grids, `periodIdFor`, the "N More After" button), `usePlanningActions` (the dismiss / reopen / assign / apply fetcher), and `planning-action-scope.ts` (`resolvePlanningActionScope`, `actionsOfTypes`, `PLANNING_ACTIONS_COLUMN`, `PLANNING_ASSIGNEE_COLUMN`, `PLANNING_DRAWER_PARAM` — pure, re-exported from `production.models.ts` so vitest can import it), `planned-orders-from-actions.ts` (pure: the drawer's suggested orders, the row's Order / Make quantity and a bulk order are the item's open Order / Make actions — `openNewSupplyActions`, `plannedOrdersFromActions`, `productionOrdersFromActions`, `supplierConversionFactor` — never sized again on screen, so a shortfall MRP folded into an Increase is not offered twice), `planning-increase.ts` (pure: `chartedOrderQuantity` charts an order at its open Increase), and `planning-review.ts` (pure: `planningActionNeedsReview` — Review vs Apply from the order's LIVE status, `purchaseOrderStatus` / `jobStatus` from `getPlanningActions`, not MRP's run-time `requiresManualAction` stamp, so a PO reopened since applies at once; a date move on a supplier-promised line stays Review — and `purchaseOrderPlanningMenu`, which order commands a row's ⋯ offers; `PlanningActionHandlers.purchaseOrderMenuItems` carries them, purchasing only). Both planning grids put the open order drawer's item in the address (`?item=<itemId>`, `useLinkedDrawerItem` in `~/hooks/useDrawerItem`), so a link reopens it; the loader reads that row on its own (`drawerItem`) when it is not on the page. Tests: `planning-action-writes.test.ts`, `apps/erp/test/apply-production-planning-date-actions.test.ts`, `planning-action-scope.test.ts`, `planning-fence.test.ts`, `planning-increase.test.ts`, `planning-review.test.ts`, `planned-orders-from-actions.test.ts`, `planning-week-geometry.test.ts`- `upsertMaintenanceDispatch` / `upsertMaintenanceSchedule` — maintenance managementdiff --git a/apps/erp/app/modules/production/production.server.ts b/apps/erp/app/modules/production/production.server.tsindex 4bb04e1527..09d94f7441 100644--- a/apps/erp/app/modules/production/production.server.ts+++ b/apps/erp/app/modules/production/production.server.ts@@ -2443,6 +2443,41 @@ export const deleteJobMaterial = defineServiceFn({}});+/**+ * Remove several materials from a job's methods.+ *+ * @remarks+ * The bill of material's Delete Selected: `deleteJobMaterial` for many rows,+ * with the job's operation dependencies recalculated once.+ */+export const deleteJobMaterials = defineServiceFn({+ input: z.object({ jobId: z.string(), ids: z.array(z.string()).min(1) }),+ permission: { delete: "production" },++ async run(ctx, { jobId, ids }) {+ const job = await service.requireJob(ctx, jobId);+ if (job instanceof CarbonError) return job;+ const deleted = await ctx.asCaller.supabase+ .from("jobMaterial")+ .delete()+ .in("id", ids)+ .eq("jobId", jobId)+ .eq("companyId", ctx.company.id);+ if (deleted.error) {+ return ctx.error(+ "internal",+ "Failed to delete job materials",+ deleted.error+ );+ }+ const recalculated = await service.recalculateJob(ctx, jobId, {+ requirements: false+ });+ if (recalculated) return recalculated;+ return { ids };+ }+});+/*** Add an operation to a job's method.*@@ -2579,6 +2614,58 @@ export const deleteJobOperation = defineServiceFn({}});+/**+ * Remove several operations from a job's methods.+ *+ * @remarks+ * The bill of process's Delete Selected: `deleteJobOperation` for many rows.+ * Refused when any of them has recorded production events; the job's+ * operation dependencies are recalculated once.+ */+export const deleteJobOperations = defineServiceFn({+ input: z.object({ jobId: z.string(), ids: z.array(z.string()).min(1) }),+ permission: { delete: "production" },++ async run(ctx, { jobId, ids }) {+ const job = await service.requireJob(ctx, jobId);+ if (job instanceof CarbonError) return job;+ const client = ctx.asCaller.supabase;+ const events = await client+ .from("productionEvent")+ .select("id", { count: "exact", head: true })+ .in("jobOperationId", ids)+ .eq("companyId", ctx.company.id);+ if (events.error) {+ return ctx.error(+ "internal",+ "Failed to check for recorded production events",+ events.error+ );+ }+ if ((events.count ?? 0) > 0) {+ return ctx.error(+ "rule",+ "Cannot delete an operation that has recorded production events"+ );+ }++ const deleted = await client+ .from("jobOperation")+ .delete()+ .in("id", ids)+ .eq("jobId", jobId)+ .eq("companyId", ctx.company.id);+ if (deleted.error) {+ return ctx.error("internal", deleted.error.message, deleted.error);+ }+ const recalculated = await service.recalculateJob(ctx, jobId, {+ requirements: false+ });+ if (recalculated) return recalculated;+ return { ids };+ }+});+/*** Reorder a job's operations.*diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsxindex 0adb936104..80f4e03e0f 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx@@ -42,7 +42,8 @@ import {LuGitPullRequestCreate,LuGitPullRequestCreateArrow,LuPackage,- LuRedoDot+ LuRedoDot,+ LuTrash} from "react-icons/lu";import { useFetchers, useParams } from "react-router";import type { z } from "zod";@@ -99,6 +100,7 @@ import type { Job } from "../../types";type Material = z.infer<typeof jobMaterialValidator> & {requiresBatchTracking: boolean;requiresSerialTracking: boolean;+ quantityIssued?: number | null;item?: {replenishmentSystem: string | null;} | null;@@ -334,29 +336,42 @@ const JobBillOfMaterial = ({}));};- const onRemoveItem = async (id: string) => {+ // One request for every saved row, so "Delete Selected" removes the checked+ // rows together rather than racing one fetcher submit per row.+ const onRemoveItems = (ids: string[]) => {if (!permissions.can("update", "production") || isDisabled) return;- // Check if this is a temporary item (exists in temporaryItems state)- if (temporaryItems[id]) {- setTemporaryItems((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });- } else {- fetcher.submit(new FormData(), {+ const without = <T,>(state: Record<string, T>) =>+ Object.fromEntries(+ Object.entries(state).filter(([id]) => !ids.includes(id))+ );++ // Temporary rows were never saved: dropping them from state is enough.+ setTemporaryItems(without);+ const savedIds = ids.filter((id) => !temporaryItems[id]);+ if (savedIds.length > 0) {+ const formData = new FormData();+ for (const id of savedIds) formData.append("id", id);+ fetcher.submit(formData, {method: "post",- action: path.to.deleteJobMaterial(jobId, id)+ action: path.to.deleteJobMaterials(jobId)});}setSelectedItemId(null);- setOrderState((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });+ setOrderState(without);+ setCheckedState(without);};+ const onRemoveItem = (id: string) => onRemoveItems([id]);+ const checkedIds = items+ .filter((item) => item.checked)+ .map((item) => item.id);+ // Material already issued to the job has stock movements against it.+ const hasIssuedChecked = items.some(+ (item) => item.checked && (item.data.quantityIssued ?? 0) > 0+ );+const onReorder = (items: ItemWithData[]) => {if (!permissions.can("update", "production") || isDisabled) return;@@ -504,14 +519,28 @@ const JobBillOfMaterial = ({</CardHeader><CardAction>- <Button- ref={addItemButtonRef}- variant="secondary"- isDisabled={isDisabled || !permissions.can("update", "production")}- onClick={onAddItem}- >- <Trans>Add Item</Trans>- </Button>+ <div className="flex items-center gap-2">+ {checkedIds.length > 1 && (+ <Button+ variant="destructive"+ leftIcon={<LuTrash />}+ isDisabled={isReadOnly || hasIssuedChecked}+ onClick={() => onRemoveItems(checkedIds)}+ >+ <Trans>Delete Selected</Trans>+ </Button>+ )}+ <Button+ ref={addItemButtonRef}+ variant="secondary"+ isDisabled={+ isDisabled || !permissions.can("update", "production")+ }+ onClick={onAddItem}+ >+ <Trans>Add Item</Trans>+ </Button>+ </div></CardAction></HStack><CardContent>diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsxindex 8f33687601..6678bb71f7 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx@@ -90,6 +90,7 @@ import {LuSend,LuShieldX,LuSquareChartGantt,+ LuTrash,LuTriangleAlert,LuWorkflow} from "react-icons/lu";@@ -595,7 +596,7 @@ const JobBillOfProcess = ({const isReadOnly = isDisabled || !permissions.can("update", "production");const onToggleItem = (id: string) => {- if (!permissions.can("update", "parts")) return;+ if (isReadOnly) return;setCheckedState((prev) => ({...prev,[id]: !prev[id]@@ -624,34 +625,38 @@ const JobBillOfProcess = ({setSelectedItemId(operationId);};- const onRemoveItem = async (id: string) => {- if (!permissions.can("update", "production")) return;+ // One request for every saved row, so "Delete Selected" removes the checked+ // rows together rather than racing one fetcher submit per row.+ const onRemoveItems = (ids: string[]) => {+ if (isReadOnly) return;- const operation = operationsById.get(id);- if (!operation) return;+ const without = <T,>(state: Record<string, T>) =>+ Object.fromEntries(+ Object.entries(state).filter(([id]) => !ids.includes(id))+ );- if (temporaryItems[id]) {- setTemporaryItems((prev) => {- const { [id]: _, ...rest } = prev;- return rest;+ // Temporary rows were never saved: dropping them from state is enough.+ setTemporaryItems(without);+ const savedIds = ids.filter((id) => !temporaryItems[id]);+ if (savedIds.length > 0) {+ const formData = new FormData();+ for (const id of savedIds) formData.append("id", id);+ deleteOperationFetcher.submit(formData, {+ method: "post",+ action: path.to.jobOperationsDelete(jobId)});- } else {- deleteOperationFetcher.submit(- { id },- {- method: "post",- action: path.to.jobOperationsDelete(jobId)- }- );}setSelectedItemId(null);- setOrderState((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });+ setOrderState(without);+ setCheckedState(without);};+ const onRemoveItem = (id: string) => onRemoveItems([id]);+ const checkedIds = items+ .filter((item) => item.checked)+ .map((item) => item.id);+const onReorder = (items: ItemWithData[]) => {if (!permissions.can("update", "production") || isDisabled) return;const newItems = items.map((item, index) => ({@@ -1052,18 +1057,30 @@ const JobBillOfProcess = ({</CardHeader><CardAction>- <Button- ref={addOperationButtonRef}- variant="secondary"- isDisabled={- !permissions.can("update", "production") ||- selectedItemId !== null ||- isDisabled- }- onClick={onAddItem}- >- <Trans>Add Operation</Trans>- </Button>+ <div className="flex items-center gap-2">+ {checkedIds.length > 1 && (+ <Button+ variant="destructive"+ leftIcon={<LuTrash />}+ isDisabled={isReadOnly}+ onClick={() => onRemoveItems(checkedIds)}+ >+ <Trans>Delete Selected</Trans>+ </Button>+ )}+ <Button+ ref={addOperationButtonRef}+ variant="secondary"+ isDisabled={+ !permissions.can("update", "production") ||+ selectedItemId !== null ||+ isDisabled+ }+ onClick={onAddItem}+ >+ <Trans>Add Operation</Trans>+ </Button>+ </div></CardAction></HStack><CardContent>diff --git a/apps/erp/app/modules/sales/AGENTS.md b/apps/erp/app/modules/sales/AGENTS.mdindex b665751293..13da7f5635 100644--- a/apps/erp/app/modules/sales/AGENTS.md+++ b/apps/erp/app/modules/sales/AGENTS.md@@ -95,8 +95,10 @@ the ones tagged `@mcp` as `sales_<name>`:`convertQuote`, `attachQuoteFile`; `createQuoteLine` / `updateQuoteLine` /`configureQuoteLine` / `copyItemMethodToQuoteLine` / `copyQuoteLineMethod`;`createQuoteMaterial` / `updateQuoteMaterial` / `deleteQuoteMaterialAndReprice` /+ `deleteQuoteMaterialsAndReprice` (unpublished, Delete Selected: many rows, one reprice) /`copyItemMethodToQuoteMaterial`; `createQuoteOperation` / `updateQuoteOperation` /- `deleteQuoteOperationAndReprice`; `acceptDigitalQuote` / `rejectDigitalQuote`+ `deleteQuoteOperationAndReprice` / `deleteQuoteOperationsAndReprice` (unpublished, Delete+ Selected: operations of one line, one reprice); `acceptDigitalQuote` / `rejectDigitalQuote`(system only: the public share link runs them through `shareLinkContext`, `~/modules/service-context.server`)- Orders: `updateSalesOrderDetails`, `setSalesOrderStatus`, `updateSalesOrderField`,`confirmSalesOrder`; `createSalesOrderLine` / `updateSalesOrderLine` / `shipSalesOrderLine`diff --git a/apps/erp/app/modules/sales/sales.server.ts b/apps/erp/app/modules/sales/sales.server.tsindex 448c256525..be9f1dab4b 100644--- a/apps/erp/app/modules/sales/sales.server.ts+++ b/apps/erp/app/modules/sales/sales.server.ts@@ -3226,6 +3226,47 @@ export const deleteQuoteMaterialAndReprice = defineServiceFn({return { id };}});++/**+ * Remove several materials from a quote line's method, then reprice the line+ * once.+ *+ * @remarks+ * The bill of material's Delete Selected. The line must be this company's;+ * only materials of that line are deleted.+ */+export const deleteQuoteMaterialsAndReprice = defineServiceFn({+ input: z.object({+ quoteId: z.string(),+ quoteLineId: z.string(),+ ids: z.array(z.string()).min(1)+ }),+ permission: { delete: "sales" },++ async run(ctx, { quoteId, quoteLineId, ids }) {+ const refused = await refuseUnlessOwned(ctx, "quoteLine", {+ id: quoteLineId,+ quoteId+ });+ if (refused) return refused;++ const deleted = await ctx.asCaller.supabase+ .from("quoteMaterial")+ .delete()+ .in("id", ids)+ .eq("quoteLineId", quoteLineId)+ .eq("companyId", ctx.company.id);+ if (deleted.error) {+ return ctx.error(+ "internal",+ "Failed to delete quote materials",+ deleted.error+ );+ }+ await service.repriceQuoteLine(ctx, { quoteId, quoteLineId });+ return { ids };+ }+});const quoteOperationInput = quoteOperationValidator.safeExtend({quoteId: z.string(),quoteLineId: z.string(),@@ -3347,6 +3388,62 @@ export const deleteQuoteOperationAndReprice = defineServiceFn({}});+/**+ * Remove several operations from one quote line's method, then reprice the+ * line once.+ *+ * @remarks+ * The bill of process's Delete Selected. Every operation must belong to the+ * same quote line.+ */+export const deleteQuoteOperationsAndReprice = defineServiceFn({+ input: z.object({ ids: z.array(z.string()).min(1) }),+ permission: { delete: "sales" },++ async run(ctx, { ids }) {+ const client = ctx.asCaller.supabase;+ const companyId = ctx.company.id;+ const operations = await client+ .from("quoteOperation")+ .select("quoteId, quoteLineId")+ .in("id", ids)+ .eq("companyId", companyId);+ if (operations.error) {+ return ctx.error(+ "internal",+ "Failed to load the quote operations",+ operations.error+ );+ }+ const lines = new Map(+ operations.data.map((op) => [op.quoteLineId, op.quoteId])+ );+ if (lines.size !== 1) {+ return ctx.error(+ "validation",+ "The operations must belong to one quote line"+ );+ }+ const [[quoteLineId, quoteId]] = lines;++ const deleted = await client+ .from("quoteOperation")+ .delete()+ .in("id", ids)+ .eq("quoteLineId", quoteLineId)+ .eq("companyId", companyId);+ if (deleted.error) {+ return ctx.error(+ "internal",+ "Failed to delete quote operations",+ deleted.error+ );+ }+ await service.repriceQuoteLine(ctx, { quoteId, quoteLineId });+ return { ids };+ }+});+// --- Contracts --------------------------------------------------------------/*** Create a Draft contract.diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsxindex d3d359998e..d3fb32fbd4 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx@@ -45,7 +45,8 @@ import {LuGitPullRequest,LuGitPullRequestCreate,LuGitPullRequestCreateArrow,- LuRedoDot+ LuRedoDot,+ LuTrash} from "react-icons/lu";import { useFetchers, useParams } from "react-router";import type { z } from "zod";@@ -333,29 +334,38 @@ const QuoteBillOfMaterial = ({}));};- const onRemoveItem = async (id: string) => {+ // One request for every saved row, so "Delete Selected" removes the checked+ // rows together rather than racing one fetcher submit per row.+ const onRemoveItems = (ids: string[]) => {if (!permissions.can("update", "sales") || isDisabled) return;- // Check if this is a temporary item (exists in temporaryItems state)- if (temporaryItems[id]) {- setTemporaryItems((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });- } else {- fetcher.submit(new FormData(), {+ const without = <T,>(state: Record<string, T>) =>+ Object.fromEntries(+ Object.entries(state).filter(([id]) => !ids.includes(id))+ );++ // Temporary rows were never saved: dropping them from state is enough.+ setTemporaryItems(without);+ const savedIds = ids.filter((id) => !temporaryItems[id]);+ if (savedIds.length > 0) {+ const formData = new FormData();+ for (const id of savedIds) formData.append("id", id);+ fetcher.submit(formData, {method: "post",- action: path.to.deleteQuoteMaterial(quoteId, lineId, id)+ action: path.to.deleteQuoteMaterials(quoteId, lineId)});}setSelectedItemId(null);- setOrderState((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });+ setOrderState(without);+ setCheckedState(without);};+ const onRemoveItem = (id: string) => onRemoveItems([id]);+ const checkedIds = items+ .filter((item) => item.checked)+ .map((item) => item.id);+const updateSortOrder = useDebounce((updates: Record<string, number>) => {let formData = new FormData();@@ -483,14 +493,26 @@ const QuoteBillOfMaterial = ({</CardHeader><CardAction>- <Button- ref={addItemButtonRef}- variant="secondary"- isDisabled={isDisabled || !permissions.can("update", "sales")}- onClick={onAddItem}- >- <Trans>Add Item</Trans>- </Button>+ <div className="flex items-center gap-2">+ {checkedIds.length > 1 && (+ <Button+ variant="destructive"+ leftIcon={<LuTrash />}+ isDisabled={isReadOnly}+ onClick={() => onRemoveItems(checkedIds)}+ >+ <Trans>Delete Selected</Trans>+ </Button>+ )}+ <Button+ ref={addItemButtonRef}+ variant="secondary"+ isDisabled={isDisabled || !permissions.can("update", "sales")}+ onClick={onAddItem}+ >+ <Trans>Add Item</Trans>+ </Button>+ </div></CardAction></HStack><CardContent>diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsxindex d6415cc644..e1dbf1bc92 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx@@ -62,6 +62,7 @@ import {LuListChecks,LuMaximize2,LuMinimize2,+ LuTrash,LuTriangleAlert} from "react-icons/lu";import { useFetcher, useFetchers, useParams } from "react-router";@@ -395,7 +396,7 @@ const QuoteBillOfProcess = ({const onUploadImage = useImageUpload(`opportunity-line/${selectedItemId}`);const onToggleItem = (id: string) => {- if (!permissions.can("update", "parts")) return;+ if (isReadOnly) return;setCheckedState((prev) => ({...prev,[id]: !prev[id]@@ -425,34 +426,38 @@ const QuoteBillOfProcess = ({setSelectedItemId(operationId);};- const onRemoveItem = async (id: string) => {- if (!permissions.can("update", "sales")) return;+ // One request for every saved row, so "Delete Selected" removes the checked+ // rows together rather than racing one fetcher submit per row.+ const onRemoveItems = (ids: string[]) => {+ if (isReadOnly) return;- const operation = operationsById.get(id);- if (!operation) return;+ const without = <T,>(state: Record<string, T>) =>+ Object.fromEntries(+ Object.entries(state).filter(([id]) => !ids.includes(id))+ );- if (temporaryItems[id]) {- setTemporaryItems((prev) => {- const { [id]: _, ...rest } = prev;- return rest;+ // Temporary rows were never saved: dropping them from state is enough.+ setTemporaryItems(without);+ const savedIds = ids.filter((id) => !temporaryItems[id]);+ if (savedIds.length > 0) {+ const formData = new FormData();+ for (const id of savedIds) formData.append("id", id);+ deleteOperationFetcher.submit(formData, {+ method: "post",+ action: path.to.quoteOperationsDelete});- } else {- deleteOperationFetcher.submit(- { id },- {- method: "post",- action: path.to.quoteOperationsDelete- }- );}setSelectedItemId(null);- setOrderState((prev) => {- const { [id]: _, ...rest } = prev;- return rest;- });+ setOrderState(without);+ setCheckedState(without);};+ const onRemoveItem = (id: string) => onRemoveItems([id]);+ const checkedIds = items+ .filter((item) => item.checked)+ .map((item) => item.id);+const onReorder = (items: ItemWithData[]) => {if (!permissions.can("update", "sales") || isDisabled) return;const newItems = items.map((item, index) => ({@@ -779,18 +784,30 @@ const QuoteBillOfProcess = ({</CardHeader><CardAction>- <Button- ref={addOperationButtonRef}- variant="secondary"- isDisabled={- !permissions.can("update", "sales") ||- selectedItemId !== null ||- isDisabled- }- onClick={onAddItem}- >- <Trans>Add Operation</Trans>- </Button>+ <div className="flex items-center gap-2">+ {checkedIds.length > 1 && (+ <Button+ variant="destructive"+ leftIcon={<LuTrash />}+ isDisabled={isReadOnly}+ onClick={() => onRemoveItems(checkedIds)}+ >+ <Trans>Delete Selected</Trans>+ </Button>+ )}+ <Button+ ref={addOperationButtonRef}+ variant="secondary"+ isDisabled={+ !permissions.can("update", "sales") ||+ selectedItemId !== null ||+ isDisabled+ }+ onClick={onAddItem}+ >+ <Trans>Add Operation</Trans>+ </Button>+ </div></CardAction></HStack><CardContent>diff --git a/apps/erp/app/routes/x+/items+/methods+/material.delete.$id.tsx b/apps/erp/app/routes/x+/items+/methods+/material.delete.$id.tsxdeleted file mode 100644index 423665ad5b..0000000000--- a/apps/erp/app/routes/x+/items+/methods+/material.delete.$id.tsx+++ /dev/null@@ -1,55 +0,0 @@-// SPDX-License-Identifier: AGPL-3.0-only-// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,-// including ports, remain AGPLv3; serving them over a network requires releasing their source.--import { assertIsPost, error, success } from "@carbon/auth";-import { requirePermissions } from "@carbon/auth/auth.server";-import { flash } from "@carbon/auth/session.server";-import type { ActionFunctionArgs } from "react-router";-import { data } from "react-router";-import {- checkRevisionLock,- deleteMethodMaterial-} from "~/modules/items/items.service";--export async function action({ request, params }: ActionFunctionArgs) {- assertIsPost(request);- const { client, companyId } = await requirePermissions(request, {- delete: "parts"- });-- const { id } = params;- if (!id) {- throw new Error("id not found");- }-- // Release-lock gate: block edits to a released (Production) revision unless a- // change notice is used. enforce -> block; warn -> proceed + flash; off -> no-op.- const lock = await checkRevisionLock(client, {- kind: "material",- id,- companyId- });- if (!lock.ok) {- return data({ id: null }, await flash(request, error(null, lock.message)));- }-- const deleteMaterial = await deleteMethodMaterial(client, id);- if (deleteMaterial.error) {- return data(- {- id: null- },- await flash(- request,- error(deleteMaterial.error, "Failed to delete method material")- )- );- }-- if (lock.warn) {- return data({}, await flash(request, success(lock.message)));- }-- return {};-}diff --git a/apps/erp/app/routes/x+/items+/methods+/material.delete.tsx b/apps/erp/app/routes/x+/items+/methods+/material.delete.tsxnew file mode 100644index 0000000000..396c6e088b--- /dev/null+++ b/apps/erp/app/routes/x+/items+/methods+/material.delete.tsx@@ -0,0 +1,27 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Carbon (github.com/crbnos/carbon). Modified or adapted versions of this file,+// including ports, remain AGPLv3; serving them over a network requires releasing their source.++import { carbon } from "@carbon/api/carbon.server";+import { success } from "@carbon/auth";+import { flash } from "@carbon/auth/session.server";+import { validator } from "@carbon/form";+import type { ActionFunctionArgs } from "react-router";+import { data } from "react-router";+import { z } from "zod";+import { zfd } from "zod-form-data";++// One `id` per material, so the bill of material's Delete Selected is one+// request.+export async function action(args: ActionFunctionArgs) {+ const input = await validator(+ z.object({ id: zfd.repeatable(z.array(z.string().min(1)).min(1)) })+ ).request(args);+ if ("invalid" in input) return input.invalid;+ const api = await carbon(args.request);+ const result = await api.items.deleteMethodMaterials({ ids: input.data.id });+ if (result.data?.notice) {+ return data(result, await flash(args.request, success(result.data.notice)));+ }+ return result;+}diff --git a/apps/erp/app/routes/x+/items+/methods+/operation.delete.tsx b/apps/erp/app/routes/x+/items+/methods+/operation.delete.tsxindex cd4fa9fb63..62e8996054 100644--- a/apps/erp/app/routes/x+/items+/methods+/operation.delete.tsx+++ b/apps/erp/app/routes/x+/items+/methods+/operation.delete.tsx@@ -9,14 +9,17 @@ import { validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";import { data } from "react-router";import { z } from "zod";+import { zfd } from "zod-form-data";+// One `id` per operation, so the bill of process's Delete Selected is one+// request.export async function action(args: ActionFunctionArgs) {- const input = await validator(z.object({ id: z.string().min(1) })).request(- args- );+ const input = await validator(+ z.object({ id: zfd.repeatable(z.array(z.string().min(1)).min(1)) })+ ).request(args);if ("invalid" in input) return input.invalid;const api = await carbon(args.request);- const result = await api.items.deleteMethodOperation(input.data);+ const result = await api.items.deleteMethodOperations({ ids: input.data.id });if (result.data?.notice) {return data(result, await flash(args.request, success(result.data.notice)));}diff --git a/apps/erp/app/routes/x+/job+/methods+/$jobId.material.delete.$id.tsx b/apps/erp/app/routes/x+/job+/methods+/$jobId.material.delete.tsxsimilarity index 54%rename from apps/erp/app/routes/x+/job+/methods+/$jobId.material.delete.$id.tsxrename to apps/erp/app/routes/x+/job+/methods+/$jobId.material.delete.tsxindex 4d57822980..211b37de1f 100644--- a/apps/erp/app/routes/x+/job+/methods+/$jobId.material.delete.$id.tsx+++ b/apps/erp/app/routes/x+/job+/methods+/$jobId.material.delete.tsx@@ -5,10 +5,19 @@import { carbon } from "@carbon/api/carbon.server";import { validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";+import { z } from "zod";+import { zfd } from "zod-form-data";+// One `id` per material, so the bill of material's Delete Selected is one+// request and the job is recalculated once.export async function action(args: ActionFunctionArgs) {- const input = await validator().request(args, { params: ["jobId", "id"] });+ const input = await validator(+ z.object({ id: zfd.repeatable(z.array(z.string().min(1)).min(1)) })+ ).request(args, { params: ["jobId"] });if ("invalid" in input) return input.invalid;const api = await carbon(args.request);- return api.production.deleteJobMaterial(input.params);+ return api.production.deleteJobMaterials({+ jobId: input.params.jobId,+ ids: input.data.id+ });}diff --git a/apps/erp/app/routes/x+/job+/methods+/$jobId.operation.delete.tsx b/apps/erp/app/routes/x+/job+/methods+/$jobId.operation.delete.tsxindex b7b9fd5bdb..f1009a5d07 100644--- a/apps/erp/app/routes/x+/job+/methods+/$jobId.operation.delete.tsx+++ b/apps/erp/app/routes/x+/job+/methods+/$jobId.operation.delete.tsx@@ -6,16 +6,18 @@ import { carbon } from "@carbon/api/carbon.server";import { validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";import { z } from "zod";+import { zfd } from "zod-form-data";+// One `id` per operation, so the bill of process's Delete Selected is one+// request and the job is recalculated once.export async function action(args: ActionFunctionArgs) {- const input = await validator(z.object({ id: z.string().min(1) })).request(- args,- { params: ["jobId"] }- );+ const input = await validator(+ z.object({ id: zfd.repeatable(z.array(z.string().min(1)).min(1)) })+ ).request(args, { params: ["jobId"] });if ("invalid" in input) return input.invalid;const api = await carbon(args.request);- return api.production.deleteJobOperation({+ return api.production.deleteJobOperations({jobId: input.params.jobId,- id: input.data.id+ ids: input.data.id});}diff --git a/apps/erp/app/routes/x+/quote+/methods+/$quoteId.$lineId.material.delete.$id.tsx b/apps/erp/app/routes/x+/quote+/methods+/$quoteId.$lineId.material.delete.tsxsimilarity index 59%rename from apps/erp/app/routes/x+/quote+/methods+/$quoteId.$lineId.material.delete.$id.tsxrename to apps/erp/app/routes/x+/quote+/methods+/$quoteId.$lineId.material.delete.tsxindex b686d1e4ba..bf7b9719df 100644--- a/apps/erp/app/routes/x+/quote+/methods+/$quoteId.$lineId.material.delete.$id.tsx+++ b/apps/erp/app/routes/x+/quote+/methods+/$quoteId.$lineId.material.delete.tsx@@ -5,16 +5,20 @@import { carbon } from "@carbon/api/carbon.server";import { validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";+import { z } from "zod";+import { zfd } from "zod-form-data";+// One `id` per material, so the bill of material's Delete Selected is one+// request and the line is repriced once.export async function action(args: ActionFunctionArgs) {- const input = await validator().request(args, {- params: ["quoteId", "lineId", "id"]- });+ const input = await validator(+ z.object({ id: zfd.repeatable(z.array(z.string().min(1)).min(1)) })+ ).request(args, { params: ["quoteId", "lineId"] });if ("invalid" in input) return input.invalid;const api = await carbon(args.request);- return api.sales.deleteQuoteMaterialAndReprice({+ return api.sales.deleteQuoteMaterialsAndReprice({quoteId: input.params.quoteId,quoteLineId: input.params.lineId,- id: input.params.id+ ids: input.data.id});}diff --git a/apps/erp/app/routes/x+/quote+/methods+/operation.delete.tsx b/apps/erp/app/routes/x+/quote+/methods+/operation.delete.tsxindex 560dda3cfd..5986a649e8 100644--- a/apps/erp/app/routes/x+/quote+/methods+/operation.delete.tsx+++ b/apps/erp/app/routes/x+/quote+/methods+/operation.delete.tsx@@ -5,13 +5,16 @@import { carbon } from "@carbon/api/carbon.server";import { validator } from "@carbon/form";import type { ActionFunctionArgs } from "react-router";-import { deleteQuoteOperationAndReprice } from "~/modules/sales/sales.server";+import { z } from "zod";+import { zfd } from "zod-form-data";+// One `id` per operation, so the bill of process's Delete Selected is one+// request and the line is repriced once.export async function action(args: ActionFunctionArgs) {- const input = await validator(deleteQuoteOperationAndReprice.input).request(- args- );+ const input = await validator(+ z.object({ id: zfd.repeatable(z.array(z.string().min(1)).min(1)) })+ ).request(args);if ("invalid" in input) return input.invalid;const api = await carbon(args.request);- return api.sales.deleteQuoteOperationAndReprice(input.data);+ return api.sales.deleteQuoteOperationsAndReprice({ ids: input.data.id });}diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.tsindex a01e96b160..e0796ece19 100644--- a/apps/erp/app/utils/path.ts+++ b/apps/erp/app/utils/path.ts@@ -864,8 +864,8 @@ export const path = {deleteItemPostingGroup: (id: string) =>generatePath(`${x}/items/groups/delete/${id}`),deleteJob: (id: string) => generatePath(`${x}/job/${id}/delete`),- deleteJobMaterial: (jobId: string, id: string) =>- generatePath(`${x}/job/methods/${jobId}/material/delete/${id}`),+ deleteJobMaterials: (jobId: string) =>+ generatePath(`${x}/job/methods/${jobId}/material/delete`),deleteJobOperationParameter: (id: string) =>generatePath(`${x}/job/methods/operation/parameter/delete/${id}`),deleteJobOperationStep: (id: string) =>@@ -903,8 +903,7 @@ export const path = {generatePath(`${x}/material/${itemId}/purchasing/${id}/delete`),deleteMaterialType: (id: string) =>generatePath(`${x}/items/types/delete/${id}`),- deleteMethodMaterial: (id: string) =>- generatePath(`${x}/items/methods/material/delete/${id}`),+ deleteMethodMaterials: `${x}/items/methods/material/delete`,deleteMethodOperationParameter: (id: string) =>generatePath(`${x}/items/methods/operation/parameter/delete/${id}`),deleteMethodOperationStep: (id: string) =>@@ -967,10 +966,8 @@ export const path = {generatePath(`${x}/quote/${id}/${lineId}/delete`),deleteQuoteLineCost: (quoteId: string, lineId: string) =>generatePath(`${x}/quote/${quoteId}/${lineId}/cost/delete`),- deleteQuoteMaterial: (quoteId: string, lineId: string, id: string) =>- generatePath(- `${x}/quote/methods/${quoteId}/${lineId}/material/delete/${id}`- ),+ deleteQuoteMaterials: (quoteId: string, lineId: string) =>+ generatePath(`${x}/quote/methods/${quoteId}/${lineId}/material/delete`),deleteQuoteOperationParameter: (id: string) =>generatePath(`${x}/quote/methods/operation/parameter/delete/${id}`),deleteQuoteOperationStep: (id: string) =>diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 6d48b8a947..3a4bfe6e40 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -7548,6 +7548,9 @@ msgstr "Kundenauftrag löschen"msgid "Delete Schedule"msgstr "Zeitplan löschen"+msgid "Delete Selected"+msgstr "Ausgewählte löschen"+msgid "Delete Service"msgstr "Dienstleistung löschen"@@ -8441,7 +8444,7 @@ msgstr "Jede physische Einheit erhält ihre eigene verfolgte Einheit und eine ei#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Jeder Push ersetzt: {0}. Andere Änderungen bleiben bestehen."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "Der Verkäufer (oder Ersteller) jeder Mietvereinbarung oder eines Vertrags erhält eine tägliche Zusammenfassung seiner Rechnungen."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Zur Buchhaltung senden"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Pushes ändern nicht die Felder dieses Artikels. Daher bleiben hier vorgenommene Änderungen bestehen."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Pushes von Onshape stoppen die Aktualisierung dieses Artikels. Das erneute Pushen dieses Teils von Onshape stellt die Verknüpfung wieder her."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Pushes ersetzen nur die Felder, die auf der Seite „Felder\" von Onshape auf „Bei jedem Push aktualisieren\" eingestellt sind."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Legen Sie diese Gebühr auf einer separaten Rechnung ab, die vor der Buchung überprüft wird. Andernfalls wird sie auf der nächsten Rechnung der Vereinbarung eingefügt."diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex fb5ea8923b..2b48abdaa0 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -7548,6 +7548,9 @@ msgstr "Delete Sales Order"msgid "Delete Schedule"msgstr "Delete Schedule"+msgid "Delete Selected"+msgstr "Delete Selected"+msgid "Delete Service"msgstr "Delete Service"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 05252ca174..fbed5a960d 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -7548,6 +7548,9 @@ msgstr "Eliminar pedido de venta"msgid "Delete Schedule"msgstr "Eliminar Programa"+msgid "Delete Selected"+msgstr "Eliminar Seleccionados"+msgid "Delete Service"msgstr "Eliminar servicio"@@ -8441,7 +8444,7 @@ msgstr "Cada unidad física obtiene su propia entidad rastreada y número único#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Cada inserción reemplaza: {0}. Otros cambios permanecen."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "El vendedor de cada acuerdo de alquiler o contrato (o su creador) recibe un resumen diario de sus facturas."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Enviar a contabilidad"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Las inserciones no modifican los campos de este artículo, así que los cambios realizados aquí permanecen."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Las inserciones de Onshape dejan de modificar este artículo. Al insertar de nuevo esta pieza de Onshape, se vincula nuevamente."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Las inserciones reemplazan solo los campos que la página Campos de Onshape establece para Actualizar en cada inserción."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Coloca este cargo en su propia factura, retenida para revisión antes de que se contabilice. De lo contrario, va en la siguiente factura del acuerdo."diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex cb9b3e801f..158417145a 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -7548,6 +7548,9 @@ msgstr "Supprimer la commande client"msgid "Delete Schedule"msgstr "Supprimer le calendrier"+msgid "Delete Selected"+msgstr "Supprimer la sélection"+msgid "Delete Service"msgstr "Supprimer le service"@@ -8441,7 +8444,7 @@ msgstr "Chaque unité physique obtient sa propre entité suivie et un numéro un#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Chaque envoi remplace : {0}. Les autres modifications restent."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "Le commercial de chaque accord de location ou contrat (ou son créateur) reçoit un résumé quotidien de ses factures."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Envoyer vers la comptabilité"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Les envois ne modifient pas les champs de cet article, donc les modifications apportées ici restent."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Les envois depuis Onshape cessent de mettre à jour cet article. Envoyer à nouveau cette pièce depuis Onshape rétablit le lien."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Les envois ne remplacent que les champs que la page Champs d'Onshape configure pour une mise à jour à chaque envoi."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Mettre cette charge sur sa propre facture, en attente de Revue avant d'être comptabilisée. Sinon, elle va sur la prochaine facture de l'accord."diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 7617d8ab18..040d7774fd 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -7548,6 +7548,9 @@ msgstr "विक्रय आदेश हटाएँ"msgid "Delete Schedule"msgstr "शेड्यूल हटाएं"+msgid "Delete Selected"+msgstr "चयनित हटाएँ"+msgid "Delete Service"msgstr "सेवा हटाएं"@@ -8441,7 +8444,7 @@ msgstr "प्रत्येक भौतिक इकाई को अपन#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "प्रत्येक पुश प्रतिस्थापित करता है: {0}। अन्य संपादन बने रहते हैं।"msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "प्रत्येक किराये की समझौते या अनुबंध के विक्रय प्रतिनिधि (या इसके निर्माता) को इसके चालानों का दैनिक सारांश मिलता है।"@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "लेखांकन को धकेलें"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "पुशेस इस आइटम के फील्ड को नहीं बदलते, इसलिए यहाँ किए गए संपादन बने रहते हैं।"msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Onshape से पुशेस इस आइटम को अपडेट करना बंद कर देते हैं। Onshape से इस पार्ट को फिर से पुश करने से यह फिर से लिंक हो जाता है।"msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "पुशेस केवल उन फील्ड को प्रतिस्थापित करते हैं जिन्हें Onshape का Fields पेज हर पुश पर अपडेट करने के लिए सेट करता है।"msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "इस शुल्क को अपने चालान पर रखें, जिसे पोस्ट होने से पहले समीक्षा के लिए रोका जाता है। अन्यथा यह समझौते के अगले चालान पर जाता है।"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 5019a60160..6ecb0a1524 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -7548,6 +7548,9 @@ msgstr "Elimina Ordine di Vendita"msgid "Delete Schedule"msgstr "Elimina Pianificazione"+msgid "Delete Selected"+msgstr "Elimina Selezionati"+msgid "Delete Service"msgstr "Elimina Servizio"@@ -8441,7 +8444,7 @@ msgstr "Ogni unità fisica ottiene la propria entità tracciata e numero univoco#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Ogni push sostituisce: {0}. Le altre modifiche rimangono."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "Il venditore di ogni accordo di noleggio o contratto (o il suo creatore) riceve un riepilogo giornaliero delle sue fatture."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Invia alla contabilità"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "I push non modificano i campi di questo articolo, quindi le modifiche apportate qui rimangono."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "I push da Onshape smettono di aggiornare questo articolo. Eseguendo nuovamente il push di questo componente da Onshape lo ricollega."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "I push sostituiscono solo i campi che la pagina Campi di Onshape imposta su Aggiorna a ogni push."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Inserisci questo addebito su una propria fattura, in sospeso in attesa di revisione prima che sia registrata. Altrimenti verrà inclusa sulla prossima fattura dell'accordo."diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex fbdea02568..c56e7b9e0e 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -7548,6 +7548,9 @@ msgstr "受注を削除"msgid "Delete Schedule"msgstr "スケジュールを削除"+msgid "Delete Selected"+msgstr "選択項目を削除"+msgid "Delete Service"msgstr "サービスを削除"@@ -8441,7 +8444,7 @@ msgstr "各物理的な個が独自の追跡対象と一意番号を取得しま#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "各プッシュが置き換えるもの: {0}。その他の編集は保持されます。"msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "各レンタル契約または契約の営業担当者(またはその作成者)は、毎日その請求書のサマリーを受け取ります。"@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "会計にプッシュ"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "プッシュはこの品目のフィールドを変更しないため、ここで行われた編集は保持されます。"msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Onshapeからのプッシュがこの品目を更新しなくなります。Onshapeからこの部品を再度プッシュすると、リンクが復元されます。"msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "プッシュは、Onshapeの [フィールド] ページで [毎回プッシュで更新] に設定されたフィールドのみを置き換えます。"msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "この請求項目を独自の請求書に配置し、転記前にレビューで保留します。そうでなければ、契約の次の請求書に記載されます。"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex fda2c39d42..3afb325dcf 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -7548,6 +7548,9 @@ msgstr "수주 삭제"msgid "Delete Schedule"msgstr "일정 삭제"+msgid "Delete Selected"+msgstr "선택 삭제"+msgid "Delete Service"msgstr "서비스 삭제"@@ -8441,7 +8444,7 @@ msgstr "각 물리적 개는 자신의 추적 대상과 고유 번호를 받습#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "각 푸시는 다음을 대체합니다: {0}. 다른 편집은 유지됩니다."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "각 임차료 계약 또는 계약의 영업 담당자(또는 작성자)는 매일 해당 송장 요약을 받습니다."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "회계로 푸시"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "푸시는 이 품목의 필드를 변경하지 않으므로 여기서 만든 편집은 유지됩니다."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Onshape에서의 푸시가 이 품목을 더 이상 업데이트하지 않습니다. Onshape에서 이 부품을 다시 푸시하면 다시 연결됩니다."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "푸시는 Onshape 필드 페이지에서 \"매번 푸시할 때 업데이트\"로 설정된 필드만 대체합니다."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "이 비용을 검토 후 전기할 별도의 송장에 보관합니다. 그렇지 않으면 계약의 다음 송장에 포함됩니다."diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 19fcb8fa2b..5aa1c106bb 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -7548,6 +7548,9 @@ msgstr "Usuń Zamówienie Sprzedaży"msgid "Delete Schedule"msgstr "Usuń harmonogram"+msgid "Delete Selected"+msgstr "Usuń wybrane"+msgid "Delete Service"msgstr "Usuń usługę"@@ -8441,7 +8444,7 @@ msgstr "Każda jednostka fizyczna otrzymuje swoją własną jednostkę śledzeni#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Każde wysłanie zastępuje: {0}. Inne edycje pozostają."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "Każdy sprzedawca umowy najmu lub umowy (lub jej twórca) otrzymuje codzienne podsumowanie swoich faktur."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Wyślij do systemu księgowego"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Wysłania nie zmieniają pól tego artykułu, dlatego edycje wykonane tutaj pozostają."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Wysłania z Onshape przestają aktualizować ten artykuł. Wysłanie tej części z Onshape ponownie ją łączy."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Wysłania zastępują tylko pola, które strona Pól Onshape ustawia na Aktualizuj przy każdym wysłaniu."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Umieść tę opłatę na osobnej fakturze, zatrzymanej do przeglądu zanim zostanie zaksięgowana. W przeciwnym razie przejdzie na następną fakturę umowy."diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex c94099df94..c719a08618 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -7548,6 +7548,9 @@ msgstr "Excluir Pedido de venda"msgid "Delete Schedule"msgstr "Excluir Programação"+msgid "Delete Selected"+msgstr "Excluir Selecionados"+msgid "Delete Service"msgstr "Excluir Serviço"@@ -8441,7 +8444,7 @@ msgstr "Cada unidade física obtém sua própria entidade rastreada e número ú#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Cada envio substitui: {0}. Outras edições permanecem."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "O vendedor (ou criador) de cada contrato de aluguel ou contrato recebe um resumo diário de suas faturas."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Enviar para contabilidade"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Os envios não alteram os campos deste item, portanto as edições feitas aqui permanecem."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Os envios do Onshape deixam de atualizar este item. Enviar esta peça do Onshape novamente a revincula."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Os envios substituem apenas os campos que a página Campos do Onshape define como Atualizar em cada envio."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Coloque este encargo em sua própria fatura, retida para revisão antes de ser contabilizada. Caso contrário, será incluída na próxima fatura do contrato."diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 94591583b1..aeaff95bf8 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -7548,6 +7548,9 @@ msgstr "Удалить заказ покупателя"msgid "Delete Schedule"msgstr "Удалить расписание"+msgid "Delete Selected"+msgstr "Удалить выбранные"+msgid "Delete Service"msgstr "Удалить услугу"@@ -8441,7 +8444,7 @@ msgstr "Каждая физическая единица получает сво#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Каждая отправка заменяет: {0}. Остальные изменения сохраняются."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "Менеджер по продажам каждого договора аренды или контракта (или его создатель) получает ежедневное резюме своих счетов-фактур."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Отправить в бухгалтерию"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Отправки не изменяют поля этой номенклатуры, поэтому сделанные здесь изменения остаются."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Отправки из Onshape прекращают обновление этой номенклатуры. Повторная отправка этой детали из Onshape свяжет её обратно."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Отправки заменяют только поля, для которых на странице параметров Onshape установлено обновление при каждой отправке."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Поместить это начисление на отдельный счет-фактуру, находящуюся на рассмотрение перед проведением. В противном случае оно переходит на следующий счет-фактуру по соглашению."diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex c85580f1cd..5ce323c9f8 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -7548,6 +7548,9 @@ msgstr "Satış Siparişini Sil"msgid "Delete Schedule"msgstr "Programı Sil"+msgid "Delete Selected"+msgstr "Seçilenleri Sil"+msgid "Delete Service"msgstr "Hizmeti Sil"@@ -8441,7 +8444,7 @@ msgstr "Her fiziksel birim kendi izlenen varlığını ve benzersiz numarasını#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "Her gönderim şunları değiştirir: {0}. Diğer düzenlemeler kalır."msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "Her kiralama anlaşmasının veya sözleşmenin satış temsilcisi (veya yaratıcısı) faturalarının günlük bir özetini alır."@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "Muhasebede gönder"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "Gönderimleri bu stok kartının alanlarını değiştirmez, bu yüzden burada yapılan düzenlemeler kalır."msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "Onshape'ten gelen gönderimleri bu stok kartını artık güncellemeyecektir. Bu parçayı Onshape'ten yeniden göndermek onu yeniden bağlayacaktır."msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "Gönderimleri yalnızca Onshape'nin Fields sayfasında her gönderimde Güncelle olarak ayarlanmış alanları değiştirir."msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "Bu masrafı, muhasebeleştirilmeden önce inceleme için kendi faturasında tutun. Aksi takdirde, sözleşmenin sonraki faturasına eklenir."diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex a8952b6779..89e9ddc874 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -7548,6 +7548,9 @@ msgstr "删除销售订单"msgid "Delete Schedule"msgstr "删除排程"+msgid "Delete Selected"+msgstr "删除已选"+msgid "Delete Service"msgstr "删除服务"@@ -8441,7 +8444,7 @@ msgstr "每个物理件获得其自己的追踪实体和唯一编号——一个#. placeholder {0}: replaced.join(", ")msgid "Each push replaces: {0}. Other edits stay."-msgstr ""+msgstr "每次推送替换: {0}. 其他编辑保留。"msgid "Each rental agreement's or contract's salesperson (or its creator) gets a daily summary of its invoices."msgstr "每个租赁协议或合约的销售人员(或其创建者)每日获得其发票摘要。"@@ -17744,13 +17747,13 @@ msgid "Push to accounting"msgstr "推送到会计系统"msgid "Pushes don't change this item's fields, so edits made here stay."-msgstr ""+msgstr "推送不会更改此物料的字段,所以在此处进行的编辑保留。"msgid "Pushes from Onshape stop updating this item. Pushing this part from Onshape again links it back."-msgstr ""+msgstr "来自 Onshape 的推送停止更新此物料。再次从 Onshape 推送此零件将其链接回。"msgid "Pushes replace only the fields that Onshape's Fields page sets to Update on every push."-msgstr ""+msgstr "推送仅替换 Onshape 的 Fields 页面在每次推送时设置为更新的字段。"msgid "Put this charge on its own invoice, held for review before it is posted. Otherwise it goes on the agreement's next invoice."msgstr "将此费用单独放在发票上,在过账之前保留以待评审。否则,它将放在协议的下一张发票上。"