Statistiken/Abo: Kundenfeedback 2026-07-24 komplett umgesetzt + Steuern: DATEV-Fixes 08+09/2025 (Sammel-Commit Branch-WIP)
Feedback-Umsetzung (dev/2026-07-22/feedback-analyse-2026-07-24.md, alle 10 Punkte):
- VIP-Statistik: eigener Berater ('ich', Linie 0) in Neue-Kundenabos- und beiden Top-10-Listen; Top-10-Umsatz sortiert nach abgerechneten Ist-Punkten + Abo-Anzahl-Spalte; Fußnote nicht-payline-wirksame Punkte (SalesVolumePoints::nonPaylinePoints)
- Führungskräfte-Liste: beide Sichten 'direkt' (an nächster FK abgeschnitten, additiv) und 'gesamt' (komplette Downline), Gesamt-Spalte nach Kundenzählweise
- Team-Abos: je Ebene 'abgerechnet (Monat)' und 'bis zum 25. erwartet'; Payline-Karte mit Teamabo-/Kundenabo-Zählern
- Incentive-Live-Ranking: Qualifizierte zuerst nummeriert (fixt auch isWinner rank<=max_winners)
- Porto: Netto-/Brutto-Kennzeichnung (Berater netto, Endkunden inkl. MwSt., portal_view-Flag; auch CRM-/Shop-Warenkorb + Checkout), Yard::shipping_tax-Fix
- Struktur-Ansicht: Abo-Badges 'A' (eigenes Abo) und '(n)' (Kundenabos) je Teampartner, gebatcht
- Abo-Löschung: Softdelete setzt active=0 (UserAbo deleting-Hook) + Bereinigungs-Migration für gelöschte-aber-aktive Abos
- Doku: technische Analyse + Kundinnen-Feedback-Dokument unter dev/2026-07-22/
- Tests: IncentiveRankingTest, TeamStructureAboBadgesTest, YardShippingTaxTest (neu); BackofficeStatisticsListsTest, TeamAboOverviewTest, PaylineForecastServiceTest, AboAdminDeleteTest, AboOneTimeViewTest erweitert
Außerdem enthalten (Branch-WIP vor dem Feedback): DATEV-Abgleich-Fixes 08+09/2025, USt-ID-Live-Validierung sowie restliche unkommittete Stände (u. a. Abo-Pause-Sprachkeys).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
657d4bd5b7
commit
ac3bd6e8ea
136 changed files with 7610 additions and 2688 deletions
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\DcFile;
|
||||
use App\Models\File;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\UserCredit;
|
||||
use App\Models\UserInvoice;
|
||||
use App\Repositories\CreditRepository;
|
||||
use Auth;
|
||||
use Response;
|
||||
|
|
@ -78,7 +82,7 @@ class FileController extends Controller
|
|||
}
|
||||
}*/
|
||||
if ($from === 'invoice') {
|
||||
$shopping_order = \App\Models\ShoppingOrder::findOrFail($id);
|
||||
$shopping_order = ShoppingOrder::findOrFail($id);
|
||||
if ($shopping_order->user_invoice) {
|
||||
$this->isPermissionShoppingOrder($shopping_order);
|
||||
$user_invoice = $shopping_order->user_invoice;
|
||||
|
|
@ -95,7 +99,7 @@ class FileController extends Controller
|
|||
}
|
||||
|
||||
if ($from === 'delivery') {
|
||||
$shopping_order = \App\Models\ShoppingOrder::findOrFail($id);
|
||||
$shopping_order = ShoppingOrder::findOrFail($id);
|
||||
if ($shopping_order->user_invoice) {
|
||||
$this->isPermissionShoppingOrder($shopping_order);
|
||||
$user_invoice = $shopping_order->user_invoice;
|
||||
|
|
@ -121,12 +125,12 @@ class FileController extends Controller
|
|||
}
|
||||
|
||||
if ($from === 'cancellation') {
|
||||
$shopping_order = \App\Models\ShoppingOrder::findOrFail($id);
|
||||
$shopping_order = ShoppingOrder::findOrFail($id);
|
||||
$this->isPermissionShoppingOrder($shopping_order);
|
||||
|
||||
// Stornorechnung finden: cancellation=true UND cancellation_id=null
|
||||
// (Die Original-Rechnung hat auch cancellation=true, aber MIT cancellation_id)
|
||||
$cancellation_invoice = \App\Models\UserInvoice::where('shopping_order_id', $shopping_order->id)
|
||||
$cancellation_invoice = UserInvoice::where('shopping_order_id', $shopping_order->id)
|
||||
->where('cancellation', true)
|
||||
->whereNull('cancellation_id')
|
||||
->first();
|
||||
|
|
@ -147,7 +151,7 @@ class FileController extends Controller
|
|||
}
|
||||
|
||||
if ($from === 'credit') {
|
||||
$user_credit = \App\Models\UserCredit::findOrFail($id);
|
||||
$user_credit = UserCredit::findOrFail($id);
|
||||
$this->isPermissionUserCredit($user_credit);
|
||||
$disk = $user_credit->disk;
|
||||
// Lokalisierte Version wenn angegeben
|
||||
|
|
@ -161,7 +165,7 @@ class FileController extends Controller
|
|||
}
|
||||
|
||||
if ($from === 'credit_detail') {
|
||||
$user_credit = \App\Models\UserCredit::findOrFail($id);
|
||||
$user_credit = UserCredit::findOrFail($id);
|
||||
$this->isPermissionUserCredit($user_credit);
|
||||
|
||||
return $this->create_credit_detail($user_credit, $do);
|
||||
|
|
@ -175,14 +179,14 @@ class FileController extends Controller
|
|||
|
||||
if ($from === 'dc_file') {
|
||||
// $this->isPermissionAuth();
|
||||
$dc_file = \App\Models\DcFile::findOrFail($id);
|
||||
$dc_file = DcFile::findOrFail($id);
|
||||
$filename = $dc_file->filename;
|
||||
$disk = 'public';
|
||||
$path = $dc_file->getFile();
|
||||
}
|
||||
if ($from === 'dc_thumb') {
|
||||
// $this->isPermissionAuth();
|
||||
$dc_file = \App\Models\DcFile::findOrFail($id);
|
||||
$dc_file = DcFile::findOrFail($id);
|
||||
$filename = $dc_file->filename;
|
||||
$disk = 'public';
|
||||
$path = $dc_file->getThumb();
|
||||
|
|
@ -190,14 +194,14 @@ class FileController extends Controller
|
|||
|
||||
if ($from === 'dc_big') {
|
||||
// $this->isPermissionAuth();
|
||||
$dc_file = \App\Models\DcFile::findOrFail($id);
|
||||
$dc_file = DcFile::findOrFail($id);
|
||||
$filename = $dc_file->filename;
|
||||
$disk = 'public';
|
||||
$path = $dc_file->getBig();
|
||||
}
|
||||
|
||||
if ($from === 'user') {
|
||||
$file = \App\Models\File::findOrFail($id);
|
||||
$file = File::findOrFail($id);
|
||||
$filename = $file->filename;
|
||||
$disk = 'user';
|
||||
$path = $file->dir.$file->filename;
|
||||
|
|
@ -244,6 +248,7 @@ class FileController extends Controller
|
|||
|
||||
private function create_credit_detail(UserCredit $user_credit, $do)
|
||||
{
|
||||
abort_if($user_credit->user === null, 404, 'User zur Gutschrift nicht gefunden.');
|
||||
|
||||
$credit_repo = new CreditRepository($user_credit->user);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue