有什么办法可以限制 NetSuite 批次/序列号的唯一性吗?

发布于 2025-01-11 10:56:00 字数 398 浏览 1 评论 0原文

我遇到 NetSuite 序列号/批号可以重复的问题,如图所示 下面

在此处输入图像描述

我想通过设置/开发来防止出现重复的批号, 或者退后一步,通过一份报告/SuiteQL 来监控重复的批号。

预先感谢您的任何提示!

I am facing a problem that NetSuite Serial/ Lot number can be duplicated Like the picture below,

enter image description here

And I wanna prevent duplicated Lot Numbers from occurring by setting/ developing,
Or one step back, one report/ SuiteQL to monitor duplicated Lot Numbers.

Thanks in advance for any tips!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蒲公英的约定 2025-01-18 10:56:00

我想我已经克服了监控重复批号的问题,就像下面的截图一样。
输入图片此处描述

感谢 SuiteQL 查询工具支持 你可能会得到下面的SQL。

--2022/3/4 Query Lot/Serial Number Duplicate Purchase Order
SELECT
    B.tran_id,
    A.inventory_number
FROM
(
SELECT
    inventoryNumber.inventorynumber AS inventory_number
FROM
    transaction INNER JOIN
        transactionLine ON transaction.id = transactionLine.transaction
    INNER JOIN
        inventoryAssignment ON (transactionLine.id = inventoryAssignment.transactionline
        AND
        transactionLine.transaction = inventoryAssignment.transaction )
    INNER JOIN
        inventoryNumber ON inventoryAssignment.inventorynumber = inventoryNumber.id
WHERE
    UPPER(transaction.type) IN ('PURCHORD')
GROUP BY
    inventoryNumber.inventorynumber
HAVING COUNT(inventoryNumber.inventorynumber) > 1
) AS A
JOIN
(
    SELECT
    transaction.tranid AS tran_id,
    inventoryNumber.inventorynumber AS lot_number
FROM
    transaction FULL JOIN
        transactionLine ON transaction.id = transactionLine.transaction
    INNER JOIN
        inventoryAssignment ON (transactionLine.id = inventoryAssignment.transactionline
        AND
        transactionLine.transaction = inventoryAssignment.transaction )
    INNER JOIN
        inventoryNumber ON inventoryAssignment.inventorynumber = inventoryNumber.id
WHERE
    UPPER(transaction.type) IN ('PURCHORD')
) AS B
    ON A.inventory_number = B.lot_number

I think I had overcome the problem of monitoring the duplicate Lot Number, just like the screenshot below.
enter image description here

Thanks for SuiteQL Query Tool support And you may get the SQL bellow.

--2022/3/4 Query Lot/Serial Number Duplicate Purchase Order
SELECT
    B.tran_id,
    A.inventory_number
FROM
(
SELECT
    inventoryNumber.inventorynumber AS inventory_number
FROM
    transaction INNER JOIN
        transactionLine ON transaction.id = transactionLine.transaction
    INNER JOIN
        inventoryAssignment ON (transactionLine.id = inventoryAssignment.transactionline
        AND
        transactionLine.transaction = inventoryAssignment.transaction )
    INNER JOIN
        inventoryNumber ON inventoryAssignment.inventorynumber = inventoryNumber.id
WHERE
    UPPER(transaction.type) IN ('PURCHORD')
GROUP BY
    inventoryNumber.inventorynumber
HAVING COUNT(inventoryNumber.inventorynumber) > 1
) AS A
JOIN
(
    SELECT
    transaction.tranid AS tran_id,
    inventoryNumber.inventorynumber AS lot_number
FROM
    transaction FULL JOIN
        transactionLine ON transaction.id = transactionLine.transaction
    INNER JOIN
        inventoryAssignment ON (transactionLine.id = inventoryAssignment.transactionline
        AND
        transactionLine.transaction = inventoryAssignment.transaction )
    INNER JOIN
        inventoryNumber ON inventoryAssignment.inventorynumber = inventoryNumber.id
WHERE
    UPPER(transaction.type) IN ('PURCHORD')
) AS B
    ON A.inventory_number = B.lot_number
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文