We study the Joint Replenishment Problem (JRP), which arises from the need for coordinating the replenishment of multiple items that share a common fixed cost. Even in the basic setting, determining the optimal replenishment plan is an NP-Hard problem. We analyze both the JRP under indirect grouping policy and its variant with restrictions like transportation capacity, budget capacity, and item transportation compatibility. Additionally, we consider uncertainty characteristics such as imperfect item quality, as highlighted in related literature studies. We propose a novel matheuristic method that determines the best basic cycle time while addressing the problem with a fixed cycle time using a linear integer model. The proposed method is quite versatile to handle additional real-life constraints effectively. Based on an extensive computational study, we conclude that for the basic setting under indirect grouping policy, the proposed algorithm outperforms the benchmark algorithms in the literature by 0.3% on average. For more complicated settings with additional restrictions, our proposed algorithm outperforms the benchmark algorithm by around 5% on average.