package it.integry.integrywmsnative.view.dialogs.input_quantity_v2;

import java.math.BigDecimal;
import java.time.LocalDate;

import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
import it.integry.integrywmsnative.core.model.MtbAart;
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;

public class DialogInputQuantityV2DTO {

    private MtbAart mtbAart;

    private BigDecimal initialNumCnf;
    private BigDecimal initialQtaCnf;
    private BigDecimal initialQtaTot;

    private BigDecimal totalQtaOrd;
    private BigDecimal totalNumCnfOrd;
    private BigDecimal qtaCnfOrd;

    private BigDecimal totalQtaInWarehouse;
    private BigDecimal totalNumCnfInWarehouse;
    private BigDecimal totalQtaCommitted;
    private BigDecimal totalNumCnfCommitted;

    private BigDecimal totalQtaToBeTaken;
    private BigDecimal totalNumCnfToBeTaken;
    private BigDecimal qtaCnfToBeTaken;

    private BigDecimal totalQtaAvailable;
    private BigDecimal totalNumCnfAvailable;
    private BigDecimal qtaCnfAvailable;

    private boolean canInputZeroQuantity = false;
    private boolean canPartitaMagBeChanged = true;
    private boolean isDataScadMandatory = false;
    private boolean isNotesAllowed = false;
    private boolean isNotesMandatory = false;
    private boolean isNumCnfEditable = true;
    private boolean isFocusOnStart = true;
    private boolean canLUBeClosed;
    private boolean saveOnImeDone = false;
    private boolean notifyProductLotStatus = false;
    private boolean disableTracciabilitaCheck = false;
    private boolean warnOnQuantityOverflow = false;

    private StatoArticoloDTO statoPartitaMag;

    private String partitaMag;
    private String note;
    private LocalDate dataScad;
    private RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> suggestPartitaMag;

    private boolean canOverflowOrderQuantity;

    private String customArtDescription;

    public MtbAart getMtbAart() {
        return mtbAart;
    }

    public DialogInputQuantityV2DTO setMtbAart(MtbAart mtbAart) {
        this.mtbAart = mtbAart;
        return this;
    }

    public BigDecimal getInitialNumCnf() {
        return UtilityBigDecimal.round(initialNumCnf);
    }

    public DialogInputQuantityV2DTO setInitialNumCnf(BigDecimal initialNumCnf) {
        this.initialNumCnf = initialNumCnf;
        return this;
    }

    public BigDecimal getInitialQtaCnf() {
        return UtilityBigDecimal.round(initialQtaCnf);
    }

    public DialogInputQuantityV2DTO setInitialQtaCnf(BigDecimal initialQtaCnf) {
        this.initialQtaCnf = initialQtaCnf;
        return this;
    }

    public BigDecimal getInitialQtaTot() {
        return UtilityBigDecimal.round(initialQtaTot);
    }

    public DialogInputQuantityV2DTO setInitialQtaTot(BigDecimal initialQtaTot) {
        this.initialQtaTot = initialQtaTot;
        return this;
    }

    public BigDecimal getTotalQtaOrd() {
        return UtilityBigDecimal.round(totalQtaOrd);
    }

    public DialogInputQuantityV2DTO setTotalQtaOrd(BigDecimal totalQtaOrd) {
        this.totalQtaOrd = totalQtaOrd;
        return this;
    }

    public BigDecimal getTotalNumCnfOrd() {
        return UtilityBigDecimal.round(totalNumCnfOrd);
    }

    public DialogInputQuantityV2DTO setTotalNumCnfOrd(BigDecimal totalNumCnfOrd) {
        this.totalNumCnfOrd = totalNumCnfOrd;
        return this;
    }

    public BigDecimal getQtaCnfOrd() {
        return UtilityBigDecimal.round(qtaCnfOrd);
    }

    public DialogInputQuantityV2DTO setQtaCnfOrd(BigDecimal qtaCnfOrd) {
        this.qtaCnfOrd = qtaCnfOrd;
        return this;
    }

    public BigDecimal getTotalQtaInWarehouse() {
        return totalQtaInWarehouse;
    }

    public DialogInputQuantityV2DTO setTotalQtaInWarehouse(BigDecimal totalQtaInWarehouse) {
        this.totalQtaInWarehouse = totalQtaInWarehouse;
        return this;
    }

    public BigDecimal getTotalNumCnfInWarehouse() {
        return totalNumCnfInWarehouse;
    }

    public DialogInputQuantityV2DTO setTotalNumCnfInWarehouse(BigDecimal totalNumCnfInWarehouse) {
        this.totalNumCnfInWarehouse = totalNumCnfInWarehouse;
        return this;
    }

    public BigDecimal getTotalQtaCommitted() {
        return totalQtaCommitted;
    }

    public DialogInputQuantityV2DTO setTotalQtaCommitted(BigDecimal totalQtaCommitted) {
        this.totalQtaCommitted = totalQtaCommitted;
        return this;
    }

    public BigDecimal getTotalNumCnfCommitted() {
        return totalNumCnfCommitted;
    }

    public DialogInputQuantityV2DTO setTotalNumCnfCommitted(BigDecimal totalNumCnfCommitted) {
        this.totalNumCnfCommitted = totalNumCnfCommitted;
        return this;
    }

    public BigDecimal getTotalQtaToBeTaken() {
        return UtilityBigDecimal.round(totalQtaToBeTaken);
    }

    public DialogInputQuantityV2DTO setTotalQtaToBeTaken(BigDecimal totalQtaToBeTaken) {
        this.totalQtaToBeTaken = totalQtaToBeTaken;
        return this;
    }

    public BigDecimal getTotalNumCnfToBeTaken() {
        return UtilityBigDecimal.round(totalNumCnfToBeTaken);
    }

    public DialogInputQuantityV2DTO setTotalNumCnfToBeTaken(BigDecimal totalNumCnfToBeTaken) {
        this.totalNumCnfToBeTaken = totalNumCnfToBeTaken;
        return this;
    }

    public BigDecimal getQtaCnfToBeTaken() {
        return UtilityBigDecimal.round(qtaCnfToBeTaken);
    }

    public DialogInputQuantityV2DTO setQtaCnfToBeTaken(BigDecimal qtaCnfToBeTaken) {
        this.qtaCnfToBeTaken = qtaCnfToBeTaken;
        return this;
    }

    public boolean isFocusOnStart() {
        return isFocusOnStart;
    }

    public DialogInputQuantityV2DTO setFocusOnStart(boolean focusOnStart) {
        isFocusOnStart = focusOnStart;
        return this;
    }

    public BigDecimal getTotalQtaAvailable() {
        return UtilityBigDecimal.round(totalQtaAvailable);
    }

    public DialogInputQuantityV2DTO setTotalQtaAvailable(BigDecimal totalQtaAvailable) {
        this.totalQtaAvailable = totalQtaAvailable;
        return this;
    }

    public BigDecimal getTotalNumCnfAvailable() {
        return UtilityBigDecimal.round(totalNumCnfAvailable);
    }

    public DialogInputQuantityV2DTO setTotalNumCnfAvailable(BigDecimal totalNumCnfAvailable) {
        this.totalNumCnfAvailable = totalNumCnfAvailable;
        return this;
    }

    public BigDecimal getQtaCnfAvailable() {
        return UtilityBigDecimal.round(qtaCnfAvailable);
    }

    public DialogInputQuantityV2DTO setQtaCnfAvailable(BigDecimal qtaCnfAvailable) {
        this.qtaCnfAvailable = qtaCnfAvailable;
        return this;
    }

    public boolean isCanInputZeroQuantity() {
        return canInputZeroQuantity;
    }

    public DialogInputQuantityV2DTO setCanInputZeroQuantity(boolean canInputZeroQuantity) {
        this.canInputZeroQuantity = canInputZeroQuantity;
        return this;
    }

    public boolean isCanPartitaMagBeChanged() {
        return canPartitaMagBeChanged;
    }

    public DialogInputQuantityV2DTO setCanPartitaMagBeChanged(boolean canPartitaMagBeChanged) {
        this.canPartitaMagBeChanged = canPartitaMagBeChanged;
        return this;
    }

    public boolean isCanLUBeClosed() {
        return canLUBeClosed;
    }

    public DialogInputQuantityV2DTO setCanLUBeClosed(boolean canLUBeClosed) {
        this.canLUBeClosed = canLUBeClosed;
        return this;
    }

    public String getPartitaMag() {
        return partitaMag;
    }

    public DialogInputQuantityV2DTO setPartitaMag(String partitaMag) {
        this.partitaMag = partitaMag;
        return this;
    }

    public String getNote() {
        return note;
    }

    public DialogInputQuantityV2DTO setNote(String note) {
        this.note = note;
        return this;
    }

    public LocalDate getDataScad() {
        return dataScad;
    }

    public DialogInputQuantityV2DTO setDataScad(LocalDate dataScad) {
        this.dataScad = dataScad;
        return this;
    }

    public boolean isCanOverflowOrderQuantity() {
        return canOverflowOrderQuantity;
    }

    public DialogInputQuantityV2DTO setCanOverflowOrderQuantity(boolean canOverflowOrderQuantity) {
        this.canOverflowOrderQuantity = canOverflowOrderQuantity;
        return this;
    }

    public DialogInputQuantityV2DTO setDataScadMandatory(boolean dataScadMandatory) {
        isDataScadMandatory = dataScadMandatory;
        return this;
    }

    public boolean isDataScadMandatory() {
        return isDataScadMandatory;
    }

    public boolean isNotesAllowed() {
        return isNotesAllowed;
    }

    public DialogInputQuantityV2DTO setNotesAllowed(boolean notesAllowed) {
        isNotesAllowed = notesAllowed;
        return this;
    }

    public boolean isNotesMandatory() {
        return isNotesMandatory;
    }

    public DialogInputQuantityV2DTO setNotesMandatory(boolean notesMandatory) {
        isNotesMandatory = notesMandatory;
        return this;
    }

    public boolean isNumCnfEditable() {
        return isNumCnfEditable;
    }

    public DialogInputQuantityV2DTO setNumCnfEditable(boolean numCnfEditable) {
        isNumCnfEditable = numCnfEditable;
        return this;
    }

    public RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> getSuggestPartitaMag() {
        return suggestPartitaMag;
    }

    public DialogInputQuantityV2DTO setSuggestPartitaMag(RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> suggestPartitaMag) {
        this.suggestPartitaMag = suggestPartitaMag;
        return this;
    }

    public boolean isSaveOnImeDone() {
        return saveOnImeDone;
    }

    public DialogInputQuantityV2DTO setSaveOnImeDone(boolean saveOnImeDone) {
        this.saveOnImeDone = saveOnImeDone;
        return this;
    }

    public StatoArticoloDTO getStatoPartitaMag() {
        return statoPartitaMag;
    }

    public DialogInputQuantityV2DTO setStatoPartitaMag(StatoArticoloDTO statoPartitaMag) {
        this.statoPartitaMag = statoPartitaMag;
        return this;
    }

    public boolean isNotifyProductLotStatus() {
        return notifyProductLotStatus;
    }

    public DialogInputQuantityV2DTO setNotifyProductLotStatus(boolean notifyProductLotStatus) {
        this.notifyProductLotStatus = notifyProductLotStatus;
        return this;
    }

    public boolean isDisableTracciabilitaCheck() {
        return disableTracciabilitaCheck;
    }

    public DialogInputQuantityV2DTO setDisableTracciabilitaCheck(boolean disableTracciabilitaCheck) {
        this.disableTracciabilitaCheck = disableTracciabilitaCheck;
        return this;
    }

    public String getCustomArtDescription() {
        return customArtDescription;
    }

    public DialogInputQuantityV2DTO setCustomArtDescription(String customArtDescription) {
        this.customArtDescription = customArtDescription;
        return this;
    }

    public boolean isWarnOnQuantityOverflow() {
        return warnOnQuantityOverflow;
    }

    public DialogInputQuantityV2DTO setWarnOnQuantityOverflow(boolean warnOnQuantityOverflow) {
        this.warnOnQuantityOverflow = warnOnQuantityOverflow;
        return this;
    }
}
