| | |
| | | |
| | | table.GenerateColumn( owner ); |
| | | //发往长春的销量需要在trip plan里面找到起始库存点为大连装配线边库,目的地为长春外租库的产品 算出发往长春的销量后,在发动机成本参数表里找到对应的包装容量和长春入库单价,用公式计算,月度进行汇总 |
| | | //在 trip plan里找到大连装配线边库到大连外租库的运输数量 |
| | | //在 trip plan里找到大连装配线边库到大连外租库的运输数量//大连厂内库到外租库 |
| | | traverse( owner, Unit.Lane.LaneLeg, laneleg ){ |
| | | //起始库存点是否是大连装配线边库 |
| | | originsp := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.OriginStockingPointID() ); |
| | |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //长春外租库出库费用: 出库量/包装容量*出库单价 |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell.CCRentEnterCost( cell.CCRentEnterCost() + entercost ); |
| | | cell.CCRentOutCost( cell.CCRentOutCost() + outcost ); |
| | | cell.CCRentInCost( cell.CCRentInCost() + entercost ); |
| | | cell.CCRentOutOfCost( cell.CCRentOutOfCost() + outcost ); |
| | | } |
| | | } |
| | | if( isdlrent ){//目的地是大连外租库 |
| | |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | //运输数量/包装容量/装载容量*运输单价 |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//四舍五入 |
| | | cell.FactoryToDLRentTransCost( cell.FactoryToDLRentTransCost() + cost ); |
| | | cell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | //大连外租库入库费用:入库量/包装容量*入库单价,入库量等于大连工厂该产品产量减去发往长春的数量 |
| | | //大连外租库入库费用:入库量/包装容量*入库单价,入库量等于大连工厂该产品产量减去发往长春的数量-newSupply |
| | | traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//财务产量报表非导入 |
| | | traverse( source, FinancialProductionReport, report, not report.IsShow() ){//财务产量报表不显示 |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = dlunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn().IsDay() ) ){//财务产量报表里的大连产量, 不为0 |
| | |
| | | } |
| | | } |
| | | } |
| | | //大连外租库出库费用:出库量/包装容量*出库单价,出库量等于大连工厂该产品销量减去发往长春的数量 |
| | | //大连外租库出库费用:出库量/包装容量*出库单价,出库量等于大连工厂该产品销量减去发往长春的数量-newSupply, 大连厂内库,大连外租库 |
| | | traverse( owner, FinancialSalesSource, source, not source.IsImport() ){//财务销量报表非导入 |
| | | traverse( source, FinancialSalesReport, report, not report.IsShow() ){//财务销量报表不显示 |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn().IsDay() ) ){//财务销量报表里的大连产量, 不为0 |
| | |
| | | |
| | | cost := ceil( ceil( [Number]tpcell.Value() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCLongTransCoat( cell.CCLongTransCoat() + cost ); |
| | | cell.CCLongTransCost( cell.CCLongTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | |
| | | // info( '-------------------------', column.Name() ); |
| | | cost := ceil( [Number]psdip.Quantity() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCShortTransCost( cell.CCShortTransCost() + cost ); |
| | | cell.CCShorTransCost( cell.CCShorTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//四舍五入 |
| | | cell.CCRentStorageCost( cell.CCRentStorageCost() + cost ); |
| | | cell.CCRentStorCost( cell.CCRentStorCost() + cost ); |
| | | } |
| | | } else { |
| | | //在发动机成本参数表找到对应的包装容量 |
| | |
| | | and engine.Factory() = dlunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//四舍五入 |
| | | cell.DLRentStorageCost( cell.DLRentStorageCost() + cost );; |
| | | cell.DLRentStorCost( cell.DLRentStorCost() + cost ); |
| | | } |
| | | } |
| | | } |