So Far no third-party code is taken.
Straight converted from CAL to AL with Txt2tool
------------------------------------------------------------
page 70001162 "BGS_Cust Dis. Charges"
{
PageType = List;
SourceTable = "BGS_Charges and disc Component";
layout
{
area(content)
{
repeater(Group)
{
field("Component type"; rec."Component type")
{
Style = None;
// StyleExpr = LeavColor;
// trigger OnValidate()
// begin
// //CurrPage.EDITABLE(FALSE);
// if rec."Component type" = rec."Component type"::Transport then begin
// // LeavColor := 'Ambiguous';
// //CurrPage.UPDATE;
// end;
// if rec."Component type" = rec."Component type"::Distance then
// // LeavColor := 'Favorable';
// //MESSAGE('Charging '+LeavColor);
// if rec."Component type" = rec."Component type"::Group then
// // LeavColor := 'AttentionAccent';
// //StandardAccents
// end;
}
field("Cust Component"; rec."Cust Component")
{
// StyleExpr = LeavColor;
}
field("Cust Component name"; rec."Cust Component name")
{
// StyleExpr = LeavColor;
}
field("Job No"; rec."Job No")
{
Caption = 'Job/Project';
// StyleExpr = LeavColor;
}
field("Charge Cycle"; rec."Charge Cycle")
{
// StyleExpr = LeavColor;
}
field("Effetive date"; rec."Effetive date")
{
// StyleExpr = LeavColor;
}
field(NextBillDate; rec."Next Bill Date")
{
Caption = 'Next Bill Date';
//StyleExpr = LeavColor;
}
field(Lastbilldate; rec."Last bill Date")
{
Caption = 'Last Bill Date';
// StyleExpr = LeavColor;
}
field("Default Amount"; rec."Default Amount")
{
Caption = 'Amount';
DecimalPlaces = 3 : 3;
// StyleExpr = LeavColor;
}
field(Quantity; rec.Quantity)
{
}
field("Amount Type"; rec."Amount Type")
{
Style = Ambiguous;
// StyleExpr = LeavColor;
}
// field(Minqty; MinQty)
// {
// Caption = 'Min Qty.';
// // StyleExpr = LeavColor;
// trigger OnValidate()
// begin
// if MinQty > 0 then
// MinVal := 0;
// end;
// }
// field(Minval; MinVal)
// {
// Caption = 'Min Value';
// StyleExpr = LeavColor;
// trigger OnValidate()
// begin
// if MinVal > 0 then
// MinQty := 0;
// end;
// }
}
}
}
actions
{
Group(ActionGroup17)
(Error : Syntax error, '}' expectedALAL0104
Syntax error, '}' expectedALAL0104
Expected one of the application object keywords (table, tableextension, page, pageextension, pagecustomization, profile, codeunit, report, reportextension, xmlport, query, controladdin, dotnet, enum, enumextension, interface, permissionset, permissionsetextension, entitlement)
)
{
action("Confirm Customer Settinf")
{
Caption = 'ConfirmSetting';
trigger OnAction()
begin
mycustomerno:=getcustomerno();
CurrPage.SetSelectionFilter(Rec) ;
if Rec.FindFirst then
begin
repeat
customerChargeLines.Reset;
customerChargeLines.SetRange(customerChargeLines."Component Line type",Rec."Component type");
customerChargeLines.SetFilter(customerChargeLines."Cust Component",Rec."Cust Component");
customerChargeLines.SetFilter(customerChargeLines."Customer No",mycustomerno);
if not customerChargeLines.Find('-') then
customerChargeLines.Init;
customerChargeLines."Component Line type":="Component type";
customerChargeLines."Cust Component":="Cust Component" ;
customerChargeLines."Cust Component name":="Cust Component name";
customerChargeLines."Default Amount":="Default Amount";
customerChargeLines."Job No":="Job No";
customerChargeLines."Charge Cycle":="Charge Cycle";
customerChargeLines."Effetive date":="Effetive date";
customerChargeLines."Customer No":=Mcustomerno;
customerChargeLines.Insert;
until Rec.Next=0;
end;
CurrPage.Close;
exit;
CurrPage.Close;
end;
}
}
}
trigger OnAfterGetRecord()
var
Jobno: Code[10];
Mselect: Boolean;
begin
//CurrPage.EDITABLE(FALSE);
if "Component type"="Component type"::Transport then
begin
LeavColor:='Ambiguous';
//CurrPage.UPDATE;
end;
if "Component type"="Component type"::Distance then
LeavColor:='Favorable';
//MESSAGE('Charging '+LeavColor);
if "Component type"="Component type"::Group then
LeavColor:='AttentionAccent';
//StandardAccents
end;
trigger OnClosePage()
begin
recCount:=0;
Clear(Rec);
CurrPage.SetSelectionFilter(Rec) ;
if Rec.FindFirst then
begin
repeat
if Rec."Customer no"<>'' then
begin
customerChargeLines.Reset;
customerChargeLines.SetRange(customerChargeLines."Component Line type",Rec."Component type");
customerChargeLines.SetFilter(customerChargeLines."Cust Component",Rec."Cust Component");
customerChargeLines.SetFilter(customerChargeLines."Customer No",mycustomerno);
customerChargeLines.SetRange("Effetive date","Effetive date");
if not customerChargeLines.Find('-') then
customerChargeLines.Init;
customerChargeLines."Component Line type":="Component type";
customerChargeLines."Cust Component":="Cust Component" ;
customerChargeLines."Cust Component name":="Cust Component name";
customerChargeLines."Default Amount":="Default Amount";
customerChargeLines.Quantity:=Quantity;
customerChargeLines."Job No":="Job No";
customerChargeLines."Charge Cycle":="Charge Cycle";
customerChargeLines."Effetive date":="Effetive date";
customerChargeLines."Customer No":=Rec."Customer no";
customerChargeLines.Insert;
recCount:=recCount+1;
end;
until Rec.Next=0;
end;
Clear(Rec);
Message('# of customer setup records updated : '+Format(recCount));
CurrPage.Close;
end;
Protected var
Mcustomerno: Code[10];
Jobno: Code[10];
Mselect: Boolean;
public LeavColor: Text;
LastbillDate: Date;
Naextbilldate: Date;
MinQty: Integer;
MinVal: Decimal;
customerChargeLines: Record "BGS_Cust Charges and disc";
mycustomerno: Code[20];
recCount: Integer;
[Scope('Cloud')]
procedure getcustomerno(var CustomerNo: Code[20])
begin
Mcustomerno:=CustomerNo;
end;
}
-------------------------------------------------------------
It is 50009 file name object number is