| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // OrderSaleListDetailModel.m
- // IBOSSmini
- //
- // Created by apple on 16/10/10.
- // Copyright © 2016年 elongtian. All rights reserved.
- //
- #import "OrderSaleListDetailModel.h"
- @implementation OrderSaleListDetailModel
- + (instancetype) orderSaleDetailWithDict: (NSDictionary *)dic{
- OrderSaleListDetailModel *model = [[self alloc]init];
-
- if(dic!=nil){
- NSInteger invoiceIdValue = [[dic objectForKey:@"InvoiceID"] integerValue];
- model.invoiceID= [NSString stringWithFormat:@"%ld",(long)invoiceIdValue] ;
- model.detailInvoiceNo=[dic objectForKey:@"DetailInvoiceNo"] ;
- model.accountDate=[dic objectForKey:@"AccountDate"] ;//日期
- model.invoiceType=[dic objectForKey:@"InvoiceType"] ;//单据类型 (0、全部 1、订单,2、销售单)
- model.invoiceTypeName=[dic objectForKey:@"InvoiceTypeName"] ;
- model.orderSalesType=[dic objectForKey:@"OrderSalesType"] ;//业务类型
- model.orderSalesTypeName=[dic objectForKey:@"OrderSalesTypeName"] ;
- model.salesDetailType=[dic objectForKey:@"SalesDetailType"] ;//业务类型
- model.salesDetailTypeName=[dic objectForKey:@"SalesDetailTypeName"] ;
-
- model.onlyCode=[dic objectForKey:@"OnlyCode"];
- model.code=[dic objectForKey:@"Code"] ;
- model.brandName=[dic objectForKey:@"BrandName"] ;//品牌
- model.kindName=[dic objectForKey:@"KindName"] ;//品种
- model.varietyName=[dic objectForKey:@"VarietyName"] ;
- model.seriesName=[dic objectForKey:@"SeriesName"] ;
- model.unitName=[dic objectForKey:@"UnitName"] ;
- model.specification=[dic objectForKey:@"Specification"] ;
- model.gradeName=[dic objectForKey:@"GradeName"] ;
- model.colorNumber=[dic objectForKey:@"ColorNumber"] ;
- float orderQuantityValue= [[dic objectForKey:@"OrderQuantity"]floatValue];
- model.orderQuantity= [NSString stringWithFormat:@"%lf", orderQuantityValue];
- float salesQuantityValue= [[dic objectForKey:@"SalesQuantity"]floatValue];
- model.salesQuantity=[NSString stringWithFormat:@"%lf",salesQuantityValue] ;
-
- model.salesPrice=[dic objectForKey:@"SalesPrice"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"SalesPrice"] floatValue]];
- model.goodsSettlementPrice=[dic objectForKey:@"GoodsSettlementPrice"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"GoodsSettlementPrice"] floatValue]];
- model.goodsSettlementAmount=[dic objectForKey:@"GoodsSettlementAmount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"GoodsSettlementAmount"] floatValue]];
- model.goodsSettlementPrice2=[dic objectForKey:@"GoodsSettlementPrice2"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"GoodsSettlementPrice2"] floatValue]];
- model.goodsSettlementAmount2=[dic objectForKey:@"GoodsSettlementAmount2"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"GoodsSettlementAmount2"] floatValue]];
- model.markedPrice=[dic objectForKey:@"MarkedPrice"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"MarkedPrice"] floatValue]];
- model.amount=[dic objectForKey:@"Amount"]==nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"Amount"] floatValue]];
- float discountValue = [[dic objectForKey:@"Discount"]floatValue];
- model.discount=[NSString stringWithFormat:@"%.2f",discountValue] ;
-
- }
- return model;
- }
- @end
|