Пример #1
0
        //public async Task<IActionResult> OnGetCreateInvoiceAsync()
        //{
        //    var product = _context.CatalogItems.First();
        //    var orderItems = new List<OrderItem>
        //    {
        //        new OrderItem(new CatalogItemOrdered(product.Id, product.Name, product.PictureUri),product.Price.Value, 1, null, null, null, null, null)
        //    };
        //    Result = (await _sageService.CreateAnonymousInvoice(orderItems,0,0)).ResponseBody;
        //    //Result = (await _sageService.CreateInvoiceWithTaxNumber(orderItems, "João Gonçalves","227940032","","","",0)).ResponseBody;
        //    return Page();
        //}

        public async Task <IActionResult> OnPostPaymentInvoiceAsync(int id, decimal amount)
        {
            Result = (await _sageService.InvoicePayment(SageApplicationType.DAMA_BACKOFFICE, id, PaymentType.CASH, amount)).ResponseBody;
            return(Page());
        }
Пример #2
0
 public async Task <SageResponseDTO> RegisterPaymentAsync(SageApplicationType applicationType, long salesInvoiceId, decimal total, PaymentType paymentType)
 {
     return(await _sageService.InvoicePayment(applicationType, salesInvoiceId, paymentType, total));
 }