# `viw_ai_purpurchaseinvoice` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sBrandsId` | `varchar(100)` | NO |
| 3 | `sSubsidiaryId` | `varchar(100)` | NO |
| 4 | `tCreateDate` | `datetime` | NO |
| 5 | `tUpdateDate` | `datetime` | NO |
| 6 | `sMakePerson` | `varchar(255)` | NO |
| 7 | `iOrder` | `int` | NO |
| 8 | `sFormId` | `varchar(100)` | NO |
| 9 | `sBillNo` | `varchar(255)` | NO |
| 10 | `sSupplyId` | `varchar(100)` | NO |
| 11 | `sContacts` | `varchar(255)` | YES |
| 12 | `sPhone` | `varchar(255)` | YES |
| 13 | `tDeliverDate` | `datetime` | YES |
| 14 | `sPurchaseManId` | `varchar(100)` | YES |
| 15 | `sGetPayId` | `varchar(100)` | YES |
| 16 | `tGetPayDate` | `datetime` | YES |
| 17 | `sConsignee` | `varchar(255)` | YES |
| 18 | `sConsigneeMobile` | `varchar(255)` | YES |
| 19 | `sDeliverId` | `varchar(100)` | YES |
| 20 | `sProvince` | `varchar(255)` | YES |
| 21 | `sCity` | `varchar(255)` | YES |
| 22 | `sArea` | `varchar(255)` | YES |
| 23 | `sDeliverTo` | `varchar(255)` | YES |
| 24 | `sManualNo` | `varchar(255)` | YES |
| 25 | `sMemo` | `text` | YES |
| 26 | `bCheck` | `bit(1)` | NO |
| 27 | `tCheckDate` | `datetime` | YES |
| 28 | `sCheckPerson` | `varchar(255)` | YES |
| 29 | `bPrint` | `bit(1)` | NO |
| 30 | `bCopyLimit` | `bit(1)` | NO |
| 31 | `dAdvanceMoney` | `decimal(18,6)` | YES |
| 32 | `tAdvanceDate` | `datetime` | YES |
| 33 | `dRealAdvanceMoney` | `decimal(18,6)` | YES |
| 34 | `sCurrency` | `varchar(255)` | YES |
| 35 | `dCurrencyRate` | `decimal(18,6)` | YES |
| 36 | `sStatus` | `varchar(255)` | YES |
| 37 | `bInvalid` | `bit(1)` | NO |
| 38 | `sMReserve1` | `varchar(255)` | YES |
| 39 | `sMReserve2` | `varchar(255)` | YES |
| 40 | `sMReserve3` | `varchar(255)` | YES |
| 41 | `sMReserve4` | `varchar(255)` | YES |
| 42 | `sMReserve5` | `varchar(255)` | YES |
| 43 | `sMReserve6` | `varchar(255)` | 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 | `bAdvance` | `bit(1)` | NO |
| 53 | `sSlaveId` | `varchar(100)` | YES |
| 54 | `iSlaveOrder` | `int` | YES |
| 55 | `sMaterialsId` | `varchar(100)` | YES |
| 56 | `sMaterialsStyle` | `varchar(255)` | YES |
| 57 | `dAuxiliaryQty` | `decimal(18,6)` | YES |
| 58 | `sAuxiliaryUnit` | `varchar(255)` | YES |
| 59 | `dMaterialsQty` | `decimal(18,6)` | YES |
| 60 | `dConversionQty` | `decimal(18,6)` | YES |
| 61 | `dMaterialsPrice` | `decimal(18,2)` | YES |
| 62 | `dMaterialsMoney` | `decimal(18,6)` | YES |
| 63 | `bMinus` | `bit(1)` | YES |
| 64 | `dMinusMoney` | `decimal(18,6)` | YES |
| 65 | `sSrcSlaveId` | `varchar(100)` | YES |
| 66 | `sSrcId` | `varchar(100)` | YES |
| 67 | `sSrcNo` | `varchar(255)` | YES |
| 68 | `dSrcQty` | `decimal(18,6)` | YES |
| 69 | `sSlaveMemo` | `text` | YES |
| 70 | `sTaxId` | `varchar(100)` | YES |
| 71 | `dPayMoney` | `decimal(18,6)` | YES |
| 72 | `dMaterialsNoTaxPrice` | `decimal(18,6)` | YES |
| 73 | `dMaterialsNoTaxMoney` | `decimal(18,6)` | YES |
| 74 | `dMaterialsTaxMoney` | `decimal(18,6)` | YES |
| 75 | `dMaterialsTaxForeignMoney` | `decimal(18,6)` | YES |
| 76 | `dMaterialsForeignMoney` | `decimal(18,6)` | YES |
| 77 | `sPurchaseOrderId` | `varchar(100)` | YES |
| 78 | `sPurchaseOrderNo` | `varchar(255)` | YES |
| 79 | `sPurchaseOrderSlaveId` | `varchar(100)` | YES |
| 80 | `sOrderNo` | `varchar(255)` | YES |
| 81 | `sOrderId` | `varchar(100)` | YES |
| 82 | `sWorkOrderId` | `varchar(100)` | YES |
| 83 | `sWorkOrderNo` | `varchar(4000)` | YES |
| 84 | `sWorkOrderControlId` | `varchar(100)` | YES |
| 85 | `sBarcode` | `varchar(255)` | YES |
| 86 | `sSReserve1` | `varchar(255)` | YES |
| 87 | `sSReserve2` | `varchar(255)` | YES |
| 88 | `sSReserve3` | `varchar(255)` | YES |
| 89 | `sSReserve4` | `varchar(255)` | YES |
| 90 | `sSReserve5` | `varchar(255)` | YES |
| 91 | `sSReserve6` | `varchar(255)` | YES |
| 92 | `dSReserve1` | `decimal(18,6)` | YES |
| 93 | `dSReserve2` | `decimal(18,6)` | YES |
| 94 | `dSReserve3` | `decimal(18,6)` | YES |
| 95 | `iSReserve1` | `int` | YES |
| 96 | `iSReserve2` | `int` | YES |
| 97 | `iSReserve3` | `int` | YES |
| 98 | `tSReserve1` | `datetime` | YES |
| 99 | `tSReserve2` | `datetime` | YES |
| 100 | `iIncrement` | `int` | YES |
| 101 | `bPaymentComplete` | `bit(1)` | YES |
| 102 | `dTotalMoney` | `decimal(18,6)` | YES |
| 103 | `sInvoiceNo` | `varchar(255)` | YES |
| 104 | `dProductMoney` | `decimal(18,6)` | YES |
| 105 | `dProductTaxMoney` | `decimal(18,6)` | YES |
| 106 | `dProductNoTaxMoney` | `decimal(18,6)` | YES |
| 107 | `dProductForeignMoney` | `decimal(18,6)` | YES |
| 108 | `dProductTaxForeignMoney` | `decimal(18,6)` | YES |
| 109 | `dslaveTotalMoney` | `decimal(18,6)` | YES |
| 110 | `sMaterialsName` | `varchar(100)` | NO |
| 111 | `sSupplyName` | `varchar(255)` | NO |

