| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // SalesSlipGoodsListModel.m
- // IBOSSmini
- //
- // Created by ssl on 2018/1/29.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "SalesSlipGoodsListModel.h"
- @implementation SalesSlipGoodsListModel
- -(void)ParseDic:(NSDictionary *)dic{
- if(dic!=nil){
- NSString *decimalPlacesStr=[dic objectForKey:@"DecimalPlaces"];
- if(decimalPlacesStr==nil){
- _decimalPlaces=@"0";
- }
- else{
- _decimalPlaces=decimalPlacesStr;
- }
- _salesDetailType= [[dic objectForKey:@"SalesDetailType"]integerValue];
- _detailId=[dic objectForKey:@"DetailID"];
- _salesId=[dic objectForKey:@"SalesID"];
- _salesNo=[dic objectForKey:@"SalesNo"];
- _onlyCode=[dic objectForKey:@"OnlyCode"];
- _salesDetailTypeName=[dic objectForKey:@"SalesDetailTypeName"];
- _code=[dic objectForKey:@"Code"];
- _brandName=[dic objectForKey:@"BrandName"];
- _deliveryQuantity = [NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"DeliveryQuantity"] doubleValue]];
- _outQuantity = [NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"OutQuantity"] doubleValue]];
- _returnQuantity = [NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"ReturnQuantity"] doubleValue]];
- _kindName=[dic objectForKey:@"KindName"];
- _factOrderQuantity=[[dic objectForKey:@"SalesQuantity"]doubleValue];
- int boxValue= [[dic objectForKey:@"Box"]intValue];
- _box=[NSString stringWithFormat:@"%d",boxValue];
- int pieceValue= [[dic objectForKey:@"Piece"]intValue];
- _piece=[NSString stringWithFormat:@"%d",pieceValue];
- _unitName=[dic objectForKey:@"UnitName"];
- _specification=[dic objectForKey:@"Specification"];
- _warehouseCode=[dic objectForKey:@"WarehouseCode"];
- _warehouseName=[dic objectForKey:@"WarehouseName"];
- _positionNumber=[dic objectForKey:@"PositionNumber"];
- _gradeName=[dic objectForKey:@"GradeName"];
- _colorNumber=[dic objectForKey:@"ColorNumber"];
- _factToSalesQuantity=[[dic objectForKey:@"FactToSalesQuantity"]doubleValue];
- _factOccupyQuantity=[[dic objectForKey:@"FactOccupyQuantity"]doubleValue];
- _circulateType=[dic objectForKey:@"CirculateType"];
- _goodsCirculateTypeName=[dic objectForKey:@"GoodsCirculateTypeName"];
- int package= [[dic objectForKey:@"Package"]intValue];
- _package=[NSString stringWithFormat:@"%d",package];
- double acreageValue=[[dic objectForKey:@"Acreage"]doubleValue];
- _acreage= [NSString stringWithFormat:@"%.6f",acreageValue];
- double volumeValue=[[dic objectForKey:@"Volume"]doubleValue];
- _volume= [NSString stringWithFormat:@"%.6f",volumeValue];
- double markedPriceValue= [[dic objectForKey:@"MarkedPrice"]doubleValue];
- _markedPrice=[NSString stringWithFormat:@"%.6f",markedPriceValue];
- double discountValue= [[dic objectForKey:@"Discount"]doubleValue];
- _discount=[NSString stringWithFormat:@"%.2f%@",discountValue,@"%"];
- _usePositionName=[dic objectForKey:@"UsePositionName"];
- _varietyName=[dic objectForKey:@"VarietyName"];
- _seriesName=[dic objectForKey:@"SeriesName"];
- _goodsName=[dic objectForKey:@"GoodsName"];
- _expandAttribute=[dic objectForKey:@"ExpandAttribute"];
- _expandAttribute2=[dic objectForKey:@"ExpandAttribute2"];
- _goodsRemarks=[dic objectForKey:@"CodeRemarks"];
- _remarks=[dic objectForKey:@"Remarks"];
- _supplier=[dic objectForKey:@"SupplierName"];
- _weight = [NSString stringWithFormat:@"%.6f",[[dic objectForKey:@"Weight"] doubleValue]];
- double m2Value= [[dic objectForKey:@"M2"]doubleValue];
- _M2=[NSString stringWithFormat:@"%.6f",m2Value];
- double m3Value=[[dic objectForKey:@"M3"]doubleValue];
- _M3=[NSString stringWithFormat:@"%.6f",m3Value];
- double orderPriceValue= [[dic objectForKey:@"SalesPrice"]doubleValue];
- _orderPrice=[NSString stringWithFormat:@"%.4f",orderPriceValue] ;
- _salesAmount=[NSString stringWithFormat:@"%.4f", [[dic objectForKey:@"SalesPrice"]doubleValue]*[[dic objectForKey:@"SalesQuantity"]doubleValue]] ;
-
- }
- }
- @end
|