From 86554b0379e1afd8e2b41f834231fa953ade3833 Mon Sep 17 00:00:00 2001
From: yypsybs <yypsybs@foxmail.com>
Date: 星期一, 16 十月 2023 18:06:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
index 5d283ea..d2fe1c9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -6,7 +6,7 @@
[*
// Disabled button to prevent the possibility of multiple firing
- macroPlanOld := MacroPlan;
+ //macroPlanOld := MacroPlan;
btnOK.Enabled( false, '' )
@@ -31,6 +31,13 @@
if( data.Name() = "" ){
data.Name( versionname );
}
+
+ // Get Business Type from Scenario Name
+ businesstype := select( globalotdtable,
+ BusinessType,
+ b,
+ b.ScenarioName()=data.ScenarioName() ).BusinessTypeName();
+ data.BusinessType( businesstype );
// Copy scenario
if( isnull( data.WrappedInstance() ) )
@@ -103,13 +110,16 @@
}
macroPlanNew := MacroPlan;
- ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
+ //ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
// sync data
if( data.EnableSync() ) {
MacroPlan::DoSync( macroPlanNew,
- data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() );
+ data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable);
}
+ macroPlanNew.BusinessType( businesstype );
+ macroPlanNew.IsKeyProduct( data.IsKeyProduct() );
+ macroPlanNew.CreatePurchaseSupplyMaterial( data.CreatePurchaseSupplyMaterial() );
this.Close();
*]
--
Gitblit v1.9.3