示例#1
0
 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)),
     });
 }
示例#2
0
 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)),
     });
 }