# `viw_ai_salsaleschecking` (view)


- **Updatable:** YES

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sSubsidiaryId` | `varchar(100)` | NO |
| 3 | `tCreateDate` | `datetime` | NO |
| 4 | `tUpdateDate` | `datetime` | NO |
| 5 | `sMakePerson` | `varchar(255)` | NO |
| 6 | `iOrder` | `int` | NO |
| 7 | `sFormId` | `varchar(100)` | NO |
| 8 | `sBillNo` | `varchar(255)` | NO |
| 9 | `sCustomerId` | `varchar(100)` | NO |
| 10 | `sContacts` | `varchar(255)` | YES |
| 11 | `sPhone` | `varchar(255)` | YES |
| 12 | `sSalesManId` | `varchar(100)` | YES |
| 13 | `sGetPayId` | `varchar(100)` | YES |
| 14 | `tGetPayDate` | `datetime` | YES |
| 15 | `sConsignee` | `varchar(255)` | YES |
| 16 | `sConsigneeMobile` | `varchar(255)` | YES |
| 17 | `sDeliverId` | `varchar(100)` | NO |
| 18 | `sProvince` | `varchar(255)` | YES |
| 19 | `sCity` | `varchar(255)` | YES |
| 20 | `sArea` | `varchar(255)` | YES |
| 21 | `sDeliverTo` | `varchar(255)` | YES |
| 22 | `sManualNo` | `varchar(255)` | YES |
| 23 | `sMemo` | `text` | YES |
| 24 | `bCheck` | `bit(1)` | NO |
| 25 | `tCheckDate` | `datetime` | YES |
| 26 | `sCheckPerson` | `varchar(255)` | YES |
| 27 | `bPrint` | `bit(1)` | NO |
| 28 | `bCopyLimit` | `bit(1)` | NO |
| 29 | `dAdvanceMoney` | `decimal(18,6)` | YES |
| 30 | `tAdvanceDate` | `datetime` | YES |
| 31 | `dRealAdvanceMoney` | `decimal(18,6)` | YES |
| 32 | `sCurrency` | `varchar(255)` | YES |
| 33 | `dCurrencyRate` | `decimal(18,6)` | YES |
| 34 | `sStatus` | `varchar(255)` | YES |
| 35 | `sInvoiceNo` | `varchar(255)` | YES |
| 36 | `bInvalid` | `bit(1)` | NO |
| 37 | `sMReserve1` | `varchar(255)` | YES |
| 38 | `sMReserve2` | `varchar(255)` | YES |
| 39 | `sMReserve3` | `varchar(255)` | YES |
| 40 | `sMReserve4` | `varchar(255)` | YES |
| 41 | `sMReserve5` | `varchar(255)` | YES |
| 42 | `sMReserve6` | `varchar(255)` | YES |
| 43 | `dMReserve1` | `decimal(18,6)` | YES |
| 44 | `dMReserve2` | `decimal(18,6)` | YES |
| 45 | `dMReserve3` | `decimal(18,6)` | YES |
| 46 | `iMReserve1` | `int` | YES |
| 47 | `iMReserve2` | `int` | YES |
| 48 | `iMReserve3` | `int` | YES |
| 49 | `tMReserve1` | `datetime` | YES |
| 50 | `tMReserve2` | `datetime` | YES |
| 51 | `iVouchermark` | `int` | YES |
| 52 | `sAccountNo` | `varchar(100)` | NO |
| 53 | `sAccountId` | `varchar(255)` | NO |
| 54 | `tInvoiceDate` | `datetime` | YES |
| 55 | `sSlaveId` | `varchar(100)` | NO |
| 56 | `iSlaveOrder` | `int` | NO |
| 57 | `sProductId` | `varchar(100)` | NO |
| 58 | `dProductQty` | `decimal(18,6)` | NO |
| 59 | `dProductPrice` | `decimal(18,6)` | NO |
| 60 | `dProductMoney` | `decimal(18,6)` | NO |
| 61 | `sSrcSlaveId` | `varchar(100)` | NO |
| 62 | `sSrcId` | `varchar(100)` | NO |
| 63 | `sSrcNo` | `varchar(255)` | NO |
| 64 | `dSrcQty` | `decimal(18,6)` | YES |
| 65 | `dSrcMoney` | `decimal(18,6)` | YES |
| 66 | `bInvoiceComplete` | `bit(1)` | NO |
| 67 | `sSlaveMemo` | `text` | YES |
| 68 | `sTaxId` | `varchar(100)` | YES |
| 69 | `dProductNoTaxPrice` | `decimal(18,6)` | YES |
| 70 | `dProductNoTaxMoney` | `decimal(18,6)` | YES |
| 71 | `dProductTaxMoney` | `decimal(18,6)` | YES |
| 72 | `dProductTaxForeignMoney` | `decimal(18,6)` | YES |
| 73 | `dProductForeignMoney` | `decimal(18,6)` | YES |
| 74 | `dInvoiceMoney` | `decimal(18,6)` | NO |
| 75 | `dReceiptMoney` | `decimal(18,6)` | NO |
| 76 | `sWebOrderNo` | `varchar(255)` | NO |
| 77 | `sWebOrderId` | `varchar(100)` | NO |
| 78 | `sOrderId` | `varchar(100)` | NO |
| 79 | `sOrderNo` | `varchar(255)` | NO |
| 80 | `sWorkOrderId` | `varchar(100)` | NO |
| 81 | `sWorkOrderNo` | `varchar(255)` | NO |
| 82 | `dLossQty` | `decimal(18,6)` | NO |
| 83 | `dLossMoney` | `decimal(18,6)` | YES |
| 84 | `sLossType` | `varchar(255)` | YES |
| 85 | `sBarcode` | `varchar(255)` | YES |
| 86 | `sCustomerOrderNo` | `varchar(255)` | YES |
| 87 | `sSReserve1` | `varchar(255)` | YES |
| 88 | `sSReserve2` | `varchar(255)` | YES |
| 89 | `sSReserve3` | `varchar(255)` | YES |
| 90 | `sSReserve4` | `varchar(255)` | YES |
| 91 | `sSReserve5` | `varchar(255)` | YES |
| 92 | `sSReserve6` | `varchar(255)` | YES |
| 93 | `dSReserve1` | `decimal(18,6)` | YES |
| 94 | `dSReserve2` | `decimal(18,6)` | YES |
| 95 | `dSReserve3` | `decimal(18,6)` | YES |
| 96 | `iSReserve1` | `int` | YES |
| 97 | `iSReserve2` | `int` | YES |
| 98 | `iSReserve3` | `int` | YES |
| 99 | `tSReserve1` | `datetime` | YES |
| 100 | `tSReserve2` | `datetime` | YES |
| 101 | `sBrandsId` | `varchar(100)` | NO |
| 102 | `sWorkOrderSlaveId` | `varchar(100)` | NO |
| 103 | `sOrderSlaveId` | `varchar(100)` | NO |
| 104 | `iIncrement` | `int` | NO |
| 105 | `sSrcFormId` | `varchar(100)` | NO |
| 106 | `sDeliverGoodsNo` | `varchar(255)` | NO |
| 107 | `sDeliverGoodsSlaveId` | `varchar(100)` | NO |
| 108 | `sDeliverGoodsId` | `varchar(100)` | NO |
| 109 | `sDeliverNotifyNo` | `varchar(255)` | NO |
| 110 | `sDeliverNotifySlaveId` | `varchar(100)` | NO |
| 111 | `sDeliverNotifyId` | `varchar(100)` | NO |
| 112 | `sProductInStoreNo` | `varchar(255)` | NO |
| 113 | `sProductInStoreSlaveId` | `varchar(100)` | NO |
| 114 | `sProductInStoreId` | `varchar(100)` | NO |
| 115 | `bSalesInvoiceComplete` | `bit(1)` | NO |
| 116 | `bReceiptComplete` | `bit(1)` | NO |
| 117 | `dCostPrice` | `decimal(18,6)` | NO |
| 118 | `dCostMoney` | `decimal(18,6)` | NO |
| 119 | `dProofingMoney` | `decimal(18,6)` | NO |
| 120 | `dPlateMoney` | `decimal(18,6)` | NO |
| 121 | `dKnifeMouldMoney` | `decimal(18,6)` | NO |
| 122 | `dFreightMoney` | `decimal(18,6)` | NO |
| 123 | `dNProductPrice` | `decimal(18,6)` | NO |
| 124 | `dNProductMoney` | `decimal(18,6)` | NO |
| 125 | `sMaterialsStyle` | `varchar(100)` | NO |
| 126 | `dProductForeignPrice` | `decimal(18,6)` | NO |
| 127 | `sVoucherBillId` | `varchar(255)` | NO |
| 128 | `sVoucherBillNo` | `varchar(255)` | NO |
| 129 | `sVoucherBillminusId` | `varchar(255)` | NO |
| 130 | `sSrcType` | `varchar(255)` | YES |
| 131 | `sVoucherBillminusNo` | `varchar(255)` | NO |
| 132 | `dProfitMoney` | `decimal(19,6)` | NO |
| 133 | `dGiveQty` | `decimal(18,6)` | YES |
| 134 | `dRealityPrice` | `decimal(24,13)` | NO |
| 135 | `dRealityMoney` | `decimal(26,2)` | NO |
| 136 | `dSingleReceiptQty` | `decimal(18,2)` | YES |
| 137 | `dRemainderQty` | `decimal(18,2)` | NO |
| 138 | `dInvoiceQty` | `decimal(18,6)` | NO |
| 139 | `iZeroCheck` | `int` | YES |
| 140 | `sProductName` | `varchar(100)` | NO |
| 141 | `sCustomerName` | `varchar(255)` | NO |

## Definition

```sql
select `salsalescheckingmaster`.`sId` AS `sId`,`salsalescheckingmaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`salsalescheckingmaster`.`tCreateDate` AS `tCreateDate`,`salsalescheckingmaster`.`tCreateDate` AS `tUpdateDate`,`salsalescheckingmaster`.`sMakePerson` AS `sMakePerson`,`salsalescheckingmaster`.`iOrder` AS `iOrder`,`salsalescheckingmaster`.`sFormId` AS `sFormId`,`salsalescheckingmaster`.`sBillNo` AS `sBillNo`,`salsalescheckingmaster`.`sCustomerId` AS `sCustomerId`,`salsalescheckingmaster`.`sContacts` AS `sContacts`,`salsalescheckingmaster`.`sPhone` AS `sPhone`,`salsalescheckingmaster`.`sSalesManId` AS `sSalesManId`,`salsalescheckingmaster`.`sGetPayId` AS `sGetPayId`,`salsalescheckingmaster`.`tGetPayDate` AS `tGetPayDate`,`salsalescheckingmaster`.`sConsignee` AS `sConsignee`,`salsalescheckingmaster`.`sConsigneeMobile` AS `sConsigneeMobile`,`salsalescheckingmaster`.`sDeliverId` AS `sDeliverId`,`salsalescheckingmaster`.`sProvince` AS `sProvince`,`salsalescheckingmaster`.`sCity` AS `sCity`,`salsalescheckingmaster`.`sArea` AS `sArea`,`salsalescheckingmaster`.`sDeliverTo` AS `sDeliverTo`,`salsalescheckingmaster`.`sManualNo` AS `sManualNo`,`salsalescheckingmaster`.`sMemo` AS `sMemo`,`salsalescheckingmaster`.`bCheck` AS `bCheck`,`salsalescheckingmaster`.`tCheckDate` AS `tCheckDate`,`salsalescheckingmaster`.`sCheckPerson` AS `sCheckPerson`,`salsalescheckingmaster`.`bPrint` AS `bPrint`,`salsalescheckingmaster`.`bCopyLimit` AS `bCopyLimit`,`salsalescheckingmaster`.`dAdvanceMoney` AS `dAdvanceMoney`,`salsalescheckingmaster`.`tAdvanceDate` AS `tAdvanceDate`,`salsalescheckingmaster`.`dRealAdvanceMoney` AS `dRealAdvanceMoney`,`salsalescheckingmaster`.`sCurrency` AS `sCurrency`,`salsalescheckingmaster`.`dCurrencyRate` AS `dCurrencyRate`,`salsalescheckingmaster`.`sStatus` AS `sStatus`,`salsalescheckingmaster`.`sInvoiceNo` AS `sInvoiceNo`,`salsalescheckingmaster`.`bInvalid` AS `bInvalid`,`salsalescheckingmaster`.`sMReserve1` AS `sMReserve1`,`salsalescheckingmaster`.`sMReserve2` AS `sMReserve2`,`salsalescheckingmaster`.`sMReserve3` AS `sMReserve3`,`salsalescheckingmaster`.`sMReserve4` AS `sMReserve4`,`salsalescheckingmaster`.`sMReserve5` AS `sMReserve5`,`salsalescheckingmaster`.`sMReserve6` AS `sMReserve6`,`salsalescheckingmaster`.`dMReserve1` AS `dMReserve1`,`salsalescheckingmaster`.`dMReserve2` AS `dMReserve2`,`salsalescheckingmaster`.`dMReserve3` AS `dMReserve3`,`salsalescheckingmaster`.`iMReserve1` AS `iMReserve1`,`salsalescheckingmaster`.`iMReserve2` AS `iMReserve2`,`salsalescheckingmaster`.`iMReserve3` AS `iMReserve3`,`salsalescheckingmaster`.`tMReserve1` AS `tMReserve1`,`salsalescheckingmaster`.`tMReserve2` AS `tMReserve2`,`salsalescheckingmaster`.`iVouchermark` AS `iVouchermark`,`salsalescheckingmaster`.`sAccountNo` AS `sAccountNo`,`salsalescheckingmaster`.`sAccountId` AS `sAccountId`,`salsalescheckingmaster`.`tInvoiceDate` AS `tInvoiceDate`,`salsalescheckingslave`.`sId` AS `sSlaveId`,`salsalescheckingslave`.`iOrder` AS `iSlaveOrder`,`salsalescheckingslave`.`sProductId` AS `sProductId`,`salsalescheckingslave`.`dProductQty` AS `dProductQty`,`salsalescheckingslave`.`dProductPrice` AS `dProductPrice`,`salsalescheckingslave`.`dProductMoney` AS `dProductMoney`,`salsalescheckingslave`.`sSrcSlaveId` AS `sSrcSlaveId`,`salsalescheckingslave`.`sSrcId` AS `sSrcId`,`salsalescheckingslave`.`sSrcNo` AS `sSrcNo`,`salsalescheckingslave`.`dSrcQty` AS `dSrcQty`,`salsalescheckingslave`.`dSrcMoney` AS `dSrcMoney`,`salsalescheckingslave`.`bInvoiceComplete` AS `bInvoiceComplete`,`salsalescheckingslave`.`sSlaveMemo` AS `sSlaveMemo`,`salsalescheckingslave`.`sTaxId` AS `sTaxId`,`salsalescheckingslave`.`dProductNoTaxPrice` AS `dProductNoTaxPrice`,`salsalescheckingslave`.`dProductNoTaxMoney` AS `dProductNoTaxMoney`,`salsalescheckingslave`.`dProductTaxMoney` AS `dProductTaxMoney`,`salsalescheckingslave`.`dProductTaxForeignMoney` AS `dProductTaxForeignMoney`,`salsalescheckingslave`.`dProductForeignMoney` AS `dProductForeignMoney`,`salsalescheckingslave`.`dInvoiceMoney` AS `dInvoiceMoney`,`salsalescheckingslave`.`dReceiptMoney` AS `dReceiptMoney`,`salsalescheckingslave`.`sWebOrderNo` AS `sWebOrderNo`,`salsalescheckingslave`.`sWebOrderId` AS `sWebOrderId`,`salsalescheckingslave`.`sOrderId` AS `sOrderId`,`salsalescheckingslave`.`sOrderNo` AS `sOrderNo`,`salsalescheckingslave`.`sWorkOrderId` AS `sWorkOrderId`,`salsalescheckingslave`.`sWorkOrderNo` AS `sWorkOrderNo`,`salsalescheckingslave`.`dLossQty` AS `dLossQty`,`salsalescheckingslave`.`dLossMoney` AS `dLossMoney`,`salsalescheckingslave`.`sLossType` AS `sLossType`,`salsalescheckingslave`.`sBarcode` AS `sBarcode`,`salsalescheckingslave`.`sCustomerOrderNo` AS `sCustomerOrderNo`,`salsalescheckingslave`.`sSReserve1` AS `sSReserve1`,`salsalescheckingslave`.`sSReserve2` AS `sSReserve2`,`salsalescheckingslave`.`sSReserve3` AS `sSReserve3`,`salsalescheckingslave`.`sSReserve4` AS `sSReserve4`,`salsalescheckingslave`.`sSReserve5` AS `sSReserve5`,`salsalescheckingslave`.`sSReserve6` AS `sSReserve6`,`salsalescheckingslave`.`dSReserve1` AS `dSReserve1`,`salsalescheckingslave`.`dSReserve2` AS `dSReserve2`,`salsalescheckingslave`.`dSReserve3` AS `dSReserve3`,`salsalescheckingslave`.`iSReserve1` AS `iSReserve1`,`salsalescheckingslave`.`iSReserve2` AS `iSReserve2`,`salsalescheckingslave`.`iSReserve3` AS `iSReserve3`,`salsalescheckingslave`.`tSReserve1` AS `tSReserve1`,`salsalescheckingslave`.`tSReserve2` AS `tSReserve2`,`salsalescheckingmaster`.`sBrandsId` AS `sBrandsId`,`salsalescheckingslave`.`sWorkOrderSlaveId` AS `sWorkOrderSlaveId`,`salsalescheckingslave`.`sOrderSlaveId` AS `sOrderSlaveId`,`salsalescheckingslave`.`iIncrement` AS `iIncrement`,`salsalescheckingslave`.`sSrcFormId` AS `sSrcFormId`,`salsalescheckingslave`.`sDeliverGoodsNo` AS `sDeliverGoodsNo`,`salsalescheckingslave`.`sDeliverGoodsSlaveId` AS `sDeliverGoodsSlaveId`,`salsalescheckingslave`.`sDeliverGoodsId` AS `sDeliverGoodsId`,`salsalescheckingslave`.`sDeliverNotifyNo` AS `sDeliverNotifyNo`,`salsalescheckingslave`.`sDeliverNotifySlaveId` AS `sDeliverNotifySlaveId`,`salsalescheckingslave`.`sDeliverNotifyId` AS `sDeliverNotifyId`,`salsalescheckingslave`.`sProductInStoreNo` AS `sProductInStoreNo`,`salsalescheckingslave`.`sProductInStoreSlaveId` AS `sProductInStoreSlaveId`,`salsalescheckingslave`.`sProductInStoreId` AS `sProductInStoreId`,`salsalescheckingslave`.`bSalesInvoiceComplete` AS `bSalesInvoiceComplete`,`salsalescheckingslave`.`bReceiptComplete` AS `bReceiptComplete`,`salsalescheckingslave`.`dCostPrice` AS `dCostPrice`,`salsalescheckingslave`.`dCostMoney` AS `dCostMoney`,`salsalescheckingslave`.`dProofingMoney` AS `dProofingMoney`,`salsalescheckingslave`.`dPlateMoney` AS `dPlateMoney`,`salsalescheckingslave`.`dKnifeMouldMoney` AS `dKnifeMouldMoney`,`salsalescheckingslave`.`dFreightMoney` AS `dFreightMoney`,`salsalescheckingslave`.`dNProductPrice` AS `dNProductPrice`,`salsalescheckingslave`.`dNProductMoney` AS `dNProductMoney`,`salsalescheckingslave`.`sMaterialsStyle` AS `sMaterialsStyle`,`salsalescheckingslave`.`dProductForeignPrice` AS `dProductForeignPrice`,`salsalescheckingslave`.`sVoucherBillId` AS `sVoucherBillId`,`salsalescheckingslave`.`sVoucherBillNo` AS `sVoucherBillNo`,`salsalescheckingslave`.`sVoucherBillminusId` AS `sVoucherBillminusId`,`salsalescheckingslave`.`sSrcType` AS `sSrcType`,`salsalescheckingslave`.`sVoucherBillminusNo` AS `sVoucherBillminusNo`,(ifnull(`salsalescheckingslave`.`dProductNoTaxMoney`,0) - ifnull(`salsalescheckingslave`.`dCostMoney`,0)) AS `dProfitMoney`,`salsalescheckingslave`.`dGiveQty` AS `dGiveQty`,`salsalescheckingslave`.`dRealityPrice` AS `dRealityPrice`,round((`salsalescheckingslave`.`dRealityPrice` * `salsalescheckingslave`.`dProductQty`),2) AS `dRealityMoney`,`salsalescheckingslave`.`dSingleReceiptQty` AS `dSingleReceiptQty`,`salsalescheckingslave`.`dRemainderQty` AS `dRemainderQty`,`salsalescheckingslave`.`dInvoiceQty` AS `dInvoiceQty`,`salsalescheckingslave`.`iZeroCheck` AS `iZeroCheck`,`eleproduct`.`sProductName` AS `sProductName`,`elecustomer`.`sCustomerName` AS `sCustomerName` from (((`salsalescheckingmaster` join `salsalescheckingslave` on((`salsalescheckingslave`.`sParentId` = `salsalescheckingmaster`.`sId`))) join `elecustomer` on((`salsalescheckingmaster`.`sCustomerId` = `elecustomer`.`sId`))) join `eleproduct` on((`salsalescheckingslave`.`sProductId` = `eleproduct`.`sId`)))
```

## Narrative

_No human-written narrative yet._
