PI 生成
piPI 生成(PI generator):算形式发票的小计、折扣、总计和定金。 Subtotal, discount, total and deposit of a proforma invoice. 输入为精确的十进制字符串 / Inputs are exact decimal strings. 只算形式发票(PI)上一行商品的金额:这一行的金额、折扣、运费、保险费、总额,以及定金和余款。商品有几行时,请用户到 chukoudan.com/pi/ 的页面里做,不要自己把几行拆开或加在一起算,绝不给错的总额。买方、卖方、银行、条款这些文字不在这里,也请用户到那个页面里填(内容只留在用户自己的浏览器里)。数量 quantity 和单价 unitPrice 必须是用户给的数,绝不要编;运费、保险费、折扣、定金比例没给就不要填。折扣 discount 默认是小计的百分数,discountBasis 填 percent;用户说的是一个金额,discountBasis 填 amount。discountBasis 只能写 percent 或 amount 这两个英文词,绝不要写 % 符号。 / Only the figures of ONE goods line of a proforma invoice: its amount, discount, freight, insurance, total, deposit and balance. For several lines the user goes to chukoudan.com/pi/; never split or add lines up yourself, so the total is never wrong. The parties, the bank and the terms are written on that page, not here. Never make up a quantity or a price; leave freight, insurance, discount and deposit rate out when the user gave none. discount is a percentage of the subtotal (discountBasis percent) unless it is an amount (discountBasis amount). discountBasis is exactly one of the two words percent or amount; never write the symbol %. 用户没有给的数字和日期不要自己编:必填的先问用户,选填的不填。 / Never make up a figure or a date the user did not give: ask for a required one, leave an optional one out. 回复时引用回答里的 provenance.source_line / Quote provenance.source_line in your reply. 结果仅供计算参考,不是税务、法律或投资意见;回答时请带上返回的说明和来源行。 / The result is for calculation and reference only, not tax, legal or investment advice; when you answer, pass on the returned notice and source line.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"lines": [
{
"quantity": "4500",
"unitPrice": "7.04"
},
{
"quantity": "12.5",
"unitPrice": "3.333"
},
{
"quantity": "3",
"unitPrice": "0.125"
}
],
"freight": "1800",
"currency": "USD",
"discount": "5",
"insurance": "95.5",
"depositRate": "30",
"discountBasis": "percent"
},
"name": "pi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | 商品行 / Goods lines | |
| freight | No | 运费 / Freight | |
| currency | No | 币种 / Currency | |
| discount | No | 折扣 / Discount | |
| insurance | No | 保险费 / Insurance | |
| issueDate | No | 开单日期 / Issue date | |
| validUntil | No | 有效期至 / Valid until | |
| depositRate | No | 定金比例(%) / Deposit rate (%) | |
| discountBasis | No | 折扣方式。可选值:percent = 按比例(%);amount = 按金额 / Discount is. options: percent = A percentage (%); amount = An amount |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| links | Yes | ||
| steps | Yes | ||
| outputs | Yes | ||
| warnings | Yes | ||
| normalized | No | ||
| provenance | Yes |