| | |
| | | |
| | | table.GenerateColumn( owner ); |
| | | |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and not isnull( pisp.StockingPoint_MP() ) and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | unit := pisp.StockingPoint_MP().UnitID(); |
| | | info( unit, pisp.ProductID() ); |
| | | ccrow := null( FinancialProductionRow ); |
| | |
| | | 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 ) ){ |
| | | traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and not isnull( pisp.StockingPoint_MP() ) and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){ |
| | | unit := pisp.StockingPoint_MP().UnitID(); |
| | | product := pisp.Product_MP(); |
| | | // info( '-----------------------------------', unit, product.ID() ); |
| | |
| | | feedback_o := Translations::MP_LibCal_Event_ValidDate(); |
| | | } |
| | | return feedback_o = ''; |
| | | //return true; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MaxDayDate |
| | | { |
| | | #keys: '3[415136.0.960591378][415136.0.960591377][415136.0.960591379]' |
| | | Description: 'æå¤§æ¥æ-天' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MaxMonthDate |
| | | { |
| | | #keys: '3[415136.0.960591412][415136.0.960591411][415136.0.960591413]' |
| | | Description: 'æå¤§æ¥æ-æ' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MaxWeekDate |
| | | { |
| | | #keys: '3[415136.0.960591398][415136.0.960591397][415136.0.960591399]' |
| | | Description: 'æå¤§æ¥æ-å¨' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinDayDate |
| | | { |
| | | #keys: '3[415136.0.960591388][415136.0.960591387][415136.0.960591389]' |
| | | Description: 'æå°æ¥æ-天' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinMonthDate |
| | | { |
| | | #keys: '3[415136.0.960591419][415136.0.960591418][415136.0.960591420]' |
| | | Description: 'æå°æ¥æ-æ' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute MinWeekDate |
| | | { |
| | | #keys: '3[415136.0.960591405][415136.0.960591404][415136.0.960591406]' |
| | | Description: 'æå°æ¥æ-å¨' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxDayDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day(), column.Period() ); |
| | | |
| | | this.MaxDayDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxMonthDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Month(), column.Period() ); |
| | | |
| | | this.MaxMonthDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMaxWeekDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Week(), column.Period() ); |
| | | |
| | | this.MaxWeekDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMinDayDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day(), column.Period() ); |
| | | |
| | | this.MinDayDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMinMonthDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Month(), column.Period() ); |
| | | |
| | | this.MinMonthDate( value.Period() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcMinWeekDate |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | |
| | | value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Week(), column.Period() ); |
| | | |
| | | this.MinWeekDate( value.Period() ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-26-2024 (created) |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ) ); |
| | | column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ), column.TimeUnit() = timeunit ); |
| | | if( isnull( column ) ){ |
| | | column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time, TimeUnit := timeunit ); |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | //info( '----------------------1------------------------', this.LibCal_SubscriberEventColumn( relsize ) ); |
| | | //traverse( this, LibCal_SubscriberEventColumn, column ){ |
| | | // traverse( this, LibCal_SubscriberEventRow, row ){ |
| | | // if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) { |
| | | // cell := column.LibCal_SubscriberEventCell( relnew, Value := '' ); |
| | | // row.LibCal_SubscriberEventCell( relinsert, cell ); |
| | | // info( '------------------------', column.Name(), column.Period(), column.TimeUnit() ); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxDayDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxWeekDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxMonthDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinDayDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinWeekDate ) ); |
| | | Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinMonthDate ) ); |
| | | this.ProcessColumnDay(); |
| | | this.ProcessColumnWeek(); |
| | | this.ProcessColumnMonth(); |
| | | traverse( this, LibCal_SubscriberEventColumn, column ){ |
| | | traverse( this, LibCal_SubscriberEventRow, row ){ |
| | | if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) { |
| | | cell := column.LibCal_SubscriberEventCell( relnew, Value := '' ); |
| | | row.LibCal_SubscriberEventCell( relinsert, cell ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ProcessColumnDay |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | day := ( this.MinDayDate() + Duration::Days( 1 ) ).Date(); |
| | | |
| | | while( day < this.MaxDayDate() ){ |
| | | if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){ |
| | | this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | day := ( day + Duration::Days( 1 ) ).Date(); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ProcessColumnMonth |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | day := this.MinDayDate().StartOfNextMonth(); |
| | | |
| | | while( day < this.MaxDayDate() ){ |
| | | if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){ |
| | | this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | } |
| | | day := this.MinDayDate().StartOfNextMonth(); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method ProcessColumnWeek |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-1-2024 (created) |
| | | day := this.MinDayDate().StartOfNextWeek(); |
| | | |
| | | while( day < this.MaxDayDate() ){ |
| | | if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){ |
| | | this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | } |
| | | day := day.StartOfNextWeek(); |
| | | } |
| | | *] |
| | | } |