P.Spec+'/'+isnull(P.PartDescription,'') PartDescription,P.Spec,ROUND(ISNULL(so.scheduling_size,0),3) as scheduling_size,dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo) as weightFactor,
Round(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderNo)*a.LotSize,2) as weight
P.Spec+'/'+isnull(P.PartDescription,'') PartDescription,P.Spec,ROUND(ISNULL(so.scheduling_size,0),3) as scheduling_size,P.NetWeight/1000 as weightFactor,
Round(isnull(P.NetWeight/1000,1)*a.LotSize,2) as weight
P.Spec+'/'+isnull(P.PartDescription,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.qtyReported,S.qtyApprove,S.machSetupTime,
select a.site, a.OrderNo,a.PartNo,a.Status,a.OrderRef1,a.OrderDate,a.OrderQty as LotSize,dbo.Get_PartValue(a.site,a.PartNo,'equipment') as equipment,so.RepairSOFlag,
P.Spec+'/'+isnull(P.PartDescription,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.machSetupTime,
S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,a.qtyfinished,a.finishFlag,ROUND(dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderRef1)*a.OrderQty,2) as weight,
dbo.Get_PartWeightFactorForReport(a.site,a.PartNo,a.OrderRef1) as weightFactor,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderRef1) partPlanQty,so.needDate,cod.PlanShipDate
S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,a.qtyfinished,a.finishFlag,ROUND(isnull(P.NetWeight/1000,1)*a.OrderQty,2) as weight,
P.NetWeight/1000 as weightFactor,dbo.Get_PartPlanQty(a.site,a.PartNo,a.OrderRef1) partPlanQty,so.needDate,cod.PlanShipDate
,case when dbo.Get_PartNumberValue( a.site,a.PartNo,'PLAN-QUANTITY') is not null and dbo.Get_PartNumberValue( a.site,a.PartNo,'CAVITY') is not null
then CEILING((a.OrderQty-isnull(SL.scheduledQty,0))/(dbo.Get_PartNumberValue( a.site,a.PartNo,'PLAN-QUANTITY')*dbo.Get_PartNumberValue( a.site,a.PartNo,'CAVITY'))) else null end as banQty,
@ -429,7 +430,7 @@
AND #{endDate4} >= cod.PlanShipDate
</if>
</where>
order by a.OrderDate desc,s.itemNo
order by case when dbo.Get_E_OriginalOrderTypeDesc(so.site, so.OrderNo) in ('变更订单','加急订单') then 1 else 2 end , a.OrderDate desc,s.itemNo