Skip to content

Commit

Permalink
Minor formating fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lparrott committed May 13, 2024
1 parent afdd2b5 commit 594f62c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions force-app/main/default/classes/BDI_DataImportService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ global with sharing class BDI_DataImportService {
String.join(listStrDataImportFields, ','),
DATAIMPORT_BATCH_NUMBER_FIELD
};

return new UTIL_Query()
.withSelectFields(selectClause)
.withFrom(DataImport__c.SObjectType)
Expand Down Expand Up @@ -623,25 +623,25 @@ global with sharing class BDI_DataImportService {

this.listDI = checkRDFields(listDI);

if(apexJobId != null && listDI.size() > 0) {
List<DataImportBatch__c> listBatch = [SELECT Name, Batch_Number__c, Batch_Status__c, Batch_Defaults__c,
Form_Template__c, RequireTotalMatch__c, Expected_Count_of_Gifts__c,
Expected_Total_Batch_Amount__c, Batch_Table_Columns__c, LastModifiedDate
FROM DataImportBatch__c WHERE Id= :listDI[0].NPSP_Data_Import_Batch__c LIMIT 1];
if(listBatch.size() > 0 ){
GiftBatch giftBatch = new GiftBatch(listBatch[0]);
Boolean firstInstallmentPaid = giftBatch.shouldPayFirstInstallment();

for (DataImport__c dataImport : listDI) {
if(dataImport.Recurring_Donation_Recurring_Type__c != null) {
dataImport.Donation_Date__c = null;
if(!firstInstallmentPaid) {
dataImport.Donation_Amount__c = null;
if (apexJobId != null && listDI.size() > 0) {
List<DataImportBatch__c> listBatch = [SELECT Name, Batch_Number__c, Batch_Status__c, Batch_Defaults__c,
Form_Template__c, RequireTotalMatch__c, Expected_Count_of_Gifts__c,
Expected_Total_Batch_Amount__c, Batch_Table_Columns__c, LastModifiedDate
FROM DataImportBatch__c WHERE Id= :listDI[0].NPSP_Data_Import_Batch__c LIMIT 1];
if (listBatch.size() > 0 ) {
GiftBatch giftBatch = new GiftBatch(listBatch[0]);
Boolean firstInstallmentPaid = giftBatch.shouldPayFirstInstallment();

for (DataImport__c dataImport : listDI) {
if(dataImport.Recurring_Donation_Recurring_Type__c != null) {
dataImport.Donation_Date__c = null;
if (!firstInstallmentPaid) {
dataImport.Donation_Amount__c = null;
}
}
}
}
}
}
}
// do any performance optimizations to avoid unnecessary code
disableAllOppRollups();

Expand Down

0 comments on commit 594f62c

Please sign in to comment.