File: al.actual

package info (click to toggle)
golang-github-alecthomas-chroma-v2 2.12.0-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 9,172 kB
  • sloc: xml: 38,564; python: 422; javascript: 357; sh: 37; makefile: 36
file content (98 lines) | stat: -rw-r--r-- 2,043 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/// <summary>
/// Manage Loyalty Benefits
/// </summary>
codeunit 50100 "Loyalty Benefits Management"
{
    var
        Vendor: record Vendor;

    trigger OnRun()
    begin
    end;

    /// <summary>
    /// Adjust a Sales Order with loyalty level
    /// </summary>
    /// <param name="SalesHeader">Sales Header to adjust based on Customer Loyalty</param>
    procedure AdjustForLoyalty(var SalesHeader: record "Sales Header"): Integer;
    var
        Customer: record Customer;
        LoyaltyBenefits: interface ILoyaltyBenefits;
        Discount: Decimal;
    begin
        Customer.Get(SalesHeader."Sell-to Customer No.");

        LoyaltyBenefits := Customer.Loyalty;
        Discount := 1;
        Discount := LoyaltyBenefits.GetDiscount();
        ApplyDiscount(SalesHeader, Discount);
    end;

    /// <summary>
    /// Applies the Discount to the Sales Order
    /// </summary>
    /// <param name="SalesHeader">Sales Order</param>
    /// <param name="Discount">Discount to apply</param>
    local procedure "Apply Discount"(SalesHeader: record "Sales Header"; Discount: Decimal)
    begin
        // TODO: Implement
    end;
}


enum 50140 SomeEnum
{
    value(0; None) { }
}

#region interface stuff

interface ISuperGreat
{
    procedure YesSir("c in c": codeunit FooBar);
}

#endregion

table 50100 Customer
{
    Access = Internal;
    TableType = Normal;

    fields
    {
        field(1; "P K"; Integer)
        {
        }
    }
}

/// <summary>
/// Add the Loyalty fields to the Customer table.
/// </summary>
tableextension 50100 LoyaltyCustomerExt extends Customer
{
    fields
    {
        /// <summary>
        /// Customer loyalty.
        /// </summary>
        field(50100; Loyalty; enum LoyaltyLevel)
        {
        }
    }
}

/// <summary>
/// Adds the Loyalty field to the General group on the "Customer Card"
/// </summary>
pageextension 50100 LoyaltyCustCardExt extends "Customer Card"
{
    layout
    {
        addlast(General)
        {
            field(Loyalty; Rec.Loyalty) { }
        }
    }
}