# `viw_pitproductinstore` (view)


- **Updatable:** YES

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sBrandsId` | `varchar(100)` | NO |
| 3 | `sSubsidiaryId` | `varchar(100)` | NO |
| 4 | `tCreateDate` | `datetime` | NO |
| 5 | `sMakePerson` | `varchar(255)` | NO |
| 6 | `sFormId` | `varchar(100)` | NO |
| 7 | `iOrder` | `int` | NO |
| 8 | `sBillNo` | `varchar(255)` | NO |
| 9 | `sMemo` | `text` | YES |
| 10 | `bCheck` | `bit(1)` | NO |
| 11 | `tCheckDate` | `datetime` | YES |
| 12 | `sCheckPerson` | `varchar(255)` | YES |
| 13 | `bPrint` | `bit(1)` | NO |
| 14 | `bCopyLimit` | `bit(1)` | NO |
| 15 | `sStatus` | `varchar(255)` | YES |
| 16 | `sEmployeeId` | `varchar(100)` | NO |
| 17 | `bInvalid` | `bit(1)` | NO |
| 18 | `sMReserve1` | `varchar(255)` | YES |
| 19 | `sMReserve2` | `varchar(255)` | YES |
| 20 | `sMReserve3` | `varchar(255)` | YES |
| 21 | `sMReserve4` | `varchar(255)` | YES |
| 22 | `sMReserve5` | `varchar(255)` | YES |
| 23 | `sMReserve6` | `varchar(255)` | YES |
| 24 | `dMReserve1` | `decimal(18,6)` | YES |
| 25 | `dMReserve2` | `decimal(18,6)` | YES |
| 26 | `dMReserve3` | `decimal(18,6)` | YES |
| 27 | `iMReserve1` | `int` | YES |
| 28 | `iMReserve2` | `int` | YES |
| 29 | `iMReserve3` | `int` | YES |
| 30 | `tMReserve1` | `datetime` | YES |
| 31 | `tMReserve2` | `datetime` | YES |
| 32 | `sMinusSrcId` | `varchar(255)` | NO |
| 33 | `sSlaveId` | `varchar(100)` | NO |
| 34 | `iSlaveOrder` | `int` | NO |
| 35 | `sCustomerId` | `varchar(100)` | NO |
| 36 | `sContacts` | `varchar(255)` | YES |
| 37 | `sPhone` | `varchar(255)` | YES |
| 38 | `tDeliverDate` | `datetime` | YES |
| 39 | `sSalesManId` | `varchar(255)` | YES |
| 40 | `sGetPayId` | `varchar(255)` | YES |
| 41 | `tGetPayDate` | `datetime` | YES |
| 42 | `sConsignee` | `varchar(255)` | YES |
| 43 | `sConsigneeMobile` | `varchar(255)` | YES |
| 44 | `sDeliverId` | `varchar(100)` | YES |
| 45 | `sProvince` | `varchar(255)` | YES |
| 46 | `sCity` | `varchar(255)` | YES |
| 47 | `sArea` | `varchar(255)` | YES |
| 48 | `sDeliverTo` | `varchar(255)` | YES |
| 49 | `sManualNo` | `varchar(255)` | YES |
| 50 | `sCustomerOrderNo` | `varchar(255)` | YES |
| 51 | `sCurrency` | `varchar(255)` | YES |
| 52 | `dCurrencyRate` | `decimal(18,6)` | YES |
| 53 | `sProductId` | `varchar(100)` | NO |
| 54 | `dProductQty` | `decimal(18,6)` | NO |
| 55 | `dProductPrice` | `decimal(18,6)` | NO |
| 56 | `dProductMoney` | `decimal(18,6)` | NO |
| 57 | `sMaterialsMemo` | `text` | YES |
| 58 | `sProcessMemo` | `text` | YES |
| 59 | `sSrcSlaveId` | `varchar(100)` | NO |
| 60 | `sSrcId` | `varchar(100)` | NO |
| 61 | `sSrcNo` | `varchar(255)` | NO |
| 62 | `dSrcQty` | `decimal(18,6)` | YES |
| 63 | `dProductPQty` | `decimal(18,6)` | YES |
| 64 | `sSlaveMemo` | `text` | YES |
| 65 | `sTaxId` | `varchar(100)` | YES |
| 66 | `dProductNoTaxPrice` | `decimal(18,6)` | YES |
| 67 | `dProductNoTaxMoney` | `decimal(18,6)` | YES |
| 68 | `dProductTaxMoney` | `decimal(18,6)` | YES |
| 69 | `dProductTaxForeignMoney` | `decimal(18,6)` | YES |
| 70 | `dProductForeignMoney` | `decimal(18,6)` | YES |
| 71 | `bDeliverComplete` | `bit(1)` | NO |
| 72 | `dDeliverQty` | `decimal(18,6)` | NO |
| 73 | `bDeliverNotifyComplete` | `bit(1)` | NO |
| 74 | `dDeliverNotifyQty` | `decimal(18,6)` | NO |
| 75 | `dRejectQty` | `decimal(18,6)` | NO |
| 76 | `dReceiptMoney` | `decimal(18,6)` | NO |
| 77 | `sWebOrderNo` | `varchar(255)` | NO |
| 78 | `sWebOrderId` | `varchar(100)` | NO |
| 79 | `sBarcode` | `varchar(255)` | YES |
| 80 | `dGiveQty` | `decimal(18,6)` | NO |
| 81 | `sOrderId` | `varchar(100)` | NO |
| 82 | `sOrderNo` | `varchar(255)` | NO |
| 83 | `sWorkOrderId` | `varchar(100)` | NO |
| 84 | `sWorkOrderSlaveId` | `varchar(100)` | NO |
| 85 | `sWorkOrderNo` | `varchar(255)` | NO |
| 86 | `sDefineNo` | `varchar(100)` | NO |
| 87 | `sDefineNo2` | `varchar(100)` | NO |
| 88 | `sWareHouseId` | `varchar(100)` | NO |
| 89 | `sLocationId` | `varchar(100)` | NO |
| 90 | `sWareHouseLocationId` | `varchar(100)` | NO |
| 91 | `dPackQty` | `decimal(18,6)` | YES |
| 92 | `dTrunkQty` | `decimal(18,6)` | YES |
| 93 | `dFractionQty` | `decimal(18,6)` | YES |
| 94 | `dProductWeight` | `decimal(18,6)` | YES |
| 95 | `sPackingMemo` | `text` | YES |
| 96 | `sSReserve1` | `varchar(255)` | YES |
| 97 | `sSReserve2` | `varchar(255)` | YES |
| 98 | `sSReserve3` | `varchar(255)` | YES |
| 99 | `sSReserve4` | `varchar(255)` | YES |
| 100 | `sSReserve5` | `varchar(255)` | YES |
| 101 | `sSReserve6` | `varchar(255)` | YES |
| 102 | `dSReserve1` | `decimal(18,6)` | YES |
| 103 | `dSReserve2` | `decimal(18,6)` | YES |
| 104 | `dSReserve3` | `decimal(18,6)` | YES |
| 105 | `iSReserve1` | `int` | YES |
| 106 | `iSReserve2` | `int` | YES |
| 107 | `iSReserve3` | `int` | YES |
| 108 | `tSReserve1` | `datetime` | YES |
| 109 | `tSReserve2` | `datetime` | YES |
| 110 | `sVoucherBillNo` | `varchar(255)` | NO |
| 111 | `sVoucherBillId` | `varchar(255)` | NO |
| 112 | `dPresentQty` | `decimal(18,6)` | NO |
| 113 | `sOrderSlaveId` | `varchar(100)` | NO |
| 114 | `sPackEmployeeId` | `varchar(100)` | YES |
| 115 | `iIncrement` | `int` | NO |
| 116 | `dCostMoney` | `decimal(18,6)` | YES |
| 117 | `dCostPrice` | `decimal(18,6)` | YES |
| 118 | `bReceiptComplete` | `bit(1)` | NO |
| 119 | `dNProductMoney` | `decimal(18,6)` | NO |
| 120 | `dNProductPrice` | `decimal(18,6)` | NO |
| 121 | `dFreightMoney` | `decimal(18,6)` | NO |
| 122 | `dKnifeMouldMoney` | `decimal(18,6)` | NO |
| 123 | `dPlateMoney` | `decimal(18,6)` | NO |
| 124 | `dProofingMoney` | `decimal(18,6)` | NO |
| 125 | `dProductForeignPrice` | `decimal(18,6)` | NO |
| 126 | `dFreightReturnMoney` | `decimal(18,6)` | NO |
| 127 | `dKnifeMouldReturnMoney` | `decimal(18,6)` | NO |
| 128 | `dPlateReturnMoney` | `decimal(18,6)` | NO |
| 129 | `dProofingReturnMoney` | `decimal(18,6)` | NO |
| 130 | `sVoucherBillminusNo` | `varchar(255)` | NO |
| 131 | `sVoucherBillminusId` | `varchar(255)` | NO |
| 132 | `dReturnTrunkQty` | `decimal(18,6)` | NO |
| 133 | `dProfitMoney` | `decimal(19,6)` | NO |
| 134 | `dProfitRate` | `decimal(18,6)` | YES |
| 135 | `sSlaveInstoreType` | `varchar(255)` | YES |
| 136 | `bChild` | `bit(1)` | YES |

## Definition

```sql
select `pitproductinstoremaster`.`sId` AS `sId`,`pitproductinstoremaster`.`sBrandsId` AS `sBrandsId`,`pitproductinstoremaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`pitproductinstoremaster`.`tCreateDate` AS `tCreateDate`,`pitproductinstoremaster`.`sMakePerson` AS `sMakePerson`,`pitproductinstoremaster`.`sFormId` AS `sFormId`,`pitproductinstoremaster`.`iOrder` AS `iOrder`,`pitproductinstoremaster`.`sBillNo` AS `sBillNo`,`pitproductinstoremaster`.`sMemo` AS `sMemo`,`pitproductinstoremaster`.`bCheck` AS `bCheck`,`pitproductinstoremaster`.`tCheckDate` AS `tCheckDate`,`pitproductinstoremaster`.`sCheckPerson` AS `sCheckPerson`,`pitproductinstoremaster`.`bPrint` AS `bPrint`,`pitproductinstoremaster`.`bCopyLimit` AS `bCopyLimit`,`pitproductinstoremaster`.`sStatus` AS `sStatus`,`pitproductinstoremaster`.`sEmployeeId` AS `sEmployeeId`,`pitproductinstoremaster`.`bInvalid` AS `bInvalid`,`pitproductinstoremaster`.`sMReserve1` AS `sMReserve1`,`pitproductinstoremaster`.`sMReserve2` AS `sMReserve2`,`pitproductinstoremaster`.`sMReserve3` AS `sMReserve3`,`pitproductinstoremaster`.`sMReserve4` AS `sMReserve4`,`pitproductinstoremaster`.`sMReserve5` AS `sMReserve5`,`pitproductinstoremaster`.`sMReserve6` AS `sMReserve6`,`pitproductinstoremaster`.`dMReserve1` AS `dMReserve1`,`pitproductinstoremaster`.`dMReserve2` AS `dMReserve2`,`pitproductinstoremaster`.`dMReserve3` AS `dMReserve3`,`pitproductinstoremaster`.`iMReserve1` AS `iMReserve1`,`pitproductinstoremaster`.`iMReserve2` AS `iMReserve2`,`pitproductinstoremaster`.`iMReserve3` AS `iMReserve3`,`pitproductinstoremaster`.`tMReserve1` AS `tMReserve1`,`pitproductinstoremaster`.`tMReserve2` AS `tMReserve2`,`pitproductinstoremaster`.`sMinusSrcId` AS `sMinusSrcId`,`pitproductinstoreslave`.`sId` AS `sSlaveId`,`pitproductinstoreslave`.`iOrder` AS `iSlaveOrder`,`pitproductinstoreslave`.`sCustomerId` AS `sCustomerId`,`pitproductinstoreslave`.`sContacts` AS `sContacts`,`pitproductinstoreslave`.`sPhone` AS `sPhone`,`pitproductinstoreslave`.`tDeliverDate` AS `tDeliverDate`,`pitproductinstoreslave`.`sSalesManId` AS `sSalesManId`,`pitproductinstoreslave`.`sGetPayId` AS `sGetPayId`,`pitproductinstoreslave`.`tGetPayDate` AS `tGetPayDate`,`pitproductinstoreslave`.`sConsignee` AS `sConsignee`,`pitproductinstoreslave`.`sConsigneeMobile` AS `sConsigneeMobile`,`pitproductinstoreslave`.`sDeliverId` AS `sDeliverId`,`pitproductinstoreslave`.`sProvince` AS `sProvince`,`pitproductinstoreslave`.`sCity` AS `sCity`,`pitproductinstoreslave`.`sArea` AS `sArea`,`pitproductinstoreslave`.`sDeliverTo` AS `sDeliverTo`,`pitproductinstoreslave`.`sManualNo` AS `sManualNo`,`pitproductinstoreslave`.`sCustomerOrderNo` AS `sCustomerOrderNo`,`pitproductinstoreslave`.`sCurrency` AS `sCurrency`,`pitproductinstoreslave`.`dCurrencyRate` AS `dCurrencyRate`,`pitproductinstoreslave`.`sProductId` AS `sProductId`,`pitproductinstoreslave`.`dProductQty` AS `dProductQty`,`pitproductinstoreslave`.`dProductPrice` AS `dProductPrice`,`pitproductinstoreslave`.`dProductMoney` AS `dProductMoney`,`pitproductinstoreslave`.`sMaterialsMemo` AS `sMaterialsMemo`,`pitproductinstoreslave`.`sProcessMemo` AS `sProcessMemo`,`pitproductinstoreslave`.`sSrcSlaveId` AS `sSrcSlaveId`,`pitproductinstoreslave`.`sSrcId` AS `sSrcId`,`pitproductinstoreslave`.`sSrcNo` AS `sSrcNo`,`pitproductinstoreslave`.`dSrcQty` AS `dSrcQty`,`pitproductinstoreslave`.`dProductPQty` AS `dProductPQty`,`pitproductinstoreslave`.`sSlaveMemo` AS `sSlaveMemo`,`pitproductinstoreslave`.`sTaxId` AS `sTaxId`,`pitproductinstoreslave`.`dProductNoTaxPrice` AS `dProductNoTaxPrice`,`pitproductinstoreslave`.`dProductNoTaxMoney` AS `dProductNoTaxMoney`,`pitproductinstoreslave`.`dProductTaxMoney` AS `dProductTaxMoney`,`pitproductinstoreslave`.`dProductTaxForeignMoney` AS `dProductTaxForeignMoney`,`pitproductinstoreslave`.`dProductForeignMoney` AS `dProductForeignMoney`,`pitproductinstoreslave`.`bDeliverComplete` AS `bDeliverComplete`,`pitproductinstoreslave`.`dDeliverQty` AS `dDeliverQty`,`pitproductinstoreslave`.`bDeliverNotifyComplete` AS `bDeliverNotifyComplete`,`pitproductinstoreslave`.`dDeliverNotifyQty` AS `dDeliverNotifyQty`,`pitproductinstoreslave`.`dRejectQty` AS `dRejectQty`,`pitproductinstoreslave`.`dReceiptMoney` AS `dReceiptMoney`,`pitproductinstoreslave`.`sWebOrderNo` AS `sWebOrderNo`,`pitproductinstoreslave`.`sWebOrderId` AS `sWebOrderId`,`pitproductinstoreslave`.`sBarcode` AS `sBarcode`,`pitproductinstoreslave`.`dGiveQty` AS `dGiveQty`,`pitproductinstoreslave`.`sOrderId` AS `sOrderId`,`pitproductinstoreslave`.`sOrderNo` AS `sOrderNo`,`pitproductinstoreslave`.`sWorkOrderId` AS `sWorkOrderId`,`pitproductinstoreslave`.`sWorkOrderSlaveId` AS `sWorkOrderSlaveId`,`pitproductinstoreslave`.`sWorkOrderNo` AS `sWorkOrderNo`,`pitproductinstoreslave`.`sDefineNo` AS `sDefineNo`,`pitproductinstoreslave`.`sDefineNo2` AS `sDefineNo2`,`pitproductinstoreslave`.`sWareHouseId` AS `sWareHouseId`,`pitproductinstoreslave`.`sLocationId` AS `sLocationId`,`pitproductinstoreslave`.`sWareHouseLocationId` AS `sWareHouseLocationId`,`pitproductinstoreslave`.`dPackQty` AS `dPackQty`,`pitproductinstoreslave`.`dTrunkQty` AS `dTrunkQty`,`pitproductinstoreslave`.`dFractionQty` AS `dFractionQty`,`pitproductinstoreslave`.`dProductWeight` AS `dProductWeight`,`pitproductinstoreslave`.`sPackingMemo` AS `sPackingMemo`,`pitproductinstoreslave`.`sSReserve1` AS `sSReserve1`,`pitproductinstoreslave`.`sSReserve2` AS `sSReserve2`,`pitproductinstoreslave`.`sSReserve3` AS `sSReserve3`,`pitproductinstoreslave`.`sSReserve4` AS `sSReserve4`,`pitproductinstoreslave`.`sSReserve5` AS `sSReserve5`,`pitproductinstoreslave`.`sSReserve6` AS `sSReserve6`,`pitproductinstoreslave`.`dSReserve1` AS `dSReserve1`,`pitproductinstoreslave`.`dSReserve2` AS `dSReserve2`,`pitproductinstoreslave`.`dSReserve3` AS `dSReserve3`,`pitproductinstoreslave`.`iSReserve1` AS `iSReserve1`,`pitproductinstoreslave`.`iSReserve2` AS `iSReserve2`,`pitproductinstoreslave`.`iSReserve3` AS `iSReserve3`,`pitproductinstoreslave`.`tSReserve1` AS `tSReserve1`,`pitproductinstoreslave`.`tSReserve2` AS `tSReserve2`,`pitproductinstoreslave`.`sVoucherBillNo` AS `sVoucherBillNo`,`pitproductinstoreslave`.`sVoucherBillId` AS `sVoucherBillId`,`pitproductinstoreslave`.`dPresentQty` AS `dPresentQty`,`pitproductinstoreslave`.`sOrderSlaveId` AS `sOrderSlaveId`,`pitproductinstoreslave`.`sPackEmployeeId` AS `sPackEmployeeId`,`pitproductinstoreslave`.`iIncrement` AS `iIncrement`,`pitproductinstoreslave`.`dCostMoney` AS `dCostMoney`,`pitproductinstoreslave`.`dCostPrice` AS `dCostPrice`,`pitproductinstoreslave`.`bReceiptComplete` AS `bReceiptComplete`,`pitproductinstoreslave`.`dNProductMoney` AS `dNProductMoney`,`pitproductinstoreslave`.`dNProductPrice` AS `dNProductPrice`,`pitproductinstoreslave`.`dFreightMoney` AS `dFreightMoney`,`pitproductinstoreslave`.`dKnifeMouldMoney` AS `dKnifeMouldMoney`,`pitproductinstoreslave`.`dPlateMoney` AS `dPlateMoney`,`pitproductinstoreslave`.`dProofingMoney` AS `dProofingMoney`,`pitproductinstoreslave`.`dProductForeignPrice` AS `dProductForeignPrice`,`pitproductinstoreslave`.`dFreightReturnMoney` AS `dFreightReturnMoney`,`pitproductinstoreslave`.`dKnifeMouldReturnMoney` AS `dKnifeMouldReturnMoney`,`pitproductinstoreslave`.`dPlateReturnMoney` AS `dPlateReturnMoney`,`pitproductinstoreslave`.`dProofingReturnMoney` AS `dProofingReturnMoney`,`pitproductinstoreslave`.`sVoucherBillminusNo` AS `sVoucherBillminusNo`,`pitproductinstoreslave`.`sVoucherBillminusId` AS `sVoucherBillminusId`,`pitproductinstoreslave`.`dReturnTrunkQty` AS `dReturnTrunkQty`,(ifnull(`pitproductinstoreslave`.`dProductNoTaxMoney`,0) - ifnull(`pitproductinstoreslave`.`dCostMoney`,0)) AS `dProfitMoney`,cast(((ifnull(`pitproductinstoreslave`.`dProductNoTaxMoney`,0) - ifnull(`pitproductinstoreslave`.`dCostMoney`,0)) / ifnull(`pitproductinstoreslave`.`dProductNoTaxMoney`,0)) as decimal(18,6)) AS `dProfitRate`,`pitproductinstoreslave`.`sSlaveInstoreType` AS `sSlaveInstoreType`,`pitproductinstoreslave`.`bChild` AS `bChild` from (`pitproductinstoremaster` join `pitproductinstoreslave` on((`pitproductinstoreslave`.`sParentId` = `pitproductinstoremaster`.`sId`)))
```

## Narrative

_No human-written narrative yet._
