From ad81ba0fcc6ff3ca0576056bc494a110a6a691ea Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期三, 23 十月 2024 17:50:32 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
index 18b51ad..f4def0f 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -8,7 +8,9 @@
TextBody:
[*
// 鐢勫叞楦� Jun-24-2024 (created)
- owner.FinancialSalesSource( relflush );
+ traverse( owner, FinancialSalesSource, source, not source.IsImport() ){
+ source.Delete();
+ }
owner.FSImportData( relflush );
productids := construct( Strings );
allunit := FinancialSalesReport::GetDefaultAllUnit();
@@ -20,12 +22,12 @@
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 );
+ source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
startofplanning := owner.StartOfPlanning().Date();
//startofyear := startofplanning.StartOfYear();
startofnextyear := startofplanning.StartOfNextYear();
- search := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
+ //search := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
table.GenerateColumn( owner );
@@ -81,7 +83,7 @@
traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
and pispip.Period_MP().StartDate() < startofnextyear
and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
- dayperiodtime := ( pispip.Start() + Duration::Days( 1 ) ).Date();
+ dayperiodtime := pispip.Start().Date();
dayperiodname := dayperiodtime.Format( "M2/D2/Y" );
periodtime := dayperiodtime.StartOfMonth();
periodname := periodtime.Format( "M2/D2/Y" );
@@ -131,7 +133,11 @@
// }
// }
//}
- factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
- showtable.Generate( search, factorys, productids );
+ excelsource := selectobject( owner, FinancialSalesSource, excelsource, excelsource.IsImport() );
+ if( not isnull( excelsource ) ){
+ excelsource.AfterImport();
+ }
+ //factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
+ //showtable.Generate( search, factorys, productids );
*]
}
--
Gitblit v1.9.3