-
Notifications
You must be signed in to change notification settings - Fork 0
/
MonobankAccounts.Page.al
162 lines (151 loc) · 4.67 KB
/
MonobankAccounts.Page.al
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
page 50181 "Monobank Accounts"
{
Caption = 'Monobank Accounts';
PageType = List;
SourceTable = "Monobank Account";
InsertAllowed = false;
ModifyAllowed = false;
ApplicationArea = All;
UsageCategory = Lists;
PromotedActionCategories = 'New,Sync,Navigate';
layout
{
area(content)
{
repeater(General)
{
field("Card Number"; Rec."Card Number")
{
ApplicationArea = All;
}
field("Account Id"; Rec."Account Id")
{
ApplicationArea = All;
Visible = false;
}
field(Type; Rec.Type)
{
ApplicationArea = All;
Width = 15;
}
field("Currency Code"; Rec."Currency Code")
{
ApplicationArea = All;
}
field("Currency Id"; Rec."Currency Id")
{
ApplicationArea = All;
Visible = false;
}
field("Balance"; Rec."Balance")
{
ApplicationArea = All;
}
field("Credit Limit"; Rec."Credit Limit")
{
ApplicationArea = All;
}
field(IBAN; Rec.IBAN)
{
ApplicationArea = All;
Width = 40;
}
field("Cashback Type"; Rec."Cashback Type")
{
ApplicationArea = All;
Width = 15;
}
field("Client Id"; Rec."Client Id")
{
ApplicationArea = All;
Visible = false;
}
field("Client Name"; Rec."Client Name")
{
ApplicationArea = All;
}
field("Last Sync. DateTime"; Rec."Last Sync. DateTime")
{
ApplicationArea = All;
}
}
}
}
actions
{
area(Processing)
{
action(SyncAccounts)
{
Caption = 'Sync Accounts';
ApplicationArea = All;
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
PromotedOnly = true;
Image = Refresh;
trigger OnAction()
var
MonobankApi: Codeunit "Monobank API";
begin
MonobankApi.GetPersonalInfo();
end;
}
action(SyncStatement)
{
Caption = 'Sync Statement';
ApplicationArea = All;
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
PromotedOnly = true;
Image = RefreshLines;
trigger OnAction()
var
MonobankApi: Codeunit "Monobank API";
begin
MonobankApi.GetStatementForAccount(Rec);
end;
}
action(SyncStatementHistory)
{
Caption = 'Sync Statement History';
ApplicationArea = All;
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
PromotedOnly = true;
Image = RefreshLines;
trigger OnAction()
var
MonobankApi: Codeunit "Monobank API";
begin
MonobankApi.GetStatementHistoryForAccount(Rec);
end;
}
action(ApiSetup)
{
Caption = 'API Setup';
ApplicationArea = All;
Promoted = true;
PromotedCategory = Report;
PromotedIsBig = true;
PromotedOnly = true;
Image = Setup;
RunObject = Page "Monobank API Setup";
}
action(Statement)
{
Caption = 'Statement';
ApplicationArea = All;
Promoted = true;
PromotedCategory = Report;
PromotedIsBig = true;
PromotedOnly = true;
Image = BankAccountStatement;
RunObject = Page "Monobank Statement";
RunPageLink = "Account Id" = field("Account Id");
}
}
}
}