[Bug]: Cannot add sales line item to sales order, on an on-prem installation with basic license

未关闭 适合新手
#14,569 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
backend

调研方向

阅读第 87 行的 app/Page/99000833/Check Prod. Order Status.dal,并从 Sales Line 验证开始,沿着 issue 中列出的调用路径追踪。检查制造功能不可用时 MfgSetup.Get() 的行为,然后使用基本许可证重现销售订单;当可以添加商品且不会出现缺少 Manufacturing Setup 的错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Team: SCM
Describe the issue

The issue:
Sales Line No. validation result in a manufacturing setup Get() even when manufacturing is not part of the license.
The application then cannot add an item to a sales order with error saying Manufacturing Setup does not exist.

Cause:
SalesLineShowWarning (\app\Page\99000833\Check Prod. Order Status.dal:87)
SalesLineCheck (\app\Codeunit\99000777\Check Prod. Order Status.dal:31)
CheckReceiptOrderStatus (\app\Codeunit\99000777\Check Prod. Order Status.dal:68)
OnCheckReceiptOrderStatus (\app\Codeunit\99000777\Check Prod. Order Status.dal:44)
OnCheckReceiptOrderStatus (\app\Table\37\Sales Line.dal:15750)
CheckReceiptOrderStatus (\app\Table\37\Sales Line.dal:11305)
Shipment Date - OnValidate (\app\Table\37\Sales Line.dal:509)
CheckItemAvailable (\app\Table\37\Sales Line.dal:6218)
No. - OnValidate (\app\Table\37\Sales Line.dal:244)

Inside SalesLineShowWarning we have MfgSetup.Get(); without an if clause.
A system with basic license excluding manufacturing will not have a Manufacturing setup created.
Adding item to a sales order will error when this statement is run.

Fix:
Change the MfgSetup.Get to:
if not MfgSetup.Get() then
exit(false);

Expected behavior

Item is added to the sales order

Steps to reproduce
  1. Use an on-prem installation with only basic license, without manufacturing
  2. Create sales order and add a customer
  3. Try adding an item to the sales order
Additional context

Use an on-prem installation with only basic license, without manufacturing

I will provide a fix for a bug
  • I will provide a fix for a bug
主要语言
AL
星标
730
派生
514
平均合并
2 天 23 小时
30 天内合并 PR
601

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/BCApps 的其他 Issue

查看 microsoft/BCApps 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。