using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NX.ERP.Model
{
public class Material : BaseModel
{
private string _code;
private string _name;
private decimal length;
private decimal wide;
private decimal height;
private int volume;
private int weight;
private double unitPrice;
private string unitCode;
private int maxStock;
private int minStock;
private string aql;
public string MaterialCode { get => _code; set => _code = value; }
public string MaterialName { get => _name; set => _name = value; }
public long Pubufts { get; set; }
public string MaterialTypeCode { get; set; }
public string SpecsModel { get; set; }
public string UnitCode { get => unitCode; set => unitCode = value; }
[Newtonsoft.Json.JsonIgnore]
public int MinPackageQty { get; set; }
[Newtonsoft.Json.JsonIgnore]
public int TaxRate { get; set; }
[Newtonsoft.Json.JsonIgnore]
public decimal Length { get => length; set => length = value; }
[Newtonsoft.Json.JsonIgnore]
public decimal Wide { get => wide; set => wide = value; }
[Newtonsoft.Json.JsonIgnore]
public decimal Height { get => height; set => height = value; }
[Newtonsoft.Json.JsonIgnore]
public int Volume { get => volume; set => volume = value; }
public int Weight { get => weight; set => weight = value; }
[Newtonsoft.Json.JsonIgnore]
public double UnitPrice { get => unitPrice; set => unitPrice = value; }
public int MaxStock { get => maxStock; set => maxStock = value; }
public int MinStock { get => minStock; set => minStock = value; }
public int SafeStock { get; set; }
[Newtonsoft.Json.JsonIgnore]
public string Aql { get => aql; set => aql = value; }
[Newtonsoft.Json.JsonIgnore]
public double InvNCost { get; set; }
///
/// 参考成本
///
[Newtonsoft.Json.JsonIgnore]
public double InvSPrice { get; set; }
///
/// 计划单价
///
[Newtonsoft.Json.JsonIgnore]
public double InvRCost { get; set; }
[Newtonsoft.Json.JsonIgnore]
public double ImpTaxRate { get; set; }
///
/// 启用时间
///
public DateTime? Sdate { get; set; }
///
/// 结束时间
///
public DateTime? Edate { get; set; }
public bool UsedFlag
{
get
{
return !Edate.HasValue;
}
}
public DateTime? ModifyDate { get; set; }
///
/// 是否采购
///
public bool IsPurchase { get; set; }
[Newtonsoft.Json.JsonIgnore]
public bool IsSelf { get; set; }
[Newtonsoft.Json.JsonIgnore]
public bool ProxyForeign { get; set; }
//bPurchase,bSelf,IsSub
///
/// 供应类型
/// 0-自制 1-外购 2-虚拟件 3-委外
///
public int PlanProperty
{
get
{
if (this.IsPurchase && this.ProxyForeign) return 3;
if (this.IsSelf) return 0;
if (this.IsPurchase) return 1;
return 2;
}
}
public bool IsSale { get; set; }
public bool IsProducing { get; set; }
///
/// 重量单位
///
public string WUnit { get; set; }
///
/// 毛重
///
public float GrossW { get; set; }
}
}