Make ShopPeriodReport compatible with pgsql