using DXPBLL.VendorInvoice; using DXPSL.Common; using DXPSL.Parameters.VendorInvoice; using GB5Shared.DTO.Framework.Enum; using GB5Shared.DTO.Framework.ResponseStandard; namespace DXPSL.Endpoints.VendorInvoice; public class SubmitInvoice : DXPBaseEndpoint> { private readonly IVendorInvoiceBLL _bll; public SubmitInvoice(IVendorInvoiceBLL bll) { _bll = bll; } public override void Configure() => Post("/DXP/VendorInvoice/Submit"); protected override async Task> ExecuteAsync( SubmitInvoiceParameters req, DXPCallerContext caller, CancellationToken ct) { var (message, invoice) = await _bll.SubmitInvoiceAsync( caller.DxpPartyId, req.PoMMHeadId, caller.LocalPartyId, req.OuId, req.InvoiceBizTransactionTypeId, req.DxpPartyBranchLinkId, req.InvoiceRemarks, caller.TenantId, caller.DatabaseName, caller.DatabaseType, caller.DxpUserId, ct); return new ResponseStandardDTO { Status = FrameworkEnumDTO.ResponseStatus.Ok, Body = new { Message = message, Invoice = invoice } }; } }