Example #1
0
        public static void Initialize(MyRestaurantContext context)
        {
            PaymentTypeInitializer.Initialize(context);
            UnitOfMeasureInitializer.Initialize(context);
            StockTypeInitializer.Initialize(context);
            StockItemInitializer.Initialize(context);
            SupplierInitializer.Initialize(context);
            UserInitializer.Initialize(context);
            PurchaseOrderInitializer.Initialize(context);
            PurchaseOrderItemInitializer.Initialize(context);

            if (!context.GoodsReceivedNotes.Any())
            {
                var goodsReceivedNotes = new List <GoodsReceivedNote>
                {
                    new GoodsReceivedNote {
                        PurchaseOrderId = 1,
                        InvoiceNumber   = "INV_20210132_01",
                        PaymentTypeId   = 1,
                        Nbt             = 0.5m,
                        Vat             = 0.5m,
                        Discount        = 0.5m,
                        ReceivedBy      = context.Users.First(d => d.FirstName == "Admin").Id,
                        ReceivedDate    = DateTime.Now.AddDays(-5),
                        ApprovedBy      = Guid.Empty,
                        ApprovalStatus  = Status.Pending,
                        ApprovedDate    = default,
Example #2
0
 public PurchaseOrderItemServiceTest()
 {
     PurchaseOrderItemInitializer.Initialize(_myRestaurantContext);
 }