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(inventory): option to start receipt quantities at zero
naveenkashade6ba9b9e26
diff --git a/.ai/playbooks/receipt-quantities-start-at-zero.md b/.ai/playbooks/receipt-quantities-start-at-zero.mdnew file mode 100644index 0000000000..c950ebb548--- /dev/null+++ b/.ai/playbooks/receipt-quantities-start-at-zero.md@@ -0,0 +1,49 @@+# Receipt Quantities Start at Zero++Last tested: 2026-10-16+Routes: /x/settings/inventory, /x/purchase-order/<id>/details → Receive, /x/receipt/<id>/details++## Prerequisites+- A seeded dev company (`crbn up` seeds the satellite dataset): POs in "To Receive" /+ "To Receive and Invoice" (PO000010 single line, PO000018 two lines incl. a batch item),+ warehouse transfer WT000002 in "To Ship", RMA000002 in "To Receive", draft PO000003.+- Fixed-asset receipt: add an Asset-tab line to a draft PO (fixed asset FA000003 exists).++## Steps+### 1. Toggle the setting+- `/x/settings/inventory` → section "Receiving" → card "Start Receipt Quantities at Zero"+ → click the switch (the only `switch` in the snapshot). Saves on change, no Save button.+- Verify: toast "Receipt quantities now start at zero"; reload keeps the switch checked;+ `companySettings."receiptQuantitiesStartAtZero"` = true.++### 2. Receive a PO+- PO details → button "Receive" (first receipt) or "Receipts" dropdown → menuitem+ "New Receipt" (later receipts). Redirects to `/x/receipt/<id>/details`.+- Verify: every line's Received textbox reads 0, Ordered/Outstanding unchanged, Post disabled.++### 3. Enter a quantity, post+- `fill` the line's Received textbox, then click another textbox to blur (commits via+ `lines.update`). Batch lines also need "Batch number" filled + blurred.+- Post → modal "Post Receipt" button. Seeded storage rules can raise a "Rule Violation"+ modal first — click "Acknowledge & continue".+- Verify (DB): `itemLedger` has rows only for non-zero lines; PO lines left at 0 keep+ `receivedComplete = false`; a re-receive starts the remaining lines at 0 with+ Outstanding = remainder.++### 4. Other sources+- Transfer: WT000002 → "Ship" → post shipment (shipment lines are NOT zeroed — out of+ scope) → back on the transfer "Receive" → line at 0.+- RMA: `/x/sales-return-order/<id>` → "Receive" → line at 0.+- Fixed asset: the asset checkbox under "Fixed Assets" starts unticked.++## Selector Notes+- 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+ page (that is the PO header form behind the modal).+- The Fixed Asset combobox popover stays open after picking — press Escape before filling+ the price.++## Common Failures+- Fixed Asset PO line silently not saved: Description is required, and the submit hit+ the background form.diff --git a/apps/erp/app/modules/settings/settings.service.ts b/apps/erp/app/modules/settings/settings.service.tsindex 17bda4fcea..77163d718b 100644--- a/apps/erp/app/modules/settings/settings.service.ts+++ b/apps/erp/app/modules/settings/settings.service.ts@@ -1571,6 +1571,18 @@ export async function updateReturnPickedMaterialTimingSetting(.eq("id", companyId);}+/** @mcp update */+export async function updateReceiptQuantitiesStartAtZeroSetting(+ client: SupabaseClient<Database>,+ companyId: string,+ receiptQuantitiesStartAtZero: boolean+) {+ return client+ .from("companySettings")+ .update(sanitize({ receiptQuantitiesStartAtZero }))+ .eq("id", companyId);+}+// ── Planning ownership + tolerance (spec §P1.3 / §P1.6) ────────────────────// The responsibleEmployee ladder's configurable rungs: company default →// per-location → per-(location, item group). The item-group tier isdiff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.jsonindex 5d10bbda8e..904ecd3898 100644--- a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json@@ -1,5 +1,5 @@{- "totalTools": 1556,+ "totalTools": 1557,"modules": 15,"tools": [{"name":"account_deleteUserAttributeValue","classification":"DESTRUCTIVE","paramCount":2,"schema":"0d38e12233b4","response":"bcde375ebd4c","injectAuth":"companyId+userId","permission":"none","paginates":false},@@ -1421,7 +1421,7 @@{"name":"settings_getCompany","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"81a93f0029ec","injectAuth":"companyId","permission":"settings:view","paginates":false},{"name":"settings_getCompanyIntegrations","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"3a98b34db51d","injectAuth":"companyId","permission":"settings:view","paginates":false},{"name":"settings_getCompanyPlan","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"none","injectAuth":"companyId","permission":"settings:view","paginates":false},- {"name":"settings_getCompanySettings","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"689a7e333d99","injectAuth":"companyId","permission":"settings:view","paginates":false},+ {"name":"settings_getCompanySettings","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"592dc0578df9","injectAuth":"companyId","permission":"settings:view","paginates":false},{"name":"settings_getConfig","classification":"READ","paramCount":0,"schema":"efddc7bd8bbc","response":"aa1021ff34cf","injectAuth":"companyId","permission":"settings:view","paginates":false},{"name":"settings_getCurrentSequence","classification":"READ","paramCount":1,"schema":"f55836d6d401","response":"00404e686415","injectAuth":"companyId","permission":"settings:view","paginates":false},{"name":"settings_getCustomField","classification":"READ","paramCount":1,"schema":"3797626bd17e","response":"a533a796c094","injectAuth":"companyId","permission":"settings:view","paginates":false},@@ -1486,6 +1486,7 @@{"name":"settings_updatePlmReleaseControlSetting","classification":"WRITE","paramCount":1,"schema":"b74d1adb972d","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},{"name":"settings_updatePurchasePriceUpdateTimingSetting","classification":"WRITE","paramCount":1,"schema":"6e01697e737c","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},{"name":"settings_updateQuoteLineCategoryMarkups","classification":"WRITE","paramCount":1,"schema":"46b636ff84f8","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},+ {"name":"settings_updateReceiptQuantitiesStartAtZeroSetting","classification":"WRITE","paramCount":1,"schema":"e7e5782aa8aa","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},{"name":"settings_updateRequireCustomerContactSetting","classification":"WRITE","paramCount":1,"schema":"4cff457269be","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},{"name":"settings_updateRequireSupplierContactSetting","classification":"WRITE","paramCount":1,"schema":"36a0cd98c43c","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},{"name":"settings_updateReturnPickedMaterialTimingSetting","classification":"WRITE","paramCount":1,"schema":"59acd7763b9c","response":"bcde375ebd4c","injectAuth":"companyId","permission":"settings:update","paginates":false},diff --git a/apps/erp/app/routes/x+/settings+/inventory.tsx b/apps/erp/app/routes/x+/settings+/inventory.tsxindex 2a57d7da76..a90510db60 100644--- a/apps/erp/app/routes/x+/settings+/inventory.tsx+++ b/apps/erp/app/routes/x+/settings+/inventory.tsx@@ -22,13 +22,16 @@ import {CardHeader,CardTitle,ChoiceSelect,+ HStack,ScrollArea,- toast+ Switch,+ toast,+ VStack} from "@carbon/react";import { redirect } from "@carbon/utils";import { msg } from "@lingui/core/macro";import { Trans, useLingui } from "@lingui/react/macro";-import { useEffect } from "react";+import { useCallback, useEffect } from "react";import {LuLayers,LuPackageCheck,@@ -42,6 +45,7 @@ import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router";import { useFetcher, useLoaderData } from "react-router";import { SettingsPage, SettingsPageHeading } from "~/components/SettingsPage";import SettingsSectionHeader from "~/components/SettingsSectionHeader";+import { useSavedToggle } from "~/hooks/useSavedToggle";import {getCompanySettings,incompletePickingListPolicyValidator,@@ -51,6 +55,7 @@ import {shelfLifeSettingsValidator,updateIncompletePickingListPolicySetting,updateKanbanOutputSetting,+ updateReceiptQuantitiesStartAtZeroSetting,updateReturnPickedMaterialTimingSetting,updateShelfLifeSettings} from "~/modules/settings";@@ -167,6 +172,24 @@ export async function action({ request }: ActionFunctionArgs) {message: "Picking list completion policy updated"};+ case "receiptQuantitiesStartAtZero": {+ const enabled = formData.get("enabled") === "true";+ const result = await updateReceiptQuantitiesStartAtZeroSetting(+ client,+ companyId,+ enabled+ );+ if (result.error)+ return { success: false, message: result.error.message };++ return {+ success: true,+ message: enabled+ ? "Receipt quantities now start at zero"+ : "Receipt quantities now start at the quantity to receive"+ };+ }+case "returnPickedMaterialTiming":const returnTimingValidation = await validator(returnPickedMaterialTimingValidator@@ -217,6 +240,22 @@ export default function InventorySettingsRoute() {}}, [fetcher.data?.message, fetcher.data?.success]);+ const receiptQuantitiesStartAtZero = useSavedToggle(+ fetcher,+ "receiptQuantitiesStartAtZero",+ companySettings.receiptQuantitiesStartAtZero+ );++ const handleReceiptQuantitiesStartAtZeroToggle = useCallback(+ (checked: boolean) => {+ fetcher.submit(+ { intent: "receiptQuantitiesStartAtZero", enabled: checked.toString() },+ { method: "POST" }+ );+ },+ [fetcher]+ );+return (<ScrollArea className="w-full h-[calc(100dvh-var(--topbar-height)-var(--content-inset))]"><SettingsPage className="gap-4">@@ -270,6 +309,58 @@ export default function InventorySettingsRoute() {</ValidatedForm></Card>+ <SettingsSectionHeader>+ <Trans>Receiving</Trans>+ </SettingsSectionHeader>++ <Card>+ <CardHeader>+ <CardTitle>+ <Trans>Start Receipt Quantities at Zero</Trans>+ </CardTitle>+ <CardDescription>+ <Trans>+ Choose what a new receipt fills in as each line's received+ quantity: what is still to receive, or zero so the receiver+ enters what actually arrived.+ </Trans>+ </CardDescription>+ </CardHeader>+ <CardContent>+ <HStack className="justify-between items-center">+ <VStack className="items-start" spacing={1}>+ <span className="font-medium">+ {receiptQuantitiesStartAtZero ? (+ <Trans>Received quantities start at zero</Trans>+ ) : (+ <Trans>+ Received quantities start at the quantity to receive+ </Trans>+ )}+ </span>+ <span className="text-sm text-muted-foreground">+ {receiptQuantitiesStartAtZero ? (+ <Trans>+ Enter the quantity on each line that arrived. A line left+ at zero is not received when the receipt is posted.+ </Trans>+ ) : (+ <Trans>+ Enable to make receivers enter the quantity on each line+ instead of confirming the ordered amount.+ </Trans>+ )}+ </span>+ </VStack>+ <Switch+ checked={receiptQuantitiesStartAtZero}+ onCheckedChange={handleReceiptQuantitiesStartAtZeroToggle}+ disabled={fetcher.state !== "idle"}+ />+ </HStack>+ </CardContent>+ </Card>+<SettingsSectionHeader><Trans>Traceability</Trans></SettingsSectionHeader>diff --git a/docs/content/docs/reference/receipts.mdx b/docs/content/docs/reference/receipts.mdxindex d05bc307e2..49b18dd65b 100644--- a/docs/content/docs/reference/receipts.mdx+++ b/docs/content/docs/reference/receipts.mdx@@ -11,7 +11,7 @@ Each receipt line references the purchase-order line it fulfills. Posting increa<FieldTable><Field name="Source document" type="reference">The purchase order, transfer, or rental agreement being received. A rental receipt keeps its agreement: create it from the agreement's **"Return"** button, not by changing the source.</Field>- <Field name="Received quantity" type="number">Units on this receipt, per line.</Field>+ <Field name="Received quantity" type="number">Units on this receipt, per line. A new receipt fills in the quantity still to receive; turn on **Start Receipt Quantities at Zero** in Settings → Inventory to start every line at 0, so the receiver enters what arrived and a line nothing arrived for stays at 0.</Field><Field name="Conversion factor" type="number">Converts the supplier's purchase unit to the stock unit.</Field><Field name="Location" type="reference">Where the goods land.</Field></FieldTable>diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.tsindex e06ad9d2db..8109db06b4 100644--- a/packages/database/src/swagger-docs-schema.ts+++ b/packages/database/src/swagger-docs-schema.ts@@ -102402,6 +102402,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.leaseReminderDays"},+ {+ $ref: "#/parameters/rowFilter.companySettings.receiptQuantitiesStartAtZero"+ },{$ref: "#/parameters/select"},@@ -102674,6 +102677,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.leaseReminderDays"},+ {+ $ref: "#/parameters/rowFilter.companySettings.receiptQuantitiesStartAtZero"+ },{$ref: "#/parameters/preferReturn"}@@ -102900,6 +102906,9 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.leaseReminderDays"},+ {+ $ref: "#/parameters/rowFilter.companySettings.receiptQuantitiesStartAtZero"+ },{$ref: "#/parameters/body.companySettings"},@@ -166680,7 +166689,8 @@ export default {"invoiceNotificationGroup","leaseIncrementalBorrowingRate","leaseShortTermExpedient",- "leaseReminderDays"+ "leaseReminderDays",+ "receiptQuantitiesStartAtZero"],properties: {id: {@@ -167068,6 +167078,11 @@ export default {default: 90,format: "integer",type: "integer"+ },+ receiptQuantitiesStartAtZero: {+ default: false,+ format: "boolean",+ type: "boolean"}},type: "object"@@ -222657,6 +222672,12 @@ export default {in: "query",type: "string"},+ "rowFilter.companySettings.receiptQuantitiesStartAtZero": {+ name: "receiptQuantitiesStartAtZero",+ required: false,+ in: "query",+ type: "string"+ },"body.part": {name: "part",description: "part",diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex f5a4b1ce0c..71bb821242 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -8368,6 +8368,7 @@ export type Database = {qualityDispatchNotificationGroup: string[] | nullqualityIssueTarget: numberquoteLineCategoryMarkups: Json | null+ receiptQuantitiesStartAtZero: booleanrequireCustomerContactAndLocation: booleanrequireMfa: booleanrequireSupplierContactAndLocation: boolean@@ -8441,6 +8442,7 @@ export type Database = {qualityDispatchNotificationGroup?: string[] | nullqualityIssueTarget?: numberquoteLineCategoryMarkups?: Json | null+ receiptQuantitiesStartAtZero?: booleanrequireCustomerContactAndLocation?: booleanrequireMfa?: booleanrequireSupplierContactAndLocation?: boolean@@ -8514,6 +8516,7 @@ export type Database = {qualityDispatchNotificationGroup?: string[] | nullqualityIssueTarget?: numberquoteLineCategoryMarkups?: Json | null+ receiptQuantitiesStartAtZero?: booleanrequireCustomerContactAndLocation?: booleanrequireMfa?: booleanrequireSupplierContactAndLocation?: booleandiff --git a/packages/database/supabase/migrations/20261016113742_receipt-quantities-start-at-zero.sql b/packages/database/supabase/migrations/20261016113742_receipt-quantities-start-at-zero.sqlnew file mode 100644index 0000000000..69b555ffd2--- /dev/null+++ b/packages/database/supabase/migrations/20261016113742_receipt-quantities-start-at-zero.sql@@ -0,0 +1,5 @@+-- Blind receiving: when on, a new receipt's lines start with a received+-- quantity of 0 instead of the outstanding quantity, so the receiver counts+-- each line and a line nothing arrived for stays at 0.+ALTER TABLE "companySettings"+ADD COLUMN IF NOT EXISTS "receiptQuantitiesStartAtZero" BOOLEAN NOT NULL DEFAULT false;diff --git a/packages/jobs/manifests/schema.json b/packages/jobs/manifests/schema.jsonindex 3b4662c266..461b4149a6 100644--- a/packages/jobs/manifests/schema.json+++ b/packages/jobs/manifests/schema.json@@ -1,11 +1,11 @@{"kind": "carbon-company-backup","version": 1,- "schemaVersion": "20261015161847",+ "schemaVersion": "20261016113742","sourceCompanyId": "schema-baseline","sourceCompanyGroupId": null,"sourceCompanyName": null,- "exportedAt": "2026-10-15T15:58:36.181Z",+ "exportedAt": "2026-10-16T07:21:13.823Z","exportedBy": "schema-baseline","label": "schema baseline","includeStorage": "none",@@ -481,7 +481,8 @@"accountingActivatedBy","leaseIncrementalBorrowingRate","leaseShortTermExpedient",- "leaseReminderDays"+ "leaseReminderDays",+ "receiptQuantitiesStartAtZero"]},{diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex ad9a7f28dd..fcf4b542be 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -4890,6 +4890,9 @@ msgstr "Wählen Sie die Flotteneinheiten, die diese Vereinbarung mietet. Jede bemsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Wählen Sie die Dienstleistungen, die dieser Vertrag fakturiert. Jede wird als wiederkehrende Position hinzugefügt, die Sie im Raster preisen können."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Wählen Sie, womit ein neuer Wareneingang die empfangene Menge jeder Position vorfüllt: mit der noch zu empfangenden Menge oder mit null, damit der Empfänger eingibt, was tatsächlich angekommen ist."+msgid "Choose what appears on the printed job traveler."msgstr "Wählen Sie, was auf der gedruckten Laufkarte erscheint."@@ -8824,6 +8827,9 @@ msgstr "Ermöglichen Sie die Konfiguration steuerlicher Abschreibungsmethoden fmsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Aktivieren Sie diese Option, um IDs und Beschreibungen für Rohstoffe zu generieren."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Aktivieren Sie diese Option, um Empfänger die Menge auf jeder Position eingeben zu lassen, anstatt die bestellte Menge zu bestätigen."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Aktivieren, um eine Authentifizierungs-App zu erfordern, bevor jemand dieses Unternehmen öffnen kann."@@ -8993,6 +8999,9 @@ msgstr "Geben Sie die Onshape URL, Client-ID und Client Secret Ihrer privaten OAmsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Geben Sie die Rohbilanz des vorherigen Systems vom Tag vor der Migration für jedes Konto ein."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Geben Sie auf jeder Position die empfangene Menge ein. Eine auf null gelassene Position wird nicht empfangen, wenn der Wareneingang gebucht wird."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Geben Sie die Menge ein, die diese Bewegung hätte sein sollen. Eine Gegenbewegung für die Differenz wird neben dem Original in dessen Zeitraum verbucht."@@ -17909,12 +17918,21 @@ msgstr "Von diesem Lieferanten eingegangene Zeilen mit verbleibender Menge zur Rmsgid "Received Qty"msgstr "Empfangene Menge"+msgid "Received quantities start at the quantity to receive"+msgstr "Wareneingangsmengen beginnen mit der zu empfangenden Menge"++msgid "Received quantities start at zero"+msgstr "Wareneingangsmengen beginnen bei null"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Empfangene Menge noch nicht kreditiert. Das Gutschriftenmemo wird als Entwurf erstellt."msgid "Receives the invoice email"msgstr "Erhält die Rechnungs-E-Mail"+msgid "Receiving"+msgstr "Warenempfang"+msgid "Receiving Location"msgstr "Empfangsort"@@ -21058,6 +21076,9 @@ msgstr "Beginn des Geschäftsjahres"msgid "Start of Tax Year"msgstr "Beginn des Steuerjahres"+msgid "Start Receipt Quantities at Zero"+msgstr "Wareneingangsmengen bei null starten"+msgid "Start Time"msgstr "Startzeit"diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex 5aa6d9b318..5a34e4b8f6 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -4890,6 +4890,9 @@ msgstr "Choose the fleet units this agreement rents. Each starts at its rate onmsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgid "Choose what appears on the printed job traveler."msgstr "Choose what appears on the printed job traveler."@@ -8824,6 +8827,9 @@ msgstr "Enable to configure tax-specific depreciation methods on asset classes (msgid "Enable to generate IDs and descriptions for raw materials."msgstr "Enable to generate IDs and descriptions for raw materials."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Enable to require an authenticator app before anyone can open this company."@@ -8993,6 +8999,9 @@ msgstr "Enter the Onshape URL, client ID and client secret of your private OAuthmsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Enter the prior system's trial balance as of the day before the cutover, for every account."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."@@ -17909,12 +17918,21 @@ msgstr "Received lines from this supplier with quantity remaining to return"msgid "Received Qty"msgstr "Received Qty"+msgid "Received quantities start at the quantity to receive"+msgstr "Received quantities start at the quantity to receive"++msgid "Received quantities start at zero"+msgstr "Received quantities start at zero"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Received quantity not yet credited. The credit memo is created as a draft."msgid "Receives the invoice email"msgstr "Receives the invoice email"+msgid "Receiving"+msgstr "Receiving"+msgid "Receiving Location"msgstr "Receiving Location"@@ -21058,6 +21076,9 @@ msgstr "Start of Fiscal Year"msgid "Start of Tax Year"msgstr "Start of Tax Year"+msgid "Start Receipt Quantities at Zero"+msgstr "Start Receipt Quantities at Zero"+msgid "Start Time"msgstr "Start Time"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex f20fdec8db..6c1d66a314 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -4890,6 +4890,9 @@ msgstr "Elige las unidades de flota que este acuerdo renta. Cada una comienza amsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Elija los servicios que este contrato factura. Cada uno se agrega como una línea recurrente que puede precios en la cuadrícula."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Elige qué cantidad debería completarse por defecto en cada línea de una nueva recepción: lo que aún está por recibir, o cero para que el receptor ingrese lo que realmente llegó."+msgid "Choose what appears on the printed job traveler."msgstr "Elija qué aparece en la hoja viajera de la orden de trabajo impresa."@@ -8824,6 +8827,9 @@ msgstr "Habilitar para configurar métodos de depreciación específicos de impumsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Habilitar para generar IDs y descripciones para materias primas."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Habilitar para que los receptores ingresen la cantidad en cada línea en lugar de confirmar la cantidad pedida."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Habilitar para requerir una aplicación autenticadora antes de que alguien pueda abrir esta empresa."@@ -8993,6 +8999,9 @@ msgstr "Ingrese la URL de Onshape, el ID de cliente y el secreto de cliente de smsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Introduce el saldo de prueba del sistema anterior al día antes del cambio, para cada cuenta."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Ingresa la cantidad en cada línea que llegó. Una línea dejada en cero no se recibe cuando la recepción se contabiliza."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Ingrese la cantidad que debería haber sido este movimiento. Un movimiento opuesto para la diferencia se publica junto al original, en el período de tiempo del original."@@ -17909,12 +17918,21 @@ msgstr "Líneas recibidas de este proveedor con cantidad restante a devolver"msgid "Received Qty"msgstr "Cantidad Recibida"+msgid "Received quantities start at the quantity to receive"+msgstr "Las cantidades recibidas comienzan en la cantidad por recibir"++msgid "Received quantities start at zero"+msgstr "Las cantidades recibidas comienzan en cero"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "La Cantidad recibida aún no ha sido acreditada. La Nota de crédito se crea como Borrador."msgid "Receives the invoice email"msgstr "Recibe el correo de la factura"+msgid "Receiving"+msgstr "Recepción"+msgid "Receiving Location"msgstr "Ubicación de Recepción"@@ -21058,6 +21076,9 @@ msgstr "Inicio del ejercicio fiscal"msgid "Start of Tax Year"msgstr "Inicio del año fiscal"+msgid "Start Receipt Quantities at Zero"+msgstr "Iniciar cantidades de recepción en cero"+msgid "Start Time"msgstr "Hora de Inicio"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 7cc54695b4..22d0ea0203 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -4890,6 +4890,9 @@ msgstr "Choisissez les unités de parc que cet accord loue. Chacune commence àmsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Choisissez les prestations que ce contrat facture. Chacune est ajoutée en tant que ligne récurrente que vous pouvez tarifier dans la grille."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Choisissez ce qu'une nouvelle réception préremplie pour la quantité reçue sur chaque ligne : ce qui reste à réceptionner, ou zéro pour que le réceptionnaire saisisse la quantité réellement arrivée."+msgid "Choose what appears on the printed job traveler."msgstr "Choisir ce qui apparaît sur la fiche suiveuse d'ordre de fabrication imprimée."@@ -8824,6 +8827,9 @@ msgstr "Activez pour configurer les méthodes d'amortissement spécifiques aux imsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Activez pour générer des identifiants et des descriptions pour les matières premières."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Activez cette option pour que les réceptionnaires saisissent la quantité sur chaque ligne au lieu de confirmer la quantité commandée."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Activez pour exiger une application d'authentification avant que quiconque puisse ouvrir cette société."@@ -8993,6 +8999,9 @@ msgstr "Entrez l'URL Onshape, l'ID client et le secret client de votre applicatimsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Entrez la balance de vérification du système précédent au jour avant la transition, pour chaque compte."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Saisissez la quantité sur chaque ligne qui est arrivée. Une ligne laissée à zéro ne sera pas reçue quand la réception est comptabilisée."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Entrez la quantité que ce mouvement aurait dû avoir. Un mouvement opposé pour la différence est posté à côté de l'original, dans la période de l'original."@@ -17909,12 +17918,21 @@ msgstr "Lignes reçues de ce fournisseur avec quantité restant à retourner"msgid "Received Qty"msgstr "Quantité reçue"+msgid "Received quantities start at the quantity to receive"+msgstr "Les quantités reçues commencent à la quantité à réceptionner"++msgid "Received quantities start at zero"+msgstr "Les quantités reçues commencent à zéro"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Quantité reçue non encore facturisée. L'avoir est créé en tant que brouillon."msgid "Receives the invoice email"msgstr "Reçoit l'e-mail de facture"+msgid "Receiving"+msgstr "Réception"+msgid "Receiving Location"msgstr "Site de réception"@@ -21058,6 +21076,9 @@ msgstr "Début de l'exercice comptable"msgid "Start of Tax Year"msgstr "Début de l'année fiscale"+msgid "Start Receipt Quantities at Zero"+msgstr "Initialiser les quantités de réception à zéro"+msgid "Start Time"msgstr "Heure de début"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 69f896a7f9..4269b8db29 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -4890,6 +4890,9 @@ msgstr "उन फ्लीट इकाइयों को चुनें जmsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "उन सेवाओं को चुनें जिनका यह अनुबंध बिल करता है। प्रत्येक को एक आवर्ती पंक्ति के रूप में जोड़ा जाता है जिसे आप ग्रिड में मूल्य निर्धारित कर सकते हैं।"+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "चुनें कि एक नई प्राप्ति प्रत्येक पंक्ति की प्राप्त मात्रा को क्या भरता है: जो अभी भी प्राप्त करने के लिए है, या शून्य ताकि प्राप्तकर्ता दर्ज करे कि वास्तव में क्या आया।"+msgid "Choose what appears on the printed job traveler."msgstr "मुद्रित जॉब ट्रैवलर पर क्या दिखाई दे, इसे चुनें।"@@ -8824,6 +8827,9 @@ msgstr "परिसंपत्ति वर्गों पर कर-विmsgid "Enable to generate IDs and descriptions for raw materials."msgstr "कच्चे माल के लिए ID और विवरण उत्पन्न करने के लिए सक्षम करें।"+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "प्राप्तकर्ताओं को प्रत्येक पंक्ति पर मात्रा दर्ज करने के लिए सक्षम करें, ऑर्डर की मात्रा की पुष्टि करने के बजाय।"+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "कोई भी इस कंपनी को खोलने से पहले प्रमाणकर्ता ऐप की आवश्यकता होने के लिए सक्षम करें।"@@ -8993,6 +8999,9 @@ msgstr "अपने निजी OAuth एप्लिकेशन का Onshamsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "कटओवर से पहले के दिन की तरह पूर्व प्रणाली के परीक्षण शेष को हर खाते के लिए दर्ज करें।"+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "प्रत्येक पंक्ति पर जो मात्रा आई है दर्ज करें। शून्य पर छोड़ी गई कोई भी पंक्ति प्राप्ति पोस्ट होने पर प्राप्त नहीं होती है।"+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "वह मात्रा दर्ज करें जो यह आंदोलन होना चाहिए था। अंतर के लिए एक विपरीत आंदोलन मूल के बगल में, मूल की समय अवधि में पोस्ट किया जाता है।"@@ -17909,12 +17918,21 @@ msgstr "इस आपूर्तिकर्ता से प्राप्तmsgid "Received Qty"msgstr "प्राप्त मात्रा"+msgid "Received quantities start at the quantity to receive"+msgstr "प्राप्त मात्रा प्राप्त करने के लिए मात्रा से शुरू होती है"++msgid "Received quantities start at zero"+msgstr "प्राप्त मात्रा शून्य से शुरू होती है"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "प्राप्त मात्रा अभी तक जमा नहीं की गई। क्रेडिट नोट को ड्राफ्ट के रूप में बनाया गया है।"msgid "Receives the invoice email"msgstr "चालान ईमेल प्राप्त करता है"+msgid "Receiving"+msgstr "प्राप्ति"+msgid "Receiving Location"msgstr "प्राप्ति स्थान"@@ -21058,6 +21076,9 @@ msgstr "वित्तीय वर्ष की शुरुआत"msgid "Start of Tax Year"msgstr "कर वर्ष की शुरुआत"+msgid "Start Receipt Quantities at Zero"+msgstr "प्राप्ति मात्रा को शून्य से शुरू करें"+msgid "Start Time"msgstr "शुरुआत का समय"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex ab89e3b08f..ab368bc10a 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -4890,6 +4890,9 @@ msgstr "Scegli le unità flotta che questo accordo noleggia. Ogni unità iniziamsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Scegli i servizi che questo contratto fattura. Ognuno viene aggiunto come una riga ricorrente che puoi quotare nella griglia."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Scegli cosa una nuova entrata merci compila come quantità ricevuta di ogni riga: ciò che è ancora da ricevere, oppure zero in modo che il ricevente inserisca ciò che è effettivamente arrivato."+msgid "Choose what appears on the printed job traveler."msgstr "Scegli cosa appare sul cartellino di produzione stampato."@@ -8824,6 +8827,9 @@ msgstr "Abilita la configurazione di Metodi di ammortamento specifici per le tasmsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Abilita per generare ID e descrizioni per le materie prime."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Abilita i riceventi a inserire la quantità su ogni riga invece di confermare la quantità ordinata."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Attiva per richiedere un'app autenticatore prima che chiunque possa aprire questa azienda."@@ -8993,6 +8999,9 @@ msgstr "Immetti l'URL Onshape, l'ID client e il client secret della tua applicazmsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Inserisci il bilancio di verifica del sistema precedente alla data precedente il cutover, per ogni account."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Inserire la quantità su ogni riga che è arrivata. Una riga rimasta a zero non viene ricevuta quando l'entrata merci è registrata."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Inserisci la quantità che questo movimento avrebbe dovuto essere. Un movimento opposto per la differenza è registrato accanto all'originale, nel periodo temporale dell'originale."@@ -17909,12 +17918,21 @@ msgstr "Linee ricevute da questo fornitore con quantità rimanente da restituiremsgid "Received Qty"msgstr "Quantità Ricevuta"+msgid "Received quantities start at the quantity to receive"+msgstr "Le quantità ricevute iniziano alla quantità da ricevere"++msgid "Received quantities start at zero"+msgstr "Le quantità ricevute iniziano a zero"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Quantità ricevuta non ancora accreditata. La nota di credito è creata come bozza."msgid "Receives the invoice email"msgstr "Riceve l'email della fattura"+msgid "Receiving"+msgstr "Ricezione"+msgid "Receiving Location"msgstr "Ubicazione di ricevimento"@@ -21058,6 +21076,9 @@ msgstr "Inizio dell'esercizio fiscale"msgid "Start of Tax Year"msgstr "Inizio dell'anno fiscale"+msgid "Start Receipt Quantities at Zero"+msgstr "Inizia le quantità di entrata merci a zero"+msgid "Start Time"msgstr "Ora di inizio"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex cb0bd161f8..445debf616 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -4890,6 +4890,9 @@ msgstr "このアグリーメントでレンタルするフリート個を選択msgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "このコントラクトが請求する外注サービスを選択してください。各サービスは、グリッドで価格設定できる繰り返し明細として追加されます。"+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "新規入荷における各明細の受け取り数量の初期値を選択してください:入荷待ち数量を使用するか、受け取り者が実績値を入力できるようゼロから開始するか。"+msgid "Choose what appears on the printed job traveler."msgstr "印刷された製造指図現品票に表示される内容を選択します。"@@ -8824,6 +8827,9 @@ msgstr "税固有の減価償却方法を資産クラスで設定するためにmsgid "Enable to generate IDs and descriptions for raw materials."msgstr "有効にして、原材料のIDと説明を生成します。"+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "発注済数量の確認ではなく、各明細で受け取り者が数量を入力するようにします。"+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "この会社を開く前に誰でも認証器アプリが必須となるように有効にします。"@@ -8993,6 +8999,9 @@ msgstr "プライベートOAuthアプリケーションのOnshape URL、クラmsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "各アカウントについて、カットオーバーの前日現在の前システムの試算表を入力してください。"+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "到着した各明細の数量を入力してください。ゼロのままの明細は、入荷が転記済になったときに受け取られません。"+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "この移動がどの数量であるべきかを入力します。差分の反対の移動は、オリジナルの横に、オリジナルの期間に投稿されます。"@@ -17909,12 +17918,21 @@ msgstr "この仕入先から入荷した明細で返却数量が残っているmsgid "Received Qty"msgstr "受け取り数量"+msgid "Received quantities start at the quantity to receive"+msgstr "受け取り数量は入荷待ち数量から開始します"++msgid "Received quantities start at zero"+msgstr "受け取り数量はゼロから開始します"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "入荷数量がまだクレジットされていません。クレジットメモは下書きとして作成されます"msgid "Receives the invoice email"msgstr "請求書メールを受け取ります"+msgid "Receiving"+msgstr "受け取り"+msgid "Receiving Location"msgstr "入荷拠点"@@ -21058,6 +21076,9 @@ msgstr "会計年度の開始"msgid "Start of Tax Year"msgstr "税年度の開始"+msgid "Start Receipt Quantities at Zero"+msgstr "入荷数量をゼロから開始"+msgid "Start Time"msgstr "開始時刻"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex 4a6296690f..04f1e23aaf 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -4890,6 +4890,9 @@ msgstr "이 계약이 렌트하는 플릿 단위를 선택하세요. 각 단위msgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "이 계약이 청구하는 서비스를 선택하세요. 각 서비스는 그리드에서 가격을 책정할 수 있는 반복 라인으로 추가됩니다."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "새 입고 시 각 라인의 입고 수량을 무엇으로 채울지 선택하세요: 입고 대기 수량 또는 0(수령자가 실제 도착 수량을 입력하도록)"+msgid "Choose what appears on the printed job traveler."msgstr "인쇄된 작업 이동표에 나타날 내용을 선택하십시오."@@ -8824,6 +8827,9 @@ msgstr "자산 클래스에 세무 전용 감가상각 방법(예: MACRS, 가속msgid "Enable to generate IDs and descriptions for raw materials."msgstr "원자재에 대한 ID와 설명을 자동 생성하려면 활성화하세요."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "각 라인의 발주 수량을 확인하는 대신 수령자가 수량을 입력하도록 하려면 활성화하세요"+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "누구든 이 회사를 열기 전에 인증기 앱이 필요하려면 활성화합니다."@@ -8993,6 +8999,9 @@ msgstr "개인 OAuth 애플리케이션의 Onshape URL, 클라이언트 ID 및msgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "기준일 전날의 이전 시스템의 시산표를 모든 계정에 대해 입력하세요."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "도착한 각 라인의 수량을 입력하세요. 0으로 남겨진 라인은 입고가 전기될 때 입고되지 않습니다."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "이 이동이 있었어야 할 수량을 입력하십시오. 차이에 대한 반대 이동은 원본 옆의 원본의 시간 기간에 게시됩니다."@@ -17909,12 +17918,21 @@ msgstr "이 공급업체로부터 반품할 수량이 남아 있는 수령된msgid "Received Qty"msgstr "입고 수량"+msgid "Received quantities start at the quantity to receive"+msgstr "입고 수량은 입고 대기 수량에서 시작합니다"++msgid "Received quantities start at zero"+msgstr "입고 수량은 0에서 시작합니다"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "수신한 수량이 아직 대변처리되지 않았습니다. 대변전표가 초안으로 생성됩니다."msgid "Receives the invoice email"msgstr "송장 이메일을 수신합니다."+msgid "Receiving"+msgstr "입고"+msgid "Receiving Location"msgstr "입고 사업장"@@ -21058,6 +21076,9 @@ msgstr "회계연도 시작"msgid "Start of Tax Year"msgstr "회계연도 시작"+msgid "Start Receipt Quantities at Zero"+msgstr "입고 수량을 0으로 시작"+msgid "Start Time"msgstr "시작 시간"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex a4b23d5e06..6772383d44 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -4890,6 +4890,9 @@ msgstr "Wybierz sztuki floty wynajmowanej w ramach tej umowy. Każda rozpoczynamsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Wybierz Usługi, które ta umowa będzie fakturować. Każda jest dodawana jako cykliczna Pozycja, którą możesz wycenić w tabeli."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Wybierz, czym nowe Przyjęcie wypełni przyjętą ilość dla każdej Pozycji: czy Ilością do przyjęcia, czy zerem, aby odbiorca wpisał rzeczywistą ilość."+msgid "Choose what appears on the printed job traveler."msgstr "Wybierz, co pojawia się na drukowanym przewodniku zlecenia produkcyjnego."@@ -8824,6 +8827,9 @@ msgstr "Włącz konfigurację metod amortyzacji specyficznych dla podatków w klmsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Włącz, aby generować identyfikatory i opisy dla surowców."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Włącz, aby odbiorcy wpisali Ilość na każdej Pozycji zamiast potwierdzać Ilość zamówioną."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Włącz, aby wymagać aplikacji uwierzytelniającej, zanim ktokolwiek będzie mógł otworzyć tę firmę."@@ -8993,6 +8999,9 @@ msgstr "Podaj URL Onshape, identyfikator klienta i klucz tajny prywatnej aplikacmsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Wprowadź saldo próbne systemu poprzedniego z dnia przed przełączeniem dla każdego konta."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Wpisz Ilość na każdej Pozycji, która przybyła. Pozycja pozostawiona na zero nie będzie przyjęta, gdy Przyjęcie zostanie zaksięgowane."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Wprowadź ilość, która powinna być dla tego ruchu. Przeciwny ruch dla różnicy jest publikowany obok oryginału w okresie czasowym oryginału."@@ -17909,12 +17918,21 @@ msgstr "Otrzymane linie od tego dostawcy z pozostałą ilością do zwrotu"msgid "Received Qty"msgstr "Otrzymana Ilość"+msgid "Received quantities start at the quantity to receive"+msgstr "Ilości przyjęte zaczynają się od Ilości do przyjęcia."++msgid "Received quantities start at zero"+msgstr "Ilości przyjęte zaczynają się od zera."+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Ilość otrzymana nie została jeszcze zaakceptowana. Faktura korygująca jest tworzona jako wersja robocza."msgid "Receives the invoice email"msgstr "Odbiera wiadomość e-mail z fakturą"+msgid "Receiving"+msgstr "Odbieranie"+msgid "Receiving Location"msgstr "Lokalizacja przyjęcia"@@ -21058,6 +21076,9 @@ msgstr "Początek roku obrotowego"msgid "Start of Tax Year"msgstr "Początek roku podatkowego"+msgid "Start Receipt Quantities at Zero"+msgstr "Rozpocznij ilości przyjęcia od zera"+msgid "Start Time"msgstr "Czas rozpoczęcia"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex 336b091809..d45e0f3ae6 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -4890,6 +4890,9 @@ msgstr "Escolha as unidades da frota que este contrato aluga. Cada uma começa emsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Escolha os serviços que este contrato fatura. Cada um é adicionado como uma linha recorrente que você pode precificar na grade."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Escolha o que um novo recebimento preenche como quantidade recebida de cada linha: o que ainda precisa ser recebido, ou zero para o recebedor digitar o que realmente chegou."+msgid "Choose what appears on the printed job traveler."msgstr "Escolha o que aparece na ficha de acompanhamento impressa."@@ -8824,6 +8827,9 @@ msgstr "Ativar para configurar métodos de depreciação específicos de impostomsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Ativar para gerar IDs e descrições para matérias-primas."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Ativar para fazer os recebedores digitarem a quantidade em cada linha em vez de confirmar a quantidade pedida."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Ativar para exigir um aplicativo autenticador antes que alguém possa abrir esta empresa."@@ -8993,6 +8999,9 @@ msgstr "Insira a URL do Onshape, o ID do cliente e o segredo do cliente de seu amsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Insira o balancete do sistema anterior de um dia antes da transição, para cada conta."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Digite a quantidade em cada linha que chegou. Uma linha deixada em zero não é recebida quando o recebimento é contabilizado."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Insira a quantidade que esse movimento deveria ter sido. Um movimento oposto para a diferença é lançado ao lado do original, no período de tempo do original."@@ -17909,12 +17918,21 @@ msgstr "Linhas recebidas deste fornecedor com quantidade restante para devolver"msgid "Received Qty"msgstr "Qtd. Recebida"+msgid "Received quantities start at the quantity to receive"+msgstr "Quantidades recebidas começam na quantidade a receber"++msgid "Received quantities start at zero"+msgstr "Quantidades recebidas começam em zero"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Quantidade recebida ainda não creditada. A nota de crédito é criada como rascunho."msgid "Receives the invoice email"msgstr "Recebe o email da fatura"+msgid "Receiving"+msgstr "Recebimento"+msgid "Receiving Location"msgstr "Local de Recebimento"@@ -21058,6 +21076,9 @@ msgstr "Início do Ano Fiscal"msgid "Start of Tax Year"msgstr "Início do ano fiscal"+msgid "Start Receipt Quantities at Zero"+msgstr "Iniciar Quantidades de Recebimento em Zero"+msgid "Start Time"msgstr "Hora de Início"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 2ca5334d31..20fab9b611 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -4890,6 +4890,9 @@ msgstr "Выберите единицы флота, которые арендуmsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Выберите услуги, которые этот контракт выставляет. Каждая добавляется как повторяющаяся строка, цену которой вы можете устанавливать в таблице."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Выберите, что будет предварительно заполнено как полученное количество на каждой строке в новом поступлении: величину, ожидающую приемки, или ноль, чтобы получатель указал фактически прибывший объем."+msgid "Choose what appears on the printed job traveler."msgstr "Выбрать, что отображается на распечатанном маршрутном листе работы."@@ -8824,6 +8827,9 @@ msgstr "Включите, чтобы настроить налоговые меmsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Включите для создания идентификаторов и описаний для сырья."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Включите, чтобы получатели вводили количество на каждой строке вместо подтверждения заказанного объема."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Включите, чтобы требовать приложение-аутентификатор перед открытием этой организации."@@ -8993,6 +8999,9 @@ msgstr "Введите URL Onshape, ID клиента и клиентский сmsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Введите пробный баланс предыдущей системы на день перед переключением для каждого счета."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Введите количество на каждой строке, которое прибыло. Строка, оставленная с нулем, не будет приемлена при проведении поступления."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Введите количество, которое должно было быть в этом движении. Противоположное движение для разницы размещается рядом с оригинальным в его временном периоде."@@ -17909,12 +17918,21 @@ msgstr "Полученные строки от этого поставщикаmsgid "Received Qty"msgstr "Полученное кол-во"+msgid "Received quantities start at the quantity to receive"+msgstr "Полученные количества начинаются с ожидаемого к приемке количества"++msgid "Received quantities start at zero"+msgstr "Полученные количества начинаются с нуля"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Полученное количество еще не зачислено. Кредит-нота создана как черновик."msgid "Receives the invoice email"msgstr "Получает письмо со счетом-фактурой"+msgid "Receiving"+msgstr "Приемка"+msgid "Receiving Location"msgstr "Площадка приемки"@@ -21058,6 +21076,9 @@ msgstr "Начало финансового года"msgid "Start of Tax Year"msgstr "Начало налогового года"+msgid "Start Receipt Quantities at Zero"+msgstr "Начинать полученные количества с нуля"+msgid "Start Time"msgstr "Время начала"diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex b4ef89f070..77c47d40f0 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -4890,6 +4890,9 @@ msgstr "Bu anlaşmanın kiraladığı filo adetlerini seçin. Her biri dosyadakimsgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "Bu sözleşmenin faturaladığı hizmetleri seçin. Her biri, ızgarada fiyatlandırabileceğiniz yinelenen bir satır olarak eklenir."+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "Yeni bir mal kabul oluştururken her satırda alınan miktar için ne önceden doldurulacağını seçin: alınması bekleyen miktar mı, yoksa alıcının gerçekte gelen miktarı girmesi için sıfır mı?"+msgid "Choose what appears on the printed job traveler."msgstr "Yazdırılan İş takip kartında neyin görüneceğini seçin."@@ -8824,6 +8827,9 @@ msgstr "Varlık sınıfları için vergiye özgü amortisman yöntemlerini yapımsgid "Enable to generate IDs and descriptions for raw materials."msgstr "Hammaddeler için ID'ler ve açıklamalar oluşturmayı etkinleştir."+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "Alıcıların sipariş edilen miktarı onaylamak yerine her satırdaki miktarı girmelerini etkinleştirin."+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "Herhangi birinin bu şirketi açabilmesi için kimlik doğrulaması uygulaması gerektirmek için etkinleştirin."@@ -8993,6 +8999,9 @@ msgstr "Özel OAuth uygulamanızın Onshape URL'sini, istemci ID'sini ve istemcimsgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "Her hesap için devir tarihinden önceki günü itibarıyla önceki sistemin mizan sütununu girin."+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "Gelen her satırdaki miktarı girin. Sıfırda bırakılan bir satır, mal kabul muhasebeleştirildiğinde alınmış sayılmaz."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Bu hareketin olması gereken miktarı girin. Farktaki ters hareket, orijinalin zaman döneminde orijinalin yanında deftere kaydedilir."@@ -17909,12 +17918,21 @@ msgstr "Bu tedarikçiden alınan ve iade edilmek üzere kalan miktar içeren satmsgid "Received Qty"msgstr "Alınan Miktar"+msgid "Received quantities start at the quantity to receive"+msgstr "Alınan miktarlar alınması bekleyen miktar ile başlar"++msgid "Received quantities start at zero"+msgstr "Alınan miktarlar sıfır ile başlar"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "Alınan Miktar henüz Alacak dekontusunda muhasebeleştirilmedi. Alacak dekontu Taslak olarak oluşturuldu."msgid "Receives the invoice email"msgstr "Fatura e-postasını alır"+msgid "Receiving"+msgstr "Mal Kabulü"+msgid "Receiving Location"msgstr "Mal kabul lokasyonu"@@ -21058,6 +21076,9 @@ msgstr "Mali Yıl Başlangıcı"msgid "Start of Tax Year"msgstr "Vergi Yılı Başlangıcı"+msgid "Start Receipt Quantities at Zero"+msgstr "Mal Kabul Miktarlarını Sıfırdan Başlat"+msgid "Start Time"msgstr "Başlangıç Saati"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 4e1ebebb5c..281db07ab2 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -4890,6 +4890,9 @@ msgstr "选择本协议租赁的设备。每件在频率的文件费率开始;msgid "Choose the services this contract bills. Each is added as a recurring line you can price in the grid."msgstr "选择此合同开票的服务。每个作为循环行添加,您可以在网格中定价"+msgid "Choose what a new receipt fills in as each line's received quantity: what is still to receive, or zero so the receiver enters what actually arrived."+msgstr "选择新的收货单如何为每一行填充已收数量:是填充待收货数量,还是填充零以便接收人输入实际到货的数量。"+msgid "Choose what appears on the printed job traveler."msgstr "选择打印工单流转卡上显示的内容。"@@ -8824,6 +8827,9 @@ msgstr "启用以在资产类别上配置特定于税收的折旧方法(例如msgid "Enable to generate IDs and descriptions for raw materials."msgstr "启用以为原材料生成ID和描述。"+msgid "Enable to make receivers enter the quantity on each line instead of confirming the ordered amount."+msgstr "启用此选项可让接收人在每一行输入数量,而不是确认订购数量。"+msgid "Enable to require an authenticator app before anyone can open this company."msgstr "启用以要求在任何人打开此公司之前使用身份验证器应用程序。"@@ -8993,6 +8999,9 @@ msgstr "输入您的私有 OAuth 应用程序的 Onshape URL、客户端 ID 和msgid "Enter the prior system's trial balance as of the day before the cutover, for every account."msgstr "输入前系统在过账前一天的试算平衡余额,用于每个账户。"+msgid "Enter the quantity on each line that arrived. A line left at zero is not received when the receipt is posted."+msgstr "输入每一行到货的数量。当收货单已过账时,数量为零的行将不被记为已收货。"+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "输入此移动应该的数量。差异的相反移动在原始时期内的原始旁边过账。"@@ -17909,12 +17918,21 @@ msgstr "来自此供应商且还有数量待退货的已收行"msgid "Received Qty"msgstr "已收货数量"+msgid "Received quantities start at the quantity to receive"+msgstr "收货数量从待收货数量开始"++msgid "Received quantities start at zero"+msgstr "收货数量从零开始"+msgid "Received quantity not yet credited. The credit memo is created as a draft."msgstr "已收到的数量尚未进行贷项。贷项通知单已创建为草稿。"msgid "Receives the invoice email"msgstr "接收发票邮件"+msgid "Receiving"+msgstr "收货"+msgid "Receiving Location"msgstr "收货地点"@@ -21058,6 +21076,9 @@ msgstr "会计年度开始"msgid "Start of Tax Year"msgstr "税年开始"+msgid "Start Receipt Quantities at Zero"+msgstr "收货数量从零开始"+msgid "Start Time"msgstr "开始时间"diff --git a/packages/server-functions/src/create/index.ts b/packages/server-functions/src/create/index.tsindex 7fba7a58d2..aaee16adf9 100644--- a/packages/server-functions/src/create/index.ts+++ b/packages/server-functions/src/create/index.ts@@ -57,6 +57,22 @@ async function getFallbackLocationId(return location.data?.id ?? null;}+// Blind receiving (`companySettings.receiptQuantitiesStartAtZero`): when on, a+// new receipt's lines start at a received quantity of 0 rather than what is+// still to receive, so the receiver enters what actually arrived and a line+// nothing arrived for stays at 0.+async function receiptQuantitiesStartAtZero(+ db: Kysely<KyselyDatabase>,+ companyId: string+): Promise<boolean> {+ const row = await db+ .selectFrom("companySettings")+ .select("receiptQuantitiesStartAtZero")+ .where("id", "=", companyId)+ .executeTakeFirst();+ return row?.receiptQuantitiesStartAtZero === true;+}+export const createInput = z.discriminatedUnion("type", [z.object({type: z.literal("nonConformanceTasks"),@@ -1017,6 +1033,8 @@ const create = defineServerFn({return acc;}, {});+ const startAtZero = await receiptQuantitiesStartAtZero(db, companyId);+const receiptLineItems = purchaseOrderLines.data.reduce<ReceiptLineItem[]>((acc, d) => {@@ -1046,7 +1064,9 @@ const create = defineServerFn({orderQuantity: d.purchaseQuantity * (d.conversionFactor ?? 1),outstandingQuantity:outstandingQuantity * (d.conversionFactor ?? 1),- receivedQuantity: outstandingQuantity * (d.conversionFactor ?? 1),+ receivedQuantity: startAtZero+ ? 0+ : outstandingQuantity * (d.conversionFactor ?? 1),conversionFactor: d.conversionFactor ?? 1,requiresSerialTracking:serializedItems.has(d.itemId) && !isOutsideOperation,@@ -1154,7 +1174,7 @@ const create = defineServerFn({unreceivedFaLines.map((line) => ({receiptId: receiptId,purchaseOrderLineId: line.id,- received: true,+ received: !startAtZero,companyId,createdBy: userId}))@@ -1234,6 +1254,8 @@ const create = defineServerFn({return acc;}, {});+ const startAtZero = await receiptQuantitiesStartAtZero(db, companyId);+const receiptLineItems = warehouseTransferLines.data.reduce<ReceiptLineItem[]>((acc, d) => {@@ -1257,7 +1279,7 @@ const create = defineServerFn({storageUnitId: d.toStorageUnitId,requiresSerialTracking: serialTracking,requiresBatchTracking: batchTracking,- receivedQuantity: quantityToReceive,+ receivedQuantity: startAtZero ? 0 : quantityToReceive,outstandingQuantity: quantityToReceive,unitPrice: 0, // Transfers don't have a unit priceconversionFactor: 1,@@ -1423,6 +1445,8 @@ const create = defineServerFn({if (hasReceipt && receipt.data!.status !== "Draft")throw new Error(`Cannot re-source a ${receipt.data!.status} receipt`);+ const startAtZero = await receiptQuantitiesStartAtZero(db, companyId);+const receiptLineItems = salesReturnOrderLines.data.reduce<ReceiptLineItem[]>((acc, d) => {@@ -1441,7 +1465,7 @@ const create = defineServerFn({storageUnitId: defaultStorageUnitByItem.get(d.itemId) ?? null,requiresSerialTracking: serializedItems.has(d.itemId),requiresBatchTracking: batchItems.has(d.itemId),- receivedQuantity: outstanding,+ receivedQuantity: startAtZero ? 0 : outstanding,outstandingQuantity: outstanding,// Cost is resolved at posting (original outbound cost / current /// zero-value reason) — never the line's credit-basis unitPrice.@@ -1589,6 +1613,8 @@ const create = defineServerFn({return acc;}, {});+ const startAtZero = await receiptQuantitiesStartAtZero(db, companyId);+const receiptLineItems = warehouseTransferLines.data.reduce<ReceiptLineItem[]>((acc, d) => {@@ -1611,7 +1637,7 @@ const create = defineServerFn({storageUnitId: d.toStorageUnitId,requiresSerialTracking: serialTracking,requiresBatchTracking: batchTracking,- receivedQuantity: quantityToReceive,+ receivedQuantity: startAtZero ? 0 : quantityToReceive,outstandingQuantity: quantityToReceive,unitPrice: 0, // Transfers don't have a unit priceconversionFactor: 1,diff --git a/packages/server-functions/src/post-receipt/index.ts b/packages/server-functions/src/post-receipt/index.tsindex 4c65352b8d..f7bbfcf4f0 100644--- a/packages/server-functions/src/post-receipt/index.ts+++ b/packages/server-functions/src/post-receipt/index.ts@@ -1663,6 +1663,10 @@ const postReceipt = defineServerFn({normalQuantity: normalQty,normalCost: normalPortionCost} = receiptLineCosts[index]!;+ // A line nothing arrived for books nothing — the Sales Return and+ // Inbound Transfer branches skip it the same way.+ if (receivedQuantity === 0) continue;+const itemTrackingType =receiptJournalLines[index]!.itemTrackingType ?? "Inventory";const isNegativeReceipt = receivedQuantity < 0;diff --git a/packages/server-functions/src/receipt-quantities-start-at-zero.test.ts b/packages/server-functions/src/receipt-quantities-start-at-zero.test.tsnew file mode 100644index 0000000000..5aa05cf5d8--- /dev/null+++ b/packages/server-functions/src/receipt-quantities-start-at-zero.test.ts@@ -0,0 +1,178 @@+// 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.++// Blind receiving against the live database: with+// `companySettings.receiptQuantitiesStartAtZero` on, a purchase-order receipt's+// lines start at 0, and posting it books only the lines that were received.++import { expect } from "vitest";+import {+ alwaysPostFixture,+ type Fixture,+ seed,+ USER,+ unwrap+} from "./always-post-test-fixture";+import create from "./create";+import { databaseTest } from "./local-database-test-fixture";+import postReceipt from "./post-receipt";++/** A purchase order with two lines of 10 of the fixture's part. */+async function purchaseOrderWithTwoLines(f: Fixture): Promise<string> {+ const purchaseOrderId = `${f.prefix}-po-blind`;+ await seed(f, async (trx) => {+ const interaction = await trx+ .insertInto("supplierInteraction")+ .values({ supplierId: f.supplierId, companyId: f.companyId })+ .returning("id")+ .executeTakeFirstOrThrow();+ await trx+ .insertInto("purchaseOrder")+ .values({+ id: purchaseOrderId,+ purchaseOrderId: "PO-BLIND",+ supplierId: f.supplierId,+ supplierInteractionId: interaction.id,+ currencyCode: "USD",+ exchangeRate: 1,+ companyId: f.companyId,+ createdBy: USER+ })+ .execute();+ await trx+ .insertInto("purchaseOrderDelivery")+ .values({+ id: purchaseOrderId,+ locationId: f.locationId,+ companyId: f.companyId+ })+ .execute();+ await trx+ .insertInto("purchaseOrderLine")+ .values(+ ["line-1", "line-2"].map((key) => ({+ id: `${f.prefix}-pol-${key}`,+ purchaseOrderId,+ purchaseOrderLineType: "Part" as const,+ itemId: f.partId,+ purchaseQuantity: 10,+ supplierUnitPrice: 10,+ exchangeRate: 1,+ conversionFactor: 1,+ inventoryUnitOfMeasureCode: "EA",+ locationId: f.locationId,+ companyId: f.companyId,+ createdBy: USER+ }))+ )+ .execute();+ });+ return purchaseOrderId;+}++async function setStartAtZero(f: Fixture, value: boolean) {+ await f.db+ .updateTable("companySettings")+ .set({ receiptQuantitiesStartAtZero: value })+ .where("id", "=", f.companyId)+ .execute();+}++async function receiptLines(f: Fixture, receiptId: string) {+ return f.db+ .selectFrom("receiptLine")+ .select(["id", "lineId", "receivedQuantity", "outstandingQuantity"])+ .where("receiptId", "=", receiptId)+ .where("companyId", "=", f.companyId)+ .orderBy("lineId")+ .execute();+}++databaseTest(+ "a receipt starts each line at the quantity to receive when the setting is off",+ async () => {+ const f = await alwaysPostFixture();+ try {+ const purchaseOrderId = await purchaseOrderWithTwoLines(f);+ const receipt = unwrap(+ await create(f.ctx, {+ type: "receiptFromPurchaseOrder",+ purchaseOrderId,+ locationId: f.locationId+ })+ );++ const lines = await receiptLines(f, receipt.id);+ expect(lines.map((l) => Number(l.receivedQuantity))).toEqual([10, 10]);+ } finally {+ await f.cleanup();+ }+ }+);++databaseTest(+ "with the setting on, a receipt starts at 0 and posts only the lines that were received",+ async () => {+ const f = await alwaysPostFixture();+ try {+ await setStartAtZero(f, true);+ const purchaseOrderId = await purchaseOrderWithTwoLines(f);+ const receipt = unwrap(+ await create(f.ctx, {+ type: "receiptFromPurchaseOrder",+ purchaseOrderId,+ locationId: f.locationId+ })+ );++ const lines = await receiptLines(f, receipt.id);+ expect(+ lines.map((l) => [+ Number(l.receivedQuantity),+ Number(l.outstandingQuantity)+ ])+ ).toEqual([+ [0, 10],+ [0, 10]+ ]);++ // The receiver counts 4 on the first line; nothing arrived for the second.+ await f.db+ .updateTable("receiptLine")+ .set({ receivedQuantity: 4 })+ .where("id", "=", lines[0]!.id)+ .where("companyId", "=", f.companyId)+ .execute();++ unwrap(await postReceipt(f.ctx, { type: "post", receiptId: receipt.id }));++ const ledger = await f.db+ .selectFrom("itemLedger")+ .select("quantity")+ .where("documentId", "=", receipt.id)+ .where("companyId", "=", f.companyId)+ .execute();+ expect(ledger.map((row) => Number(row.quantity))).toEqual([4]);++ const purchaseOrderLines = await f.db+ .selectFrom("purchaseOrderLine")+ .select(["id", "quantityReceived", "receivedComplete"])+ .where("purchaseOrderId", "=", purchaseOrderId)+ .where("companyId", "=", f.companyId)+ .orderBy("id")+ .execute();+ expect(+ purchaseOrderLines.map((l) => [+ Number(l.quantityReceived),+ l.receivedComplete+ ])+ ).toEqual([+ [4, false],+ [0, false]+ ]);+ } finally {+ await f.cleanup();+ }+ }+);