SALESGROSSSALES_成本_利润
//获取成本
GETCOST_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 OUSTOCKFID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\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 OUSTOCKFID,
T_SAL_OUTSTOCKENTRY.FENTRYID AS OUTSTOCKFENTRYID ,
T_SAL_OUTSTOCKENTRY.FMATERIALID AS FMATERIALID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\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 OUTSTOCKFENTRYID,
T_SAL_OUTSTOCKENTRY_F.FCOSTAMOUNT,
T_SAL_OUTSTOCKENTRY_F.FCOSTAMOUNT_LC,
num#(T_SAL_OUTSTOCKENTRY_F.FSALCOSTPRICE, '####,##', ',', '.')AS FSALCOSTPRICE,
num#(T_SAL_OUTSTOCKENTRY_F.FCOSTPRICE, '####,##', ',', '.') AS FCOSTPRICE
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_SAL_OUTSTOCKENTRY_F.qvd]
(qvd);
//暂估
Inner Join
LOAD T_AR_RECEIVABLEENTRY_LK_ZG.LE_ID,
[T_AR_RECEIVABLEENTRY_LK_ZG.LCY CODE],
T_AR_RECEIVABLEENTRY_LK_ZG.SYSTEM,
T_AR_RECEIVABLEENTRY_LK_ZG.#DataDateTime,
T_AR_RECEIVABLEENTRY_LK_ZG.#DataDate,
T_AR_RECEIVABLEENTRY_LK_ZG.FENTRYID AS ZGFENTRYID,
T_AR_RECEIVABLEENTRY_LK_ZG.FSID AS OUTSTOCKFENTRYID,
T_AR_RECEIVABLEENTRY_LK_ZG.FRULEID AS ZGFRULEID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_AR_RECEIVABLEENTRY_LK_ZG.qvd]
(qvd);
Inner Join
LOAD t_AR_RECEIVABLEENTRY_ZG.LE_ID,
[t_AR_RECEIVABLEENTRY_ZG.LCY CODE],
t_AR_RECEIVABLEENTRY_ZG.SYSTEM,
t_AR_RECEIVABLEENTRY_ZG.#DataDateTime,
t_AR_RECEIVABLEENTRY_ZG.#DataDate,
t_AR_RECEIVABLEENTRY_ZG.FID AS ZGFID,
t_AR_RECEIVABLEENTRY_ZG.FENTRYID AS ZGFENTRYID,
t_AR_RECEIVABLEENTRY_ZG.FMATERIALID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\t_AR_RECEIVABLEENTRY_ZG.qvd]
(qvd);
//财务
Inner Join
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.FENTRYID AS CWFENTRYID,
T_AR_RECEIVABLEENTRY_LK_CW.FSID AS ZGFENTRYID,
T_AR_RECEIVABLEENTRY_LK_CW.FRULEID AS CWFRULEID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_AR_RECEIVABLEENTRY_LK_CW.qvd]
(qvd);
Inner Join
LOAD T_AR_RECEIVABLEENTRY.LE_ID,
[T_AR_RECEIVABLEENTRY.LCY CODE],
T_AR_RECEIVABLEENTRY.SYSTEM,
T_AR_RECEIVABLEENTRY.#DataDateTime,
T_AR_RECEIVABLEENTRY.#DataDate,
T_AR_RECEIVABLEENTRY.FID AS CWFID,
T_AR_RECEIVABLEENTRY.FENTRYID AS CWFENTRYID,
T_AR_RECEIVABLEENTRY.FMATERIALID AS FMATERIALID,
T_AR_RECEIVABLEENTRY.FSEQ,
T_AR_RECEIVABLEENTRY.FALLAMOUNTFOR,
T_AR_RECEIVABLEENTRY.FPRICEQTY,
T_AR_RECEIVABLEENTRY.FALLAMOUNT,
T_AR_RECEIVABLEENTRY.FSPLITAMOUNT,
T_AR_RECEIVABLEENTRY.FNOTAXAMOUNT
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_AR_RECEIVABLEENTRY.qvd]
(qvd);
Inner Join
LOAD t_AR_receivable.LE_ID,
[t_AR_receivable.LCY CODE],
t_AR_receivable.SYSTEM,
t_AR_receivable.#DataDateTime,
t_AR_receivable.#DataDate,
t_AR_receivable.FID AS CWFID,
t_AR_receivable.FBILLNO AS SALES_GROSS_SALES.process_id ,
t_AR_receivable.FCUSTOMERID,
t_AR_receivable.FCREATEDATE,
t_AR_receivable.FCURRENCYID,
t_AR_receivable.FSALEERID,
t_AR_receivable.FDATE
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\t_AR_receivable.qvd]
(qvd);
//获取最终成本
FINALFCOSTPRICE_TMP:
NoConcatenate
load
SALES_GROSS_SALES.process_id,
FMATERIALID,
avg(num#(FCOSTPRICE, '####,##', ',', '.')) AS FINALFCOSTPRICE
RESIDENT GETCOST_TMP
Group By
SALES_GROSS_SALES.process_id,
FMATERIALID;
//财务应收单
INVOICE_TMP:
NoConcatenate
//LocalFactTable:
LOAD t_AR_receivable.LE_ID,
[t_AR_receivable.LCY CODE],
t_AR_receivable.SYSTEM,
date(num#(t_AR_receivable.#DataDateTime, '#.##0,0', ',', '.')) ,
date(num#(t_AR_receivable.#DataDate, '#.##0,0', ',', '.')) ,
t_AR_receivable.FID as FID,
t_AR_receivable.FBILLNO as SALES_GROSS_SALES.process_id,
t_AR_receivable.FCUSTOMERID as FCUSTOMERID,
date(num#(t_AR_receivable.FDATE, '#.##0,0', ',', '.')) AS SALES_GROSS_SALES.date,
Year( date(num#(t_AR_receivable.FDATE, '#.##0,0', ',', '.'))) as FYEAR,
month( date(num#(t_AR_receivable.FDATE, '#.##0,0', ',', '.'))) as FMONTH,
t_AR_receivable.FCURRENCYID as FCURRENCYID ,
t_AR_receivable.FSALEERID as FSALEERID
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\t_AR_receivable.qvd]
(qvd);
Inner join
LOAD T_AR_RECEIVABLEENTRY.LE_ID,
[T_AR_RECEIVABLEENTRY.LCY CODE],
T_AR_RECEIVABLEENTRY.SYSTEM,
T_AR_RECEIVABLEENTRY.#DataDateTime,
T_AR_RECEIVABLEENTRY.#DataDate,
T_AR_RECEIVABLEENTRY.FID AS FID,
T_AR_RECEIVABLEENTRY.FENTRYID AS FENTRYID,
T_AR_RECEIVABLEENTRY.FMATERIALID AS FMATERIALID,
T_AR_RECEIVABLEENTRY.FSEQ AS SALES_GROSS_SALES.process_pos_nr,
num#(T_AR_RECEIVABLEENTRY.FALLAMOUNTFOR, '####,##', ',', '.') AS SALES_GROSS_SALES.amount,
num#(T_AR_RECEIVABLEENTRY.FNOTAXAMOUNT, '####,##', ',', '.') AS SALES_GROSS_SALES.nottaxedamount,
num#(T_AR_RECEIVABLEENTRY.FPRICEQTY, '####,##', ',', '.') AS SALES_GROSS_SALES.qty
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_AR_RECEIVABLEENTRY.qvd]
(qvd);
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 FCUSTOMERID,
T_BD_CUSTOMER.FNUMBER AS SALES_GROSS_SALES.customer.id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_BD_CUSTOMER.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.FCODE AS SALES_GROSS_SALES.currency
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_BD_CURRENCY.qvd]
(qvd);
inner join
LOAD T_BD_MATERIAL.LE_ID,
[T_BD_MATERIAL.LCY CODE],
T_BD_MATERIAL.SYSTEM,
T_BD_MATERIAL.#DataDateTime,
date(num#(T_BD_MATERIAL.#DataDate, '#.##0,0', ',', '.')) AS T_BD_MATERIAL.#DataDate,
T_BD_MATERIAL.FMATERIALID as FMATERIALID,
T_BD_MATERIAL.FNUMBER as SALES_GROSS_SALES.article.id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_BD_MATERIAL.qvd]
(qvd);
left 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 FSALEERID,
T_BD_OPERATORENTRY.FSTAFFID as SALES_GROSS_SALES.sales.representative_id
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_BD_OPERATORENTRY.qvd]
(qvd);
left 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_GROSS_SALES.sales.representative_id,
T_BD_STAFF_L.FNAME as SALES_GROSS_SALES.sales.representative.Code
FROM
[D:\QILKVIEW\QLIKVIEW\SalesGrossSales\T_BD_STAFF_L.qvd]
(qvd);
/////////////
GETCOST_TMP1:
NoConcatenate
LOAD
SALES_GROSS_SALES.process_id,
FMATERIALID,
SALES_GROSS_SALES.process_pos_nr,
SALES_GROSS_SALES.qty
RESIDENT INVOICE_TMP;
Left Join
load
SALES_GROSS_SALES.process_id,
FMATERIALID,
FINALFCOSTPRICE
RESIDENT FINALFCOSTPRICE_TMP;
GETCOST_TMP2:
NoConcatenate
LOAD
SALES_GROSS_SALES.process_id,
FMATERIALID,
SALES_GROSS_SALES.process_pos_nr,
SALES_GROSS_SALES.qty *FINALFCOSTPRICE AS COST
RESIDENT GETCOST_TMP1;
GETPROFIT_TMP1:
NoConcatenate
LOAD
SALES_GROSS_SALES.process_id,
FMATERIALID,
SALES_GROSS_SALES.process_pos_nr,
SALES_GROSS_SALES.nottaxedamount
RESIDENT INVOICE_TMP;
Left Join
LOAD
SALES_GROSS_SALES.process_id,
FMATERIALID,
SALES_GROSS_SALES.process_pos_nr,
COST
RESIDENT GETCOST_TMP2;
GETPROFIT_TMP2:
NoConcatenate
LOAD
SALES_GROSS_SALES.process_id,
FMATERIALID,
SALES_GROSS_SALES.process_pos_nr,
SALES_GROSS_SALES.nottaxedamount - COST AS PROFIT
RESIDENT GETPROFIT_TMP1;
SALESGROSSSALES_成本_利润的更多相关文章
- 胡小兔的OI日志3 完结版
胡小兔的 OI 日志 3 (2017.9.1 ~ 2017.10.11) 标签: 日记 查看最新 2017-09-02 51nod 1378 夹克老爷的愤怒 | 树形DP 夹克老爷逢三抽一之后,由于采 ...
- 餐饮连锁公司IT信息化解决方案一
从餐饮企业的信息化需求来说,没有哪一种解决方案能满足所有餐饮企业的信息化建设需要.不同的餐饮业态有不同的业务流程,不同业态的信息化解决方案是目前餐饮企业信息化建设急需的,这种一站式整 ...
- 《IBM BPM实战指南》读书笔记
理论 BPM不是一个IT术语,更不是因技术的发展而起源的,相反,BPM自始至终都是管理学的术语和概念.它关注的一直都是效率.成本.利润.质量等核心问题.BPM是一门学科和一种方法论,只是现代的企业管理 ...
- JAVA利用JXL导出/生成 EXCEL
/** * 导出导出采暖市场部收入.成本.利润明细表 * @author JIA-G-Y */ public String exporExcel(String str) { String str=Se ...
- BI (商业智能)
BI (商业智能) 编辑 商业智能(BI,Business Intelligence). BI(Business Intelligence)即商务智能,它是一套完整的解决方案,用来将企业中现有的数据进 ...
- PMP考试--挣值如何计算?
如果你对项目管理.系统架构有兴趣,请加微信订阅号"softjg",加入这个PM.架构师的大家庭 假设一项工作的工期是10天,预算成本是100元:也就是每天的完成进度是10%左右:每 ...
- 文本离散表示(三):TF-IDF结合n-gram进行关键词提取和文本相似度分析
这是文本离散表示的第二篇实战文章,要做的是运用TF-IDF算法结合n-gram,求几篇文档的TF-IDF矩阵,然后提取出各篇文档的关键词,并计算各篇文档之间的余弦距离,分析其相似度. TF-IDF与n ...
- 寒假作业pta3
某地老鼠成灾,现悬赏抓老鼠,每抓到一只奖励10元,于是开始跟老鼠斗智斗勇:每天在墙角可选择以下三个操作:放置一个带有一块奶酪的捕鼠夹(T),或者放置一块奶酪(C),或者什么也不放(X).捕鼠夹可重复利 ...
- SAP固定资产业务场景及方案
SAP固定资产业务场景及方案 http://mp.weixin.qq.com/s/hYlaNHJMQBTZpyFAmP2h3A 对于FICO应用资深专家或顾问,须业务场景及需求成竹在胸:对于非财务顾问 ...
随机推荐
- 一百零八、SAP的OO-ALV之二,创建屏幕Screen
一.在资源管理器,右键->创建屏幕 二.输入4位数字 三.输入屏幕的描述 四.在逻辑流里面PBO用于显示屏幕,PAI用于用户交互. 五.在元素清单里面,在屏幕中的所有元素都是在元素清单中的
- yagmail四行代码发送邮件
yagmail四行代码发送邮件 import yagmail # 链接邮箱服务器 yag = yagmail.SMTP(user="xxxx@163.com", password= ...
- 解决RecyclerView瀑布流效果结合Glide使用时图片变形的问题
问题描述:使用Glide加载RecyclerView的Item中的图片,RecyclerView使用了瀑布流展示图片,但是滚动时图片会不断的加载,并且大小位置都会改变,造成显示错乱. 解决方法:使用瀑 ...
- POJ 1276:Cash Machine 多重背包
Cash Machine Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 30006 Accepted: 10811 De ...
- windows driver 定时器的使用
#include < Ntifs.h> #pragma warning(disable:4995) #pragma comment(lib, "Ntoskrnl.lib" ...
- AD中内电层设置
用于走线与普铜 内电层分割
- 用Python复制文件的9个方法(转)
转自:https://zhuanlan.zhihu.com/p/35725217 用Python复制文件的9个方法 Python 中有许多“开盖即食”的模块(比如 os,subprocess 和 sh ...
- Vue Element-ui自定义dialog样式
第一步:定义 自定义dialog class名 第二步:全局修改自定义样式 自定义dialogStyle有三个儿子,这样只用找到他们就可以自定更改啦 .custonStyle { xxxxx } .c ...
- vmware桥接模式-无法内网通-克隆机要删除的文件-ssl
网卡太多自动模式有时候无法正常通信需要绑定外部网卡 rm /etc/udev/rules.d/-persistent-ipoib.rules vmware报错 Microsoft Runtime DL ...
- [CISCN 2019 初赛]Love Math
0x00 知识点 PHP函数: scandir() 函数:返回指定目录中的文件和目录的数组. base_convert() 函数:在任意进制之间转换数字. dechex() 函数:把十进制转换为十六进 ...