From 94ab2bd0381925ecf01a2f1a812b114d0f82d5bb Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期三, 14 八月 2024 14:52:52 +0800 Subject: [PATCH] 报表页面中文 --- _Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-) diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl index a2ed74a..e521df4 100644 --- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl +++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Initialize.qbl @@ -32,7 +32,8 @@ table.GenerateColumn( owner ); //棣栧厛鍦╢orecast鐣岄潰鏌ユ壘sales segment涓洪暱鏄ョ殑鎵�鏈夐渶姹傦紝璇嗗埆鍑篗LB鐨勬墍鏈変骇鍝侊紝姣忎釜浜у搧鎸夋湀姹囨�婚渶姹傛暟閲� - traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear ){ + traverse( owner, SalesDemand.astype( Forecast ), forecast, forecast.StartDate() < startofnextyear and forecast.Quantity() <> 0 + and exists( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ) ){ salessegment := forecast.SalesSegment_MP(); parentsalessegments := salessegment.GetAllParent(); //鏄惁灞炰簬闀挎槬 @@ -50,10 +51,8 @@ //鑾峰彇宸ュ巶琛� factoryrow := table.GetRow( ifexpr( iscc and forecast.Product_MP().MQBMLB() = 'MLB', ccunit, dlunit ), product ); - if( products.Find( product ) < 0 ){ - products.Add( product ); - } - traverse( forecast, PlanningSalesDemandInPeriod, psdip ){ + products.Add( product ); + traverse( forecast, PlanningSalesDemandInPeriod, psdip, psdip.Quantity() <> 0 ){ periodtime := psdip.StartDate().StartOfMonth(); periodname := periodtime.Format( "M2/D2/Y" ); // info( '-------------------------', periodname, periodtime ); @@ -73,10 +72,13 @@ //鏄惁灞炰簬闀挎槬瑁呴厤绾� // iscc := unit.ID() = ccspline or exists( parentunits, Elements, punit, punit.ID() = ccspline ); if( table.IsInUnit( stockingpoint, ccspline ) ){ - traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and pisp.Product_MP().MQBMLB() = 'MQB' ){//浜у搧涓篗QB - allrow := table.GetRow( allunit, pisp.Product_MP() ); - ccrow := table.GetRow( ccunit, pisp.Product_MP() ); - traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear ){ + traverse( stockingpoint, ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and pisp.Product_MP().MQBMLB() = 'MQB' + and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.DependentDemandAndSalesDemandQuantity() <> 0 ) ){//浜у搧涓篗QB + product := pisp.Product_MP(); + allrow := table.GetRow( allunit, product ); + 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 ){ periodtime := pispip.Start().StartOfMonth().Date(); periodname := periodtime.Format( "M2/D2/Y" ); column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); @@ -98,19 +100,21 @@ destisp := selectobject( owner, StockingPoint_MP, sp, sp.ID() = laneleg.DestinationStockingPointID() ); isccrent := table.IsInUnit( destisp, ccrent ); if( isdlspline and isccrent ){ - traverse( laneleg, Trip, trip, trip.Arrival() < startofnextyearlead ){ + traverse( laneleg, Trip, trip, trip.Arrival() < startofnextyearlead and exists( trip, ProductInTrip, pit, pit.Quantity() <> 0 ) ){ // periodtime := ( trip.Arrival() - FinancialSalesReport::GetDefaultTripLeadingTime() ).StartOfMonth().Date(); periodtime := trip.Departure().StartOfMonth().Date(); periodname := periodtime.Format( "M2/D2/Y" ); column := selectobject( table, FinancialSalesColumn, column, column.Name() = periodname and column.Period() = periodtime ); if( not isnull( column ) ){ - traverse( trip, ProductInTrip, pit ){ - quantity := [Number]pit.Quantity();//鍥涜垗浜斿叆 - dlrow := table.GetRow( dlunit, pit.Product_MP() ); + traverse( trip, ProductInTrip, pit, pit.Quantity() <> 0 ){ + product := pit.Product_MP(); + products.Add( product ); + quantity := [Number]pit.Quantity();//鍥涜垗浜斿叆 + dlrow := table.GetRow( dlunit, pit.Product_MP() ); dlrow.Initialize( column, quantity );//姹囨�绘暟閲� - allrow := table.GetRow( allunit, pit.Product_MP() ); + allrow := table.GetRow( allunit, pit.Product_MP() ); allrow.Initialize( column, quantity ); } } -- Gitblit v1.9.3