package nc.dto.imag.invoice;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;

import nc.dto.imag.boot.IEncode;
import nc.vo.pub.SuperVO;

/**
 * 增值税普通发票
 *
 * @author gaozhdf@yonyou.com
 *
 */
public class PInvoice extends SuperVO implements Serializable ,IEncode{

    private static final long serialVersionUID = 1L;

    // 发票申请流水号
    private String applyNumber;

    // 采集方式 1、电子发票 2、ocr方式发票 3、excel
    private int cjfs;

    // 来源ID
    private String lyid;

    // 来源NO
    private String srcBillNo;

    // 红字信息表编号
    private String hzxxbbh;

    // 备注
    private String bz;

    // 复核人
    private String fhr;

    // 发票代码
    private String fpDm;

    // 发票号码
    private String fpHm;

    // 发票明文
    private String fpMw;

    // 发票类型
    private String fplx;

    // 发票介质
    private String fpjz;

    // 作废标志
    private String zfbz;

    // 购买方地址电话
    private String gmfDzdh;

    // 购买方名称
    private String gmfMc;

    // 购买方纳税人识别号
    private String gmfNsrsbh;

    // 购买方银行账号
    private String gmfYhzh;

    // 合计金额
    private BigDecimal hjje;

    // 合计税额
    private BigDecimal hjse;

    // 税控设备编号
    private String jqbh;

    // 价税合计
    private BigDecimal jshj;

    // 校验码
    private String jym;

    // 开票类型
    private String kplx;

    // 开票人
    private String kpr;

    // 开票日期
    private String kprq;

    // 收款人
    private String skr;

    // 销售方地址电话
    private String xsfDzdh;

    // 销售方名称
    private String xsfMc;

    // 销售方纳税人识别号
    private String xsfNsrsbh;

    // 销售方银行账号
    private String xsfYhzh;

    // 二维码
    private String ewm;

    // 编码版本号
    private String bmbBbh;

    // 开票点编码
    private String orgcode;

    // 收购标志
    private String sgbz;

    // 原发票代码
    private String yfpDm;

    // 原发票号码
    private String yfpHm;

    // 来源类型
    private String lylx;

    //税务机关代码
    private String swjgdm;

    //税务机关名称
    private String swjgmc;

    //完税凭证号码
    private String wspzh;

    //机动车专票特殊参数
    private String tspz;

    //发票下载地址
    private String shareurl;

    //发票下载提取码
    private String sharecode;

    //税率说明
    private String slsm;

    //红冲原因
    private String hcyy;

    //电子税务局用户名
    private String allelcusername;

    //电子税务局密码
    private String allelcpassword;

    //销售方地址
    private String xsf_dz;

    //销售方电话
    private String xsf_dh;

    //销售方开户行
    private String xsf_yh;

    //销售方银行账号
    private String xsf_zh;

    //购买方地址
    private String gmf_dz;

    //购买方电话
    private String gmf_dh;

    //购买方开户行
    private String gmf_yh;

    //购买方银行账号
    private String gmf_zh;

    //是否被红冲: Y-已红冲，N-未红冲
    private String bred;

    //自定义备注
    private String zdybz;

    //征税方式
    private String zsfs;

    //不动产租赁地址
    private String bdcdz;

    //租赁日期止
    private String zlqz;

    //是否跨地址标志
    private String kdsbz;

    //租赁日期起
    private String zlqq;

    //土地增值税项目编号
    private String tdzzsxmbh;

    //网签合同备案编号
    private String wqhtbabh;

    //不动产单元代码
    private String bdcdwdm;

    //核定计税价格
    private BigDecimal hdjsjg;

    //实际成交含税金额
    private BigDecimal sjcjhsje;

    //保险单号
    private String bxdh;

    //车牌号/船舶登记号
    private String cphcbdjh;

    //税款所属期yyyy-MM+空格+yyyy-MM
    private String skssq;

    //代收车船税金额
    private BigDecimal dsccsje;

    //滞纳金
    private BigDecimal znj;

    //金额合计
    private BigDecimal jehj;

