# `viw_accmaterialsmoney` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | YES |
| 2 | `sSubsidiaryId` | `varchar(100)` | YES |
| 3 | `sBrandsId` | `varchar(100)` | YES |
| 4 | `bConfirm` | `bit(1)` | NO |
| 5 | `sCostPeriod` | `varchar(100)` | YES |
| 6 | `tCreateDate` | `datetime` | NO |
| 7 | `sConfirmMonth` | `varchar(100)` | YES |
| 8 | `dMaterialsQty` | `decimal(40,6)` | YES |
| 9 | `sSupplyId` | `varchar(100)` | YES |
| 10 | `sMaterialsStyle` | `varchar(255)` | YES |
| 11 | `dAuxiliaryQty` | `decimal(40,6)` | YES |
| 12 | `sAuxiliaryUnit` | `varchar(255)` | YES |
| 13 | `sMakePerson` | `varchar(255)` | YES |
| 14 | `sMaterialsId` | `varchar(100)` | YES |
| 15 | `dMaterialsPrice` | `decimal(24,13)` | NO |
| 16 | `dMaterialsMoney` | `decimal(40,2)` | YES |
| 17 | `dMaterialsMoney1` | `decimal(40,2)` | YES |
| 18 | `dMaterialsMoney2` | `decimal(40,2)` | YES |
| 19 | `dMaterialsMoney3` | `decimal(40,2)` | YES |
| 20 | `dAuxiliaryQty1` | `decimal(40,6)` | YES |
| 21 | `dAuxiliaryQty2` | `decimal(40,6)` | YES |
| 22 | `dAuxiliaryQty3` | `decimal(40,6)` | YES |
| 23 | `dAuxiliaryQty4` | `decimal(40,6)` | YES |

## Definition

```sql
select `accmaterialsstore`.`sId` AS `sId`,`accmaterialsstore`.`sSubsidiaryId` AS `sSubsidiaryId`,`accmaterialsstore`.`sBrandsId` AS `sBrandsId`,`accmaterialsstore`.`bConfirm` AS `bConfirm`,`accmaterialsstore`.`sCostPeriod` AS `sCostPeriod`,`accmaterialsstore`.`tCreateDate` AS `tCreateDate`,`accmaterialsstore`.`sConfirmMonth` AS `sConfirmMonth`,sum(`accmaterialsstore`.`dMaterialsQty`) AS `dMaterialsQty`,`accmaterialsstore`.`sSupplyId` AS `sSupplyId`,`accmaterialsstore`.`sMaterialsStyle` AS `sMaterialsStyle`,sum(`accmaterialsstore`.`dAuxiliaryQty`) AS `dAuxiliaryQty`,`accmaterialsstore`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`accmaterialsstore`.`sMakePerson` AS `sMakePerson`,`accmaterialsstore`.`sMaterialsId` AS `sMaterialsId`,`accmaterialsstore`.`dMaterialsPrice` AS `dMaterialsPrice`,sum(`accmaterialsstore`.`dMaterialsMoney`) AS `dMaterialsMoney`,sum((case when (`accmaterialsstore`.`sFormId` = '16655716110009059536847895097000') then ifnull(`accmaterialsstore`.`dMaterialsMoney`,0) else 0 end)) AS `dMaterialsMoney1`,sum((case when (`accmaterialsstore`.`sFormId` = '192116810113315220315711060') then ifnull(`accmaterialsstore`.`dMaterialsMoney`,0) else 0 end)) AS `dMaterialsMoney2`,sum((case when (`accmaterialsstore`.`sFormId` = '192116810113315220489243410') then ifnull(`accmaterialsstore`.`dMaterialsMoney`,0) else 0 end)) AS `dMaterialsMoney3`,sum((case when (`accmaterialsstore`.`sFormId` = '16655716110009059536847895097000') then ifnull(`accmaterialsstore`.`dAuxiliaryQty`,0) else 0 end)) AS `dAuxiliaryQty1`,sum((case when (`accmaterialsstore`.`sFormId` = '192116810113315220315711060') then ifnull(`accmaterialsstore`.`dAuxiliaryQty`,0) else 0 end)) AS `dAuxiliaryQty2`,sum((case when (`accmaterialsstore`.`sFormId` = '192116810113315220489243410') then ifnull(`accmaterialsstore`.`dAuxiliaryQty`,0) else 0 end)) AS `dAuxiliaryQty3`,sum((case when (`accmaterialsstore`.`sFormId` = '192116810113315228128521360') then ifnull(`accmaterialsstore`.`dAuxiliaryQty`,0) else 0 end)) AS `dAuxiliaryQty4` from `accmaterialsstore` where (`accmaterialsstore`.`sFormId` in ('16655716110009059536847895097000','192116810113315220315711060','192116810113315220489243410','192116810113315228128521360')) group by `accmaterialsstore`.`sCostPeriod`,`accmaterialsstore`.`sMaterialsId`,`accmaterialsstore`.`sMaterialsStyle`
```

## Narrative

_No human-written narrative yet._
