標籤

4GL (1) 人才發展 (10) 人物 (3) 太陽能 (4) 心理 (3) 心靈 (10) 文學 (31) 生活常識 (14) 光學 (1) 名句 (10) 即時通訊軟體 (2) 奇狐 (2) 爬蟲 (1) 音樂 (2) 產業 (5) 郭語錄 (3) 無聊 (3) 統計 (4) 新聞 (1) 經濟學 (1) 經營管理 (42) 解析度 (1) 遊戲 (5) 電學 (1) 網管 (10) 廣告 (1) 數學 (1) 機率 (1) 雜趣 (1) 證券 (4) 證券期貨 (1) ABAP (15) AD (1) agentflow (4) AJAX (1) Android (1) AnyChart (1) Apache (14) BASIS (4) BDL (1) C# (1) Church (1) CIE (1) CO (38) Converter (1) cron (1) CSS (23) DMS (1) DVD (1) Eclipse (1) English (1) excel (5) Exchange (4) Failover (1) Fedora (1) FI (57) File Transfer (1) Firefox (3) FM (2) fourjs (1) Genero (1) gladiatus (1) google (1) Google Maps API (2) grep (1) Grub (1) HR (2) html (23) HTS (8) IE (1) IE 8 (1) IIS (1) IMAP (3) Internet Explorer (1) java (4) JavaScript (22) jQuery (6) JSON (1) K3b (1) ldd (1) LED (3) Linux (117) Linux Mint (4) Load Balance (1) Microsoft (2) MIS (2) MM (51) MSSQL (1) MySQL (27) Network (1) NFS (1) Office (1) OpenSSL (1) Oracle (126) Outlook (3) PDF (6) Perl (60) PHP (33) PL/SQL (1) PL/SQL Developer (1) PM (3) Postfix (2) postfwd (1) PostgreSQL (1) PP (50) python (5) QM (1) Red Hat (4) Reporting Service (28) ruby (11) SAP (234) scp (1) SD (16) sed (1) Selenium (3) Selenium-WebDriver (5) shell (5) SQL (4) SQL server (8) sqlplus (1) SQuirreL SQL Client (1) SSH (2) SWOT (3) Symantec (2) T-SQL (7) Tera Term (2) tip (1) tiptop (24) Tomcat (6) Trouble Shooting (1) Tuning (5) Ubuntu (37) ufw (1) utf-8 (1) VIM (11) Virtual Machine (2) VirtualBox (1) vnc (3) Web Service (2) wget (1) Windows (19) Windows (1) WM (6) Xvfb (2) youtube (1) yum (2)

2015年6月15日 星期一

TIPTOP ERP 常用业务计算逻辑总结

http://blog.csdn.net/yihuiworld/article/details/44946041

TIPTOP ERP  常用业务计算逻辑总结
一、制造
1、订单未交量(oeb12-oeb24+oeb25-oeb26)*oeb05_fac
                    (订单量  - 出货量 +销退量(折让且原订单出货)-被结案数量)* 销售/库存单位换算率
                    条件:oea00<>'0' AND oeb70 = 'N' AND oeaconf = 'Y'


2、请购未转采购量(pml20-pml21)*pml09
[原料一般请购]       (请购量-累计已转采购量)* 请购单位/库存单位的转换率
                         条件:pml011 !='SUB' AND pmk18 != 'X' AND ( pml16 <='2' OR pml16='S' OR pml16='R' OR pml16='W')


3、一般采购未交量(pmn20-pmn50+pmn55+pmn58)*pmn09
[原料一般采购]        (采购量-已交量+验退量+仓退[折让且原采购单换货])* 采购单位/料件库存单位的转换率
                               条件:pmn011 !='SUB' AND pmm18 != 'X' AND ( pmn16 <='2' OR pmn16='S' OR pmn16='R' OR pmn16='W')


4、采购结案时才计算的超/短交交量pmn57=(pmn50-pmn20-pmn55)*pmn09
   [>0则为超交;<0则为短交]        (已交量-采购量-验退量)* 采购单位/料件库存单位的转换率
                                           条件:采购单已结案


5、一般工单在制量(sfb08-sfb09-sfb10-sfb11-sfb12)*ima55_fac
                         (生产数量-完工数量-再加工数量-FQC在验量-报废数量)* 生产单位/库存单位换算率
                         条件:sfb04 <'8' AND sfb87!='X' AND ( sfb02 !='7' AND sfb02 !='8' AND sfb02 !='11' AND sfb02 != '15' )
6、委外在制量=委外工单在制量+委外IQC在验量
   委外工单在制量(sfb08-sfb09-sfb10-sfb11-sfb12)*ima55_fac
                        (生产数量-完工数量-再加工数量-FQC在验量-报废数量)* 生产单位/库存单位换算率
                        条件:sfb04 <'8' AND sfb87!='X' AND ( sfb02='7' OR sfb02='8')
   委外IQC在验量(rvb07-rvb29-rvb30)*pmn09
                       (实收数量-验退量-入库量)* 生产单位/库存单位换算率
                       条件:rvb04 = pmn01 AND rvb03 = pmn02 AND rvaconf='Y' AND rva10 ='SUB' AND pmn43 = 0


7、工单备料欠料量(sfa05-sfa06-sfa065+sfa063-sfa062)*sfa13
                         (应发数量-已发数量-委外代买量+下阶报废-超领)* 发料单位/库存单位换算率
                         条件:sfb04 !='8' AND  sfb87!='X' AND sfb02 != '15'
                        注意:因为GP5.20以上版本欠料时也可以先不补欠料就超领,会造成上述计算式可能为负数
                                 则计算出的备料欠料量应修正为0


