@@ -46,7 +46,7 @@ public class Opportunities extends fflib_SObjectDomain
46
46
public void generate (InvoicingService.InvoiceFactory invoiceFactory )
47
47
{
48
48
// Utilise InvoiceFactory to create invoices from Opportunity details
49
- for (Opportunity opportunity : (List <Opportunity >) Records )
49
+ for (Opportunity opportunity : (List <Opportunity >) this . records )
50
50
{
51
51
InvoicingService .Invoice invoice = new InvoicingService .Invoice ();
52
52
invoice .Account = opportunity .AccountId ;
@@ -69,7 +69,7 @@ public class Opportunities extends fflib_SObjectDomain
69
69
public override void onApplyDefaults ()
70
70
{
71
71
// Apply defaults to Opportunities
72
- for (Opportunity opportunity : (List <Opportunity >) Records )
72
+ for (Opportunity opportunity : (List <Opportunity >) this . records )
73
73
{
74
74
opportunity .DiscountType__c = OpportunitySettings__c .getInstance ().DiscountType__c ;
75
75
}
@@ -78,7 +78,7 @@ public class Opportunities extends fflib_SObjectDomain
78
78
public override void onValidate ()
79
79
{
80
80
// Validate Opportunities
81
- for (Opportunity opp : (List <Opportunity >) Records )
81
+ for (Opportunity opp : (List <Opportunity >) this . records )
82
82
{
83
83
if (opp .Type != null && opp .Type .startsWith (' Existing' ) && opp .AccountId == null )
84
84
{
@@ -90,7 +90,7 @@ public class Opportunities extends fflib_SObjectDomain
90
90
public override void onValidate (Map <Id ,SObject > existingRecords )
91
91
{
92
92
// Validate changes to Opportunities
93
- for (Opportunity opp : (List <Opportunity >) Records )
93
+ for (Opportunity opp : (List <Opportunity >) this . records )
94
94
{
95
95
Opportunity existingOpp = (Opportunity ) existingRecords .get (opp .Id );
96
96
if (opp .Type != existingOpp .Type )
@@ -124,7 +124,7 @@ public class Opportunities extends fflib_SObjectDomain
124
124
List <OpportunityLineItem > linesToApplyDiscount = new List <OpportunityLineItem >();
125
125
126
126
// Apply discount
127
- for (Opportunity opportunity : (List <Opportunity >) Records )
127
+ for (Opportunity opportunity : (List <Opportunity >) this . records )
128
128
{
129
129
// Appply to the Opporunity Amount?
130
130
if (opportunity .OpportunityLineItems == null ||
0 commit comments