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.

feat(production): remove operations from a batch in the batch drawer (#1698)

BettrCallRaul1a612db2669f
diff --git a/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx b/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx
index 5478b7a2b7..befb1fdcbf 100644
--- a/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx
+++ b/apps/erp/app/modules/production/ui/Batches/BatchDetailDrawer.tsx
@@ -1,6 +1,7 @@
import {
BarProgress,
Button,
+ Checkbox,
Combobox,
cn,
Drawer,
@@ -50,7 +51,8 @@ import {
LuTimer,
LuTrash,
LuTriangleAlert,
- LuUndo2
+ LuUndo2,
+ LuX
} from "react-icons/lu";
import { Link, useFetcher } from "react-router";
import {
@@ -60,6 +62,8 @@ import {
ItemThumbnail
} from "~/components";
import { useWorkCenters } from "~/components/Form/WorkCenter";
+import { ConfirmDelete } from "~/components/Modals";
+import { usePermissions } from "~/hooks";
import { useCustomers, useItems } from "~/stores";
import { path } from "~/utils/path";
import { copyToClipboard } from "~/utils/string";
@@ -116,6 +120,29 @@ export function BatchDetailDrawer({
// production-event guard is what actually freezes a started batch.
const isPreStart = batch.status === "Planned" || batch.status === "Active";
+ // The edge fn refuses "remove" once production is recorded.
+ const permissions = usePermissions();
+ const canRemoveOperations =
+ isPreStart &&
+ events.length === 0 &&
+ permissions.can("update", "production");
+ const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set());
+ const [removeOpen, setRemoveOpen] = useState(false);
+ useEffect(() => {
+ setSelectedIds((prev) => {
+ const memberIds = new Set(batch.members.map((m) => m.id));
+ const next = new Set([...prev].filter((id) => memberIds.has(id)));
+ return next.size === prev.size ? prev : next;
+ });
+ }, [batch.members]);
+ const toggleSelected = (id: string) =>
+ setSelectedIds((prev) => {
+ const next = new Set(prev);
+ if (next.has(id)) next.delete(id);
+ else next.add(id);
+ return next;
+ });
+
// A Completed batch can merge each item's lots into one — every item with
// >=2 Available lots is its own merge (a mixed batch A, A, B merges the As).
// After a merge those lots are Consumed, so its button disappears on
@@ -372,6 +399,27 @@ export function BatchDetailDrawer({
<Table className="[&_td]:px-4 [&_th]:px-4">
<Thead>
<Tr>
+ {canRemoveOperations && (
+ <Th className="w-px">
+ <Checkbox
+ checked={
+ selectedIds.size === memberCount
+ ? true
+ : selectedIds.size > 0
+ ? "indeterminate"
+ : false
+ }
+ onCheckedChange={() =>
+ setSelectedIds(
+ selectedIds.size === memberCount
+ ? new Set()
+ : new Set(batch.members.map((m) => m.id))
+ )
+ }
+ aria-label={t`Select all`}
+ />
+ </Th>
+ )}
<Th>
<Trans>Job</Trans>
</Th>
@@ -395,6 +443,17 @@ export function BatchDetailDrawer({
: null;
return (
<Tr key={member.id}>
+ {canRemoveOperations && (
+ <Td className="w-px">
+ <Checkbox
+ checked={selectedIds.has(member.id)}
+ onCheckedChange={() =>
+ toggleSelected(member.id)
+ }
+ aria-label={t`Select operation`}
+ />
+ </Td>
+ )}
<Td className="font-medium">
<HStack spacing={2}>
{member.job?.id ? (
@@ -678,6 +737,15 @@ export function BatchDetailDrawer({
{t`Unrelease`}
</Button>
)}
+ {canRemoveOperations && selectedIds.size > 0 && (
+ <Button
+ variant="secondary"
+ leftIcon={<LuX />}
+ onClick={() => setRemoveOpen(true)}
+ >
+ {t`Remove ${selectedIds.size} from batch`}
+ </Button>
+ )}
{isPreStart && (
<Button variant="secondary" leftIcon={<LuPlus />} asChild>
<Link to={`${path.to.newOperationBatch}?batchId=${batch.id}`}>
@@ -725,6 +793,30 @@ export function BatchDetailDrawer({
</HStack>
</DrawerFooter>
</DrawerContent>
+ {removeOpen && (
+ <ConfirmDelete
+ action={path.to.priorityBatchingUpdate}
+ title={t`Remove from batch`}
+ name={batch.readableId}
+ text={
+ selectedIds.size === memberCount
+ ? t`A batch needs at least one operation. To break up the whole batch, use Dissolve instead.`
+ : t`Remove ${selectedIds.size} of ${memberCount} operations from ${batch.readableId}?`
+ }
+ deleteText={t`Remove`}
+ isDisabled={selectedIds.size === memberCount}
+ fields={{
+ intent: "remove",
+ batchId: batch.id,
+ jobOperationIds: [...selectedIds]
+ }}
+ onCancel={() => setRemoveOpen(false)}
+ onSubmit={() => {
+ setRemoveOpen(false);
+ setSelectedIds(new Set());
+ }}
+ />
+ )}
{releaseOpen && (
<BatchReleaseModal
target={{ batchId: batch.id }}
diff --git a/packages/database/supabase/functions/batch-operations/index.ts b/packages/database/supabase/functions/batch-operations/index.ts
index 1e467bbe4a..95b45262da 100644
--- a/packages/database/supabase/functions/batch-operations/index.ts
+++ b/packages/database/supabase/functions/batch-operations/index.ts
@@ -1099,6 +1099,19 @@ serve(async (req: Request) => {
case "remove": {
result = await db.transaction().execute(async (trx) => {
+ const batch = await trx
+ .selectFrom("jobOperationBatch")
+ .select("status")
+ .where("id", "=", payload.batchId)
+ .where("companyId", "=", companyId)
+ .forUpdate()
+ .executeTakeFirst();
+ if (!batch) throw new Error("Batch not found");
+ if (batch.status !== "Planned" && batch.status !== "Active") {
+ throw new Error(
+ `Cannot remove operations from a batch with status ${batch.status}`
+ );
+ }
const batchEvents = await trx
.selectFrom("productionEvent")
.select("id")
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 17a4322448..bd65fd49d1 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -538,6 +538,9 @@ msgstr "90 Tage"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Eine «muss übereinstimmen»-Regel für diesen Verfahren blockiert diese vor dem Teilen eines Los"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Eine von Carbon durchgeführte Datenmigration – Sie laden Ihre eigenen Daten"
@@ -14119,10 +14122,19 @@ msgstr "Entfernen"
msgid "Remove {0}"
msgstr "Entfernen {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Entfernen Sie {0} aus diesem Los? Sein Arbeitsgang kehrt zum Terminplan zurück, um eigenständig zu laufen."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Entfernen {label}"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 489ebfabab..ca3b165f07 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -538,6 +538,9 @@ msgstr "90D"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "A \"must match\" rule on this process blocks these from sharing a batch"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "A Carbon-run data migration — you load your own data"
@@ -14119,10 +14122,19 @@ msgstr "Remove"
msgid "Remove {0}"
msgstr "Remove {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr "Remove {0} from batch"
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr "Remove {0} of {memberCount} operations from {1}?"
+
msgid "Remove {label}"
msgstr "Remove {label}"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 563241a3fa..208d5fb242 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -538,6 +538,9 @@ msgstr "90 días"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Una regla \"debe coincidir\" en este proceso impide que estos compartan un lote de producción"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Una migración de datos ejecutada por Carbon — usted carga sus propios datos"
@@ -14119,10 +14122,19 @@ msgstr "Quitar"
msgid "Remove {0}"
msgstr "Quitar {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "¿Quitar {0} de este lote? Su operación vuelve al programa para ejecutarse por sí sola."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Quitar {label}"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index c874ce7060..a801b81d6d 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -538,6 +538,9 @@ msgstr "90 jours"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Une règle « doit correspondre » sur ce procédé empêche ces articles de partager un lot de production"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Une migration de données gérée par Carbon — vous chargez vos propres données"
@@ -14119,10 +14122,19 @@ msgstr "Retirer"
msgid "Remove {0}"
msgstr "Retirer {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Retirer {0} de ce lot de production ? Son opération retourne au planning pour s'exécuter seule."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Retirer {label}"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 178ef1b381..7787f94299 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -538,6 +538,9 @@ msgstr "90 दिन"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "इस प्रक्रिया पर एक \"मेल खाना चाहिए\" नियम इन्हें एक बैच साझा करने से रोकता है"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "एक कार्बन-चलाया गया डेटा माइग्रेशन — आप अपना डेटा लोड करते हैं"
@@ -14119,10 +14122,19 @@ msgstr "निकालें"
msgid "Remove {0}"
msgstr "निकालें {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "इस बैच से {0} को निकालें? इसका ऑपरेशन अपने आप चलने के लिए शेड्यूल में वापस जाता है।"
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "निकालें {label}"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index 0e37cd22a5..4fa1e64130 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -538,6 +538,9 @@ msgstr "90 giorni"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Una regola \"devono corrispondere\" su questo processo impedisce a questi di condividere un lotto di produzione"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Una migrazione dati gestita da Carbon — tu carichi i tuoi dati"
@@ -14119,10 +14122,19 @@ msgstr "Rimuovi"
msgid "Remove {0}"
msgstr "Rimuovi {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Rimuovere {0} da questo lotto di produzione? La sua operazione ritorna al programma per essere eseguita autonomamente."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Rimuovi {label}"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index cc0eb09217..d2859db64b 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -538,6 +538,9 @@ msgstr "90日"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "このプロセスの\"一致必須\"ルールにより、これらはバッチを共有できません"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Carbon実行のデータ移行 — あなたが自分のデータをロードします"
@@ -14119,10 +14122,19 @@ msgstr "除去"
msgid "Remove {0}"
msgstr "{0}を除去"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "{0}をこのバッチから除去しますか?その工程はスケジュールに戻り、独自に実行されます。"
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "{label}を除去"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index 525a588233..36740b92e1 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -538,6 +538,9 @@ msgstr "90일"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "이 공정의 \"일치해야 함\" 규칙이 이들을 배치 공유에서 차단합니다"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Carbon이 진행하는 데이터 마이그레이션 — 직접 데이터를 업로드"
@@ -14119,10 +14122,19 @@ msgstr "제거"
msgid "Remove {0}"
msgstr "{0} 제거"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "{0}을(를) 이 배치에서 제거하시겠습니까? 그 공정은 일정으로 돌아가 자체적으로 실행됩니다."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "제거 {label}"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 7c116b1677..6ffa91b150 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -538,6 +538,9 @@ msgstr "90 dni"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Reguła \"muszą się zgadzać\" w tym procesie blokuje wspólne tworzenie partii produkcyjnej"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Migracja danych prowadzona przez Carbon — ty ładujesz swoje dane"
@@ -14119,10 +14122,19 @@ msgstr "Usuń z listy"
msgid "Remove {0}"
msgstr "Usuń z listy {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Usunąć {0} z tej partii produkcyjnej? Jej operacja wraca do harmonogramu, aby uruchamiać się niezależnie."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Usuń z listy {label}"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 18c2e3ba9d..8efe065bc7 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -538,6 +538,9 @@ msgstr "90 dias"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Uma regra \"deve coincidir\" neste processo impede que estes compartilhem um lote de produção"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Uma migração de dados executada pela Carbon — você carrega seus próprios dados"
@@ -14119,10 +14122,19 @@ msgstr "Remover"
msgid "Remove {0}"
msgstr "Remover {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Remover {0} do lote de produção? Sua operação volta à programação para ser executada independentemente."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Remover {label}"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index cf096bc426..a9396941b7 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -538,6 +538,9 @@ msgstr "90 дней"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Правило «должны совпадать» на этом процессе препятствует размещению в одной серии"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Миграция данных, управляемая Carbon — вы загружаете свои собственные данные"
@@ -14119,10 +14122,19 @@ msgstr "Убрать"
msgid "Remove {0}"
msgstr "Убрать {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "Убрать {0} из этой серии? Его операция вернется в график для самостоятельного запуска."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "Убрать {label}"
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index 602a664d1b..18a7cdcd06 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -538,6 +538,9 @@ msgstr "90G"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "Bu operasyon üzerinde \"eşleşmeli\" kuralı bunların bir partide paylaşılmasını engeller"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Bir Carbon tarafından yönetilen veri taşıması — kendi verilerinizi yüklersiniz"
@@ -14119,10 +14122,19 @@ msgstr "Kaldır"
msgid "Remove {0}"
msgstr "Kaldır {0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "{0} bu partiyi kaldırmak istiyor musunuz? Operasyonu çizelgeye geri döner ve kendi başına çalışacak."
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "{label}'i Kaldır"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 1f22a0d6ad..69f5fa79fb 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -538,6 +538,9 @@ msgstr "90天"
msgid "A \"must match\" rule on this process blocks these from sharing a batch"
msgstr "此工序上的 \"必须匹配\" 规则阻止这些共享一个生产批次"
+msgid "A batch needs at least one operation. To break up the whole batch, use Dissolve instead."
+msgstr ""
+
msgid "A Carbon-run data migration — you load your own data"
msgstr "Carbon 运行的数据迁移 — 您加载自己的数据"
@@ -14119,10 +14122,19 @@ msgstr "移除"
msgid "Remove {0}"
msgstr "移除{0}"
+#. placeholder {0}: selectedIds.size
+msgid "Remove {0} from batch"
+msgstr ""
+
#. placeholder {0}: removing.jobReadableId ?? "this operation"
msgid "Remove {0} from this batch? Its operation goes back to the schedule to run on its own."
msgstr "从此生产批次中移除 {0}?其工序回到排程以单独运行。"
+#. placeholder {0}: selectedIds.size
+#. placeholder {1}: batch.readableId
+msgid "Remove {0} of {memberCount} operations from {1}?"
+msgstr ""
+
msgid "Remove {label}"
msgstr "移除 {label}"