From 36591e37383ae4bbb4cc2d3a3c98a35ab0a321dc Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 02 一月 2025 16:08:44 +0800
Subject: [PATCH] 发动机库存同步时同步DType字段

---
 _Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl b/_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
index 6f4953b..8943020 100644
--- a/_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
+++ b/_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
@@ -8,24 +8,25 @@
   String inventory,
   String fac,
   Number quantitiy
-)
+) as InventoryInterfaceDataDetail
 {
   TextBody:
   [*
     // 鐢勫叞楦� Jul-26-2024 (created)
-    iid := selectobject( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date and iid.PartNumber() = partno );
+    iid           := selectobject( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date and iid.PartNumber() = partno );
     if( isnull( iid ) ){
-      iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno );
+      iid         := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno );
     }
-    product    := selectobject( macroplan, Product_MP, product, product.ID() = partno );
+    product       := selectobject( macroplan, Product_MP, product, product.ID() = partno );
     if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){
       quantitiy   := floor( [Real]quantitiy / 4 );
     }
-    iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac );
+    iidl          := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac );
     if( isnull( iidl ) ){
-      iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy );
+      iidl        := iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy );
     }else{
-      iidl.Quantity( );
+      iidl.Quantity( quantitiy );
     }
+    return iidl;
   *]
 }

--
Gitblit v1.9.3