# `viw_elematerialsstock` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(50)` | NO |
| 2 | `sMaterialsId` | `varchar(50)` | NO |
| 3 | `sBrandsId` | `varchar(50)` | NO |
| 4 | `sSubsidiaryId` | `varchar(50)` | NO |
| 5 | `tCreateDate` | `datetime` | NO |
| 6 | `sMakePerson` | `varchar(50)` | NO |
| 7 | `iOrder` | `int` | NO |
| 8 | `sParentId` | `varchar(50)` | YES |
| 9 | `sMaterialsType` | `varchar(50)` | YES |
| 10 | `sMaterialsNo` | `varchar(50)` | NO |
| 11 | `sMaterialsName` | `varchar(100)` | NO |
| 12 | `sMaterialsShort` | `varchar(50)` | YES |
| 13 | `sMaterialsUnit` | `varchar(50)` | YES |
| 14 | `sAuxiliaryUnit` | `varchar(6)` | NO |
| 15 | `dCoefficient` | `decimal(18,6)` | YES |
| 16 | `sConversionUnit` | `varchar(50)` | YES |
| 17 | `sComputeId` | `varchar(50)` | YES |
| 18 | `bInverse` | `bit(1)` | NO |
| 19 | `sReComputeId` | `varchar(50)` | YES |
| 20 | `sAutoComputeId` | `varchar(50)` | YES |
| 21 | `sConversionComputeId` | `varchar(50)` | YES |
| 22 | `sReConversionComputeId` | `varchar(50)` | YES |
| 23 | `dGramWeight` | `decimal(18,6)` | YES |
| 24 | `bPurchase` | `bit(1)` | NO |
| 25 | `bReel` | `bit(1)` | NO |
| 26 | `bSales` | `bit(1)` | NO |
| 27 | `bCorrugate` | `bit(1)` | NO |
| 28 | `dPurchasePrice` | `decimal(18,6)` | YES |
| 29 | `dSalesPrice` | `decimal(18,6)` | YES |
| 30 | `dRecentPurchasePrice` | `decimal(18,6)` | YES |
| 31 | `dDesignateSalesPrice` | `decimal(18,6)` | YES |
| 32 | `dProcurementCycle` | `decimal(18,6)` | YES |
| 33 | `sSupplyId` | `varchar(50)` | YES |
| 34 | `bCheck` | `bit(1)` | NO |
| 35 | `bInvalid` | `bit(1)` | NO |
| 36 | `sMemo` | `text` | YES |
| 37 | `bComMaterials` | `bit(1)` | NO |
| 38 | `sMReserve1` | `varchar(50)` | YES |
| 39 | `sMReserve2` | `varchar(50)` | YES |
| 40 | `sMReserve3` | `varchar(50)` | YES |
| 41 | `sMReserve4` | `varchar(50)` | YES |
| 42 | `sMReserve5` | `varchar(50)` | YES |
| 43 | `sMReserve6` | `varchar(50)` | YES |
| 44 | `dMReserve1` | `decimal(18,6)` | YES |
| 45 | `dMReserve2` | `decimal(18,6)` | YES |
| 46 | `dMReserve3` | `decimal(18,6)` | YES |
| 47 | `iMReserve1` | `int` | YES |
| 48 | `iMReserve2` | `int` | YES |
| 49 | `iMReserve3` | `int` | YES |
| 50 | `tMReserve1` | `datetime` | YES |
| 51 | `tMReserve2` | `datetime` | YES |
| 52 | `sSlaveId` | `varchar(50)` | YES |
| 53 | `sMaterialsStyle` | `varchar(50)` | YES |
| 54 | `sDefineNo` | `varchar(50)` | YES |
| 55 | `sDefineNo2` | `varchar(50)` | YES |
| 56 | `sWarehouseId` | `varchar(50)` | YES |
| 57 | `sLocationId` | `varchar(50)` | YES |
| 58 | `sWarehouseLocationId` | `varchar(50)` | YES |
| 59 | `dAuxiliaryQty` | `decimal(18,6)` | YES |
| 60 | `dMaterialsQty` | `decimal(18,6)` | YES |
| 61 | `dConversionQty` | `decimal(18,6)` | YES |
| 62 | `dMaterialsPrice` | `decimal(18,6)` | YES |
| 63 | `dMaterialsMoney` | `decimal(18,2)` | YES |
| 64 | `tInventoryDate` | `datetime` | YES |
| 65 | `dMinStock` | `decimal(18,6)` | YES |
| 66 | `dMaxStock` | `decimal(18,6)` | YES |
| 67 | `sFormId` | `varchar(50)` | YES |
| 68 | `dMinStockAuxiliaryQty` | `decimal(18,6)` | YES |
| 69 | `dMaxStockAuxiliaryQty` | `decimal(18,6)` | YES |
| 70 | `bQuotation` | `bit(1)` | YES |
| 71 | `bShow` | `decimal(1,0)` | NO |

