Skip to content

Commit

Permalink
hotfix: Fix monthly limit on shop stocks
Browse files Browse the repository at this point in the history
  • Loading branch information
preimpression authored Aug 18, 2024
1 parent 057ff70 commit 792763b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Models/Shop/ShopStock.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Models\Currency\Currency;
use App\Models\Item\Item;
use App\Models\Model;
use Carbon\Carbon;

class ShopStock extends Model {
/**
Expand Down Expand Up @@ -72,7 +73,7 @@ public function getPurchaseLimitDateAttribute() {
$date = strtotime('January 1st');
break;
case "monthly":
$date = strtotime('midnight first day of this month');
$date = Carbon::now()->startOfMonth()->timestamp;
break;
case "weekly":
$date = strtotime('last sunday');
Expand Down

0 comments on commit 792763b

Please sign in to comment.