Exemplo n.º 1
0
 public CoreBuilderRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 2
0
 public WarehouseRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 3
0
 public WarehouseMutationOrderRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 4
0
 public SalesInvoiceRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 5
0
        void before_each()
        {
            var db = new OffsetPrintingSuppliesEntities();

            using (db)
            {
                db.DeleteAllTables();
                _contactService             = new ContactService(new ContactRepository(), new ContactValidator());
                _itemService                = new ItemService(new ItemRepository(), new ItemValidator());
                _salesOrderService          = new SalesOrderService(new SalesOrderRepository(), new SalesOrderValidator());
                _salesOrderDetailService    = new SalesOrderDetailService(new SalesOrderDetailRepository(), new SalesOrderDetailValidator());
                _deliveryOrderService       = new DeliveryOrderService(new DeliveryOrderRepository(), new DeliveryOrderValidator());
                _deliveryOrderDetailService = new DeliveryOrderDetailService(new DeliveryOrderDetailRepository(), new DeliveryOrderDetailValidator());
                _stockMutationService       = new StockMutationService(new StockMutationRepository(), new StockMutationValidator());
                _itemTypeService            = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator());
                _uomService                   = new UoMService(new UoMRepository(), new UoMValidator());
                _warehouseItemService         = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator());
                _warehouseService             = new WarehouseService(new WarehouseRepository(), new WarehouseValidator());
                _barringService               = new BarringService(new BarringRepository(), new BarringValidator());
                _stockAdjustmentDetailService = new StockAdjustmentDetailService(new StockAdjustmentDetailRepository(), new StockAdjustmentDetailValidator());
                _stockAdjustmentService       = new StockAdjustmentService(new StockAdjustmentRepository(), new StockAdjustmentValidator());

                _priceMutationService        = new PriceMutationService(new PriceMutationRepository(), new PriceMutationValidator());
                _contactGroupService         = new ContactGroupService(new ContactGroupRepository(), new ContactGroupValidator());
                _generalLedgerJournalService = new GeneralLedgerJournalService(new GeneralLedgerJournalRepository(), new GeneralLedgerJournalValidator());
                _closingService = new ClosingService(new ClosingRepository(), new ClosingValidator());
                _accountService = new AccountService(new AccountRepository(), new AccountValidator());

                if (!_accountService.GetLegacyObjects().Any())
                {
                    Asset = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Asset", Code = Constant.AccountCode.Asset, LegacyCode = Constant.AccountLegacyCode.Asset, Level = 1, Group = Constant.AccountGroup.Asset, IsLegacy = true
                    }, _accountService);
                    CashBank = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "CashBank", Code = Constant.AccountCode.CashBank, LegacyCode = Constant.AccountLegacyCode.CashBank, Level = 2, Group = Constant.AccountGroup.Asset, ParentId = Asset.Id, IsLegacy = true
                    }, _accountService);
                    AccountReceivable = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Account Receivable", IsLeaf = true, Code = Constant.AccountCode.AccountReceivable, LegacyCode = Constant.AccountLegacyCode.AccountReceivable, Level = 2, Group = Constant.AccountGroup.Asset, ParentId = Asset.Id, IsLegacy = true
                    }, _accountService);
                    GBCHReceivable = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "GBCH Receivable", IsLeaf = true, Code = Constant.AccountCode.GBCHReceivable, LegacyCode = Constant.AccountLegacyCode.GBCHReceivable, Level = 2, Group = Constant.AccountGroup.Asset, ParentId = Asset.Id, IsLegacy = true
                    }, _accountService);
                    Inventory = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Inventory", IsLeaf = true, Code = Constant.AccountCode.Inventory, LegacyCode = Constant.AccountLegacyCode.Inventory, Level = 2, Group = Constant.AccountGroup.Asset, ParentId = Asset.Id, IsLegacy = true
                    }, _accountService);

                    Expense = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Expense", Code = Constant.AccountCode.Expense, LegacyCode = Constant.AccountLegacyCode.Expense, Level = 1, Group = Constant.AccountGroup.Expense, IsLegacy = true
                    }, _accountService);
                    CashBankAdjustmentExpense = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "CashBank Adjustment Expense", IsLeaf = true, Code = Constant.AccountCode.CashBankAdjustmentExpense, LegacyCode = Constant.AccountLegacyCode.CashBankAdjustmentExpense, Level = 2, Group = Constant.AccountGroup.Expense, ParentId = Expense.Id, IsLegacy = true
                    }, _accountService);
                    COGS = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Cost Of Goods Sold", IsLeaf = true, Code = Constant.AccountCode.COGS, LegacyCode = Constant.AccountLegacyCode.COGS, Level = 2, Group = Constant.AccountGroup.Expense, ParentId = Expense.Id, IsLegacy = true
                    }, _accountService);
                    Discount = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Discount", IsLeaf = true, Code = Constant.AccountCode.Discount, LegacyCode = Constant.AccountLegacyCode.Discount, Level = 2, Group = Constant.AccountGroup.Expense, ParentId = Expense.Id, IsLegacy = true
                    }, _accountService);
                    SalesAllowance = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Sales Allowance", IsLeaf = true, Code = Constant.AccountCode.SalesAllowance, LegacyCode = Constant.AccountLegacyCode.SalesAllowance, Level = 2, Group = Constant.AccountGroup.Expense, ParentId = Expense.Id, IsLegacy = true
                    }, _accountService);
                    StockAdjustmentExpense = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Stock Adjustment Expense", IsLeaf = true, Code = Constant.AccountCode.StockAdjustmentExpense, LegacyCode = Constant.AccountLegacyCode.StockAdjustmentExpense, Level = 2, Group = Constant.AccountGroup.Expense, ParentId = Expense.Id, IsLegacy = true
                    }, _accountService);

                    Liability = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Liability", Code = Constant.AccountCode.Liability, LegacyCode = Constant.AccountLegacyCode.Liability, Level = 1, Group = Constant.AccountGroup.Liability, IsLegacy = true
                    }, _accountService);
                    AccountPayable = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Account Payable", IsLeaf = true, Code = Constant.AccountCode.AccountPayable, LegacyCode = Constant.AccountLegacyCode.AccountPayable, Level = 2, Group = Constant.AccountGroup.Liability, ParentId = Liability.Id, IsLegacy = true
                    }, _accountService);
                    GBCHPayable = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "GBCH Payable", IsLeaf = true, Code = Constant.AccountCode.GBCHPayable, LegacyCode = Constant.AccountLegacyCode.GBCHPayable, Level = 2, Group = Constant.AccountGroup.Liability, ParentId = Liability.Id, IsLegacy = true
                    }, _accountService);
                    GoodsPendingClearance = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Goods Pending Clearance", IsLeaf = true, Code = Constant.AccountCode.GoodsPendingClearance, LegacyCode = Constant.AccountLegacyCode.GoodsPendingClearance, Level = 2, Group = Constant.AccountGroup.Liability, ParentId = Liability.Id, IsLegacy = true
                    }, _accountService);

                    Equity = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Equity", Code = Constant.AccountCode.Equity, LegacyCode = Constant.AccountLegacyCode.Equity, Level = 1, Group = Constant.AccountGroup.Equity, IsLegacy = true
                    }, _accountService);
                    OwnersEquity = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Owners Equity", Code = Constant.AccountCode.OwnersEquity, LegacyCode = Constant.AccountLegacyCode.OwnersEquity, Level = 2, Group = Constant.AccountGroup.Equity, ParentId = Equity.Id, IsLegacy = true
                    }, _accountService);
                    EquityAdjustment = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Equity Adjustment", IsLeaf = true, Code = Constant.AccountCode.EquityAdjustment, LegacyCode = Constant.AccountLegacyCode.EquityAdjustment, Level = 3, Group = Constant.AccountGroup.Equity, ParentId = OwnersEquity.Id, IsLegacy = true
                    }, _accountService);

                    Revenue = _accountService.CreateLegacyObject(new Account()
                    {
                        Name = "Revenue", IsLeaf = true, Code = Constant.AccountCode.Revenue, LegacyCode = Constant.AccountLegacyCode.Revenue, Level = 1, Group = Constant.AccountGroup.Revenue, IsLegacy = true
                    }, _accountService);
                }

                baseGroup = _contactGroupService.CreateObject(Core.Constants.Constant.GroupType.Base, "Base Group", true);

                Pcs = new UoM()
                {
                    Name = "Pcs"
                };
                _uomService.CreateObject(Pcs);

                contact = new Contact()
                {
                    Name         = "President of Indonesia",
                    Address      = "Istana Negara Jl. Veteran No. 16 Jakarta Pusat",
                    ContactNo    = "021 3863777",
                    PIC          = "Mr. President",
                    PICContactNo = "021 3863777",
                    Email        = "*****@*****.**"
                };
                contact = _contactService.CreateObject(contact, _contactGroupService);

                type = _itemTypeService.CreateObject("Item", "Item");

                warehouse = new Warehouse()
                {
                    Name        = "Sentral Solusi Data",
                    Description = "Kali Besar Jakarta",
                    Code        = "LCL"
                };
                warehouse = _warehouseService.CreateObject(warehouse, _warehouseItemService, _itemService);

                item_batiktulis = new Item()
                {
                    ItemTypeId = _itemTypeService.GetObjectByName("Item").Id,
                    Name       = "Batik Tulis",
                    Category   = "Item",
                    Sku        = "bt123",
                    UoMId      = Pcs.Id
                };
                _itemService.CreateObject(item_batiktulis, _uomService, _itemTypeService, _warehouseItemService, _warehouseService, _priceMutationService, _contactGroupService);

                item_sepatubola = new Item()
                {
                    ItemTypeId = _itemTypeService.GetObjectByName("Item").Id,
                    Name       = "Sepatu Bola",
                    Category   = "Item",
                    Sku        = "sb123",
                    UoMId      = Pcs.Id
                };
                _itemService.CreateObject(item_sepatubola, _uomService, _itemTypeService, _warehouseItemService, _warehouseService, _priceMutationService, _contactGroupService);

                StockAdjustment sa = new StockAdjustment()
                {
                    AdjustmentDate = DateTime.Today, WarehouseId = warehouse.Id, Description = "item adjustment"
                };
                _stockAdjustmentService.CreateObject(sa, _warehouseService);
                StockAdjustmentDetail sadSepatuBola = new StockAdjustmentDetail()
                {
                    ItemId            = item_sepatubola.Id,
                    Quantity          = 1000,
                    StockAdjustmentId = sa.Id
                };
                _stockAdjustmentDetailService.CreateObject(sadSepatuBola, _stockAdjustmentService, _itemService, _warehouseItemService);

                StockAdjustmentDetail sadBatikTulis = new StockAdjustmentDetail()
                {
                    ItemId            = item_batiktulis.Id,
                    Quantity          = 1000,
                    StockAdjustmentId = sa.Id
                };
                _stockAdjustmentDetailService.CreateObject(sadBatikTulis, _stockAdjustmentService, _itemService, _warehouseItemService);

                _stockAdjustmentService.ConfirmObject(sa, DateTime.Today, _stockAdjustmentDetailService, _stockMutationService,
                                                      _itemService, _barringService, _warehouseItemService, _generalLedgerJournalService,
                                                      _accountService, _closingService);
            }
        }
