| | |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机 |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() and engine.MLB_MQB() = product.MQBMLB() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( pisp.Product_MP() ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | |
| | | //长春外租库入库费用:入库量/包装容量*入库单价 |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //长春外租库出库费用: 出库量/包装容量*出库单价 |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.OutboundPrice(); |
| | | cell.CCRentInCost( cell.CCRentInCost() + entercost ); |
| | | cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost ); |
| | | } |
| | |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.StartDate() <= trip.Departure().Date() and engine.EndDate() >= trip.Departure().Date() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.StartDate() <= trip.Departure().Date() and trans.EndDate() >= trip.Departure().Date() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 and not isnull( column ) and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机 |
| | | quantity := [Number]pit.Quantity(); |
| | |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机 |
| | | //查询对应的发动机成本 |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机 |
| | | //查询对应的发动机成本 |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | |
| | | iscc := tprow.TargetStockpoingPointID().EndsWith( '外租库' ) and ( tprow.TargetStockpoingPointID().StartsWith( '长春' ) or tprow.TargetStockpoingPointID().StartsWith( 'CC' ) ); |
| | | if( isdl and iscc ){ |
| | | //查询对应的发动机成本 |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | //在运输成本参数表里找到发动机对应运输单价和装载容量 |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.Origin() = tprow.SourceStockpoingPointID() |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.LoadingCapacity() <> 0 and trans.Origin() = tprow.SourceStockpoingPointID() |
| | | and trans.Destination() = tprow.TargetStockpoingPointID() |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( '发动机', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//查询产品类型是发动机 |
| | | //查询对应的发动机成本 |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.PackagingCapacity() <> 0 and engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccfactory ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |