DeclarationInvoiceDTO.java

package com.tradecloud.dto.api.invoice;

import javax.xml.bind.annotation.XmlRootElement;
import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.List;
@XmlRootElement
public class DeclarationInvoiceDTO {

    private String reference;
    private String date;
    private String incoterm;
    private String currency;
    private DeclarationInvoiceTotalDO totalSupplierInvoiceLineValue = new DeclarationInvoiceTotalDO("TOTAL SUPPLIER INVOICE LINE VALUE");
    private DeclarationInvoiceTotalDO totalFreight = new DeclarationInvoiceTotalDO("TOTAL FREIGHT");
    private DeclarationInvoiceTotalDO totalInsurance = new DeclarationInvoiceTotalDO("TOTAL INSURANCE");
    private DeclarationInvoiceTotalDO totalDutiableCharges = new DeclarationInvoiceTotalDO("TOTAL DUTIABLE CHARGES");
    private DeclarationInvoiceTotalDO totalNonDutiableChargesExcl = new DeclarationInvoiceTotalDO("TOTAL NON-DUTIABLE CHARGES EXCL FREIGHT AND INS.");
    private DeclarationInvoiceTotalDO lessNonDutiableCharges = new DeclarationInvoiceTotalDO("LESS NON-DUTIABLE CHARGES");
    private DeclarationInvoiceTotalDO totalCIFValue = new DeclarationInvoiceTotalDO("TOTAL CIF VALUE");
    private DeclarationInvoiceTotalDO lessFreight = new DeclarationInvoiceTotalDO("LESS FREIGHT");
    private DeclarationInvoiceTotalDO lessInsurance = new DeclarationInvoiceTotalDO("LESS INSURANCE");
    private DeclarationInvoiceTotalDO totalFobValue = new DeclarationInvoiceTotalDO("TOTAL FOB VALUE");
    private DeclarationInvoiceTotalDO totalAdjustedFobValue = new DeclarationInvoiceTotalDO("TOTAL ADJUSTED FOB VALUE");
    private BigDecimal factor;
    private List<DeclarationInvoiceTotalDO> totalDOS = new LinkedList<>();
    private List<DeclarationInvoiceItemDTO> invoiceItemDTOS = new LinkedList<>();
    private DeclarationItemTotalsDTO itemTotalsDTO;

    public List<DeclarationInvoiceTotalDO> getTotalDOS() {
        return totalDOS;
    }

    public void initList() {
        if (totalDOS.isEmpty()) {
            totalDOS.add(totalSupplierInvoiceLineValue);
            totalDOS.add(totalFreight);
            totalDOS.add(totalInsurance);
            totalDOS.add(totalDutiableCharges);
            totalDOS.add(totalNonDutiableChargesExcl);
            totalDOS.add(lessNonDutiableCharges);
            totalDOS.add(totalCIFValue);
            totalDOS.add(lessFreight);
            totalDOS.add(lessInsurance);
            totalDOS.add(totalFobValue);
            totalDOS.add(totalAdjustedFobValue);
        }
    }

    public String getReference() {
        return reference;
    }

    public void setReference(String reference) {
        this.reference = reference;
    }

    public String getIncoterm() {
        return incoterm;
    }

    public void setIncoterm(String incoterm) {
        this.incoterm = incoterm;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public DeclarationInvoiceTotalDO getTotalSupplierInvoiceLineValue() {
        return totalSupplierInvoiceLineValue;
    }

    public void setTotalSupplierInvoiceLineValue(DeclarationInvoiceTotalDO totalSupplierInvoiceLineValue) {
        this.totalSupplierInvoiceLineValue = totalSupplierInvoiceLineValue;
    }

    public DeclarationInvoiceTotalDO getTotalFreight() {
        return totalFreight;
    }

    public void setTotalFreight(DeclarationInvoiceTotalDO totalFreight) {
        this.totalFreight = totalFreight;
    }

    public DeclarationInvoiceTotalDO getTotalInsurance() {
        return totalInsurance;
    }

    public void setTotalInsurance(DeclarationInvoiceTotalDO totalInsurance) {
        this.totalInsurance = totalInsurance;
    }

    public DeclarationInvoiceTotalDO getTotalDutiableCharges() {
        return totalDutiableCharges;
    }

    public void setTotalDutiableCharges(DeclarationInvoiceTotalDO totalDutiableCharges) {
        this.totalDutiableCharges = totalDutiableCharges;
    }

    public DeclarationInvoiceTotalDO getTotalNonDutiableChargesExcl() {
        return totalNonDutiableChargesExcl;
    }

    public void setTotalNonDutiableChargesExcl(DeclarationInvoiceTotalDO totalNonDutiableChargesExcl) {
        this.totalNonDutiableChargesExcl = totalNonDutiableChargesExcl;
    }

    public DeclarationInvoiceTotalDO getLessNonDutiableCharges() {
        return lessNonDutiableCharges;
    }

    public void setLessNonDutiableCharges(DeclarationInvoiceTotalDO lessNonDutiableCharges) {
        this.lessNonDutiableCharges = lessNonDutiableCharges;
    }

    public DeclarationInvoiceTotalDO getTotalCIFValue() {
        return totalCIFValue;
    }

    public void setTotalCIFValue(DeclarationInvoiceTotalDO totalCIFValue) {
        this.totalCIFValue = totalCIFValue;
    }

    public DeclarationInvoiceTotalDO getLessFreight() {
        return lessFreight;
    }

    public void setLessFreight(DeclarationInvoiceTotalDO lessFreight) {
        this.lessFreight = lessFreight;
    }

    public DeclarationInvoiceTotalDO getTotalFobValue() {
        return totalFobValue;
    }

    public void setTotalFobValue(DeclarationInvoiceTotalDO totalFobValue) {
        this.totalFobValue = totalFobValue;
    }

    public DeclarationInvoiceTotalDO getTotalAdjustedFobValue() {
        return totalAdjustedFobValue;
    }

    public void setTotalAdjustedFobValue(DeclarationInvoiceTotalDO totalAdjustedFobValue) {
        this.totalAdjustedFobValue = totalAdjustedFobValue;
    }

    public DeclarationInvoiceTotalDO getLessInsurance() {
        return lessInsurance;
    }

    public void setLessInsurance(DeclarationInvoiceTotalDO lessInsurance) {
        this.lessInsurance = lessInsurance;
    }

    public BigDecimal getFactor() {
        return factor;
    }

    public void setFactor(BigDecimal factor) {
        this.factor = factor;
    }

    public List<DeclarationInvoiceItemDTO> getInvoiceItemDTOS() {
        return invoiceItemDTOS;
    }

    public void setInvoiceItemDTOS(List<DeclarationInvoiceItemDTO> invoiceItemDTOS) {
        this.invoiceItemDTOS = invoiceItemDTOS;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public DeclarationItemTotalsDTO getItemTotalsDTO() {
        return itemTotalsDTO;
    }

    public void setItemTotalsDTO(DeclarationItemTotalsDTO itemTotalsDTO) {
        this.itemTotalsDTO = itemTotalsDTO;
    }

    public void setTotalDOS(List<DeclarationInvoiceTotalDO> totalDOS) {
        this.totalDOS = totalDOS;
    }
}