    //车辆识别代码/车架号码
    private String cjh;

    // 发票明细
    private PInvoiceDetail[] items;
    //跨区域涉税事项报验管理编号
    private String kqysssxbgglbm;

    //差额开票
    private PInvoiceCepz[] cepzs;

    private PInvoiceTspz[] tspzs;

    // 数电发票是否显示购销方地址电话
    private String einvoiceshowgxfdzdh;

    // 数电发票是否显示购销方银行、账号
    private String einvoiceshowgxfyhzh;

    // 销售方电话
    private String xsfDh;

    // 销售方地址
    private String xsfDz;

    // 购买方地址
    private String gmfDz;

    // 购买方电话
    private String gmfDh;

    public String getApplyNumber() {

        return applyNumber;
    }

    public void setApplyNumber(String applyNumber) {

        this.applyNumber = applyNumber;
    }

    public String getLyid() {

        return lyid;
    }

    public void setLyid(String lyid) {

        this.lyid = lyid;
    }

    public String getBz() {

        return bz;
    }

    public void setBz(String bz) {

        this.bz = bz;
    }

    public String getFhr() {

        return fhr;
    }

    public void setFhr(String fhr) {

        this.fhr = fhr;
    }

    public String getFpDm() {

        return fpDm;
    }

    public void setFpDm(String fpDm) {

        this.fpDm = fpDm;
    }

    public String getFpHm() {

        return fpHm;
    }

    public void setFpHm(String fpHm) {

        this.fpHm = fpHm;
    }

    public String getFpMw() {

        return fpMw;
    }

    public void setFpMw(String fpMw) {

        this.fpMw = fpMw;
    }

    public String getFplx() {

        return fplx;
    }

    public void setFplx(String fplx) {

        this.fplx = fplx;
    }

    public String getFpjz() {

        return fpjz;
    }

    public void setFpjz(String fpjz) {

        this.fpjz = fpjz;
    }

    public String getZfbz() {

        return zfbz;
    }

    public void setZfbz(String zfbz) {

        this.zfbz = zfbz;
    }

    public String getGmfDzdh() {

        return gmfDzdh;
    }

    public void setGmfDzdh(String gmfDzdh) {

        this.gmfDzdh = gmfDzdh;
    }

    public String getGmfMc() {

        return gmfMc;
    }

    public void setGmfMc(String gmfMc) {

        this.gmfMc = gmfMc;
    }

    public String getGmfNsrsbh() {

        return gmfNsrsbh;
    }

    public void setGmfNsrsbh(String gmfNsrsbh) {

        this.gmfNsrsbh = gmfNsrsbh;
    }

    public String getGmfYhzh() {

        return gmfYhzh;
    }

    public void setGmfYhzh(String gmfYhzh) {

        this.gmfYhzh = gmfYhzh;
    }

    public BigDecimal getHjje() {

        return hjje;
    }

    public void setHjje(BigDecimal hjje) {

        this.hjje = hjje;
    }

    public BigDecimal getHjse() {

        return hjse;
    }

    public void setHjse(BigDecimal hjse) {

        this.hjse = hjse;
    }

    public String getJqbh() {

        return jqbh;
    }

    public void setJqbh(String jqbh) {

        this.jqbh = jqbh;
    }

    public BigDecimal getJshj() {

        return jshj;
    }

    public void setJshj(BigDecimal jshj) {

        this.jshj = jshj;
    }

    public String getJym() {

        return jym;
    }

    public void setJym(String jym) {

        this.jym = jym;
    }

    public String getKplx() {

        return kplx;
    }

    public void setKplx(String kplx) {

        this.kplx = kplx;
    }

    public String getKpr() {

        return kpr;
    }

    public void setKpr(String kpr) {

        this.kpr = kpr;
    }

    public String getKprq() {

        return kprq;
    }

    public void setKprq(String kprq) {

        this.kprq = kprq;
    }

    public String getSkr() {

        return skr;
    }

    public void setSkr(String skr) {

        this.skr = skr;
    }

