From a389ad566099b37aee3c1d6597652a99ddcbd82f Mon Sep 17 00:00:00 2001 From: Marcin Fabrykowski Date: Tue, 5 May 2026 17:23:21 +0200 Subject: [PATCH] fix: set 'to' date to 'tomorrow' to get today's invoices Signed-off-by: Marcin Fabrykowski --- cmd/invoiceList.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/invoiceList.go b/cmd/invoiceList.go index e7c0851..d331703 100644 --- a/cmd/invoiceList.go +++ b/cmd/invoiceList.go @@ -127,8 +127,9 @@ var invoiceListCmd = &cobra.Command{ func init() { invoiceCmd.AddCommand(invoiceListCmd) - invoiceListCmd.Flags().String("from", time.Now().AddDate(0, -3, 0).Format("2006-01-02"), "Data początkowa (format: RRRR-MM-DD)") - invoiceListCmd.Flags().String("to", time.Now().Format("2006-01-02"), "Data końcowa (format: RRRR-MM-DD)") + to := time.Now().AddDate(0, 0, 1) + invoiceListCmd.Flags().String("from", to.AddDate(0, -3, 0).Format("2006-01-02"), "Data początkowa (format: RRRR-MM-DD)") + invoiceListCmd.Flags().String("to", to.Format("2006-01-02"), "Data końcowa (format: RRRR-MM-DD)") invoiceListCmd.Flags().String("subject", "subject2", "Typ podmiotu (subject1, subject2, subject3, authorized)") invoiceListCmd.Flags().Int32("pagesize", 100, "Liczba faktur na stronę") invoiceListCmd.Flags().Int32("pageoffset", 0, "Numer strony (offset)")