# `cahpaymentmaster`

> 付款单主表


- **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 | MUL |  |  | 加工商Id |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |  |  |  | 子公司ID |
| 5 | `tCreateDate` | `datetime` | NO |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 制单日期 |
| 6 | `sMakePerson` | `varchar(255)` | NO |  |  |  | 制单人 |
| 7 | `iOrder` | `int` | NO |  | 0 |  | 排序号 |
| 8 | `sFormId` | `varchar(100)` | NO |  |  |  | 窗体ID |
| 9 | `sBillType` | `varchar(255)` | NO |  |  |  | 单据类型 |
| 10 | `sBillNo` | `varchar(255)` | NO |  |  |  | 单据号 |
| 11 | `sSupplyId` | `varchar(100)` | NO | MUL |  |  | 供应商Id |
| 12 | `sContacts` | `varchar(255)` | YES |  |  |  | 联系人 |
| 13 | `sPhone` | `varchar(255)` | YES |  |  |  | 电话 |
| 14 | `tDeliverDate` | `datetime` | YES |  |  |  | 交货日期 |
| 15 | `sPurchaseId` | `varchar(100)` | NO |  |  |  | 采购单据Id |
| 16 | `sPurchaseManId` | `varchar(100)` | NO |  |  |  | 采购员ID |
| 17 | `dTotalMoney` | `decimal(18,6)` | NO |  |  |  | 金额 |
| 18 | `dRoundingMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 舍入 |
| 19 | `sGetPayId` | `varchar(100)` | YES |  |  |  | 结算方式Id |
| 20 | `tGetPayDate` | `datetime` | YES |  |  |  | 结算日期 |
| 21 | `sConsignee` | `varchar(255)` | YES |  |  |  | 收货人 |
| 22 | `sConsigneeMobile` | `varchar(255)` | YES |  |  |  | 收货人手机 |
| 23 | `sDeliverId` | `varchar(100)` | YES |  |  |  | 送货方式 |
| 24 | `sProvince` | `varchar(255)` | YES |  |  |  | 省 |
| 25 | `sCity` | `varchar(255)` | YES |  |  |  | 市 |
| 26 | `sArea` | `varchar(255)` | YES |  |  |  | 区 |
| 27 | `sDeliverTo` | `varchar(255)` | YES |  |  |  | 详细地址 |
| 28 | `sManualNo` | `varchar(255)` | YES |  |  |  | 手工单号 |
| 29 | `sMemo` | `text` | YES |  |  |  | 备注 |
| 30 | `bCheck` | `bit(1)` | NO |  | b'0' |  | 是否审核 |
| 31 | `tCheckDate` | `datetime` | YES |  |  |  | 审核日期 |
| 32 | `sCheckPerson` | `varchar(255)` | YES |  |  |  | 审核人 |
| 33 | `bPrint` | `bit(1)` | NO |  | b'0' |  | 是否打印 |
| 34 | `bCopyLimit` | `bit(1)` | NO |  | b'0' |  | 禁止拷贝 |
| 35 | `dAdvanceMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 订金金额 |
| 36 | `dRealAdvanceMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 订金反写金额 |
| 37 | `sCurrency` | `varchar(255)` | YES |  |  |  | 币别 |
| 38 | `dCurrencyRate` | `decimal(18,6)` | YES |  |  |  | 汇率 |
| 39 | `sStatus` | `varchar(255)` | YES |  |  |  | 状态（未审核 已审核 作废 一到四级审核） |
| 40 | `bInvalid` | `bit(1)` | NO |  | b'0' |  | 是否作废 |
| 41 | `bAdvance` | `bit(1)` | NO |  | b'0' |  | 是否预付 |
| 42 | `sSettlementMode` | `varchar(255)` | NO |  |  |  | 付款内容 |
| 43 | `dReceiptMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 收款反写金额 |
| 44 | `sExpenseId` | `varchar(100)` | NO |  |  |  | 费用类型ID |
| 45 | `sSettlementId` | `varchar(100)` | NO |  |  |  | 付款条件 |
| 46 | `sBankId` | `varchar(100)` | NO |  |  |  | 付款银行 |
| 47 | `sBankAccount` | `varchar(100)` | NO |  |  |  | 银行账号 |
| 48 | `tDueDate` | `datetime` | YES |  |  |  | 票据到期日期 |
| 49 | `sMReserve1` | `varchar(255)` | YES |  |  |  | 预留字符1 |
| 50 | `sMReserve2` | `varchar(255)` | YES |  |  |  | 预留字符2 |
| 51 | `sMReserve3` | `varchar(255)` | YES |  |  |  | 预留字符3 |
| 52 | `sMReserve4` | `varchar(255)` | YES |  |  |  | 预留字符4 |
| 53 | `sMReserve5` | `varchar(255)` | YES |  |  |  | 预留字符5 |
| 54 | `sMReserve6` | `varchar(255)` | YES |  |  |  | 预留字符6 |
| 55 | `dMReserve1` | `decimal(18,6)` | YES |  |  |  | 预留数字1 |
| 56 | `dMReserve2` | `decimal(18,6)` | YES |  |  |  | 预留数字2 |
| 57 | `dMReserve3` | `decimal(18,6)` | YES |  |  |  | 预留数字3 |
| 58 | `iMReserve1` | `int` | YES |  |  |  | 预留整型1 |
| 59 | `iMReserve2` | `int` | YES |  |  |  | 预留整型2 |
| 60 | `iMReserve3` | `int` | YES |  |  |  | 预留整型3 |
| 61 | `tMReserve1` | `datetime` | YES |  |  |  | 预留日期1 |
| 62 | `tMReserve2` | `datetime` | YES |  |  |  | 预留日期2 |
| 63 | `sInvoiceNo` | `varchar(255)` | YES |  |  |  | 发票号码 |
| 64 | `sCostCenterId` | `varchar(100)` | NO |  |  |  | 成本中心Id |
| 65 | `bReceiptComplete` | `bit(1)` | NO |  | b'0' |  | 收款强制完工 |
| 66 | `bAdvanceComplete` | `bit(1)` | NO |  | b'0' |  | 付款强制完工 |
| 67 | `sUnTaskFormId` | `varchar(100)` | NO |  |  |  | 未清界面Id |
| 68 | `tSrcDate` | `datetime` | YES |  |  |  | 源单时间 |
| 69 | `iReply` | `int` | NO |  | 1 |  | 0:无回复 1:同意全款 2:不同意 3:支付部份款项 |
| 70 | `sReplyMemo` | `varchar(255)` | NO |  |  |  | 答复原因 |
| 71 | `iVouchermark` | `int` | YES |  |  |  | 凭证返回标记 |
| 72 | `dProductForeignMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 外币金额 |
| 73 | `dMaterialsMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 金额 |
| 74 | `dMaterialsForeignMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 外币金额 |
| 75 | `dRoundingForeignMoney` | `decimal(18,2)` | NO |  | 0.00 |  | 舍入外币 |
| 76 | `dReceiptRoundMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 反写舍入 |
| 77 | `dReceiptRoundForeignMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 反写舍入 |
| 78 | `dAdvanceForeignMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 订金金额外 |
| 79 | `dRealAdvanceForeignMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 订金反写金额外 |
| 80 | `tPayDate` | `datetime` | YES |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 付款日期 |
| 81 | `sAcc` | `varchar(255)` | YES |  |  |  |  |
| 82 | `sMinusSrcId` | `varchar(255)` | YES |  |  |  | 源单id |
| 83 | `sMinusSrcNo` | `varchar(255)` | YES |  |  |  | 源单id |
| 84 | `sVoucherBillId` | `varchar(255)` | NO |  |  |  | 凭证号 |
| 85 | `sVoucherBillminusId` | `varchar(255)` | NO |  |  |  | 红字凭证号 |
| 86 | `sVoucherBillminusNo` | `varchar(255)` | NO |  | 未生成凭证 |  | 红字凭证ID |
| 87 | `sVoucherBillNo` | `varchar(255)` | NO |  | 未生成凭证 |  | 凭证ID |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_CahPaymentMaster` |  | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId`, `sSupplyId` |
| `IndexN_CahPaymentMastersSupplyId` |  | BTREE | `sSupplyId` |
| `IndexU_CahPaymentMaster` | ✓ | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexU_CahPaymentMasterNo` | ✓ | BTREE | `sBrandsId`, `sSubsidiaryId`, `sBillNo`, `sFormId` |
| `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._
