Exemple #1
0
 public void FromPaytypeMappingDTOs(List <PaytypeMappingDTO> paytypeMappingDTOs)
 {
     PayTypeMappings.Clear();
     foreach (PaytypeMappingDTO paytypeMappingDTO in paytypeMappingDTOs)
     {
         PayTypeMappings.Add(new PaytypeMapping()
         {
             Customer          = QuickbooksCustomers.FirstOrDefault(p => p.Name.Equals(paytypeMappingDTO.QuickbooksCustomer)),
             IncomeAccount     = QuickbooksIncomeAccounts.FirstOrDefault(p => p.Name.Equals(paytypeMappingDTO.QuickbooksAccount)),
             QuickbooksPayType = QuickbooksPaytypes.FirstOrDefault(p => p.Name.Equals(paytypeMappingDTO.QuickbooksPaytype)),
             EaglesoftPaytype  = EaglesoftPaytypes.FirstOrDefault(p => p.Id.Equals(paytypeMappingDTO.EaglesoftPaytypeId))
         });
     }
 }
Exemple #2
0
 public void FromRefundMappingDTOs(IList <RefundTypeMappingDTO> refundMappingDTOs)
 {
     RefundTypeMappings.Clear();
     foreach (RefundTypeMappingDTO refundTypeMappingDTO in refundMappingDTOs)
     {
         RefundTypeMappings.Add(new RefundTypeMapping()
         {
             Customer               = QuickbooksCustomers.FirstOrDefault(p => p.Name.Equals(refundTypeMappingDTO.QuickbooksCustomer)),
             EaglesoftAdjustment    = EaglesoftAdjustments.Single(p => p.Id.Equals(refundTypeMappingDTO.EaglesoftAdjustmentId)),
             Enabled                = refundTypeMappingDTO.Enabled,
             IncomeAccount          = QuickbooksIncomeAccounts.FirstOrDefault(p => p.Name.Equals(refundTypeMappingDTO.QuickbooksIncomeAccount)),
             RefundCheckBankAccount = QuickbooksBankAccounts.FirstOrDefault(p => p.Name.Equals(refundTypeMappingDTO.QuickbooksRefundCheckBankAccount)),
             IssueCheck             = refundTypeMappingDTO.IssueCheck,
             QuickbooksPaytype      = QuickbooksPaytypes.FirstOrDefault(p => p.Name.Equals(refundTypeMappingDTO.QuickbooksPaytype)),
             RefundCheckRecipient   = refundTypeMappingDTO.RefundCheckRecipient
         });
     }
 }