using ComplianceDAL.DTO.GSTEInvoice; using GB5Shared.DTO.Framework.Login; namespace ComplianceDAL.CustomCode.GSTEInvoice; public interface IGSTEInvoiceDAL { Task GetEInvoiceAsync(int eInvoiceId, LoginDTO login, CancellationToken ct); Task GetEInvoiceByDocumentAsync(int documentId, string documentType, LoginDTO login, CancellationToken ct); Task SaveEInvoiceAsync(GSTEInvoiceDTO dto, LoginDTO login, CancellationToken ct); Task CancelEInvoiceAsync(int eInvoiceId, string cancellationReason, LoginDTO login, CancellationToken ct); Task> GetCoverageListAsync(string gstin, string returnPeriod, LoginDTO login, CancellationToken ct); // Matches GB4's EInvoiceDAL.UploadEInvoiceFunction (DocumentId branch) — TMMHEAD itself carries // IRN/SIGNEDQRCODE/ACKNOWLEDGEMENTNUMBER/ACKNOWLEDGEMENTDATE (confirmed via MM\MMDAL), read // directly by other MM reports/documents, so it must be updated alongside TGST_EINVOICE. Task UpdateTMMHeadByDocumentIdAsync(int documentId, string irn, string signedQRCode, string acknowledgementNumber, DateTime? acknowledgementDate, LoginDTO login, CancellationToken ct); // Matches GB4's EInvoiceDAL.CancelIRN TMMHEAD update — clears TMMHEAD's own IRN column by IRN value. Task ClearTMMHeadIRNAsync(string irn, LoginDTO login, CancellationToken ct); // UserGstin lookup for CancelEInvoiceAsync — the GSTIN currently registered against the // e-invoice's OU, looked up fresh by IRN (see GET_IRN_GSTIN_BASED_ON_OU comment for why GB4's // own wiring for this is bugged and not ported literally). Task GetEInvoiceGstinBasedOnOuAsync(string irn, LoginDTO login, CancellationToken ct); // Store-keyed counterpart (GET_IRN_GSTIN_BASED_ON_STORE) — see GSTEInvoiceBLL.CancelEInvoiceAsync // for which one gets used. Task GetEInvoiceGstinBasedOnStoreAsync(string irn, LoginDTO login, CancellationToken ct); }