Exemplo n.º 6
0
 public BarringOrderRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 7
0
 public ContactGroupRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 8
0
 public StockAdjustmentDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 9
0
        void before_each()
        {
            var db = new OffsetPrintingSuppliesEntities();

            using (db)
            {
                db.DeleteAllTables();
                d = new DataBuilder();

                d.baseGroup = d._contactGroupService.CreateObject(Core.Constants.Constant.GroupType.Base, "Base Group", true);

                d.Pcs = new UoM()
                {
                    Name = "Pcs"
                };
                d._uomService.CreateObject(d.Pcs);

                d.Boxes = new UoM()
                {
                    Name = "Boxes"
                };
                d._uomService.CreateObject(d.Boxes);

                d.Tubs = new UoM()
                {
                    Name = "Tubs"
                };
                d._uomService.CreateObject(d.Tubs);

                d.item = new Item()
                {
                    ItemTypeId = d._itemTypeService.GetObjectByName("Accessory").Id,
                    Sku        = "ABC1001",
                    Name       = "ABC",
                    Category   = "ABC123",
                    UoMId      = d.Pcs.Id
                };
                d.item = d._itemService.CreateObject(d.item, d._uomService, d._itemTypeService, d._warehouseItemService, d._warehouseService, d._priceMutationService, d._contactGroupService);

                d.localWarehouse = new Warehouse()
                {
                    Name        = "Sentral Solusi Data",
                    Description = "Kali Besar Jakarta",
                    Code        = "LCL"
                };
                d.localWarehouse = d._warehouseService.CreateObject(d.localWarehouse, d._warehouseItemService, d._itemService);

                d.contact = d._contactService.CreateObject("Abbey", "1 Abbey St", "001234567", "Daddy", "001234888", "*****@*****.**", d._contactGroupService);

                d.coreBuilder = new CoreBuilder()
                {
                    BaseSku     = "CORE1001",
                    SkuNewCore  = "CORE1001N",
                    SkuUsedCore = "CORE1001U",
                    Name        = "Core X 1001",
                    Category    = "X 1001",
                    UoMId       = d.Pcs.Id
                };
                d.coreBuilder = d._coreBuilderService.CreateObject(d.coreBuilder, d._uomService, d._itemService, d._itemTypeService, d._warehouseItemService, d._warehouseService, d._priceMutationService, d._contactGroupService);
            }
        }
