Ejemplo n.º 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)),
     });
 }
Ejemplo n.º 2
0
 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
     });
 }
Ejemplo n.º 3
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)),
     });
 }