-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPAG69596.DELTA
199 lines (182 loc) · 7.39 KB
/
PAG69596.DELTA
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
OBJECT Page 69596 Customer G/L Turnover
{
OBJECT-PROPERTIES
{
Date=11/10/17;
Time=[ 8:40:59 PM];
Modified=Yes;
Version List=RUL;
}
PROPERTIES
{
CaptionML=ENU=Customer G/L Turnover;
SaveValues=Yes;
InsertAllowed=No;
DeleteAllowed=No;
SourceTable=Table18;
PageType=List;
OnOpenPage=BEGIN
DateFilter := GETFILTER("Date Filter");
IF DateFilter = '' THEN BEGIN
IF PeriodType = PeriodType::"Accounting Period" THEN
FindPeriodUser('')
ELSE
FindPeriod('');
END ELSE
SETRANGE("G/L Starting Date Filter",GETRANGEMIN("Date Filter") - 1);
END;
ActionList=ACTIONS
{
{ 1900000003;0 ;ActionContainer;
ActionContainerType=RelatedInformation }
{ 24 ;1 ;ActionGroup;
CaptionML=ENU=&Customer;
Image=Customer }
{ 33 ;2 ;Action ;
ShortCutKey=Shift+F7;
CaptionML=ENU=Card;
ApplicationArea=#Basic,#Suite;
RunObject=Page 21;
RunPageLink=No.=FIELD(No.);
Image=EditLines }
{ 1900000004;0 ;ActionContainer;
ActionContainerType=ActionItems }
{ 20 ;1 ;Action ;
CaptionML=ENU=Previous Period;
ToolTipML=ENU=Previous Period;
ApplicationArea=#Basic,#Suite;
Promoted=Yes;
PromotedIsBig=Yes;
Image=PreviousRecord;
PromotedCategory=Process;
OnAction=BEGIN
FindPeriod('<=');
END;
}
{ 21 ;1 ;Action ;
CaptionML=ENU=Next Period;
ToolTipML=ENU=Next Period;
ApplicationArea=#Basic,#Suite;
Promoted=Yes;
PromotedIsBig=Yes;
Image=NextRecord;
PromotedCategory=Process;
OnAction=BEGIN
FindPeriod('>=');
END;
}
{ 1900000006;0 ;ActionContainer;
ActionContainerType=Reports }
}
}
CONTROLS
{
{ 1900000001;0;Container;
ContainerType=ContentArea }
{ 50 ;1 ;Group ;
CaptionML=ENU=Options }
{ 14 ;2 ;Field ;
CaptionML=ENU=View by;
ToolTipML=ENU=Day;
OptionCaptionML=ENU=Day,Week,Month,Quarter,Year,Accounting Period;
ApplicationArea=#Basic,#Suite;
SourceExpr=PeriodType;
OnValidate=BEGIN
FindPeriod('');
CurrPage.UPDATE;
END;
}
{ 5 ;1 ;Group ;
Editable=FALSE;
GroupType=Repeater }
{ 1210000;2;Field ;
ApplicationArea=#Basic,#Suite;
SourceExpr="No." }
{ 1210004;2;Field ;
ApplicationArea=#Basic,#Suite;
SourceExpr=Name }
{ 1470001;2;Field ;
SourceExpr="Customer Posting Group";
Visible=FALSE }
{ 31 ;2 ;Field ;
CaptionML=ENU=Starting Balance;
ToolTipML=ENU=Specifies the general ledger starting balance associated with the customer.;
ApplicationArea=#Basic,#Suite;
BlankZero=Yes;
SourceExpr="G/L Starting Balance";
Visible=False }
{ 10 ;2 ;Field ;
CaptionML=ENU=Debit Amount (LCY);
ToolTipML=ENU=Specifies the general ledger debit amount associated with the customer.;
ApplicationArea=#Basic,#Suite;
BlankNumbers=BlankZero;
SourceExpr="G/L Debit Amount" }
{ 12 ;2 ;Field ;
CaptionML=ENU=Credit Amount (LCY);
ToolTipML=ENU=Specifies the general ledger credit amount associated with the customer.;
ApplicationArea=#Basic,#Suite;
BlankNumbers=BlankZero;
SourceExpr="G/L Credit Amount" }
{ 45 ;2 ;Field ;
CaptionML=ENU=Ending Balance;
ToolTipML=ENU=Specifies the general ledger balance to date associated with the customer.;
ApplicationArea=#Basic,#Suite;
BlankZero=Yes;
SourceExpr="G/L Balance to Date" }
{ 35 ;2 ;Field ;
CaptionML=ENU=Net Change (LCY);
ToolTipML=ENU=Specifies the general ledger net change associated with the customer.;
BlankZero=Yes;
SourceExpr="G/L Net Change";
Visible=FALSE }
}
CODE
{
VAR
Cust@1210004 : Record 18;
UserPeriods@1210006 : Record 91;
PeriodType@1210000 : 'Day,Week,Month,Quarter,Year,Accounting Period';
DateFilter@1210008 : Text;
LOCAL PROCEDURE FindPeriod@1(SearchText@1210000 : Code[10]);
VAR
Calendar@1210001 : Record 2000000007;
PeriodFormManagement@1210003 : Codeunit 359;
BEGIN
IF GETFILTER("Date Filter") <> '' THEN BEGIN
Calendar.SETFILTER("Period Start",GETFILTER("Date Filter"));
IF NOT PeriodFormManagement.FindDate('+',Calendar,PeriodType) THEN
PeriodFormManagement.FindDate('+',Calendar,PeriodType::Day);
Calendar.SETRANGE("Period Start");
END;
PeriodFormManagement.FindDate(SearchText,Calendar,PeriodType);
SETRANGE("Date Filter",Calendar."Period Start",Calendar."Period End");
IF GETRANGEMIN("Date Filter") = GETRANGEMAX("Date Filter") THEN
SETRANGE("Date Filter",GETRANGEMIN("Date Filter"));
SETRANGE("G/L Starting Date Filter",GETRANGEMIN("Date Filter") - 1);
END;
LOCAL PROCEDURE FindPeriodUser@3(SearchText@1210000 : Code[10]);
VAR
Calendar@1210001 : Record 2000000007;
PeriodFormManagement@1210003 : Codeunit 359;
BEGIN
IF UserPeriods.GET(USERID) THEN BEGIN
SETRANGE("Date Filter",UserPeriods."Allow Posting From",UserPeriods."Allow Posting To");
IF GETRANGEMIN("Date Filter") = GETRANGEMAX("Date Filter") THEN
SETRANGE("Date Filter",GETRANGEMIN("Date Filter"));
END ELSE BEGIN
IF GETFILTER("Date Filter") <> '' THEN BEGIN
Calendar.SETFILTER("Period Start",GETFILTER("Date Filter"));
IF NOT PeriodFormManagement.FindDate('+',Calendar,PeriodType) THEN
PeriodFormManagement.FindDate('+',Calendar,PeriodType::Day);
Calendar.SETRANGE("Period Start");
END;
PeriodFormManagement.FindDate(SearchText,Calendar,PeriodType);
SETRANGE("Date Filter",Calendar."Period Start",Calendar."Period End");
IF GETRANGEMIN("Date Filter") = GETRANGEMAX("Date Filter") THEN
SETRANGE("Date Filter",GETRANGEMIN("Date Filter"));
END;
END;
BEGIN
END.
}
}