Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | //å¤ç§åºå
¥åºè´¹ç¨ï¼åèªè´¢å¡äº§éæ¥è¡¨ç产éï¼å¨äº§åè¡¨æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçå
è£
容éåå
¥åºåä»·ï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, FinancialProductionSource, source, not source.IsImport() ){//è´¢å¡äº§éæ¥è¡¨é导å
¥ |
| | | traverse( source, FinancialProductionReport, report, not report.IsShow() ){//è´¢å¡äº§éæ¥è¡¨ä¸æ¾ç¤º |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' ) ){//è´¢å¡äº§éæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = ccunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn().IsDay() ) ){//è´¢å¡äº§éæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | products.Add( product ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){ |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetRentEnterCost( column, quantity ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn().IsDay() ){ |
| | | cellcolumn := cell.FinancialProductionColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | //å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºé¿æ¥äº§é |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetRentEnterCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | //å¤ç§åºåºåºè´¹ç¨ï¼åºåºéçäºé¿æ¥ééï¼åèªè´¢å¡ééæ¥è¡¨çééï¼å¨äº§åè¡¨æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçå
è£
容éååºåºåä»·ï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | 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' ) ){//è´¢å¡ééæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn().IsDay() ) ){//è´¢å¡ééæ¥è¡¨éçé¿æ¥äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | products.Add( product ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){ |
| | | //åºåºé/å
è£
容é*åºåºåä»·ï¼å
¥åºéçäºé¿æ¥éé |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetRentOutCost( column, quantity ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn().IsDay() ){ |
| | | cellcolumn := cell.FinancialSalesColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | //åºåºé/å
è£
容é*åºåºåä»·ï¼å
¥åºéçäºé¿æ¥éé |
| | | quantity := ceil( [Number]cell.Value() / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetRentOutCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){ |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = ccline |
| | | and trans.Destination() = ccrent |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | row := table.GetRow( pit.ProductID() ); |
| | | products.Add( product ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | quantity := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | |
| | | row.SetFactoryToRentTransCost( column, quantity ); |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.StartDate() <= trip.Arrival().Date() and engine.EndDate() >= trip.Arrival().Date() ); |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, trans.StartDate() <= trip.Arrival().Date() and trans.EndDate() >= trip.Arrival().Date() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){ |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( transcosts, Elements, trans, trans.Origin() = ccline |
| | | and trans.Destination() = ccrent |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | row := table.GetRow( pit.ProductID() ); |
| | | products.Add( product ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | quantity := ceil( ceil( [Number]pit.Quantity() / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | |
| | | row.SetFactoryToRentTransCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | //å¤ç§åºä»å¨è´¹ç¨ï¼ä»å¨æ°é/å
è£
容é*ä»å¨åä»·ï¼å¨Actual inventorieséåå°é¿æ¥å¤ç§åºè¯¥å卿ºçä»å¨éï¼æ ¹æ®å卿ºå·æ¾å°å¯¹åºçGeneration 忍ªçºµå¶ï¼å¨å卿ºææ¬åæ°è¡¨éæ¾å°å¯¹åºçä»å¨åä»·åå
è£
容éï¼ç¨å
¬å¼è®¡ç®ï¼æåº¦è¿è¡æ±æ» |
| | | traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | //æ¯å¦å±äºé¿æ¥å¤ç§åº |
| | | isccrent := table.IsInUnit( stockingpoint, ccrent ); |
| | | isccrent := table.IsInUnit( stockingpoint, ccrent ); |
| | | if( isccrent ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ) ){ |
| | | //è·åè¡ |
| | | product := pisp.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | product := pisp.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){////æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | products.Add( product ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | row.SetRentStorageCost( column, quantity ); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() ); |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | row.SetRentStorageCost( column, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | 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(); |
| | | row := table.GetRow( pit.ProductID() ); |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( isccrent ){//ç®çå°æ¯é¿æ¥å¤ç§åº |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCRentQuantity( cell.CCRentQuantity() + quantity ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨: åºåºé/å
è£
容é*åºåºåä»· |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell.CCRentEnterCost( cell.CCRentEnterCost() + entercost ); |
| | | cell.CCRentOutCost( cell.CCRentOutCost() + outcost ); |
| | | 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() ); |
| | | 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(); |
| | | row := table.GetRow( pit.ProductID() ); |
| | | product := pit.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( isccrent ){//ç®çå°æ¯é¿æ¥å¤ç§åº |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.CCRentQuantity( cell.CCRentQuantity() + quantity ); |
| | | //é¿æ¥å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»· |
| | | entercost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | //é¿æ¥å¤ç§åºåºåºè´¹ç¨: åºåºé/å
è£
容é*åºåºåä»· |
| | | outcost := ceil( quantity / enginecost.PackagingCapacity() ) * enginecost.WarehousingPrice(); |
| | | cell.CCRentEnterCost( cell.CCRentEnterCost() + entercost ); |
| | | cell.CCRentOutCost( cell.CCRentOutCost() + outcost ); |
| | | } |
| | | } |
| | | } |
| | | if( isdlrent ){//ç®çå°æ¯å¤§è¿å¤ç§åº |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = laneleg.OriginStockingPointID() |
| | | and trans.Destination() = laneleg.DestinationStockingPointID() |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | cell.FactoryToDLRentTransCost( cell.FactoryToDLRentTransCost() + cost ); |
| | | if( isdlrent ){//ç®çå°æ¯å¤§è¿å¤ç§åº |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( transcosts, Elements, trans, trans.Origin() = laneleg.OriginStockingPointID() |
| | | and trans.Destination() = laneleg.DestinationStockingPointID() |
| | | and exists( productparents, Elements, e, ifexpr( trans.Product().FindString( 'å卿º', 0 ) >= 0, e.ID() = produtparent, e.ID() = trans.Product() ) ) ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | products.Add( product ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | //è¿è¾æ°é/å
è£
容é/è£
载容é*è¿è¾åä»· |
| | | cost := ceil( ceil( quantity / enginecost.PackagingCapacity() ) / transcost.LoadingCapacity() ) * transcost.TransportPrice();//åèäºå
¥ |
| | | cell.FactoryToDLRentTransCost( cell.FactoryToDLRentTransCost() + cost ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ï¼å
¥åºé/å
è£
容é*å
¥åºåä»·ï¼å
¥åºéçäºå¤§è¿å·¥å该产å产éåå»åå¾é¿æ¥çæ°é |
| | | 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' ) ){//è´¢å¡äº§éæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | products.Add( product ); |
| | | productparents := product.GetAllParent(); |
| | | traverse( report, FinancialProductionRow, row, row.Unit() = dlunit and exists( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn().IsDay() ) ){//è´¢å¡äº§éæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetDLRentEnterCost( column, enginecost, cell ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( product ); |
| | | ccrow := table.GetRow( row.Name() ); |
| | | traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn().IsDay() ){ |
| | | cellcolumn := cell.FinancialProductionColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | //大è¿å¤ç§åºå
¥åºè´¹ç¨ |
| | | ccrow.SetDLRentEnterCost( column, enginecost, cell ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ï¼åºåºé/å
è£
容é*åºåºåä»·ï¼åºåºéçäºå¤§è¿å·¥å该产åééåå»åå¾é¿æ¥çæ°é |
| | | 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' ) ){//è´¢å¡ééæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | traverse( report, FinancialSalesRow, row, row.Unit() = ccunit and exists( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn().IsDay() ) ){//è´¢å¡ééæ¥è¡¨éç大è¿äº§é, ä¸ä¸º0 |
| | | product := row.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | products.Add( product ); |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | ccrow := table.GetRow( row.Name() ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetDLRentOutCost( column, enginecost, cell ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( product ); |
| | | ccrow := table.GetRow( row.Name() ); |
| | | traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn().IsDay() ){ |
| | | cellcolumn := cell.FinancialSalesColumn(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= cellcolumn.Period() and engine.EndDate() >= cellcolumn.Period() ); |
| | | if( not isnull( enginecost ) ){ |
| | | column := selectobject( table, Column, column, column.Name() = cell.FinancialSalesColumn().Name() ); |
| | | //大è¿å¤ç§åºåºåºè´¹ç¨ |
| | | ccrow.SetDLRentOutCost( column, enginecost, cell ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | iscc := table.IsInUnit( destisp, ccunit ); |
| | | if( isdl and iscc ){ |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | //å¨è¿è¾ææ¬åæ°è¡¨éæ¾å°å卿ºå¯¹åºè¿è¾åä»·åè£
载容é |
| | | transcost := selectobject( owner, LogisticsCostTransport, trans, trans.Origin() = tprow.SourceStockpoingPointID() |
| | | transcosts := selectset( owner, LogisticsCostTransport, trans, 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( enginecost ) and not isnull( transcost ) ){ |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 and not isnull( transcosts ) and transcosts.Size() > 0 ){ |
| | | row := table.GetRow( product.ID() ); |
| | | products.Add( product ); |
| | | traverse( tprow,TransferPlanCell, tpcell, tpcell.TransferPlanColumn().ColumnDate() <> Date::MinDate() and [Number]tpcell.Value() > 0){ |
| | | periodtime := tpcell.TransferPlanColumn().ColumnDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | 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 ); |
| | | tpcolumndate := tpcell.TransferPlanColumn().ColumnDate(); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= tpcolumndate and engine.EndDate() >= tpcolumndate ); |
| | | transcost := selectobject( transcosts, Elements, trans, trans.StartDate() <= tpcolumndate and trans.EndDate() >= tpcolumndate ); |
| | | if( not isnull( enginecost ) and not isnull( transcost ) ){ |
| | | periodtime := tpcolumndate.StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | |
| | | 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 ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | product := forecast.Product_MP(); |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | products.Add( forecast.Product_MP() ); |
| | | |
| | | //æ¥è¯¢å¯¹åºçå卿ºææ¬ |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | row := table.GetRow( forecast.ProductID() ); |
| | | if( not isnull( enginecosts ) and enginecosts.Size() > 0 ){ |
| | | products.Add( forecast.Product_MP() ); |
| | | row := table.GetRow( forecast.ProductID() ); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() > 0 ){ |
| | | periodtime := psdip.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // 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 ); |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= psdip.StartDate() and engine.EndDate() >= psdip.StartDate() ); |
| | | if( not isnull( enginecost ) ){ |
| | | periodtime := psdip.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | // 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 ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | productparents := product.GetAllParent(); |
| | | if( exists( productparents, Elements, e, e.ID() = produtparent ) ){//æ¥è¯¢äº§åç±»åæ¯å卿º |
| | | row := table.GetRow( pisp.ProductID() ); |
| | | products.Add( pisp.Product_MP() ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | |
| | | if( isccrent ){ |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorageCost( cell.CCRentStorageCost() + cost ); |
| | | } |
| | | } else { |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( owner, LogisticsCostEngine, engine, engine.Generation().ToLower() = product.Generation().ToLower() |
| | | and engine.MLB_MQB() = product.MQBMLB() |
| | | and engine.Factory() = dlunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.DLRentStorageCost( cell.DLRentStorageCost() + cost );; |
| | | } |
| | | } |
| | | } |
| | | enginecosts := selectset( owner, LogisticsCostEngine, engine, 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 ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, Column, column, column.Name() = periodname and column.StartDate() = periodtime ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | |
| | | if( isccrent ){ |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() |
| | | and engine.Factory() = ccunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.CCRentStorageCost( cell.CCRentStorageCost() + cost ); |
| | | } |
| | | } else { |
| | | //å¨å卿ºææ¬åæ°è¡¨æ¾å°å¯¹åºçå
è£
容é |
| | | enginecost := selectobject( enginecosts, Elements, engine, engine.StartDate() <= pispip.Start().Date() and engine.EndDate() >= pispip.Start().Date() |
| | | and engine.Factory() = dlunit ); |
| | | if( not isnull( enginecost ) ){ |
| | | cost := ceil( [Number]pispip.NewSupplyQuantity() / enginecost.PackagingCapacity() ) * enginecost.StoragePrice();//åèäºå
¥ |
| | | cell.DLRentStorageCost( cell.DLRentStorageCost() + cost );; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | or ( cls.ProductFirst() = product2 and cls.ProductSecond() = product1 ) ) ) ){ |
| | | feedback := Translations::MP_ChangeLossSetting_Exist() |
| | | } |
| | | if( exists( owner, ChangeLossSetting, cls, cls <> old and not ( cls.StartDate() > enddate or cls.EndDate() < startdate ) ) ){ |
| | | if( feedback = '' and exists( owner, ChangeLossSetting, cls, cls <> old and not ( cls.StartDate() > enddate or cls.EndDate() < startdate ) ) ){ |
| | | feedback := Translations::MP_ChangeLossSetting_DateCoincide() |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsDay |
| | | { |
| | | #keys: '3[415136.0.1144791862][415136.0.1144791861][415136.0.1144791863]' |
| | | ValueType: Boolean |
| | | } |
| | |
| | | if( productids.ContainsAll( productid ) ){ |
| | | showrow := this.FinancialProductionRow( relnew, Name := row.Name(), Unit := row.Unit(), RowNr := row.RowNr() ); |
| | | |
| | | traverse( row, FinancialProductionCell, cell ){ |
| | | traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){ |
| | | column := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() ); |
| | | |
| | | sumcell := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow ); |
| | |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | //for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | // periodtime := start.Date(); |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime ); |
| | | //} |
| | | for( start := startofyear; start < startofnextyear; start := start + Duration::Days( 1 ) ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime ); |
| | | this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime, IsDay := true ); |
| | | if( start = start.StartOfMonth() ){ |
| | | this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime ); |
| | | } |
| | | } |
| | | *] |
| | | } |
| | |
| | | table.GenerateColumn( owner ); |
| | | //åå½åçæ¬çproduct planningénew supplyåæ®µï¼å大è¿åé¿æ¥å·¥åç产线ï¼è¿è¡å æ» |
| | | traverse( owner, StockingPoint_MP, stockingpoint ){ |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | unit := stockingpoint.Unit(); |
| | | parentunits := unit.GetAllParent(); |
| | | //æ¯å¦å±äºé¿æ¥å·¥å |
| | | iscc := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit ); |
| | | iscc := unit.ID() = ccalineunit or unit.ID() = ccmplineunit or exists( parentunits, Elements, punit, punit.ID() = ccalineunit or punit.ID() = ccmplineunit ); |
| | | //æ¯å¦å±äºå¤§è¿å·¥å |
| | | isdl := unit.ID() = dlalienunit or unit.ID() = dlmplineunit or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit ); |
| | | isdl := unit.ID() = dlalienunit or unit.ID() = dlmplineunit or exists( parentunits, Elements, punit, punit.ID() = dlalienunit or punit.ID() = dlmplineunit ); |
| | | if( iscc or isdl ){ |
| | | traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() |
| | | and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ) ){ |
| | | //è·åå·¥åè¡ |
| | | factoryrow := table.GetRowByUnit( pisp.Product_MP(), ifexpr( iscc, ccunit, dlunit ) ); |
| | | factoryrow := table.GetRowByUnit( pisp.Product_MP(), ifexpr( iscc, ccunit, dlunit ) ); |
| | | //è·ååè®¡è¡ |
| | | allrow := table.GetRowByUnit( pisp.Product_MP(), allunit ); |
| | | allrow := table.GetRowByUnit( pisp.Product_MP(), allunit ); |
| | | products.Add( pisp.Product_MP() ); |
| | | //å½product planningçæ¥æåºé´å¨éè¦çæ¥æåºé´å
|
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | |
| | | dayperiodtime := pispip.Start().Date(); |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | quantity := [Number]pispip.NewSupplyQuantity();//åèäºå
¥ |
| | | daycolumn := selectobject( table, FinancialProductionColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | factoryrow.Initialize( daycolumn, quantity ); |
| | | factoryrow.Initialize( column, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsDay |
| | | { |
| | | #keys: '3[415136.0.1144791876][415136.0.1144791875][415136.0.1144791877]' |
| | | ValueType: Boolean |
| | | } |
| | |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | //for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | // periodtime := start.Date(); |
| | | // periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime ); |
| | | //} |
| | | for( start := startofyear; start < startofnextyear; start := start + Duration::Days( 1 ) ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime ); |
| | | this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime, IsDay := true ); |
| | | if( start = start.StartOfMonth() ){ |
| | | this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime ); |
| | | } |
| | | } |
| | | *] |
| | | } |
| | |
| | | |
| | | products.Add( product ); |
| | | traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ){ |
| | | dayperiodtime := psdip.StartDate(); |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := psdip.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | // info( '-------------------------', periodname, periodtime ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | // info( '-------------------------', column.Name() ); |
| | | quantity := [Number]psdip.Quantity();//åèäºå
¥ |
| | | |
| | | factoryrow.Initialize( column, quantity ); |
| | | factoryrow.Initialize( daycolumn, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | | } |
| | | } |
| | |
| | | ccrow := table.GetRow( ccunit, product ); |
| | | products.Add( product ); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.DependentDemandAndSalesDemandQuantity() <> 0 ){ |
| | | dayperiodtime := pispip.Start().Date(); |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | quantity := [Number]pispip.DependentDemandAndSalesDemandQuantity();//åèäºå
¥ |
| | | |
| | | ccrow.Initialize( column, quantity );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | ccrow.Initialize( daycolumn, quantity ); |
| | | allrow.Initialize( column, quantity ); |
| | | } |
| | | } |
| | |
| | | if( isdlspline and isccrent ){ |
| | | traverse( laneleg, Trip, trip, trip.Arrival() < startofnextyearlead and exists( trip, ProductInTrip, pit, pit.Quantity() <> 0 ) ){ |
| | | // periodtime := ( trip.Arrival() - FinancialSalesReport::GetDefaultTripLeadingTime() ).StartOfMonth().Date(); |
| | | dayperiodtime := trip.Departure().Date(); |
| | | dayperiodname := dayperiodtime.Format( "M2/D2/Y" ); |
| | | periodtime := trip.Departure().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | daycolumn := selectobject( table, FinancialSalesColumn, column, column.Name() = dayperiodname and column.Period() = dayperiodtime and column.IsDay() ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() ); |
| | | if( not isnull( column ) ){ |
| | | traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){ |
| | | product := pit.Product_MP(); |
| | |
| | | quantity := [Number]pit.Quantity();//åèäºå
¥ |
| | | dlrow := table.GetRow( dlunit, pit.Product_MP() ); |
| | | dlrow.Initialize( column, quantity );//æ±æ»æ°é |
| | | dlrow.Initialize( daycolumn, quantity ); |
| | | |
| | | allrow := table.GetRow( allunit, pit.Product_MP() ); |
| | | allrow.Initialize( column, quantity ); |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'FinancialProductionReport' |
| | | FixedFilter: 'not object.FinancialProductionColumn().IsDay()' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'FinancialProductionColumn.FinancialProductionCell' |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'FinancialProductionReport' |
| | | FixedFilter: 'not object.IsDay()' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'FinancialProductionColumn' |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'FinancialSalesReport' |
| | | FixedFilter: 'not object.FinancialSalesColumn().IsDay()' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'FinancialSalesColumn.FinancialSalesCell' |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'FinancialSalesReport' |
| | | FixedFilter: 'not object.IsDay()' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'FinancialSalesColumn' |