Files
marqdo/examples/executable-knowledge/capabilities/order-pricing.mq.md
T
cflmyandCursor 687c168014 feat(parse): use nested YAML import: maps instead of one-liner binds
Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target
entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the
old one-liner form, and migrate lib/ext/examples/tests/docs accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 19:33:58 +08:00

28 lines
622 B
Markdown

---
id: capability.order-pricing
type: Capability
import:
tax: ../knowledge/tax-2026.mq.md
order: ../schema/order.mq.md
---
# 订单定价
## 含税价
+ `行`
**金额 = [订单行金额](at(行, "金额"))**
**品类 = [订单行品类](at(行, "品类"))**
**税率 = [适用税率](tax.标准税率.查询(品类))**
**结果 = [本行含税价](金额 * (1 + 税率))**
**结果**
## 含税总额
+ `订单`
- [逐个订单行](遍历 订单.行 为 行)
**行含税价 = [计算本行含税价](订单定价.含税价(行))**
**总额 = [汇总全部行含税价](sum(行含税价))**
**总额**