Ejemplo n.º 1
0
        public async Task <MatchingOrdersResult> GetMatchingReceiptOrderAsync(string SessionKey, int CompanyId)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var result = (await collationSettingProcessor.GetMatchingReceiptOrderAsync(CompanyId, token)).ToList();

                return new MatchingOrdersResult
                {
                    ProcessResult = new ProcessResult {
                        Result = true
                    },
                    MatchingOrders = result,
                };
            }, logger));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <IEnumerable <Receipt> > > SearchReceiptData(MatchingReceiptSearch option, CancellationToken token)
        {
            List <Receipt> result = null;

            option.Orders = (await collationSettingProcessor
                             .GetMatchingReceiptOrderAsync(option.CompanyId, token))
                            .Where(x => (x.Available == 1)).ToArray();

            if (!option.MatchingHeaderId.HasValue)
            {
                result = (await matchingProcessor.SearchReceiptDataAsync(option, token)).ToList();
            }
            else
            {
                result = (await matchingProcessor.GetMatchedReceiptsAsync(option, token)).ToList();
            }
            return(result);
        }
Ejemplo n.º 3
0
        public async Task<ReceiptsResult> SearchReceiptDataAsync(string SessionKey, MatchingReceiptSearch MatchingReceiptSearch)
        {
            return await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                List<Receipt> result = null;
                MatchingReceiptSearch.Orders = (await collationSettingProcessor
                    .GetMatchingReceiptOrderAsync(MatchingReceiptSearch.CompanyId, token))
                    .Where(x => (x.Available == 1)).ToArray();

                if (!MatchingReceiptSearch.MatchingHeaderId.HasValue)
                {
                    result = (await matchingProcessor.SearchReceiptDataAsync(MatchingReceiptSearch, token)).ToList();
                }
                else
                {
                    result = (await matchingProcessor.GetMatchedReceiptsAsync(MatchingReceiptSearch, token)).ToList();
                }
                return new ReceiptsResult
                {
                    ProcessResult = new ProcessResult { Result = true },
                    Receipts = result,
                };
            }, logger);
        }
Ejemplo n.º 4
0
 public async Task <IEnumerable <MatchingOrder> > GetMatchingReceiptOrder(CollationSetting setting, CancellationToken token)
 => (await collationSettingProcessor.GetMatchingReceiptOrderAsync(setting.CompanyId)).ToArray();