Page 30128 Shpfy Order Shipping Charges

Shopify Connector, Microsoft.Integration.Shopify

src/Apps/W1/Shopify/App/src/Shipping/Pages/ShpfyOrderShippingCharges.Page.al148 lines, Copyright (c) Microsoft Corporation. MIT

// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace Microsoft.Integration.Shopify;/// <summary>/// Page Shpfy Order Shipping Charges (ID 30128)./// </summary>page 30128 "Shpfy Order Shipping Charges"{    Caption = 'Shopify Order Shipping Charges';    DeleteAllowed = false;    Editable = false;    InsertAllowed = false;    ModifyAllowed = false;    PageType = List;    SourceTable = "Shpfy Order Shipping Charges";    UsageCategory = None;    layout    {        area(content)        {            repeater(Group)            {                field(ShopifyShippingLineId; Rec."Shopify Shipping Line Id")                {                    ApplicationArea = All;                    Visible = false;                    ToolTip = 'Specifies a unique identifier for the shipping.';                }                field(ShopifyOrderId; Rec."Shopify Order Id")                {                    ApplicationArea = All;                    Visible = false;                    ToolTip = 'Specifies a unique identifier for the order.';                }                field(Title; Rec.Title)                {                    ApplicationArea = All;                    ToolTip = 'Specifies the delivery method in Shopify.';                }                field(Amount; Rec.Amount)                {                    ApplicationArea = All;                    ToolTip = 'Specifies the shipping cost amount.';                }                field(PresentmentAmount; Rec."Presentment Amount")                {                    ApplicationArea = All;                    Visible = PresentmentCurrencyVisible;                }                field("Discount Amount"; Rec."Discount Amount")                {                    ApplicationArea = All;                    ToolTip = 'Specifies the shipping cost discount amount.';                }                field("Presentment Discount Amount"; Rec."Presentment Discount Amount")                {                    ApplicationArea = All;                    Visible = PresentmentCurrencyVisible;                }                field(Source; Rec.Source)                {                    ApplicationArea = All;                    ToolTip = 'Specifies the origin of the shipping cost.';                }            }        }        area(factboxes)        {            systempart(Links; Links)            {                ApplicationArea = All;                Visible = false;            }            systempart(Notes; Notes)            {                ApplicationArea = All;            }        }    }    actions    {        area(Processing)        {            action(TaxLines)            {                ApplicationArea = All;                Caption = 'Tax Lines';                Image = TaxDetail;                ToolTip = 'View the tax lines for the selected shipping charge.';                trigger OnAction();                var                    OrderTaxLine: Record "Shpfy Order Tax Line";                begin                    OrderTaxLine.SetRange("Parent Id", Rec."Shopify Shipping Line Id");                    Page.Run(Page::"Shpfy Order Tax Lines", OrderTaxLine);                end;            }            action(RetrievedShopifyData)            {                ApplicationArea = All;                Caption = 'Retrieved Shopify Data';                Image = Entry;                ToolTip = 'View the data retrieved from Shopify.';                trigger OnAction();                var                    DataCapture: Record "Shpfy Data Capture";                begin                    DataCapture.SetCurrentKey("Linked To Table", "Linked To Id");                    DataCapture.SetRange("Linked To Table", Database::"Shpfy Order Shipping Charges");                    DataCapture.SetRange("Linked To Id", Rec.SystemId);                    Page.Run(Page::"Shpfy Data Capture List", DataCapture);                end;            }        }        area(Promoted)        {            actionref(TaxLines_Promoted; TaxLines) { }            actionref(RetrievedShopifyData_Promoted; RetrievedShopifyData) { }        }    }    var        PresentmentCurrencyVisible: Boolean;    trigger OnAfterGetRecord()    begin        SetShowPresentmentCurrencyVisibility();    end;    local procedure SetShowPresentmentCurrencyVisibility()    var        OrderHeader: Record "Shpfy Order Header";    begin        if not OrderHeader.Get(Rec."Shopify Order Id") then            exit;        PresentmentCurrencyVisible := OrderHeader.IsPresentmentCurrencyOrder();    end;}