package com.uas.platform.b2b.erp.model;

import com.uas.platform.b2b.model.Product;
import com.uas.platform.b2b.model.PurchaseApBillItem;
import com.uas.platform.b2b.support.SystemSession;

/**
 * 采购方角度ERP APBill明细
 * @author suntg
 * @date 2015年4月17日10:32:24
 *
 */
public class PurchaseAPBillDetail {

	private Short abd_detno;
	private String abd_ordercode;
	private Short abd_orderdetno;
	private String abd_pdinoutno;
	private String abd_prodcode;
	private Double abd_thisvoqty;
	private Double abd_price;
	private Double abd_taxrate;
	private Double abd_amount;
	private Double abd_totalbillprice;
	private Double abd_qty;
	private Double abd_thisvoprice;
	private Double abd_apamount;
	private Double abd_noapamount;
	private Double abd_taxamount;
	private String abd_remark;
	private Double abd_invoqty;
	private Double abd_yqty;
	
	public Short getAbd_detno() {
		return abd_detno;
	}
	public void setAbd_detno(Short abd_detno) {
		this.abd_detno = abd_detno;
	}
	public String getAbd_ordercode() {
		return abd_ordercode;
	}
	public void setAbd_ordercode(String abd_ordercode) {
		this.abd_ordercode = abd_ordercode;
	}
	public Short getAbd_orderdetno() {
		return abd_orderdetno;
	}
	public void setAbd_orderdetno(Short abd_orderdetno) {
		this.abd_orderdetno = abd_orderdetno;
	}
	public String getAbd_pdinoutno() {
		return abd_pdinoutno;
	}
	public void setAbd_pdinoutno(String abd_pdinoutno) {
		this.abd_pdinoutno = abd_pdinoutno;
	}
	public String getAbd_prodcode() {
		return abd_prodcode;
	}
	public void setAbd_prodcode(String abd_prodcode) {
		this.abd_prodcode = abd_prodcode;
	}
	public Double getAbd_thisvoqty() {
		return abd_thisvoqty;
	}
	public void setAbd_thisvoqty(Double abd_thisvoqty) {
		this.abd_thisvoqty = abd_thisvoqty;
	}
	public Double getAbd_price() {
		return abd_price;
	}
	public void setAbd_price(Double abd_price) {
		this.abd_price = abd_price;
	}
	public Double getAbd_taxrate() {
		return abd_taxrate;
	}
	public void setAbd_taxrate(Double abd_taxrate) {
		this.abd_taxrate = abd_taxrate;
	}
	public Double getAbd_amount() {
		return abd_amount;
	}
	public void setAbd_amount(Double abd_amount) {
		this.abd_amount = abd_amount;
	}
	public Double getAbd_totalbillprice() {
		return abd_totalbillprice;
	}
	public void setAbd_totalbillprice(Double abd_totalbillprice) {
		this.abd_totalbillprice = abd_totalbillprice;
	}
	public Double getAbd_qty() {
		return abd_qty;
	}
	public void setAbd_qty(Double abd_qty) {
		this.abd_qty = abd_qty;
	}
	public Double getAbd_thisvoprice() {
		return abd_thisvoprice;
	}
	public void setAbd_thisvoprice(Double abd_thisvoprice) {
		this.abd_thisvoprice = abd_thisvoprice;
	}
	public Double getAbd_apamount() {
		return abd_apamount;
	}
	public void setAbd_apamount(Double abd_apamount) {
		this.abd_apamount = abd_apamount;
	}
	public Double getAbd_noapamount() {
		return abd_noapamount;
	}
	public void setAbd_noapamount(Double abd_noapamount) {
		this.abd_noapamount = abd_noapamount;
	}
	public Double getAbd_taxamount() {
		return abd_taxamount;
	}
	public void setAbd_taxamount(Double abd_taxamount) {
		this.abd_taxamount = abd_taxamount;
	}
	public String getAbd_remark() {
		return abd_remark;
	}
	public void setAbd_remark(String abd_remark) {
		this.abd_remark = abd_remark;
	}
	public Double getAbd_invoqty() {
		return abd_invoqty;
	}
	public void setAbd_invoqty(Double abd_invoqty) {
		this.abd_invoqty = abd_invoqty;
	}
	public Double getAbd_yqty() {
		return abd_yqty;
	}
	public void setAbd_yqty(Double abd_yqty) {
		this.abd_yqty = abd_yqty;
	}
	
	public PurchaseApBillItem convert() {
		PurchaseApBillItem apBillItem = new PurchaseApBillItem();
		apBillItem.setAmount(abd_amount);
		apBillItem.setApAmount(abd_apamount);
		apBillItem.setInvoQty(abd_invoqty);
		apBillItem.setNoApAmount(abd_noapamount);
		apBillItem.setNumber(abd_detno);
		apBillItem.setOrderCode(abd_ordercode);
		apBillItem.setOrderDetno(abd_orderdetno);
		apBillItem.setPdinoutNo(abd_pdinoutno);
		apBillItem.setPrice(abd_price);
		Product product = new Product();
		product.setCode(abd_prodcode);
		product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
		apBillItem.setProduct(product);
		apBillItem.setQty(abd_qty);
		apBillItem.setRemark(abd_remark);
		apBillItem.setTaxAmount(abd_taxamount);
		apBillItem.setTaxrate(abd_taxrate);
		apBillItem.setThisvoPrice(abd_thisvoprice);
		apBillItem.setThisvoQty(abd_thisvoqty);
		apBillItem.setTotalBillPrice(abd_totalbillprice);
		apBillItem.setyQty(abd_yqty);
		return apBillItem;
	}

	
}
