/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Models.DevisClt;

import Models.Client.Client;
import Models.Client.ClientEntreprise;
import Models.Client.ClientPassager;
import Models.Produit.ListeProduit;
import javafx.collections.ObservableList;

/**
 *
 * @author Maher Ben Tili
 */
public class Devis {
    
    private Integer TypeClient ;  //0 Personne  1 Entreprise 2 Passager
    private String CodeDevis ;
    private String CodeClient ;
    private Client client;
    private ClientEntreprise entreprise;
    private ClientPassager passager;
    private String Validite;
    private String TypeRegement;
    private String NetAPayer ;
    private String TotalTVA ;
    private String TotalHorsTaxNet;
    private String Remise;
    private String timbre;
    private String matricule;
    private Integer CodeUser;  //code profile de utilisateur du programme
    private String DateCreation;
    
    private ObservableList<ListeProduit> listeproduit ;

    public Integer getTypeClient() {
        return TypeClient;
    }

    public void setTypeClient(Integer TypeClient) {
        this.TypeClient = TypeClient;
    }
    
    public String getTypeClientString() {
        String Client = null ;
        
        if(TypeClient == 0){
            Client= "Ancien client";
        }
        if(TypeClient == 1){
            Client= "Entreprise";
        }
        if(TypeClient == 2){
            Client= "Passager";
        }
        return Client ;
    }
    
    public String getCodeDevis() {
        return CodeDevis;
    }

    public void setCodeDevis(String CodeDevis) {
        this.CodeDevis = CodeDevis;
    }

    public String getCodeClient() {
        return CodeClient;
    }

    public void setCodeClient(String CodeClient) {
        this.CodeClient = CodeClient;
    }

    public Client getClient() {
        return client;
    }

    public void setClient(Client client) {
        this.client = client;
    }

    public ClientPassager getPassager() {
        return passager;
    }

    public void setPassager(ClientPassager passager) {
        this.passager = passager;
    }

    public ClientEntreprise getEntreprise() {
        return entreprise;
    }

    public void setEntreprise(ClientEntreprise entreprise) {
        this.entreprise = entreprise;
    }
    
    
    public String getTimbre() {
        return timbre;
    }

    public void setTimbre(String timbre) {
        this.timbre = timbre;
    }

    public String getValidite() {
        return Validite;
    }

    public void setValidite(String Validite) {
        this.Validite = Validite;
    }

    public String getTypeRegement() {
        return TypeRegement;
    }

    public void setTypeRegement(String TypeRegement) {
        this.TypeRegement = TypeRegement;
    }
    
    public void setTypeRegementString(String TypeRegement) {
        if(TypeRegement.equals("Comptant")){
            this.TypeRegement = "0";
        }else{
            this.TypeRegement = "1";
        }
    }
    
    public String getTypeRegementString() {
        String mode ="";
        
        switch (this.TypeRegement) {
            case "0":
                mode= "Comptant";
                break;
            case "1":
                mode = "Facilité";
                break;
        }
        return mode ;
    }
    
    public int getTypeRegementInteger(){
        int mode = 0;
        switch (this.TypeRegement) {
            case "Comptant":
                mode= 0;
                break;
            case "Facilité":
                mode = 1;
                break;
        }
        return mode ;
    }
    
    
    public String getNetAPayer() {
        return NetAPayer;
    }

    public void setNetAPayer(String NetAPayer) {
        this.NetAPayer = NetAPayer;
    }

    public String getTotalTVA() {
        return TotalTVA;
    }

    public void setTotalTVA(String TotalTVA) {
        this.TotalTVA = TotalTVA;
    }

    public String getTotalHorsTaxNet() {
        return TotalHorsTaxNet;
    }

    public void setTotalHorsTaxNet(String TotalHorsTaxNet) {
        this.TotalHorsTaxNet = TotalHorsTaxNet;
    }

    public String getMatricule() {
        return matricule;
    }

    public void setMatricule(String matricule) {
        this.matricule = matricule;
    }

    public String getRemise() {
        return Remise;
    }

    public void setRemise(String Remise) {
        this.Remise = Remise;
    }
    
    public Integer getCodeUser() {
        return CodeUser;
    }

    public void setCodeUser(Integer CodeUser) {
        this.CodeUser = CodeUser;
    }
    
    
    public ObservableList<ListeProduit> getListeproduit() {
        return listeproduit;
    }

    public void setListeproduit(ObservableList<ListeProduit> listeproduit) {
        this.listeproduit = listeproduit;
    }

    public String getDateCreation() {
        return DateCreation;
    }

    public void setDateCreation(String DateCreation) {
        this.DateCreation = DateCreation;
    }

}