## Definition

```sql
select `elematerials`.`sId` AS `sId`,`elematerials`.`sId` AS `sMaterialsId`,`elematerials`.`sBrandsId` AS `sBrandsId`,`elematerials`.`sSubsidiaryId` AS `sSubsidiaryId`,`elematerials`.`tCreateDate` AS `tCreateDate`,`elematerials`.`sMakePerson` AS `sMakePerson`,`elematerials`.`iOrder` AS `iOrder`,`elematerials`.`sParentId` AS `sParentId`,`elematerials`.`sMaterialsType` AS `sMaterialsType`,`elematerials`.`sMaterialsNo` AS `sMaterialsNo`,`elematerials`.`sMaterialsName` AS `sMaterialsName`,`elematerials`.`sMaterialsShort` AS `sMaterialsShort`,`elematerials`.`sMaterialsUnit` AS `sMaterialsUnit`,`elematerials`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`elematerials`.`dCoefficient` AS `dCoefficient`,`elematerials`.`sConversionUnit` AS `sConversionUnit`,`elematerials`.`sComputeId` AS `sComputeId`,`elematerials`.`bInverse` AS `bInverse`,`elematerials`.`sReComputeId` AS `sReComputeId`,`elematerials`.`sAutoComputeId` AS `sAutoComputeId`,`elematerials`.`sConversionComputeId` AS `sConversionComputeId`,`elematerials`.`sReConversionComputeId` AS `sReConversionComputeId`,`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`,`elematerials`.`sMReserve1` AS `sMReserve1`,`elematerials`.`sMReserve2` AS `sMReserve2`,`elematerials`.`sMReserve3` AS `sMReserve3`,`elematerials`.`sMReserve4` AS `sMReserve4`,`elematerials`.`sMReserve5` AS `sMReserve5`,`elematerials`.`sMReserve6` AS `sMReserve6`,`elematerials`.`dMReserve1` AS `dMReserve1`,`elematerials`.`dMReserve2` AS `dMReserve2`,`elematerials`.`dMReserve3` AS `dMReserve3`,`elematerials`.`iMReserve1` AS `iMReserve1`,`elematerials`.`iMReserve2` AS `iMReserve2`,`elematerials`.`iMReserve3` AS `iMReserve3`,`elematerials`.`tMReserve1` AS `tMReserve1`,`elematerials`.`tMReserve2` AS `tMReserve2`,if((ifnull(`elematerialsstock`.`sId`,'') = ''),`elematerials`.`sId`,`elematerialsstock`.`sId`) AS `sSlaveId`,`elematerialsstock`.`sMaterialsStyle` AS `sMaterialsStyle`,`elematerialsstock`.`sDefineNo` AS `sDefineNo`,`elematerialsstock`.`sDefineNo2` AS `sDefineNo2`,`elematerialsstock`.`sWarehouseId` AS `sWarehouseId`,`elematerialsstock`.`sLocationId` AS `sLocationId`,`elematerialsstock`.`sWarehouseLocationId` AS `sWarehouseLocationId`,`elematerialsstock`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`elematerialsstock`.`dMaterialsQty` AS `dMaterialsQty`,`elematerialsstock`.`dConversionQty` AS `dConversionQty`,`elematerialsstock`.`dMaterialsPrice` AS `dMaterialsPrice`,`elematerialsstock`.`dMaterialsMoney` AS `dMaterialsMoney`,`elematerialsstock`.`tInventoryDate` AS `tInventoryDate`,`elematerialsstock`.`dMinStock` AS `dMinStock`,`elematerialsstock`.`dMaxStock` AS `dMaxStock`,`elematerialsstock`.`sFormId` AS `sFormId`,`elematerialsstock`.`dMinStockAuxiliaryQty` AS `dMinStockAuxiliaryQty`,`elematerialsstock`.`dMaxStockAuxiliaryQty` AS `dMaxStockAuxiliaryQty`,`elematerialsstock`.`bQuotation` AS `bQuotation`,ifnull(`elematerialsstock`.`bShow`,0) AS `bShow` from (`elematerials` left join `elematerialsstock` on((`elematerialsstock`.`sMaterialsId` = `elematerials`.`sId`)))
```

## Narrative

_No human-written narrative yet._
