| | |
| | | { |
| | | var rohInErpRohIn = rohIn.ErpRohIn; |
| | | var mesRohIn = GetMesRohIn(rohInErpRohIn); |
| | | var mesRohInDatas = GetMesRohInDatas(rohIn.ErpRohinDatas, rohInErpRohIn.Type); |
| | | var mesRohInDatas = |
| | | GetMesRohInDatas(rohIn.ErpRohinDatas, rohInErpRohIn.Type); |
| | | |
| | | return UseTransaction(db => |
| | | { |
| | |
| | | mesRohIn.DocumentType = rohIn.FBillTypeID; |
| | | mesRohIn.BusinessType = rohIn.FBusinessType; |
| | | if (rohIn.FDate != null) |
| | | mesRohIn.PurchaseDate = DateTime.ParseExact(rohIn.FDate,"yyyy-MM-dd HH:mm:ss", null); |
| | | mesRohIn.PurchaseDate = DateTime.ParseExact(rohIn.FDate, |
| | | "yyyy-MM-dd HH:mm:ss", null); |
| | | mesRohIn.Supplier = rohIn.FSupplierId; |
| | | mesRohIn.CloseStatus = rohIn.FCloseStatus; |
| | | mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId; |
| | |
| | | EbelnK3id = Convert.ToDecimal(s.id), |
| | | ErpId = Convert.ToDecimal(s.Eid), |
| | | BillNo = s.FBillNo, |
| | | OrderLineId=s.FSeq, |
| | | OrderLineId = s.FSeq, |
| | | PurchaseOrderLineNumber = s.FSeq, |
| | | SalesOrderId = s.FXSHTH, |
| | | ItemId = s.FMaterialId, |
| | |
| | | ? DateTime.ParseExact(s.FTerminateDate, |
| | | "yyyy-MM-dd HH:mm:ss", null) |
| | | : null, |
| | | TotalReceivedQty = Convert.ToDecimal(s.FQty)-Convert.ToDecimal(s.FRemainReceiveQty), |
| | | TotalReceivedQty = Convert.ToDecimal(s.FQty) - |
| | | Convert.ToDecimal(s.FRemainReceiveQty), |
| | | RemainingReceivedQty = Convert.ToDecimal(s.FRemainReceiveQty), |
| | | TotalStoredQty = Convert.ToDecimal(s.FQty) - Convert.ToDecimal(s.FRemainStockINQty), |
| | | TotalStoredQty = Convert.ToDecimal(s.FQty) - |
| | | Convert.ToDecimal(s.FRemainStockINQty), |
| | | RemainingStoredQty = Convert.ToDecimal(s.FRemainStockINQty), |
| | | TotalReturnedQty = Convert.ToDecimal(s.FMrbQty), |
| | | ReturnableReceivedQty = Convert.ToDecimal(s.FBaseCheckRetQty), |