using DXPDAL.VendorPo; using GB5Shared.DTO.Framework.Login; namespace DXPBLL.VendorInvoice; // invoiceBizTransactionTypeId identifies "Vendor Invoice" in the tenant's own // MBIZTRANSACTIONTYPE master — tenant-specific configuration, same rationale as // VendorPoBLL/AsnBLL's BizTransactionTypeId parameters. // // NOTE (Phase 1.5 scope correction): the original plan assumed this hands off to Compliance via // the "compliance.invoice.posted" Dapr event. A direct read of ComplianceArtifactBLL confirmed // that event unconditionally creates an ArtifactType="EInvoice" record — i.e. it's for OUTWARD // e-invoicing (the seller generating an IRN), not a vendor's INWARD invoice to a buyer. // Compliance has no inward-invoice-triggering topic at all (only compliance.invoice.posted and // compliance.alerts.check exist) — GSTR-2A/2B reconciliation is its own separate, already-built // pull-based process (TGST_INWARD.MatchedDocumentId), outside DXP's scope. Confirmed with the // user: this BLL only creates the vendor's invoice as an MM document (same SaveMMHead pattern as // AsnBLL) — no Dapr publish to Compliance. public interface IVendorInvoiceBLL { Task<(string Message, VendorPoDTO? Invoice)> SubmitInvoiceAsync( int dxpPartyId, int poMMHeadId, int localPartyId, int ouId, int invoiceBizTransactionTypeId, int dxpPartyBranchLinkId, string? invoiceRemarks, int tenantId, string databaseName, byte databaseType, int actingDxpUserId, CancellationToken ct); }