Skip to content

Instantly share code, notes, and snippets.

@saturov
Created December 23, 2016 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saturov/1927ca8905223fccbe69e6a58f04c54a to your computer and use it in GitHub Desktop.
Save saturov/1927ca8905223fccbe69e6a58f04c54a to your computer and use it in GitHub Desktop.
/** Возвращает описание про благотворительность в информации о заказе */
- (NSString *)orderInfoCharityDescription:(LABCharity *)charity {
NSString *resultString = [NSString stringWithFormat:@"%@\u00a0р.", [LABUtils priceSeparateBySpace:charity.sum]];
NSString *location = nil;
NSArray<LABOrphanage *> *orphanages = [charity.orphanage allObjects];
if (orphanages && orphanages.count > 0) {
location = [orphanages firstObject].orphanageName;
resultString = [resultString stringByAppendingString:[NSString stringWithFormat:@" в %@", location]];
}
return resultString;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment