package it.integry.integrywmsnative.core.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by GiuseppeS on 06/03/2018.
 */

public class MtbAart implements Parcelable{

    private String codMart;
    private String descrizione;
    private String untMis;
    private String barCode;
    private BigDecimal pesoKg;
    private BigDecimal qtaCnf;
    private String codAliq;
    private String codScoArt;
    private String codTcolUi;
    private String codTcolUl;
    private String articoloComposto;
    private String esposizioneComp;
    private String descrizioneEstesa;
    private String codUltForn;
    private String dataUltCar;
    private BigDecimal valUltCar;
    private String codUltClie;
    private String dataUltScar;
    private BigDecimal valUltScar;
    private String tipoCodice;
    private String note;
    private String posizione;
    private BigDecimal colliPedana;
    private String untMis2;
    private BigDecimal rapConv2;
    private String flagInclListino;
    private String untMis3;
    private BigDecimal rapConv3;
    private String codMartStat;
    private String codMcon;
    private String codMgrp;
    private String codMsfa;
    private String codMsgr;
    private String codMstp;
    private String codMtip;
    private String descrizioneStat;
    private String flagStato;
    private BigDecimal cambioDiviCar;
    private BigDecimal cambioDiviScar;
    private Integer ggScadPartita;
    private BigDecimal volumeMc;
    private String flagEsponiPrz;
    private String dataUltVar;
    private BigDecimal percSfrido;
    private String codBarreImb;
    private String flagCalcPrz;
    private String esposizioneCompAcq;
    private String flagCalcPrzAcq;
    private String diacod;
    private String plu;
    private String partIvaProd;
    private String ragSocProd;
    private String flagRapConvVariabile;
    private String flagMovArtMag;
    private String flagTracciabilita;
    private BigDecimal taraKg;
    private BigDecimal colliStrato;
    private String flagQtaCnfFissa;
    private String flagColliPedanaFisso;
    private String codCconCosti;
    private String codCconRicavi;
    private String codDgrpArt;
    private String codDiviCar;
    private String codDiviScar;
    private String codEcrCat;
    private String codEcrMcat;
    private String codEcrRep;
    private String codEcrStipo;
    private String codEcrTipo;
    private String codGrpBolla;
    private String ingredienti;
    private String idArtEqui;
    private String descrCassa;
    private String codNcIntracee;
    private String marchio;
    private Integer sezione;


    public MtbAart(){}


    public boolean isFlagTracciabilita() {
        return flagTracciabilita != null && flagTracciabilita.equalsIgnoreCase("S");
    }






