//
//  Invoice.swift
//  iPOS
//
//  Created by BBC on 17/03/17.
//  Copyright © 2017 BBC. All rights reserved.
//

import Foundation
import ObjectMapper

class Invoice: Mappable{
    var StoreId: Int?
    var InvoiceNumber: String?
    var InvoiceDate: String?
    var DocumentType: String?
    var SourceCompanyId: Int?
    var PaymentTypeId: Int?
    var Notes: String?
    var GrossValueVatExcluded: Double = 0
    var Discount: Double?
    var VatValue: Double = 0
    var NetValueVatIncluded: Double = 0
    var CurrencyId: String?
    var PdfDocument: String?
    var ReceiptId: String?
    var ContactId: String?
    var InvoiceDetails = [InvoiceDetail]()
    
    required init?(map: Map){
        
    }
    
    init(){
        
    }
    
    func mapping(map: Map) {
        StoreId <- map["StoreId"]
        InvoiceNumber <- map["InvoiceNumber"]
        InvoiceDate <- map["InvoiceDate"]
        DocumentType <- map["DocumentType"]
        SourceCompanyId <- map["SourceCompanyId"]
        PaymentTypeId <- map["PaymentTypeId"]
        Notes <- map["Notes"]
        GrossValueVatExcluded <- map["GrossValueVatExcluded"]
        Discount <- map["Discount"]
        VatValue <- map["VatValue"]
        NetValueVatIncluded <- map["NetValueVatIncluded"]
        CurrencyId <- map["CurrencyId"]
        PdfDocument <- map["PdfDocument"]
        ReceiptId <- map["ReceiptId"]
        ContactId <- map["ContactId"]
        InvoiceDetails <- map["InvoiceDetail"]
    }
}
