using ComplianceDAL.DTO.GSTEWayBill; using GB5Shared.DTO.Framework.Login; namespace ComplianceDAL.CustomCode.GSTEWayBill; public interface IGSTEWayBillDAL { Task GetEWayBillAsync(int eWayBillId, LoginDTO login, CancellationToken ct); Task GetEWayBillByDocumentAsync(int documentId, string documentType, LoginDTO login, CancellationToken ct); Task SaveEWayBillAsync(GSTEWayBillDTO dto, LoginDTO login, CancellationToken ct); Task CancelEWayBillAsync(int eWayBillId, string cancellationReason, LoginDTO login, CancellationToken ct); Task UpdateVehicleAsync(int eWayBillId, UpdateVehicleRequestDTO req, int modifiedById, LoginDTO login, CancellationToken ct); Task> GetExpiringEWBsAsync(int hoursAhead, LoginDTO login, CancellationToken ct); Task> GetCoverageListAsync(string gstin, string returnPeriod, LoginDTO login, CancellationToken ct); // Matches GB4's EWayDAL.ProcessEway TMMHEAD update. Values are pre-formatted strings (not raw // DateTime/int) because GB4's original SQL sets these as quoted string literals — EBNUMBER, // EWAYDATE ("dd-MMM-yyyy"), distance, and validUpto ("dd-MMM-yyyy HH:mm") all as text. Task UpdateTMMHeadEWayByDocumentIdAsync(int documentId, string ebNumber, string ewayDate, string distance, string validUpto, LoginDTO login, CancellationToken ct); // Matches GB4's EWayDAL.CancelEway TMMHEAD update — clears TMMHEAD's own EBNUMBER column by value. Task ClearTMMHeadEBNumberAsync(string ebNumber, LoginDTO login, CancellationToken ct); // Matches GB4's inline "select IRN from Tmmhead where documentid=..." in EwayBillFromIRN. Task GetTMMHeadIRNByDocumentIdAsync(int documentId, LoginDTO login, CancellationToken ct); // Matches GB4's EWayDAL.CancelEway's UserGstin lookup (GET_EWAY_GSTIN_BASED_ON_OU) — the GSTIN // currently registered against the e-way bill's OU, looked up fresh by EBNUMBER rather than // trusting the GSTIN stored on TGST_EWAYBILL from when it was created. Task GetEwayGstinBasedOnOuAsync(string ebNumber, LoginDTO login, CancellationToken ct); // Store-keyed counterpart (GET_EWAY_GSTIN_BASED_ON_STORE) — see GSTEWayBillBLL.CancelEWayBillAsync // for which one gets used. Task GetEwayGstinBasedOnStoreAsync(string ebNumber, LoginDTO login, CancellationToken ct); }