8、工单已发欠料量CALL s_shortqty(p_sfa01,p_sfa03,p_sfa08,p_sfa12,p_sfa27,p_sfa012,p_sfa013)
            RETURNING g_short_qty(即返回已发欠料量),再*sfa13
                        条件:sfb04 !='8' AND  sfb87!='X' AND sfb02 != '15'
                        说明: p_sfa01:工单号码
                                  p_sfa03:料件编号
                 p_sfa08:作业编号
                 p_sfa12:发料单位
                 p_sfa27:被替代料号
                 p_sfa012:工艺段号 GP 5.20以下版本不需要
                 p_sfa013:工艺序  GP 5.20以下版本不需要
            大致逻辑:工单已发欠料量=已发套数*实际QPA-已发数量   (其中:实际QPA=应发/生产数量)

 9、最小发料套数  CALL s_minp(p_wono,p_check,p_percent,p_opseq,p_prcocess,p_sequence)
            RETURNING l_stat,l_minp (l_stat结果码:0.OK、1.Fail;l_minp:最小发料套数值)
                        条件:sfb04 !='8' AND  sfb87!='X' AND sfb02 != '15'
                        说明: p_wono:工单号码  sfb01
                                  p_check:是否检查最小套数  sma73
                 p_percent:检查完工误差率  ima153
                                (CALL s_get_ima153(sr.sfb05) RETURNING l_ima153)
                 p_opseq:作业编号 一般传空值'',表示不检查作业编号
                 p_prcocess:一般传空值''
                 p_sequence:一般传空值''
            大致逻辑:最小发料套数 = ((已发-报废+超领)/应发)*生产数量*(1+完工误差率)(1+发料误差率)

10、一般退料可退量[不考虑发料误差]sfa06-((sfb09 + sfb11)* sfa161)-g_sfs05
    [asfi528]                             已发-((完工数量+FQC量)*实际QPA)-当前退料单其他项次已退量和
                                               说明:FQC量指的是"有FQC单但是该FQC还没有完工入库的量
                                                         (即FQC单没有在完工入库单sfv17里面)"


11、IQC在验量=已收货待IQC验+IQC已验待入库/验退
     IQC在验量(rvb07-rvb29-rvb30)*pmn09
                      (实收数量-验退量-入库量)* 生产单位/库存单位换算率
                      条件:rvb04 = pmn01 AND rvb03 = pmn02 AND rvaconf='Y' AND rva10 !='SUB'
     已收货待IQC验:上述IQC在验量增加条件:
                AND (rvb39='Y'  AND
                     (SELECT COUNT(*) FROM qcs_file WHERE qcs01=rvb01 AND qcs02=rvb02 AND qcs14='Y' AND qcs00<'5')=0)
     IQC已验待入库/验退:上述IQC在验量增加条件:
          AND (rvb39='N'  OR
                     (rvb39='Y' AND (SELECT COUNT(*) FROM qcs_file WHERE qcs01=rvb01 AND qcs02=rvb02 AND qcs14='Y' AND qcs00<'5')>=1)
                    )


12、FQC在验量sfb11*ima55_fac
                     工单FQC量* 生产单位/库存单位换算率
                     条件:sfb02 <> '7' AND sfb87!='X' AND sfb02 <> '8' AND sfb02 <> '11' AND sfb04 <'7' 

13、预计可用量=可用库存量 - 订单受订量 - 工单备料量 + 请购未转采购量 + 采购未交量 + IQC在验量 + 工单在制量 + 委外在制量 +FQC在验量




二、财务
1、应期末余额(贷方)=历史累计和(贷-借)+本期贷方发生额-本期借方发生额
        历史累计和(贷-借):SUM(apm07f-apm06f) WHERE apm04= AND apm05< GROUP BY 科目,客户...
        本期贷方发生额:   SUM(apm07f)               WHERE apm04= AND apm05= GROUP BY 科目,客户...
        本期借方发生额:   SUM(apm06f)               WHERE apm04= AND apm05= GROUP BY 科目,客户...


2、应期末余额(借方)=历史累计和(借-贷)+本期借方发生额-本期贷方发生额
        历史累计和(借-贷):SUM(ooo08d-ooo08c) WHERE ooo06= AND ooo07< GROUP BY 科目,客户...
        本期借方发生额:   SUM(ooo08d)               WHERE ooo06= AND ooo07= GROUP BY 科目,客户...
        本期贷方发生额:   SUM(ooo08c)                WHERE ooo06= AND ooo07= GROUP BY 科目,客户...


3、入库/退货未匹配量=rvv87-rvv23       暂估数量=rvv88
                           (计价数量-已请款匹配量)
         条件:rvv03!='2' AND rvv89!='Y' AND ((B.rvv87 > B.rvv23+B.rvv88) OR  (A.rvu00='3' AND B.rvv87=0))                 
                计价数量-已请款匹配量-暂估数量>0  且含  仓退折让(需判断是否有做待抵)


4、原币未付=apc08-apc10-apc14-apc16
                (原币合计-原币已付金额-原币直接冲帐金额-原币留置金额)
                条件:apa42 = 'N' AND  apa34f > (apa35f+apa20)
    本币未付=apc09-apc11-apc15-apc16*apa14   (g_apz.apz27 = 'N'时)
                (本币合计-本币已付金额-本币直接冲帐金额-原币留置金额*立账汇率)
                条件:apa42 = 'N' AND  apa34f > (apa35f+apa20)
    本币未付=apc13-apc16*apa72                          (g_apz.apz27 = 'Y'时)
                (本币未冲金额-原币留置金额*重估汇率)
                条件:apa42 = 'N' AND  apa34f > (apa35f+apa20)

沒有留言:

張貼留言