# `viw_ai_elematerialsstock_inoutdetail` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sSlaveId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `sMakePerson` | `varchar(255)` | NO |
| 6 | `tCreateDate` | `datetime` | NO |
| 7 | `tUpdateDate` | `datetime` | NO |
| 8 | `dAuxiliaryQty` | `decimal(18,6)` | NO |
| 9 | `dMaterialsQty` | `decimal(18,6)` | NO |
| 10 | `sMaterialsStyle` | `varchar(255)` | YES |
| 11 | `sDefineNo` | `varchar(100)` | NO |
| 12 | `sDefineNo2` | `varchar(100)` | NO |
| 13 | `sFormId` | `varchar(100)` | NO |
| 14 | `sBillNo` | `varchar(255)` | NO |
| 15 | `sBillType` | `varchar(6)` | NO |
| 16 | `sMaterialsNo` | `varchar(50)` | YES |
| 17 | `sMaterialsName` | `varchar(100)` | YES |
| 18 | `sMaterialsSortName` | `varchar(100)` | YES |
| 19 | `sMaterialsShort` | `varchar(50)` | YES |
| 20 | `sMaterialsUnit` | `varchar(50)` | YES |
| 21 | `sAuxiliaryUnit` | `varchar(6)` | YES |
| 22 | `dCoefficient` | `decimal(18,6)` | YES |
| 23 | `sConversionUnit` | `varchar(50)` | YES |
| 24 | `dGramWeight` | `decimal(18,6)` | YES |
| 25 | `bPurchase` | `bit(1)` | YES |
| 26 | `bReel` | `bit(1)` | YES |
| 27 | `bSales` | `bit(1)` | YES |
| 28 | `bCorrugate` | `bit(1)` | YES |
| 29 | `dPurchasePrice` | `decimal(18,6)` | YES |
| 30 | `dSalesPrice` | `decimal(18,6)` | YES |
| 31 | `dRecentPurchasePrice` | `decimal(18,6)` | YES |
| 32 | `dDesignateSalesPrice` | `decimal(18,6)` | YES |
| 33 | `dProcurementCycle` | `decimal(18,6)` | YES |
| 34 | `sSupplyId` | `varchar(50)` | YES |
| 35 | `bCheck` | `bit(1)` | YES |
| 36 | `bInvalid` | `bit(1)` | YES |
| 37 | `sMemo` | `text` | YES |
| 38 | `bComMaterials` | `bit(1)` | YES |
| 39 | `sLocationsName` | `varchar(255)` | YES |
| 40 | `sWarehouseName` | `varchar(255)` | YES |
| 41 | `sMtart` | `varchar(4)` | YES |

## Definition

```sql
select `mitmaterialsstore`.`sId` AS `sId`,`mitmaterialsstore`.`sId` AS `sSlaveId`,`mitmaterialsstore`.`sBrandsId` AS `sBrandsId`,`mitmaterialsstore`.`sSubsidiaryId` AS `sSubsidiaryId`,`mitmaterialsstore`.`sMakePerson` AS `sMakePerson`,`mitmaterialsstore`.`tCreateDate` AS `tCreateDate`,`mitmaterialsstore`.`tCreateDate` AS `tUpdateDate`,`mitmaterialsstore`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`mitmaterialsstore`.`dMaterialsQty` AS `dMaterialsQty`,`mitmaterialsstore`.`sMaterialsStyle` AS `sMaterialsStyle`,`mitmaterialsstore`.`sDefineNo` AS `sDefineNo`,`mitmaterialsstore`.`sDefineNo2` AS `sDefineNo2`,`mitmaterialsstore`.`sFormId` AS `sFormId`,`mitmaterialsstore`.`sBillNo` AS `sBillNo`,(case when (`mitmaterialsstore`.`sFormId` = '192116810113315228246447250') then '成品入库' when (`mitmaterialsstore`.`sFormId` = '192116810113315235917608210') then '外协入库' when (`mitmaterialsstore`.`sFormId` = '11811781131121915179924491520') then '送货单' when (`mitmaterialsstore`.`sFormId` = '11811781131121915179924871530') then '销售退货' when (`mitmaterialsstore`.`sFormId` = '12710101117015197927220') then '成品其它入库' else '未知业务' end) AS `sBillType`,`elematerials`.`sMaterialsNo` AS `sMaterialsNo`,`elematerials`.`sMaterialsName` AS `sMaterialsName`,`sismaterialsclassify`.`sName` AS `sMaterialsSortName`,`elematerials`.`sMaterialsShort` AS `sMaterialsShort`,`elematerials`.`sMaterialsUnit` AS `sMaterialsUnit`,`elematerials`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`elematerials`.`dCoefficient` AS `dCoefficient`,`elematerials`.`sConversionUnit` AS `sConversionUnit`,`elematerials`.`dGramWeight` AS `dGramWeight`,`elematerials`.`bPurchase` AS `bPurchase`,`elematerials`.`bReel` AS `bReel`,`elematerials`.`bSales` AS `bSales`,`elematerials`.`bCorrugate` AS `bCorrugate`,`elematerials`.`dPurchasePrice` AS `dPurchasePrice`,`elematerials`.`dSalesPrice` AS `dSalesPrice`,`elematerials`.`dRecentPurchasePrice` AS `dRecentPurchasePrice`,`elematerials`.`dDesignateSalesPrice` AS `dDesignateSalesPrice`,`elematerials`.`dProcurementCycle` AS `dProcurementCycle`,`elematerials`.`sSupplyId` AS `sSupplyId`,`elematerials`.`bCheck` AS `bCheck`,`elematerials`.`bInvalid` AS `bInvalid`,`elematerials`.`sMemo` AS `sMemo`,`elematerials`.`bComMaterials` AS `bComMaterials`,`sislocation`.`sName` AS `sLocationsName`,`siswarehouse`.`sName` AS `sWarehouseName`,`elematerials`.`sMtart` AS `sMtart` from ((((`mitmaterialsstore` left join `elematerials` on((`mitmaterialsstore`.`sMaterialsId` = `elematerials`.`sId`))) left join `sismaterialsclassify` on((`sismaterialsclassify`.`sId` = `elematerials`.`sParentId`))) left join `siswarehouse` on((`siswarehouse`.`sId` = `mitmaterialsstore`.`sWarehouseId`))) left join `sislocation` on((`sislocation`.`sId` = `mitmaterialsstore`.`sLocationId`)))
```

## Narrative

_No human-written narrative yet._
