Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enum Request] AssignItemCharges > SelectionTxt #20441

Open
fvet opened this issue Sep 26, 2022 · 0 comments
Open

[Enum Request] AssignItemCharges > SelectionTxt #20441

fvet opened this issue Sep 26, 2022 · 0 comments
Labels
enum-request Request for adding an enum value or type SCM GitHub request for SCM area

Comments

@fvet
Copy link
Contributor

fvet commented Sep 26, 2022

Extending Item Charges is quit complex given the current implementation of using hardcoded text values instead of enums.
In our apps, we have added new options to assign item charges as well as some setup to have default item charge methods. (= requiring a 'custom' item charge method enum)

Can you please provide an extensible enum "Item Charge Method" in the Base Application with the default options?


    Extensible = true;

    value(0; Equally)
    {
        Caption = 'Equally';
    }
    value(1; "By Amount")
    {
        Caption = 'By Amount';
    }
    value(2; "By Weight")
    {
        Caption = 'By Weight';
    }
    value(3; "By Volume")
    {
        Caption = 'By Volume';
    }

And in the places (codeunit 5807 "Item Charge Assgnt. (Sales)" / purchase) where used, replace the hardcoded text constants by the new "Item Charge Method" enum?

procedure AssignItemCharges(SalesLine: Record "Sales Line"; TotalQtyToAssign: Decimal; TotalAmtToAssign: Decimal; SelectionTxt: Text)

...

case SelectionTxt of
                AssignEquallyMenuText:

...

procedure AssignEquallyMenuText(): Text
    begin
        exit(EquallyTok)
    end;

Above 'hardcoded' construct should be feasible to replace by enums by looping the enums ordinals / names and dynamically build the strmenu / selection page.

@AlexanderYakunin AlexanderYakunin added the enum-request Request for adding an enum value or type label Sep 27, 2022
@JesperSchulz JesperSchulz added the SCM GitHub request for SCM area label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enum-request Request for adding an enum value or type SCM GitHub request for SCM area
Projects
None yet
Development

No branches or pull requests

3 participants