# `cahpaymentslave`

> 采购订单从表


- **Engine:** InnoDB
- **Collation:** utf8mb3_general_ci

## Columns

| # | Name | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | `iIncrement` | `int` | NO | PRI |  | auto_increment | 自增列 |
| 2 | `sId` | `varchar(100)` | NO | MUL |  |  | 唯一ID |
| 3 | `sBrandsId` | `varchar(100)` | NO |  |  |  | 加工商ID |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |  |  |  | 子公司ID |
| 5 | `iOrder` | `int` | NO |  | 0 |  | 排序号 |
| 6 | `sMakePerson` | `varchar(255)` | YES |  |  |  | 制单人 |
| 7 | `sParentId` | `varchar(100)` | NO |  |  |  | 父级ID |
| 8 | `sType` | `varchar(255)` | NO |  |  |  | 类型（预付款、采购对账、财务调整） |
| 9 | `sMaterialsId` | `varchar(100)` | NO |  |  |  | 材料ID |
| 10 | `sMaterialsStyle` | `varchar(255)` | NO |  |  |  | 材料规格 |
| 11 | `dAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 数量 |
| 12 | `sAuxiliaryUnit` | `varchar(255)` | NO |  |  |  | 单位 |
| 13 | `dMaterialsQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 换算数量 |
| 14 | `dConversionQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 预留数量 |
| 15 | `sSrcSlaveId` | `varchar(100)` | NO |  |  |  | 源单从表Id |
| 16 | `sSrcId` | `varchar(100)` | NO |  |  |  | 源单ID |
| 17 | `sSrcNo` | `varchar(255)` | NO |  |  |  | 源单号 |
| 18 | `dSrcMoney` | `decimal(18,6)` | YES |  |  |  | 源单金额 |
| 19 | `sSlaveMemo` | `text` | YES |  |  |  | 从表备注 |
| 20 | `dBalanceMoney` | `decimal(18,6)` | YES |  |  |  | 余额 |
| 21 | `dRoundingMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 舍入 |
| 22 | `dTotalMoney` | `decimal(18,6)` | NO |  |  |  | 收款金额 |
| 23 | `bMinus` | `bit(1)` | NO |  | b'0' |  | 红冲 |
| 24 | `dMinusMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 红冲金额 |
| 25 | `sSrcFormId` | `varchar(100)` | NO |  |  |  | 源单界面Id |
| 26 | `sTaxId` | `varchar(100)` | YES |  |  |  | 税率ID |
| 27 | `sOrderId` | `varchar(100)` | NO |  |  |  | 订单ID |
| 28 | `sOrderNo` | `varchar(255)` | NO |  |  |  | 订单号 |
| 29 | `sWorkOrderId` | `varchar(100)` | NO |  |  |  | 工单ID |
| 30 | `sWorkOrderNo` | `varchar(255)` | NO |  |  |  | 工单号 |
| 31 | `sWorkOrderControlId` | `varchar(100)` | NO |  |  |  | 工单控制表ID |
| 32 | `sPaymentType` | `varchar(255)` | NO |  |  |  | 付款类型(工资、报销、住宿） |
| 33 | `sSReserve1` | `varchar(255)` | YES |  |  |  | 预留字符1 |
| 34 | `sSReserve2` | `varchar(255)` | YES |  |  |  | 预留字符2 |
| 35 | `sSReserve3` | `varchar(255)` | YES |  |  |  | 预留字符3 |
| 36 | `sSReserve4` | `varchar(255)` | YES |  |  |  | 预留字符4 |
| 37 | `sSReserve5` | `varchar(255)` | YES |  |  |  | 预留字符5 |
| 38 | `sSReserve6` | `varchar(255)` | YES |  |  |  | 预留字符6 |
| 39 | `dSReserve1` | `decimal(18,6)` | YES |  |  |  | 预留数字1 |
| 40 | `dSReserve2` | `decimal(18,6)` | YES |  |  |  | 预留数字2 |
| 41 | `dSReserve3` | `decimal(18,6)` | YES |  |  |  | 预留数字3 |
| 42 | `iSReserve1` | `int` | YES |  |  |  | 预留整型1 |
| 43 | `iSReserve2` | `int` | YES |  |  |  | 预留整型2 |
| 44 | `iSReserve3` | `int` | YES |  |  |  | 预留整型3 |
| 45 | `tSReserve1` | `datetime` | YES |  |  |  | 预留日期1 |
| 46 | `tSReserve2` | `datetime` | YES |  |  |  | 预留日期2 |
| 47 | `sUnTaskFormId` | `varchar(100)` | NO |  |  |  | 未清界面Id |
| 48 | `tSrcDate` | `datetime` | YES |  |  |  | 源单时间 |
| 49 | `sInvoiceNo` | `varchar(255)` | NO |  |  |  | 发票号码 |
| 50 | `dTotalForeignMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 外币金额 |
| 51 | `dMaterialsForeignPrice` | `decimal(18,2)` | NO |  | 0.00 |  | 外币单价 |
| 52 | `dRoundingForeignMoney` | `decimal(18,2)` | NO |  | 0.00 |  | 舍入金额外币 |
| 53 | `dBalanceForeignMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 余额外币 |
| 54 | `dMaterialsPrice` | `decimal(18,6)` | YES |  | 0.000000 |  | 余额 |
| 55 | `dMaterialsNoTaxPrice` | `decimal(18,6)` | YES |  | 0.000000 |  | 余额 |
| 56 | `dMaterialsNoTaxMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 余额 |
| 57 | `dMaterialsTaxMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 余额 |
| 58 | `dMaterialsTaxForeignMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 余额 |
| 59 | `sAccountNo` | `varchar(100)` | NO |  |  |  | 科目代码 |
| 60 | `sMaterialsName` | `varchar(100)` | NO |  |  |  | 费用名称 |
| 61 | `sSqlConditionId` | `varchar(255)` | YES |  |  |  | 收款单汇总表id |
| 62 | `sSrcType` | `varchar(255)` | YES |  |  |  |  |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_CahPaymentSlave` |  | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId`, `sParentId` |
| `IndexU_CahPaymentSlave` | ✓ | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `PRIMARY` | ✓ | BTREE | `iIncrement` |

## Narrative

_No human-written narrative yet — when this table is exercised by a [vertical slice](../../slices/index.md), link from there back to this page._
