# `viw_logisticsorderdetails` (view)


- **Updatable:** YES

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `iIncrement` | `int` | NO |
| 2 | `sId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `tCreateDate` | `datetime` | NO |
| 6 | `sMakePerson` | `varchar(255)` | NO |
| 7 | `iOrder` | `int` | NO |
| 8 | `sFormId` | `varchar(100)` | NO |
| 9 | `sBillNo` | `varchar(255)` | NO |
| 10 | `bCheck` | `bit(1)` | NO |
| 11 | `tCheckDate` | `datetime` | YES |
| 12 | `sMemo` | `text` | YES |
| 13 | `sCheckPerson` | `varchar(255)` | YES |
| 14 | `bPrint` | `bit(1)` | NO |
| 15 | `sStatus` | `varchar(255)` | YES |
| 16 | `bInvalid` | `bit(1)` | NO |
| 17 | `sSlaveId` | `varchar(100)` | NO |
| 18 | `sParentId` | `varchar(100)` | NO |
| 19 | `sSupplyId` | `varchar(100)` | NO |
| 20 | `sLogType` | `varchar(100)` | YES |
| 21 | `sSrcSlaveId` | `varchar(100)` | NO |
| 22 | `sSrcId` | `varchar(100)` | NO |
| 23 | `sSrcNo` | `varchar(255)` | NO |
| 24 | `sTaxId` | `varchar(100)` | YES |
| 25 | `dProductQty` | `decimal(18,6)` | YES |
| 26 | `dProductPrice` | `decimal(19,6)` | YES |
| 27 | `dProductMoney` | `decimal(19,6)` | YES |
| 28 | `dProductNoTaxPrice` | `decimal(26,2)` | YES |
| 29 | `dProductNoTaxMoney` | `decimal(26,2)` | YES |
| 30 | `dProductTaxMoney` | `decimal(38,2)` | YES |
| 31 | `dProductForeignMoney` | `decimal(19,6)` | YES |
| 32 | `dProductTaxForeignMoney` | `decimal(26,2)` | YES |
| 33 | `dNProductPrice` | `decimal(26,2)` | YES |
| 34 | `dNProductMoney` | `decimal(19,6)` | YES |
| 35 | `dProductForeignPrice` | `decimal(19,6)` | YES |
| 36 | `bCheckingComplete` | `bit(1)` | YES |
| 37 | `dCheckingProductMoney` | `decimal(18,6)` | YES |
| 38 | `sGetPayId` | `varchar(50)` | YES |
| 39 | `tGetPayDate` | `datetime` | YES |
| 40 | `sSlaveMemo` | `text` | YES |
| 41 | `dSrcProductMoney` | `decimal(18,6)` | YES |
| 42 | `tCheckListDate` | `datetime` | YES |
| 43 | `sCarNo` | `varchar(255)` | YES |
| 44 | `sTon` | `varchar(255)` | YES |
| 45 | `sCity` | `varchar(255)` | YES |
| 46 | `iLogType` | `int` | YES |
| 47 | `tDispatchDate` | `datetime` | YES |

## Definition

```sql
select `logisticsordermaster`.`iIncrement` AS `iIncrement`,`logisticsordermaster`.`sId` AS `sId`,`logisticsordermaster`.`sBrandsId` AS `sBrandsId`,`logisticsordermaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`logisticsordermaster`.`tCreateDate` AS `tCreateDate`,`logisticsordermaster`.`sMakePerson` AS `sMakePerson`,`logisticsordermaster`.`iOrder` AS `iOrder`,`logisticsordermaster`.`sFormId` AS `sFormId`,`logisticsordermaster`.`sBillNo` AS `sBillNo`,`logisticsordermaster`.`bCheck` AS `bCheck`,`logisticsordermaster`.`tCheckDate` AS `tCheckDate`,`logisticsordermaster`.`sMemo` AS `sMemo`,`logisticsordermaster`.`sCheckPerson` AS `sCheckPerson`,`logisticsordermaster`.`bPrint` AS `bPrint`,`logisticsordermaster`.`sStatus` AS `sStatus`,`logisticsordermaster`.`bInvalid` AS `bInvalid`,`logisticsorderdetails`.`sId` AS `sSlaveId`,`logisticsorderdetails`.`sParentId` AS `sParentId`,`logisticsorderdetails`.`sSupplyId` AS `sSupplyId`,`logisticsorderdetails`.`sLogType` AS `sLogType`,`logisticsorderdetails`.`sSrcSlaveId` AS `sSrcSlaveId`,`logisticsorderdetails`.`sSrcId` AS `sSrcId`,`logisticsorderdetails`.`sSrcNo` AS `sSrcNo`,`logisticsorderdetails`.`sTaxId` AS `sTaxId`,`logisticsorderdetails`.`dProductQty` AS `dProductQty`,(`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) AS `dProductPrice`,(`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) AS `dProductMoney`,round(((`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) / (1 + (`sistax`.`dRate` / 100))),2) AS `dProductNoTaxPrice`,round(((`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) / (1 + (`sistax`.`dRate` / 100))),2) AS `dProductNoTaxMoney`,round((((`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) / (1 + (`sistax`.`dRate` / 100))) * (`sistax`.`dRate` / 100)),2) AS `dProductTaxMoney`,(`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) AS `dProductForeignMoney`,round(((`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) / (1 + (`sistax`.`dRate` / 100))),2) AS `dProductTaxForeignMoney`,round(((`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) / (1 + (`sistax`.`dRate` / 100))),2) AS `dNProductPrice`,(`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) AS `dNProductMoney`,(`logisticsorderdetails`.`dProductMoney` - `logisticsorderdetails`.`dCheckingProductMoney`) AS `dProductForeignPrice`,`logisticsorderdetails`.`bCheckingComplete` AS `bCheckingComplete`,`logisticsorderdetails`.`dCheckingProductMoney` AS `dCheckingProductMoney`,`logisticsorderdetails`.`sGetPayId` AS `sGetPayId`,`logisticsorderdetails`.`tGetPayDate` AS `tGetPayDate`,`logisticsorderdetails`.`sSlaveMemo` AS `sSlaveMemo`,`logisticsorderdetails`.`dProductMoney` AS `dSrcProductMoney`,if((`logisticsordermaster`.`tCheckDate` < cast(concat(date_format(`logisticsordermaster`.`tCheckDate`,'%Y-%m-'),ifnull(`elesupply`.`iCheckDate`,25)) as datetime)),cast(concat(date_format(`logisticsordermaster`.`tCheckDate`,'%Y-%m-'),ifnull(`elesupply`.`iCheckDate`,25)) as datetime),(cast(concat(date_format(`logisticsordermaster`.`tCheckDate`,'%Y-%m-'),ifnull(`elesupply`.`iCheckDate`,25)) as datetime) + interval 1 month)) AS `tCheckListDate`,`logisticsorderdetails`.`sCarNo` AS `sCarNo`,`logisticsorderdetails`.`sTon` AS `sTon`,`logisticsorderdetails`.`sCity` AS `sCity`,`logisticsordermaster`.`iLogType` AS `iLogType`,`logisticsordermaster`.`tDispatchDate` AS `tDispatchDate` from (((`logisticsordermaster` join `logisticsorderdetails` on((`logisticsordermaster`.`sId` = `logisticsorderdetails`.`sParentId`))) join `elesupply` on((`elesupply`.`sId` = `logisticsorderdetails`.`sSupplyId`))) join `sistax` on((`sistax`.`sId` = `logisticsorderdetails`.`sTaxId`))) where (`logisticsorderdetails`.`dProductMoney` > 0)
```

## Narrative

_No human-written narrative yet._
