_Main/BL/Relations/Relation_FinancialSalesSearch_FinancialSalesSource_FinancialSalesSource_Fina.qbl
@@ -16,7 +16,7 @@ RelationSide.RightSide FinancialSalesSearch { #keys: '3[415136.0.857450523][415136.0.857450522][415136.0.857450524]' Cardinality: '1toN' Cardinality: '0to1' ObjectDefinition: FinancialSalesSource OwningSide: 'Owned' } _Main/BL/Type_FinancialSalesReport/Method_Generate.qbl
@@ -1,7 +1,7 @@ Quintiq file version 2.0 #parent: #root Method Generate ( FinancialProductionSearch search, FinancialSalesSearch search, Product_MPs products ) { _Main/BL/Type_FinancialSalesReport/Method_GetRow.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: #root Method GetRow ( String salessegment, String product, DateTime startdate, DateTime enddate ) as FinancialSalesRow { TextBody: [* // çå °é¸½ Jun-28-2024 (created) row := selectobject( this, FinancialSalesRow, row, row.Name() = product and row.Unit() = salessegment ); if( isnull( row ) ){ row := this.FinancialSalesRow( relnew, Name := product, Unit := salessegment ); //åå§ååå æ ¼ row.InitializeCell( this, startdate, enddate ); } return row; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetDefaultAllUnit.qbl
ÎļþÒÑɾ³ý _Main/BL/Type_FinancialSalesReport/StaticMethod_GetDefaultCCUnit.qbl
ÎļþÒÑɾ³ý _Main/BL/Type_FinancialSalesReport/StaticMethod_GetDefaultDLUnit.qbl
ÎļþÒÑɾ³ý _Main/BL/Type_FinancialSalesReport/StaticMethod_GetDefaultName.qbl
@@ -5,6 +5,6 @@ TextBody: [* // çå °é¸½ Jun-25-2024 (created) return 'Financial productions'; return 'Financial sales'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetDefaultTripLeadingTime.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetDefaultTripLeadingTime () as Duration { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return Duration::Days( 2 ); *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetSalesSegmentAll.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetSalesSegmentAll () const as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return '<All>'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetSalesSegmentCC.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetSalesSegmentCC () const as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return 'é¿æ¥'; //return 'China'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetSalesSegmentDL.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetSalesSegmentDL () const as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return '大è¿'; //return 'Foregin'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetSalesSegmentFS.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetSalesSegmentFS () const as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return 'ä½å±±'; //return 'Germany'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetSalesSegmentTJ.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetSalesSegmentTJ () const as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return '天津'; //return 'USA'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetStockingPointCCLine.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetStockingPointCCLine () as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return 'é¿æ¥è£ é 线边åº'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetStockingPointCCRent.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetStockingPointCCRent () const as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return 'é¿æ¥å¤ç§åº'; *] } _Main/BL/Type_FinancialSalesReport/StaticMethod_GetStockingPointDLLine.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 #parent: #root StaticMethod GetStockingPointDLLine () as String { TextBody: [* // çå °é¸½ Jun-28-2024 (created) return '大è¿è£ é 线边åº'; *] } _Main/BL/Type_FinancialSalesRow/Method_Initialize0.qbl
@@ -1,6 +1,6 @@ Quintiq file version 2.0 #parent: #root Method Initialize0 ( Method Initialize ( FinancialSalesColumn column, Real quantity ) _Main/BL/Type_FinancialSalesRow/Method_InitializeCell.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ Quintiq file version 2.0 #parent: #root Method InitializeCell ( FinancialSalesReport table, DateTime startdate, DateTime enddate ) { 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 ); this.Initialize( column, this.Unit() ); } *] } _Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
@@ -8,7 +8,7 @@ TextBody: [* table := selectobject( macroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and table.IsShow() ); table := selectobject( macroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() ); xmlDOMI := XMLDOMImplementation::Create(); xmlDOM := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' ); @@ -33,7 +33,7 @@ tableElement.AppendChild( productcolumnelement ); tableElement.AppendChild( unitcolumnelement ); traverse ( table, FinancialProductionColumn, column ) { traverse ( table, FinancialSalesColumn, column ) { columnelement := xmlDOM.CreateElement( "column" ); nameelement := xmlDOM.CreateElement( "name" ); typeelement := xmlDOM.CreateElement( "type" ); @@ -42,11 +42,11 @@ columnelement.AppendChild( nameelement ); columnelement.AppendChild( typeelement ); cells := selectsortedset( column, FinancialProductionCell, cell, cell.FinancialProductionRow().RowNr() ); cells := selectsortedset( column, FinancialSalesCell, cell, cell.FinancialSalesRow().RowNr() ); traverse ( cells, Elements, c ) { if( column.Index() = 0 ){ row := c.FinancialProductionRow(); row := c.FinancialSalesRow(); //Product productcellElement := xmlDOM.CreateElement( "cell" ); productcellElement.SetAttribute( "value", row.Name() ); @@ -63,11 +63,11 @@ tableElement.AppendChild( columnelement ); } xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM ) xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM ); //info( xmlString ); tableGroupHandle := TableGroupHandle::Create( FinancialProductionReport::GetDefaultName() ); tableGroupHandle := TableGroupHandle::Create( FinancialSalesReport::GetDefaultName() ); tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) ); tableGroupHandle.Add( tableHandle ); _Main/BL/Type_FinancialSalesSource/StaticMethod_DownloadTemplate.qbl
@@ -29,7 +29,7 @@ //info( xmlString ); tableGroupHandle := TableGroupHandle::Create( FinancialProductionReport::GetDefaultName() ); tableGroupHandle := TableGroupHandle::Create( FinancialSalesReport::GetDefaultName() ); tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) ); tableGroupHandle.Add( tableHandle ); _Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl
@@ -4,77 +4,96 @@ MacroPlan owner ) { Description: 'åå§å' TextBody: [* // çå °é¸½ Jun-24-2024 (created) owner.FinancialProductionSource( relflush ); ccunit := FinancialProductionReport::GetDefaultCCUnit(); dlunit := FinancialProductionReport::GetDefaultDLUnit(); allunit := FinancialProductionReport::GetDefaultAllUnit(); source := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() ); table := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false ); showtable := source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true ); owner.FinancialSalesSource( relflush ); products := construct( Product_MPs ); allsalessegment := FinancialSalesReport::GetSalesSegmentAll(); ccsalessegment := FinancialSalesReport::GetSalesSegmentCC(); dlsalessegment := FinancialSalesReport::GetSalesSegmentDL(); tjsalessegment := FinancialSalesReport::GetSalesSegmentTJ(); fssalessegment := FinancialSalesReport::GetSalesSegmentFS(); ccspline := FinancialSalesReport::GetStockingPointCCLine(); dlspline := FinancialSalesReport::GetStockingPointDLLine(); ccrent := FinancialSalesReport::GetStockingPointCCRent(); source := owner.FinancialSalesSource( relnew, IsImport := false, Name := FinancialSalesReport::GetDefaultName() ); 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(); startofnextmonth := owner.StartOfPlanning().StartOfNextMonth(); startofyear := startofplanning.StartOfYear(); startofnextyear := startofplanning.StartOfNextYear(); search := source.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit ); products := construct( Product_MPs ); search := source.FinancialSalesSearch( relnew, Unit := allsalessegment, Generation := allsalessegment, MqbMlb := allsalessegment, Power := allsalessegment ); 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 ) ){ unit := pisp.StockingPoint_MP().UnitID(); info( unit, pisp.ProductID() ); ccrow := null( FinancialProductionRow ); dlrow := null( FinancialProductionRow ); allrow := selectobject( table, FinancialProductionRow, row, row.Name() = pisp.ProductID() and row.Unit() = allunit ); if( unit = ccunit ){ ccrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit ); }else{ dlrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := unit ); } if( isnull( allrow ) ){ products.Add( pisp.Product_MP() ); allrow := table.FinancialProductionRow( relnew, Name := pisp.ProductID(), Unit := allunit ); } //ä»Forecastæ¥è¯¢ 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 ); periodtime := forecast.StartDate().StartOfMonth(); periodname := periodtime.Format( "M2/D2/Y" ); for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){ periodtime := start.Date(); periodname := periodtime.Format( "M2/D2/Y" ); column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); if( not isnull( ccrow ) ){ ccrow.Initialize( column, ccunit ); } if( not isnull( dlrow ) ){ dlrow.Initialize( column, dlunit ); } if( not exists( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = column ) ){ allrow.Initialize( column, allunit ); } if( products.Find( product ) < 0 ){ products.Add( product ); } traverse( pisp, ProductInStockingPointInPeriod, pispip, pispip.Start() >= startofplanning and ( ( pispip.Start() < startofnextmonth and pispip.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day() ) or ( 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, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime ); if( not isnull( ccrow ) ){ ccrow.Initialize( column, pispip.NewSupplyProductionQuantity() ); // info( '------------------------', periodname, periodtime ); column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); // info( '------------------------', column.Name() ); //ForecastçSales Segmentä¸ºé¿æ¥ï¼è¯å«åºMLBçææäº§åæ±æ» if( forecast.SalesSegmentName() = ccsalessegment and product.MQBMLB() = 'MLB' ){ // info( '------------------------', column.Name() ); ccrow := table.GetRow( ccsalessegment, product.ID(), startofyear, startofnextyear ); // 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 ); // info( '------------------------', dlrow.FinancialSalesCell( relsize ), column.FinancialSalesCell( relsize ) ); dlrow.Initialize( column, forecast.Quantity() ); } allrow.Initialize( column, forecast.Quantity() ); } //ä»Product planningæ¥æ¾åºåç¹ä¸ºé¿æ¥è£ é 线边åºçææMQB产åï¼åTotal Demandåæ®µæææ±æ»éæ±æ°é traverse( owner, Product_MP, product, product.IsLeaf() and product.MQBMLB() = 'MQB' ){//产å为MQB traverse( product, ProductInStockingPoint_MP, pisp, pisp.StockingPointID() = ccspline ){//åºåç¹ä¸ºé¿æ¥è£ é çº¿è¾¹åº 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, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); ccrow := table.GetRow( ccsalessegment, product.ID(), startofyear, startofnextyear ); ccrow.Initialize( column, pispip.DependentDemandAndSalesDemandQuantity() );//åTotal Demandåæ®µæææ±æ»éæ±æ°é allrow := table.GetRow( allsalessegment, product.ID(), startofyear, startofnextyear ); allrow.Initialize( column, pispip.DependentDemandAndSalesDemandQuantity() ); } if( not isnull( dlrow ) ){ dlrow.Initialize( column, pispip.NewSupplyProductionQuantity() ); } allrow.Initialize( column, pispip.NewSupplyProductionQuantity() ); } } rows := selectsortedset( table, FinancialProductionRow, row, row.Name() ); startofnextyearlead := startofplanning.StartOfNextYear() + FinancialSalesReport::GetDefaultTripLeadingTime(); //大è¿è´¢å¡ééï¼é¿æ¥çéæ±éè¦å¨trip plané颿¾å°èµ·å§åºåç¹ä¸ºå¤§è¿è£ é 线边åºï¼ç®çå°ä¸ºé¿æ¥å¤ç§åºç产åï¼ç±äºéè¦èè产åè¿è¾lead timeï¼æ¯ä¸ªæçæ±æ»æ°æ®éè¦æ¨è¿ä¸¤å¤©è¿è¡è®¡ç® traverse( owner, Unit.Lane.LaneLeg, laneleg, laneleg.OriginStockingPointID() = dlspline and laneleg.DestinationStockingPointID() = ccrent ){ traverse( laneleg, Trip, trip, trip.Arrival() < startofnextyearlead ){ periodtime := ( trip.Arrival() - FinancialSalesReport::GetDefaultTripLeadingTime() ).StartOfMonth().Date(); periodname := periodtime.Format( "M2/D2/Y" ); 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.Initialize( column, pit.Quantity() );//åTotal Demandåæ®µæææ±æ»éæ±æ°é allrow := table.GetRow( allsalessegment, pit.ProductID(), startofyear, startofnextyear ); allrow.Initialize( column, pit.Quantity() ); } } } rows := selectsortedset( table, FinancialSalesRow, row, row.Name() ); i := 0; traverse( rows, Elements, e ){ e.RowNr( i ); _Main/BL/Type_FinancialSalesSource/StaticMethod_Upload.qbl
@@ -4,13 +4,13 @@ MacroPlan owner, BinaryValue binaryValue, String filePath ) as FinancialProductionSource ) as FinancialSalesSource { TextBody: [* fileName := filePath.Tokenize( "\" ).Element( filePath.Tokenize( "\" ).Size() - 1 ); source := owner.FinancialProductionSource( relnew, FileBinaryValue := binaryValue, source := owner.FinancialSalesSource( relnew, FileBinaryValue := binaryValue, Name := fileName, IsXLSX := fileName.EndsWith( "xlsx" ), IsImport := true, _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ActionBarGroupReport.def
@@ -16,6 +16,17 @@ Taborder: 0 ] } Component ButtonFinancialSalesReport { #keys: '[415136.0.861863635]' BaseType: 'WebButton' Properties: [ Image: 'MONEY_COINS2' Label: 'Financial sales report' Taborder: 1 ] } ] Properties: [ _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ActionBarGroupReport_ButtonFinancialSalesReport_OnClic.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ Quintiq file version 2.0 #parent: ActionBarGroupReport/ButtonFinancialSalesReport Response OnClick () id:Response_MacroPlanner_ActionBarGroupReport_ButtonFinancialSalesReport_OnClick { #keys: '[415136.0.861863801]' CanBindMultiple: false DefinitionID: 'Responsedef_WebButton_OnClick' QuillAction { Body: [* ApplicationScope.ViewManager().ResetUserViewById( "Financial_sales_report_view", true); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_ButtonExport_OnClick.def
@@ -15,7 +15,7 @@ [* binaryValue := FinancialProductionSource::Download( MacroPlan ); Application.Download( "Financial productions.xlsx", binaryValue.AsBinaryData() ); Application.Download( FinancialProductionReport::GetDefaultName() + '.xlsx', binaryValue.AsBinaryData() ); *] GroupServerCalls: false } _Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelFinancialProductionReportOperation_ButtonProductionExport_OnCl.def
@@ -15,7 +15,7 @@ [* binaryValue := FinancialProductionSource::DownloadTemplate( MacroPlan ); Application.Download( "Financial productions.xlsx", binaryValue.AsBinaryData() ); Application.Download( FinancialProductionReport::GetDefaultName() + '.xlsx', binaryValue.AsBinaryData() ); *] GroupServerCalls: false } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_MatrixEditorTable#623.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,97 @@ Quintiq file version 2.0 Component MatrixEditorTable id:MatrixEditorTable_623 { #keys: '[415136.0.858621867]' BaseType: 'WebMatrixEditor' Children: [ Component MatrixEditorCellTable { #keys: '[415136.0.858621868]' BaseType: 'WebMatrixEditorCell' Children: [ Component DataExtractorCell { #keys: '[415136.0.858621869]' BaseType: 'WebDataExtractor' Properties: [ DataType: 'FinancialSalesReport' Source: 'DataHolderTable' Taborder: 0 Transformation: 'FinancialSalesColumn.FinancialSalesCell' ] } ] Properties: [ Attributes: 'Value' Column: 'FinancialSalesColumn' Row: 'FinancialSalesRow' Taborder: 0 ] } Component MatrixEditorRowsTable { #keys: '[415136.0.858621870]' BaseType: 'WebMatrixEditorHeaderLevel' Children: [ Component DataExtractorRow { #keys: '[415136.0.858621871]' BaseType: 'WebDataExtractor' Properties: [ DataType: 'FinancialSalesReport' Source: 'DataHolderTable' Taborder: 0 Transformation: 'FinancialSalesRow' ] } ] Properties: [ Legend: 'Name' SortCriteria: 'RowNr' Taborder: 1 ] } Component MatrixEditorColumnsTable { #keys: '[415136.0.858621872]' BaseType: 'WebMatrixEditorHeaderLevel' Children: [ Component DataExtractorColumn { #keys: '[415136.0.858621873]' BaseType: 'WebDataExtractor' Properties: [ DataType: 'FinancialSalesReport' Source: 'DataHolderTable' Taborder: 0 Transformation: 'FinancialSalesColumn' ] } ] Properties: [ Legend: 'Name' SortCriteria: 'Index' Taborder: 2 ] } #child: matrixEditorActionBarPageTable_1 #child: matrixeditorContextMenuTable_1 ] Properties: [ Columns: 'MatrixEditorColumnsTable' ContextMenu: 'matrixeditorContextMenuTable' Rows: 'MatrixEditorRowsTable' Taborder: 0 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelExport#545.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ Quintiq file version 2.0 Component PanelExport id:PanelExport_545 { #keys: '[415136.0.858621784]' BaseType: 'WebPanel' Children: [ Component ButtonExport { #keys: '[415136.0.858621785]' BaseType: 'WebButton' Properties: [ Image: 'EXPORT1' Taborder: 0 ] } ] Properties: [ Orientation: 'horizontal' Taborder: 4 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReportHeader.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ Quintiq file version 2.0 Component PanelFinancialSalesReportHeader { #keys: '[415136.0.858621774]' BaseType: 'WebPanel' Children: [ #child: PanelFinancialSalesReportSearch #child: PanelFinancialSalesReportOperation ] Properties: [ FixedSize: true Taborder: 2 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReportOperation.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,46 @@ Quintiq file version 2.0 Component PanelFinancialSalesReportOperation { #keys: '[415136.0.858621786]' BaseType: 'WebPanel' Children: [ Component LabelFinancialSalesReportOperation { #keys: '[415136.0.858621787]' BaseType: 'WebLabel' Properties: [ NumberOfColumns: 15 Taborder: 0 Text: 'Sales import' ] } Component ButtonSalesImport { #keys: '[415136.0.858621788]' BaseType: 'WebButton' Properties: [ Image: 'EXPORT1' Taborder: 1 ] } Component ButtonSalesExport { #keys: '[415136.0.858621789]' BaseType: 'WebButton' Properties: [ Image: 'IMPORT1' Taborder: 2 ] } ] Properties: [ FixedSize: true Orientation: 'horizontal' Taborder: 1 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReportSearch.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ Quintiq file version 2.0 Component PanelFinancialSalesReportSearch { #keys: '[415136.0.858621775]' BaseType: 'WebPanel' Children: [ #child: PanelUnit_715 #child: PanelGeneration_844 #child: PanelMQBMLB_603 #child: PanelPower_858 #child: PanelExport_545 ] Properties: [ FixedSize: true Orientation: 'horizontal' Taborder: 0 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelGeneration#844.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ Quintiq file version 2.0 Component PanelGeneration id:PanelGeneration_844 { #keys: '[415136.0.858621778]' BaseType: 'WebPanel' Children: [ Component ddslGeneration { #keys: '[415136.0.858621779]' BaseType: 'WebDropDownStringList' Properties: [ Label: 'Generation' Taborder: 0 ] } ] Properties: [ Orientation: 'horizontal' Taborder: 1 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelMQBMLB#603.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ Quintiq file version 2.0 Component PanelMQBMLB id:PanelMQBMLB_603 { #keys: '[415136.0.858621780]' BaseType: 'WebPanel' Children: [ Component ddslMQBMLB { #keys: '[415136.0.858621781]' BaseType: 'WebDropDownStringList' Properties: [ Label: 'MQB/MLB' Taborder: 0 ] } ] Properties: [ Orientation: 'horizontal' Taborder: 2 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelPower#858.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ Quintiq file version 2.0 Component PanelPower id:PanelPower_858 { #keys: '[415136.0.858621782]' BaseType: 'WebPanel' Children: [ Component ddslPower { #keys: '[415136.0.858621783]' BaseType: 'WebDropDownStringList' Properties: [ Label: 'Power' Taborder: 0 ] } ] Properties: [ Orientation: 'horizontal' Taborder: 3 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelTable#424.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,14 @@ Quintiq file version 2.0 Component PanelTable id:PanelTable_424 { #keys: '[415136.0.858621866]' BaseType: 'WebPanel' Children: [ #child: MatrixEditorTable_623 ] Properties: [ Taborder: 3 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelUnit#715.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ Quintiq file version 2.0 Component PanelUnit id:PanelUnit_715 { #keys: '[415136.0.858621776]' BaseType: 'WebPanel' Children: [ Component ddslUnit { #keys: '[415136.0.858621777]' BaseType: 'WebDropDownStringList' Properties: [ Label: 'Unit' Taborder: 0 ] } ] Properties: [ Orientation: 'horizontal' Taborder: 0 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_matrixEditorActionBarPageTable#1.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 Component matrixEditorActionBarPageTable id:matrixEditorActionBarPageTable_1 { #keys: '[415136.0.858621874]' BaseType: 'matrixEditorActionBarPage' Properties: [ Taborder: 3 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_matrixeditorContextMenuTable#1.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ Quintiq file version 2.0 Component matrixeditorContextMenuTable id:matrixeditorContextMenuTable_1 { #keys: '[415136.0.858621875]' BaseType: 'matrixeditorContextMenu' Properties: [ Taborder: 4 ] } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,24 @@ Quintiq file version 2.0 #parent: #root Response OnCreated () id:Response_FormFinancialSalesReport_OnCreated { #keys: '[415136.0.858683122]' CanBindMultiple: false DefinitionID: 'Responsedef_WebComponent_OnCreated' QuillAction { Body: [* 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() ); DataHolderTable.Data( table ); dhSearch.Data( table.FinancialSalesSource().FinancialSalesSearch() ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_545_ButtonExport_OnClick.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: PanelExport_545/ButtonExport Response OnClick () id:Response_PanelExport_545_ButtonExport_OnClick { #keys: '[415136.0.858621765]' CanBindMultiple: false DefinitionID: 'Responsedef_WebButton_OnClick' Precondition: [* return not isnull( MacroPlan ); *] QuillAction { Body: [* binaryValue := FinancialSalesSource::Download( MacroPlan ); Application.Download( FinancialSalesReport::GetDefaultName() + '.xlsx', binaryValue.AsBinaryData() ); //owner.FinancialSalesSource( relflush ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelFinancialSalesReportOperation_ButtonSalesExport_OnClick.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ Quintiq file version 2.0 #parent: PanelFinancialSalesReportOperation/ButtonSalesExport Response OnClick () id:Response_PanelFinancialSalesReportOperation_ButtonSalesExport_OnClick { #keys: '[415136.0.858621763]' CanBindMultiple: false DefinitionID: 'Responsedef_WebButton_OnClick' Precondition: [* return not isnull( MacroPlan ); *] QuillAction { Body: [* binaryValue := FinancialSalesSource::DownloadTemplate( MacroPlan ); Application.Download( FinancialSalesReport::GetDefaultName() + '.xlsx', binaryValue.AsBinaryData() ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelFinancialSalesReportOperation_ButtonSalesImport_OnClick.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,47 @@ Quintiq file version 2.0 #parent: PanelFinancialSalesReportOperation/ButtonSalesImport Response OnClick () id:Response_PanelFinancialSalesReportOperation_ButtonSalesImport_OnClick { #keys: '[415136.0.858621764]' CanBindMultiple: false DefinitionID: 'Responsedef_WebButton_OnClick' Precondition: [* return not isnull( MacroPlan ); *] QuillAction { Body: [* try { uploadJsonString := Application.GetFile(); if ( uploadJsonString <> "" ) { uploadJson := JSON::Parse( uploadJsonString ); Archive::VerifyTheFileName( uploadJson ); fileName := uploadJson.Get( "name" ).GetString(); base64String := uploadJson.Get( "data" ).GetString(); webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue(); source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName ); source.ReadStructure(); //妿åå¨è®¡åå¼å§åçæ¥ææ°æ®éè¦ç¹å»ç¡®è®¤ if( not source.IsExistFutureMonthData() or ( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){ source.AfterImport(); DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); } WebMessageBox::Success( Translations::A_VWED_Success() ); traverse( MacroPlan, FinancialSalesSource, psource, psource.IsImport() and psource <> source ){ psource.Delete(); } } } onerror { WebMessageBox::Error( e.GeneralInformation() ); } *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelGeneration_844_ddslGeneration_OnCreated.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: PanelGeneration_844/ddslGeneration Response OnCreated () id:Response_PanelGeneration_844_ddslGeneration_OnCreated { #keys: '[415136.0.858621771]' CanBindMultiple: false DefinitionID: 'Responsedef_WebComponent_OnCreated' QuillAction { Body: [* values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Generation() ); valueString := values.Concatenate( ";" ); valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString; this.Strings( valueString ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelGeneration_844_ddslGeneration_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ Quintiq file version 2.0 #parent: PanelGeneration_844/ddslGeneration Response OnSelectionChanged () id:Response_PanelGeneration_844_ddslGeneration_OnSelectionChanged { #keys: '[415136.0.858621770]' CanBindMultiple: false DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' QuillAction { Body: [* //ä»£æ°æ¹ååå·æ°æ¾ç¤º if( dhSearch.Data().Generation() <> selection ){ dhSearch.Data().Generation( selection ); DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); } *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelMQBMLB_603_ddslMQBMLB_OnCreated.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: PanelMQBMLB_603/ddslMQBMLB Response OnCreated () id:Response_PanelMQBMLB_603_ddslMQBMLB_OnCreated { #keys: '[415136.0.858621769]' CanBindMultiple: false DefinitionID: 'Responsedef_WebComponent_OnCreated' QuillAction { Body: [* values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.MQBMLB() ); valueString := values.Concatenate( ";" ); valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString; this.Strings( valueString ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelMQBMLB_603_ddslMQBMLB_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ Quintiq file version 2.0 #parent: PanelMQBMLB_603/ddslMQBMLB Response OnSelectionChanged () id:Response_PanelMQBMLB_603_ddslMQBMLB_OnSelectionChanged { #keys: '[415136.0.858621768]' CanBindMultiple: false DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' QuillAction { Body: [* //æ¨ªçºµå¶æ¹ååå·æ°æ¾ç¤º if( dhSearch.Data().MqbMlb() <> selection ){ dhSearch.Data().MqbMlb( selection ); DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); } *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelPower_858_ddslPower_OnCreated.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: PanelPower_858/ddslPower Response OnCreated () id:Response_PanelPower_858_ddslPower_OnCreated { #keys: '[415136.0.858621767]' CanBindMultiple: false DefinitionID: 'Responsedef_WebComponent_OnCreated' QuillAction { Body: [* values := selectuniquevalues( MacroPlan, Product_MP, tempPMP, true, tempPMP.Power() ); valueString := values.Concatenate( ";" ); valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); valueString := "<All>" + ifexpr( valueString = "", "", ";" ) + valueString; this.Strings( valueString ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelPower_858_ddslPower_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ Quintiq file version 2.0 #parent: PanelPower_858/ddslPower Response OnSelectionChanged () id:Response_PanelPower_858_ddslPower_OnSelectionChanged { #keys: '[415136.0.858621766]' CanBindMultiple: false DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' QuillAction { Body: [* //åçæ¹ååå·æ°æ¾ç¤º if( dhSearch.Data().Power() <> selection ){ dhSearch.Data().Power( selection ); DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); } *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelUnit_715_ddslUnit_OnCreated.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,19 @@ Quintiq file version 2.0 #parent: PanelUnit_715/ddslUnit Response OnCreated () id:Response_PanelUnit_715_ddslUnit_OnCreated { #keys: '[415136.0.858621773]' CanBindMultiple: false DefinitionID: 'Responsedef_WebComponent_OnCreated' QuillAction { Body: [* valueString := "<All>;" + FinancialProductionReport::GetDefaultCCUnit() + ";" + FinancialProductionReport::GetDefaultDLUnit(); this.Strings( valueString ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelUnit_715_ddslUnit_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ Quintiq file version 2.0 #parent: PanelUnit_715/ddslUnit Response OnSelectionChanged () id:Response_PanelUnit_715_ddslUnit_OnSelectionChanged { #keys: '[415136.0.858621772]' CanBindMultiple: false DefinitionID: 'Responsedef_WebDropDownStringList_OnSelectionChanged' QuillAction { Body: [* //Unitæ´æ°åçææ°çæ¾ç¤º if( dhSearch.Data().Unit() <> selection ){ dhSearch.Data().Unit( selection ); DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); } *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/_ROOT_Component_FormFinancialSalesReport.def
@@ -27,5 +27,12 @@ Taborder: 1 ] } #child: PanelTable_424 #child: PanelFinancialSalesReportHeader ] Properties: [ Image: 'MONEY_COINS2' Title: 'Financial sales report' ] } _Main/UI/MacroPlannerWebApp/Views/Financial_sales_report_view.vw
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,120 @@ Quintiq file version 2.0 { viewcontents { forms { form_FormFinancialSalesReport { title: 'QMacroPlanner::FormFinancialSalesReport' shown: true componentID: 'QMacroPlanner::FormFinancialSalesReport' layout { mode: 'open' rowPosition: 1 rowSpan: 15 columnPosition: 1 columnSpan: 12 } components { FormFinancialSalesReport_PanelFinancialSalesReportHeader { sizeRatio: 1 } FormFinancialSalesReport_PanelFinancialSalesReportSearch { sizeRatio: 1 } FormFinancialSalesReport_PanelUnit { sizeRatio: 1 } FormFinancialSalesReport_PanelGeneration { sizeRatio: 1 } FormFinancialSalesReport_PanelMQBMLB { sizeRatio: 1 } FormFinancialSalesReport_PanelPower { sizeRatio: 1 } FormFinancialSalesReport_PanelExport { sizeRatio: 1 } FormFinancialSalesReport_PanelFinancialSalesReportOperation { sizeRatio: 1 } FormFinancialSalesReport_PanelTable { sizeRatio: 1 } FormFinancialSalesReport_MatrixEditorTable { gridColor: '#c4c4c4' totalHeaderWidth: 200 attributeHeaderWidthRatio: 0.6 nameHeaderWidthRatio: 0.4 columnWidth: 100 horizontalGrid: true verticalGrid: true backendState { componentId: 'QMacroPlanner::FormFinancialSalesReport.MatrixEditorTable' state { cells { attributes { attribute_Value { type: 'MatrixEditorWebApiCellDataModelInterest' index: 0 rowsubtotal: '' columnsubtotal: '' attribute: 'Value' } } } columns { sorting { criteria: "datamember:'Index'" } } rows { sorting { criteria: "datamember:'RowNr'" } } } } } } } } userconfigurableinformation { } page: '' group: '' index: 17 image: 'MONEY_COINS2' description: '' } formatversion: 2 id: 'Financial_sales_report_view' name: 'Financial sales report view' isglobal: false isroot: true } _var/_Main/ProjSettings/MacroPlanner/Views/Empty__dialog_initialization__[124808.0.140900041].vw
@@ -16,7 +16,7 @@ CREATIONUSER '' UPDATEDATETIME '2017-06-05T15:08:50' UPDATEUSER 'quintiq/dwe2' LASTACCESSDATE '2020-03-25' LASTACCESSDATE '2024-06-28' VIEWSCOPE 0 } AUTHORIZATIONS