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.

fix(inventory): explain a disabled Post on a receipt with no lines

naveenkasha9991794468b
diff --git a/.ai/playbooks/receipt-quantities-start-at-zero.md b/.ai/playbooks/receipt-quantities-start-at-zero.md
index 5556bcc33a..9b758d27c3 100644
--- a/.ai/playbooks/receipt-quantities-start-at-zero.md
+++ b/.ai/playbooks/receipt-quantities-start-at-zero.md
@@ -1,6 +1,6 @@
# Receipt Quantities Start at Zero
-Last tested: 2026-10-16 (re-run after review fixes)
+Last tested: 2026-10-18 (after main's #1937 service-function refactor)
Routes: /x/settings/inventory, /x/purchase-order/<id>/details → Receive, /x/receipt/<id>/details
## Prerequisites
@@ -39,6 +39,10 @@ Routes: /x/settings/inventory, /x/purchase-order/<id>/details → Receive, /x/re
- Fixed asset: the asset checkbox under "Fixed Assets" starts unticked.
## Selector Notes
+- If another agent shares the machine, run every command with `agent-browser --session <name>`;
+ on the default session two agents' commands interleave and hang.
+- The PO/RMA "Receive" button reopens an existing Draft receipt for that source. To test a
+ fresh receipt, delete the Draft first (receipt ⋯ → Delete Receipt → Delete).
- Receipt line quantity inputs are unlabeled textboxes in line order; the first
textbox on the page is External Reference — handy blur target.
- PO line modal: requestSubmit the Save inside `[role=dialog]`, not the first Save on the
diff --git a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptHeader.tsx b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptHeader.tsx
index a038262675..7a1ba8b0a3 100644
--- a/apps/erp/app/modules/inventory/ui/Receipts/ReceiptHeader.tsx
+++ b/apps/erp/app/modules/inventory/ui/Receipts/ReceiptHeader.tsx
@@ -72,6 +72,10 @@ const ReceiptHeader = () => {
receiptLines.some((line) => (line.receivedQuantity ?? 0) !== 0) ||
hasReceivableFaLines ||
hasReceivableRentalLines;
+ const hasAnyLine =
+ receiptLines.length > 0 ||
+ (routeData?.fixedAssetLines ?? []).length > 0 ||
+ (routeData?.rentalLines ?? []).length > 0;
const hasTrackingLabels = (routeData?.receiptLineTracking ?? []).length > 0;
@@ -181,12 +185,14 @@ const ReceiptHeader = () => {
</Button>
))}
{!isPosted && !isVoided && (
- // A disabled button fires no pointer events, so the span is the
- // trigger. Every line can start at 0 (receipt quantities start
- // at zero), which leaves Post disabled with no other hint.
+ // A disabled button fires no pointer events and takes no focus,
+ // so the span is the trigger, focusable only while it explains
+ // the disabled button. Every line can start at 0 (receipt
+ // quantities start at zero), which leaves Post disabled with no
+ // other hint.
<Tooltip>
<TooltipTrigger asChild>
- <span>
+ <span tabIndex={canPost ? undefined : 0}>
<Button
variant="primary"
onClick={postModal.onOpen}
@@ -199,10 +205,17 @@ const ReceiptHeader = () => {
</TooltipTrigger>
{!canPost && (
<TooltipContent>
- <Trans>
- Enter a received quantity, or tick a unit, on at least one
- line.
- </Trans>
+ {hasAnyLine ? (
+ <Trans>
+ Enter a received quantity, or tick a unit, on at least
+ one line.
+ </Trans>
+ ) : (
+ <Trans>
+ This receipt has no lines. Choose a source document to
+ add them.
+ </Trans>
+ )}
</TooltipContent>
)}
</Tooltip>
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index 3a4c08d851..eae1bc6db9 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -24014,6 +24014,9 @@ msgstr "diese Bestellung"
msgid "This Quarter"
msgstr "Dieses Quartal"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "Dieser Wareneingang hat keine Positionen. Wählen Sie zum Hinzufügen einen Ursprungsbeleg."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Dies entfernt das PDF. Mitarbeiter sehen stattdessen den schriftlichen Inhalt."
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index 672ac402ba..7dc7a9dbf0 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -24014,6 +24014,9 @@ msgstr "this purchase order"
msgid "This Quarter"
msgstr "This Quarter"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "This receipt has no lines. Choose a source document to add them."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "This removes the PDF. Employees will see the written content instead."
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 699c48a044..00e4cd07ba 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -24014,6 +24014,9 @@ msgstr "esta orden de compra"
msgid "This Quarter"
msgstr "Este Trimestre"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "Esta recepción no tiene líneas. Elija un documento de origen para agregarlas."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Esto quita el PDF. Los empleados verán el contenido escrito en su lugar."
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index a752243372..7d1e7957e5 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -24014,6 +24014,9 @@ msgstr "ce bon de commande"
msgid "This Quarter"
msgstr "Ce trimestre"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "Cette réception n'a pas de lignes. Choisissez un document d'origine pour les ajouter."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Cela supprime le PDF. Les employés verront le contenu écrit à la place."
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 20031fd0cd..5643fb95e2 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -24014,6 +24014,9 @@ msgstr "यह क्रय आदेश"
msgid "This Quarter"
msgstr "इस त्रैमासिक"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "इस प्राप्ति में कोई पंक्तियाँ नहीं हैं। स्रोत दस्तावेज़ चुनकर पंक्तियाँ जोड़ें।"
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "यह PDF को हटाता है। कर्मचारी इसके बजाय लिखित सामग्री देखेंगे।"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index 7634ca0c6f..20109941d4 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -24014,6 +24014,9 @@ msgstr "questo ordine di acquisto"
msgid "This Quarter"
msgstr "Questo Trimestre"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "Questa ricezione non ha righe. Scegliere un documento di origine per aggiungerle."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Questo rimuove il PDF. I dipendenti vedranno il contenuto scritto."
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 0e901ec94d..e0c89a9f56 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -24014,6 +24014,9 @@ msgstr "この発注書"
msgid "This Quarter"
msgstr "今四半期"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "この入荷には明細がありません。参照伝票を選択して追加してください。"
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "これはPDFを除去します。従業員は代わりに記述内容を表示します。"
diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.po
index d73fadd488..8c18a78681 100644
--- a/packages/locale/locales/ko/erp.po
+++ b/packages/locale/locales/ko/erp.po
@@ -24014,6 +24014,9 @@ msgstr "이 발주서"
msgid "This Quarter"
msgstr "이번 분기"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "이 입고에는 항목이 없습니다. 추가하려면 원본 문서를 선택하십시오."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "이렇게 하면 PDF가 제거됩니다. 직원들은 대신 작성된 콘텐츠를 보게 됩니다."
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 4e70a571f5..83f7888b62 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -24014,6 +24014,9 @@ msgstr "to zamówienie zakupu"
msgid "This Quarter"
msgstr "Ten Kwartał"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "To przyjęcie nie ma żadnych linii. Wybierz dokument źródłowy, aby je dodać."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "To usunie PDF. Pracownicy będą widzieć zawartość pisemną zamiast tego."
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 67a2b2ee4e..62bc8fd791 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -24014,6 +24014,9 @@ msgstr "este pedido de compra"
msgid "This Quarter"
msgstr "Este Trimestre"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "Este recebimento não possui linhas. Escolha um documento de origem para adicioná-las."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Isso remove o PDF. Os funcionários verão o conteúdo escrito em vez disso."
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index e3d63c4f41..7b9c83649a 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -24014,6 +24014,9 @@ msgstr "этот заказ поставщику"
msgid "This Quarter"
msgstr "Этот квартал"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "В этом поступлении нет строк. Выберите документ-основание, чтобы добавить их."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Это удаляет PDF. Сотрудники вместо этого увидят письменный контент."
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index d71df97bc7..235ace1726 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -24014,6 +24014,9 @@ msgstr "bu satın alma siparişi"
msgid "This Quarter"
msgstr "Bu Çeyrek"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "Bu girişte satır yok. Bunları eklemek için bir kaynak belge seçin."
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "Bu, PDF'yi kaldırır. Çalışanlar yerine yazılı içeriği görecekler."
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index f14864633b..fee392cbaf 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -24014,6 +24014,9 @@ msgstr "此采购订单"
msgid "This Quarter"
msgstr "本季度"
+msgid "This receipt has no lines. Choose a source document to add them."
+msgstr "此收货单没有行。请选择源单据以添加行。"
+
msgid "This removes the PDF. Employees will see the written content instead."
msgstr "这将移除 PDF。员工将改为查看书面内容。"