コード例 #1
0
        public void SetTotalDebits(int transactionCount, decimal totalAmount)
        {
            DE123_ReconciliationTotal total = new DE123_ReconciliationTotal {
                TransactionCount = transactionCount,
                TransactionType  = DE123_TransactionType.DebitLessReversals,
                TotalAmount      = totalAmount
            };

            Totals.Add(total);
        }
コード例 #2
0
        public void SetTotalCredits(decimal totalAmount)
        {
            DE123_ReconciliationTotal total = new DE123_ReconciliationTotal {
                TransactionCount = 0,
                TransactionType  = DE123_TransactionType.CreditLessReversals,
                TotalAmount      = totalAmount
            };

            Totals.Add(total);
        }
コード例 #3
0
        public void SetCreditSaleTotals(int transactionCount, decimal totalAmount)
        {
            DE123_ReconciliationTotal total = new DE123_ReconciliationTotal {
                CardType         = "CT",
                TransactionCount = transactionCount,
                TransactionType  = DE123_TransactionType.DebitLessReversals,
                TotalAmount      = totalAmount
            };

            Totals.Add(total);
        }
コード例 #4
0
        public void SetDebitVoidTotals(int transactionCount, decimal totalAmount)
        {
            DE123_ReconciliationTotal total = new DE123_ReconciliationTotal {
                CardType         = "DB",
                TransactionCount = transactionCount,
                TransactionType  = DE123_TransactionType.AllVoids_Voids,
                TotalAmount      = totalAmount
            };

            Totals.Add(total);
        }
コード例 #5
0
        public DE123_ReconciliationTotals FromByteArray(byte[] buffer)
        {
            StringParser sp = new StringParser(buffer);

            EntryFormat = sp.ReadString(2);
            int entryCount = sp.ReadInt(2);

            for (int i = 0; i < entryCount; i++)
            {
                DE123_ReconciliationTotal total = new DE123_ReconciliationTotal {
                    TransactionType = EnumConverter.FromMapping <DE123_TransactionType>(Target.NWS, sp.ReadString(3))
                };
                total.TotalType        = EnumConverter.FromMapping <DE123_TotalType>(Target.NWS, sp.ReadString(3));
                total.CardType         = StringUtils.TrimEnd(sp.ReadString(4));
                total.TransactionCount = int.Parse(sp.ReadToChar('\\'));
                total.TotalAmount      = StringUtils.ToAmount(sp.ReadToChar('\\'));

                Totals.Add(total);
            }

            return(this);
        }