    public String getXsfDzdh() {

        return xsfDzdh;
    }

    public void setXsfDzdh(String xsfDzdh) {

        this.xsfDzdh = xsfDzdh;
    }

    public String getXsfMc() {

        return xsfMc;
    }

    public void setXsfMc(String xsfMc) {

        this.xsfMc = xsfMc;
    }

    public String getXsfNsrsbh() {

        return xsfNsrsbh;
    }

    public void setXsfNsrsbh(String xsfNsrsbh) {

        this.xsfNsrsbh = xsfNsrsbh;
    }

    public String getXsfYhzh() {

        return xsfYhzh;
    }

    public void setXsfYhzh(String xsfYhzh) {

        this.xsfYhzh = xsfYhzh;
    }

    public String getEwm() {

        return ewm;
    }

    public void setEwm(String ewm) {

        this.ewm = ewm;
    }

    public String getBmbBbh() {

        return bmbBbh;
    }

    public void setBmbBbh(String bmbBbh) {

        this.bmbBbh = bmbBbh;
    }

    public String getOrgcode() {

        return orgcode;
    }

    public void setOrgcode(String orgcode) {

        this.orgcode = orgcode;
    }

    public String getSgbz() {

        return sgbz;
    }

    public void setSgbz(String sgbz) {

        this.sgbz = sgbz;
    }

    public String getYfpDm() {
        return yfpDm;
    }

    public void setYfpDm(String yfpDm) {
        this.yfpDm = yfpDm;
    }

    public String getYfpHm() {
        return yfpHm;
    }

    public void setYfpHm(String yfpHm) {
        this.yfpHm = yfpHm;
    }

    public String getLylx() {
        return lylx;
    }

    public void setLylx(String lylx) {
        this.lylx = lylx;
    }

    public PInvoiceDetail[] getItems() {

        return items;
    }

    public void setItems(PInvoiceDetail[] items) {

        this.items = items;
    }

    public String getSrcBillNo() {

        return srcBillNo;
    }

    public void setSrcBillNo(String srcBillNo) {

        this.srcBillNo = srcBillNo;
    }

    public String getHzxxbbh() {

        return hzxxbbh;
    }

    public void setHzxxbbh(String hzxxbbh) {

        this.hzxxbbh = hzxxbbh;
    }

    public int getCjfs() {

        return cjfs;
    }

    public void setCjfs(int cjfs) {

        this.cjfs = cjfs;
    }

    public String getSwjgdm() {
        return swjgdm;
    }

    public void setSwjgdm(String swjgdm) {
        this.swjgdm = swjgdm;
    }

    public String getSwjgmc() {
        return swjgmc;
    }

    public void setSwjgmc(String swjgmc) {
        this.swjgmc = swjgmc;
    }

    public String getWspzh() {
        return wspzh;
    }

    public void setWspzh(String wspzh) {
        this.wspzh = wspzh;
    }

    public String getTspz() {
        return tspz;
    }

    public void setTspz(String tspz) {
        this.tspz = tspz;
    }


    public String getShareurl() {
        return shareurl;
    }

    public void setShareurl(String shareurl) {
        this.shareurl = shareurl;
    }

    public String getSharecode() {
        return sharecode;
    }

    public void setSharecode(String sharecode) {
        this.sharecode = sharecode;
    }


    public String getSlsm() {
        return slsm;
    }

    public void setSlsm(String slsm) {
        this.slsm = slsm;
    }

    public String getHcyy() {
        return hcyy;
    }

    public void setHcyy(String hcyy) {
        this.hcyy = hcyy;
    }

    public String getAllelcusername() {
        return allelcusername;
    }

    public void setAllelcusername(String allelcusername) {
        this.allelcusername = allelcusername;
    }

    public String getAllelcpassword() {
        return allelcpassword;
    }

    public void setAllelcpassword(String allelcpassword) {
        this.allelcpassword = allelcpassword;
    }

    public String getXsf_dz() {
        return xsf_dz;
    }

    public void setXsf_dz(String xsf_dz) {
        this.xsf_dz = xsf_dz;
    }