Exemplo n.º 10
0
 public PaymentRequestRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
 public CoreIdentificationDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 12
0
 public QuantityPricingRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
 public CashBankAdjustmentRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 14
0
 public ReceivableRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 15
0
 public ClosingRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 16
0
 public RecoveryOrderRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 17
0
 public RetailPurchaseInvoiceRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 18
0
        void before_each()
        {
            var db = new OffsetPrintingSuppliesEntities();

            using (db)
            {
                db.DeleteAllTables();
                _contactService                = new ContactService(new ContactRepository(), new ContactValidator());
                _itemService                   = new ItemService(new ItemRepository(), new ItemValidator());
                _stockMutationService          = new StockMutationService(new StockMutationRepository(), new StockMutationValidator());
                _purchaseInvoiceService        = new PurchaseInvoiceService(new PurchaseInvoiceRepository(), new PurchaseInvoiceValidator());
                _purchaseInvoiceDetailService  = new PurchaseInvoiceDetailService(new PurchaseInvoiceDetailRepository(), new PurchaseInvoiceDetailValidator());
                _purchaseOrderService          = new PurchaseOrderService(new PurchaseOrderRepository(), new PurchaseOrderValidator());
                _purchaseOrderDetailService    = new PurchaseOrderDetailService(new PurchaseOrderDetailRepository(), new PurchaseOrderDetailValidator());
                _purchaseReceivalService       = new PurchaseReceivalService(new PurchaseReceivalRepository(), new PurchaseReceivalValidator());
                _purchaseReceivalDetailService = new PurchaseReceivalDetailService(new PurchaseReceivalDetailRepository(), new PurchaseReceivalDetailValidator());
                _stockAdjustmentService        = new StockAdjustmentService(new StockAdjustmentRepository(), new StockAdjustmentValidator());
                _stockAdjustmentDetailService  = new StockAdjustmentDetailService(new StockAdjustmentDetailRepository(), new StockAdjustmentDetailValidator());
                _itemTypeService               = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator());
                _uomService           = new UoMService(new UoMRepository(), new UoMValidator());
                _warehouseItemService = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator());
                _warehouseService     = new WarehouseService(new WarehouseRepository(), new WarehouseValidator());
                _barringService       = new BarringService(new BarringRepository(), new BarringValidator());

                Pcs = new UoM()
                {
                    Name = "Pcs"
                };
                _uomService.CreateObject(Pcs);

                contact = new Contact()
                {
                    Name         = "President of Indonesia",
                    Address      = "Istana Negara Jl. Veteran No. 16 Jakarta Pusat",
                    ContactNo    = "021 3863777",
                    PIC          = "Mr. President",
                    PICContactNo = "021 3863777",
                    Email        = "*****@*****.**"
                };
                contact = _contactService.CreateObject(contact);

                type = _itemTypeService.CreateObject("Item", "Item");

                warehouse = new Warehouse()
                {
                    Name        = "Sentral Solusi Data",
                    Description = "Kali Besar Jakarta",
                    Code        = "LCL"
                };
                warehouse = _warehouseService.CreateObject(warehouse, _warehouseItemService, _itemService);

                item_batiktulis = new Item()
                {
                    ItemTypeId = _itemTypeService.GetObjectByName("Item").Id,
                    Name       = "Batik Tulis",
                    Category   = "Item",
                    Sku        = "bt123",
                    UoMId      = Pcs.Id
                };

                item_batiktulis = _itemService.CreateObject(item_batiktulis, _uomService, _itemTypeService, _warehouseItemService, _warehouseService);
                _itemService.AdjustQuantity(item_batiktulis, 1000);
                _warehouseItemService.AdjustQuantity(_warehouseItemService.FindOrCreateObject(warehouse.Id, item_batiktulis.Id), 1000);

                item_busway = new Item()
                {
                    ItemTypeId = _itemTypeService.GetObjectByName("Item").Id,
                    Name       = "Busway",
                    Category   = "Untuk disumbangkan bagi kebutuhan DKI Jakarta",
                    Sku        = "DKI002",
                    UoMId      = Pcs.Id
                };
                item_busway = _itemService.CreateObject(item_busway, _uomService, _itemTypeService, _warehouseItemService, _warehouseService);
                _itemService.AdjustQuantity(item_busway, 200);
                _warehouseItemService.AdjustQuantity(_warehouseItemService.FindOrCreateObject(warehouse.Id, item_busway.Id), 200);

                item_botolaqua = new Item()
                {
                    ItemTypeId = _itemTypeService.GetObjectByName("Item").Id,
                    Name       = "Botol Aqua",
                    Category   = "Minuman",
                    Sku        = "DKI003",
                    UoMId      = Pcs.Id
                };
                item_botolaqua = _itemService.CreateObject(item_botolaqua, _uomService, _itemTypeService, _warehouseItemService, _warehouseService);
                _itemService.AdjustQuantity(item_botolaqua, 20000);
                _warehouseItemService.AdjustQuantity(_warehouseItemService.FindOrCreateObject(warehouse.Id, item_botolaqua.Id), 20000);

                purchaseOrder1 = _purchaseOrderService.CreateObject(contact.Id, new DateTime(2014, 07, 09), _contactService);
                purchaseOrder2 = _purchaseOrderService.CreateObject(contact.Id, new DateTime(2014, 04, 09), _contactService);
                purchaseOrderDetail_batiktulis_so1 = _purchaseOrderDetailService.CreateObject(purchaseOrder1.Id, item_batiktulis.Id, 500, 2000000, _purchaseOrderService, _itemService);
                purchaseOrderDetail_busway_so1     = _purchaseOrderDetailService.CreateObject(purchaseOrder1.Id, item_busway.Id, 91, 800000000, _purchaseOrderService, _itemService);
                purchaseOrderDetail_botolaqua_so1  = _purchaseOrderDetailService.CreateObject(purchaseOrder1.Id, item_botolaqua.Id, 2000, 5000, _purchaseOrderService, _itemService);
                purchaseOrderDetail_batiktulis_so2 = _purchaseOrderDetailService.CreateObject(purchaseOrder2.Id, item_batiktulis.Id, 40, 2000500, _purchaseOrderService, _itemService);
                purchaseOrderDetail_busway_so2     = _purchaseOrderDetailService.CreateObject(purchaseOrder2.Id, item_busway.Id, 3, 810000000, _purchaseOrderService, _itemService);
                purchaseOrderDetail_botolaqua_so2  = _purchaseOrderDetailService.CreateObject(purchaseOrder2.Id, item_botolaqua.Id, 340, 5500, _purchaseOrderService, _itemService);
                purchaseOrder1 = _purchaseOrderService.ConfirmObject(purchaseOrder1, DateTime.Today, _purchaseOrderDetailService, _stockMutationService, _itemService, _barringService, _warehouseItemService);
                purchaseOrder2 = _purchaseOrderService.ConfirmObject(purchaseOrder2, DateTime.Today, _purchaseOrderDetailService, _stockMutationService, _itemService, _barringService, _warehouseItemService);
            }
        }
