lazhen
2025-01-02 20093dec32a0c814f1db43e87c904890fd8a086f
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
@@ -7,7 +7,8 @@
  String partno,
  String inventory,
  String fac,
  Number quantitiy
  Number quantitiy,
  String dtype
) as InventoryInterfaceDataDetail
{
  TextBody:
@@ -21,9 +22,9 @@
    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 and detail.Dtype() = dtype );
    if( isnull( iidl ) ){
      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, Dtype := dtype );
    }else{
      iidl.Quantity( quantitiy );
    }