    public String getXsf_dh() {
        return xsf_dh;
    }

    public void setXsf_dh(String xsf_dh) {
        this.xsf_dh = xsf_dh;
    }

    public String getXsf_yh() {
        return xsf_yh;
    }

    public void setXsf_yh(String xsf_yh) {
        this.xsf_yh = xsf_yh;
    }

    public String getXsf_zh() {
        return xsf_zh;
    }

    public void setXsf_zh(String xsf_zh) {
        this.xsf_zh = xsf_zh;
    }

    public String getGmf_dz() {
        return gmf_dz;
    }

    public void setGmf_dz(String gmf_dz) {
        this.gmf_dz = gmf_dz;
    }

    public String getGmf_dh() {
        return gmf_dh;
    }

    public void setGmf_dh(String gmf_dh) {
        this.gmf_dh = gmf_dh;
    }

    public String getGmf_yh() {
        return gmf_yh;
    }

    public void setGmf_yh(String gmf_yh) {
        this.gmf_yh = gmf_yh;
    }

    public String getGmf_zh() {
        return gmf_zh;
    }

    public void setGmf_zh(String gmf_zh) {
        this.gmf_zh = gmf_zh;
    }

    public String getBred() {
        return bred;
    }

    public void setBred(String bred) {
        this.bred = bred;
    }

    public String getZdybz() {
        return zdybz;
    }

    public void setZdybz(String zdybz) {
        this.zdybz = zdybz;
    }


    public String getZsfs() {
        return zsfs;
    }

    public void setZsfs(String zsfs) {
        this.zsfs = zsfs;
    }

    public String getBdcdz() {
        return bdcdz;
    }

    public void setBdcdz(String bdcdz) {
        this.bdcdz = bdcdz;
    }

    public String getZlqz() {
        return zlqz;
    }

    public void setZlqz(String zlqz) {
        this.zlqz = zlqz;
    }

    public String getKdsbz() {
        return kdsbz;
    }

    public void setKdsbz(String kdsbz) {
        this.kdsbz = kdsbz;
    }

    public String getZlqq() {
        return zlqq;
    }

    public void setZlqq(String zlqq) {
        this.zlqq = zlqq;
    }

    public String getTdzzsxmbh() {
        return tdzzsxmbh;
    }

    public void setTdzzsxmbh(String tdzzsxmbh) {
        this.tdzzsxmbh = tdzzsxmbh;
    }

    public String getWqhtbabh() {
        return wqhtbabh;
    }

    public void setWqhtbabh(String wqhtbabh) {
        this.wqhtbabh = wqhtbabh;
    }

    public String getBdcdwdm() {
        return bdcdwdm;
    }

    public void setBdcdwdm(String bdcdwdm) {
        this.bdcdwdm = bdcdwdm;
    }

    public BigDecimal getHdjsjg() {
        return hdjsjg;
    }

    public void setHdjsjg(BigDecimal hdjsjg) {
        this.hdjsjg = hdjsjg;
    }

    public BigDecimal getSjcjhsje() {
        return sjcjhsje;
    }

    public void setSjcjhsje(BigDecimal sjcjhsje) {
        this.sjcjhsje = sjcjhsje;
    }

    public String getBxdh() {
        return bxdh;
    }

    public void setBxdh(String bxdh) {
        this.bxdh = bxdh;
    }

    public String getCphcbdjh() {
        return cphcbdjh;
    }

    public void setCphcbdjh(String cphcbdjh) {
        this.cphcbdjh = cphcbdjh;
    }

    public String getSkssq() {
        return skssq;
    }

    public void setSkssq(String skssq) {
        this.skssq = skssq;
    }

    public BigDecimal getDsccsje() {
        return dsccsje;
    }

    public void setDsccsje(BigDecimal dsccsje) {
        this.dsccsje = dsccsje;
    }

    public BigDecimal getZnj() {
        return znj;
    }

    public void setZnj(BigDecimal znj) {
        this.znj = znj;
    }

