| | |
| | | mesRohIn.Supplier = mesSupplier.Id.ToString(); |
| | | } |
| | | |
| | | // SETTLEMENT_PARTY -> MesSupplier.id |
| | | if (!string.IsNullOrEmpty(rohIn.FSettleId)) |
| | | { |
| | | var settlementSupplier = Db.Queryable<MesSupplier>() |
| | | .Where(s => s.SuppNo == rohIn.FSettleId) |
| | | .Select(s => s.Id) |
| | | .First(); |
| | | if (settlementSupplier != null) |
| | | { |
| | | mesRohIn.SettlementParty = settlementSupplier.ToString(); |
| | | } |
| | | } |
| | | |
| | | // PURCHASE_DEPT -> SYS_DEPARTMENT.DEPARTMENTID |
| | | if (!string.IsNullOrEmpty(rohIn.FPurchaseDeptId)) |
| | | { |
| | | var department = Db.Queryable<SysDepartment>() |
| | | .Where(d => d.Departmentcode == rohIn.FPurchaseDeptId) |
| | | .Select(d => d.Id) |
| | | .First(); |
| | | if (department != null) |
| | | { |
| | | mesRohIn.PurchaseDept = department.ToString(); |
| | | } |
| | | } |
| | | |
| | | mesRohIn.CloseStatus = rohIn.FCloseStatus; |
| | | mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId; |
| | | mesRohIn.PurchaseDept = rohIn.FPurchaseDeptId; |
| | | // mesRohIn.PurchaseOrg = rohIn.FPurchaseOrgId; |
| | | mesRohIn.PurchaseOrg = "1"; |
| | | mesRohIn.PurchaseGroup = rohIn.FPurchaserGroupId; |
| | | mesRohIn.Purchaser = rohIn.FPurchaserId; |
| | | mesRohIn.SettlementParty = rohIn.FSettleId; |
| | | mesRohIn.PaymentParty = rohIn.FChargeId; |
| | | mesRohIn.Email = rohIn.FProviderEMail; |
| | | mesRohIn.Remarks = rohIn.Remarks; |