Skip to content

Commit

Permalink
Adjusted file name for Newsstand or Opt-In reports
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Apr 12, 2013
1 parent 94aec92 commit 9324d4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Core/Source/DTITCFunctions.m
Expand Up @@ -173,4 +173,4 @@ ITCReportDateType reportDateTypeFromString(NSString *reportDateTypeString)
return @"yyyy";
}
}
}
}
11 changes: 9 additions & 2 deletions Core/Source/DTITCReportDownloader.m
Expand Up @@ -189,10 +189,17 @@ - (NSString *)predictedFileNameForDate:(NSDate *)date
{
NSMutableString *retString = [NSMutableString string];

// always Sales (or is this
[retString appendString:@"S"];
NSString *reportTypeString = [NSStringFromITCReportType(reportType) substringToIndex:1];
[retString appendString:reportTypeString];

[retString appendString:@"_"];

if (reportType != ITCReportTypeSales)
{
NSString *reportSubTypeString = [NSStringFromITCReportSubType(reportSubType) substringToIndex:1];
[retString appendString:reportSubTypeString];
[retString appendString:@"_"];
}

NSString *dateTypeString = NSStringFromITCReportDateType(reportDateType);

Expand Down

0 comments on commit 9324d4b

Please sign in to comment.