# `viw_noinvoice` (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 | `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(18,6)` | NO |
| 57 | `dProductMoney` | `decimal(18,6)` | NO |
| 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(18,6)` | YES |
| 68 | `dProductTaxMoney` | `decimal(18,6)` | YES |
| 69 | `dProductTaxForeignMoney` | `decimal(18,6)` | YES |
| 70 | `dProductForeignMoney` | `decimal(18,6)` | YES |
| 71 | `dInvoiceMoney` | `decimal(18,6)` | NO |
| 72 | `dReceiptMoney` | `decimal(18,6)` | NO |
| 73 | `sWebOrderNo` | `varchar(255)` | NO |
| 74 | `sWebOrderId` | `varchar(100)` | NO |
| 75 | `sOrderId` | `varchar(100)` | NO |
| 76 | `sOrderNo` | `varchar(255)` | NO |
| 77 | `sWorkOrderId` | `varchar(100)` | NO |
| 78 | `sWorkOrderNo` | `varchar(255)` | NO |
| 79 | `dLossQty` | `decimal(18,6)` | NO |
| 80 | `dLossMoney` | `decimal(18,6)` | YES |
| 81 | `sLossType` | `varchar(255)` | YES |
| 82 | `sBarcode` | `varchar(255)` | YES |
| 83 | `sCustomerOrderNo` | `varchar(255)` | YES |
| 84 | `sSReserve1` | `varchar(255)` | YES |
| 85 | `sSReserve2` | `varchar(255)` | YES |
| 86 | `sSReserve3` | `varchar(255)` | YES |
| 87 | `sSReserve4` | `varchar(255)` | YES |
| 88 | `sSReserve5` | `varchar(255)` | YES |
| 89 | `sSReserve6` | `varchar(255)` | YES |
| 90 | `dSReserve1` | `decimal(18,6)` | YES |
| 91 | `dSReserve2` | `decimal(18,6)` | YES |
| 92 | `dSReserve3` | `decimal(18,6)` | YES |
| 93 | `iSReserve1` | `bigint` | YES |
| 94 | `iSReserve2` | `bigint` | YES |
| 95 | `iSReserve3` | `bigint` | YES |
| 96 | `tSReserve1` | `datetime` | YES |
| 97 | `tSReserve2` | `datetime` | YES |
| 98 | `sWorkOrderSlaveId` | `varchar(100)` | NO |
| 99 | `sOrderSlaveId` | `varchar(100)` | NO |
| 100 | `iIncrement` | `int` | NO |
| 101 | `sSrcFormId` | `varchar(100)` | NO |
| 102 | `sDeliverGoodsNo` | `varchar(255)` | NO |
| 103 | `sDeliverGoodsSlaveId` | `varchar(100)` | NO |
| 104 | `sDeliverGoodsId` | `varchar(100)` | NO |
| 105 | `sDeliverNotifyNo` | `varchar(255)` | NO |
| 106 | `sDeliverNotifySlaveId` | `varchar(100)` | NO |
| 107 | `sDeliverNotifyId` | `varchar(100)` | NO |
| 108 | `sProductInStoreNo` | `varchar(255)` | NO |
| 109 | `sProductInStoreSlaveId` | `varchar(100)` | NO |
| 110 | `sProductInStoreId` | `varchar(100)` | NO |
| 111 | `bSalesInvoiceComplete` | `decimal(1,0)` | NO |
| 112 | `bReceiptComplete` | `decimal(1,0)` | NO |
| 113 | `dCostPrice` | `decimal(18,6)` | NO |
| 114 | `dCostMoney` | `decimal(18,6)` | NO |

## Definition

```sql
select `salsalescheckingmaster`.`sId` AS `sId`,`salsalescheckingmaster`.`sBrandsId` AS `sBrandsId`,`salsalescheckingmaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`salsalescheckingmaster`.`tCreateDate` AS `tCreateDate`,`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`,`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`,`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` from (`salsalescheckingmaster` join `salsalescheckingslave` on((`salsalescheckingslave`.`sParentId` = `salsalescheckingmaster`.`sId`))) where ((`salsalescheckingmaster`.`bCheck` = 1) and ((ifnull(`salsalescheckingslave`.`dProductMoney`,0) - ifnull(`salsalescheckingslave`.`dInvoiceMoney`,0)) > 0) and (`salsalescheckingslave`.`bInvoiceComplete` = 0) and (`salsalescheckingslave`.`bSalesInvoiceComplete` = 0)) union select `cahsupplyinit`.`sId` AS `sId`,`cahsupplyinit`.`sBrandsId` AS `sBrandsId`,`cahsupplyinit`.`sSubsidiaryId` AS `sSubsidiaryId`,`cahsupplyinit`.`tCreateDate` AS `tCreateDate`,`cahsupplyinit`.`sMakePerson` AS `sMakePerson`,`cahsupplyinit`.`iOrder` AS `iOrder`,'InvoiceInit' AS `sFormId`,'' AS `sBillNo`,'' AS `sCustomerId`,'' AS `sContacts`,'' AS `sPhone`,'' AS `sSalesManId`,`cahsupplyinit`.`sGetPayId` AS `sGetPayId`,NULL AS `tGetPayDate`,'' AS `sConsignee`,'' AS `sConsigneeMobile`,'' AS `sDeliverId`,'' AS `sProvince`,'' AS `sCity`,'' AS `sArea`,'' AS `sDeliverTo`,'' AS `sManualNo`,`cahsupplyinit`.`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`,`cahsupplyinit`.`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`,`cahsupplyinit`.`sId` AS `sSlaveId`,`cahsupplyinit`.`iOrder` AS `iSlaveOrder`,'' AS `sProductId`,0 AS `dProductQty`,0 AS `dProductPrice`,-(`cahsupplyinit`.`dNoInvoiceMoney`) AS `dProductMoney`,'' AS `sSrcSlaveId`,'' AS `sSrcId`,'' AS `sSrcNo`,0 AS `dSrcQty`,0 AS `dSrcMoney`,0 AS `bInvoiceComplete`,'' AS `sSlaveMemo`,`cahsupplyinit`.`sTaxId` AS `sTaxId`,0 AS `dProductNoTaxPrice`,0 AS `dProductNoTaxMoney`,0 AS `dProductTaxMoney`,0 AS `dProductTaxForeignMoney`,0 AS `dProductForeignMoney`,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`,`cahsupplyinit`.`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` from `cahsupplyinit` where (((`cahsupplyinit`.`dNoInvoiceMoney` - `cahsupplyinit`.`dRealNoInvoiceMoney`) > 0) and (`cahsupplyinit`.`bInvoiceComplete` = 0)) union select `cahfinancialadjust`.`sId` AS `sId`,`cahfinancialadjust`.`sBrandsId` AS `sBrandsId`,`cahfinancialadjust`.`sSubsidiaryId` AS `sSubsidiaryId`,`cahfinancialadjust`.`tCreateDate` AS `tCreateDate`,`cahfinancialadjust`.`sMakePerson` AS `sMakePerson`,`cahfinancialadjust`.`iOrder` AS `iOrder`,'FinancialAdjust' AS `sFormId`,`cahfinancialadjust`.`sBillNo` AS `sBillNo`,'' 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`,`cahfinancialadjust`.`sMemo` AS `sMemo`,`cahfinancialadjust`.`bCheck` AS `bCheck`,NULL AS `tCheckDate`,`cahfinancialadjust`.`sCheckPerson` AS `sCheckPerson`,`cahfinancialadjust`.`bPrint` AS `bPrint`,`cahfinancialadjust`.`bCopyLimit` AS `bCopyLimit`,0 AS `dAdvanceMoney`,NULL AS `tAdvanceDate`,0 AS `dRealAdvanceMoney`,'' AS `sCurrency`,0 AS `dCurrencyRate`,`cahfinancialadjust`.`sStatus` AS `sStatus`,'' AS `sInvoiceNo`,`cahfinancialadjust`.`bInvalid` AS `bInvalid`,`cahfinancialadjust`.`sMReserve1` AS `sMReserve1`,`cahfinancialadjust`.`sMReserve2` AS `sMReserve2`,`cahfinancialadjust`.`sMReserve3` AS `sMReserve3`,`cahfinancialadjust`.`sMReserve4` AS `sMReserve4`,`cahfinancialadjust`.`sMReserve5` AS `sMReserve5`,`cahfinancialadjust`.`sMReserve6` AS `sMReserve6`,`cahfinancialadjust`.`dMReserve1` AS `dMReserve1`,`cahfinancialadjust`.`dMReserve2` AS `dMReserve2`,`cahfinancialadjust`.`dMReserve3` AS `dMReserve3`,`cahfinancialadjust`.`iMReserve1` AS `iMReserve1`,`cahfinancialadjust`.`iMReserve2` AS `iMReserve2`,`cahfinancialadjust`.`iMReserve3` AS `iMReserve3`,`cahfinancialadjust`.`tMReserve1` AS `tMReserve1`,`cahfinancialadjust`.`tMReserve2` AS `tMReserve2`,0 AS `iVouchermark`,`cahfinancialadjust`.`sId` AS `sSlaveId`,`cahfinancialadjust`.`iOrder` AS `iSlaveOrder`,'' AS `sProductId`,0 AS `dProductQty`,0 AS `dProductPrice`,-(`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 `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`,`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` from `cahfinancialadjust` where (((`cahfinancialadjust`.`dAdjustMoney` - `cahfinancialadjust`.`dInvoiceMoney`) > 0) and (`cahfinancialadjust`.`bInvoiceComplete` = 0)) union select `salsalesinvoicemaster`.`sId` AS `sId`,`salsalesinvoicemaster`.`sBrandsId` AS `sBrandsId`,`salsalesinvoicemaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`salsalesinvoicemaster`.`tCreateDate` AS `tCreateDate`,`salsalesinvoicemaster`.`sMakePerson` AS `sMakePerson`,`salsalesinvoicemaster`.`iOrder` AS `iOrder`,`salsalesinvoicemaster`.`sFormId` AS `sFormId`,`salsalesinvoicemaster`.`sBillNo` AS `sBillNo`,`salsalesinvoicemaster`.`sCustomerId` AS `sCustomerId`,`salsalesinvoicemaster`.`sContacts` AS `sContacts`,`salsalesinvoicemaster`.`sPhone` AS `sPhone`,`salsalesinvoicemaster`.`sSalesManId` AS `sSalesManId`,`salsalesinvoicemaster`.`sGetPayId` AS `sGetPayId`,`salsalesinvoicemaster`.`tGetPayDate` AS `tGetPayDate`,`salsalesinvoicemaster`.`sConsignee` AS `sConsignee`,`salsalesinvoicemaster`.`sConsigneeMobile` AS `sConsigneeMobile`,`salsalesinvoicemaster`.`sDeliverId` AS `sDeliverId`,`salsalesinvoicemaster`.`sProvince` AS `sProvince`,`salsalesinvoicemaster`.`sCity` AS `sCity`,`salsalesinvoicemaster`.`sArea` AS `sArea`,`salsalesinvoicemaster`.`sDeliverTo` AS `sDeliverTo`,`salsalesinvoicemaster`.`sManualNo` AS `sManualNo`,`salsalesinvoicemaster`.`sMemo` AS `sMemo`,`salsalesinvoicemaster`.`bCheck` AS `bCheck`,`salsalesinvoicemaster`.`tCheckDate` AS `tCheckDate`,`salsalesinvoicemaster`.`sCheckPerson` AS `sCheckPerson`,`salsalesinvoicemaster`.`bPrint` AS `bPrint`,`salsalesinvoicemaster`.`bCopyLimit` AS `bCopyLimit`,`salsalesinvoicemaster`.`dAdvanceMoney` AS `dAdvanceMoney`,`salsalesinvoicemaster`.`tAdvanceDate` AS `tAdvanceDate`,`salsalesinvoicemaster`.`dRealAdvanceMoney` AS `dRealAdvanceMoney`,`salsalesinvoicemaster`.`sCurrency` AS `sCurrency`,`salsalesinvoicemaster`.`dCurrencyRate` AS `dCurrencyRate`,`salsalesinvoicemaster`.`sStatus` AS `sStatus`,`salsalesinvoicemaster`.`sInvoiceNo` AS `sInvoiceNo`,`salsalesinvoicemaster`.`bInvalid` AS `bInvalid`,`salsalesinvoicemaster`.`sMReserve1` AS `sMReserve1`,`salsalesinvoicemaster`.`sMReserve2` AS `sMReserve2`,`salsalesinvoicemaster`.`sMReserve3` AS `sMReserve3`,`salsalesinvoicemaster`.`sMReserve4` AS `sMReserve4`,`salsalesinvoicemaster`.`sMReserve5` AS `sMReserve5`,`salsalesinvoicemaster`.`sMReserve6` AS `sMReserve6`,`salsalesinvoicemaster`.`dMReserve1` AS `dMReserve1`,`salsalesinvoicemaster`.`dMReserve2` AS `dMReserve2`,`salsalesinvoicemaster`.`dMReserve3` AS `dMReserve3`,`salsalesinvoicemaster`.`iMReserve1` AS `iMReserve1`,`salsalesinvoicemaster`.`iMReserve2` AS `iMReserve2`,`salsalesinvoicemaster`.`iMReserve3` AS `iMReserve3`,`salsalesinvoicemaster`.`tMReserve1` AS `tMReserve1`,`salsalesinvoicemaster`.`tMReserve2` AS `tMReserve2`,0 AS `iVouchermark`,`salsalesinvoicemaster`.`sId` AS `sSlaveId`,`salsalesinvoicemaster`.`iOrder` AS `iSlaveOrder`,0 AS `sProductId`,0 AS `dProductQty`,0 AS `dProductPrice`,-(`salsalesinvoicemaster`.`dAdvanceMoney`) 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 `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`,`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` from `salsalesinvoicemaster` where (((`salsalesinvoicemaster`.`dAdvanceMoney` - `salsalesinvoicemaster`.`dRealAdvanceMoney`) > 0) and (`salsalesinvoicemaster`.`bInvoiceComplete` = 0))
```

## Narrative

_No human-written narrative yet._
