Exemplo n.º 1
0
        public Bill(Ordering.Domain.Order order, Billing.Domain.Bill bill)
        {
            this.bill = new DetailedBill(order, bill);

            PrintController = new StandardPrintController(); //To disable pop-up window that shows the printing progress
            PrintPage      += billPrintDocument_PrintPage;
        }
Exemplo n.º 2
0
        public Order(Ordering.Domain.Order order, Billing.Domain.Bill bill)
        {
            Id = order.Id;
            if (order is OnSiteOrder onSiteOrder)
            {
                TableId        = onSiteOrder.Table.Id;
                NumberOfGuests = onSiteOrder.NumberOfGuests;
            }

            OrderingDate = order.OrderingDate;
            Total        = bill.Total;
        }
Exemplo n.º 3
0
        public DetailedBill(Ordering.Domain.Order order, Billing.Domain.Bill bill) : base(order, bill)
        {
            BillingDate = bill.BillingDate;

            Taxes = new List <Tax>();
            foreach (var tax in bill.Taxes)
            {
                Taxes.Add(new Tax(tax.Key.Rate, tax.Value));
            }

            Discounts = new List <Discount>();
            foreach (var discount in bill.Discounts)
            {
                Discounts.Add(new Discount(discount.Key.Id, discount.Key.Rate, discount.Value));
            }
        }
Exemplo n.º 4
0
 public Slip(Ordering.Domain.Order order, Billing.Domain.Bill bill, Accounting.Domain.Slip slip) : base(order, bill)
 {
     PaymentDate = slip.PaymentDate;
     Payments    = slip.Payments.Select(p => new Payment(p.Id, p.Method.Id, p.Amount)).ToList();
 }
Exemplo n.º 5
0
 public DetailedOrder(Ordering.Domain.Order order, Billing.Domain.Bill bill) : base(order, bill)
 {
     Lines = order.Lines.Select(l => new Line(l, bill.Lines.First(b => b.Id == l.Id))).ToList();
 }