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

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)

 



http://blog.csdn.net/yihuiworld


你可能感兴趣的:(ERP,ERP,ERP实施,Tiptop,易拓,鼎捷)