public TS_STOCK_DETAIL ToStockDetailIn(TB_BILL bill) { if (bill.BillType == (int)BillType.MaterialIn) { return(new TS_STOCK_DETAIL { PartCode = this.PartCode, Batch = this.Batch, LocCode = this.ToLocCode, Qty = this.Qty, ProduceDate = this.ProduceDate, UnitPrice = this.UnitPrice, UpdateQty = Qty, ReceiveDate = DateTime.Now, UpdateTime = DateTime.Now, OverdueDate = (this.ProduceDate).AddDays(GlobalBuffer.GetValidateDays(this.PartCode)), }); } return(new TS_STOCK_DETAIL { PartCode = this.PartCode, Batch = this.Batch, LocCode = this.ToLocCode, Qty = 0, ProduceDate = this.ProduceDate, OverdueDate = (this.ProduceDate).AddDays(GlobalBuffer.GetValidateDays(this.PartCode)), }); }
public TS_STOCK_DETAIL ToStockDetailOut(TB_BILL bill) { return(new TS_STOCK_DETAIL { PartCode = this.PartCode, Batch = this.Batch, LocCode = this.FromLocCode, UnitPrice = (decimal)UnitPrice, Qty = this.Qty, UpdateQty = 0 - this.Qty }); }
public TS_STOCK_DETAIL ToStockDetailIn(TB_BILL bill) { return(new TS_STOCK_DETAIL { PartCode = this.PartCode, Batch = this.Batch, LocCode = this.ToLocCode, Qty = this.Qty, UpdateQty = this.Qty, UnitPrice = (decimal)this.UnitPrice, ProduceDate = this.ProduceDate.Value, ReceiveDate = DateTime.Now, OverdueDate = this.ProduceDate.Value.AddDays(GlobalBuffer.GetValidateDays(this.PartCode)), }); }