コード例 #1
0
ファイル: Order.cs プロジェクト: asanyaga/BuildTest
        public void AddChequePayment(string chequeNumber, decimal amount, Bank bank, BankBranch bankBranch, DateTime dueDate)
        {            
            var payment = new Payment(Id)
            {
                PaymentMode = PaymentMode.Cheque,
                PaymentReference = string.Format("{0} - {1} - {2}", chequeNumber, bank.Code, bankBranch.Code),
                Amount = amount,
                Bank = bank.Code, 
                BankBranch = bankBranch.Code,
                PaymentStatus = PaymentStatus.New,
                DueDate = dueDate
            };

            Payments.Add(payment);
        }
コード例 #2
0
ファイル: Order.cs プロジェクト: asanyaga/BuildTest
        public void AddCashPayment(string reference, decimal amount)
        {
            var payment = new Payment(Id)
            {
                PaymentMode = PaymentMode.Cash, 
                PaymentReference = reference, 
                PaymentStatus = PaymentStatus.New,
                Amount = amount
            };

            Payments.Add(payment);
        }
コード例 #3
0
        public void Handle(AddReceiptLineItemCommand command)
        {
            var order = GetOrder();
            if (order == null) return;

            var existing = order.Payments.Find(p => p.PaymentReference == command.PaymentTypeReference);
            if (existing != null) return;

            var payment = new Payment(order.Id)
            {
                PaymentStatus = PaymentStatus.Confirmed,
                PaymentMode = (PaymentMode) command.LineItemType,
                PaymentReference = command.PaymentTypeReference,
                Amount = command.Value
            };
            order.Payments.Add(payment);
        }
コード例 #4
0
 protected override void ProcessPayment(Payment payment)
 {
     //Not used for OutletVisitNote
 }
コード例 #5
0
 public void Handle(Payment payment) { }