Exemplo n.º 19
0
 public ItemTypeRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 20
0
 public CashSalesReturnRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 21
0
 public CashMutationRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 22
0
        void before_each()
        {
            var db = new OffsetPrintingSuppliesEntities();

            using (db)
            {
                db.DeleteAllTables();
                d = new DataBuilder();

                d.Pcs = new UoM()
                {
                    Name = "Pcs"
                };
                d._uomService.CreateObject(d.Pcs);

                d.Boxes = new UoM()
                {
                    Name = "Boxes"
                };
                d._uomService.CreateObject(d.Boxes);

                d.Tubs = new UoM()
                {
                    Name = "Tubs"
                };
                d._uomService.CreateObject(d.Tubs);

                d.localWarehouse = new Warehouse()
                {
                    Name        = "Sentral Solusi Data",
                    Description = "Kali Besar Jakarta",
                    Code        = "LCL"
                };
                d.localWarehouse = d._warehouseService.CreateObject(d.localWarehouse, d._warehouseItemService, d._itemService);

                d.item = new Item()
                {
                    ItemTypeId = d._itemTypeService.GetObjectByName("Accessory").Id,
                    Sku        = "ABC1001",
                    Name       = "ABC",
                    Category   = "ABC123",
                    UoMId      = d.Pcs.Id,
                    Quantity   = 0
                };
                d.item         = d._itemService.CreateObject(d.item, d._uomService, d._itemTypeService, d._warehouseItemService, d._warehouseService);
                d.itemCompound = new Item()
                {
                    ItemTypeId = d._itemTypeService.GetObjectByName("Compound").Id,
                    Sku        = "Cmp10001",
                    Name       = "Cmp 10001",
                    Category   = "cmp",
                    UoMId      = d.Pcs.Id
                };
                d.itemCompound = d._itemService.CreateObject(d.itemCompound, d._uomService, d._itemTypeService, d._warehouseItemService, d._warehouseService);
                d._itemService.AdjustQuantity(d.itemCompound, 2);
                d._warehouseItemService.AdjustQuantity(d._warehouseItemService.FindOrCreateObject(d.localWarehouse.Id, d.itemCompound.Id), 2);

                d.contact = d._contactService.CreateObject("Abbey", "1 Abbey St", "001234567", "Daddy", "001234888", "*****@*****.**");

                d.machine = new Machine()
                {
                    Code        = "M00001",
                    Name        = "Machine 00001",
                    Description = "Machine"
                };
                d.machine     = d._machineService.CreateObject(d.machine);
                d.coreBuilder = new CoreBuilder()
                {
                    BaseSku     = "CB00001",
                    SkuNewCore  = "CB00001N",
                    SkuUsedCore = "CB00001U",
                    Name        = "CoreBuilder00001",
                    Category    = "X",
                    UoMId       = d.Pcs.Id
                };
                d.coreBuilder        = d._coreBuilderService.CreateObject(d.coreBuilder, d._uomService, d._itemService, d._itemTypeService, d._warehouseItemService, d._warehouseService);
                d.coreIdentification = new CoreIdentification()
                {
                    ContactId      = d.contact.Id,
                    Code           = "CI0001",
                    Quantity       = 1,
                    IdentifiedDate = DateTime.Now,
                    WarehouseId    = d.localWarehouse.Id
                };
                d.coreIdentification       = d._coreIdentificationService.CreateObject(d.coreIdentification, d._contactService);
                d.coreIdentificationDetail = new CoreIdentificationDetail()
                {
                    CoreIdentificationId = d.coreIdentification.Id,
                    DetailId             = 1,
                    MaterialCase         = 2,
                    CoreBuilderId        = d.coreBuilder.Id,
                    RollerTypeId         = d._rollerTypeService.GetObjectByName("Found DT").Id,
                    MachineId            = d.machine.Id,
                    RD = 12,
                    CD = 12,
                    RL = 12,
                    WL = 12,
                    TL = 12
                };
                d.coreIdentificationDetail = d._coreIdentificationDetailService.CreateObject(d.coreIdentificationDetail, d._coreIdentificationService, d._coreBuilderService, d._rollerTypeService, d._machineService);

                d.rollerBuilder = new RollerBuilder()
                {
                    BaseSku           = "RB0001",
                    SkuRollerNewCore  = "RB0001N",
                    SkuRollerUsedCore = "RB0001U",
                    Name          = "Roller 0001",
                    Category      = "0001",
                    RD            = 12,
                    CD            = 13,
                    RL            = 14,
                    TL            = 15,
                    WL            = 16,
                    CompoundId    = d.itemCompound.Id,
                    CoreBuilderId = d.coreBuilder.Id,
                    MachineId     = d.machine.Id,
                    RollerTypeId  = d._rollerTypeService.GetObjectByName("Damp").Id,
                    UoMId         = d.Pcs.Id
                };
                d.rollerBuilder = d._rollerBuilderService.CreateObject(d.rollerBuilder, d._machineService, d._uomService, d._itemService, d._itemTypeService,
                                                                       d._coreBuilderService, d._rollerTypeService, d._warehouseItemService, d._warehouseService);
            }
        }
 public RetailSalesInvoiceDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 24
0
 public PaymentVoucherRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 25
0
 public RecoveryAccessoryDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 26
0
 public CustomPurchaseInvoiceDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
 public DeliveryOrderDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 28
0
 public PurchaseOrderDetailRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 29
0
 public ValidCombRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }
Exemplo n.º 30
0
 public UserMenuRepository()
 {
     entities = new OffsetPrintingSuppliesEntities();
 }