using Ladaer.BackEnd.Infrastructures.Services.Finances;

namespace Ladaer.BackEnd.Infrastructures.Jobs
{
    /// <summary>
    /// Hangfire job để đồng bộ hóa đơn VAT hàng ngày
    /// </summary>
    public class VatInvoiceSyncJob
    {
        private readonly IVatInvoiceSyncService _vatInvoiceSyncService;

        public VatInvoiceSyncJob(IVatInvoiceSyncService vatInvoiceSyncService)
        {
            _vatInvoiceSyncService = vatInvoiceSyncService;
        }

        /// <summary>
        /// Execute job - đồng bộ hóa đơn của ngày hôm qua
        /// </summary>
        public async Task Execute()
        {
            await _vatInvoiceSyncService.SyncYesterdayInvoices();
        }
    }
}
