| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- //
- // OrderSaleListDetailModel.m
- // IBOSS
- //
- // Created by apple on 16/10/10.
- // Copyright © 2017年 沈阳东科云信软件有限公司. All rights reserved.
- //
- // 功能描述:订单销售单列表模型
- //
- #import "OrderSaleListModel.h"
- @implementation OrderSaleListModel
- /**
- 设置model对象
- @param dic <#dic description#>
- @return <#return value description#>
- */
- + (instancetype) orderSaleDetailWithDict: (NSDictionary *)dic{
- OrderSaleListModel *model = [[self alloc]init];
- if(dic != nil) {
- model.invoiceId = [dic objectForKey:@"InvoiceID"] ;
- model.invoiceNo = [dic objectForKey:@"InvoiceNo"] ;//单号
- model.customerName = [dic objectForKey:@"CustomerName"] ;//客户名称
- model.customerAddress = [dic objectForKey:@"Address"] ;//客户名称
- model.customerCode = [dic objectForKey:@"CustomerCode"] ;//客户
- model.organizationName = [dic objectForKey:@"OrganizationName"];
- model.staffName = [dic objectForKey:@"StaffName"];
- model.contacts = [dic objectForKey:@"Contacts"] ;//联系人
- model.telephone = [dic objectForKey:@"Telephone"] ;//客户电话
- model.accountDate = [dic objectForKey:@"AccountDate"] ;//日期
- model.invoiceType = [NSString stringWithFormat:@"%ld",[[dic objectForKey:@"InvoiceType"]integerValue]] ;//单据类型 (0、全部 1、订单,2、销售单)
- model.invoiceTypeName = [dic objectForKey:@"InvoicesTypeName"] ;
- model.orderSalesType = [dic objectForKey:@"OrderSalesType"] ;//业务类型
- model.orderSalesTypeName = [dic objectForKey:@"OrderSalesTypeName"] ;
-
- model.goodsAmount = [dic objectForKey:@"GoodsAmount"] == nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"GoodsAmount"] floatValue]];
-
- model.outAmount =[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"OutAmount"] floatValue]];
- // ---舍零金额
- model.discountAmount = [dic objectForKey:@"DiscountAmount"] == nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"DiscountAmount"] floatValue]];
- // ---标价总额
- model.markedPriceAmount = [dic objectForKey:@"MarkedPriceAmount"] == nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"MarkedPriceAmount"] floatValue]];
- // ---费用金额
- model.feesAmount = [dic objectForKey:@"FeeAmount"] == nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"FeeAmount"] floatValue]];
- // ---剩余定金金额
- //model.EarnestAmount = [dic objectForKey:@"EarnestAmount"];
- // ---使用预收金额
- model.depositReceivedAmount = [dic objectForKey:@"DepositReceivedAmount"] == nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"DepositReceivedAmount"] floatValue]];
- // 收款金额
- model.receivableAmount = [dic objectForKey:@"ReceivableAmount"] == nil?@"0.00"
- :[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"ReceivableAmount"] 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;
- }
- @end
|