    public BigDecimal getJehj() {
        return jehj;
    }

    public void setJehj(BigDecimal jehj) {
        this.jehj = jehj;
    }

    public String getCjh() {
        return cjh;
    }

    public void setCjh(String cjh) {
        this.cjh = cjh;
    }

    public PInvoiceCepz[] getCepzs() {
        return cepzs;
    }

    public void setCepzs(PInvoiceCepz[] cepzs) {
        this.cepzs = cepzs;
    }

    public PInvoiceTspz[] getTspzs() {
        return tspzs;
    }

    public void setTspzs(PInvoiceTspz[] tspzs) {
        this.tspzs = tspzs;
    }
    public String getKqysssxbgglbm() {
        return kqysssxbgglbm;
    }

    public void setKqysssxbgglbm(String kqysssxbgglbm) {
        this.kqysssxbgglbm = kqysssxbgglbm;
    }

    public String getEinvoiceshowgxfdzdh() {
        return einvoiceshowgxfdzdh;
    }

    public void setEinvoiceshowgxfdzdh(String einvoiceshowgxfdzdh) {
        this.einvoiceshowgxfdzdh = einvoiceshowgxfdzdh;
    }

    public String getEinvoiceshowgxfyhzh() {
        return einvoiceshowgxfyhzh;
    }

    public void setEinvoiceshowgxfyhzh(String einvoiceshowgxfyhzh) {
        this.einvoiceshowgxfyhzh = einvoiceshowgxfyhzh;
    }

    public String getXsfDh() {
        return xsfDh;
    }

    public void setXsfDh(String xsfDh) {
        this.xsfDh = xsfDh;
    }

    public String getXsfDz() {
        return xsfDz;
    }

    public void setXsfDz(String xsfDz) {
        this.xsfDz = xsfDz;
    }

    public String getGmfDz() {
        return gmfDz;
    }

    public void setGmfDz(String gmfDz) {
        this.gmfDz = gmfDz;
    }

    public String getGmfDh() {
        return gmfDh;
    }

    public void setGmfDh(String gmfDh) {
        this.gmfDh = gmfDh;
    }

    @Override
    public String toString() {

        return "PInvoice [applyNumber=" + applyNumber + ", cjfs=" + cjfs + ", lyid=" + lyid + ", srcBillNo=" + srcBillNo
                + ", hzxxbbh=" + hzxxbbh + ", bz=" + bz + ", fhr=" + fhr + ", fpDm=" + fpDm + ", fpHm=" + fpHm
                + ", fpMw=" + fpMw + ", fplx=" + fplx + ", fpjz=" + fpjz + ", zfbz=" + zfbz + ", gmfDzdh=" + gmfDzdh
                + ", gmfMc=" + gmfMc + ", gmfNsrsbh=" + gmfNsrsbh + ", gmfYhzh=" + gmfYhzh + ", hjje=" + hjje
                + ", hjse=" + hjse + ", jqbh=" + jqbh + ", jshj=" + jshj + ", jym=" + jym + ", kplx=" + kplx + ", kpr="
                + kpr + ", kprq=" + kprq + ", skr=" + skr + ", xsfDzdh=" + xsfDzdh + ", xsfMc=" + xsfMc + ", xsfNsrsbh="
                + xsfNsrsbh + ", xsfYhzh=" + xsfYhzh + ", ewm=" + ewm + ", bmbBbh=" + bmbBbh + ", orgcode=" + orgcode
                + ", sgbz=" + sgbz + ", swjgdm=" + swjgdm + ",swjgmc=" + swjgmc + ",wspzh =" + wspzh + ",shareurl=" +shareurl
                + ",sharecode=" + sharecode + ",slsm=" + slsm + ",hcyy=" + hcyy + ",zsfs=" + zsfs+ ",bred=" + bred + ",items=" + Arrays.toString(items) + "]";
    }

    /**
     * getDecimalValue
     *
     * @param value
     * @return
     */
    public String getDecimalValue(BigDecimal value) {

        if (value != null) {
            return value.toString();
        }
        return null;
    }
}
