已重命名1个文件
已修改20个文件
已添加4个文件
已删除6个文件
| | |
| | | #parent: #root |
| | | Method GetRow ( |
| | | String salessegment, |
| | | String product, |
| | | DateTime startdate, |
| | | DateTime enddate |
| | | String product |
| | | ) as FinancialSalesRow |
| | | { |
| | | TextBody: |
| | |
| | | if( isnull( row ) ){ |
| | | row := this.FinancialSalesRow( relnew, Name := product, Unit := salessegment ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell( this, startdate, enddate ); |
| | | row.InitializeCell( this ); |
| | | } |
| | | |
| | | return row; |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeCell ( |
| | | FinancialSalesReport table, |
| | | DateTime startdate, |
| | | DateTime enddate |
| | | FinancialSalesReport table |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | for( start := startdate; start < enddate; start := start.StartOfNextMonth() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | |
| | | traverse( table, FinancialSalesColumn, column ){ |
| | | this.Initialize( column, this.Unit() ); |
| | | } |
| | | *] |
| | |
| | | table := source.FinancialSalesReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); |
| | | showtable := source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); |
| | | startofplanning := owner.StartOfPlanning(); |
| | | startofyear := startofplanning.StartOfYear(); |
| | | //startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | search := source.FinancialSalesSearch( relnew, Unit := allsalessegment, Generation := allsalessegment, MqbMlb := allsalessegment, Power := allsalessegment ); |
| | |
| | | traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear.Date() and ( ( forecast.SalesSegmentName() = ccsalessegment and forecast.Product_MP().MQBMLB() = 'MLB' ) |
| | | or forecast.SalesSegmentName() = tjsalessegment or forecast.SalesSegmentName() = fssalessegment ) ){ |
| | | product := forecast.Product_MP(); |
| | | allrow := table.GetRow( allsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | allrow := table.GetRow( allsalessegment, product.ID() ); |
| | | periodtime := forecast.StartDate().StartOfMonth(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | |
| | | //ForecastçSales Segmentä¸ºé¿æ¥ï¼è¯å«åºMLBçææäº§åæ±æ» |
| | | if( forecast.SalesSegmentName() = ccsalessegment and product.MQBMLB() = 'MLB' ){ |
| | | // info( '------------------------', column.Name() ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID() ); |
| | | // info( '------------------------', ccrow.FinancialSalesCell( relsize ), column.FinancialSalesCell( relsize ) ); |
| | | ccrow.Initialize( column, forecast.Quantity() ); |
| | | }else if( forecast.SalesSegmentName() = tjsalessegment or forecast.SalesSegmentName() = fssalessegment ){ |
| | | //大è¿è´¢å¡ééï¼é¦å
å¨forecastç颿¥æ¾Sales Segmentæ¯å¤©æ´¥åä½å±±çææéæ±ï¼æ¯ä¸ªäº§åæææ±æ»éæ±æ°é |
| | | // info( '------------------------', column.Name() ); |
| | | dlrow := table.GetRow( dlsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | dlrow := table.GetRow( dlsalessegment, product.ID() ); |
| | | // info( '------------------------', dlrow.FinancialSalesCell( relsize ), column.FinancialSalesCell( relsize ) ); |
| | | dlrow.Initialize( column, forecast.Quantity() ); |
| | | } |
| | |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | ccrow := table.GetRow( ccsalessegment, product.ID() ); |
| | | ccrow.Initialize( column, pispip.DependentDemandAndSalesDemandQuantity() );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | |
| | | allrow := table.GetRow( allsalessegment, product.ID(), startofyear, startofnextyear ); |
| | | allrow := table.GetRow( allsalessegment, product.ID() ); |
| | | allrow.Initialize( column, pispip.DependentDemandAndSalesDemandQuantity() ); |
| | | } |
| | | } |
| | |
| | | |
| | | column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | traverse( trip, ProductInTrip, pit ){ |
| | | dlrow := table.GetRow( dlsalessegment, pit.ProductID(), startofyear, startofnextyear ); |
| | | dlrow := table.GetRow( dlsalessegment, pit.ProductID() ); |
| | | dlrow.Initialize( column, pit.Quantity() );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | |
| | | allrow := table.GetRow( allsalessegment, pit.ProductID(), startofyear, startofnextyear ); |
| | | allrow := table.GetRow( allsalessegment, pit.ProductID() ); |
| | | allrow.Initialize( column, pit.Quantity() ); |
| | | } |
| | | } |
ÎļþÃû´Ó _Main/BL/Type_InventorySummaryColumn/Attribute_Category.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Category |
| | | Attribute TimeUnit |
| | | { |
| | | #keys: '3[415136.0.865101993][415136.0.865101992][415136.0.865101994]' |
| | | Description: 'day;week;month' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateCell ( |
| | | InventoryPointSelections selections, |
| | | Strings ccstockingpointids, |
| | | Strings dlstockingpointids, |
| | | InventorySummaryReport table, |
| | | Date start, |
| | | Date end, |
| | | String productid, |
| | | String allunit, |
| | | String ccunit, |
| | | String dlunit |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-3-2024 (created) |
| | | //All |
| | | alldetails := selectset( selections, Elements.InventoryInterfaceDataDetail, detail, detail.PartNumber() = productid and detail.Date() >= start and detail.Date() <= end ); |
| | | if( alldetails.Size() > 0 ){ |
| | | allrow := table.GetRow( allunit, productid ); |
| | | allvalue := sum( alldetails, Elements, e, e.Quantity() ); |
| | | allrow.SetCellValue( this, allvalue ); |
| | | //é¿æ¥ |
| | | ccdetails := selectset( alldetails, Elements, detail, ccstockingpointids.Find( detail.InventoryPointSelection().StockpoingPoint() ) >= 0 ); |
| | | if( ccdetails.Size() > 0 ){ |
| | | ccrow := table.GetRow( ccunit, productid ); |
| | | value := sum( ccdetails, Elements, e, e.Quantity() ); |
| | | ccrow.SetCellValue( this, value ); |
| | | } |
| | | //å¤§è¿ |
| | | dldetails := selectset( alldetails, Elements, detail, dlstockingpointids.Find( detail.InventoryPointSelection().StockpoingPoint() ) >= 0 ); |
| | | if( dldetails.Size() > 0 ){ |
| | | dlrow := table.GetRow( dlunit, productid ); |
| | | value := sum( dldetails, Elements, e, e.Quantity() ); |
| | | dlrow.SetCellValue( this, value ); |
| | | } |
| | | } |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Clear |
| | | Method Clear ( |
| | | String timeunit, |
| | | DateTime starttime, |
| | | DateTime endtime |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | |
| | | this.InventorySummaryColumn( relflush ); |
| | | this.InventroySummaryRow( relflush ); |
| | | |
| | | this.GenerateColumn( this.InventorySummarySource().MacroPlan() ); |
| | | this.GenerateColumn( this.InventorySummarySource().MacroPlan(), timeunit, starttime, endtime ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | startofplanning := search.InventorySummarySource().MacroPlan().StartOfPlanning(); |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofendyear := startofplanning.StartOfNextYear() - Duration::Days( 1 ); |
| | | //æ¥è¯¢æ¥æè¿åéè¦å¨è®¡åæ¥æä¹å
|
| | | if( search.StartDate().DateTime() < startofendyear and search.EndDate().DateTime() > startofyear ){ |
| | | table := selectobject( this, InventorySummarySource.InventorySummaryReport, report, not report.IsShow() ); |
| | | allunit := '<All>'; |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear(); |
| | | this.Clear( search.Category(), search.StartDate().DateTime(), search.EndDate().DateTime() ); |
| | | //è¿æ»¤åç产åid |
| | | productids := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() ) |
| | | and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() ) |
| | | and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() ); |
| | | sumrow := this.InventroySummaryRow( relnew, Name := 'SUM', Unit := search.Unit(), RowNr := table.InventroySummaryRow( relsize ) ); |
| | | sumrow.InitializeCell( this ); |
| | | traverse( table, InventroySummaryRow, row, row.Unit() = search.Unit() ){ |
| | | productid := construct( Strings ); |
| | | productid.Add( row.Name() ); |
| | |
| | | if( productids.ContainsAll( productid ) ){ |
| | | showrow := this.InventroySummaryRow( relnew, Name := row.Name(), Unit := row.Unit(), RowNr := row.RowNr() ); |
| | | |
| | | traverse( row, InventorySummaryCell, cell ){ |
| | | // column := selectobject( this, InventorySummaryColumn, column, column.Name() = cell.InventorySummaryColumn().Name() ); |
| | | // |
| | | // sumcell := selectobject( column, InventorySummaryCell, c, c.InventroySummaryRow() = sumrow ); |
| | | // if( isnull( sumcell ) ){ |
| | | // sumcell := column.InventorySummaryCell( relnew, Value := '0' ); |
| | | // sumrow.InventorySummaryCell( relinsert, sumcell ); |
| | | // } |
| | | // |
| | | // showcell := column.InventorySummaryCell( relnew, Value := cell.Value() ); |
| | | // showrow.InventorySummaryCell( relinsert, showcell ); |
| | | // value := [Real]cell.Value() + [Real]sumcell.Value(); |
| | | // sumcell.Value( [String]value ); |
| | | traverse( row, InventorySummaryCell, cell, cell.InventorySummaryColumn().TimeUnit() = search.Category() ){ |
| | | column := selectobject( this, InventorySummaryColumn, column, column.Name() = cell.InventorySummaryColumn().Name() ); |
| | | |
| | | sumcell := selectobject( column, InventorySummaryCell, c, c.InventroySummaryRow() = sumrow ); |
| | | |
| | | showcell := column.InventorySummaryCell( relnew, EndingInventory := cell.EndingInventory(), MinimumInventory := cell.MinimumInventory(), MaximumInventory := cell.MaximumInventory(), AverageInventory := cell.AverageInventory() ); |
| | | showrow.InventorySummaryCell( relinsert, showcell ); |
| | | sumcell.EndingInventory( sumcell.EndingInventory() + cell.EndingInventory() ); |
| | | sumcell.MinimumInventory( sumcell.MinimumInventory() + cell.MinimumInventory() ); |
| | | sumcell.MaximumInventory( sumcell.MaximumInventory() + cell.MaximumInventory() ); |
| | | sumcell.AverageInventory( sumcell.AverageInventory() + cell.AverageInventory() ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateColumn ( |
| | | MacroPlan owner |
| | | MacroPlan owner, |
| | | String timeunit, |
| | | DateTime starttime, |
| | | DateTime endtime |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | startofplanning := owner.StartOfPlanning(); |
| | | startofyear := startofplanning.StartOfYear(); |
| | | startofnextyear := startofplanning.StartOfNextYear(); |
| | | |
| | | for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ |
| | | startofendyear := startofplanning.StartOfNextYear() - Duration::Days( 1 ); |
| | | //æ¥è¯¢æ¥æè¿åéè¦å¨è®¡åæ¥æä¹å
|
| | | if( starttime < startofendyear and endtime > startofyear ){ |
| | | if( starttime < startofyear ){ |
| | | starttime := startofyear; |
| | | } |
| | | if( endtime > startofendyear ){ |
| | | endtime := startofendyear; |
| | | } |
| | | for( start := starttime; start <= endtime; start := start.StartOfNextDay() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | this.InventorySummaryColumn( relnew, Name := periodname, Period := periodtime ); |
| | | |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | this.InventorySummaryColumn( relnew, Name := periodname, Period := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | if( periodtime = weekend ){ |
| | | this.InventorySummaryColumn( relnew, Name := periodname, Period := periodtime, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | } |
| | | if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | |
| | | if( periodtime = monthend ){ |
| | | this.InventorySummaryColumn( relnew, Name := periodname, Period := periodtime, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | Method GetRow ( |
| | | String unit, |
| | | String product, |
| | | DateTime startdate, |
| | | DateTime enddate |
| | | String product |
| | | ) as InventroySummaryRow |
| | | { |
| | | TextBody: |
| | |
| | | if( isnull( row ) ){ |
| | | row := this.InventroySummaryRow( relnew, Name := product, Unit := unit ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell( this, startdate, enddate ); |
| | | row.InitializeCell( this ); |
| | | } |
| | | |
| | | return row; |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | return 'é¿æ¥'; |
| | | //return 'China'; |
| | | //return 'é¿æ¥'; |
| | | return 'Assembly Plant (France)'; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | return '大è¿'; |
| | | //return 'Foregin'; |
| | | //return '大è¿'; |
| | | return 'Assembly Plant (Spain)'; |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Initialize ( |
| | | MacroPlan owner |
| | | MacroPlan owner, |
| | | InterfaceDataset interface |
| | | ) |
| | | { |
| | | Description: 'åå§å' |
| | |
| | | |
| | | search := source.InventorySummarySearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | |
| | | table.GenerateColumn( owner ); |
| | | |
| | | //ä»Product planningæ¥æ¾åºåç¹ä¸ºé¿æ¥è£
é
线边åºçææMQB产åï¼åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | table.GenerateColumn( owner, 'All', startofyear, startofnextyear ); |
| | | //info( '-----------------------------------', table.InventorySummaryColumn( relsize ) ); |
| | | //åºåæ°é为Actual inventorieséé¢çç¹Planned inventoriesåæ®µåºåéå æ» |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | unit := pisp.StockingPoint_MP().UnitID(); |
| | | product := pisp.Product_MP(); |
| | | traverse( pisp, ProductInStockingPointInPeriod, pispip, pispip.Start() >= startofplanning |
| | | and pispip.Start() < startofnextyear and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Month() ){ |
| | | periodtime := pispip.Start().StartOfMonth().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | ccrow := table.GetRow( ccunit, product.ID(), startofyear, startofnextyear ); |
| | | ccrow.Initialize( column, pispip );//åTotal Demandåæ®µæææ±æ»éæ±æ°é |
| | | // info( '-----------------------------------', unit, product.ID() ); |
| | | weekpispips := construct( ProductInStockingPointInPeriods ); |
| | | monthpispips := construct( ProductInStockingPointInPeriods ); |
| | | nextweek := startofplanning.StartOfNextWeek(); |
| | | nextmonth := startofplanning.StartOfNextMonth(); |
| | | |
| | | allrow := table.GetRow( allunit, product.ID(), startofyear, startofnextyear ); |
| | | allrow.Initialize( column, pispip ); |
| | | unitrow := table.GetRow( unit, product.ID() ); |
| | | allrow := table.GetRow( allunit, product.ID() ); |
| | | pispips := selectsortedset( pisp, ProductInStockingPointInPeriod, pispip, pispip.Start() >= startofplanning and pispip.Start() < startofnextyear and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day(), pispip.Start() ); |
| | | info( '-----------------------------------', isnull( allrow ), pispips.Size() ); |
| | | traverse( pispips, Elements, pispip ){ |
| | | info( '-----------------------------------', pispip.Start() ); |
| | | period := pispip.Period_MP(); |
| | | periodtime := period.Start().Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | //天ï¼éæ©æ¥é¢ç²åº¦æ¶ï¼ææ«åºåï¼æå°åºåï¼æå¤§åºååå¹³ååºåçæ°å¼ä¿æä¸è´ |
| | | daycolumn := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.Period() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Day() ); |
| | | unitrow.SetCellValue( daycolumn, pispip.PlannedInventoryLevelEnd() ); |
| | | allrow.SetCellValue( daycolumn, pispip.PlannedInventoryLevelEnd() ); |
| | | |
| | | //å¨ï¼éæ©å¨æ¶ï¼ææ«åºå为æ¯ä¸å¨æåä¸å¤©çæ±æ»åºåä¿¡æ¯ï¼æå°åºå为è¿ä¸å¨åºåéæå°çä¸å¤©çæ°å¼ï¼æå¤§åºå为è¿ä¸å¨åºåéæå¤§çä¸å¤©çæ°å¼ï¼å¹³ååºå为该å¨çå¹³åå¼ |
| | | if( period.Start() < nextweek ){ |
| | | weekpispips.Add( pispip ); |
| | | |
| | | weekend := nextweek - Duration::Days( 1 ); |
| | | if( period.Start() = weekend ){ |
| | | weekcolumn := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.Period() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Week() ); |
| | | |
| | | maxinventory := max( weekpispips, Elements, e, e.PlannedInventoryLevelEnd() ); |
| | | mininventory := min( weekpispips, Elements, e, e.PlannedInventoryLevelEnd() ); |
| | | aveinventory := average( weekpispips, Elements, e, e.PlannedInventoryLevelEnd() ); |
| | | unitrow.SetCellValue( weekcolumn, pispip.PlannedInventoryLevelEnd(), mininventory, maxinventory, aveinventory ); |
| | | allrow.SetCellValue( weekcolumn, pispip.PlannedInventoryLevelEnd(), mininventory, maxinventory, aveinventory ); |
| | | } |
| | | }else{ |
| | | weekpispips.Flush(); |
| | | weekpispips.Add( pispip ); |
| | | nextweek := nextweek.StartOfNextWeek(); |
| | | } |
| | | |
| | | //æï¼éæ©ææ¶ï¼ææ«åºå为æ¯ä¸ææåä¸å¤©çæ±æ»åºåä¿¡æ¯ï¼æå°åºå为è¿ä¸ä¸ªæåºåéæå°çä¸å¤©çæ°å¼ï¼æå¤§åºå为è¿ä¸ä¸ªæåºåéæå¤§çä¸å¤©çæ°å¼ï¼å¹³ååºå为该æçå¹³åå¼ |
| | | if( period.Start() < nextmonth ){ |
| | | monthpispips.Add( pispip ); |
| | | |
| | | monthend := nextmonth - Duration::Days( 1 ); |
| | | if( period.Start() = monthend ){ |
| | | monthcolumn := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname, column.Period() = periodtime, column.TimeUnit() = Translations::MP_GlobalParameters_Month() ); |
| | | |
| | | maxinventory := max( monthpispips, Elements, e, e.PlannedInventoryLevelEnd() ); |
| | | mininventory := min( monthpispips, Elements, e, e.PlannedInventoryLevelEnd() ); |
| | | aveinventory := average( monthpispips, Elements, e, e.PlannedInventoryLevelEnd() ); |
| | | unitrow.SetCellValue( monthcolumn, pispip.PlannedInventoryLevelEnd(), mininventory, maxinventory, aveinventory ); |
| | | allrow.SetCellValue( monthcolumn, pispip.PlannedInventoryLevelEnd(), mininventory, maxinventory, aveinventory ); |
| | | } |
| | | }else{ |
| | | monthpispips.Flush(); |
| | | monthpispips.Add( pispip ); |
| | | nextmonth := nextmonth.StartOfNextMonth(); |
| | | } |
| | | } |
| | | } |
| | | //é¦å
å¨Entitieséè¯å«ç¶çº§Unitä¸ºé¿æ¥/大è¿çææåºåç¹ |
| | | //é¿æ¥åºåç¹ |
| | | ccsps := construct( Strings ); |
| | | //大è¿åºåç¹ |
| | | dlsps := construct( Strings ); |
| | | allsps := construct( Strings ); |
| | | traverse( owner, Unit, unit, unit.ID() = ccunit or unit.ID() = dlunit ){ |
| | | if( unit.ID() = ccunit ){ |
| | | ccsps := selectuniquevalues( unit, StockingPoint_MP, sp, sp.ID() ); |
| | | } |
| | | if( unit.ID() = dlunit ){ |
| | | dlsps := selectuniquevalues( unit, StockingPoint_MP, sp, sp.ID() ); |
| | | } |
| | | allsps := allsps.Union( selectuniquevalues( unit, StockingPoint_MP, sp, sp.ID() ) ); |
| | | } |
| | | //åå¨åºåæ´æ°çåçé¢åºåç¹éæ©ä¸æ¾å°è¿äºåºåç¹æå
³èçå·²å¾éåºä½ |
| | | selections := selectset( interface, InventoryPointSelection, selection, allsps.Find( selection.StockpoingPoint() ) >= 0 and selection.IsIncluded() ); |
| | | productids := selectuniquevalues( selections, Elements, selection, selection.ProductID() ); |
| | | //æåå°è¿äºåºä½ä¸é¶ä»¶å·çæ°éè¿è¡å æ» |
| | | traverse( table, InventorySummaryColumn, column, column.Period() < startofplanning.Date() ){ |
| | | traverse( productids, Elements, productid ){ |
| | | if( column.TimeUnit() = Translations::MP_GlobalParameters_Day() ){//天 |
| | | column.GenerateCell( selections, ccsps, dlsps, table, column.Period(), column.Period(), productid, allunit, ccunit, dlunit ); |
| | | }else if( column.TimeUnit() = Translations::MP_GlobalParameters_Week() ){//å¨ |
| | | column.GenerateCell( selections, ccsps, dlsps, table, column.Period().StartOfWeek(), column.Period(), productid, allunit, ccunit, dlunit ); |
| | | }else if( column.TimeUnit() = Translations::MP_GlobalParameters_Month() ){//æ |
| | | column.GenerateCell( selections, ccsps, dlsps, table, column.Period().StartOfMonth(), column.Period(), productid, allunit, ccunit, dlunit ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | rows := selectsortedset( table, InventroySummaryRow, row, row.Name() ); |
| | | i := 0; |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := column.InventorySummaryCell( relnew ); |
| | | cell := column.InventorySummaryCell( relnew, AverageInventory := 0, EndingInventory := 0, MaximumInventory := 0, MinimumInventory := 0 ); |
| | | |
| | | this.InventorySummaryCell( relinsert, cell ); |
| | | *] |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeCell ( |
| | | InventorySummaryReport table, |
| | | DateTime startdate, |
| | | DateTime enddate |
| | | InventorySummaryReport table |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-28-2024 (created) |
| | | for( start := startdate; start < enddate; start := start.StartOfNextMonth() ){ |
| | | periodtime := start.Date(); |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | column := selectobject( table, InventorySummaryColumn, column, column.Name() = periodname and column.Period() = periodtime ); |
| | | |
| | | traverse( table, InventorySummaryColumn, column ){ |
| | | this.Initialize( column, this.Unit() ); |
| | | } |
| | | *] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetCellValue ( |
| | | InventorySummaryColumn column, |
| | | Real quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, InventorySummaryCell, cell, cell.InventorySummaryColumn() = column ); |
| | | |
| | | cell.AverageInventory( cell.AverageInventory() + quantity ); |
| | | cell.EndingInventory( cell.EndingInventory() + quantity ); |
| | | cell.MaximumInventory( cell.MaximumInventory() + quantity ); |
| | | cell.MinimumInventory( cell.MinimumInventory() + quantity ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method SetCellValue ( |
| | | InventorySummaryColumn column, |
| | | Real endinginventory, |
| | | Real minimuminventory, |
| | | Real maximuminventory, |
| | | Real averageinventory |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-24-2024 (created) |
| | | cell := selectobject( this, InventorySummaryCell, cell, cell.InventorySummaryColumn() = column ); |
| | | |
| | | cell.AverageInventory( cell.AverageInventory() + averageinventory ); |
| | | cell.EndingInventory( cell.EndingInventory() + endinginventory ); |
| | | cell.MaximumInventory( cell.MaximumInventory() + maximuminventory ); |
| | | cell.MinimumInventory( cell.MinimumInventory() + minimuminventory ); |
| | | *] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //åå§å |
| | | if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){ |
| | | //if( not exists( MacroPlan, FinancialProductionSource, source, not source.IsImport() ) ){ |
| | | FinancialProductionSource::Initialize( MacroPlan ); |
| | | } |
| | | //} |
| | | //info( '------------------1----------------' ); |
| | | table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and table.IsShow() ); |
| | | info( '------------------2----------------', table.IsImport(), table.IsShow() ); |
| | | //info( '------------------2----------------', table.IsImport(), table.IsShow() ); |
| | | DataHolderTable.Data( table ); |
| | | |
| | | dhSearch.Data( table.FinancialProductionSource().FinancialProductionSearch() ); |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | if( not exists( MacroPlan, FinancialSalesSource, source, not source.IsImport() ) ){ |
| | | //if( not exists( MacroPlan, FinancialSalesSource, source, not source.IsImport() ) ){ |
| | | FinancialSalesSource::Initialize( MacroPlan ); |
| | | } |
| | | //} |
| | | //info( '------------------1----------------' ); |
| | | table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() ); |
| | | info( '------------------2----------------', table.IsImport(), table.IsShow() ); |
| | | //info( '------------------2----------------', table.IsImport(), table.IsShow() ); |
| | | DataHolderTable.Data( table ); |
| | | |
| | | dhSearch.Data( table.FinancialSalesSource().FinancialSalesSearch() ); |
| | |
| | | Body: |
| | | [* |
| | | |
| | | valueString := "<All>;" + FinancialProductionReport::GetDefaultCCUnit() + ";" + FinancialProductionReport::GetDefaultDLUnit(); |
| | | valueString := "<All>;" + FinancialSalesReport::GetSalesSegmentCC() + ";" + FinancialSalesReport::GetSalesSegmentDL(); |
| | | |
| | | this.Strings( valueString ); |
| | | *] |
| | |
| | | BaseType: 'WebDateSelector' |
| | | Properties: |
| | | [ |
| | | Date: 9999-12-31 |
| | | Label: 'End date' |
| | | Taborder: 1 |
| | | ] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | if( not isnull( MacroPlan.InventorySummarySource() ) ){ |
| | | InventorySummarySource::Initialize( MacroPlan ); |
| | | } |
| | | //if( not isnull( MacroPlan.InventorySummarySource() ) ){ |
| | | InventorySummarySource::Initialize( MacroPlan, InterfaceDataset ); |
| | | //} |
| | | //info( '------------------1----------------' ); |
| | | table := selectobject( MacroPlan, InventorySummarySource.InventorySummaryReport, table, table.IsShow() ); |
| | | info( '------------------2----------------', table.IsShow() ); |
| | | //info( '------------------2----------------', table.IsShow() ); |
| | | DataHolderTable.Data( table ); |
| | | |
| | | dhSearch.Data( table.InventorySummarySource().InventorySummarySearch() ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelCategory/RadioButtonGroupUseForPlanning_545 |
| | | Response OnCreated () id:Response_PanelCategory_RadioButtonGroupUseForPlanning_OnCreated |
| | | { |
| | | #keys: '[415136.0.875614032]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | this.ButtonValues( Translations::MP_GlobalParameters_Day() + ';' + Translations::MP_GlobalParameters_Week() + ';' + Translations::MP_GlobalParameters_Month() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //æ¥ææ¹ååå·æ°æ¾ç¤º |
| | | if( this.Date() < DateSelectorStart.Date() ){ |
| | | this.HintError( 'The end date cannot be less than the start date!' ); |
| | | }else{ |
| | | if( dhSearch.Data().EndDate() <> this.Date() ){ |
| | | dhSearch.Data().EndDate( this.Date() ); |
| | | DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //æ¥ææ¹ååå·æ°æ¾ç¤º |
| | | if( this.Date() > DateSelectorEnd.Date() ){ |
| | | this.HintError( 'The start date cannot be later than the end date!' ); |
| | | }else{ |
| | | if( dhSearch.Data().StartDate() <> this.Date() ){ |
| | | dhSearch.Data().StartDate( this.Date() ); |
| | | DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | |
| | | valueString := "<All>;" + FinancialProductionReport::GetDefaultCCUnit() + ";" + FinancialProductionReport::GetDefaultDLUnit(); |
| | | valueString := "<All>;" + InventorySummaryReport::GetDefaultCCUnit() + ";" + InventorySummaryReport::GetDefaultDLUnit(); |
| | | |
| | | this.Strings( valueString ); |
| | | *] |