public async Task <string> AddSellItemAsync(string folio_Venta, string sku, string correlationToken)
        {
            string result = String.Empty;

            PoS.Sell.Domain.AggregateModels.SellAggregates.Sell sell =
                new PoS.Sell.Domain.AggregateModels.SellAggregates.Sell(_sellRepository, _statusSellRepository, _productRepository);


            result = await sell.AddSellItemAsync(folio_Venta, sku, correlationToken);

            return(result);
        }
Пример #2
0
 private void InitilizeEntityProperties(Sell sell)
 {
     Folio_Venta   = sell.Folio_Venta;
     StoreId       = sell.StoreId;
     UserId        = sell.UserId;
     Date          = sell.Date;
     Amount        = sell.Amount;
     Cash          = sell.Cash;
     ItemsQuantity = sell.ItemsQuantity;
     CashDeskID    = sell.CashDeskID;
     Status        = sell.Status;
     SellItems     = sell.SellItems;
 }
        public async Task <string> CreateSellAsync(string storeId, string cashdeskId, string userId, string correlationToken)
        {
            string result = String.Empty;

            PoS.Sell.Domain.AggregateModels.SellAggregates.Sell sell =
                new PoS.Sell.Domain.AggregateModels.SellAggregates.Sell(_sellRepository, _statusSellRepository, _productRepository);

            sell.CashDeskID = cashdeskId;
            sell.StoreId    = storeId;
            sell.UserId     = userId;

            result = await sell.CreateSellAsync(correlationToken);

            return(result);
        }
        public async Task <string> CheckOutSellAsync(string folio_Venta, string correlationToken)
        {
            string result = String.Empty;


            PoS.Sell.Domain.AggregateModels.SellAggregates.Sell sell =
                new PoS.Sell.Domain.AggregateModels.SellAggregates.Sell(_sellRepository, _statusSellRepository, _productRepository);


            result = await sell.CheckOutSellAsync(folio_Venta, correlationToken);

            var checkout = new Sell.Domain.Events.SellCheckOutEvent
            {
            };

            //await _eventBus.Publish(checkout, CC.EventBus.Events.MessageEventEnum.SellCheckoutEvent, "");
            return(result);
        }