fix bug of pargar 4

This commit is contained in:
2026-07-26 21:17:57 +03:30
parent a9c0fb09e6
commit a849150339
3 changed files with 105 additions and 0 deletions
@@ -33,6 +33,15 @@ class PargarController extends Controller
return response()->json(PargarSyncLog::with('customer')->findOrFail($id));
}
/** اسناد پنل که پرگار هنوز تحویل نگرفته — ماندهٔ این مشتری‌ها قفل است */
public function stuckOutbound(Request $request)
{
$minutes = (int) $request->query('minutes', 15);
$minutes = max(0, min($minutes, 60 * 24 * 30));
return response()->json($this->sync()->stuckOutboundDocuments($minutes));
}
public function customerSyncStatus(Request $request)
{
$panelTotal = Customer::whereNull('deleted_at')->count();