| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- //
- // OrderSaleListModel.m
- // IBOSSmini
- //
- // Created by apple on 16/10/8.
- // Copyright © 2016年 elongtian. All rights reserved.
- //
- #import "OrderSaleTotalModel.h"
- @implementation OrderSaleTotalModel
- + (instancetype) orderSaleWithDict: (NSDictionary *)dic{
- OrderSaleTotalModel *model = [[self alloc]init];
- //[model setValuesForKeysWithDictionary:dict];
- if(dic!=nil){
- model.goodsAmount=[dic objectForKey:@"GoodsAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"GoodsAmount"] floatValue]];
- // ---舍零金额
- model.discountAmount= [dic objectForKey:@"DiscountAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"DiscountAmount"] floatValue]];
-
- // ----合计金额
- model.totalAmount=[dic objectForKey:@"TotalAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"TotalAmount"] floatValue]];
- // ----应收金额
- model.accountReceivableAmount=[dic objectForKey:@"AccountReceivableAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"AccountReceivableAmount"] floatValue]];
- // ----转销售金额
- model.toSalesAmount=[dic objectForKey:@"ToSalesAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"ToSalesAmount"] floatValue]];
- // ----未转销售金额
- // model.UnToSalesAmount=[dic objectForKey:@"UnToSalesAmount"];
- // ----实际转销售金额
- model.toFactSalesAmount=[dic objectForKey:@"ToFactSalesAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"ToFactSalesAmount"] floatValue]];
- // ---使用定金金额
- model.useEarnestAmount=[dic objectForKey:@"UseEarnestAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"UseEarnestAmount"] floatValue]];
- // ----总定金
- model.totalEarnestAmount=[dic objectForKey:@"TotalEarnestAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"TotalEarnestAmount"] floatValue]];
- // ----应收款收款金额
- model.receivableSum =[dic objectForKey:@"ReceivableSum"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"ReceivableSum"] floatValue]]; }
- return model;
- }
- - (void)setValue:(id)value forKey:(NSString *)key{
- // if ([key isEqualToString:@"id"]) {
- // _MyID = value;
- // }
-
- }
- - (void)setValue:(id)value forUndefinedKey:(NSString *)key{
- NSLog(@"------%@",key);
- }
- @end
|