    protected MtbAart(Parcel in) {
        codMart = in.readString();
        descrizione = in.readString();
        untMis = in.readString();
        barCode = in.readString();
        pesoKg = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        qtaCnf = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        codAliq = in.readString();
        codScoArt = in.readString();
        codTcolUi = in.readString();
        codTcolUl = in.readString();
        articoloComposto = in.readString();
        esposizioneComp = in.readString();
        descrizioneEstesa = in.readString();
        codUltForn = in.readString();
        dataUltCar = in.readString();
        valUltCar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        codUltClie = in.readString();
        dataUltScar = in.readString();
        valUltScar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        tipoCodice = in.readString();
        note = in.readString();
        posizione = in.readString();
        colliPedana = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        untMis2 = in.readString();
        rapConv2 = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        flagInclListino = in.readString();
        untMis3 = in.readString();
        rapConv3 = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        codMartStat = in.readString();
        codMcon = in.readString();
        codMgrp = in.readString();
        codMsfa = in.readString();
        codMsgr = in.readString();
        codMstp = in.readString();
        codMtip = in.readString();
        descrizioneStat = in.readString();
        flagStato = in.readString();
        cambioDiviCar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        cambioDiviScar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        ggScadPartita = in.readByte() == 0x00 ? null : in.readInt();
        volumeMc = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        flagEsponiPrz = in.readString();
        dataUltVar = in.readString();
        percSfrido = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        codBarreImb = in.readString();
        flagCalcPrz = in.readString();
        esposizioneCompAcq = in.readString();
        flagCalcPrzAcq = in.readString();
        diacod = in.readString();
        plu = in.readString();
        partIvaProd = in.readString();
        ragSocProd = in.readString();
        flagRapConvVariabile = in.readString();
        flagMovArtMag = in.readString();
        flagTracciabilita = in.readString();
        taraKg = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        colliStrato = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
        flagQtaCnfFissa = in.readString();
        flagColliPedanaFisso = in.readString();
        codCconCosti = in.readString();
        codCconRicavi = in.readString();
        codDgrpArt = in.readString();
        codDiviCar = in.readString();
        codDiviScar = in.readString();
        codEcrCat = in.readString();
        codEcrMcat = in.readString();
        codEcrRep = in.readString();
        codEcrStipo = in.readString();
        codEcrTipo = in.readString();
        codGrpBolla = in.readString();
        ingredienti = in.readString();
        idArtEqui = in.readString();
        descrCassa = in.readString();
        codNcIntracee = in.readString();
        marchio = in.readString();
        sezione = in.readByte() == 0x00 ? null : in.readInt();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public String getCodMart() {
        return codMart;
    }

    public MtbAart setCodMart(String codMart) {
        this.codMart = codMart;
        return this;
    }

    public String getDescrizione() {
        return descrizione;
    }

    public MtbAart setDescrizione(String descrizione) {
        this.descrizione = descrizione;
        return this;
    }

    public String getUntMis() {
        return untMis;
    }

    public MtbAart setUntMis(String untMis) {
        this.untMis = untMis;
        return this;
    }

    public String getBarCode() {
        return barCode;
    }

    public MtbAart setBarCode(String barCode) {
        this.barCode = barCode;
        return this;
    }

    public BigDecimal getPesoKg() {
        return pesoKg;
    }

    public MtbAart setPesoKg(BigDecimal pesoKg) {
        this.pesoKg = pesoKg;
        return this;
    }

    public BigDecimal getQtaCnf() {
        return qtaCnf;
    }

    public MtbAart setQtaCnf(BigDecimal qtaCnf) {
        this.qtaCnf = qtaCnf;
        return this;
    }

    public String getCodAliq() {
        return codAliq;
    }

    public MtbAart setCodAliq(String codAliq) {
        this.codAliq = codAliq;
        return this;
    }

    public String getCodScoArt() {
        return codScoArt;
    }

    public MtbAart setCodScoArt(String codScoArt) {
        this.codScoArt = codScoArt;
        return this;
    }

    public String getCodTcolUi() {
        return codTcolUi;
    }

    public MtbAart setCodTcolUi(String codTcolUi) {
        this.codTcolUi = codTcolUi;
        return this;
    }

    public String getCodTcolUl() {
        return codTcolUl;
    }

    public MtbAart setCodTcolUl(String codTcolUl) {
        this.codTcolUl = codTcolUl;
        return this;
    }

    public String getArticoloComposto() {
        return articoloComposto;
    }

    public MtbAart setArticoloComposto(String articoloComposto) {
        this.articoloComposto = articoloComposto;
        return this;
    }

    public String getEsposizioneComp() {
        return esposizioneComp;
    }

    public MtbAart setEsposizioneComp(String esposizioneComp) {
        this.esposizioneComp = esposizioneComp;
        return this;
    }

    public String getDescrizioneEstesa() {
        return descrizioneEstesa;
    }

    public MtbAart setDescrizioneEstesa(String descrizioneEstesa) {
        this.descrizioneEstesa = descrizioneEstesa;
        return this;
    }

    public String getCodUltForn() {
        return codUltForn;
    }

    public MtbAart setCodUltForn(String codUltForn) {
        this.codUltForn = codUltForn;
        return this;
    }

    public String getDataUltCar() {
        return dataUltCar;
    }

    public MtbAart setDataUltCar(String dataUltCar) {
        this.dataUltCar = dataUltCar;
        return this;
    }

    public BigDecimal getValUltCar() {
        return valUltCar;
    }

    public MtbAart setValUltCar(BigDecimal valUltCar) {
        this.valUltCar = valUltCar;
        return this;
    }

    public String getCodUltClie() {
        return codUltClie;
    }

    public MtbAart setCodUltClie(String codUltClie) {
        this.codUltClie = codUltClie;
        return this;
    }

    public String getDataUltScar() {
        return dataUltScar;
    }

    public MtbAart setDataUltScar(String dataUltScar) {
        this.dataUltScar = dataUltScar;
        return this;
    }

    public BigDecimal getValUltScar() {
        return valUltScar;
    }

    public MtbAart setValUltScar(BigDecimal valUltScar) {
        this.valUltScar = valUltScar;
        return this;
    }

    public String getTipoCodice() {
        return tipoCodice;
    }

    public MtbAart setTipoCodice(String tipoCodice) {
        this.tipoCodice = tipoCodice;
        return this;
    }

    public String getNote() {
        return note;
    }

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

    public String getPosizione() {
        return posizione;
    }

    public MtbAart setPosizione(String posizione) {
        this.posizione = posizione;
        return this;
    }

    public BigDecimal getColliPedana() {
        return colliPedana;
    }

    public MtbAart setColliPedana(BigDecimal colliPedana) {
        this.colliPedana = colliPedana;
        return this;
    }

    public String getUntMis2() {
        return untMis2;
    }

    public MtbAart setUntMis2(String untMis2) {
        this.untMis2 = untMis2;
        return this;
    }

    public BigDecimal getRapConv2() {
        return rapConv2;
    }

    public MtbAart setRapConv2(BigDecimal rapConv2) {
        this.rapConv2 = rapConv2;
        return this;
    }

    public String getFlagInclListino() {
        return flagInclListino;
    }

    public MtbAart setFlagInclListino(String flagInclListino) {
        this.flagInclListino = flagInclListino;
        return this;
    }

    public String getUntMis3() {
        return untMis3;
    }

    public MtbAart setUntMis3(String untMis3) {
        this.untMis3 = untMis3;
        return this;
    }

    public BigDecimal getRapConv3() {
        return rapConv3;
    }

    public MtbAart setRapConv3(BigDecimal rapConv3) {
        this.rapConv3 = rapConv3;
        return this;
    }

    public String getCodMartStat() {
        return codMartStat;
    }

    public MtbAart setCodMartStat(String codMartStat) {
        this.codMartStat = codMartStat;
        return this;
    }

    public String getCodMcon() {
        return codMcon;
    }

    public MtbAart setCodMcon(String codMcon) {
        this.codMcon = codMcon;
        return this;
    }

    public String getCodMgrp() {
        return codMgrp;
    }

    public MtbAart setCodMgrp(String codMgrp) {
        this.codMgrp = codMgrp;
        return this;
    }

    public String getCodMsfa() {
        return codMsfa;
    }

    public MtbAart setCodMsfa(String codMsfa) {
        this.codMsfa = codMsfa;
        return this;
    }

    public String getCodMsgr() {
        return codMsgr;
    }

    public MtbAart setCodMsgr(String codMsgr) {
        this.codMsgr = codMsgr;
        return this;
    }

    public String getCodMstp() {
        return codMstp;
    }

    public MtbAart setCodMstp(String codMstp) {
        this.codMstp = codMstp;
        return this;
    }

    public String getCodMtip() {
        return codMtip;
    }

    public MtbAart setCodMtip(String codMtip) {
        this.codMtip = codMtip;
        return this;
    }

    public String getDescrizioneStat() {
        return descrizioneStat;
    }

    public MtbAart setDescrizioneStat(String descrizioneStat) {
        this.descrizioneStat = descrizioneStat;
        return this;
    }

    public String getFlagStato() {
        return flagStato;
    }

    public MtbAart setFlagStato(String flagStato) {
        this.flagStato = flagStato;
        return this;
    }

    public BigDecimal getCambioDiviCar() {
        return cambioDiviCar;
    }

    public MtbAart setCambioDiviCar(BigDecimal cambioDiviCar) {
        this.cambioDiviCar = cambioDiviCar;
        return this;
    }

    public BigDecimal getCambioDiviScar() {
        return cambioDiviScar;
    }

    public MtbAart setCambioDiviScar(BigDecimal cambioDiviScar) {
        this.cambioDiviScar = cambioDiviScar;
        return this;
    }

    public Integer getGgScadPartita() {
        return ggScadPartita;
    }

    public MtbAart setGgScadPartita(Integer ggScadPartita) {
        this.ggScadPartita = ggScadPartita;
        return this;
    }

    public BigDecimal getVolumeMc() {
        return volumeMc;
    }

    public MtbAart setVolumeMc(BigDecimal volumeMc) {
        this.volumeMc = volumeMc;
        return this;
    }

    public String getFlagEsponiPrz() {
        return flagEsponiPrz;
    }

    public MtbAart setFlagEsponiPrz(String flagEsponiPrz) {
        this.flagEsponiPrz = flagEsponiPrz;
        return this;
    }

    public String getDataUltVar() {
        return dataUltVar;
    }

    public MtbAart setDataUltVar(String dataUltVar) {
        this.dataUltVar = dataUltVar;
        return this;
    }

    public BigDecimal getPercSfrido() {
        return percSfrido;
    }

    public MtbAart setPercSfrido(BigDecimal percSfrido) {
        this.percSfrido = percSfrido;
        return this;
    }

    public String getCodBarreImb() {
        return codBarreImb;
    }

    public MtbAart setCodBarreImb(String codBarreImb) {
        this.codBarreImb = codBarreImb;
        return this;
    }

    public String getFlagCalcPrz() {
        return flagCalcPrz;
    }

    public MtbAart setFlagCalcPrz(String flagCalcPrz) {
        this.flagCalcPrz = flagCalcPrz;
        return this;
    }

    public String getEsposizioneCompAcq() {
        return esposizioneCompAcq;
    }

    public MtbAart setEsposizioneCompAcq(String esposizioneCompAcq) {
        this.esposizioneCompAcq = esposizioneCompAcq;
        return this;
    }

    public String getFlagCalcPrzAcq() {
        return flagCalcPrzAcq;
    }

    public MtbAart setFlagCalcPrzAcq(String flagCalcPrzAcq) {
        this.flagCalcPrzAcq = flagCalcPrzAcq;
        return this;
    }

    public String getDiacod() {
        return diacod;
    }

    public MtbAart setDiacod(String diacod) {
        this.diacod = diacod;
        return this;
    }

    public String getPlu() {
        return plu;
    }

    public MtbAart setPlu(String plu) {
        this.plu = plu;
        return this;
    }

    public String getPartIvaProd() {
        return partIvaProd;
    }

    public MtbAart setPartIvaProd(String partIvaProd) {
        this.partIvaProd = partIvaProd;
        return this;
    }

    public String getRagSocProd() {
        return ragSocProd;
    }

    public MtbAart setRagSocProd(String ragSocProd) {
        this.ragSocProd = ragSocProd;
        return this;
    }

    public String getFlagRapConvVariabile() {
        return flagRapConvVariabile;
    }

    public MtbAart setFlagRapConvVariabile(String flagRapConvVariabile) {
        this.flagRapConvVariabile = flagRapConvVariabile;
        return this;
    }

    public String getFlagMovArtMag() {
        return flagMovArtMag;
    }

    public MtbAart setFlagMovArtMag(String flagMovArtMag) {
        this.flagMovArtMag = flagMovArtMag;
        return this;
    }

    public String getFlagTracciabilita() {
        return flagTracciabilita;
    }

    public MtbAart setFlagTracciabilita(String flagTracciabilita) {
        this.flagTracciabilita = flagTracciabilita;
        return this;
    }

    public BigDecimal getTaraKg() {
        return taraKg;
    }

    public MtbAart setTaraKg(BigDecimal taraKg) {
        this.taraKg = taraKg;
        return this;
    }

    public BigDecimal getColliStrato() {
        return colliStrato;
    }

    public MtbAart setColliStrato(BigDecimal colliStrato) {
        this.colliStrato = colliStrato;
        return this;
    }

    public String getFlagQtaCnfFissa() {
        return flagQtaCnfFissa;
    }

    public MtbAart setFlagQtaCnfFissa(String flagQtaCnfFissa) {
        this.flagQtaCnfFissa = flagQtaCnfFissa;
        return this;
    }

    public String getFlagColliPedanaFisso() {
        return flagColliPedanaFisso;
    }

    public MtbAart setFlagColliPedanaFisso(String flagColliPedanaFisso) {
        this.flagColliPedanaFisso = flagColliPedanaFisso;
        return this;
    }

    public String getCodCconCosti() {
        return codCconCosti;
    }

    public MtbAart setCodCconCosti(String codCconCosti) {
        this.codCconCosti = codCconCosti;
        return this;
    }

    public String getCodCconRicavi() {
        return codCconRicavi;
    }

    public MtbAart setCodCconRicavi(String codCconRicavi) {
        this.codCconRicavi = codCconRicavi;
        return this;
    }

    public String getCodDgrpArt() {
        return codDgrpArt;
    }

    public MtbAart setCodDgrpArt(String codDgrpArt) {
        this.codDgrpArt = codDgrpArt;
        return this;
    }

    public String getCodDiviCar() {
        return codDiviCar;
    }

    public MtbAart setCodDiviCar(String codDiviCar) {
        this.codDiviCar = codDiviCar;
        return this;
    }

    public String getCodDiviScar() {
        return codDiviScar;
    }

    public MtbAart setCodDiviScar(String codDiviScar) {
        this.codDiviScar = codDiviScar;
        return this;
    }

    public String getCodEcrCat() {
        return codEcrCat;
    }

    public MtbAart setCodEcrCat(String codEcrCat) {
        this.codEcrCat = codEcrCat;
        return this;
    }

    public String getCodEcrMcat() {
        return codEcrMcat;
    }

    public MtbAart setCodEcrMcat(String codEcrMcat) {
        this.codEcrMcat = codEcrMcat;
        return this;
    }

    public String getCodEcrRep() {
        return codEcrRep;
    }

    public MtbAart setCodEcrRep(String codEcrRep) {
        this.codEcrRep = codEcrRep;
        return this;
    }

    public String getCodEcrStipo() {
        return codEcrStipo;
    }

    public MtbAart setCodEcrStipo(String codEcrStipo) {
        this.codEcrStipo = codEcrStipo;
        return this;
    }

    public String getCodEcrTipo() {
        return codEcrTipo;
    }

    public MtbAart setCodEcrTipo(String codEcrTipo) {
        this.codEcrTipo = codEcrTipo;
        return this;
    }

    public String getCodGrpBolla() {
        return codGrpBolla;
    }

    public MtbAart setCodGrpBolla(String codGrpBolla) {
        this.codGrpBolla = codGrpBolla;
        return this;
    }

    public String getIngredienti() {
        return ingredienti;
    }

    public MtbAart setIngredienti(String ingredienti) {
        this.ingredienti = ingredienti;
        return this;
    }

    public String getIdArtEqui() {
        return idArtEqui;
    }

    public MtbAart setIdArtEqui(String idArtEqui) {
        this.idArtEqui = idArtEqui;
        return this;
    }

    public String getDescrCassa() {
        return descrCassa;
    }

    public MtbAart setDescrCassa(String descrCassa) {
        this.descrCassa = descrCassa;
        return this;
    }

    public String getCodNcIntracee() {
        return codNcIntracee;
    }

    public MtbAart setCodNcIntracee(String codNcIntracee) {
        this.codNcIntracee = codNcIntracee;
        return this;
    }

    public String getMarchio() {
        return marchio;
    }

    public MtbAart setMarchio(String marchio) {
        this.marchio = marchio;
        return this;
    }

    public Integer getSezione() {
        return sezione;
    }

    public MtbAart setSezione(Integer sezione) {
        this.sezione = sezione;
        return this;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(codMart);
        dest.writeString(descrizione);
        dest.writeString(untMis);
        dest.writeString(barCode);
        dest.writeValue(pesoKg);
        dest.writeValue(qtaCnf);
        dest.writeString(codAliq);
        dest.writeString(codScoArt);
        dest.writeString(codTcolUi);
        dest.writeString(codTcolUl);
        dest.writeString(articoloComposto);
        dest.writeString(esposizioneComp);
        dest.writeString(descrizioneEstesa);
        dest.writeString(codUltForn);
        dest.writeString(dataUltCar);
        dest.writeValue(valUltCar);
        dest.writeString(codUltClie);
        dest.writeString(dataUltScar);
        dest.writeValue(valUltScar);
        dest.writeString(tipoCodice);
        dest.writeString(note);
        dest.writeString(posizione);
        dest.writeValue(colliPedana);
        dest.writeString(untMis2);
        dest.writeValue(rapConv2);
        dest.writeString(flagInclListino);
        dest.writeString(untMis3);
        dest.writeValue(rapConv3);
        dest.writeString(codMartStat);
        dest.writeString(codMcon);
        dest.writeString(codMgrp);
        dest.writeString(codMsfa);
        dest.writeString(codMsgr);
        dest.writeString(codMstp);
        dest.writeString(codMtip);
        dest.writeString(descrizioneStat);
        dest.writeString(flagStato);
        dest.writeValue(cambioDiviCar);
        dest.writeValue(cambioDiviScar);
        if (ggScadPartita == null) {
            dest.writeByte((byte) (0x00));
        } else {
            dest.writeByte((byte) (0x01));
            dest.writeInt(ggScadPartita);
        }
        dest.writeValue(volumeMc);
        dest.writeString(flagEsponiPrz);
        dest.writeString(dataUltVar);
        dest.writeValue(percSfrido);
        dest.writeString(codBarreImb);
        dest.writeString(flagCalcPrz);
        dest.writeString(esposizioneCompAcq);
        dest.writeString(flagCalcPrzAcq);
        dest.writeString(diacod);
        dest.writeString(plu);
        dest.writeString(partIvaProd);
        dest.writeString(ragSocProd);
        dest.writeString(flagRapConvVariabile);
        dest.writeString(flagMovArtMag);
        dest.writeString(flagTracciabilita);
        dest.writeValue(taraKg);
        dest.writeValue(colliStrato);
        dest.writeString(flagQtaCnfFissa);
        dest.writeString(flagColliPedanaFisso);
        dest.writeString(codCconCosti);
        dest.writeString(codCconRicavi);
        dest.writeString(codDgrpArt);
        dest.writeString(codDiviCar);
        dest.writeString(codDiviScar);
        dest.writeString(codEcrCat);
        dest.writeString(codEcrMcat);
        dest.writeString(codEcrRep);
        dest.writeString(codEcrStipo);
        dest.writeString(codEcrTipo);
        dest.writeString(codGrpBolla);
        dest.writeString(ingredienti);
        dest.writeString(idArtEqui);
        dest.writeString(descrCassa);
        dest.writeString(codNcIntracee);
        dest.writeString(marchio);
        if (sezione == null) {
            dest.writeByte((byte) (0x00));
        } else {
            dest.writeByte((byte) (0x01));
            dest.writeInt(sezione);
        }




    }

    @SuppressWarnings("unused")
    public static final Parcelable.Creator<MtbAart> CREATOR = new Parcelable.Creator<MtbAart>() {
        @Override
        public MtbAart createFromParcel(Parcel in) {
            return new MtbAart(in);
        }

        @Override
        public MtbAart[] newArray(int size) {
            return new MtbAart[size];
        }
    };

}
