public void addPayment(EaglesoftPayment p)
        {
            // First get the deposit configuration according to the Eaglesoft payment type. We use this to
            // determine which Quickbooks payment type to use.
            PaytypeMapping payType = Configuration.getPayTypeByEaglesoftPayType(p.EaglesoftPayType);

            // Find the deposit configuration for this quickbooks pay type.
            DepositConfiguration depositConfig = Configuration.getDepositConfig(payType.QuickbooksPayType);

            Deposit deposit = getDeposit(depositConfig, payType.QuickbooksPayType);

            deposit.addPayment(p);
        }
Exemple #2
0
        public void addPayment(EaglesoftPayment p)
        {
            PaytypeMapping payType = UserSettings.getInstance().Configuration.getPayTypeByEaglesoftPayType(p.EaglesoftPayType);
            DepositLine    line    = new DepositLine();

            line.Amount        = p.Amount;
            line.IncomeAccount = payType.IncomeAccount.Name;
            line.PaymentMethod = payType.QuickbooksPayType.Name;
            line.Customer      = payType.Customer.Name;
            line.Memo          = p.Description;
            line.CheckNumber   = p.CheckNumber;
            _lines.Add(line);

            if (_payTypeCounts.ContainsKey(payType.QuickbooksPayType))
            {
                _payTypeCounts[payType.QuickbooksPayType] = _payTypeCounts[payType.QuickbooksPayType] + 1;
            }
            else
            {
                _payTypeCounts[payType.QuickbooksPayType] = 1;
            }
        }
        public void normalizeConfiguration()
        {
            Boolean found = false;

            foreach (EaglesoftAdjustmentType eaglesoftAdjustment in EaglesoftAdjustments)
            {
                found = false;
                foreach (RefundTypeMapping r in RefundTypeMappings)
                {
                    if (eaglesoftAdjustment.Equals(r.EaglesoftAdjustment))
                    {
                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    RefundTypeMapping refundMapping = new RefundTypeMapping();
                    refundMapping.EaglesoftAdjustment = eaglesoftAdjustment;
                    RefundTypeMappings.Add(refundMapping);
                }
            }

            foreach (EaglesoftPaymentType eaglesoftPaytype in EaglesoftPaytypes)
            {
                found = false;
                foreach (PaytypeMapping p in PayTypeMappings)
                {
                    if (eaglesoftPaytype.Equals(p.EaglesoftPaytype))
                    {
                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    PaytypeMapping t = new PaytypeMapping();
                    t.EaglesoftPaytype = eaglesoftPaytype;
                    PayTypeMappings.Add(t);
                }
            }
        }