# `viw_noslasalesorderinvoice1`（视图）


- **是否可更新：** NO
- **定义者：** `xlyprint@%`

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 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 | `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` | `mediumtext` | YES |
| 24 | `bCheck` | `decimal(1,0)` | NO |
| 25 | `tCheckDate` | `datetime` | YES |
| 26 | `sCheckPerson` | `varchar(255)` | YES |
| 27 | `bPrint` | `decimal(1,0)` | NO |
| 28 | `bCopyLimit` | `decimal(1,0)` | 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` | `bigint` | YES |
| 47 | `iMReserve2` | `bigint` | YES |
| 48 | `iMReserve3` | `bigint` | YES |
| 49 | `tMReserve1` | `datetime` | YES |
| 50 | `tMReserve2` | `datetime` | YES |
| 51 | `iVouchermark` | `bigint` | YES |
| 52 | `sSlaveId` | `varchar(100)` | NO |
| 53 | `iSlaveOrder` | `int` | NO |
| 54 | `sProductId` | `varchar(100)` | NO |
| 55 | `dProductQty` | `decimal(18,6)` | NO |
| 56 | `dProductPrice` | `decimal(36,12)` | NO |
| 57 | `dProductMoney` | `decimal(31,6)` | YES |
| 58 | `sSrcSlaveId` | `varchar(100)` | NO |
| 59 | `sSrcId` | `varchar(100)` | NO |
| 60 | `sSrcNo` | `varchar(255)` | NO |
| 61 | `dSrcQty` | `decimal(18,6)` | YES |
| 62 | `dSrcMoney` | `decimal(18,6)` | YES |
| 63 | `bInvoiceComplete` | `decimal(1,0)` | NO |
| 64 | `sSlaveMemo` | `mediumtext` | YES |
| 65 | `sTaxId` | `varchar(100)` | YES |
| 66 | `dProductNoTaxPrice` | `decimal(18,6)` | YES |
| 67 | `dProductNoTaxMoney` | `decimal(31,6)` | YES |
| 68 | `dProductTaxMoney` | `decimal(22,6)` | YES |
| 69 | `dProductTaxForeignMoney` | `decimal(18,6)` | YES |
| 70 | `dProductForeignMoney` | `decimal(18,6)` | YES |
| 71 | `dProductForeignPrice` | `decimal(18,6)` | NO |
| 72 | `dInvoiceMoney` | `decimal(22,6)` | YES |
| 73 | `dReceiptMoney` | `decimal(18,6)` | NO |
| 74 | `sWebOrderNo` | `varchar(255)` | NO |
| 75 | `sWebOrderId` | `varchar(100)` | NO |
| 76 | `sOrderId` | `varchar(100)` | NO |
| 77 | `sOrderNo` | `varchar(255)` | NO |
| 78 | `sWorkOrderId` | `varchar(100)` | NO |
| 79 | `sWorkOrderNo` | `varchar(255)` | NO |
| 80 | `dLossQty` | `decimal(18,6)` | NO |
| 81 | `dLossMoney` | `decimal(18,6)` | YES |
| 82 | `sLossType` | `varchar(255)` | YES |
| 83 | `sBarcode` | `varchar(255)` | YES |
| 84 | `sCustomerOrderNo` | `varchar(255)` | YES |
| 85 | `sSReserve1` | `varchar(255)` | YES |
| 86 | `sSReserve2` | `varchar(255)` | YES |
| 87 | `sSReserve3` | `varchar(255)` | YES |
| 88 | `sSReserve4` | `varchar(255)` | YES |
| 89 | `sSReserve5` | `varchar(255)` | YES |
| 90 | `sSReserve6` | `varchar(255)` | YES |
| 91 | `dSReserve1` | `decimal(18,6)` | YES |
| 92 | `dSReserve2` | `decimal(18,6)` | YES |
| 93 | `dSReserve3` | `decimal(18,6)` | YES |
| 94 | `iSReserve1` | `bigint` | YES |
| 95 | `iSReserve2` | `bigint` | YES |
| 96 | `iSReserve3` | `bigint` | YES |
| 97 | `tSReserve1` | `datetime` | YES |
| 98 | `tSReserve2` | `datetime` | YES |
| 99 | `sWorkOrderSlaveId` | `varchar(100)` | NO |
| 100 | `sOrderSlaveId` | `varchar(100)` | NO |
| 101 | `iIncrement` | `int` | NO |
| 102 | `sSrcFormId` | `varchar(100)` | NO |
| 103 | `sDeliverGoodsNo` | `varchar(255)` | NO |
| 104 | `sDeliverGoodsSlaveId` | `varchar(100)` | NO |
| 105 | `sDeliverGoodsId` | `varchar(100)` | NO |
| 106 | `sDeliverNotifyNo` | `varchar(255)` | NO |
| 107 | `sDeliverNotifySlaveId` | `varchar(100)` | NO |
| 108 | `sDeliverNotifyId` | `varchar(100)` | NO |
| 109 | `sProductInStoreNo` | `varchar(255)` | NO |
| 110 | `sProductInStoreSlaveId` | `varchar(100)` | NO |
| 111 | `sProductInStoreId` | `varchar(100)` | NO |
| 112 | `bSalesInvoiceComplete` | `decimal(1,0)` | NO |
| 113 | `bReceiptComplete` | `decimal(1,0)` | NO |
| 114 | `dCostPrice` | `decimal(18,6)` | NO |
| 115 | `dCostMoney` | `decimal(18,6)` | NO |
| 116 | `dMaterialsQty` | `decimal(18,6)` | NO |
| 117 | `sMaterialsStyle` | `varchar(100)` | NO |
| 118 | `dGiveQty` | `decimal(18,6)` | YES |
| 119 | `dPresentQty` | `decimal(18,2)` | NO |
| 120 | `dRemainderQty` | `decimal(18,2)` | NO |
| 121 | `dBackRemainderQty` | `decimal(18,2)` | NO |
| 122 | `iZeroCheck` | `bigint` | YES |
| 123 | `dInvoiceQty` | `decimal(18,6)` | NO |

## 定义

```sql
select `xlyweberp_saas_ai`.`salsalescheckingmaster`.`sId` AS `sId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMakePerson` AS `sMakePerson`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`iOrder` AS `iOrder`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sBillNo` AS `sBillNo`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sCustomerId` AS `sCustomerId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sContacts` AS `sContacts`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sPhone` AS `sPhone`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sSalesManId` AS `sSalesManId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sGetPayId` AS `sGetPayId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`tGetPayDate` AS `tGetPayDate`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sConsignee` AS `sConsignee`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sConsigneeMobile` AS `sConsigneeMobile`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sDeliverId` AS `sDeliverId`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sProvince` AS `sProvince`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sCity` AS `sCity`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sArea` AS `sArea`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sDeliverTo` AS `sDeliverTo`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sManualNo` AS `sManualNo`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMemo` AS `sMemo`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`bCheck` AS `bCheck`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`tCheckDate` AS `tCheckDate`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sCheckPerson` AS `sCheckPerson`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`bPrint` AS `bPrint`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`bCopyLimit` AS `bCopyLimit`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`dAdvanceMoney` AS `dAdvanceMoney`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`tAdvanceDate` AS `tAdvanceDate`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`dRealAdvanceMoney` AS `dRealAdvanceMoney`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sCurrency` AS `sCurrency`,`c`.`dCurrencyRate` AS `dCurrencyRate`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sStatus` AS `sStatus`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sInvoiceNo` AS `sInvoiceNo`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`bInvalid` AS `bInvalid`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMReserve1` AS `sMReserve1`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMReserve2` AS `sMReserve2`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMReserve3` AS `sMReserve3`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMReserve4` AS `sMReserve4`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMReserve5` AS `sMReserve5`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sMReserve6` AS `sMReserve6`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`dMReserve1` AS `dMReserve1`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`dMReserve2` AS `dMReserve2`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`dMReserve3` AS `dMReserve3`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`iMReserve1` AS `iMReserve1`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`iMReserve2` AS `iMReserve2`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`iMReserve3` AS `iMReserve3`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`tMReserve1` AS `tMReserve1`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`tMReserve2` AS `tMReserve2`,`xlyweberp_saas_ai`.`salsalescheckingmaster`.`iVouchermark` AS `iVouchermark`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`iOrder` AS `iSlaveOrder`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sProductId` AS `sProductId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductQty` AS `dProductQty`,if((`c`.`dCurrencyRate` <> 1),(`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductForeignPrice` * `c`.`dCurrencyRate`),`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductPrice`) AS `dProductPrice`,if((`c`.`dCurrencyRate` <> 1),round((`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductForeignMoney` * `c`.`dCurrencyRate`),2),`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductMoney`) AS `dProductMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSrcSlaveId` AS `sSrcSlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSrcId` AS `sSrcId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSrcNo` AS `sSrcNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dSrcQty` AS `dSrcQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dSrcMoney` AS `dSrcMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`bInvoiceComplete` AS `bInvoiceComplete`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSlaveMemo` AS `sSlaveMemo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sTaxId` AS `sTaxId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductNoTaxPrice` AS `dProductNoTaxPrice`,if((`c`.`dCurrencyRate` <> 1),round((`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductForeignMoney` * `c`.`dCurrencyRate`),2),`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductNoTaxMoney`) AS `dProductNoTaxMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductTaxMoney` AS `dProductTaxMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductTaxForeignMoney` AS `dProductTaxForeignMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductForeignMoney` AS `dProductForeignMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductForeignPrice` AS `dProductForeignPrice`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dInvoiceMoney` AS `dInvoiceMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dReceiptMoney` AS `dReceiptMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sWebOrderNo` AS `sWebOrderNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sWebOrderId` AS `sWebOrderId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sOrderId` AS `sOrderId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sOrderNo` AS `sOrderNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sWorkOrderId` AS `sWorkOrderId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sWorkOrderNo` AS `sWorkOrderNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dLossQty` AS `dLossQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dLossMoney` AS `dLossMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sLossType` AS `sLossType`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sBarcode` AS `sBarcode`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sCustomerOrderNo` AS `sCustomerOrderNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSReserve1` AS `sSReserve1`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSReserve2` AS `sSReserve2`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSReserve3` AS `sSReserve3`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSReserve4` AS `sSReserve4`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSReserve5` AS `sSReserve5`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSReserve6` AS `sSReserve6`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dSReserve1` AS `dSReserve1`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dSReserve2` AS `dSReserve2`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dSReserve3` AS `dSReserve3`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`iSReserve1` AS `iSReserve1`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`iSReserve2` AS `iSReserve2`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`iSReserve3` AS `iSReserve3`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`tSReserve1` AS `tSReserve1`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`tSReserve2` AS `tSReserve2`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sWorkOrderSlaveId` AS `sWorkOrderSlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sOrderSlaveId` AS `sOrderSlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`iIncrement` AS `iIncrement`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sSrcFormId` AS `sSrcFormId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sDeliverGoodsNo` AS `sDeliverGoodsNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sDeliverGoodsSlaveId` AS `sDeliverGoodsSlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sDeliverGoodsId` AS `sDeliverGoodsId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sDeliverNotifyNo` AS `sDeliverNotifyNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sDeliverNotifySlaveId` AS `sDeliverNotifySlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sDeliverNotifyId` AS `sDeliverNotifyId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sProductInStoreNo` AS `sProductInStoreNo`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sProductInStoreSlaveId` AS `sProductInStoreSlaveId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sProductInStoreId` AS `sProductInStoreId`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`bSalesInvoiceComplete` AS `bSalesInvoiceComplete`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`bReceiptComplete` AS `bReceiptComplete`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dCostPrice` AS `dCostPrice`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dCostMoney` AS `dCostMoney`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dMaterialsQty` AS `dMaterialsQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`sMaterialsStyle` AS `sMaterialsStyle`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dGiveQty` AS `dGiveQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dPresentQty` AS `dPresentQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dRemainderQty` AS `dRemainderQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dBackRemainderQty` AS `dBackRemainderQty`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`iZeroCheck` AS `iZeroCheck`,`xlyweberp_saas_ai`.`salsalescheckingslave`.`dInvoiceQty` AS `dInvoiceQty` from ((`xlyweberp_saas_ai`.`salsalescheckingmaster` join `xlyweberp_saas_ai`.`salsalescheckingslave` on((`xlyweberp_saas_ai`.`salsalescheckingslave`.`sParentId` = `xlyweberp_saas_ai`.`salsalescheckingmaster`.`sId`))) join `xlyweberp_saas_ai`.`siscurrency` `c` on((`xlyweberp_saas_ai`.`salsalescheckingmaster`.`sCurrency` = `c`.`sCurrency`))) where ((`xlyweberp_saas_ai`.`salsalescheckingmaster`.`bCheck` = 1) and ((abs((`xlyweberp_saas_ai`.`salsalescheckingslave`.`dProductQty` + `xlyweberp_saas_ai`.`salsalescheckingslave`.`dGiveQty`)) - abs((ifnull(`xlyweberp_saas_ai`.`salsalescheckingslave`.`dInvoiceQty`,0) + `xlyweberp_saas_ai`.`salsalescheckingslave`.`dPresentQty`))) > 0.1) and (`xlyweberp_saas_ai`.`salsalescheckingslave`.`bInvoiceComplete` = 0) and (`xlyweberp_saas_ai`.`salsalescheckingslave`.`bSalesInvoiceComplete` = 0)) union select `xlyweberp_saas_ai`.`cahcustomerinit`.`sId` AS `sId`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`cahcustomerinit`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sMakePerson` AS `sMakePerson`,`xlyweberp_saas_ai`.`cahcustomerinit`.`iOrder` AS `iOrder`,'InvoiceInit' AS `sFormId`,'' AS `sBillNo`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sCustomerId` AS `sCustomerId`,'' AS `sContacts`,'' AS `sPhone`,'' AS `sSalesManId`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sGetPayId` AS `sGetPayId`,NULL AS `tGetPayDate`,'' AS `sConsignee`,'' AS `sConsigneeMobile`,'' AS `sDeliverId`,'' AS `sProvince`,'' AS `sCity`,'' AS `sArea`,'' AS `sDeliverTo`,'' AS `sManualNo`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sMemo` AS `sMemo`,1 AS `bCheck`,NULL AS `tCheckDate`,'' AS `sCheckPerson`,1 AS `bPrint`,1 AS `bCopyLimit`,0 AS `dAdvanceMoney`,NULL AS `tAdvanceDate`,0 AS `dRealAdvanceMoney`,'' AS `sCurrency`,0 AS `dCurrencyRate`,'' AS `sStatus`,'' AS `sInvoiceNo`,`xlyweberp_saas_ai`.`cahcustomerinit`.`bInvalid` AS `bInvalid`,'' AS `sMReserve1`,'' AS `sMReserve2`,'' AS `sMReserve3`,'' AS `sMReserve4`,'' AS `sMReserve5`,'' AS `sMReserve6`,0 AS `dMReserve1`,0 AS `dMReserve2`,0 AS `dMReserve3`,0 AS `iMReserve1`,0 AS `iMReserve2`,0 AS `iMReserve3`,NULL AS `tMReserve1`,NULL AS `tMReserve2`,0 AS `iVouchermark`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`cahcustomerinit`.`iOrder` AS `iSlaveOrder`,'' AS `sProductId`,0 AS `dProductQty`,0 AS `dProductPrice`,-(`xlyweberp_saas_ai`.`cahcustomerinit`.`dNoInvoiceMoney`) AS `dProductMoney`,'' AS `sSrcSlaveId`,'' AS `sSrcId`,'' AS `sSrcNo`,0 AS `dSrcQty`,0 AS `dSrcMoney`,0 AS `bInvoiceComplete`,'' AS `sSlaveMemo`,`xlyweberp_saas_ai`.`cahcustomerinit`.`sTaxId` AS `sTaxId`,0 AS `dProductNoTaxPrice`,0 AS `dProductNoTaxMoney`,0 AS `dProductTaxMoney`,0 AS `dProductTaxForeignMoney`,0 AS `dProductForeignMoney`,0 AS `dProductForeignPrice`,0 AS `dInvoiceMoney`,0 AS `dReceiptMoney`,'' AS `sWebOrderNo`,'' AS `sWebOrderId`,'' AS `sOrderId`,'' AS `sOrderNo`,'' AS `sWorkOrderId`,'' AS `sWorkOrderNo`,0 AS `dLossQty`,0 AS `dLossMoney`,'' AS `sLossType`,'' AS `sBarcode`,'' AS `sCustomerOrderNo`,'' AS `sSReserve1`,'' AS `sSReserve2`,'' AS `sSReserve3`,'' AS `sSReserve4`,'' AS `sSReserve5`,'' AS `sSReserve6`,0 AS `dSReserve1`,0 AS `dSReserve2`,0 AS `dSReserve3`,0 AS `iSReserve1`,0 AS `iSReserve2`,0 AS `iSReserve3`,NULL AS `tSReserve1`,NULL AS `tSReserve2`,'' AS `sWorkOrderSlaveId`,'' AS `sOrderSlaveId`,`xlyweberp_saas_ai`.`cahcustomerinit`.`iIncrement` AS `iIncrement`,'' AS `sSrcFormId`,'' AS `sDeliverGoodsNo`,'' AS `sDeliverGoodsSlaveId`,'' AS `sDeliverGoodsId`,'' AS `sDeliverNotifyNo`,'' AS `sDeliverNotifySlaveId`,'' AS `sDeliverNotifyId`,'' AS `sProductInStoreNo`,'' AS `sProductInStoreSlaveId`,'' AS `sProductInStoreId`,0 AS `bSalesInvoiceComplete`,0 AS `bReceiptComplete`,0 AS `dCostPrice`,0 AS `dCostMoney`,0 AS `dMaterialsQty`,'' AS `sMaterialsStyle`,0 AS `dGiveQty`,0 AS `dPresentQty`,0 AS `dRemainderQty`,0 AS `dBackRemainderQty`,1 AS `iZeroCheck`,0 AS `dInvoiceQty` from `xlyweberp_saas_ai`.`cahcustomerinit` where (((abs(`xlyweberp_saas_ai`.`cahcustomerinit`.`dNoInvoiceMoney`) - abs(`xlyweberp_saas_ai`.`cahcustomerinit`.`dRealNoInvoiceMoney`)) > 0) and (`xlyweberp_saas_ai`.`cahcustomerinit`.`bInvoiceComplete` = 0)) union select `xlyweberp_saas_ai`.`cahfinancialadjust`.`sId` AS `sId`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMakePerson` AS `sMakePerson`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`iOrder` AS `iOrder`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sBillNo` AS `sBillNo`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sFamilyId` AS `sCustomerId`,'' AS `sContacts`,'' AS `sPhone`,'' AS `sSalesManId`,'' AS `sGetPayId`,NULL AS `tGetPayDate`,'' AS `sConsignee`,'' AS `sConsigneeMobile`,'' AS `sDeliverId`,'' AS `sProvince`,'' AS `sCity`,'' AS `sArea`,'' AS `sDeliverTo`,'' AS `sManualNo`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMemo` AS `sMemo`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`bCheck` AS `bCheck`,NULL AS `tCheckDate`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sCheckPerson` AS `sCheckPerson`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`bPrint` AS `bPrint`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`bCopyLimit` AS `bCopyLimit`,0 AS `dAdvanceMoney`,NULL AS `tAdvanceDate`,0 AS `dRealAdvanceMoney`,'' AS `sCurrency`,0 AS `dCurrencyRate`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sStatus` AS `sStatus`,'' AS `sInvoiceNo`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`bInvalid` AS `bInvalid`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMReserve1` AS `sMReserve1`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMReserve2` AS `sMReserve2`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMReserve3` AS `sMReserve3`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMReserve4` AS `sMReserve4`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMReserve5` AS `sMReserve5`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sMReserve6` AS `sMReserve6`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dMReserve1` AS `dMReserve1`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dMReserve2` AS `dMReserve2`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dMReserve3` AS `dMReserve3`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`iMReserve1` AS `iMReserve1`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`iMReserve2` AS `iMReserve2`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`iMReserve3` AS `iMReserve3`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`tMReserve1` AS `tMReserve1`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`tMReserve2` AS `tMReserve2`,0 AS `iVouchermark`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`iOrder` AS `iSlaveOrder`,' ' AS `sProductId`,1 AS `dProductQty`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dAdjustMoney` AS `dProductPrice`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dAdjustMoney` AS `dProductMoney`,'' AS `sSrcSlaveId`,'' AS `sSrcId`,'' AS `sSrcNo`,0 AS `dSrcQty`,0 AS `dSrcMoney`,0 AS `bInvoiceComplete`,'' AS `sSlaveMemo`,'' AS `sTaxId`,0 AS `dProductNoTaxPrice`,0 AS `dProductNoTaxMoney`,0 AS `dProductTaxMoney`,0 AS `dProductTaxForeignMoney`,0 AS `dProductForeignMoney`,0 AS `dProductForeignPrice`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dInvoiceMoney` AS `dInvoiceMoney`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`dReceiptMoney` AS `dReceiptMoney`,'' AS `sWebOrderNo`,'' AS `sWebOrderId`,'' AS `sOrderId`,'' AS `sOrderNo`,'' AS `sWorkOrderId`,'' AS `sWorkOrderNo`,0 AS `dLossQty`,0 AS `dLossMoney`,'' AS `sLossType`,'' AS `sBarcode`,'' AS `sCustomerOrderNo`,'' AS `sSReserve1`,'' AS `sSReserve2`,'' AS `sSReserve3`,'' AS `sSReserve4`,'' AS `sSReserve5`,'' AS `sSReserve6`,0 AS `dSReserve1`,0 AS `dSReserve2`,0 AS `dSReserve3`,0 AS `iSReserve1`,0 AS `iSReserve2`,0 AS `iSReserve3`,NULL AS `tSReserve1`,NULL AS `tSReserve2`,'' AS `sWorkOrderSlaveId`,'' AS `sOrderSlaveId`,`xlyweberp_saas_ai`.`cahfinancialadjust`.`iIncrement` AS `iIncrement`,'' AS `sSrcFormId`,'' AS `sDeliverGoodsNo`,'' AS `sDeliverGoodsSlaveId`,'' AS `sDeliverGoodsId`,'' AS `sDeliverNotifyNo`,'' AS `sDeliverNotifySlaveId`,'' AS `sDeliverNotifyId`,'' AS `sProductInStoreNo`,'' AS `sProductInStoreSlaveId`,'' AS `sProductInStoreId`,0 AS `bSalesInvoiceComplete`,0 AS `bReceiptComplete`,0 AS `dCostPrice`,0 AS `dCostMoney`,0 AS `dMaterialsQty`,'' AS `sMaterialsStyle`,0 AS `dGiveQty`,0 AS `dPresentQty`,0 AS `dRemainderQty`,0 AS `dBackRemainderQty`,1 AS `iZeroCheck`,0 AS `dInvoiceQty` from `xlyweberp_saas_ai`.`cahfinancialadjust` where ((`xlyweberp_saas_ai`.`cahfinancialadjust`.`sBillType` = 'saleMoney') and ((abs(`xlyweberp_saas_ai`.`cahfinancialadjust`.`dAdjustMoney`) - abs(`xlyweberp_saas_ai`.`cahfinancialadjust`.`dInvoiceMoney`)) > 0) and (`xlyweberp_saas_ai`.`cahfinancialadjust`.`bInvoiceComplete` = 0)) union select `xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sId` AS `sId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`tCreateDate` AS `tCreateDate`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMakePerson` AS `sMakePerson`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`iOrder` AS `iOrder`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sFormId` AS `sFormId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sBillNo` AS `sBillNo`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sCustomerId` AS `sCustomerId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sContacts` AS `sContacts`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sPhone` AS `sPhone`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sSalesManId` AS `sSalesManId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sGetPayId` AS `sGetPayId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`tGetPayDate` AS `tGetPayDate`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sConsignee` AS `sConsignee`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sConsigneeMobile` AS `sConsigneeMobile`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sDeliverId` AS `sDeliverId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sProvince` AS `sProvince`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sCity` AS `sCity`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sArea` AS `sArea`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sDeliverTo` AS `sDeliverTo`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sManualNo` AS `sManualNo`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMemo` AS `sMemo`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bCheck` AS `bCheck`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`tCheckDate` AS `tCheckDate`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sCheckPerson` AS `sCheckPerson`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bPrint` AS `bPrint`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bCopyLimit` AS `bCopyLimit`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dAdvanceMoney` AS `dAdvanceMoney`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`tAdvanceDate` AS `tAdvanceDate`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dRealAdvanceMoney` AS `dRealAdvanceMoney`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sCurrency` AS `sCurrency`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dCurrencyRate` AS `dCurrencyRate`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sStatus` AS `sStatus`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sInvoiceNo` AS `sInvoiceNo`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bInvalid` AS `bInvalid`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMReserve1` AS `sMReserve1`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMReserve2` AS `sMReserve2`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMReserve3` AS `sMReserve3`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMReserve4` AS `sMReserve4`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMReserve5` AS `sMReserve5`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sMReserve6` AS `sMReserve6`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dMReserve1` AS `dMReserve1`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dMReserve2` AS `dMReserve2`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dMReserve3` AS `dMReserve3`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`iMReserve1` AS `iMReserve1`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`iMReserve2` AS `iMReserve2`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`iMReserve3` AS `iMReserve3`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`tMReserve1` AS `tMReserve1`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`tMReserve2` AS `tMReserve2`,0 AS `iVouchermark`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`iOrder` AS `iSlaveOrder`,0 AS `sProductId`,0 AS `dProductQty`,0 AS `dProductPrice`,-(`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dAdvanceMoney`) AS `dProductMoney`,'' AS `sSrcSlaveId`,'' AS `sSrcId`,'' AS `sSrcNo`,0 AS `dSrcQty`,0 AS `dSrcMoney`,0 AS `bInvoiceComplete`,'' AS `sSlaveMemo`,(select `xlyweberp_saas_ai`.`elecustomer`.`sTaxId` from `xlyweberp_saas_ai`.`elecustomer` where (`xlyweberp_saas_ai`.`elecustomer`.`sId` = `xlyweberp_saas_ai`.`salsalesinvoicemaster`.`sCustomerId`)) AS `sTaxId`,0 AS `dProductNoTaxPrice`,-(`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dProductNoTaxMoney`) AS `dProductNoTaxMoney`,-(`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dProductTaxMoney`) AS `dProductTaxMoney`,0 AS `dProductTaxForeignMoney`,0 AS `dProductForeignMoney`,0 AS `dProductForeignPrice`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dInvoiceMoney` AS `dInvoiceMoney`,0 AS `dReceiptMoney`,'' AS `sWebOrderNo`,'' AS `sWebOrderId`,'' AS `sOrderId`,'' AS `sOrderNo`,'' AS `sWorkOrderId`,'' AS `sWorkOrderNo`,0 AS `dLossQty`,0 AS `dLossMoney`,'' AS `sLossType`,'' AS `sBarcode`,'' AS `sCustomerOrderNo`,'' AS `sSReserve1`,'' AS `sSReserve2`,'' AS `sSReserve3`,'' AS `sSReserve4`,'' AS `sSReserve5`,'' AS `sSReserve6`,0 AS `dSReserve1`,0 AS `dSReserve2`,0 AS `dSReserve3`,0 AS `iSReserve1`,0 AS `iSReserve2`,0 AS `iSReserve3`,NULL AS `tSReserve1`,NULL AS `tSReserve2`,'' AS `sWorkOrderSlaveId`,'' AS `sOrderSlaveId`,`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`iIncrement` AS `iIncrement`,'' AS `sSrcFormId`,'' AS `sDeliverGoodsNo`,'' AS `sDeliverGoodsSlaveId`,'' AS `sDeliverGoodsId`,'' AS `sDeliverNotifyNo`,'' AS `sDeliverNotifySlaveId`,'' AS `sDeliverNotifyId`,'' AS `sProductInStoreNo`,'' AS `sProductInStoreSlaveId`,'' AS `sProductInStoreId`,0 AS `bSalesInvoiceComplete`,0 AS `bReceiptComplete`,0 AS `dCostPrice`,0 AS `dCostMoney`,0 AS `dMaterialsQty`,'' AS `sMaterialsStyle`,0 AS `dGiveQty`,0 AS `dPresentQty`,0 AS `dRemainderQty`,0 AS `dBackRemainderQty`,1 AS `iZeroCheck`,0 AS `dInvoiceQty` from `xlyweberp_saas_ai`.`salsalesinvoicemaster` where ((((abs(`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dAdvanceMoney`) - abs(`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dRealAdvanceMoney`)) > 0) or (`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`dAdvanceMoney` = 0)) and (`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bInvoiceComplete` = 0) and (`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bAdvance` = 1) and (`xlyweberp_saas_ai`.`salsalesinvoicemaster`.`bCheck` = 1))
```

## 说明

_暂无人工说明。_