## Definition

```sql
select `purpurchaseinvoicemaster`.`sId` AS `sId`,`purpurchaseinvoicemaster`.`sBrandsId` AS `sBrandsId`,`purpurchaseinvoicemaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`purpurchaseinvoicemaster`.`tCreateDate` AS `tCreateDate`,`purpurchaseinvoicemaster`.`tCreateDate` AS `tUpdateDate`,`purpurchaseinvoicemaster`.`sMakePerson` AS `sMakePerson`,`purpurchaseinvoicemaster`.`iOrder` AS `iOrder`,`purpurchaseinvoicemaster`.`sFormId` AS `sFormId`,`purpurchaseinvoicemaster`.`sBillNo` AS `sBillNo`,`purpurchaseinvoicemaster`.`sSupplyId` AS `sSupplyId`,`purpurchaseinvoicemaster`.`sContacts` AS `sContacts`,`purpurchaseinvoicemaster`.`sPhone` AS `sPhone`,`purpurchaseinvoicemaster`.`tDeliverDate` AS `tDeliverDate`,`purpurchaseinvoicemaster`.`sPurchaseManId` AS `sPurchaseManId`,`purpurchaseinvoicemaster`.`sGetPayId` AS `sGetPayId`,`purpurchaseinvoicemaster`.`tGetPayDate` AS `tGetPayDate`,`purpurchaseinvoicemaster`.`sConsignee` AS `sConsignee`,`purpurchaseinvoicemaster`.`sConsigneeMobile` AS `sConsigneeMobile`,`purpurchaseinvoicemaster`.`sDeliverId` AS `sDeliverId`,`purpurchaseinvoicemaster`.`sProvince` AS `sProvince`,`purpurchaseinvoicemaster`.`sCity` AS `sCity`,`purpurchaseinvoicemaster`.`sArea` AS `sArea`,`purpurchaseinvoicemaster`.`sDeliverTo` AS `sDeliverTo`,`purpurchaseinvoicemaster`.`sManualNo` AS `sManualNo`,`purpurchaseinvoicemaster`.`sMemo` AS `sMemo`,`purpurchaseinvoicemaster`.`bCheck` AS `bCheck`,`purpurchaseinvoicemaster`.`tCheckDate` AS `tCheckDate`,`purpurchaseinvoicemaster`.`sCheckPerson` AS `sCheckPerson`,`purpurchaseinvoicemaster`.`bPrint` AS `bPrint`,`purpurchaseinvoicemaster`.`bCopyLimit` AS `bCopyLimit`,`purpurchaseinvoicemaster`.`dAdvanceMoney` AS `dAdvanceMoney`,`purpurchaseinvoicemaster`.`tAdvanceDate` AS `tAdvanceDate`,`purpurchaseinvoicemaster`.`dRealAdvanceMoney` AS `dRealAdvanceMoney`,`purpurchaseinvoicemaster`.`sCurrency` AS `sCurrency`,`purpurchaseinvoicemaster`.`dCurrencyRate` AS `dCurrencyRate`,`purpurchaseinvoicemaster`.`sStatus` AS `sStatus`,`purpurchaseinvoicemaster`.`bInvalid` AS `bInvalid`,`purpurchaseinvoicemaster`.`sMReserve1` AS `sMReserve1`,`purpurchaseinvoicemaster`.`sMReserve2` AS `sMReserve2`,`purpurchaseinvoicemaster`.`sMReserve3` AS `sMReserve3`,`purpurchaseinvoicemaster`.`sMReserve4` AS `sMReserve4`,`purpurchaseinvoicemaster`.`sMReserve5` AS `sMReserve5`,`purpurchaseinvoicemaster`.`sMReserve6` AS `sMReserve6`,`purpurchaseinvoicemaster`.`dMReserve1` AS `dMReserve1`,`purpurchaseinvoicemaster`.`dMReserve2` AS `dMReserve2`,`purpurchaseinvoicemaster`.`dMReserve3` AS `dMReserve3`,`purpurchaseinvoicemaster`.`iMReserve1` AS `iMReserve1`,`purpurchaseinvoicemaster`.`iMReserve2` AS `iMReserve2`,`purpurchaseinvoicemaster`.`iMReserve3` AS `iMReserve3`,`purpurchaseinvoicemaster`.`tMReserve1` AS `tMReserve1`,`purpurchaseinvoicemaster`.`tMReserve2` AS `tMReserve2`,`purpurchaseinvoicemaster`.`bAdvance` AS `bAdvance`,`purpurchaseinvoiceslave`.`sId` AS `sSlaveId`,`purpurchaseinvoiceslave`.`iOrder` AS `iSlaveOrder`,`purpurchaseinvoiceslave`.`sMaterialsId` AS `sMaterialsId`,`purpurchaseinvoiceslave`.`sMaterialsStyle` AS `sMaterialsStyle`,`purpurchaseinvoiceslave`.`dAuxiliaryQty` AS `dAuxiliaryQty`,`purpurchaseinvoiceslave`.`sAuxiliaryUnit` AS `sAuxiliaryUnit`,`purpurchaseinvoiceslave`.`dMaterialsQty` AS `dMaterialsQty`,`purpurchaseinvoiceslave`.`dConversionQty` AS `dConversionQty`,`purpurchaseinvoiceslave`.`dMaterialsPrice` AS `dMaterialsPrice`,`purpurchaseinvoiceslave`.`dMaterialsMoney` AS `dMaterialsMoney`,`purpurchaseinvoiceslave`.`bMinus` AS `bMinus`,`purpurchaseinvoiceslave`.`dMinusMoney` AS `dMinusMoney`,`purpurchaseinvoiceslave`.`sSrcSlaveId` AS `sSrcSlaveId`,`purpurchaseinvoiceslave`.`sSrcId` AS `sSrcId`,`purpurchaseinvoiceslave`.`sSrcNo` AS `sSrcNo`,`purpurchaseinvoiceslave`.`dSrcQty` AS `dSrcQty`,`purpurchaseinvoiceslave`.`sSlaveMemo` AS `sSlaveMemo`,`purpurchaseinvoiceslave`.`sTaxId` AS `sTaxId`,`purpurchaseinvoiceslave`.`dPayMoney` AS `dPayMoney`,`purpurchaseinvoiceslave`.`dMaterialsNoTaxPrice` AS `dMaterialsNoTaxPrice`,`purpurchaseinvoiceslave`.`dMaterialsNoTaxMoney` AS `dMaterialsNoTaxMoney`,`purpurchaseinvoiceslave`.`dMaterialsTaxMoney` AS `dMaterialsTaxMoney`,`purpurchaseinvoiceslave`.`dMaterialsTaxForeignMoney` AS `dMaterialsTaxForeignMoney`,`purpurchaseinvoiceslave`.`dMaterialsForeignMoney` AS `dMaterialsForeignMoney`,`purpurchaseinvoiceslave`.`sPurchaseOrderId` AS `sPurchaseOrderId`,`purpurchaseinvoiceslave`.`sPurchaseOrderNo` AS `sPurchaseOrderNo`,`purpurchaseinvoiceslave`.`sPurchaseOrderSlaveId` AS `sPurchaseOrderSlaveId`,`purpurchaseinvoiceslave`.`sOrderNo` AS `sOrderNo`,`purpurchaseinvoiceslave`.`sOrderId` AS `sOrderId`,`purpurchaseinvoiceslave`.`sWorkOrderId` AS `sWorkOrderId`,`purpurchaseinvoiceslave`.`sWorkOrderNo` AS `sWorkOrderNo`,`purpurchaseinvoiceslave`.`sWorkOrderControlId` AS `sWorkOrderControlId`,`purpurchaseinvoiceslave`.`sBarcode` AS `sBarcode`,`purpurchaseinvoiceslave`.`sSReserve1` AS `sSReserve1`,`purpurchaseinvoiceslave`.`sSReserve2` AS `sSReserve2`,`purpurchaseinvoiceslave`.`sSReserve3` AS `sSReserve3`,`purpurchaseinvoiceslave`.`sSReserve4` AS `sSReserve4`,`purpurchaseinvoiceslave`.`sSReserve5` AS `sSReserve5`,`purpurchaseinvoiceslave`.`sSReserve6` AS `sSReserve6`,`purpurchaseinvoiceslave`.`dSReserve1` AS `dSReserve1`,`purpurchaseinvoiceslave`.`dSReserve2` AS `dSReserve2`,`purpurchaseinvoiceslave`.`dSReserve3` AS `dSReserve3`,`purpurchaseinvoiceslave`.`iSReserve1` AS `iSReserve1`,`purpurchaseinvoiceslave`.`iSReserve2` AS `iSReserve2`,`purpurchaseinvoiceslave`.`iSReserve3` AS `iSReserve3`,`purpurchaseinvoiceslave`.`tSReserve1` AS `tSReserve1`,`purpurchaseinvoiceslave`.`tSReserve2` AS `tSReserve2`,`purpurchaseinvoiceslave`.`iIncrement` AS `iIncrement`,`purpurchaseinvoiceslave`.`bPaymentComplete` AS `bPaymentComplete`,`purpurchaseinvoiceslave`.`dTotalMoney` AS `dTotalMoney`,`purpurchaseinvoicemaster`.`sInvoiceNo` AS `sInvoiceNo`,`purpurchaseinvoiceslave`.`dMaterialsMoney` AS `dProductMoney`,`purpurchaseinvoiceslave`.`dMaterialsTaxMoney` AS `dProductTaxMoney`,`purpurchaseinvoiceslave`.`dMaterialsNoTaxMoney` AS `dProductNoTaxMoney`,`purpurchaseinvoiceslave`.`dMaterialsForeignMoney` AS `dProductForeignMoney`,`purpurchaseinvoiceslave`.`dMaterialsTaxForeignMoney` AS `dProductTaxForeignMoney`,`purpurchaseinvoiceslave`.`dTotalMoney` AS `dslaveTotalMoney`,`elematerials`.`sMaterialsName` AS `sMaterialsName`,`elesupply`.`sSupplyName` AS `sSupplyName` from (((`purpurchaseinvoicemaster` left join `purpurchaseinvoiceslave` on((`purpurchaseinvoiceslave`.`sParentId` = `purpurchaseinvoicemaster`.`sId`))) join `elesupply` on((`purpurchaseinvoicemaster`.`sSupplyId` = `elesupply`.`sId`))) join `elematerials` on((`purpurchaseinvoiceslave`.`sMaterialsId` = `elematerials`.`sId`)))
```

## Narrative

_No human-written narrative yet._
