Exemple #1
0
        private MpGPExportDatum CreateProcessorFee(MpGPExportDatum datum, MPGLAccountMapping processingFeeGLMapping)
        {
            var processorFeeAmount = datum.ProcessorFeeAmount < 0 ? -1 * datum.ProcessorFeeAmount : datum.ProcessorFeeAmount;

            return(new MpGPExportDatum
            {
                DocumentNumber = datum.DocumentNumber,
                ProgramId = processingFeeGLMapping.ProgramId,
                DocumentType = datum.DocumentType,
                DepositId = datum.DepositId,
                DonationId = datum.DonationId,
                BatchName = datum.BatchName,
                DonationDate = datum.DonationDate,
                DepositDate = datum.DepositDate,
                CustomerId = processingFeeGLMapping.CustomerId,
                DepositAmount = datum.DepositAmount,
                DonationAmount = datum.DonationAmount,
                CheckbookId = processingFeeGLMapping.CheckbookId,
                CashAccount = (datum.DocumentType == "SALES" || datum.ProcessorFeeAmount < 0) ? processingFeeGLMapping.DistributionAccount : processingFeeGLMapping.CashAccount,
                ReceivableAccount = datum.ReceivableAccount,
                DistributionAccount = (datum.DocumentType == "SALES" || datum.ProcessorFeeAmount < 0) ? datum.DistributionAccount : processingFeeGLMapping.DistributionAccount,
                ScholarshipExpenseAccount = datum.ScholarshipExpenseAccount,
                Amount = processorFeeAmount,
                ScholarshipPaymentTypeId = datum.ScholarshipPaymentTypeId,
                PaymentTypeId = datum.PaymentTypeId,
                ProcessorFeeAmount = datum.ProcessorFeeAmount,
                TransactionType = datum.TransactionType,
                DistributionReference = $"Processor Fees {datum.DonationDate}"
            });
        }
Exemple #2
0
        private void GenerateGLLevelGpExport(List <MpGPExportDatum> gpExportGLLevel, MpGPExportDatum gpExportDistLevel, MPGLAccountMapping processingFeeGLMapping, int indx)
        {
            gpExportGLLevel.Add(AdjustGPExportDatumAmount(gpExportDistLevel, indx));

            if (gpExportDistLevel.ProcessorFeeAmount != 0)
            {
                gpExportGLLevel.Add(CreateProcessorFee(gpExportDistLevel, processingFeeGLMapping));
            }
        }