KWMShopCartModel.m 581 Bytes
Newer Older
houweibin committed
1 2 3 4 5 6 7 8 9
//
//  KWMShopCartModel.m
//  iCemarose
//
//  Created by 陈荣科 on 16/9/22.
//  Copyright © 2016年 kollway. All rights reserved.
//

#import "KWMShopCartModel.h"
lee committed
10
#import "KWMCurrencyUtil.h"
houweibin committed
11 12 13

@implementation KWMShopCartModel

lee committed
14 15 16 17 18 19 20
- (NSString *)totalPrice {
    if (self.line_price) {
        return [[KWMCurrencyUtil sharedInstance] priceFormattedByCurrencyCode:self.line_price];
    }
    return [[KWMCurrencyUtil sharedInstance] priceFormatted:[self.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(self.quantity).stringValue]]];
}

houweibin committed
21
@end