//
//  PriceChangeResult.swift
//  iPOS
//
//  Created by Apple iMac on 17/05/2018.
//  Copyright © 2018 BBC. All rights reserved.
//

import Foundation

class PriceChangeResult{
    var rowNumber: Int
    var netRowValueVatIncluded: Double
    var grossUnitValueVatIncluded: Double
    var discountValue: Double
    var discountPercentage: Double
    var canApplyPromotions: Bool
    var effectCategory: String
    
    var discountCause: DiscountCauses = DiscountCauses()
    
    init(){
        self.rowNumber = 1
        self.netRowValueVatIncluded = 0
        self.grossUnitValueVatIncluded = 0
        self.discountValue = 0
        self.discountPercentage = 0
        self.canApplyPromotions = true
        self.effectCategory = ""
    }
    
    init(item: PriceChangeItem){
        self.rowNumber = item.rowNumber
        self.netRowValueVatIncluded = item.netRowValue
        self.grossUnitValueVatIncluded = item.grossUnitValue
        self.discountValue = item.discountValue
        self.canApplyPromotions = true
        self.discountCause = item.discountCause
        self.discountPercentage = item.discountPercentage
        self.effectCategory = item.effectCategory
    }
}
