ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Enum Request] Table 83 Field 90 "Order Type"

Open GuntherGebauer opened this issue 7 years ago • 4 comments

Please implement field 90 "Order Type" in table 83 and other tables (32, 5802, 5832) as enum

GuntherGebauer avatar Dec 19 '18 15:12 GuntherGebauer

Hello GuntherGebauer,

We have been looking at your request to extend the Order Type enum in various tables. We would like your opinion on the implementation that we made to support your requirement.

On the Item Journal Line (& Value Entry and other tables), we will have the following new procedures & events:

[External]
PROCEDURE IsOrderTypeProduction@96() Result : Boolean;
BEGIN
  CASE "Order Type" OF
    "Order Type"::Production:
      EXIT(TRUE);
    ELSE
      OnIsOrderTypeProduction(Result);
  END;
END;

[External]
PROCEDURE IsOrderTypeAssembly@103() Result : Boolean;
BEGIN
  CASE "Order Type" OF
    "Order Type"::Assembly:
      EXIT(TRUE);
    ELSE
      OnIsOrderTypeAssembly(Result);
  END;
END;

[External]
PROCEDURE IsOrderTypeTransfer@104() Result : Boolean;
BEGIN
  CASE "Order Type" OF
    "Order Type"::Transfer:
      EXIT(TRUE);
    ELSE
      OnIsOrderTypeTransfer(Result);
  END;
END;

[Integration(TRUE)]
LOCAL PROCEDURE OnIsOrderTypeProduction@100(VAR Result@1000 : Boolean);
BEGIN
END;

[Integration(TRUE)]
LOCAL PROCEDURE OnIsOrderTypeAssembly@101(VAR Result@1000 : Boolean);
BEGIN
END;

[Integration(TRUE)]
LOCAL PROCEDURE OnIsOrderTypeTransfer@102(VAR Result@1000 : Boolean);
BEGIN
END;

Based on the above, we are changing code in the following places and it would help if you gave your input on these changes as can be seen in the attached document. Note the lines in Red indicate deleted code and the lines in Green indicate lines added to the code. CodeChanges.docx

DuttaSoumya avatar Jan 11 '19 14:01 DuttaSoumya

Hello @DuttaSoumya,

that does not help if that is the only change. We Need more: see e.g. table 83 - CreateDim

on several fields there is coded IF ((NOT ("Order Type" IN ["Order Type"::Production,"Order Type"::Assembly])) OR ("Order No." = '')) AND NOT "Phys. Inventory" THEN CreateDim(

has to be changed to if ((not (IsOrderTyperProduction OR IsOrderTypeAssembly)) ("Order No." = '')) AND NOT "Phys. Inventory"

additonal Event trigger OnBeforeCreateDim is needed

On field 91 and 92 "Order No." and "Order Line No." the coding has to bechanged as well and additional Event trigger are needed:

old: CASE "Order Type" OF "Order Type"::Production,"Order Type"::Assembly:

new ?? case "Order Type" of

IsOrderTypeProduction: ProdOrder.GET

Is OrderTypeAssembly: AssemblyHeader.GET

else OnIsOrderTypeElse ???

Actually we are using our own "Order Type"::Deboning which is the opposite type busniess compared with Assembly/production. You have 1 Item of consumption (e.g. Ham,Pork,Meat) and the Output are severel items as "Ham nut", "Ham lower Shell", "Ham bone", "Ham Skin" and so on.

with "Order type" as enum we can adapt table 83 with table Extension for OrderType=Deboning.

GuntherGebauer avatar Jan 14 '19 07:01 GuntherGebauer

Thanks @GuntherGebauer for your feedback. We agree to your comments and will make the implementation likewise.

Only one comment: we shall not be introducing new events in the OnValidate trigger for fields 91 and 92, simply because one can easily subscribe to TAB83::OnAfterValidateEvent for the correct field number and extend the implementation there.

DuttaSoumya avatar Jan 14 '19 09:01 DuttaSoumya

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

bc-ghost avatar Nov 05 '19 07:11 bc-ghost