SALESORDERINCOME.QVW
//销售订单
SALESORDER_BASE_TMP:
NoConcatenate
LOAD T_SAL_ORDER.LE_ID,
[T_SAL_ORDER.LCY CODE],
T_SAL_ORDER.SYSTEM,
T_SAL_ORDER.#DataDateTime,
T_SAL_ORDER.#DataDate,
T_SAL_ORDER.FID AS FID,
T_SAL_ORDER.FBILLNO AS SALES_INCOMING.process_id,
T_SAL_ORDER.FCUSTID AS FCUSTID,
date(num#(T_SAL_ORDER.FCREATEDATE, '#.##0,0', ',', '.')) AS SALES_INCOMING.date, //美国格式
date(num#(T_SAL_ORDER.FAPPROVEDATE,'#.##0,0', ',', '.')) AS SALES_INCOMING.DateFirstOrderConfirmation,
T_SAL_ORDER.FSALERID AS FSALERID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDER.qvd]
(qvd);
Inner JOIN
LOAD T_SAL_ORDERENTRY.LE_ID,
[T_SAL_ORDERENTRY.LCY CODE],
T_SAL_ORDERENTRY.SYSTEM,
T_SAL_ORDERENTRY.#DataDateTime,
T_SAL_ORDERENTRY.#DataDate,
T_SAL_ORDERENTRY.FMATERIALID AS FMATERIALID,
T_SAL_ORDERENTRY.FID AS FID,
T_SAL_ORDERENTRY.FENTRYID AS FENTRYID,
T_SAL_ORDERENTRY.FSEQ AS SALES_INCOMING.process_pos_nr,
T_SAL_ORDERENTRY.FQTY AS SALES_INCOMING.qty,
num#(T_SAL_ORDERENTRY.FZQTAXAMOUNT, '####,##', ',', '.') AS FZQTAXAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDERENTRY.qvd]
(qvd);
inner join
LOAD T_SAL_ORDERENTRY_F.LE_ID,
[T_SAL_ORDERENTRY_F.LCY CODE],
T_SAL_ORDERENTRY_F.SYSTEM,
T_SAL_ORDERENTRY_F.#DataDateTime,
T_SAL_ORDERENTRY_F.#DataDate,
T_SAL_ORDERENTRY_F.FID AS FID,
T_SAL_ORDERENTRY_F.FENTRYID AS FENTRYID,
T_SAL_ORDERENTRY_F.FAMOUNT AS SALES_INCOMING.Original.Amount_1,
T_SAL_ORDERENTRY_F.FAMOUNT_LC AS SALES_INCOMING.amount_1,
T_SAL_ORDERENTRY_F.FALLAMOUNT,
T_SAL_ORDERENTRY_F.FALLAMOUNT_LC
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDERENTRY_F.qvd]
(qvd);
//销售订单
SALESORDER_TMP:
load
SALES_INCOMING.process_id,
FMATERIALID,
FCUSTID,
FSALERID,
FID,
sum( num#(SALES_INCOMING.Original.Amount_1, '####,##', ',', '.')) AS SALES_INCOMING.Original.Amount,
SUM(num#(SALES_INCOMING.amount_1, '####,##', ',', '.')) AS SALES_INCOMING.amount
RESIDENT SALESORDER_BASE_TMP
Group By
SALES_INCOMING.process_id,
FMATERIALID,
FCUSTID,
FSALERID,
FID;
Inner JOIN
LOAD T_BD_CUSTOMER.LE_ID,
[T_BD_CUSTOMER.LCY CODE],
T_BD_CUSTOMER.SYSTEM,
T_BD_CUSTOMER.#DataDateTime,
T_BD_CUSTOMER.#DataDate,
T_BD_CUSTOMER.FCUSTID AS FCUSTID,
T_BD_CUSTOMER.FPROVINCIAL AS FPROVINCIAL,
T_BD_CUSTOMER.FNUMBER AS SALES_INCOMING.customer.id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_CUSTOMER.qvd]
(qvd);
Inner Join
LOAD T_BAS_ASSISTANTDATAENTRY.LE_ID,
[T_BAS_ASSISTANTDATAENTRY.LCY CODE],
T_BAS_ASSISTANTDATAENTRY.SYSTEM,
T_BAS_ASSISTANTDATAENTRY.#DataDateTime,
T_BAS_ASSISTANTDATAENTRY.#DataDate,
T_BAS_ASSISTANTDATAENTRY.FENTRYID AS FPROVINCIAL,
T_BAS_ASSISTANTDATAENTRY.F_LHLRZX AS F_LHLRZX
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BAS_ASSISTANTDATAENTRY.qvd]
(qvd);
Inner Join
LOAD PBNQ_t_Cust100019.LE_ID,
[PBNQ_t_Cust100019.LCY CODE],
PBNQ_t_Cust100019.SYSTEM,
PBNQ_t_Cust100019.#DataDateTime,
PBNQ_t_Cust100019.#DataDate,
PBNQ_t_Cust100019.FID AS F_LHLRZX,
PBNQ_t_Cust100019.FNUMBER AS SALES_INCOMING.PC
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\PBNQ_t_Cust100019.qvd]
(qvd);
Inner JOIN
LOAD T_BD_OPERATORENTRY.LE_ID,
[T_BD_OPERATORENTRY.LCY CODE],
T_BD_OPERATORENTRY.SYSTEM,
T_BD_OPERATORENTRY.#DataDateTime,
T_BD_OPERATORENTRY.#DataDate,
T_BD_OPERATORENTRY.FENTRYID AS FSALERID,
T_BD_OPERATORENTRY.FSTAFFID AS SALES_INCOMING.sales.representative.Code
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_OPERATORENTRY.qvd]
(qvd);
Inner JOIN
LOAD T_BD_STAFF_L.LE_ID,
[T_BD_STAFF_L.LCY CODE],
T_BD_STAFF_L.SYSTEM,
T_BD_STAFF_L.#DataDateTime,
T_BD_STAFF_L.#DataDate,
T_BD_STAFF_L.FSTAFFID AS SALES_INCOMING.sales.representative.Code,
T_BD_STAFF_L.FNAME AS SALES_INCOMING.sales.representative_id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_STAFF_L.qvd]
(qvd);
inner JOIN
LOAD T_BD_MATERIAL.LE_ID,
[T_BD_MATERIAL.LCY CODE],
T_BD_MATERIAL.SYSTEM,
T_BD_MATERIAL.#DataDateTime,
T_BD_MATERIAL.#DataDate,
T_BD_MATERIAL.FMATERIALID AS FMATERIALID,
T_BD_MATERIAL.FNUMBER AS SALES_INCOMING.article.id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_MATERIAL.qvd]
(qvd);
inner JOIN
LOAD T_SAL_ORDERFIN.LE_ID,
[T_SAL_ORDERFIN.LCY CODE],
T_SAL_ORDERFIN.SYSTEM,
T_SAL_ORDERFIN.#DataDateTime,
T_SAL_ORDERFIN.#DataDate,
T_SAL_ORDERFIN.FID AS FID,
T_SAL_ORDERFIN.FSETTLECURRID AS FCURRENCYID,
T_SAL_ORDERFIN.FExchangeRate AS FExchangeRate,
T_SAL_ORDERFIN.FBILLALLAMOUNT ,
T_SAL_ORDERFIN.FBILLALLAMOUNT_LC
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_ORDERFIN.qvd]
(qvd);
inner Join
LOAD T_BD_CURRENCY.LE_ID,
[T_BD_CURRENCY.LCY CODE],
T_BD_CURRENCY.SYSTEM,
T_BD_CURRENCY.#DataDateTime,
T_BD_CURRENCY.#DataDate,
T_BD_CURRENCY.FCURRENCYID AS FCURRENCYID,
T_BD_CURRENCY.FNUMBER AS SALES_INCOMING.currency,
T_BD_CURRENCY.FCODE AS SALES_INCOMING.Original.Currency.Code
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_BD_CURRENCY.qvd]
(qvd);
//销售出库单
OUTSTOCK_TMP:
NoConcatenate
LOAD T_SAL_OUTSTOCK.LE_ID,
[T_SAL_OUTSTOCK.LCY CODE],
T_SAL_OUTSTOCK.SYSTEM,
T_SAL_OUTSTOCK.#DataDateTime,
T_SAL_OUTSTOCK.#DataDate,
T_SAL_OUTSTOCK.FID AS FOUTSTOCKID,
T_SAL_OUTSTOCK.FBILLNO,
T_SAL_OUTSTOCK.FDOCUMENTSTATUS
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCK.qvd]
(qvd);
Inner Join
LOAD T_SAL_OUTSTOCKENTRY.LE_ID,
[T_SAL_OUTSTOCKENTRY.LCY CODE],
T_SAL_OUTSTOCKENTRY.SYSTEM,
T_SAL_OUTSTOCKENTRY.#DataDateTime,
T_SAL_OUTSTOCKENTRY.#DataDate,
T_SAL_OUTSTOCKENTRY.FID AS FOUTSTOCKID,
T_SAL_OUTSTOCKENTRY.FENTRYID AS FSTOCKENTRYID,
T_SAL_OUTSTOCKENTRY.FMATERIALID AS FMATERIALID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCKENTRY.qvd]
(qvd);
Inner Join
LOAD T_SAL_OUTSTOCKENTRY_F.LE_ID,
[T_SAL_OUTSTOCKENTRY_F.LCY CODE],
T_SAL_OUTSTOCKENTRY_F.SYSTEM,
T_SAL_OUTSTOCKENTRY_F.#DataDateTime,
T_SAL_OUTSTOCKENTRY_F.#DataDate,
T_SAL_OUTSTOCKENTRY_F.FENTRYID AS FSTOCKENTRYID,
T_SAL_OUTSTOCKENTRY_F.FCOSTPRICE AS FCOSTPRICE,
T_SAL_OUTSTOCKENTRY_F.FCOSTAMOUNT AS FCOSTAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCKENTRY_F.qvd]
(qvd);
Inner Join
LOAD T_SAL_OUTSTOCKENTRY_R.LE_ID,
[T_SAL_OUTSTOCKENTRY_R.LCY CODE],
T_SAL_OUTSTOCKENTRY_R.SYSTEM,
T_SAL_OUTSTOCKENTRY_R.#DataDateTime,
T_SAL_OUTSTOCKENTRY_R.#DataDate,
T_SAL_OUTSTOCKENTRY_R.FENTRYID AS FSTOCKENTRYID,
T_SAL_OUTSTOCKENTRY_R.FSOORDERNO AS SALES_INCOMING.process_id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_SAL_OUTSTOCKENTRY_R.qvd]
(qvd);
//发票
INVOICE_TMP:
NoConcatenate
LOAD T_AR_RECEIVABLEENTRY_LK_CW.LE_ID,
[T_AR_RECEIVABLEENTRY_LK_CW.LCY CODE],
T_AR_RECEIVABLEENTRY_LK_CW.SYSTEM,
T_AR_RECEIVABLEENTRY_LK_CW.#DataDateTime,
T_AR_RECEIVABLEENTRY_LK_CW.#DataDate,
T_AR_RECEIVABLEENTRY_LK_CW.FSID AS FZGENTRYID,
T_AR_RECEIVABLEENTRY_LK_CW.FENTRYID AS FCWENTRYID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLEENTRY_LK_CW.qvd]
(qvd);
Inner Join
//LOAD T_AR_RECEIVABLEENTRY_CW.LE_ID,
// [T_AR_RECEIVABLEENTRY_CW.LCY CODE],
// T_AR_RECEIVABLEENTRY_CW.SYSTEM,
// T_AR_RECEIVABLEENTRY_CW.#DataDateTime,
// T_AR_RECEIVABLEENTRY_CW.#DataDate,
// T_AR_RECEIVABLEENTRY_CW.FID AS FCWID,
// T_AR_RECEIVABLEENTRY_CW.FENTRYID AS FCWENTRYID,
// T_AR_RECEIVABLEENTRY_CW.FMATERIALID AS FMATERIALID,
// T_AR_RECEIVABLEENTRY_CW.FORDERNUMBER AS SALES_INCOMING.process_id,
// num#(T_AR_RECEIVABLEENTRY_CW.FALLAMOUNTFOR, '####,##', ',', '.') AS INVOICEFALLAMOUNT,
// //折扣金额
// num#(T_AR_RECEIVABLEENTRY_CW.FSPLITAMOUNT, '####,##', ',', '.') AS INVOICEFSPLITAMOUNT,
// num#(T_AR_RECEIVABLEENTRY_CW.FPRICEQTY, '####,##', ',', '.') AS FCWSL
//
//FROM
//[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLEENTRY_CW.qvd]
//(qvd);
LOAD T_AR_RECEIVABLEENTRY_CW.LE_ID,
[T_AR_RECEIVABLEENTRY_CW.LCY CODE],
T_AR_RECEIVABLEENTRY_CW.SYSTEM,
T_AR_RECEIVABLEENTRY_CW.#DataDateTime,
T_AR_RECEIVABLEENTRY_CW.#DataDate,
T_AR_RECEIVABLEENTRY_CW.FID AS FCWID,
T_AR_RECEIVABLEENTRY_CW.FENTRYID AS FCWENTRYID,
T_AR_RECEIVABLEENTRY_CW.FPRICEQTY,
T_AR_RECEIVABLEENTRY_CW.FALLAMOUNTFOR,
T_AR_RECEIVABLEENTRY_CW.FORDERNUMBER AS SALES_INCOMING.process_id,
T_AR_RECEIVABLEENTRY_CW.FMATERIALID AS FMATERIALID,
T_AR_RECEIVABLEENTRY_CW.FALLAMOUNT,
T_AR_RECEIVABLEENTRY_CW.FNOTAXAMOUNTFOR AS FNOTAXAMOUNTFOR,
T_AR_RECEIVABLEENTRY_CW.FSPLITAMOUNT AS INVOICEFSPLITAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLEENTRY_CW.qvd]
(qvd);
Inner Join
LOAD T_AR_RECEIVABLE_CW.LE_ID,
[T_AR_RECEIVABLE_CW.LCY CODE],
T_AR_RECEIVABLE_CW.SYSTEM,
T_AR_RECEIVABLE_CW.#DataDateTime,
T_AR_RECEIVABLE_CW.#DataDate,
T_AR_RECEIVABLE_CW.FID AS FCWID,
T_AR_RECEIVABLE_CW.FBILLNO AS FCWFBILLNO,
T_AR_RECEIVABLE_CW.FZKJE AS FZKJE
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\T_AR_RECEIVABLE_CW.qvd]
(qvd);
Inner Join
LOAD t_AR_receivableFIN.LE_ID,
[t_AR_receivableFIN.LCY CODE],
t_AR_receivableFIN.SYSTEM,
t_AR_receivableFIN.#DataDateTime,
t_AR_receivableFIN.#DataDate,
t_AR_receivableFIN.FID AS FCWID,
t_AR_receivableFIN.FENTRYID,
num#(t_AR_receivableFIN.FEXCHANGERATE, '####,##', ',', '.') AS FCWEXCHANGERATE
FROM
[D:\QILKVIEW\QLIKVIEW\SalesOrderIncome\t_AR_receivableFIN.qvd]
(qvd);
//发票进行单号,物料分组
INVOICE_GET_TMP:
NoConcatenate
load
SALES_INCOMING.process_id,
FMATERIALID,
sum( num#(FNOTAXAMOUNTFOR, '####,##', ',', '.')) AS INVOICENOTTAXEDAMOUNT_1,
sum( num#(INVOICEFSPLITAMOUNT, '####,##', ',', '.')) AS INVOICEFSPLITAMOUNT_1
RESIDENT INVOICE_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID;
//计算出库单成本
OUTSTOCK_CALCULATION_TMP:
NoConcatenate
load
SALES_INCOMING.process_id,
FMATERIALID,
sum(num#(FCOSTAMOUNT, '####,##', ',', '.')) AS SUMCOSTAMOUNT
RESIDENT OUTSTOCK_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID
;
//汇总输出发票金额 产品成本
PROFIT_GET_TMP:
NoConcatenate
load SALES_INCOMING.process_id,
FMATERIALID,
max(INVOICENOTTAXEDAMOUNT_1) AS SUMINVOICENOTTAXEDAMOUNT,
max(INVOICEFSPLITAMOUNT_1) AS SALES_INCOMING.Original_amount_reduction
RESIDENT INVOICE_GET_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID;
Left Join
load SALES_INCOMING.process_id,
FMATERIALID,
MAX(SUMCOSTAMOUNT) AS SUMPRODUCTCOST
RESIDENT OUTSTOCK_CALCULATION_TMP
Group By SALES_INCOMING.process_id,
FMATERIALID;
//计算利润
PROFIT_CALCULATION_TMP:
NoConcatenate
load SALES_INCOMING.process_id,
FMATERIALID,
max(SUMINVOICENOTTAXEDAMOUNT - SUMPRODUCTCOST) AS SALES_INCOMING.profit
RESIDENT PROFIT_GET_TMP
Group by SALES_INCOMING.process_id,FMATERIALID;
SALESORDERINCOME.QVW的更多相关文章
- QVW中实现日期区间的选择功能!
QV在日期的选择上不是很灵活,日期区段的选择可以在列表框中直接用鼠标拖拉区段,如果跨周期比较长了还是不是很方便啦. 下面介绍的方式是完全实现了起始日期的选择功能. 注:日期这个字段在抽取的时候一定要格 ...
- Android入门(一)
原文链接:http://www.orlion.ga/387/ 一.安卓的系统架构 1. linux内核层,这一层为安卓设备提供底层的驱动 系统运行库层,这一层通过一些C/C++库来为Android系统 ...
- Python之路【第二十篇】Tornado框架
Tornado Tornado是使用Python编写的一个强大的.可扩展的Web服务器.它在处理严峻的网络流量时表现得足够强健,但却在创建和编写时有着足够的轻量级,并能够被用在大量的应用和工具中. 我 ...
- step by step install Caffe
Caffe + Ubuntu 14.04 + CUDA 8 + cudnn 8.0+Ananconda3+opencv3.0.0 //由于本人使用的是英文版ubuntu,没装汉语输入法,暂时就用蹩脚的 ...
- QlikView 权限设置问题和注意
企业级报表通常都涉及到复杂的权限问题, 比如文本级权限和行级权限,某区域经理只能看到该区域的销售数据.QlikView自然也提供了该种功能. 具体方法: 在Edit script中新建一个tab, 输 ...
- Ubuntu环境搭建系列—WPS/LAMP/Python篇
由于篇幅不宜太长,所以就将此文分成了两部分,在第一部分中我们讲解了google-chrome(谷歌浏览器)的安装,jdk的环境配置,android开发的环境搭建.那么在第二部分中,位们将讲解的是金山W ...
- 说说设计模式~观察者模式(Observer)
返回目录 观察者模式,也叫发布/订阅模式(publish/subscribe),监视器模式等.在此种模式中,一个目标物件管理所有相依于它的观察者物件,并且在它本身的状态改变时主动发出通知.这通常透过呼 ...
- rfc2616 HTTP Protocl Analysis
catalog . Introduction . Protocol Parameters . HTTP Message . Request . Response . HTTP Method.Conte ...
- WAF(Web Appliction Firewall) Bypass Technology Research
catalog . What is Firewall . Detecting the WAF . Different Types of Encoding Bypass . Bypass本质 1. Wh ...
随机推荐
- windows Driver 查询指定键值
NTSTATUS status; HANDLE hKey = NULL; OBJECT_ATTRIBUTES oa; UNICODE_STRING strPath = RTL_CONSTANT_STR ...
- Opencv调用深度学习模型
https://blog.csdn.net/lovelyaiq/article/details/79929393 https://blog.csdn.net/qq_29462849/article/d ...
- 15. react UI组件和容器组件的拆分 及 无状态组件
1.组件的拆分 组件拆分的前提 当所有的逻辑都出现在一个组件内时 组件会变得非常复杂 不便与代码的维护 所以对组件进行拆分 IU组件 进行页面渲染 容器组件 进行逻辑操作 UI组件的拆分 新建一个 ...
- 吴裕雄--天生自然JAVA SPRING框架开发学习笔记:Spring基于XML装配Bean
Bean 的装配可以理解为依赖关系注入,Bean 的装配方式也就是 Bean 的依赖注入方式.Spring 容器支持多种形式的 Bean 的装配方式,如基于 XML 的 Bean 装配.基于 Anno ...
- (递归)P1025 数的划分
题解: #include<iostream>using namespace std;int ret=0,m_n;void p(int n,double k,int j){ if(k==1) ...
- bzoj4316小C的独立集(dfs树/仙人掌+DP)
本题有两种写法,dfs树上DP和仙人掌DP. 先考虑dfs树DP. 什么是dfs树?其实是对于一棵仙人掌,dfs后形成生成树,找出非树边(即返祖边),然后dfs后每条返祖边+其所覆盖的链构成了一个环( ...
- mariabd mysql升级mariadb
还有错误 [root@localhost /]# mysqldump --all-databases --user=root --password --master-data > backupd ...
- Spring框架-IOC和AOP
IOC:它并不是一种技术实现,而是一种设计思想.在任何一个有实际开发意义的程序项目中,我们会使用很多类来描述它们特有的功能,并且通过类与类之间的相互协作来完成特定的业务逻辑.这个时候,每个类都需要负责 ...
- Linux基础应用
Linux刚面世时并没有图形界面,因此所有的操作全靠命令完成,如磁盘操作.文件读取.目录操作.进程管理.文件权限等都要通过命令完成.且在职场中,大量的服务器维护都是通过远程命令来完成. 常用的7个命令 ...
- CMakeLists添加内部库
SET(RTABMap_LIBRARIES ${PROJECT_SOURCE_DIR}/bin/librtabmap_core.so ${PROJECT_SOURCE_DIR}/bin/librtab ...