ncm_clean.sql 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --产品间费用分配标准设置
  2. Delete from T_NCM_AllocStdSetByPrd where FCompanyID in ($ORGID) and FCalculatePeriodID in ($FPERIOD_ID);
  3. --在产品成本分配标准设置
  4. Delete from T_NCM_AllocStdSetByWIP where FCompanyID in ($ORGID) and FCalculatePeriodID in ($FPERIOD_ID);
  5. --成本中心间分配标准设置
  6. Delete from T_NCM_AllocStdSetByCCO where FCompanyID in ($ORGID) and FCalculatePeriodID in ($FPERIOD_ID);
  7. --实际工时数据
  8. Delete from T_NCM_ActualHourEntry where FParentID in
  9. (select Fid from T_NCM_ActualHour where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID));
  10. Delete from T_NCM_ActualHour where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID);
  11. --约当系数数据录入
  12. Delete from T_NCM_EquivalentCoef where FCompanyID in ($ORGID) and FCalculatePeriodID in ($FPERIOD_ID);
  13. --自定义分配标准数据录入
  14. Delete from T_NCM_UserDefinedData where FCompanyID in ($ORGID) and FCalculatePeriodID in ($FPERIOD_ID);
  15. --投入产量录入
  16. Delete from T_NCM_InputQtyBillEntry where FParentID in
  17. (select Fid from T_NCM_InputQtyBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID));
  18. Delete from T_NCM_InputQtyBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID);
  19. --在产品产量盘点
  20. Delete from T_NCM_WIPCountingBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID);
  21. --其它费用归集
  22. Delete from T_NCM_OtherFeeBillEntry where FParentID in
  23. (select Fid from T_NCM_OtherFeeBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID));
  24. Delete from T_NCM_OtherFeeBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID);
  25. --成本中心费用归集
  26. Delete from T_NCM_CCOFeeBillEntry where FParentID in
  27. (select Fid from T_NCM_CCOFeeBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID));
  28. Delete from T_NCM_CCOFeeBill where FCompanyOrg in ($ORGID) and FCalculatePeriod in ($FPERIOD_ID);
  29. --成本计算报告数据
  30. Delete from T_NCM_CalcLog where FCompanyId in ($ORGID) and FPeriodId in ($FPERIOD_ID);