$user_abo_items
+ * @property-read int|null $user_abo_items_count
* @property-read int|null $user_abo_orders_count
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo query()
- * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAboInteval($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAboInterval($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAmount($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCancelDate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCarddata($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereClearingtype($value)
- * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCount($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCurrency($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereIsFor($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereLastDate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereMemberId($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereNextDate($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo wherePayoneUserid($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereShoppingUserId($value)
@@ -1949,10 +1970,42 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereWallettype($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo withTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|UserAbo withoutTrashed()
+ * @mixin \Eloquent
*/
class UserAbo extends \Eloquent {}
}
+namespace App\Models{
+/**
+ * Class UserAboItem
+ *
+ * @property int $id
+ * @property int $user_abo_id
+ * @property int $product_id
+ * @property int|null $comp
+ * @property int $qty
+ * @property int $status
+ * @property Carbon|null $created_at
+ * @property Carbon|null $updated_at
+ * @property Product $product
+ * @property UserAbo $user_abo
+ * @package App\Models
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem query()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereComp($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereProductId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereQty($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereStatus($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboItem whereUserAboId($value)
+ * @mixin \Eloquent
+ */
+ class UserAboItem extends \Eloquent {}
+}
+
namespace App\Models{
/**
* Class UserAboOrder
@@ -1975,6 +2028,7 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereStatus($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereUserAboId($value)
+ * @mixin \Eloquent
*/
class UserAboOrder extends \Eloquent {}
}
@@ -2217,11 +2271,11 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereSalesVolumePointsTPSum($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereSalesVolumeTPPoints($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereVersion($value)
- * @mixin \Eloquent
* @property string|null $user_birthday
* @property string|null $user_phone
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereUserBirthday($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereUserPhone($value)
+ * @mixin \Eloquent
*/
class UserBusiness extends \Eloquent {}
}
@@ -2389,11 +2443,11 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserBusinessId($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserCreditId($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserId($value)
- * @mixin \Eloquent
* @property int|null $from_month
* @property int|null $from_year
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereFromMonth($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereFromYear($value)
+ * @mixin \Eloquent
*/
class UserCreditItem extends \Eloquent {}
}
@@ -2431,9 +2485,9 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserHistory whereIdentifier($value)
* @property int|null $abo_options
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserHistory whereAboOptions($value)
- * @mixin \Eloquent
* @property int|null $is_abo
* @method static \Illuminate\Database\Eloquent\Builder|UserHistory whereIsAbo($value)
+ * @mixin \Eloquent
*/
class UserHistory extends \Eloquent {}
}
diff --git a/_todo.txt b/_todo.txt
index 8b13789..8f36fa9 100644
--- a/_todo.txt
+++ b/_todo.txt
@@ -1 +1,4 @@
+TODOS
+- member_id bei Abos aktualisieren, wenn User neu zugewiesen wird oder gelöscht wird
+-
\ No newline at end of file
diff --git a/app/Console/Commands/BusinessStore.php b/app/Console/Commands/BusinessStore.php
index 67484d0..496a226 100644
--- a/app/Console/Commands/BusinessStore.php
+++ b/app/Console/Commands/BusinessStore.php
@@ -52,48 +52,36 @@ class BusinessStore extends Command
*/
public function handle()
{
+
$executeDay = (int) Setting::getContentBySlug('day-exectute-business-structur');
- $this->info('RUN Command BusinessStore on Day: '. $executeDay);
-
$presentDay = (int) date('d');
+
+ $this->info('RUN Command BusinessStore on Day: '. $executeDay);
$this->info('RUN Command BusinessStore present Day: '. $presentDay);
-
+
if($executeDay !== $presentDay){
$this->info('NOT RUN Command BusinessStore is not present Day: '. $presentDay);
return 0;
}
-
+
$this->timeStart = microtime(true);
- //$this->info('RUN Command BusinessStore');
- $this->month = $this->argument('month');
- $this->year = $this->argument('year');
-
-
- if(!$this->month || !$this->year){
- $this->month = (int) date("m", strtotime("-1 month", time()));
- $this->year = (int) date("Y", strtotime("-1 month", time()));
- }
-
- $this->info('RUN Command BusinessStore on month: '.$this->month.' | year: '.$this->year);
-
- //erstellt die Business Struktur und die Details
- $this->storeBusinessStructureUsersDetailMonth();
- //Struktur und die Details für mehrere Montate for / to month
- //$this->storeBusinessStructureUsersDetailPeriod(1, 6);
-
- //erstellt die Gutschriften
+ // Argumente mit Standardwerten für den Vormonat
+ $this->month = $this->argument('month') ?: (int) date("m", strtotime("-1 month"));
+ $this->year = $this->argument('year') ?: (int) date("Y", strtotime("-1 month"));
+
+ $this->info('RUN Command BusinessStore on month: '.$this->month.' | year: '.$this->year);
+
+ // Prozesse ausführen
+ $this->storeBusinessStructureUsersDetailMonth();
$this->userBusinessCommissionsToCredit();
-
- //erstellt aus den Gutschriften die PDFs
- //$this->userCreatePaymentCreditsPDF();
-
- //update user Level
- //$this->userLevelUpdate();
+
+ // Auskommentierte Prozesse
+ // $this->userCreatePaymentCreditsPDF();
+ // $this->userLevelUpdate();
+ // $this->storeBusinessStructureUsersDetailPeriod(1, 6);
+
return 0;
-
- //\Log::info('Cron is running');
- //return 0;
}
private function storeBusinessStructureUsersDetailMonth(){
@@ -104,11 +92,8 @@ class BusinessStore extends Command
$businessUsersStore->storeBusinessUsersDetail();
$bool = $businessUsersStore->storeBusinessCompleted();
- $diff = microtime(true) - $this->timeStart;
- $sec = intval($diff);
- $micro = $diff - $sec;
-
- $this->info('END Command storeBusinessStructureUsersDetailMonth: '.$bool. ' | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
+ $this->logExecutionTime('END Command storeBusinessStructureUsersDetailMonth: '.$bool);
+
}
private function userBusinessCommissionsToCredit(){
@@ -121,11 +106,8 @@ class BusinessStore extends Command
$ret = $userPaymentCredits->addUserCreditItem($userBusiness);
$this->info('userBusinessCredit: '.$ret->user_id.' : Team: '.$ret->commission_pp_total.' | Shop: '.$ret->commission_shop_sales);
}
- $diff = microtime(true) - $this->timeStart;
- $sec = intval($diff);
- $micro = $diff - $sec;
-
- $this->info('END Command userBusinessCommissionsToCredit: | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
+ $this->logExecutionTime('END Command userBusinessCommissionsToCredit:');
+
}
private function userCreatePaymentCreditsPDF(){
@@ -139,11 +121,8 @@ class BusinessStore extends Command
$this->info('creditsPDF: '.$bool.' user_id: '.$creditItemUser->user_id);
}
- $diff = microtime(true) - $this->timeStart;
- $sec = intval($diff);
- $micro = $diff - $sec;
-
- $this->info('END Command userCreatePaymentCreditsPDF: | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
+ $this->logExecutionTime('END Command userCreatePaymentCreditsPDF:');
+
}
private function userLevelUpdate(){
@@ -162,29 +141,32 @@ class BusinessStore extends Command
}
}
- $diff = microtime(true) - $this->timeStart;
- $sec = intval($diff);
- $micro = $diff - $sec;
-
- $this->info('END Command userLevelUpdate: | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
+ $this->logExecutionTime('END Command userLevelUpdate:');
+
}
- private function storeBusinessStructureUsersDetailPeriod($for, $to){
- for($i = $for; $i<=$to; $i++){
- $month = $i;
- $this->info('Store Business Structure Users Detail month: '.$month.' year:'.$this->year);
- $businessUsersStore = new BusinessUsersStore($month, $this->year);
+
+ private function storeBusinessStructureUsersDetailPeriod($from, $to)
+ {
+ for($i = $from; $i <= $to; $i++){
+ $this->info('Store Business Structure Users Detail month: '.$i.' year:'.$this->year);
+ $businessUsersStore = new BusinessUsersStore($i, $this->year);
$businessUsersStore->storeUserBusinessStructure();
$businessUsersStore->storeBusinessUsersDetail();
$bool = $businessUsersStore->storeBusinessCompleted();
- $diff = microtime(true) - $this->timeStart;
- $sec = intval($diff);
- $micro = $diff - $sec;
- $this->info('Period BusinessStore: '.$bool. ' | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
-
+ $this->logExecutionTime('Period BusinessStore: '.$bool);
}
- }
+ }
+
+ private function logExecutionTime($message)
+ {
+ $diff = microtime(true) - $this->timeStart;
+ $sec = intval($diff);
+ $micro = $diff - $sec;
+
+ $this->info($message. ' | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
+ }
}
diff --git a/app/Console/Commands/SubDomains.php b/app/Console/Commands/SubDomains.php
new file mode 100644
index 0000000..9687fe3
--- /dev/null
+++ b/app/Console/Commands/SubDomains.php
@@ -0,0 +1,664 @@
+timeStart = microtime(true);
+
+ $userId = $this->argument('user_id');
+ $force = $this->option('force');
+ $startId = $this->option('start');
+ $createMissing = $this->option('create-missing');
+ $debug = $this->option('debug');
+
+ if ($debug) {
+ $this->warn("DEBUG-MODUS (DRY-RUN): Es werden keine tatsächlichen Änderungen vorgenommen!");
+ }
+
+ $this->info("Starte Subdomain-Verwaltung" . ($force ? " (erzwungener Modus)" : ""));
+
+ try {
+ if ($userId) {
+ $this->info("Verarbeite einzelnen Benutzer mit ID: {$userId}");
+ $result = $this->syncSingleUser($userId, $force, $createMissing, $debug);
+
+ if ($result) {
+ $this->info("Benutzer {$userId} erfolgreich synchronisiert" . ($debug ? " (simuliert)" : ""));
+ } else {
+ $this->warn("Benutzer {$userId} konnte nicht vollständig synchronisiert werden" . ($debug ? " (simuliert)" : ""));
+ }
+ } else {
+ $this->info("Verarbeite alle Benutzer ab ID: {$startId}");
+ $result = $this->syncAllUsers($force, $startId, $createMissing, $debug);
+
+ // Zusammenfassung der Ergebnisse
+ $this->displaySummary($result, $debug);
+ }
+
+ $this->logExecutionTime("Subdomain-Verwaltung abgeschlossen" . ($debug ? " (DEBUG-MODUS)" : ""));
+ return 0;
+ } catch (Exception $e) {
+ $this->error("Ein Fehler ist aufgetreten: " . $e->getMessage());
+ Log::error("Shopping User Sync Fehler: ", [
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString(),
+ 'user_id' => $userId,
+ 'force' => $force,
+ 'start_id' => $startId,
+ 'debug' => $debug
+ ]);
+ return 1;
+ }
+ }
+
+
+ /**
+ * Zeigt eine Zusammenfassung der Synchronisationsergebnisse an
+ *
+ * @param array $result Ergebnisdaten der Synchronisation
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return void
+ */
+ private function displaySummary($result, $debug = false)
+ {
+ $this->line("");
+ $this->info("=== Zusammenfassung " . ($debug ? "(DEBUG-MODUS)" : "") . " ===");
+ $this->info("Verarbeitete Shops: " . count($result['shops']));
+ $this->info("Aktualisierte PHP-Versionen: " . $result['updatedCount'] . ($debug ? " (simuliert)" : ""));
+ $this->info("Aktivierte SSL-Zertifikate: " . $result['sslEnabledCount'] . ($debug ? " (simuliert)" : ""));
+ $this->info("Aktualisierte SSL-Konfigurationen: " . $result['sslConfiguredCount'] . ($debug ? " (simuliert)" : ""));
+
+ if (!empty($result['createdSubdomains'])) {
+ $this->info("Neu erstellte Subdomains: " . count($result['createdSubdomains']) . ($debug ? " (simuliert)" : ""));
+ }
+
+ if (!empty($result['missingSubdomains'])) {
+ $this->warn("Fehlende Subdomains: " . count($result['missingSubdomains']));
+ }
+
+ if (!empty($result['unusedSubdomains'])) {
+ $this->warn("Ungenutzte Subdomains: " . count($result['unusedSubdomains']));
+ }
+
+ if (!empty($result['doubleDomains'])) {
+ $this->warn("Benutzer mit mehreren Shops: " . count($result['doubleDomains']));
+ }
+ }
+
+ /**
+ * Synchronisiert einen einzelnen Benutzer und seine Shops
+ *
+ * @param int $userId Benutzer-ID
+ * @param bool $force Erzwingt die Aktualisierung aller Subdomains
+ * @param bool $createMissing Erstellt fehlende Subdomains
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return bool Erfolg der Operation
+ */
+ private function syncSingleUser($userId, $force = false, $createMissing = false, $debug = false)
+ {
+ $this->info("Synchronisiere Benutzer mit ID: {$userId}");
+
+ // Benutzer-Shops abrufen
+ $userShops = UserShop::where('user_id', $userId)->get();
+
+ if ($userShops->isEmpty()) {
+ $this->warn("Keine Shops für Benutzer {$userId} gefunden");
+ return false;
+ }
+
+ $this->info("Gefundene Shops für Benutzer {$userId}: " . $userShops->count());
+
+ // Subdomains abrufen und filtern
+ $subdomains = $this->getFilteredSubdomains();
+ $success = true;
+
+ // Benutzer-Shops durchlaufen und mit Subdomains abgleichen
+ foreach ($userShops as $userShop) {
+ $fullDomainName = $userShop->slug . '.' . $this->domain;
+ $this->info("Verarbeite Shop: {$fullDomainName}");
+
+ // Prüfen, ob Subdomain existiert
+ if (array_key_exists($fullDomainName, $subdomains)) {
+ $success = $this->processExistingSubdomain($userShop, $subdomains[$fullDomainName], $force, $debug) && $success;
+ } else {
+ // Subdomain fehlt
+ $this->warn("Shop {$userShop->slug}: Keine Subdomain gefunden");
+
+ // Optional: Neue Subdomain erstellen
+ if ($createMissing) {
+ $this->info("Erstelle fehlende Subdomain für Shop {$userShop->slug}" . ($debug ? " (simuliert)" : ""));
+ $success = $this->createSubdomain($userShop->slug, $debug) && $success;
+ } else {
+ $success = false;
+ }
+ }
+ }
+
+ return $success;
+ }
+
+ /**
+ * Verarbeitet eine existierende Subdomain und aktualisiert sie bei Bedarf
+ *
+ * @param UserShop $userShop Shop-Objekt
+ * @param array $subdomainInfo Subdomain-Informationen
+ * @param bool $force Erzwingt die Aktualisierung
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return bool Erfolg der Operation
+ */
+ private function processExistingSubdomain($userShop, $subdomainInfo, $force, $debug = false)
+ {
+ $success = true;
+ $hasSSL = ($subdomainInfo['ssl_certificate_sni'] === 'Y' ||
+ $subdomainInfo['ssl_proxy'] === 'Y');
+ $sslActive = ($subdomainInfo['ssl_certificate_sni_is_active'] ?? 'N') === 'Y';
+ $phpVersion = $subdomainInfo['php_version'];
+
+ $this->info("Shop {$userShop->slug}: PHP-Version: {$phpVersion}, SSL: " .
+ ($hasSSL ? "Aktiviert" : "Nicht aktiviert") .
+ ($hasSSL ? ", SSL aktiv: " . ($sslActive ? "Ja" : "Nein") : ""));
+
+ // Prüfen, ob PHP-Version aktualisiert werden muss
+ $requiredPhpVersion = config('app.php_version');
+ if ($force || $phpVersion !== $requiredPhpVersion) {
+ $this->info("Shop {$userShop->slug}: PHP-Version aktualisieren von {$phpVersion} auf {$requiredPhpVersion}" . ($debug ? " (simuliert)" : ""));
+
+ if (!$debug && !$this->updateSubdomainParams($userShop->slug, $requiredPhpVersion)) {
+ $this->error("PHP-Version für {$userShop->slug}.{$this->domain} konnte nicht aktualisiert werden");
+ $success = false;
+ }
+ }
+
+ // Prüfen, ob SSL aktiviert werden muss
+ if ($force || !$hasSSL) {
+ $this->info("Shop {$userShop->slug}: SSL aktivieren" . ($debug ? " (simuliert)" : ""));
+
+ if (!$debug && !$this->enableSSL($userShop->slug)) {
+ $this->error("SSL für {$userShop->slug}.{$this->domain} konnte nicht aktiviert werden");
+ $success = false;
+ }
+ }
+ // Prüfen, ob SSL-Konfiguration aktualisiert werden muss
+ else if ($force || ($hasSSL && !$sslActive)) {
+ $this->info("Shop {$userShop->slug}: SSL-Konfiguration aktualisieren" . ($debug ? " (simuliert)" : ""));
+
+ if (!$debug && !$this->updateSSL($userShop->slug . '.' . $this->domain)) {
+ $this->error("SSL-Konfiguration für {$userShop->slug}.{$this->domain} konnte nicht aktualisiert werden");
+ $success = false;
+ }
+ }
+
+ return $success;
+ }
+
+ /**
+ * Synchronisiert alle Benutzer-Shops
+ *
+ * @param bool $force Erzwingt die Aktualisierung aller Subdomains
+ * @param int $startId Beginnt die Synchronisation ab dieser ID
+ * @param bool $createMissing Erstellt fehlende Subdomains
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return array Ergebnisdaten der Synchronisation
+ */
+ private function syncAllUsers($force, $startId, $createMissing = false, $debug = false)
+ {
+ $this->info("Starte Synchronisation aller Benutzer-Shops ab ID: {$startId}");
+
+ // Benutzer-Shops abrufen
+ $userShopsQuery = UserShop::query();
+
+ if ($startId > 1) {
+ $userShopsQuery->where('id', '>=', $startId);
+ }
+
+ $userShops = $userShopsQuery->limit(1000)->get();
+ $this->info("Gefundene Benutzer-Shops: " . $userShops->count());
+
+ // Subdomains abrufen und filtern
+ $subdomains = $this->getFilteredSubdomains();
+ $this->info("Gefilterte Subdomains: " . count($subdomains));
+
+ // Ergebnis-Arrays initialisieren
+ $doubleDomains = [];
+ $missingSubdomains = [];
+ $outdatedPhpVersions = [];
+ $missingSSL = [];
+ $sslConfigurationNeeded = [];
+ $createdSubdomains = [];
+ $updatedCount = 0;
+ $sslEnabledCount = 0;
+ $sslConfiguredCount = 0;
+
+ // Benutzer-Shops durchlaufen und mit Subdomains abgleichen
+ foreach ($userShops as $userShop) {
+ $fullDomainName = $userShop->slug . '.' . $this->domain;
+
+ // Status der Subdomain setzen
+ $userShop->hasSubdomain = false;
+ $userShop->hasSSL = false;
+ $userShop->sslActive = false;
+ $userShop->PHPversion = "";
+
+ // Prüfen, ob Subdomain existiert
+ if (array_key_exists($fullDomainName, $subdomains)) {
+ $userShop->hasSubdomain = true;
+ $userShop->hasSSL = ($subdomains[$fullDomainName]['ssl_certificate_sni'] === 'Y' ||
+ $subdomains[$fullDomainName]['ssl_proxy'] === 'Y');
+ $userShop->sslActive = ($subdomains[$fullDomainName]['ssl_certificate_sni_is_active'] ?? 'N') === 'Y';
+ $userShop->PHPversion = $subdomains[$fullDomainName]['php_version'];
+
+ // Prüfen, ob PHP-Version aktualisiert werden muss
+ $requiredPhpVersion = config('app.php_version');
+ if ($force || $userShop->PHPversion !== $requiredPhpVersion) {
+ $this->info("Shop {$userShop->slug}: PHP-Version aktualisieren von {$userShop->PHPversion} auf {$requiredPhpVersion}" . ($debug ? " (simuliert)" : ""));
+ $outdatedPhpVersions[] = $userShop->slug;
+
+ if (!$debug && $this->updateSubdomainParams($userShop->slug, $requiredPhpVersion)) {
+ $updatedCount++;
+ } else if ($debug) {
+ // Im Debug-Modus zählen wir trotzdem, als ob es erfolgreich wäre
+ $updatedCount++;
+ }
+ }else{
+ $this->info("Shop {$userShop->slug}: PHP-Version ist aktuell: {$userShop->PHPversion}");
+ }
+
+ // Prüfen, ob SSL aktiviert werden muss
+ /* if ($force || !$userShop->hasSSL) {
+ $this->info("Shop {$userShop->slug}: SSL aktivieren" . ($debug ? " (simuliert)" : ""));
+ $missingSSL[] = $userShop->slug;
+
+ if (!$debug && $this->enableSSL($userShop->slug)) {
+ $sslEnabledCount++;
+ } else if ($debug) {
+ // Im Debug-Modus zählen wir trotzdem, als ob es erfolgreich wäre
+ $sslEnabledCount++;
+ }
+ }
+ // Prüfen, ob SSL-Konfiguration aktualisiert werden muss
+ else if ($force || ($userShop->hasSSL && !$userShop->sslActive)) {
+ $this->info("Shop {$userShop->slug}: SSL-Konfiguration aktualisieren" . ($debug ? " (simuliert)" : ""));
+ $sslConfigurationNeeded[] = $userShop->slug;
+
+ if (!$debug && $this->updateSSL($fullDomainName)) {
+ $sslConfiguredCount++;
+ } else if ($debug) {
+ // Im Debug-Modus zählen wir trotzdem, als ob es erfolgreich wäre
+ $sslConfiguredCount++;
+ }
+ }*/
+
+ // Subdomain aus der Liste entfernen, um später ungenutzte zu identifizieren
+ unset($subdomains[$fullDomainName]);
+ } else {
+ // Subdomain fehlt
+ $missingSubdomains[] = $userShop->slug;
+ $this->warn("Shop {$userShop->slug}: Keine Subdomain gefunden");
+
+ // Optional: Neue Subdomain erstellen
+ if ($createMissing) {
+ $this->info("Erstelle fehlende Subdomain für Shop {$userShop->slug}" . ($debug ? " (simuliert)" : ""));
+ if (!$debug && $this->createSubdomain($userShop->slug)) {
+ $createdSubdomains[] = $userShop->slug;
+ } else if ($debug) {
+ // Im Debug-Modus zählen wir trotzdem, als ob es erfolgreich wäre
+ $createdSubdomains[] = $userShop->slug;
+ }
+ }
+ }
+
+ // Doppelte Domains pro Benutzer erfassen
+ $doubleDomains[$userShop->user_id][$userShop->id] = $fullDomainName;
+ }
+
+ // Bereinigen der doppelten Domains (nur Benutzer mit mehreren Shops behalten)
+ foreach ($doubleDomains as $userId => $domains) {
+ if (count($domains) === 1) {
+ unset($doubleDomains[$userId]);
+ }
+ }
+
+ $this->logExecutionTime("Synchronisation abgeschlossen" . ($debug ? " (DEBUG-MODUS)" : ""));
+
+ // Ergebnisdaten zurückgeben
+ return [
+ 'shops' => $userShops,
+ 'unusedSubdomains' => $subdomains,
+ 'doubleDomains' => $doubleDomains,
+ 'missingSubdomains' => $missingSubdomains,
+ 'outdatedPhpVersions' => $outdatedPhpVersions,
+ 'missingSSL' => $missingSSL,
+ 'sslConfigurationNeeded' => $sslConfigurationNeeded,
+ 'createdSubdomains' => $createdSubdomains,
+ 'updatedCount' => $updatedCount,
+ 'sslEnabledCount' => $sslEnabledCount,
+ 'sslConfiguredCount' => $sslConfiguredCount
+ ];
+ }
+
+ /**
+ * Ruft alle Subdomains ab und filtert sie
+ *
+ * @return array Gefilterte Subdomains
+ */
+ private function getFilteredSubdomains()
+ {
+ $kas = new KasController();
+ $subdomains = [];
+
+ // Alle Subdomains abrufen
+ $this->info("Rufe Subdomains von KAS ab...");
+ $getSubdomains = $kas->action('get_subdomains');
+
+ // Subdomains filtern und in ein leicht zugängliches Array umwandeln
+ foreach ($getSubdomains as $subdomain) {
+ if (!isset($subdomain['subdomain_name'])) {
+ continue;
+ }
+
+ // Spezielle Subdomains überspringen
+ $skip = false;
+ foreach ($this->skipPrefixes as $prefix) {
+ if (strpos($subdomain['subdomain_name'], $prefix) !== false) {
+ $skip = true;
+ break;
+ }
+ }
+
+ if ($skip) {
+ continue;
+ }
+
+ // Subdomain-Informationen speichern
+ $subdomains[$subdomain['subdomain_name']] = [
+ 'ssl_certificate_sni' => $subdomain['ssl_certificate_sni'] ?? 'N',
+ 'php_version' => $subdomain['php_version'] ?? '',
+ 'ssl_proxy' => $subdomain['ssl_proxy'] ?? 'N',
+ 'ssl_certificate_sni_is_active' => $subdomain['ssl_certificate_sni_is_active'] ?? 'N',
+ ];
+ }
+
+ return $subdomains;
+ }
+
+ /**
+ * Ändert Parameter einer Subdomain, insbesondere die PHP-Version
+ *
+ * @param string $subdomain Name der Subdomain ohne Domain
+ * @param string $phpVersion Neue PHP-Version (z.B. '8.2')
+ * @param array $additionalParams Weitere zu ändernde Parameter
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return bool Erfolg der Operation
+ */
+ private function updateSubdomainParams($subdomain, $phpVersion, $additionalParams = [], $debug = false)
+ {
+ $this->info("Aktualisiere Parameter für: {$subdomain}.{$this->domain}" . ($debug ? " (simuliert)" : ""));
+
+ if ($debug) {
+ $this->line(" - PHP-Version: {$phpVersion}");
+ if (!empty($additionalParams)) {
+ $this->line(" - Zusätzliche Parameter: " . json_encode($additionalParams));
+ }
+ return true;
+ }
+
+ try {
+ $kas = new KasController();
+
+ // Standardparameter
+ $params = [
+ 'subdomain_name' => $subdomain . '.' . $this->domain, // Vollständigen Domainnamen verwenden
+ 'php_version' => $phpVersion
+ ];
+
+ // Oder alternativ, falls die API die Subdomain und Domain getrennt erwartet:
+ // $params = [
+ // 'subdomain_name' => $subdomain,
+ // 'domain_name' => $this->domain,
+ // 'php_version' => $phpVersion
+ // ];
+
+ // Zusätzliche Parameter hinzufügen
+ $params = array_merge($params, $additionalParams);
+
+ // Subdomain aktualisieren
+ $result = $kas->action('update_subdomain', $params);
+ $this->info("Parameter: ".json_encode($params));
+
+ if ($result) {
+ $this->info("Parameter für {$subdomain}.{$this->domain} erfolgreich aktualisiert " . json_encode($result));
+ return true;
+ } else {
+ $this->error("Fehler beim Aktualisieren der Parameter für {$subdomain}.{$this->domain}: " . json_encode($result));
+ return false;
+ }
+ } catch (Exception $e) {
+ $this->error("Fehler beim Aktualisieren der Parameter für {$subdomain}.{$this->domain}: " . $e->getMessage());
+ Log::error("Subdomain Parameter Update Fehler", [
+ 'subdomain' => $subdomain,
+ 'domain' => $this->domain,
+ 'php_version' => $phpVersion,
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ return false;
+ }
+ }
+
+ /**
+ * Aktualisiert die SSL-Konfiguration einer Subdomain mit erweiterten Parametern
+ *
+ * @param string $subdomainName Vollständiger Domainname (z.B. 'shop.mivita.care')
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return bool Erfolg der Operation
+ */
+ private function updateSSL($subdomainName, $debug = false)
+ {
+ $this->info("Aktualisiere SSL-Konfiguration für: {$subdomainName}" . ($debug ? " (simuliert)" : ""));
+
+ if ($debug) {
+ $this->line(" - SSL-Parameter werden aktualisiert");
+ return true;
+ }
+
+ try {
+ $kas = new KasController();
+ $ssl = KasSLLController::getApiSSLParameter();
+
+ $params = array_merge(['hostname' => $subdomainName], $ssl);
+ $result = $kas->action('update_ssl', $params);
+
+ if ($result === "TRUE" || $result === true) {
+ $this->info("SSL-Konfiguration für {$subdomainName} erfolgreich aktualisiert");
+ return true;
+ } else {
+ $this->warn("SSL-Konfiguration für {$subdomainName} nicht vollständig aktualisiert: " . json_encode($result));
+ return false;
+ }
+ } catch (Exception $e) {
+ $this->error("Fehler bei der SSL-Konfiguration für {$subdomainName}: " . $e->getMessage());
+ Log::error("SSL Update Fehler", [
+ 'subdomain' => $subdomainName,
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ return false;
+ }
+ }
+
+ /**
+ * Aktiviert SSL für eine Subdomain mit vollständiger Konfiguration
+ *
+ * @param string $subdomain Name der Subdomain ohne Domain
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return bool Erfolg der Operation
+ */
+ private function enableSSL($subdomain, $debug = false)
+ {
+ $fullDomainName = $subdomain . '.' . $this->domain;
+ $this->info("Aktiviere SSL für: {$fullDomainName}" . ($debug ? " (simuliert)" : ""));
+
+ if ($debug) {
+ $this->line(" - SSL-Proxy wird aktiviert");
+ $this->line(" - HTTP zu HTTPS Weiterleitung wird eingerichtet");
+ $this->line(" - SSL-Konfiguration wird aktualisiert");
+ return true;
+ }
+
+ // Schritt 1: Subdomain-Parameter aktualisieren (ssl_proxy aktivieren)
+ $subdomainResult = $this->updateSubdomainParams($subdomain, config('app.php_version'), [
+ 'ssl_proxy' => 'Y',
+ 'redirect_status' => 301 // Weiterleitung von HTTP auf HTTPS
+ ]);
+
+ if (!$subdomainResult) {
+ $this->error("SSL-Aktivierung für {$fullDomainName} fehlgeschlagen: Subdomain-Parameter konnten nicht aktualisiert werden");
+ return false;
+ }
+
+ // Schritt 2: SSL-Konfiguration aktualisieren
+ $sslResult = $this->updateSSL($fullDomainName);
+
+ if (!$sslResult) {
+ $this->warn("SSL-Aktivierung für {$fullDomainName} teilweise erfolgreich: SSL-Konfiguration konnte nicht aktualisiert werden");
+ return false;
+ }
+
+ $this->info("SSL für {$fullDomainName} vollständig aktiviert");
+ return true;
+ }
+
+ /**
+ * Erstellt eine neue Subdomain für einen Shop
+ *
+ * @param string $slug Shop-Slug
+ * @param bool $debug Debug-Modus (Dry-Run)
+ * @return bool Erfolg der Operation
+ */
+ private function createSubdomain($slug, $debug = false)
+ {
+ $fullDomainName = $slug . '.' . $this->domain;
+ $this->info("Erstelle neue Subdomain: {$fullDomainName}" . ($debug ? " (simuliert)" : ""));
+
+ if ($debug) {
+ $this->line(" - Pfad: /mein.mivita.care/public/");
+ $this->line(" - PHP-Version: " . config('app.php_version'));
+ $this->line(" - SSL wird direkt aktiviert");
+ return true;
+ }
+
+ try {
+ $kas = new KasController();
+
+ // Parameter für die neue Subdomain
+ $params = [
+ 'subdomain_name' => $slug,
+ 'domain_name' => $this->domain,
+ 'subdomain_path' => '/mein.mivita.care/public/',
+ 'php_version' => config('app.php_version'),
+ ];
+
+ // Subdomain erstellen
+ $result = $kas->action('add_subdomain', $params);
+
+ if ($result === $fullDomainName) {
+ $this->info("Subdomain {$fullDomainName} erfolgreich erstellt");
+
+ // SSL direkt aktivieren
+ $this->enableSSL($slug);
+
+ return true;
+ } else {
+ $this->error("Fehler beim Erstellen der Subdomain {$fullDomainName}: " . json_encode($result));
+ return false;
+ }
+ } catch (Exception $e) {
+ $this->error("Fehler beim Erstellen der Subdomain {$fullDomainName}: " . $e->getMessage());
+ Log::error("Subdomain Erstellung Fehler", [
+ 'slug' => $slug,
+ 'domain' => $this->domain,
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ return false;
+ }
+ }
+
+ /**
+ * Protokolliert die Ausführungszeit einer Operation
+ *
+ * @param string $message Nachricht für die Protokollierung
+ * @return void
+ */
+ private function logExecutionTime($message)
+ {
+ $diff = microtime(true) - $this->timeStart;
+ $sec = intval($diff);
+ $micro = $diff - $sec;
+
+ $this->info($message. ' | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms");
+ }
+}
diff --git a/app/Console/Commands/SyncShoppingUserData.php b/app/Console/Commands/SyncShoppingUserData.php
new file mode 100644
index 0000000..3256376
--- /dev/null
+++ b/app/Console/Commands/SyncShoppingUserData.php
@@ -0,0 +1,129 @@
+argument('user_id');
+ $force = $this->option('force');
+ $startId = $this->option('start');
+
+ try {
+ if ($userId) {
+ $this->syncSingleUser($userId);
+ } else {
+ $this->syncAllUsers($force, $startId);
+ }
+ } catch (Exception $e) {
+ $this->error("Ein Fehler ist aufgetreten: " . $e->getMessage());
+ Log::error("Shopping User Sync Fehler: ", [
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ return 1;
+ }
+
+ return 0;
+ }
+
+ private function syncAllUsers($force, $startId)
+ {
+ $this->info("Starte Synchronisierung für alle User ab ID: {$startId}...");
+ $count = 0;
+ $errors = [];
+
+ // Aktiviere SQL Query Logging für Debugging
+ DB::enableQueryLog();
+
+ User::where('id', '>=', $startId)
+ ->orderBy('id')
+ ->chunk(10, function($users) use (&$count, &$errors, $force) {
+ foreach($users as $user) {
+ try {
+ $this->info("\nVerarbeite User ID: {$user->id} ({$user->email})");
+
+ $this->syncUser($user);
+ $count++;
+
+ $this->info("✓ User ID {$user->id} erfolgreich synchronisiert");
+
+ } catch (Exception $e) {
+ $errorMessage = "Fehler bei User ID {$user->id} ({$user->email}): " . $e->getMessage();
+ $errors[] = $errorMessage;
+ $this->error($errorMessage);
+
+ // Log die letzten SQL Queries
+ Log::error("Letzte SQL Queries:", [
+ 'queries' => DB::getQueryLog()
+ ]);
+
+ if (!$force) {
+ throw $e;
+ }
+ }
+ }
+ });
+
+ $this->newLine();
+ $this->info("Synchronisierung abgeschlossen!");
+ $this->info("Gesamt synchronisierte User: {$count}");
+
+ if (count($errors) > 0) {
+ $this->warn("Es gab " . count($errors) . " Fehler während der Synchronisierung:");
+ foreach($errors as $error) {
+ $this->warn("- " . $error);
+ }
+ }
+ }
+
+ private function syncUser(User $user)
+ {
+ try {
+ $this->output->write(" Setze Faker Mail... ");
+ ShoppingUserService::setFakerMail($user);
+ $this->info("✓");
+
+ $this->output->write(" Synchronisiere Numbers... ");
+ ShoppingUserService::syncNumbersByEmail($user);
+ $this->info("✓");
+
+ $this->output->write(" Synchronisiere Orders... ");
+ ShoppingUserService::syncOrdersByEmail($user);
+ $this->info("✓");
+
+ } catch (Exception $e) {
+ throw new Exception($e->getMessage() . "\n" . $e->getTraceAsString());
+ }
+ }
+
+ private function syncSingleUser($userId)
+ {
+ $user = User::find($userId);
+ if (!$user) {
+ throw new Exception("User ID {$userId} nicht gefunden");
+ }
+
+ $this->info("Starte Synchronisierung für User ID {$userId}...");
+
+ try {
+ $this->syncUser($user);
+ $this->info("✓ Synchronisierung erfolgreich abgeschlossen");
+ } catch (Exception $e) {
+ throw new Exception("Fehler bei User ID {$userId}: " . $e->getMessage());
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/app/Console/Commands/UserMakeAboOrder.php b/app/Console/Commands/UserMakeAboOrder.php
new file mode 100644
index 0000000..49b19f8
--- /dev/null
+++ b/app/Console/Commands/UserMakeAboOrder.php
@@ -0,0 +1,292 @@
+timeStart = microtime(true);
+ Log::info('UserMakeAboOrder: Befehl gestartet');
+ $this->info('RUN Command user:make_abo_order');
+
+ try {
+ $this->checkAbosToOrder();
+ $executionTime = $this->getExecutionTime();
+ Log::info("UserMakeAboOrder: Befehl erfolgreich abgeschlossen in {$executionTime}");
+ $this->info("Befehl erfolgreich abgeschlossen in {$executionTime}");
+
+ return 0;
+ } catch (\Exception $e) {
+ Log::error('UserMakeAboOrder: Fehler beim Ausführen des Befehls', [
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ $this->error('Fehler beim Ausführen des Befehls: ' . $e->getMessage());
+ return 1;
+ }
+ }
+
+ /**
+ * Prüft alle Abos, die heute fällig sind und erstellt Bestellungen
+ *
+ * @return void
+ */
+ private function checkAbosToOrder()
+ {
+ $dateNow = Carbon::now()->format('Y-m-d');
+
+ Log::info('UserMakeAboOrder: Suche nach fälligen Abos für Datum', ['date' => $dateNow]);
+
+ $userAbos = UserAbo::where('next_date', '=', $dateNow)
+ ->where('active', true)
+ ->get();
+
+ $count = $userAbos->count();
+ Log::info("UserMakeAboOrder: {$count} fällige Abos gefunden");
+ $this->info("Gefundene fällige Abos: {$count}");
+
+ foreach ($userAbos as $userAbo) {
+ Log::info('UserMakeAboOrder: Verarbeite Abo', [
+ 'abo_id' => $userAbo->id,
+ 'payone_userid' => $userAbo->payone_userid
+ ]);
+
+ $this->info("Verarbeite Abo: {$userAbo->id} (PayoneUserid: {$userAbo->payone_userid})");
+
+ try {
+ $shoppingOrder = $this->makeOrder($userAbo);
+
+ if ($shoppingOrder) {
+ Log::info('UserMakeAboOrder: Bestellung erstellt', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id
+ ]);
+ $this->info("Bestellung erstellt: {$shoppingOrder->id}");
+ } else {
+ Log::warning('UserMakeAboOrder: Keine Bestellung erstellt für Abo', ['abo_id' => $userAbo->id]);
+ $this->warn("Keine Bestellung erstellt für Abo: {$userAbo->id}");
+ }
+ } catch (\Exception $e) {
+ Log::error('UserMakeAboOrder: Fehler bei der Verarbeitung des Abos', [
+ 'abo_id' => $userAbo->id,
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ $this->error("Fehler bei Abo {$userAbo->id}: " . $e->getMessage());
+ }
+ }
+ }
+
+ /**
+ * Erstellt eine Bestellung für ein Abo
+ *
+ * @param UserAbo $userAbo
+ * @return mixed
+ */
+ private function makeOrder($userAbo)
+ {
+ Log::info('UserMakeAboOrder: Starte Bestellungserstellung', ['abo_id' => $userAbo->id]);
+ $this->info('Starte Bestellungserstellung für Abo: ' . $userAbo->id);
+
+ $shoppingOrder = null;
+ $userOrder = new UserMakeOrder($userAbo);
+
+ try {
+ if (!$userOrder->createShoppingUser()) {
+ Log::error('UserMakeAboOrder: Konnte Shopping-User nicht erstellen', ['abo_id' => $userAbo->id]);
+ $this->error("Konnte Shopping-User für Abo {$userAbo->id} nicht erstellen");
+ return null;
+ }
+
+ $shoppingOrder = $userOrder->makeShoppingOrder();
+ if (!$shoppingOrder) {
+ Log::error('UserMakeAboOrder: Konnte Bestellung nicht erstellen', ['abo_id' => $userAbo->id]);
+ $this->error("Konnte Bestellung für Abo {$userAbo->id} nicht erstellen");
+ return null;
+ }
+
+ Log::info('UserMakeAboOrder: Bestellung erstellt, starte Zahlungsvorgang', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id
+ ]);
+
+ $response = $userOrder->makePayment();
+ $this->info('makePayment response: ' . json_encode($response));
+
+ if (!isset($response['status'])) {
+ Log::error('UserMakeAboOrder: Ungültige Zahlungsantwort', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id,
+ 'response' => $response
+ ]);
+ $this->error("Ungültige Zahlungsantwort für Abo {$userAbo->id}");
+ return $shoppingOrder;
+ }
+
+ if ($response['status'] === 'APPROVED') {
+ Log::info('UserMakeAboOrder: Zahlung erfolgreich', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id,
+ 'response' => $response
+ ]);
+ $this->info("Zahlung erfolgreich für Abo {$userAbo->id}");
+ $this->updateAbo($userAbo, $shoppingOrder, 1);
+ } elseif ($response['status'] === 'ERROR') {
+ Log::error('UserMakeAboOrder: Zahlungsfehler', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id,
+ 'error' => $response
+ ]);
+ $this->error("Zahlungsfehler für Abo {$userAbo->id}");
+
+ MyLog::writeLog(
+ 'userabo',
+ 'error',
+ 'Error:3002 App\Console\Commands\UserMakeAboOrder::makeOrder / makePayment Error response',
+ $response
+ );
+
+ $this->updateAbo($userAbo, $shoppingOrder, 3);
+
+ $shoppingPayment = $userOrder->getShoppingPayment();
+ $data = [
+ 'mode' => $shoppingPayment->mode,
+ 'txaction' => 'error',
+ 'send_link' => false,
+ 'payment_error' => $response,
+ ];
+
+ Payment::paymentStatusSendMail($shoppingOrder, $shoppingPayment, $data);
+ } else {
+ Log::warning('UserMakeAboOrder: Unbekannter Zahlungsstatus', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id,
+ 'status' => $response['status']
+ ]);
+ $this->warn("Unbekannter Zahlungsstatus für Abo {$userAbo->id}: {$response['status']}");
+ }
+ } catch (\Exception $e) {
+ Log::error('UserMakeAboOrder: Ausnahme bei der Bestellungserstellung', [
+ 'abo_id' => $userAbo->id,
+ 'error' => $e->getMessage(),
+ 'trace' => $e->getTraceAsString()
+ ]);
+ $this->error("Ausnahme bei Abo {$userAbo->id}: " . $e->getMessage());
+ }
+
+ return $shoppingOrder;
+ }
+
+ /**
+ * Aktualisiert das Abo nach einer Bestellung
+ *
+ * @param UserAbo $userAbo
+ * @param mixed $shoppingOrder
+ * @param int $status
+ * @return void
+ */
+ private function updateAbo($userAbo, $shoppingOrder, $status = 1)
+ {
+ Log::info('UserMakeAboOrder: Aktualisiere Abo', [
+ 'abo_id' => $userAbo->id,
+ 'order_id' => $shoppingOrder->id,
+ 'status' => $status
+ ]);
+
+ $this->info("Aktualisiere Abo: {$userAbo->id} mit Status {$status}");
+
+ $updateData = [
+ 'next_date' => AboHelper::setNextDate(now(), $userAbo->abo_interval),
+ 'last_date' => now(),
+ ];
+
+ if ($status !== 1) {
+ $updateData['status'] = $status;
+ }
+
+ try {
+ $userAbo->update($updateData);
+
+ UserAboOrder::create([
+ 'user_abo_id' => $userAbo->id,
+ 'shopping_order_id' => $shoppingOrder->id,
+ 'status' => $status,
+ ]);
+
+ Log::info('UserMakeAboOrder: Abo erfolgreich aktualisiert', [
+ 'abo_id' => $userAbo->id,
+ 'next_date' => $updateData['next_date']
+ ]);
+ } catch (\Exception $e) {
+ Log::error('UserMakeAboOrder: Fehler beim Aktualisieren des Abos', [
+ 'abo_id' => $userAbo->id,
+ 'error' => $e->getMessage()
+ ]);
+ $this->error("Fehler beim Aktualisieren des Abos {$userAbo->id}: " . $e->getMessage());
+ }
+ }
+
+ /**
+ * Berechnet die Ausführungszeit
+ *
+ * @return string
+ */
+ private function getExecutionTime()
+ {
+ $diff = microtime(true) - $this->timeStart;
+ $sec = intval($diff);
+ $micro = $diff - $sec;
+
+ return $sec . ' Sekunden und ' . round($micro * 1000, 2) . ' ms';
+ }
+}
\ No newline at end of file
diff --git a/app/Console/Commands/UserRestore.php b/app/Console/Commands/UserRestore.php
index 6ee9b69..ae0001a 100644
--- a/app/Console/Commands/UserRestore.php
+++ b/app/Console/Commands/UserRestore.php
@@ -12,7 +12,7 @@ class UserRestore extends Command
{
/**
* ln -sfv /usr/bin/php73 /usr/bin/php
- * php artisan business:store month year
+ * php artisan user:restore {user_id}
* The name and signature of the console command.
*
* @var string
diff --git a/app/Cron/UserMakeOrder.php b/app/Cron/UserMakeOrder.php
new file mode 100644
index 0000000..d17a1d5
--- /dev/null
+++ b/app/Cron/UserMakeOrder.php
@@ -0,0 +1,203 @@
+userAbo = $userAbo;
+ Log::info('UserMakeOrder initialisiert für UserAbo ID: ' . $userAbo->id);
+ }
+
+
+ public function checkProducts()
+ {
+ Log::info('Überprüfe Produkte für UserAbo ID: ' . $this->userAbo->id);
+ $ret = [];
+
+ if (!$this->userAbo->items || $this->userAbo->items->isEmpty()) {
+ Log::warning('Keine Artikel für UserAbo ID: ' . $this->userAbo->id . ' gefunden');
+ return $ret;
+ }
+ //preise prüfen, ob sie sich geändert haben?
+ foreach($this->userAbo->items as $item){
+ $ret[] = [
+ 'product_id' => $item->product_id,
+ 'comp' => $item->comp,
+ 'qty' => $item->qty,
+ 'price' => $item->price,
+ 'price_net' => $item->price_net,
+ 'tax_rate' => $item->tax_rate,
+ 'tax' => $item->tax,
+ 'price_vk_net' => $item->price_vk_net,
+ 'discount' => $item->discount,
+ 'points' => $item->points,
+ ];
+ }
+
+ Log::info('Produkte überprüft: ' . count($ret) . ' Artikel gefunden');
+ return $ret;
+ }
+
+ public function makePayment()
+ {
+ Log::info('Starte Zahlungsvorgang für UserAbo ID: ' . $this->userAbo->id);
+
+ try {
+ $this->pay = new PayoneController();
+ $this->pay->init($this->shopping_user, $this->shopping_order);
+ $amount = $this->shopping_order->subtotal_ws * 100;
+ $this->pay->setAboPayment($this->userAbo, $amount, 'EUR');
+ $this->pay->setPersonalData();
+ $response = $this->pay->ResponseData(true);
+
+ Log::info('Zahlungsvorgang abgeschlossen für UserAbo ID: ' . $this->userAbo->id . ', Status: ' . ($response->status ?? 'unbekannt'));
+ return $response;
+ } catch (\Exception $e) {
+ Log::error('Fehler bei Zahlungsvorgang für UserAbo ID: ' . $this->userAbo->id . ': ' . $e->getMessage());
+ throw $e;
+ }
+ }
+
+ public function getShoppingPayment()
+ {
+ Log::info('Rufe Zahlungsinformationen ab für UserAbo ID: ' . $this->userAbo->id);
+
+ if($this->pay){
+ $payment = $this->pay->getShoppingPayment();
+ Log::info('Zahlungsinformationen abgerufen: ' . ($payment ? 'erfolgreich' : 'nicht verfügbar'));
+ return $payment;
+ }
+
+ Log::warning('Keine Zahlungsinformationen verfügbar für UserAbo ID: ' . $this->userAbo->id);
+ return false;
+ }
+
+ public function createShoppingUser()
+ {
+ Log::info('Erstelle Shopping-User für UserAbo ID: ' . $this->userAbo->id);
+ //hier muss der letzte shopping_user verwendet werden
+ try {
+ $this->shopping_user = AboOrderCart::makeCustomerDetail($this->userAbo);
+ $this->shopping_user->created_at = now();
+ $this->shopping_user->updated_at = now();
+ $this->shopping_user->save();
+
+ Log::info('Shopping-User erstellt für UserAbo ID: ' . $this->userAbo->id . ', Neue User-ID: ' . $this->shopping_user->id);
+ return $this->shopping_user;
+ } catch (\Exception $e) {
+ Log::error('Fehler beim Erstellen des Shopping-Users für UserAbo ID: ' . $this->userAbo->id . ': ' . $e->getMessage());
+ throw $e;
+ }
+
+
+ Log::warning('Kein Shopping-User verfügbar für UserAbo ID: ' . $this->userAbo->id);
+ return false;
+ }
+
+ public function makeShoppingOrder()
+ {
+ Log::info('Erstelle Bestellung für UserAbo ID: ' . $this->userAbo->id);
+
+ try {
+ if (!$this->shopping_user) {
+ Log::error('Kein Shopping-User verfügbar für Bestellerstellung, UserAbo ID: ' . $this->userAbo->id);
+ return false;
+ }
+
+ AboOrderCart::initYard($this->userAbo, $this->shopping_user);
+ //hier wird die Bestellung erstellt inkl aktueller Preise
+ AboOrderCart::makeOrderYard($this->userAbo);
+
+ $yard = Yard::instance('shopping');
+
+ if (!$this->userAbo->shopping_user || !$this->userAbo->shopping_user->shopping_order || !$this->userAbo->shopping_user->shopping_order->user_shop) {
+ Log::error('Fehlende Beziehungsdaten für Bestellerstellung, UserAbo ID: ' . $this->userAbo->id);
+ return false;
+ }
+
+ $this->shopping_order = ShoppingOrder::create([
+ 'shopping_user_id' => $this->shopping_user->id,
+ 'auth_user_id' => $this->shopping_user->auth_user_id,
+ 'country_id' => $yard->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'user_shop_id' => $this->userAbo->shopping_user->shopping_order->user_shop->id,
+ 'payment_for' => $this->shopping_user->getOrderPaymentFor(),
+ 'total' => $yard->total(2, '.', ''),
+ 'subtotal' => $yard->subtotal(2, '.', ''),
+ 'shipping' => $yard->shipping(2, '.', ','),
+ 'shipping_net' => $yard->shippingNet(2, '.', ''),
+ 'subtotal_ws' => $yard->subtotalWithShipping(2, '.', ''),
+ 'tax' => $yard->taxWithShipping(2, '.', ''),
+ 'total_shipping' => $yard->totalWithShipping(2, '.', ''),
+ 'points' => $yard->points(),
+ 'weight' => $yard->weight(),
+ 'is_abo' => 1,
+ 'abo_interval' => 0,
+ 'txaction' => 'prev',
+ 'mode' => $this->userAbo->shopping_user->shopping_order->mode,
+ ]);
+
+ Log::info('Bestellung erstellt für UserAbo ID: ' . $this->userAbo->id . ', Bestellnummer: ' . $this->shopping_order->id);
+
+ $items = $yard->getContentByOrder();
+ $itemCount = 0;
+
+ foreach ($items as $item) {
+ if (!ShoppingOrderItem::where('shopping_order_id', $this->shopping_order->id)->where('row_id', $item->rowId)->count()){
+ $price_net = $yard->rowPriceNet($item, 2, '.', '');
+ $tax = $item->price - $price_net;
+ $data = [
+ 'shopping_order_id' => $this->shopping_order->id,
+ 'row_id' => $item->rowId,
+ 'product_id' => $item->id,
+ 'comp' => $item->options->comp,
+ 'qty' => $item->qty,
+ 'price' => $item->price,
+ 'price_net' => $price_net,
+ 'tax_rate' => $item->taxRate,
+ 'tax' => $tax,
+ 'price_vk_net' => $this->shopping_order->getPriceVkNetBy($item->id),
+ 'discount' => $item->options->no_commission ? 0 : $this->shopping_order->getUserDiscount(),
+ 'points' => $item->options->points,
+ 'slug' => $item->options->slug
+ ];
+ ShoppingOrderItem::create($data);
+ $itemCount++;
+ }
+ }
+
+ Log::info('Bestellpositionen hinzugefügt für UserAbo ID: ' . $this->userAbo->id . ', Anzahl: ' . $itemCount);
+
+ $this->shopping_order->makeTaxSplit();
+ Log::info('Steueraufteilung für Bestellung abgeschlossen, UserAbo ID: ' . $this->userAbo->id);
+
+ return $this->shopping_order;
+ } catch (\Exception $e) {
+ Log::error('Fehler bei Bestellerstellung für UserAbo ID: ' . $this->userAbo->id . ': ' . $e->getMessage());
+ throw $e;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/Admin/AboController.php b/app/Http/Controllers/Admin/AboController.php
new file mode 100644
index 0000000..00863fd
--- /dev/null
+++ b/app/Http/Controllers/Admin/AboController.php
@@ -0,0 +1,151 @@
+middleware('admin');
+ $this->aboRepository = $aboRepository;
+ }
+
+ public function index()
+ {
+ if (Request::get('reset') === 'filter') {
+ set_user_attr('filter_user_shop_id', null);
+ set_user_attr('filter_status', null);
+ set_user_attr('filter_member_id', null);
+ return redirect(route('admin_sales_customers'));
+ }
+
+ //$filter_user_shops = UserAbo::join('user_shops', 'user_shop_id', '=', 'user_shops.id')->orderBy('slug')->get()->pluck('slug', 'id')->unique()->toArray();
+ $filter_members = UserAbo::join('users', 'user_id', '=', 'users.id')->groupBy('user_id')->join('user_accounts', 'account_id', '=', 'user_accounts.id')->select('users.id', 'users.email', 'user_accounts.first_name', 'user_accounts.last_name')->get();
+
+ $data = [
+ //'filter_user_shops' => $filter_user_shops,
+ 'filter_members' => $filter_members,
+ ];
+ return view('admin.abo.index', $data);
+ }
+
+
+ public function detail($id)
+ {
+ $data = Request::all();
+ $user_abo = UserAbo::findOrFail($id);
+
+ //init Yard
+ AboOrderCart::initYard($user_abo);
+ $customer_detail = AboOrderCart::getCustomerDetail();
+ AboOrderCart::makeOrderYard($user_abo);
+
+ $comp_products = [];
+ if ($user_abo->is_for === 'me') {
+ $comp_products = Shop::getCompProducts('abo-me');
+ }
+
+ $data = [
+ 'user_abo' => $user_abo,
+ 'isAdmin' => true,
+ 'customer_detail' => $customer_detail,
+ 'view' => $user_abo->is_for,
+ 'comp_products' => $comp_products,
+ ];
+ return view('admin.abo.detail', $data);
+ }
+
+
+ public function update($id)
+ {
+ $data = Request::all();
+ if (isset($data['action'])) {
+ if ($data['action'] === 'abo_update_settings') {
+ $user_abo = UserAbo::findOrFail($data['id']);
+ $this->aboRepository->setModel($user_abo);
+ $this->aboRepository->update($data);
+ return redirect(route('admin_abos_detail', [$id]));
+ }
+ }
+ }
+
+ public function datatable()
+ {
+
+ $query = UserAbo::with('user_abo_orders')->with('shopping_user')->select('user_abos.*');
+
+ set_user_attr('filter_member_id', Request::get('filter_member_id'));
+ if (Request::get('filter_member_id') != "") {
+ $query->where('user_id', '=', Request::get('filter_member_id'));
+ }
+
+ set_user_attr('filter_status', Request::get('filter_status'));
+ if (Request::get('filter_status') != "") {
+ $query->where('status', '=', Request::get('filter_status'));
+ }
+
+ return \DataTables::eloquent($query)
+ ->addColumn('id', function (UserAbo $user_abo) {
+ return ' ';
+ })
+ ->addColumn('start_date', function (UserAbo $user_abo) {
+ return $user_abo->start_date;
+ })
+ ->addColumn('next_date', function (UserAbo $user_abo) {
+ return $user_abo->next_date;
+ })
+ ->addColumn('abo_interval', function (UserAbo $user_abo) {
+ return \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval);
+ })
+ ->addColumn('status', function (UserAbo $user_abo) {
+ return $user_abo->getStatusFormated();
+ })
+ ->addColumn('active', function (UserAbo $user_abo) {
+ return get_active_badge($user_abo->active);
+ })
+
+ ->addColumn('is_for', function (UserAbo $user_abo) {
+ return $user_abo->getIsForFormated();
+ })
+ ->addColumn('count', function (UserAbo $user_abo) {
+ return $user_abo->getCountOrders();
+ })
+ ->addColumn('amount', function (UserAbo $user_abo) {
+ return $user_abo->getFormattedAmount() . ' €';
+ })
+ ->addColumn('payment', function (UserAbo $user_abo) {
+ return $user_abo->getPaymentType();
+ })
+ ->addColumn('member', function (UserAbo $user_abo) {
+ if (isset($user_abo->shopping_user) && $user_abo->shopping_user->member_id > 0) {
+ return '' . $user_abo->shopping_user->member->getFullName() . ' ';
+ }
+ })
+ ->addColumn('payone_userid', function (UserAbo $user_abo) {
+ return $user_abo->payone_userid;
+ })
+
+ ->orderColumn('id', 'id $1')
+ ->orderColumn('start_date', 'start_date $1')
+ ->orderColumn('next_date', 'next_date $1')
+ ->orderColumn('abo_interval', 'abo_interval $1')
+ ->orderColumn('status', 'status $1')
+ ->orderColumn('active', 'active $1')
+ ->orderColumn('is_for', 'is_for $1')
+ ->orderColumn('count', 'count $1')
+ ->orderColumn('amount', 'amount $1')
+ ->orderColumn('payone_userid', 'payone_userid $1')
+ ->rawColumns(['id', 'status', 'active', 'is_for', 'member'])
+ ->make(true);
+ }
+}
diff --git a/app/Http/Controllers/Api/KasController.php b/app/Http/Controllers/Api/KasController.php
index 13210be..1a94b8b 100755
--- a/app/Http/Controllers/Api/KasController.php
+++ b/app/Http/Controllers/Api/KasController.php
@@ -56,7 +56,7 @@ class KasController extends Controller
}
// Fehler abfangen und ausgeben
- catch (SoapFault $fault)
+ catch (\SoapFault $fault)
{
trigger_error(" Fehlernummer: {$fault->faultcode},
Fehlermeldung: {$fault->faultstring},
@@ -88,7 +88,7 @@ class KasController extends Controller
}
// Fehler abfangen und ausgeben
- catch (SoapFault $fault)
+ catch (\SoapFault $fault)
{
trigger_error("Fehlernummer: {$fault->faultcode},
Fehlermeldung: {$fault->faultstring},
diff --git a/app/Http/Controllers/Api/KasSLLController.php b/app/Http/Controllers/Api/KasSLLController.php
index c9d99fc..4a1c3cb 100755
--- a/app/Http/Controllers/Api/KasSLLController.php
+++ b/app/Http/Controllers/Api/KasSLLController.php
@@ -8,48 +8,38 @@ use App\Http\Controllers\Controller;
class KasSLLController extends Controller
{
- private static $ssl_certificate_sni_csr = "-----BEGIN CERTIFICATE REQUEST-----
-MIIBfzCCASUCAQAwgYoxCzAJBgNVBAYTAkRFMQ4wDAYDVQQRDAU4Nzc1NTEPMA0G
-A1UECAwGQmF5ZXJuMRUwEwYDVQQHDAxLaXJjaGhhc2xhY2gxEzARBgNVBAkMCkxl
-aW5mZWxkIDIxFjAUBgNVBAoMDXJpd2EtdGVjIGUuSy4xFjAUBgNVBAMMDSoubWl2
-aXRhLmNhcmUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATHOCZrM/6Ry1iMHtpL
-3OM+nm2NZJwbT91yWM25yaxXkkfgaKxfvjfTSgK3Yl/nE+cSrijT4BdP7H3U2ZnZ
-Rg0FoDgwNgYJKoZIhvcNAQkOMSkwJzAlBgNVHREEHjAcgg0qLm1pdml0YS5jYXJl
-ggttaXZpdGEuY2FyZTAKBggqhkjOPQQDBANIADBFAiEAva2vcfT1l/NvrMdFrujf
-pFrbXTZMecYsa9SDnHXhp1gCIG8BFZSN/mPjM3EZXunj4bb1AXqqdxe+VjPiw6VL
-lZwE
------END CERTIFICATE REQUEST-----";
+ private static $ssl_certificate_sni_csr = "";
private static $ssl_certificate_sni_key = "-----BEGIN PRIVATE KEY-----
-MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgGd8N4RsRov6Kd81z
-iclbCpD5e7nT1cTN2u8XQZRU/1ChRANCAATHOCZrM/6Ry1iMHtpL3OM+nm2NZJwb
-T91yWM25yaxXkkfgaKxfvjfTSgK3Yl/nE+cSrijT4BdP7H3U2ZnZRg0F
+MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgohGr2e3ysw/Awvzh
+qkqDS4iQgRvWwNIYxTcPxpdcndGhRANCAASZjlV2bQbLQrOveMlYOowR3IlfND7z
+OxauFGabhvWSU1cg2w4U4bu/QXnDXfHHkcLp4M5WgHzX9Nw2m/abyJJ6
-----END PRIVATE KEY-----";
private static $ssl_certificate_sni_crt = "-----BEGIN CERTIFICATE-----
-MIIEpzCCBEygAwIBAgIRAOdJ/xXHharlPCF26cIYht0wCgYIKoZIzj0EAwIwgY8x
-CzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNV
-BAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE3MDUGA1UEAxMu
-U2VjdGlnbyBFQ0MgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTAe
-Fw0yMzA3MzEwMDAwMDBaFw0yNDA4MzAyMzU5NTlaMBgxFjAUBgNVBAMMDSoubWl2
-aXRhLmNhcmUwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATHOCZrM/6Ry1iMHtpL
-3OM+nm2NZJwbT91yWM25yaxXkkfgaKxfvjfTSgK3Yl/nE+cSrijT4BdP7H3U2ZnZ
-Rg0Fo4IC/TCCAvkwHwYDVR0jBBgwFoAU9oUKOxGG4QR9DqoLLNLuzGR7e64wHQYD
-VR0OBBYEFJco1/8VAvZA85Ct2Z/7XSA+DKNUMA4GA1UdDwEB/wQEAwIHgDAMBgNV
-HRMBAf8EAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBJBgNVHSAE
-QjBAMDQGCysGAQQBsjEBAgIHMCUwIwYIKwYBBQUHAgEWF2h0dHBzOi8vc2VjdGln
-by5jb20vQ1BTMAgGBmeBDAECATCBhAYIKwYBBQUHAQEEeDB2ME8GCCsGAQUFBzAC
-hkNodHRwOi8vY3J0LnNlY3RpZ28uY29tL1NlY3RpZ29FQ0NEb21haW5WYWxpZGF0
-aW9uU2VjdXJlU2VydmVyQ0EuY3J0MCMGCCsGAQUFBzABhhdodHRwOi8vb2NzcC5z
-ZWN0aWdvLmNvbTAlBgNVHREEHjAcgg0qLm1pdml0YS5jYXJlggttaXZpdGEuY2Fy
-ZTCCAX8GCisGAQQB1nkCBAIEggFvBIIBawFpAHcAdv+IPwq2+5VRwmHM9Ye6NLSk
-zbsp3GhCCp/mZ0xaOnQAAAGJquwmHwAABAMASDBGAiEA7/7/S0CxtvREygwS3qR5
-THaAwfObqF09zN4AE+rjGSQCIQDNat5O0VSbx+cwaNrrVWz86C0PnUufqWNkBVEa
-5XM0bQB2ANq2v2s/tbYin5vCu1xr6HCRcWy7UYSFNL2kPTBI1/urAAABiarsJnYA
-AAQDAEcwRQIhAMkJ4iRoexvBzGa7zuHLn0/R4iDvUstKVb7ZK1XqjuVQAiACwcKG
-5WNIIeTjJ+CNDeME8mqHpgbFNWIAiiz0u+ANZwB2AO7N0GTV2xrOxVy3nbTNE6Iy
-h0Z8vOzew1FIWUZxH7WbAAABiarsJmEAAAQDAEcwRQIgVVxidEYEx6g2xLxAcI57
-eKJ4NDol/bnhmb0iERQmXOoCIQDf6Hviv4+SO+K3OoxxLI9qzFHNP6sb6aDaXfTW
-ucyTtTAKBggqhkjOPQQDAgNJADBGAiEA4hOvVoXr58YPVGi5/UEEnyDXlUfX4ZKq
-9PmblI2ZQVkCIQDRllVwklX+DUBcvzG6hapvn5Wv2171yIeoJo+vm7UO5g==
+MIIEpDCCBEqgAwIBAgIQVIm0T0SQ6D20YQxMaHEKbDAKBggqhkjOPQQDAjCBjzEL
+MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
+BxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQDEy5T
+ZWN0aWdvIEVDQyBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENBMB4X
+DTI0MDgwMTAwMDAwMFoXDTI1MDkwMTIzNTk1OVowGDEWMBQGA1UEAwwNKi5taXZp
+dGEuY2FyZTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJmOVXZtBstCs694yVg6
+jBHciV80PvM7Fq4UZpuG9ZJTVyDbDhThu79BecNd8ceRwungzlaAfNf03Dab9pvI
+knqjggL8MIIC+DAfBgNVHSMEGDAWgBT2hQo7EYbhBH0Oqgss0u7MZHt7rjAdBgNV
+HQ4EFgQUVCkHH2AasJQFWFs63rdcb6BRvyowDgYDVR0PAQH/BAQDAgeAMAwGA1Ud
+EwEB/wQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEkGA1UdIARC
+MEAwNAYLKwYBBAGyMQECAgcwJTAjBggrBgEFBQcCARYXaHR0cHM6Ly9zZWN0aWdv
+LmNvbS9DUFMwCAYGZ4EMAQIBMIGEBggrBgEFBQcBAQR4MHYwTwYIKwYBBQUHMAKG
+Q2h0dHA6Ly9jcnQuc2VjdGlnby5jb20vU2VjdGlnb0VDQ0RvbWFpblZhbGlkYXRp
+b25TZWN1cmVTZXJ2ZXJDQS5jcnQwIwYIKwYBBQUHMAGGF2h0dHA6Ly9vY3NwLnNl
+Y3RpZ28uY29tMCUGA1UdEQQeMByCDSoubWl2aXRhLmNhcmWCC21pdml0YS5jYXJl
+MIIBfgYKKwYBBAHWeQIEAgSCAW4EggFqAWgAdgDd3Mo0ldfhFgXnlTL6x5/4PRxQ
+39sAOhQSdgosrLvIKgAAAZEMky0iAAAEAwBHMEUCICSH9TLHP8tqMyBTBpxF1+lw
+4wAnWf4E5pPJ6651S8P9AiEAkKqOQDaVdoFI1+jM28grXnG5o0vFLUwa0o49KYQ3
+k+sAdgAN4fIwK9MNwUBiEgnqVS78R3R8sdfpMO8OQh60fk6qNAAAAZEMkyzbAAAE
+AwBHMEUCIFJfJS4cojUm9nHQ1TVlxpFwOV7QwCj9MOfq0CCkVzsGAiEA8WQrE1ri
+kJkeIVPSgUVJpIz8TKef2aR+Ivzkzon52QIAdgAS8U40vVNyTIQGGcOPP3oT+Oe1
+YoeInG0wBYTr5YYmOgAAAZEMkyzBAAAEAwBHMEUCIQCH8/qTmCNea3FdBVk0c3Wu
+FrvYnoQlTQaaDS/zeTxSzwIge6VO5Aeor30Wu675zBYzNsIru5gXOTl4dteBMYnC
+0JswCgYIKoZIzj0EAwIDSAAwRQIhAKxmgpPqW6UAcWHCoWAPN673pBMxnCKn3vFq
+wUkhGrT7AiBDUsDuMhabsGlZ10X2GXcm+1mwxdMLSDYEWiwk5fUaNA==
-----END CERTIFICATE-----";
private static $ssl_certificate_sni_bundle = "-----BEGIN CERTIFICATE-----
MIIDqDCCAy6gAwIBAgIRAPNkTmtuAFAjfglGvXvh9R0wCgYIKoZIzj0EAwMwgYgx
diff --git a/app/Http/Controllers/Api/PayoneController.php b/app/Http/Controllers/Api/PayoneController.php
index 2b51b82..4eca92d 100755
--- a/app/Http/Controllers/Api/PayoneController.php
+++ b/app/Http/Controllers/Api/PayoneController.php
@@ -3,13 +3,17 @@
namespace App\Http\Controllers\Api;
-use App\Http\Controllers\Controller;
-use App\Models\PaymentTransaction;
-use App\Models\ShoppingOrder;
-use App\Models\ShoppingPayment;
-use App\Services\Payment;
use App\Services\Shop;
use App\Services\Util;
+use App\Models\UserAbo;
+use App\Services\MyLog;
+use App\Services\Payment;
+use App\Services\AboHelper;
+use App\Models\ShoppingOrder;
+use App\Models\ShoppingPayment;
+use App\Models\PaymentTransaction;
+use App\Http\Controllers\Controller;
+use App\Services\ShoppingUserService;
class PayoneController extends Controller
@@ -41,47 +45,60 @@ class PayoneController extends Controller
*/
if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){
- \Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data));
- echo "PaymentStatus: parameter incomplete:";
- var_dump($data);
- die();
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2001 App\Http\Controllers\Api\PayoneController::paymentStatus parameter incomplete',
+ $data
+ );
+ print("TSOK");
+ exit;
}
if($data['key'] != config('payone.defaults.key')) {
- \Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
- echo "PaymentStatus: Key error:";
- var_dump($data);
- die();
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2002 App\Http\Controllers\Api\PayoneController::paymentStatus Key error',
+ $data
+ );
+ print("TSOK");
+ exit;
}
-
+
$shopping_order = ShoppingOrder::find($data['param']);
if(!$shopping_order){
- \Log::channel('payone')->error('PaymentStatus: ShoppingOrder not found: '.json_encode($data));
- echo "PaymentStatus: ShoppingOrder not found:";
- var_dump($data);
- die();
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2003 App\Http\Controllers\Api\PayoneController::paymentStatus ShoppingOrder not found:',
+ $data
+ );
+ print("TSOK");
+ exit;
}
$shopping_payment = ShoppingPayment::where('reference', $data['reference'])->first();
if(!$shopping_payment){
- \Log::channel('payone')->error('PaymentStatus: ShoppingPayment not found: '.json_encode($data));
- echo "PaymentStatus: ShoppingPayment not found:";
- var_dump($data);
- die();
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2004 App\Http\Controllers\Api\PayoneController::paymentStatus ShoppingPayment not found',
+ $data
+ );
+ print("TSOK");
+ exit;
}
if($shopping_payment->shopping_order_id != $shopping_order->id){
- \Log::channel('payone')->error('PaymentStatus: ShoppingPayment no realation ShoppingOrder: '.json_encode($data));
- echo "PaymentStatus: ShoppingPayment no realation ShoppingOrder:";
- var_dump($data);
- die();
- }
-
- if($data['key'] != config('payone.defaults.key')) {
- \Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
- echo "PaymentStatus: ShoppingPayment no realation ShoppingOrder:";
- var_dump($data);
- die();
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2005 App\Http\Controllers\Api\PayoneController::paymentStatus ShoppingPayment no realation ShoppingOrder',
+ $data
+ );
+ print("TSOK");
+ exit;
}
$price = number_format((round($data['price'],2) * 100), 0, '.', '');
@@ -89,21 +106,39 @@ class PayoneController extends Controller
if($price_amount != $price){
$data['shopping_payment-amount'] = $price_amount;
$data['price-amount'] = $price;
- \Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data));
- echo "PaymentStatus: Price error:";
- var_dump($data);
- die();
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2006 App\Http\Controllers\Api\PayoneController::paymentStatus Price error',
+ $data
+ );
+ print("TSOK");
+ exit;
}
- /* TODO -- need this?
-
+ /* TODO -- need this? */
if($shopping_payment->txaction == $data['txaction']){
- \Log::channel('payone')->error('PaymentStatus: same txaction error: '.json_encode($data));
- echo "PaymentStatus: same txaction:";
- var_dump($data);
- die();
+
+ if($data['txaction'] === 'paid' && $shopping_order->txaction === 'paid'){
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2007 App\Http\Controllers\Api\PayoneController::paymentStatus same txaction - was already paid',
+ $data
+ );
+ //was already paid
+ print("TSOK");
+ exit;
+ }else{
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'Error:2007 App\Http\Controllers\Api\PayoneController::paymentStatus same txaction - show',
+ $data
+ );
+ }
}
- */
+
//create transaction
PaymentTransaction::create([
'shopping_payment_id' => $shopping_payment->id,
@@ -124,19 +159,19 @@ class PayoneController extends Controller
$send_link = false;
$send_mail = true;
-
if($data['txaction'] === 'failed'){
$shopping_order->setUserHistoryValue(['status' => 6]);
-
+ Util::setInstanceStatusByPayment($shopping_payment, 5);
}
if($data['txaction'] === 'appointed'){
$shopping_order->setUserHistoryValue(['status' => 7]);
- Shop::userOrders();
+ ShoppingUserService::snycOrdersByShoppingOrder($shopping_order);
+ Util::setInstanceStatusByPayment($shopping_payment, 4);
}
if($data['txaction'] === 'paid'){
if(!$shopping_order->paid){
- $send_link = Payment::paymentStatusPaidAction($shopping_order, true);
+ $send_link = Payment::paymentStatusPaidAction($shopping_order, true, $shopping_payment);
}else{
$send_mail = false;
}
diff --git a/app/Http/Controllers/Api/ShoppingUserController.php b/app/Http/Controllers/Api/ShoppingUserController.php
index 24c96f5..f40d7d3 100755
--- a/app/Http/Controllers/Api/ShoppingUserController.php
+++ b/app/Http/Controllers/Api/ShoppingUserController.php
@@ -593,7 +593,7 @@ class ShoppingUserController extends Controller
if ($order->price != ($product->price * 100)) {
$error[] = "different price: " . ($product->price * 100);
}
- $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), (int) $order->qty, $product->price, false, false, ['image' => [], 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]);
+ $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), (int) $order->qty, $product->price, false, false, ['image' => [], 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
Yard::setTax($cartItem->rowId, $product->getTaxWith());
}
}
diff --git a/app/Http/Controllers/BusinessController.php b/app/Http/Controllers/BusinessController.php
index 56e344d..3896bb1 100644
--- a/app/Http/Controllers/BusinessController.php
+++ b/app/Http/Controllers/BusinessController.php
@@ -17,7 +17,7 @@ class BusinessController extends Controller
private $filter_active = [1 => 'aktiv', 2 => 'nicht aktiv', 3 => 'alle'];
private $month;
private $year;
-
+
public function __construct()
{
$this->middleware('admin');
@@ -42,7 +42,7 @@ class BusinessController extends Controller
$TreeCalcBot = new TreeCalcBot($this->month, $this->year, 'admin');
$TreeCalcBot->initStructureAdmin();
-
+
$data = [
'filter_months' => HTMLHelper::getTransMonths(),
'filter_years' => HTMLHelper::getYearRange(),
@@ -61,7 +61,7 @@ class BusinessController extends Controller
$data['year'] = session('business_user_filter_year');
$TreeCalcBot = new TreeCalcBot($data['month'], $data['year'], 'admin');
$TreeCalcBot->initBusinesslUserDetail($user);
- if(!$TreeCalcBot->business_user){
+ if (!$TreeCalcBot->business_user) {
abort(403, 'no user found');
}
return view('admin.business.user_detail', compact('TreeCalcBot', 'user', 'data'));
@@ -82,49 +82,52 @@ class BusinessController extends Controller
//return back();
}
- private function setFilterVars(){
+ private function setFilterVars()
+ {
- if(!session('business_user_filter_month')){
+ if (!session('business_user_filter_month')) {
session(['business_user_filter_month' => intval(date('m'))]);
}
- if(!session('business_user_filter_year')){
+ if (!session('business_user_filter_year')) {
session(['business_user_filter_year' => intval(date('Y'))]);
}
- if(!session('business_user_filter_active')){
+ if (!session('business_user_filter_active')) {
session(['business_user_filter_active' => 1]);
}
- if(!session('business_user_filter_depiction')){
+ if (!session('business_user_filter_depiction')) {
session(['business_user_filter_depiction' => 'active']);
}
- if(Request::get('business_user_filter_depiction')){
+ if (Request::get('business_user_filter_depiction')) {
session(['business_user_filter_depiction' => Request::get('business_user_filter_depiction')]);
}
- if(Request::get('business_user_filter_name')){
+ if (Request::get('business_user_filter_name')) {
session(['business_user_filter_name' => Request::get('business_user_filter_name')]);
+ } else {
+ session(['business_user_filter_name' => '']);
}
- if(Request::get('business_user_filter_active')){
+ if (Request::get('business_user_filter_active')) {
session(['business_user_filter_active' => Request::get('business_user_filter_active')]);
}
- if(Request::get('business_user_filter_month')){
+ if (Request::get('business_user_filter_month')) {
session(['business_user_filter_month' => Request::get('business_user_filter_month')]);
}
- if(Request::get('business_user_filter_year')){
+ if (Request::get('business_user_filter_year')) {
session(['business_user_filter_year' => Request::get('business_user_filter_year')]);
}
}
public function userDatatable()
- {
+ {
$this->month = Request::get('business_user_filter_month');
$this->year = Request::get('business_user_filter_year');
//only the currently month get from Users -> older month from UserBusiness
- return $this->userCurrentlyDatatable();
- if(TreeCalcBot::isFromStored($this->month, $this->year)){
+ return $this->userCurrentlyDatatable();
+ if (TreeCalcBot::isFromStored($this->month, $this->year)) {
return $this->userStoredDatatable();
- }else{
+ } else {
return $this->userCurrentlyDatatable();
}
}
@@ -132,16 +135,16 @@ class BusinessController extends Controller
private function initStoredSearch($archive = false, $request = true)
{
$this->setFilterVars();
-
+
$query = UserBusiness::select('user_businesses.*')->where('month', $this->month)->where('year', $this->year);
- if(Request::get('business_user_filter_active')){
- if(Request::get('business_user_filter_active') == 1){
+ if (Request::get('business_user_filter_active')) {
+ if (Request::get('business_user_filter_active') == 1) {
$query->where('user_businesses.active_account', 1);
}
- if(Request::get('business_user_filter_active') == 2){
+ if (Request::get('business_user_filter_active') == 2) {
$query->where('user_businesses.active_account', 0);
}
- if(Request::get('business_user_filter_active') == 3){
+ if (Request::get('business_user_filter_active') == 3) {
//both -> payment_account only not null
}
}
@@ -149,18 +152,18 @@ class BusinessController extends Controller
}
private function userStoredDatatable()
- {
+ {
$query = $this->initStoredSearch();
return \DataTables::eloquent($query)
->addColumn('id', function (UserBusiness $userBusiness) {
return ' '.
- (config('app.debug') === true ? ' ' : '');
+ data-route="' . route('modal_load') . '"> ' .
+ (config('app.debug') === true ? ' ' : '');
})
->addColumn('m_account', function (UserBusiness $userBusiness) {
return $userBusiness->m_account;
@@ -169,19 +172,19 @@ class BusinessController extends Controller
return $userBusiness->user_level_name;
})
->addColumn('is_qual_kp', function (UserBusiness $userBusiness) {
- if($userBusiness->m_level_id){
+ if ($userBusiness->m_level_id) {
$isQualKP = ($userBusiness->sales_volume_points_sum >= $userBusiness->qual_kp) ? true : false;
- return ' KU '.$userBusiness->qual_kp.' ';
+ return ' KU ' . $userBusiness->qual_kp . ' ';
}
return '-';
})
->addColumn('sales_volume_KP_points', function (UserBusiness $userBusiness) {
- return ''.$userBusiness->sales_volume_points_sum.'
'.
- 'E: '.$userBusiness->sales_volume_KP_points.' | S: '.$userBusiness->sales_volume_points_shop.' ';
+ return '' . $userBusiness->sales_volume_points_sum . '
' .
+ 'E: ' . $userBusiness->sales_volume_KP_points . ' | S: ' . $userBusiness->sales_volume_points_shop . ' ';
})
->addColumn('sales_volume_total', function (UserBusiness $userBusiness) {
- return ''.formatNumber($userBusiness->sales_volume_total_sum).' €
'.
- 'E: '.formatNumber($userBusiness->sales_volume_total).' | S: '.formatNumber($userBusiness->sales_volume_total_shop).' ';
+ return '' . formatNumber($userBusiness->sales_volume_total_sum) . ' €
' .
+ 'E: ' . formatNumber($userBusiness->sales_volume_total) . ' | S: ' . formatNumber($userBusiness->sales_volume_total_shop) . ' ';
})
->addColumn('email', function (UserBusiness $userBusiness) {
return $userBusiness->email;
@@ -193,23 +196,23 @@ class BusinessController extends Controller
return $userBusiness->last_name;
})
->addColumn('sponsor', function (UserBusiness $userBusiness) {
- if($userBusiness->sponsor){
+ if ($userBusiness->sponsor) {
$sponsor = "";
- if($userBusiness->sponsor->is_sponsor){
- $sponsor .= $userBusiness->sponsor->first_name." ".$userBusiness->sponsor->last_name;
- $sponsor .= " ".'sponsor->is_sponsor) {
+ $sponsor .= $userBusiness->sponsor->first_name . " " . $userBusiness->sponsor->last_name;
+ $sponsor .= " " . ' ';
+ data-route="' . route('modal_load') . '"> ';
+
+ $sponsor .= '' . $userBusiness->sponsor->email;
+ $sponsor .= ' | ' . $userBusiness->sponsor->m_account;
+ $sponsor .= ' ';
+ }
- $sponsor .= ''.$userBusiness->sponsor->email;
- $sponsor .= ' | '.$userBusiness->sponsor->m_account;
- $sponsor .= ' ';
- }
-
return $sponsor;
}
return '-';
@@ -222,25 +225,25 @@ class BusinessController extends Controller
return $userBusiness->active_date ? formatDate($userBusiness->active_date) : "-";
})
-
- ->filterColumn('m_account', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("m_account LIKE ?", '%'.$keyword.'%');
- }
- })
- ->filterColumn('first_name', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("first_name LIKE ?", '%'.$keyword.'%');
+
+ ->filterColumn('m_account', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("m_account LIKE ?", '%' . $keyword . '%');
}
})
- ->filterColumn('last_name', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("last_name LIKE ?", '%'.$keyword.'%');
+ ->filterColumn('first_name', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("first_name LIKE ?", '%' . $keyword . '%');
}
})
- ->filterColumn('email', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("email LIKE ?", '%'.$keyword.'%');
+ ->filterColumn('last_name', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("last_name LIKE ?", '%' . $keyword . '%');
+ }
+ })
+ ->filterColumn('email', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("email LIKE ?", '%' . $keyword . '%');
}
})
@@ -253,29 +256,29 @@ class BusinessController extends Controller
->rawColumns(['id', 'is_qual_kp', 'sales_volume_KP_points', 'sales_volume_total', 'sponsor', 'active_account'])
->make(true);
}
-
+
private function initCurrentlySearch($archive = false, $request = true)
{
$this->setFilterVars();
-
- $query = User::join('user_accounts', 'account_id', '=', 'user_accounts.id')
- ->select('users.*', 'user_accounts.m_account', 'user_accounts.first_name', 'user_accounts.last_name')
- ->where('users.deleted_at', '=', null)
- ->where('users.id', '!=', 1)
- ->where('users.admin', "<", 4)
- ->where('users.m_level', "!=", null)
- ->where('users.payment_account', "!=", null);
- // $query = User::with('account')->select('users.*')
-
- if(Request::get('business_user_filter_active')){
- if(Request::get('business_user_filter_active') == 1){
+ $query = User::join('user_accounts', 'account_id', '=', 'user_accounts.id')
+ ->select('users.*', 'user_accounts.m_account', 'user_accounts.first_name', 'user_accounts.last_name')
+ ->where('users.deleted_at', '=', null)
+ ->where('users.id', '!=', 1)
+ ->where('users.admin', "<", 4)
+ ->where('users.m_level', "!=", null)
+ ->where('users.payment_account', "!=", null);
+
+ // $query = User::with('account')->select('users.*')
+
+ if (Request::get('business_user_filter_active')) {
+ if (Request::get('business_user_filter_active') == 1) {
$query->where('users.payment_account', ">=", now());
}
- if(Request::get('business_user_filter_active') == 2){
+ if (Request::get('business_user_filter_active') == 2) {
$query->where('users.payment_account', "<", now());
}
- if(Request::get('business_user_filter_active') == 3){
+ if (Request::get('business_user_filter_active') == 3) {
//both -> payment_account only not null
}
}
@@ -283,18 +286,18 @@ class BusinessController extends Controller
}
private function userCurrentlyDatatable()
- {
+ {
$query = $this->initCurrentlySearch();
return \DataTables::eloquent($query)
->addColumn('id', function (User $user) {
return ' '.
- (config('app.debug') === true ? ' ' : '');
+ data-route="' . route('modal_load') . '"> ' .
+ (config('app.debug') === true ? ' ' : '');
})
->addColumn('m_account', function (User $user) {
return $user->account ? $user->account->m_account : '';
@@ -303,21 +306,21 @@ class BusinessController extends Controller
return $user->user_level ? $user->user_level->getLang('name') : '';
})
->addColumn('is_qual_kp', function (User $user) {
- if($user->user_level){
+ if ($user->user_level) {
$qual_kp = $user->user_level->qual_kp;
$sales_volume_points_sum = $user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_points_KP_sum');
$isQualKP = ($sales_volume_points_sum >= $qual_kp) ? true : false;
- return ' KU '.$qual_kp.' ';
+ return ' KU ' . $qual_kp . ' ';
}
return '-';
- })
- ->addColumn('sales_volume_KP_points', function (User $user) {
- return ''.$user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_points_KP_sum').'
'.
- 'E: '.$user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_KP_points').' | S: '.$user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_points_shop').' ';
+ })
+ ->addColumn('sales_volume_KP_points', function (User $user) {
+ return '' . $user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_points_KP_sum') . '
' .
+ 'E: ' . $user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_KP_points') . ' | S: ' . $user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_points_shop') . ' ';
})
->addColumn('sales_volume_total', function (User $user) {
- return ''.formatNumber($user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_total_sum')).' €
'.
- 'E: '.formatNumber($user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_total')).' | S: '.formatNumber($user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_total_shop')).' ';
+ return '' . formatNumber($user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_total_sum')) . ' €
' .
+ 'E: ' . formatNumber($user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_total')) . ' | S: ' . formatNumber($user->getUserSalesVolumeBy($this->month, $this->year, 'sales_volume_total_shop')) . ' ';
})
->addColumn('email', function (User $user) {
return $user->email;
@@ -329,24 +332,24 @@ class BusinessController extends Controller
return $user->account ? $user->account->last_name : '';
})
->addColumn('sponsor', function (User $user) {
- if($user->user_sponsor){
+ if ($user->user_sponsor) {
$sponsor = "";
- if($user->user_sponsor->account){
- $sponsor .= $user->user_sponsor->account->first_name." ".$user->user_sponsor->account->last_name;
- $sponsor .= " ".'user_sponsor->account) {
+ $sponsor .= $user->user_sponsor->account->first_name . " " . $user->user_sponsor->account->last_name;
+ $sponsor .= " " . ' ';
- }
- $sponsor .= ''.$user->user_sponsor->email;
- if($user->user_sponsor->account){
- $sponsor .= ' | '.$user->user_sponsor->account->m_account;
- }
- $sponsor .= ' ';
-
+ data-route="' . route('modal_load') . '"> ';
+ }
+ $sponsor .= '' . $user->user_sponsor->email;
+ if ($user->user_sponsor->account) {
+ $sponsor .= ' | ' . $user->user_sponsor->account->m_account;
+ }
+ $sponsor .= ' ';
+
return $sponsor;
}
return '-';
@@ -358,25 +361,25 @@ class BusinessController extends Controller
->addColumn('payment_account_date', function (User $user) {
return $user->payment_account ? $user->getPaymentAccountDateFormat(false) : "-";
})
-
- ->filterColumn('m_account', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("m_account LIKE ?", '%'.$keyword.'%');
- }
- })
- ->filterColumn('first_name', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("first_name LIKE ?", '%'.$keyword.'%');
+
+ ->filterColumn('m_account', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("m_account LIKE ?", '%' . $keyword . '%');
}
})
- ->filterColumn('last_name', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("last_name LIKE ?", '%'.$keyword.'%');
+ ->filterColumn('first_name', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("first_name LIKE ?", '%' . $keyword . '%');
}
})
- ->filterColumn('email', function($query, $keyword) {
- if($keyword != ""){
- $query->whereRaw("email LIKE ?", '%'.$keyword.'%');
+ ->filterColumn('last_name', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("last_name LIKE ?", '%' . $keyword . '%');
+ }
+ })
+ ->filterColumn('email', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->whereRaw("email LIKE ?", '%' . $keyword . '%');
}
})
->orderColumn('id', 'm_account $1')
@@ -387,5 +390,5 @@ class BusinessController extends Controller
->orderColumn('active_account', 'payment_account $1')
->rawColumns(['id', 'is_qual_kp', 'sales_volume_KP_points', 'sales_volume_total', 'sponsor', 'active_account'])
->make(true);
- }
-}
\ No newline at end of file
+ }
+}
diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php
index a66ce93..200dbe1 100644
--- a/app/Http/Controllers/CronController.php
+++ b/app/Http/Controllers/CronController.php
@@ -12,13 +12,16 @@ use App\Mail\MailVerifyAccount;
use App\Services\PaymentHelper;
use App\Repositories\UserRepository;
use Illuminate\Support\Facades\Mail;
+use Illuminate\Support\Facades\Log;
class CronController extends Controller
{
-
-
protected $userRepo;
+
+ // Konstanten für bessere Lesbarkeit
+ private const CRON_KEY = 'CqZHL79FwUCcy9pjvi';
+ private const RUN_CRON_KEY = 'G8ZvEbnP8fEPfnWX4L';
/**
* Create a new controller instance.
@@ -28,58 +31,94 @@ class CronController extends Controller
public function __construct(UserRepository $userRepo)
{
$this->userRepo = $userRepo;
-
- // $this->middleware('auth');
+ Log::channel('cron')->info('CronController initialisiert');
}
+ /**
+ * Hauptindex-Methode für Cron-Jobs
+ *
+ * @return string
+ */
public function index()
{
+ Log::channel('cron')->info('Cron-Index aufgerufen');
//$this->checkConfirmation();
//TODO
//SEPA Booking
//Mail reminder
+ return "Cron-Index ausgeführt";
}
- public function action($action = false, $key = false){
-
- if($key !== 'CqZHL79FwUCcy9pjvi'){
+ /**
+ * Führt eine bestimmte Cron-Aktion aus
+ *
+ * @param string|bool $action Die auszuführende Aktion
+ * @param string|bool $key Sicherheitsschlüssel
+ * @return mixed
+ */
+ public function action($action = false, $key = false)
+ {
+ Log::channel('cron')->info('Cron-Aktion aufgerufen: ' . $action);
+
+ if($key !== self::CRON_KEY){
+ Log::channel('cron')->warning('Ungültiger Cron-Key verwendet: ' . $key);
abort(404);
}
+
if($action === 'check_payments_account'){
- $this->checkPaymentsAccounts();
+ Log::channel('cron')->info('Starte Überprüfung der Zahlungskonten');
+ return $this->checkPaymentsAccounts();
}
+
+ Log::channel('cron')->warning('Unbekannte Aktion angefordert: ' . $action);
+ return response('Keine gültige Aktion angegeben', 400);
}
+
/**
- * Show the application dashboard.
+ * Überprüft Benutzerbestätigungen und sendet Erinnerungen
*
- * @return \Illuminate\Http\Response
+ * @return string
*/
public function checkConfirmation()
{
+ Log::channel('cron')->info('Starte Überprüfung der Benutzerbestätigungen');
+
$now = date('Y-m-d H:i:s');
$next = date('Y-m-d H:i:s', strtotime('+3 week'));
$users = User::where('confirmed', '=', 0)->where('confirmation_code_to', '<', $now)->get();
+ Log::channel('cron')->info('Gefundene unbestätigte Benutzer: ' . $users->count());
foreach ($users as $user) {
-
//delete user
if ($user->confirmation_code_remider == 1) {
+ Log::channel('cron')->warning('Lösche unbestätigten Benutzer: ' . $user->email);
$this->userRepo->deleteUser($user);
-
}
//send new remider
if ($user->confirmation_code_remider == 0) {
- Mail::to($user->email)->locale($user->getLocale())->send(new MailVerifyAccount($user->confirmation_code, $user));
- $user->confirmation_code_to = $next;
- $user->confirmation_code_remider = 1;
- $user->save();
+ if(!Util::isTestSystem()){
+ Log::channel('cron')->info('Sende Bestätigungserinnerung an: ' . $user->email);
+ Mail::to($user->email)->locale($user->getLocale())->send(new MailVerifyAccount($user->confirmation_code, $user));
+ $user->confirmation_code_to = $next;
+ $user->confirmation_code_remider = 1;
+ $user->save();
+ } else {
+ Log::channel('cron')->info('Testsystem: Bestätigungserinnerung an: ' . $user->email);
+ }
}
}
return "TOSK";
}
- public function checkPaymentsAccounts(){
+ /**
+ * Überprüft Zahlungskonten und sendet Erinnerungen
+ *
+ * @return string
+ */
+ public function checkPaymentsAccounts()
+ {
+ Log::channel('cron')->info('Starte Überprüfung der Zahlungskonten');
/*RULES
reminders
@@ -93,207 +132,289 @@ class CronController extends Controller
*/
//max Date for reminder
$renewalDate = Carbon::now()->modify('+'.(config('mivita.remind_first_days')+1).' days');
- //dump($renewalDate);
+ Log::channel('cron')->info('Erneuerungsdatum für Zahlungen: ' . $renewalDate->format('Y-m-d H:i:s'));
+
$users = User::where('payment_account', '!=', NULL)
->where('active', '=', 1)
->where('blocked', '!=', 1)
->where('payment_account', '<', $renewalDate)
->get();
- /* $user = User::find(2);
- $this->checkReminderPayments($user);
- dump($user->daysActiveAccount());
- dump($user->email." | ".$user->getPaymentAccountDateFormat());
- die();*/
+ Log::channel('cron')->info('Gefundene Benutzer für Zahlungserinnerungen: ' . $users->count());
+
foreach ($users as $user){
+ Log::channel('cron')->info('Prüfe Zahlungserinnerungen für Benutzer: ' . $user->email);
$this->checkReminderPayments($user);
- /* Abo Option deaktiviert
- $this->userInitAboPayment($user);
- */
}
+
return "TOSK";
}
- private function userInitAboPayment(User $user){
+ /**
+ * Initiiert Abo-Zahlungen für einen Benutzer
+ * hier geht es um die Mitglieschaft Abos - die sind derzeit deaktiviert
+ *
+ * @param User $user Benutzer
+ * @return bool
+ */
+ private function userInitAboPayment(User $user)
+ {
if(!$user->isAcountAboPayDate()){
+ Log::channel('cron')->info('Kein Abo-Zahlungsdatum für Benutzer: ' . $user->email);
return false;
}
+
//user has a open Abo Payment
if($this->checkIsAboPaymentOpen($user)){
+ Log::channel('cron')->info('Offene Abo-Zahlung für Benutzer: ' . $user->email);
return false;
}
+
if($user->payment_order_product){
+ Log::channel('cron')->info('Starte Abo-Zahlung für Benutzer: ' . $user->email);
$this->buyProductAboPayment($user, $user->payment_order_product);
}
- /*dump($user->daysActiveAccount());
- dump($user->email." | ".$user->getPaymentAccountDateFormat());
- dump('-------------------');*/
+
+ return true;
}
- private function checkIsAboPaymentOpen(User $user){
+ /**
+ * Prüft, ob eine offene Abo-Zahlung existiert
+ *
+ * @param User $user Benutzer
+ * @return bool
+ */
+ private function checkIsAboPaymentOpen(User $user)
+ {
$isOpen = UserHistory::whereUserId($user->id)
->whereAction('abo_open_payment')
->whereIdentifier($user->payment_account)
->where('status', '>=', 1) //open //error // payment
->get()->last();
+
if($isOpen){
+ Log::channel('cron')->info('Offene Abo-Zahlung gefunden für: ' . $user->email);
return true;
}
+
return false;
}
- private function checkReminderPayments(User $user){
-
- /* $isSend = $this->checkIsReminderSend($user, 31);
- $isSend = $this->checkIsReminderSend($user, 32);
- $isSend = $this->checkIsReminderSend($user, 33);
- $isSend = $this->checkIsReminderSend($user, 34);
- $isSend = $this->checkIsReminderSend($user, 35);
- $isSend = $this->checkIsReminderSend($user, 36);
- return ;*/
-
+ /**
+ * Prüft und sendet Zahlungserinnerungen basierend auf Benutzerkontostand
+ *
+ * @param User $user Benutzer
+ * @return bool
+ */
+ private function checkReminderPayments(User $user)
+ {
//35 reminder_deaktiv, 36 reminder_deaktiv_sepa
if(!$user->isActiveAccount()){
- /* Abo Option deaktiviert
- if($user->isAboOption()){
- $isSend = $this->checkIsReminderSend($user, 36);
- return $isSend;
- }
- */
+ Log::channel('cron')->info('Inaktives Konto für Benutzer: ' . $user->email);
$isSend = $this->checkIsReminderSend($user, 35);
return $isSend;
}
//34 reminder_last
if($user->daysActiveAccount() <= config('mivita.remind_last_days')){
+ Log::channel('cron')->info('Letzte Erinnerung für Benutzer: ' . $user->email . ' (Tage aktiv: ' . $user->daysActiveAccount() . ')');
$isSend = $this->checkIsReminderSend($user, 34);
return $isSend;
}
//33 reminder_sec
if($user->daysActiveAccount() <= config('mivita.remind_sec_days')){
- /* Abo Option deaktiviert
- if(!$user->isAboOption()){
- $isSend = $this->checkIsReminderSend($user, 33);
- return $isSend;
- }
- */
-
+ Log::channel('cron')->info('Zweite Erinnerung für Benutzer: ' . $user->email . ' (Tage aktiv: ' . $user->daysActiveAccount() . ')');
$isSend = $this->checkIsReminderSend($user, 33);
return $isSend;
}
- //31 reminder_first, 32 reminder_first_sepa
+ //31 reminder_first
if($user->daysActiveAccount() > config('mivita.remind_sec_days')){
- /* Abo Option deaktiviert
- if($user->isAboOption()){
- $isSend = $this->checkIsReminderSend($user, 32);
- return $isSend;
- } */
+ Log::channel('cron')->info('Erste Erinnerung für Benutzer: ' . $user->email . ' (Tage aktiv: ' . $user->daysActiveAccount() . ')');
$isSend = $this->checkIsReminderSend($user, 31);
return $isSend;
}
+
+ return false;
}
- private function checkIsReminderSend(User $user, $status){
-
+ /**
+ * Überprüft, ob eine Erinnerung bereits gesendet wurde
+ *
+ * @param User $user Benutzer
+ * @param int $status Status-Code der Erinnerung
+ * @return bool
+ */
+ private function checkIsReminderSend(User $user, $status)
+ {
$isSend = UserHistory::whereUserId($user->id)
->whereAction('reminder_payments')
->whereIdentifier($user->payment_account)
->whereStatus($status)
- ->get()->last();
+ ->latest()
+ ->first();
if($isSend){
+ Log::channel('cron')->info('Erinnerung bereits gesendet für Benutzer: ' . $user->email . ' (Status: ' . $status . ')');
return true;
}
+
+ Log::channel('cron')->info('Sende neue Erinnerung für Benutzer: ' . $user->email . ' (Status: ' . $status . ')');
$referenz = $this->sendReminderMail($user, $status);
+
//is not sent create
- UserHistory::create(['user_id' => $user->id, 'action'=>'reminder_payments', 'referenz'=>$referenz, 'identifier'=>$user->payment_account, 'status'=>$status]);
+ UserHistory::create([
+ 'user_id' => $user->id,
+ 'action' => 'reminder_payments',
+ 'referenz' => $referenz,
+ 'identifier' => $user->payment_account,
+ 'status' => $status
+ ]);
+
return false;
-
}
- private function sendReminderMail(User $user, $status){
-
- $days = $user->daysActiveAccount();
- if($days < 0){
- $days = $days*-1;
- }
-
- //dump($days);
- //dump($status);
- $pay_date = Carbon::parse($user->payment_account)->modify('- '.config('mivita.abo_booking_days').' days')->format('d.m.Y');
+ /**
+ * Sendet eine Erinnerungs-E-Mail an den Benutzer
+ *
+ * @param User $user Benutzer
+ * @param int $status Status-Code der Erinnerung
+ * @return int
+ */
+ private function sendReminderMail(User $user, $status)
+ {
+ $days = abs($user->daysActiveAccount());
+
+ $pay_date = Carbon::parse($user->payment_account)
+ ->modify('- ' . config('mivita.abo_booking_days') . ' days')
+ ->format('d.m.Y');
+
$datetime = $user->getPaymentAccountDateFormat();
$price = "";
+
if($user->payment_order_id && isset($user->payment_order_product->price)){
- $price = 'von '.$user->payment_order_product->getFormattedPrice().' EUR';
+ $price = 'von ' . $user->payment_order_product->getFormattedPrice() . ' EUR';
}
- $message = __('reminder.copy_first_'.$status, ['days'=>$days, 'datetime'=>$datetime, 'price' =>$price, 'pay_date'=>$pay_date]);
- $message_last = __('reminder.copy_last_'.$status, ['days'=>$days, 'datetime'=>$datetime, 'price' =>$price, 'pay_date'=>$pay_date]);
- $button = __('reminder.button_'.$status);
+ $message = __('reminder.copy_first_' . $status, [
+ 'days' => $days,
+ 'datetime' => $datetime,
+ 'price' => $price,
+ 'pay_date' => $pay_date
+ ]);
+
+ $message_last = __('reminder.copy_last_' . $status, [
+ 'days' => $days,
+ 'datetime' => $datetime,
+ 'price' => $price,
+ 'pay_date' => $pay_date
+ ]);
+
+ $button = __('reminder.button_' . $status);
- $message = preg_replace("/[\n\r]/","",$message);
- $message_last = preg_replace("/[\n\r]/","",$message_last);
+ $message = preg_replace("/[\n\r]/", "", $message);
+ $message_last = preg_replace("/[\n\r]/", "", $message_last);
$data = [
- 'subject' => __('reminder.subject')." | ID: ".$status,
+ 'subject' => __('reminder.subject') . " | ID: " . $status,
'message' => $message,
'message_last' => $message_last,
'url' => route('user_membership'),
'button' => $button,
];
- //dump($data);
$sender = User::find(1);
$customer_mail = UserMessage::create([
- 'user_id' => $user->id,
+ 'user_id' => $user->id,
'send_user_id' => $sender->id,
'email' => $user->email,
'subject' => $data['subject'],
- 'message' => $data['message']." ".$data['message_last'],
+ 'message' => $data['message'] . " " . $data['message_last'],
]);
- try{
- if($status >= 34){
- Mail::to($user->email)->locale($user->getLocale())->bcc(config('app.default_mail'))->send(new MailCustomMessage($user, $data, $sender, false));
- }else{
- Mail::to($user->email)->locale($user->getLocale())->send(new MailCustomMessage($user, $data, $sender, false));
+
+ try {
+ if(!Util::isTestSystem()){
+ if($status >= 34){
+ Log::channel('cron')->info('Sende kritische Erinnerung mit BCC an: ' . $user->email);
+ Mail::to($user->email)
+ ->locale($user->getLocale())
+ ->bcc(config('app.default_mail'))
+ ->send(new MailCustomMessage($user, $data, $sender, false));
+ } else {
+ Log::channel('cron')->info('Sende normale Erinnerung an: ' . $user->email);
+ Mail::to($user->email)
+ ->locale($user->getLocale())
+ ->send(new MailCustomMessage($user, $data, $sender, false));
+ }
+ } else {
+ Log::channel('cron')->info('Testsystem: E-Mail-Versand simuliert für: ' . $user->email);
}
- }
- catch(\Exception $e){
- \Log::channel('cron')->error('Mail Error: '.$e->getMessage());
- // Never reached
+ } catch(\Exception $e) {
+ Log::channel('cron')->error('Mail-Fehler für Benutzer ' . $user->email . ': ' . $e->getMessage());
+
$customer_mail->fail = true;
$customer_mail->error = $e->getMessage();
$customer_mail->save();
+
return 0;
}
+
$customer_mail->send = true;
$customer_mail->sent_at = now();
$customer_mail->save();
+
+ Log::channel('cron')->info('Erinnerungsmail erfolgreich gesendet an: ' . $user->email);
return 1;
}
- private function buyProductAboPayment($user, $product){
+ /**
+ * Kauft ein Produkt mit Abo-Zahlung
+ *
+ * @param User $user Benutzer
+ * @param object $product Produkt
+ * @return void
+ */
+ private function buyProductAboPayment($user, $product)
+ {
+ Log::channel('cron')->info('Starte Abo-Produktkauf für Benutzer: ' . $user->email);
$paymentHelper = new PaymentHelper();
$paymentHelper->setProduct($product);
$paymentHelper->initELVPayment($user);
+ Log::channel('cron')->info('Abo-Produktkauf abgeschlossen für: ' . $user->email);
}
-
+ /**
+ * Führt das Cron-Script aus
+ *
+ * @param string $key Sicherheitsschlüssel
+ * @return \Illuminate\Http\Response
+ */
public function runCron($key)
{
- if($key !== 'G8ZvEbnP8fEPfnWX4L'){
+ Log::channel('cron')->info('Cron-Script-Ausführung angefordert');
+
+ if($key !== self::RUN_CRON_KEY){
+ Log::channel('cron')->warning('Ungültiger Cron-Script-Key verwendet: ' . $key);
abort(404);
}
- if(Util::isTestSystem()){
- exec("/bin/bash ../cron_script_local.sh 2>&1", $out, $result);
- }else{
- exec("/bin/bash ../cron_script_server.sh 2>&1", $out, $result);
- }
- echo "Returncode: " .$result ." ";
- echo "Ausgabe des Scripts: " ." ";
+
+ $scriptPath = Util::isTestSystem() ? '../cron_script_local.sh' : '../cron_script_server.sh';
+ Log::channel('cron')->info('Führe Script aus: ' . $scriptPath);
+
+ exec("/bin/bash {$scriptPath} 2>&1", $out, $result);
+
+ Log::channel('cron')->info('Cron-Script-Ausführung abgeschlossen mit Code: ' . $result);
+
+ echo "Returncode: " . $result . " ";
+ echo "Ausgabe des Scripts: " . " ";
echo ""; print_r($out);
+
+ exit;
+
+ /*return response()->view('cron.result', [
+ 'result' => $result,
+ 'output' => $out
+ ]);*/
}
-
}
\ No newline at end of file
diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php
index bff2ead..9b1d3a3 100755
--- a/app/Http/Controllers/CustomerController.php
+++ b/app/Http/Controllers/CustomerController.php
@@ -84,7 +84,7 @@ class CustomerController extends Controller
\Session()->flash('alert-save', true);
return redirect(route('admin_customer_detail', [$shopping_user->id]));
}
- if ($data['action'] === 'shopping-user-store') {
+ if($data['action'] === 'shopping-user-store') {
$rules = array(
'billing_salutation' => 'required',
'billing_firstname'=>'required',
diff --git a/app/Http/Controllers/FileController.php b/app/Http/Controllers/FileController.php
index b772f05..d0908d7 100644
--- a/app/Http/Controllers/FileController.php
+++ b/app/Http/Controllers/FileController.php
@@ -128,7 +128,7 @@ class FileController extends Controller
if(!Storage::disk($disk)->exists($path)){
- // return Response::make('File no found.', 404);
+ return Response::make('Datei nicht gefunden.', 404);
}
$file = Storage::disk($disk)->get($path);
$mime = Storage::disk($disk)->mimeType($path);
diff --git a/app/Http/Controllers/ImportProductController.php b/app/Http/Controllers/ImportProductController.php
index 0c6f75f..20948b9 100755
--- a/app/Http/Controllers/ImportProductController.php
+++ b/app/Http/Controllers/ImportProductController.php
@@ -2,11 +2,12 @@
namespace App\Http\Controllers;
+use Image;
+use Request;
+use Validator;
use App\Models\Product;
use App\Models\ProductImage;
use App\Repositories\ProductRepository;
-use Request;
-use Validator;
@@ -23,6 +24,7 @@ class ImportProductController extends Controller
public function import(){
+ dd('nicht aktiv, wenn muss geprüft werden, ob die funktion IMAGE existieren');
$path = app_path().'/../_static/products/';
include($path.'_all_products.php');
@@ -73,7 +75,7 @@ class ImportProductController extends Controller
$name = \App\Services\Slim::sanitizeFileName($image['image']);
$name = uniqid() . '_' . $name;
- $img = \Image::make($i_path);
+ $img = Image::make($i_path);
$img->resize(600, 800, function ($c) {
// $c->aspectRatio();
$c->upsize();
diff --git a/app/Http/Controllers/IngredientController.php b/app/Http/Controllers/IngredientController.php
index 9dd2703..bd4ad8f 100755
--- a/app/Http/Controllers/IngredientController.php
+++ b/app/Http/Controllers/IngredientController.php
@@ -7,7 +7,7 @@ use App\Models\Ingredient;
use App\Models\IqImage;
use App\Models\ProductCategory;
use App\Models\ProductIngredient;
-use\Request;
+use Request;
class IngredientController extends Controller
diff --git a/app/Http/Controllers/LeadController.php b/app/Http/Controllers/LeadController.php
index 6a0a930..cd326e5 100755
--- a/app/Http/Controllers/LeadController.php
+++ b/app/Http/Controllers/LeadController.php
@@ -198,6 +198,9 @@ class LeadController extends Controller
'city' => 'required',
'email' => 'required|string|email|max:255|exists:users,email',
'email-confirm' => 'required|same:email',
+ 'bank_owner' => 'required',
+ 'bank_iban' => 'required',
+ 'bank_bic' => 'required',
);
if(!Request::get('same_as_billing')){
$rules = array_merge($rules, [
diff --git a/app/Http/Controllers/ModalController.php b/app/Http/Controllers/ModalController.php
index 52ac244..f84ff36 100644
--- a/app/Http/Controllers/ModalController.php
+++ b/app/Http/Controllers/ModalController.php
@@ -5,9 +5,10 @@ namespace App\Http\Controllers;
use Request;
use App\User;
use App\Models\Product;
+use App\Models\UserAbo;
use App\Models\Homeparty;
-use App\Models\UserLevel;
+use App\Models\UserLevel;
use App\Models\UserCredit;
use App\Models\ShoppingUser;
use App\Services\HTMLHelper;
@@ -99,7 +100,7 @@ class ModalController extends Controller
$homeparty = Homeparty::find($data['id']);
$homeparty_user = HomepartyUser::find($data['user_id']);
$data['homeparty'] = $homeparty;
- $ret = view("user.homeparty.modal_show_products", compact( 'data', 'homeparty', 'homeparty_user'))->render();
+ $ret = view("user.homeparty.modal_hp_show_products", compact( 'data', 'homeparty', 'homeparty_user'))->render();
}
if($data['action'] === 'user-level-edit'){
@@ -153,6 +154,20 @@ class ModalController extends Controller
$UserCredit = UserCredit::find($data['id']); //current user form order
$ret = view("admin.payment.modal_credit_status", compact('UserCredit', 'data'))->render();
}
+ if($data['action'] === 'abo_update_settings'){
+ $user_abo = UserAbo::find($data['id']);
+ if($data['view'] === 'admin'){
+ $route = route('admin_abos_update', [$user_abo->id]);
+ }else{
+ $route = route('user_abos_update', [$data['view'], $user_abo->id]);
+ }
+ $ret = view("admin.abo.modal_abo_update", compact('user_abo', 'data', 'route'))->render();
+ }
+ if($data['action'] === 'abo-add-product') {
+ $user_abo = UserAbo::find($data['id']);
+ $ret = view("user.abo.modal_abo_show_products", compact( 'data', 'user_abo'))->render();
+ }
+
}
return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]);
}
diff --git a/app/Http/Controllers/Pay/PayoneController.php b/app/Http/Controllers/Pay/PayoneController.php
index 9745924..4636059 100644
--- a/app/Http/Controllers/Pay/PayoneController.php
+++ b/app/Http/Controllers/Pay/PayoneController.php
@@ -79,7 +79,48 @@ class PayoneController extends Controller
public function getShoppingPayment(){
return $this->shopping_payment;
}
+ public function setAboPayment($user_abo, $amount, $currency){
+ $this->reference = substr(uniqid('m', false), 0, 16);
+ $this->method = [
+ "clearingtype" => $user_abo->clearingtype,
+ "wallettype" => $user_abo->wallettype,
+ "pseudocardpan" => isset($user_abo->carddata['pseudocardpan']) ? $user_abo->carddata['pseudocardpan'] : '',
+ "cardexpiredate" => isset($user_abo->carddata['cardexpiredate']) ? $user_abo->carddata['cardexpiredate'] : '',
+ 'userid' => $user_abo->payone_userid,
+ 'onlinebanktransfertype' => '',
+ "request" => "authorization",
+ ];
+
+
+ $this->aboInitPayment = [
+ 'recurrence'=>'recurring',
+ 'customer_is_present'=>'no',
+ 'request' => 'authorization',
+ 'amount' => $amount
+ ];
+
+ $this->prepayment = [
+ "reference" => $this->reference, // a unique reference, e.g. order number
+ "amount" => $amount, // amount in smallest currency unit, i.e. cents
+ "currency" => $currency,
+ "param" => $this->shopping_order->id,
+ ];
+
+ $this->shopping_payment = ShoppingPayment::create([
+ 'shopping_order_id' => $this->shopping_order->id,
+ 'clearingtype' => $this->method["clearingtype"],
+ 'wallettype' => $this->method["wallettype"],
+ 'onlinebanktransfertype' => $this->method["onlinebanktransfertype"],
+ 'carddata' => $user_abo->carddata,
+ 'reference' => $this->reference,
+ 'amount' => $amount,
+ 'currency' => $currency,
+ 'is_abo' => $this->shopping_order->is_abo,
+ 'abo_interval' => 0,
+ 'mode' => $this->shopping_order->mode,
+ ]);
+ }
//make Payone payment
public function setPrePayment($payment_method, $amount, $currency, $ret = []){
@@ -87,7 +128,7 @@ class PayoneController extends Controller
$this->setMethod($payment_method, $ret);
$this->urls = [
- 'successurl' => route('checkout.transaction_status', ['success', $this->reference]),
+ 'successurl' => route('checkout.transaction_status', ['success', $this->reference]),
'errorurl' => route('checkout.transaction_status', ['error', $this->reference]),
'backurl' => route('checkout.transaction_status', ['cancel', $this->reference]),
];
@@ -100,10 +141,30 @@ class PayoneController extends Controller
];
//init Abo
if($this->shopping_order->is_abo){
- $this->aboInitPayment = [
- 'recurrence'=>'recurring',
- 'customer_is_present'=>'yes'
- ];
+ if($this->method["clearingtype"] === "cc"){
+ $this->aboInitPayment = [
+ 'recurrence'=>'recurring',
+ 'customer_is_present'=>'yes',
+ 'request' => 'authorization',
+ 'amount' => $amount,
+ ];
+ $this->method['request'] = 'authorization';
+
+ }
+
+ if($this->method["clearingtype"] === "wlt"){
+ //payment for Abo PayPal
+ $this->aboInitPayment = [
+ 'recurrence'=>'recurring',
+ 'customer_is_present'=>'yes',
+ 'request' => 'authorization',
+ 'amount' => $amount,
+ 'add_paydata[redirection_mode]' => 'DIRECT_TO_MERCHANT',
+ ];
+ $this->setDeliverylData($this->shopping_user);
+ $this->method['request'] = 'authorization';
+ }
+
}
$this->shopping_payment = ShoppingPayment::create([
@@ -111,11 +172,13 @@ class PayoneController extends Controller
'clearingtype' => $this->method["clearingtype"],
'wallettype' => $this->method["wallettype"],
'onlinebanktransfertype' => $this->method["onlinebanktransfertype"],
+ 'carddata' => isset($ret['cc']) ? $ret['cc'] : null,
'reference' => $this->reference,
'amount' => $amount,
'currency' => $currency,
'is_abo' => $this->shopping_order->is_abo,
'abo_interval' => $this->shopping_order->abo_interval,
+ 'identifier' => Util::getUserShopIdentifier(),
'mode' => $this->shopping_order->mode,
]);
@@ -163,6 +226,8 @@ class PayoneController extends Controller
'onlinebanktransfertype' => "",
"request" => "authorization"
];
+
+
}
//Online-Überweisung
if($payment_method[0] === 'sb'){
@@ -240,17 +305,17 @@ class PayoneController extends Controller
}
public function onlyPaymentResponse(){
- $request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->aboInitPayment, $this->prepayment, $this->urls);
+ $request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->aboInitPayment, $this->urls);
$response = Payone::sendRequest($request);
return $response;
}
- public function ResponseData(){
+ public function ResponseData($is_abo = false){
- $request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->aboInitPayment, $this->prepayment, $this->urls);
+ $request = array_merge($this->default, $this->personalData, $this->deliveryData, $this->method, $this->prepayment, $this->aboInitPayment, $this->urls);
+ //dd($request);
//RECHNUNG MIV
if($this->shopping_payment->clearingtype === 'fnc' && $this->shopping_payment->onlinebanktransfertype === 'MIV'){
-
$payt = PaymentTransaction::create([
'shopping_payment_id' => $this->shopping_payment->id,
'request' => $this->method['request'],
@@ -262,6 +327,9 @@ class PayoneController extends Controller
'mode' => $this->shopping_payment->mode,
]);
Util::setUserHistoryValue(['status'=>5]);
+ if($is_abo){
+ return $this->reference;
+ }
return redirect(route('checkout.transaction_approved', [$payt->id, $this->reference]));
exit;
}
@@ -271,6 +339,12 @@ class PayoneController extends Controller
* status APPROVED / REDIRECT / ERROR / PENDING
*/
if($response['status'] === 'ERROR'){
+ MyLog::writeLog(
+ 'payone',
+ 'error',
+ 'PayPal Preauthorization Fehler: ' . $response['errormessage'],
+ $response
+ );
PaymentTransaction::create([
'shopping_payment_id' => $this->shopping_payment->id,
'request' => $this->method['request'],
@@ -281,6 +355,9 @@ class PayoneController extends Controller
'mode' => $this->shopping_payment->mode,
]);
Util::setUserHistoryValue(['status'=>3]);
+ if($is_abo){
+ return $response;
+ }
\Session::flash('errormessage', $response['errormessage']);
\Session::flash('customermessage', $response['customermessage']);
return redirect(route('checkout.checkout_card'));
@@ -298,6 +375,9 @@ class PayoneController extends Controller
]);
Util::setUserHistoryValue(['status'=>4]);
+ if($is_abo){
+ return $response;
+ }
return redirect()->away($response["redirecturl"]);
exit;
@@ -316,6 +396,9 @@ class PayoneController extends Controller
]);
Util::setUserHistoryValue(['status'=>5]);
+ if($is_abo){
+ return $response;
+ }
if($payt->shopping_payment->clearingtype === "vor"){
//vorkasse
@@ -335,7 +418,6 @@ class PayoneController extends Controller
exit;
}
-
var_dump($response);
die();
//txid
@@ -407,6 +489,27 @@ class PayoneController extends Controller
return Payone::sendRequest($request);
}
+ public function setDeliverylData($shopping_user){
+ if($shopping_user->same_as_billing == true){
+ $this->deliveryData = [
+ 'shipping_firstname' => $shopping_user->billing_firstname,
+ 'shipping_lastname' => $shopping_user->billing_lastname,
+ 'shipping_zip' => $shopping_user->billing_zipcode,
+ 'shipping_city' => $shopping_user->billing_city,
+ 'shipping_country' => $shopping_user->billing_country->code,
+ 'shipping_street' => $shopping_user->billing_address,
+ ];
+ }else{
+ $this->deliveryData = [
+ 'shipping_firstname' => $shopping_user->shipping_firstname,
+ 'shipping_lastname' => $shopping_user->shipping_lastname,
+ 'shipping_zip' => $shopping_user->shipping_zipcode,
+ 'shipping_city' => $shopping_user->shipping_city,
+ 'shipping_country' => $shopping_user->shipping_country->code,
+ 'shipping_street' => $shopping_user->shipping_address,
+ ];
+ }
+ }
/* public function getPDFFile($mandateId)
{
@@ -492,17 +595,7 @@ class PayoneController extends Controller
- public function setDeliverylData($data){
- $this->deliveryData = [
- "shipping_company" => "Mr.",
- "shipping_firstname" => "Henry",
- "shipping_lastname" => "Tudor",
- "shipping_street" => "Royal Street 1",
- "shipping_zip" => "24118",
- "shipping_city" => "Kiel",
- "shipping_country" => "DE",
- ];
- }
+
*/
diff --git a/app/Http/Controllers/PaymentCreditController.php b/app/Http/Controllers/PaymentCreditController.php
index 41b88f3..8294188 100644
--- a/app/Http/Controllers/PaymentCreditController.php
+++ b/app/Http/Controllers/PaymentCreditController.php
@@ -41,24 +41,25 @@ class PaymentCreditController extends Controller
}
- public function store(){
+ public function store()
+ {
$data = Request::all();
- if(isset($data['action']) && $data['action'] === 'add-user-credit'){
- if(!isset($data['member_id']) || !$user = User::find($data['member_id'])){
+ if (isset($data['action']) && $data['action'] === 'add-user-credit') {
+ if (!isset($data['member_id']) || !$user = User::find($data['member_id'])) {
\Session()->flash('alert-error', 'Vertriebspartner nicht gefunden');
return back();
}
- if(!isset($data['credit'])){
+ if (!isset($data['credit'])) {
\Session()->flash('alert-error', 'Bitte Betrag eingeben');
return back();
}
- if(!isset($data['message'])){
+ if (!isset($data['message'])) {
\Session()->flash('alert-error', 'Bitte Betreff eingeben');
return back();
}
$credit = Util::reFormatNumber($data['credit']);
- $credit = number_format($credit, 2, '.', '');
+ $credit = number_format($credit, 2, '.', '');
Payment::addUserCreditMargin($user, $credit, 3, $data['message']);
\Session()->flash('alert-success', "Guthaben hinzugefügt");
}
@@ -66,11 +67,12 @@ class PaymentCreditController extends Controller
return redirect(route('admin_payments_credit'));
}
- public function create(){
+ public function create()
+ {
$data = Request::all();
- if(isset($data['action'])){
- if($data['action'] === 'create_credit'){
- if(!isset($data['userid'])){
+ if (isset($data['action'])) {
+ if ($data['action'] === 'create_credit') {
+ if (!isset($data['userid'])) {
abort(404);
}
$user = User::findOrFail($data['userid']);
@@ -79,7 +81,7 @@ class PaymentCreditController extends Controller
\Session()->flash('alert-success', "Gutschrift erstellt");
return redirect($data['back']);
}
- if($data['action'] === 'user-credit-status'){
+ if ($data['action'] === 'user-credit-status') {
$UserCredit = UserCredit::findOrFail($data['id']);
$UserCredit->status = $data['status'];
$UserCredit->save();
@@ -89,34 +91,38 @@ class PaymentCreditController extends Controller
}
}
- private function setFilterVars(){
- if(!session('credit_filter_month')){
+ private function setFilterVars()
+ {
+ if (!session('credit_filter_month')) {
session(['credit_filter_month' => intval(date('m'))]);
}
- if(!session('credit_filter_year')){
+ if (!session('credit_filter_year')) {
session(['credit_filter_year' => intval(date('Y'))]);
}
- if(Request::get('credit_filter_name')){
+ if (Request::get('credit_filter_name')) {
session(['credit_filter_name' => Request::get('credit_filter_name')]);
+ } else {
+ session(['credit_filter_name' => '']);
}
- if(Request::get('credit_filter_month')){
+ if (Request::get('credit_filter_month')) {
session(['credit_filter_month' => Request::get('credit_filter_month')]);
}
- if(Request::get('credit_filter_year')){
+ if (Request::get('credit_filter_year')) {
session(['credit_filter_year' => Request::get('credit_filter_year')]);
}
}
- private function makeUserCreditItems(){
+ private function makeUserCreditItems()
+ {
$ret = [];
$UserCreditItems = UserCreditItem::wherePaid(false)->get();
- foreach($UserCreditItems as $userCreditItem){
- if(isset($ret[$userCreditItem->user_id])){
+ foreach ($UserCreditItems as $userCreditItem) {
+ if (isset($ret[$userCreditItem->user_id])) {
$ret[$userCreditItem->user_id]['sum'] += $userCreditItem->credit;
$ret[$userCreditItem->user_id]['entries'][$userCreditItem->id] = $userCreditItem;
- }else{
- if(!isset($userCreditItem->user)){
- /* gelöschte User nicht anzeigen
+ } else {
+ if (!isset($userCreditItem->user)) {
+ /* gelöschte User nicht anzeigen
$user = User::withTrashed()->with(['account' => fn($q) => $q->withTrashed()])->where('id', $userCreditItem->user_id)->first();
$ret[$userCreditItem->user_id] = [
'user_id' => $userCreditItem->user_id,
@@ -128,7 +134,7 @@ class PaymentCreditController extends Controller
'entries' => [$userCreditItem->id => $userCreditItem],
];
*/
- }else{
+ } else {
$ret[$userCreditItem->user_id] = [
'user_id' => $userCreditItem->user_id,
'm_account' => $userCreditItem->user->account->m_account,
@@ -138,20 +144,21 @@ class PaymentCreditController extends Controller
'sum' => $userCreditItem->credit,
'entries' => [$userCreditItem->id => $userCreditItem],
];
- }
- }
+ }
+ }
}
return $ret;
- }
+ }
- public function delete($id, $del){
+ public function delete($id, $del)
+ {
- if($del === 'user_credit_item'){
+ if ($del === 'user_credit_item') {
$UserCreditItem = UserCreditItem::findOrFail($id);
- if($deleteTime = $UserCreditItem->deleteTime()){
+ if ($deleteTime = $UserCreditItem->deleteTime()) {
$UserCreditItem->delete();
\Session()->flash('alert-success', "Guthaben ist gelöscht");
- }else{
+ } else {
\Session()->flash('alert-error', "Guthaben kann nicht gelöscht werden");
}
}
@@ -160,24 +167,25 @@ class PaymentCreditController extends Controller
private function initSearch($archive = false, $request = true)
{
-
+
$this->setFilterVars();
- $date_start = Carbon::parse('01.'.Request::get('credit_filter_month').'.'.Request::get('credit_filter_year'))->format('Y-m-d');
- $date_end = Carbon::parse('01.'.Request::get('credit_filter_month').'.'.Request::get('credit_filter_year'))->endOfMonth()->format('Y-m-d');
+ $date_start = Carbon::parse('01.' . Request::get('credit_filter_month') . '.' . Request::get('credit_filter_year'))->format('Y-m-d');
+ $date_end = Carbon::parse('01.' . Request::get('credit_filter_month') . '.' . Request::get('credit_filter_year'))->endOfMonth()->format('Y-m-d');
$query = UserCredit::with('user', 'user.account')->select('user_credits.*')
- ->whereBetween('date', [$date_start, $date_end]);
-
- if(Request::get('credit_filter_name')){
+ ->whereBetween('date', [$date_start, $date_end]);
+
+ if (Request::get('credit_filter_name')) {
$query->whereHas('user.account', function ($query) {
- return $query->where('first_name', 'LIKE', '%'.Request::get('credit_filter_name').'%')
- ->orWhere('last_name', 'LIKE', '%'.Request::get('credit_filter_name').'%');
- });
+ return $query->where('first_name', 'LIKE', '%' . Request::get('credit_filter_name') . '%')
+ ->orWhere('last_name', 'LIKE', '%' . Request::get('credit_filter_name') . '%');
+ });
}
return $query;
}
- public function datatable(){
+ public function datatable()
+ {
$query = $this->initSearch();
@@ -194,57 +202,54 @@ class PaymentCreditController extends Controller
})
->addColumn('view', function (UserCredit $UserCredit) {
$ret = "";
- if($UserCredit->isCredit()){
- $ret .= ' ';
- $ret .= ' ';
+ if ($UserCredit->isCredit()) {
+ $ret .= ' ';
+ $ret .= ' ';
- $ret .= ' ';
- $ret .= ' ';
-
-
- }else{
+ $ret .= ' ';
+ $ret .= ' ';
+ } else {
$ret = "-";
}
return $ret;
})
->addColumn('total', function (UserCredit $UserCredit) {
- return ''.$UserCredit->getFormattedTotal()." € ";
+ return '' . $UserCredit->getFormattedTotal() . " € ";
})
->addColumn('credits', function (UserCredit $UserCredit) {
$ret = "";
- if($UserCredit->user_credit_items){
- foreach($UserCredit->user_credit_items as $user_credit_item){
- $ret .= nl2br($user_credit_item->getTransMessage())." / ".$user_credit_item->created_at->format('d.m.Y')." ";
-
+ if ($UserCredit->user_credit_items) {
+ foreach ($UserCredit->user_credit_items as $user_credit_item) {
+ $ret .= nl2br($user_credit_item->getTransMessage()) . " / " . $user_credit_item->created_at->format('d.m.Y') . " ";
}
}
return $ret;
})
->addColumn('status', function (UserCredit $UserCredit) {
return '
- '.$UserCredit->getStatusType().'
+ data-id="' . $UserCredit->id . '" data-route="' . route('modal_load') . '" data-action="user-credit-status" data-view="">
+ ' . $UserCredit->getStatusType() . '
';
})
- ->filterColumn('user.account.first_name', function($query, $keyword) {
- if($keyword != ""){
+ ->filterColumn('user.account.first_name', function ($query, $keyword) {
+ if ($keyword != "") {
$query->whereHas('user.account', function ($query) use ($keyword) {
- return $query->where('first_name', 'LIKE', '%'.$keyword.'%');
+ return $query->where('first_name', 'LIKE', '%' . $keyword . '%');
});
}
})
- ->filterColumn('user.account.last_name', function($query, $keyword) {
- if($keyword != ""){
+ ->filterColumn('user.account.last_name', function ($query, $keyword) {
+ if ($keyword != "") {
$query->whereHas('user.account', function ($query) use ($keyword) {
- return $query->where('last_name', 'LIKE', '%'.$keyword.'%');
+ return $query->where('last_name', 'LIKE', '%' . $keyword . '%');
});
}
})
- ->filterColumn('user.email', function($query, $keyword) {
- if($keyword != ""){
+ ->filterColumn('user.email', function ($query, $keyword) {
+ if ($keyword != "") {
$query->whereHas('user', function ($query) use ($keyword) {
- return $query->where('email', 'LIKE', '%'.$keyword.'%');
+ return $query->where('email', 'LIKE', '%' . $keyword . '%');
});
}
})
@@ -254,4 +259,4 @@ class PaymentCreditController extends Controller
->rawColumns(['total', 'credits', 'status', 'view'])
->make(true);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/PaymentInvoiceController.php b/app/Http/Controllers/PaymentInvoiceController.php
index 3285a1f..f4fffe8 100644
--- a/app/Http/Controllers/PaymentInvoiceController.php
+++ b/app/Http/Controllers/PaymentInvoiceController.php
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
+
use Carbon;
use Request;
use App\Services\Payment;
@@ -19,7 +20,7 @@ class PaymentInvoiceController extends Controller
public function index()
{
-
+
$this->setFilterVars();
$data = [
'filter_months' => HTMLHelper::getTransMonths(),
@@ -28,21 +29,24 @@ class PaymentInvoiceController extends Controller
return view('admin.payment.invoice', $data);
}
- private function setFilterVars(){
+ private function setFilterVars()
+ {
- if(!session('invoice_filter_month')){
+ if (!session('invoice_filter_month')) {
session(['invoice_filter_month' => intval(date('m'))]);
}
- if(!session('invoice_filter_year')){
+ if (!session('invoice_filter_year')) {
session(['invoice_filter_year' => intval(date('Y'))]);
}
- if(Request::get('invoice_filter_name')){
+ if (Request::get('invoice_filter_name')) {
session(['invoice_filter_name' => Request::get('invoice_filter_name')]);
+ } else {
+ session(['invoice_filter_name' => '']);
}
- if(Request::get('invoice_filter_month')){
+ if (Request::get('invoice_filter_month')) {
session(['invoice_filter_month' => Request::get('invoice_filter_month')]);
}
- if(Request::get('invoice_filter_year')){
+ if (Request::get('invoice_filter_year')) {
session(['invoice_filter_year' => Request::get('invoice_filter_year')]);
}
}
@@ -50,53 +54,53 @@ class PaymentInvoiceController extends Controller
private function initSearch($archive = false, $request = true)
{
$this->setFilterVars();
-
- $query = UserInvoice::with('shopping_order')->with('shopping_order.shopping_user')->select('user_invoices.*')
- ->where('user_invoices.month', '=', Request::get('invoice_filter_month'))
- ->where('user_invoices.year', '=', Request::get('invoice_filter_year'));
- if(Request::get('invoice_filter_name')){
+ $query = UserInvoice::with('shopping_order')->with('shopping_order.shopping_user')->select('user_invoices.*')
+ ->where('user_invoices.month', '=', Request::get('invoice_filter_month'))
+ ->where('user_invoices.year', '=', Request::get('invoice_filter_year'));
+
+ if (Request::get('invoice_filter_name')) {
$query->whereHas('shopping_order.shopping_user', function ($query) {
- return $query->where('billing_firstname', 'LIKE', '%'.Request::get('invoice_filter_name').'%')->orWhere('billing_lastname', 'LIKE', '%'.Request::get('invoice_filter_name').'%')->orWhere('billing_email', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
+ return $query->where('billing_firstname', 'LIKE', '%' . Request::get('invoice_filter_name') . '%')->orWhere('billing_lastname', 'LIKE', '%' . Request::get('invoice_filter_name') . '%')->orWhere('billing_email', 'LIKE', '%' . Request::get('invoice_filter_name') . '%');
})->get();
}
return $query;
}
- public function datatable(){
+ public function datatable()
+ {
$query = $this->initSearch();
return \DataTables::eloquent($query)
->addColumn('id', function (UserInvoice $UserInvoice) {
- if($UserInvoice->shopping_order->auth_user_id){
+ if ($UserInvoice->shopping_order->auth_user_id) {
return ' ';
}
return ' ';
-
})
->addColumn('total_shipping', function (UserInvoice $UserInvoice) {
- return ''.$UserInvoice->shopping_order->getFormattedTotalShipping()." € ";
+ return '' . $UserInvoice->shopping_order->getFormattedTotalShipping() . " € ";
})
->addColumn('created_at', function (UserInvoice $UserInvoice) {
return $UserInvoice->created_at->format("d.m.Y");
})
->addColumn('txaction', function (UserInvoice $UserInvoice) {
- if($UserInvoice->shopping_order){
+ if ($UserInvoice->shopping_order) {
return Payment::getShoppingOrderBadge($UserInvoice->shopping_order);
}
return "-";
})
->addColumn('status', function (UserInvoice $UserInvoice) {
return '
- '.$UserInvoice->getStatusType().'
+ data-id="' . $UserInvoice->id . '" data-route="' . route('modal_load') . '" data-action="user-credit-status" data-view="">
+ ' . $UserInvoice->getStatusType() . '
';
})
->addColumn('invoice', function (UserInvoice $UserInvoice) {
$ret = "";
- $ret .= ' ';
- $ret .= ' ';
+ $ret .= ' ';
+ $ret .= ' ';
return $ret;
})
->orderColumn('id', 'id $1')
@@ -110,4 +114,4 @@ class PaymentInvoiceController extends Controller
->rawColumns(['id', 'shipping_order', 'txaction', 'total_shipping', 'status', 'txaction', 'invoice'])
->make(true);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/PaymentPointsController.php b/app/Http/Controllers/PaymentPointsController.php
index 263dea7..5a3d76b 100644
--- a/app/Http/Controllers/PaymentPointsController.php
+++ b/app/Http/Controllers/PaymentPointsController.php
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
+
use Carbon;
use Request;
use App\Services\Payment;
@@ -32,21 +33,24 @@ class PaymentPointsController extends Controller
return view('admin.payment.invoice', $data);
}
- private function setFilterVars(){
+ private function setFilterVars()
+ {
- if(!session('invoice_filter_month')){
+ if (!session('invoice_filter_month')) {
session(['invoice_filter_month' => intval(date('m'))]);
}
- if(!session('invoice_filter_year')){
+ if (!session('invoice_filter_year')) {
session(['invoice_filter_year' => intval(date('Y'))]);
}
- if(Request::get('invoice_filter_name')){
+ if (Request::get('invoice_filter_name')) {
session(['invoice_filter_name' => Request::get('invoice_filter_name')]);
+ } else {
+ session(['invoice_filter_name' => '']);
}
- if(Request::get('invoice_filter_month')){
+ if (Request::get('invoice_filter_month')) {
session(['invoice_filter_month' => Request::get('invoice_filter_month')]);
}
- if(Request::get('invoice_filter_year')){
+ if (Request::get('invoice_filter_year')) {
session(['invoice_filter_year' => Request::get('invoice_filter_year')]);
}
}
@@ -54,59 +58,59 @@ class PaymentPointsController extends Controller
private function initSearch($archive = false, $request = true)
{
$this->setFilterVars();
-
- $query = UserInvoice::with('shopping_order')->with('shopping_order.shopping_user')->select('user_invoices.*')
- ->where('user_invoices.month', '=', Request::get('invoice_filter_month'))
- ->where('user_invoices.year', '=', Request::get('invoice_filter_year'));
- if(Request::get('invoice_filter_name')){
- $query->where('shopping_order.shopping_user.billing_firstname', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
- $query->where('shopping_order.shopping_user.billing_lastname', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
- $query->where('shopping_order.shopping_user.billing_email', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
+ $query = UserInvoice::with('shopping_order')->with('shopping_order.shopping_user')->select('user_invoices.*')
+ ->where('user_invoices.month', '=', Request::get('invoice_filter_month'))
+ ->where('user_invoices.year', '=', Request::get('invoice_filter_year'));
+
+ if (Request::get('invoice_filter_name')) {
+ $query->where('shopping_order.shopping_user.billing_firstname', 'LIKE', '%' . Request::get('invoice_filter_name') . '%');
+ $query->where('shopping_order.shopping_user.billing_lastname', 'LIKE', '%' . Request::get('invoice_filter_name') . '%');
+ $query->where('shopping_order.shopping_user.billing_email', 'LIKE', '%' . Request::get('invoice_filter_name') . '%');
}
//->orderBy('created_at', 'DESC');
- /* $query = FlexHour::leftJoin("flex_hour_items", function($join) {
+ /* $query = FlexHour::leftJoin("flex_hour_items", function($join) {
$join->on("flex_hour_items.flex_hour_id","=","flex_hours.id");
$join->where("flex_hour_items.date","=", FlexHourItemBot::$date);
})*/
return $query;
}
- public function datatable(){
+ public function datatable()
+ {
$query = $this->initSearch();
return \DataTables::eloquent($query)
->addColumn('id', function (UserInvoice $UserInvoice) {
- if($UserInvoice->shopping_order->auth_user_id){
+ if ($UserInvoice->shopping_order->auth_user_id) {
return ' ';
}
return ' ';
-
})
->addColumn('total_shipping', function (UserInvoice $UserInvoice) {
- return ''.$UserInvoice->shopping_order->getFormattedTotalShipping()." € ";
+ return '' . $UserInvoice->shopping_order->getFormattedTotalShipping() . " € ";
})
->addColumn('created_at', function (UserInvoice $UserInvoice) {
return $UserInvoice->created_at->format("d.m.Y");
})
->addColumn('txaction', function (UserInvoice $UserInvoice) {
- if($UserInvoice->shopping_order){
+ if ($UserInvoice->shopping_order) {
return Payment::getShoppingOrderBadge($UserInvoice->shopping_order);
}
return "-";
})
->addColumn('status', function (UserInvoice $UserInvoice) {
return '
- '.$UserInvoice->getStatusType().'
+ data-id="' . $UserInvoice->id . '" data-route="' . route('modal_load') . '" data-action="user-credit-status" data-view="">
+ ' . $UserInvoice->getStatusType() . '
';
})
->addColumn('invoice', function (UserInvoice $UserInvoice) {
$ret = "";
- $ret .= ' ';
- $ret .= ' ';
-
+ $ret .= ' ';
+ $ret .= ' ';
+
return $ret;
})
@@ -118,4 +122,4 @@ class PaymentPointsController extends Controller
->rawColumns(['id', 'shipping_order', 'txaction', 'total_shipping', 'status', 'txaction', 'invoice'])
->make(true);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/SalesController.php b/app/Http/Controllers/SalesController.php
index d72f045..6bc8baf 100755
--- a/app/Http/Controllers/SalesController.php
+++ b/app/Http/Controllers/SalesController.php
@@ -94,7 +94,7 @@ class SalesController extends Controller
return ''.$ShoppingOrder->getShippedType().' ';
})
->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) {
- return ''.$ShoppingOrder->getPaymentForType().' ';
+ return Payment::getPaymentForBadge($ShoppingOrder);
})
->addColumn('invoice', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->isInvoice() ? '
@@ -132,9 +132,17 @@ class SalesController extends Controller
set_user_attr('filter_member_id', null);
return redirect(route('admin_sales_customers'));
}
- $filter_user_shops = ShoppingOrder::join('user_shops', 'user_shop_id', '=', 'user_shops.id')->orderBy('slug')->get()->pluck('slug', 'id')->unique()->toArray();
+ $filter_user_shops = ShoppingOrder::select('user_shops.id', 'user_shops.slug')
+ ->join('user_shops', 'shopping_orders.user_shop_id', '=', 'user_shops.id')
+ ->orderBy('user_shops.slug')
+ ->distinct()
+ ->pluck('slug', 'id')
+ ->toArray();
$filter_members = ShoppingOrder::join('users', 'member_id', '=', 'users.id')->groupBy('member_id')->join('user_accounts', 'account_id', '=', 'user_accounts.id')->select('users.id', 'users.email', 'user_accounts.first_name', 'user_accounts.last_name')->get();
//->pluck('email', 'id')->unique()->toArray();
+
+
+
$data = [
'filter_user_shops' => $filter_user_shops,
'filter_members' => $filter_members,
@@ -270,7 +278,7 @@ class SalesController extends Controller
return ''.$ShoppingOrder->getShippedType().' ';
})
->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) {
- return ''.$ShoppingOrder->getPaymentForType().' ';
+ return Payment::getPaymentForBadge($ShoppingOrder);
})
->addColumn('invoice', function (ShoppingOrder $ShoppingOrder) {
if(($ShoppingOrder->txaction === 'extern' || $ShoppingOrder->txaction === 'extern_paid') && $ShoppingOrder->wp_invoice_path){
@@ -365,11 +373,13 @@ class SalesController extends Controller
if(isset($data['action'])){
if($data['action'] === 'create_invoice'){
$shopping_order = ShoppingOrder::findOrFail($data['id']);
- $invoice_repo = new InvoiceRepository($shopping_order);
- if($shopping_order->isInvoice()){
- $invoice_repo->update($data);
- }else{
- $invoice_repo->createAndSalesVolume($data);
+ if($shopping_order->mode === 'live'){
+ $invoice_repo = new InvoiceRepository($shopping_order);
+ if($shopping_order->isInvoice()){
+ $invoice_repo->update($data);
+ }else{
+ $invoice_repo->createAndSalesVolume($data);
+ }
}
if(isset($data['view']) && $data['view'] === 'sales_customer'){
return redirect(route('admin_sales_customers_detail', [$shopping_order->id]));
diff --git a/app/Http/Controllers/User/AboController.php b/app/Http/Controllers/User/AboController.php
new file mode 100644
index 0000000..ac9372b
--- /dev/null
+++ b/app/Http/Controllers/User/AboController.php
@@ -0,0 +1,322 @@
+middleware('active.account');
+ $this->aboRepository = $aboRepository;
+ }
+
+ public function index($view)
+ {
+
+ if ($view === 'me') {
+ // Nur Abos des aktuellen Benutzers
+ $user_abos = UserAbo::where('user_id', \Auth::user()->id)
+ ->where('status', '>', 1);
+
+ if ($user_abos->count() > 0) {
+ return redirect(route('user_abos_detail', ['me', $user_abos->first()->id]));
+ }
+
+ return view('user.abo.index', [
+ 'user_abos' => [],
+ 'view' => 'me',
+ 'isAdmin' => false
+ ]);
+ }
+
+ if ($view === 'ot') {
+ $user_abos = UserAbo::where('member_id', \Auth::user()->id)
+ ->where('status', '>', 1)
+ ->where('is_for', 'ot')
+ ->orderBy('id', 'desc')
+ ->get();
+
+ return view('user.abo.index', [
+ 'user_abos' => $user_abos,
+ 'view' => 'ot',
+ 'isAdmin' => false
+ ]);
+ }
+
+ // Standardfall, wenn weder 'me' noch 'ot'
+ return view('user.abo.index', [
+ 'user_abos' => [],
+ 'view' => 'me',
+ 'isAdmin' => false
+ ]);
+ }
+
+
+ public function detail($view, $id)
+ {
+ $data = Request::all();
+ $user_abo = UserAbo::findOrFail($id);
+
+
+ $this->checkPermissions($view, $user_abo);
+
+ //init Yard
+ AboOrderCart::initYard($user_abo);
+ //holt die aktuellen UserAccount Daten oder die Userdaten des Abo
+ $customer_detail = AboOrderCart::getCustomerDetail();
+ AboOrderCart::makeOrderYard($user_abo);
+
+ $comp_products = [];
+ if ($user_abo->is_for === 'me') {
+ $comp_products = Shop::getCompProducts('abo-me');
+ }
+
+ $data = [
+ 'user_abo' => $user_abo,
+ 'isAdmin' => false,
+ 'customer_detail' => $customer_detail,
+ 'view' => $view,
+ 'comp_products' => $comp_products,
+ ];
+ return view('user.abo.detail', $data);
+ }
+
+
+
+
+ public function update($view, $id)
+ {
+ $data = Request::all();
+ $user_abo = UserAbo::findOrFail($id);
+
+ $this->checkPermissions($view, $user_abo);
+ if (isset($data['action'])) {
+ if ($data['action'] === 'abo_update_settings') {
+ $user_abo = UserAbo::findOrFail($data['id']);
+ $this->aboRepository->setModel($user_abo);
+ $this->aboRepository->update($data);
+ return redirect(route('user_abos_detail', [$view, $id]));
+ }
+
+ if (Request::ajax()) {
+ $message = false;
+ //addProduct
+ if ($data['action'] === 'addProduct') {
+ if ($product = Product::find($data['product_id'])) {
+ if ($UserAboItem = UserAboItem::where('user_abo_id', $user_abo->id)->where('product_id', $product->id)->where('comp', 0)->first()) {
+ $UserAboItem->qty = $UserAboItem->qty + 1;
+ $UserAboItem->save();
+ } else {
+ UserAboItem::create([
+ 'user_abo_id' => $user_abo->id,
+ 'product_id' => $product->id,
+ 'comp' => 0,
+ 'qty' => 1,
+ 'status' => 1,
+ ]);
+ }
+ }
+ }
+
+ //updateCart
+ if ($data['action'] === 'updateCart') {
+ //product_id | order_item_id | cart_order_id | qty
+ if (isset($data['product_id']) && $product = Product::find($data['product_id'])) {
+ if (isset($data['order_item_id']) && $UserAboItem = UserAboItem::find($data['order_item_id'])) {
+ if (isset($data['qty'])) {
+ $qty = (int) $data['qty'];
+ $qty = $qty < 1 ? 1 : $qty;
+ $qty = $qty > 100 ? 100 : $qty;
+ $UserAboItem->qty = $qty;
+ $UserAboItem->save();
+ }
+ }
+ }
+ }
+
+ //removeFromCart
+ if ($data['action'] === 'removeFromCart') {
+ if (!isset($data['product_id']) || !($product = Product::find($data['product_id']))) {
+ $message = __('abo.product_not_found');
+ }
+ if (!isset($data['order_item_id']) || !($userAboItem = UserAboItem::find($data['order_item_id']))) {
+ $message = __('abo.abo_item_not_found');
+ }
+ $has_basis_product = $this->check_need_basis_product($user_abo, $product, $data['order_item_id']);
+ if (!$has_basis_product) {
+ $message = __('abo.need_basis_product');
+ }
+ if (!$message) {
+
+
+ $userAboItem->delete();
+ $user_abo->refresh(); // Abo neu laden um die aktualisierten Items zu erhalten
+ }
+ }
+ //updateCompProduct
+ if ($data['action'] === 'updateCompProduct') {
+ if ($UserAboItem = UserAboItem::where('user_abo_id', $user_abo->id)->where('comp', $data['comp_num'])->first()) {
+ $UserAboItem->product_id = $data['comp_product_id'];
+ $UserAboItem->save();
+ } else {
+ UserAboItem::create([
+ 'user_abo_id' => $user_abo->id,
+ 'product_id' => $data['comp_product_id'],
+ 'comp' => $data['comp_num'],
+ 'qty' => 1,
+ 'status' => 1,
+ ]);
+ }
+ }
+
+
+ AboOrderCart::initYard($user_abo);
+ AboOrderCart::makeOrderYard($user_abo); //reCalculateShippingPrice
+ AboOrderCart::checkNumOfCompProducts($user_abo); //after reCalculateShippingPrice check it and remove or add comp product
+
+ if ($user_abo->is_for === 'me') {
+ $data['comp_products'] = Shop::getCompProducts('abo-me');
+ }
+ $error_message = $message ? $message : false;
+ $html_cart = view("admin.abo._order_abo_show", ['user_abo' => $user_abo, 'error_message' => $error_message])->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+
+ $amount = $user_abo->getFormattedAmount();
+
+ // $html_total = view("user.homeparty.show_total_order", ['homeparty' => $homeparty])->render();
+ return response()->json(['response' => true, 'data' => $data, 'html_cart' => $html_cart, 'html_comp' => $html_comp, 'amount' => $amount]);
+ }
+ }
+ }
+
+ public function check_need_basis_product($user_abo, $product, $order_item_id)
+ {
+ // Wenn das zu entfernende Produkt kein Basis-Produkt ist, keine weitere Prüfung nötig
+ if (AboHelper::getAboShowOn($product) !== 'base') {
+ return true;
+ }
+
+ // Prüfe ob noch ein anderes Basis-Produkt vorhanden ist
+ foreach ($user_abo->user_abo_items as $user_abo_item) {
+ if ($user_abo_item->id == $order_item_id) {
+ continue;
+ }
+ if (AboHelper::getAboShowOn($user_abo_item->product) === 'base') {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function datatable($user_abo_id)
+ {
+ $user_abo = UserAbo::findOrFail($user_abo_id);
+ if (!$user_abo) {
+ abort(404);
+ }
+
+ //$user_abo->is_for === 'me'
+
+ $show_on_ids = ['12', '13'];
+ $query = Product::select('products.*')
+ ->where('active', true)
+ ->where(function ($q) use ($show_on_ids) {
+ foreach ($show_on_ids as $id) {
+ $q->orWhereJsonContains('show_on', $id);
+ }
+ })
+ ->orderByRaw(
+ "CASE
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2
+ ELSE 3 END",
+ [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]
+ );
+
+
+
+ return \DataTables::eloquent($query)
+
+ ->addColumn('add_card', function (Product $product) use ($user_abo) {
+ $ufactor = $user_abo->is_for === 'me' ? true : false;
+ $tax_free = $user_abo->is_for === 'me' ? true : Yard::instance('shopping')->getUserTaxFree();
+ return '';
+ })
+ ->addColumn('picture', function (Product $product) {
+ if (count($product->images)) {
+ return '';
+ }
+ return "";
+ })
+ ->addColumn('name', function (Product $product) use ($user_abo) {
+ return '' . $product->getLang('name') . ' ' . get_abo_type_badge_by_product($product);
+ })
+
+ ->addColumn('price_net', function (Product $product) use ($user_abo) {
+ $ufactor = $user_abo->is_for === 'me' ? true : false;
+ return '' . $product->getFormattedPriceWith(true, $ufactor, Yard::instance('shopping')->getUserCountry()) . " € " . '' . $product->getFormattedPriceCurrencyWith(true, true, Yard::instance('shopping')->getUserCountry()) . ' ';
+ })
+ ->addColumn('price_gross', function (Product $product) use ($user_abo) {
+ $ufactor = $user_abo->is_for === 'me' ? true : false;
+ return '' . $product->getFormattedPriceWith(false, $ufactor, Yard::instance('shopping')->getUserCountry()) . " € " . '' . $product->getFormattedPriceCurrencyWith(true, true, Yard::instance('shopping')->getUserCountry()) . ' ';
+ })
+ ->addColumn('action', function (Product $product) {
+ return ' ';
+ })
+ ->filterColumn('product', function ($query, $keyword) {
+ if ($keyword != "") {
+ $query->where('name', 'LIKE', '%' . $keyword . '%');
+ }
+ })
+ ->orderColumn('name', 'name $1')
+ ->orderColumn('product', 'name $1')
+ ->orderColumn('number', 'number $1')
+ ->orderColumn('points', 'points $1')
+ ->orderColumn('price_net', 'price_net $1')
+ ->orderColumn('price_gross', 'price_gross $1')
+ ->orderColumn('contents_total', 'contents_total $1')
+ ->orderColumn('weight', 'weight $1')
+
+ ->rawColumns(['add_card', 'product', 'name', 'quantity', 'picture', 'price_net', 'price_gross', 'action'])
+ ->make(true);
+ }
+
+
+
+ private function checkPermissions($view, $user_abo)
+ {
+ if ($view === 'me' && $user_abo->is_for !== 'me') {
+ abort(403, 'Unauthorized action. Is not for me');
+ }
+ if ($view === 'ot' && $user_abo->is_for !== 'ot') {
+ abort(403, 'Unauthorized action. Is not your customer');
+ }
+ if ($view === 'me' && $user_abo->user_id !== \Auth::user()->id) {
+ abort(403, 'Unauthorized action. Is not my abo');
+ }
+ if ($view === 'ot' && $user_abo->member_id !== \Auth::user()->id) {
+ abort(403, 'Unauthorized action. Is not my customer abo');
+ }
+ }
+}
diff --git a/app/Http/Controllers/User/CustomerController.php b/app/Http/Controllers/User/CustomerController.php
index 01b8ffa..08eb3f0 100755
--- a/app/Http/Controllers/User/CustomerController.php
+++ b/app/Http/Controllers/User/CustomerController.php
@@ -5,10 +5,13 @@ namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use App\Models\ShoppingUser;
use App\Repositories\CustomerRepository;
+use App\Services\AboHelper;
use App\Services\CustomerPriority;
use App\Services\HTMLHelper;
+use App\Services\ShoppingUserService;
use App\User;
use Illuminate\Support\Collection;
+use Illuminate\Support\Facades\DB;
use Request;
use Validator;
@@ -227,23 +230,51 @@ class CustomerController extends Controller
return redirect(route('user_customer_detail', [$shopping_user->id]));
}
+
+ private function checkShoppingUsersByEmail(){
+
+ //ist an dieser stelle nicht machbar, zu viele Datenbankzugriffe
+ //siehe App\Console\Commands\SyncShoppingUserData
+ /* $user = User::find(\Auth::user()->id);
+ ShoppingUserService::setFakerMail($user);
+ ShoppingUserService::syncNumbersByEmail($user);
+ ShoppingUserService::syncOrdersByEmail($user); */
+
+ }
public function getCustomers()
{
+ //$this->checkShoppingUsersByEmail();
+
+
$user = User::find(\Auth::user()->id);
+ //\Log::info('Current user ID: ' . $user->id);
$query = ShoppingUser::select(['id', 'billing_company', 'billing_salutation', 'billing_firstname', 'billing_lastname', 'billing_email', 'faker_mail', 'billing_zipcode', 'billing_city', 'billing_country_id', 'orders', 'subscribed', 'created_at', 'number', 'mode', 'is_like', 'wp_order_number'])
- ->where('shopping_users.member_id', '=', $user->id);
- //->groupBy('shopping_users.number');
+ ->with('billing_country')
+ ->whereIn('id', function($query) {
+ $query->select(DB::raw('MAX(id)'))
+ ->from('shopping_users')
+ ->groupBy('billing_email');
+ })->where('shopping_users.member_id', '=', $user->id)->where('shopping_users.auth_user_id', '=', NULL);
- /*set_user_attr('filter_member_id', Request::get('filter_member_id'));
- if(Request::get('filter_member_id') != ""){
- $query->where('member_id', '=', Request::get('filter_member_id'));
- }*/
+ if(Request::get('isfor') === 'ot-member'){ //Bestellung für Kunden
+ }
+ if(Request::get('isfor') === 'ot-customer' || Request::get('isfor') === 'abo-ot-customer'){ //Bestellung für Kunden Zahlungslink
+ $query->where(function($q) {
+ $q->where('shopping_users.faker_mail', '!=', 1)
+ ->orWhereNull('shopping_users.faker_mail');
+ });
+ }
+ //\Log::info('SQL Query: ' . $query->toSql());
+ //\Log::info('Query Bindings: ' . print_r($query->getBindings(), true));
return \DataTables::eloquent($query)
->addColumn('send_to', function (ShoppingUser $ShoppingUser) {
$ot = Request::get('isfor') ? Request::get('isfor') : 'ot-member';
+ if(Request::get('isfor') === 'abo-ot-customer' && AboHelper::memberHasAbo($ShoppingUser)){
+ return ' '.__('abo.abo_assigned').' ';
+ }
return $ShoppingUser->is_like ? ' '.__('customer.under_review').' ' : ' '.__('customer.select').' ';
})
->addColumn('billing_email', function (ShoppingUser $ShoppingUser) {
@@ -262,7 +293,7 @@ class CustomerController extends Controller
return $ShoppingUser->firstEntryByNumber()->created_at->format('d.m.Y');
})
->addColumn('orders', function (ShoppingUser $ShoppingUser) {
- return $ShoppingUser->lastEntryByNumber()->orders;
+ return $ShoppingUser->orders;
})
->addColumn('subscribed', function (ShoppingUser $ShoppingUser) {
return get_active_badge($ShoppingUser->subscribed);
diff --git a/app/Http/Controllers/User/MembershipController.php b/app/Http/Controllers/User/MembershipController.php
index 99296f8..108f5d3 100755
--- a/app/Http/Controllers/User/MembershipController.php
+++ b/app/Http/Controllers/User/MembershipController.php
@@ -10,12 +10,14 @@ use Request;
use App\User;
use App\Mail\MailInfo;
use App\Models\Product;
+use App\Services\Payment;
use App\Models\UserHistory;
+use App\Models\ShoppingOrder;
use App\Services\UserService;
use App\Models\ShippingCountry;
use App\Models\ShoppingInstance;
-use Illuminate\Support\Facades\Mail;
use App\Http\Controllers\Controller;
+use Illuminate\Support\Facades\Mail;
class MembershipController extends Controller
@@ -39,11 +41,35 @@ class MembershipController extends Controller
if($user->payment_account){
$diff_months = Carbon::now()->diffInMonths(Carbon::parse($user->payment_account)) +1;
}
+
+ $userShoppingOrders = ShoppingOrder::with('shopping_user', 'shopping_payments')->select('shopping_orders.*')
+ ->where('auth_user_id', '=', $user->id)
+ ->where('txaction', '!=', NULL)
+ ->whereIn('payment_for', [1, 2])
+ ->orderBy('created_at', 'DESC')
+ ->get();
- $userHistoryPaymentOrder = UserHistory::whereUserId($user->id)->whereAction('payment_order')->get()->last();
- $userHistoryUpgradeOrder = UserHistory::whereUserId($user->id)->whereAction('upgrade_order')->get()->last();
+ $userHistoryPaymentOrder = null;
+ $userHistoryUpgradeOrder = null;
+
+ /* Bezhalung ist nur 29 Tage vor ablauf möglich */
+ /* isRenewalAccount payment_account date - config('mivita.renewal_days') Vertragsverlängerung */
+ if($user->isRenewalAccount()){
+ //Acount ist noch nicht verlängert / bezahlt
+ if ($user->payment_account) {
+ //Die Order muss größer als das Datum sein.
+ $payment_greaterThan = Carbon::parse($user->payment_account)->modify('-'.(config('mivita.renewal_days')+1).' days');
+ $userHistoryPaymentOrder = UserHistory::whereUserId($user->id)->whereAction('payment_order')->where('created_at', '>=', $payment_greaterThan)->get()->last();
+ }
+ }
+ if($user->isActiveAccount() && !$user->isActiveShop()){
+ $payment_greaterThan = Carbon::parse($user->payment_account)->modify('-'.(config('mivita.renewal_days')+1).' days');
+ $userHistoryUpgradeOrder = UserHistory::whereUserId($user->id)->whereAction('upgrade_order')->where('created_at', '>=', $payment_greaterThan)->get()->last();
+
+ }
$userHistoryDeleteMembership = UserHistory::whereUserId($user->id)->whereAction('delete_membership')->whereStatus(50)->get()->last();
+
$shipping_country_id = $this->checkShoppingCountry($user);
if(!$shipping_country_id){
abort(403, __('validation.custom.shipping_not_found'));
@@ -60,6 +86,7 @@ class MembershipController extends Controller
'userHistoryUpgradeOrder' => $userHistoryUpgradeOrder,
'userHistoryDeleteMembership' => $userHistoryDeleteMembership,
'yard_info' => UserService::getYardInfo(),
+ 'userShoppingOrders' => $userShoppingOrders,
];
return view('user.membership.index', $data);
@@ -131,7 +158,7 @@ class MembershipController extends Controller
$image = $product->images->first()->slug;
}
$qty = Request::get('qty') ? Request::get('qty') : 1;
- $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $qty, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]);
+ $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $qty, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
if(\App\Services\UserService::getTaxFree()){
Yard::setTax($cartItem->rowId, 0);
}else{
diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php
index 27c40c0..9e2e059 100755
--- a/app/Http/Controllers/User/OrderController.php
+++ b/app/Http/Controllers/User/OrderController.php
@@ -1,29 +1,34 @@
id);
+ $user = User::find(Auth::user()->id);
$shopping_order = ShoppingOrder::findOrFail($id);
- if($shopping_order->auth_user_id !== $user->id){
+
+ if ($shopping_order->auth_user_id !== $user->id) {
+ Log::channel(self::LOG_CHANNEL)->warning("Unauthorized access attempt to order #{$id} by user #{$user->id}");
abort(404);
}
- if( $shopping_order->payment_for === 6 || $shopping_order->payment_for === 7){
+
+ if ($shopping_order->payment_for === 6 || $shopping_order->payment_for === 7) {
+ Log::channel(self::LOG_CHANNEL)->info("Redirecting user #{$user->id} to customer order detail for order #{$id}");
return redirect(route('user_shop_order_detail', [$shopping_order->id]));
- abort(403, 'Kundenbestellung');
}
+
$shopping_order->getLastShoppingPayment();
- $data = [
- 'shopping_order' => $shopping_order,
- 'isAdmin' => false,
- ];
- return view('user.order.detail', $data);
+ return view('user.order.detail', [
+ 'shopping_order' => $shopping_order,
+ 'isAdmin' => false,
+ ]);
}
- public function ordersDatatable(){
-
- $user = User::find(\Auth::user()->id);
- $query = ShoppingOrder::with('shopping_user', 'shopping_payments')->select('shopping_orders.*')->where('auth_user_id', '=', $user->id)->where('txaction', '!=', NULL);
+ public function ordersDatatable()
+ {
+ $user = User::find(Auth::user()->id);
+ $query = ShoppingOrder::with('shopping_user', 'shopping_payments')
+ ->select('shopping_orders.*')
+ ->where('auth_user_id', '=', $user->id)
+ ->where('txaction', '!=', NULL);
return \DataTables::eloquent($query)
->addColumn('id', function (ShoppingOrder $ShoppingOrder) {
@@ -80,7 +88,7 @@ class OrderController extends Controller
return $ShoppingOrder->getLastShoppingPayment('getPaymentType');
})
->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) {
- if($ShoppingOrder->payment_for === 8){
+ if ($ShoppingOrder->payment_for === 8) {
return ''.$ShoppingOrder->getShippedType().' ';
})
->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) {
- return ''.$ShoppingOrder->getPaymentForType().' ';
+ return Payment::getPaymentForBadge($ShoppingOrder);
})
->addColumn('invoice', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->isInvoice() ? '
@@ -106,7 +114,6 @@ class OrderController extends Controller
->orderColumn('shipped', 'shipped $1')
->orderColumn('total_shipping', 'total_shipping $1')
->orderColumn('payment_for', 'payment_for $1')
-
->rawColumns(['id', 'txaction', 'payment_for', 'total_shipping', 'invoice', 'shipped'])
->make(true);
}
@@ -114,62 +121,80 @@ class OrderController extends Controller
/*
$for = me, ot-member, ot-customer, abo-ot-member, abo-ot-customer, abo-me
*/
-
- public function delivery($for, $id=null)
+ public function delivery($for, $id = null)
{
- $user = User::find(\Auth::user()->id);
+ $user = User::find(Auth::user()->id);
$shopping_user = null;
$delivery_id = null;
- if(strpos($for, 'ot') !== false){ //ot-member, ot-customer abo-ot-member, abo-ot-customer,
+
+ if (strpos($for, 'ot') !== false) {
$shopping_user = Shop::checkShoppingUser($id, $user);
$delivery_id = $shopping_user->id;
- if(!Shop::checkShoppingCountry($for, $delivery_id) && !\Session()->has('custom-error')){
+
+ if (!Shop::checkShoppingCountry($for, $delivery_id) && !\Session()->has('custom-error')) {
$country = Shop::getDeliveryCountry($for, $delivery_id);
\Session()->flash('custom-error', $country.": ".__('validation.custom.shipping_not_found'));
+ Log::channel(self::LOG_CHANNEL)->warning("Shipping country not found for user #{$user->id}, country: {$country}");
return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
}
+
+ if ($for === 'abo-ot-customer') {
+ if (AboHelper::hasAboByEmail($shopping_user->billing_email) && !\Session()->has('custom-error')) {
+ \Session()->flash('custom-error', __('abo.error_email_has_abo', ['email' => $shopping_user->billing_email]));
+ Log::channel(self::LOG_CHANNEL)->info("User #{$user->id} attempted to create abo for email that already has one: {$shopping_user->billing_email}");
+ return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
+ }
+ }
}
- if(Request::get('action') === 'next'){
+
+ if (Request::get('action') === 'next') {
Yard::instance('shopping')->destroy();
- if(strpos(Request::get('switchers-radio-is-for'), 'ot') !== false){
+ if (strpos(Request::get('switchers-radio-is-for'), 'ot') !== false) {
$delivery_id = $id;
}
return redirect(route('user_order_my_list', [Request::get('switchers-radio-is-for'), $delivery_id]));
}
- $data = [
+
+ return view('user.order.delivery', [
'shopping_user' => $shopping_user,
'isAdmin' => false,
'isView' => 'customer',
'for' => $for,
'delivery_id' => $delivery_id,
- ];
- return view('user.order.delivery', $data);
+ ]);
}
- public function list($for, $id=null)
+ public function list($for, $id = null)
{
- $user = User::find(\Auth::user()->id);
+ $user = User::find(Auth::user()->id);
+
+ if ($for === 'abo-me' && AboHelper::userHasAbo($user)) {
+ Log::channel(self::LOG_CHANNEL)->warning("User #{$user->id} attempted to create abo but already has one");
+ abort(403, 'User has an Abo. Cannot order.');
+ }
+
$shopping_user = null;
$delivery_id = null;
- if(strpos($for, 'ot') !== false){ //ot-member, ot-customer abo-ot-member, abo-ot-customer,
+
+ if (strpos($for, 'ot') !== false) {
$shopping_user = Shop::checkShoppingUser($id, $user);
$delivery_id = $shopping_user->id;
}
- if($for === 'ot-customer' || $for === 'abo-ot-customer'){
- //Liederung an (abo-) ot-customer (Kunden) Zahlung und Rechnung geht an Kunden
+
+ if ($for === 'ot-customer' || $for === 'abo-ot-customer') {
UserService::initCustomerYard($shopping_user, $for);
- }else{
- //Lieferung an user oder (abo-) ot-member (Kunden) rechnung geht an User
- //lieferland und rechnungsland prüfen
- $shipping_country_id = Shop::checkShoppingCountry($for, $id);
- if(!$shipping_country_id){
+ } else {
+ $shipping_country_id = Shop::checkShoppingCountry($for, $id);
+ if (!$shipping_country_id) {
$country = Shop::getDeliveryCountry($for, $id);
\Session()->flash('custom-error', $country.": ".__('validation.custom.shipping_not_found'));
+ Log::channel(self::LOG_CHANNEL)->warning("Shipping country not found for user #{$user->id}, country: {$country}");
return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
}
UserService::initUserYard($user, $shipping_country_id, $for);
}
- $data = [
+
+ return view('user.order.list', [
'shopping_user' => $shopping_user,
'user' => $user,
'isAdmin' => false,
@@ -178,218 +203,413 @@ class OrderController extends Controller
'template' => str_replace('abo-', '', $for),
'delivery_id' => $delivery_id,
'is_abo' => strpos($for, 'abo') !== false,
- 'comp_products' => $this->getCompProducts($for),
- ];
- return view('user.order.list', $data);
+ 'comp_products' => Shop::getCompProducts($for),
+ ]);
}
- public function payment($for, $id=null){
+ public function payment($for, $id = null)
+ {
$data = Request::all();
$user = User::find(Auth::user()->id);
- $rules = array(
+
+ $rules = [
'shipping_salutation' => 'required',
- 'shipping_firstname'=>'required',
- 'shipping_lastname'=>'required',
- 'shipping_address'=>'required',
- 'shipping_zipcode'=>'required',
+ 'shipping_firstname' => 'required',
+ 'shipping_lastname' => 'required',
+ 'shipping_address' => 'required',
+ 'shipping_zipcode' => 'required',
'shipping_city' => 'required',
'shipping_state' => 'required',
- );
+ ];
+
$validator = Validator::make(Request::all(), $rules);
+
if ($validator->fails()) {
+ Log::channel(self::LOG_CHANNEL)->info("Validation failed for payment form", ['errors' => $validator->errors()->toArray()]);
return back()->withErrors($validator)->withInput(Request::all());
}
- //hier prüfen, ob versand etc richtig berechnet wurde
- $this->checkSendYardForPayment($data, $id);
+
+ try {
+ $this->checkSendYardForPayment($data, $id);
+ } catch (\Exception $e) {
+ Log::channel(self::LOG_CHANNEL)->error("Error checking yard for payment: " . $e->getMessage(), [
+ 'user_id' => $user->id,
+ 'for' => $for,
+ 'id' => $id
+ ]);
+ return back()->with('error', $e->getMessage());
+ }
- if(Yard::instance('shopping')->getNumComp() > 0){
- if(!isset($data['switchers-comp-product'])){
+ if (Yard::instance('shopping')->getNumComp() > 0) {
+ if (!isset($data['switchers-comp-product'])) {
$validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product'));
- }else{
- if(!is_array($data['switchers-comp-product'])){
- $validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product'));
- }else{
- if(count($data['switchers-comp-product']) !== Yard::instance('shopping')->getNumComp()){
- $validator->errors()->add('switchers-comp-product', __('mdg.please_select_count_compensation_products', ['count'=>Yard::instance('shopping')->getNumComp()]));
- }
- }
+ Log::channel(self::LOG_CHANNEL)->info("Compensation product not selected");
+ } else if (!is_array($data['switchers-comp-product'])) {
+ $validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product'));
+ Log::channel(self::LOG_CHANNEL)->info("Compensation product selection is not an array");
+ } else if (count($data['switchers-comp-product']) !== Yard::instance('shopping')->getNumComp()) {
+ $validator->errors()->add('switchers-comp-product', __('mdg.please_select_count_compensation_products', ['count' => Yard::instance('shopping')->getNumComp()]));
+ Log::channel(self::LOG_CHANNEL)->info("Incorrect number of compensation products selected", [
+ 'required' => Yard::instance('shopping')->getNumComp(),
+ 'selected' => count($data['switchers-comp-product'])
+ ]);
}
+
if ($validator->errors()->count()) {
return back()->withErrors($validator)->withInput(Request::all());
}
}
+
+ // Generate unique identifier
do {
$identifier = Util::getToken();
- } while( ShoppingInstance::where('identifier', $identifier)->count() );
+ } while (ShoppingInstance::where('identifier', $identifier)->count());
+
+ // Prepare common data
$data['is_from'] = 'user_order';
$data['is_for'] = $for;
$data['is_abo'] = $data['is_abo'] ?? 0;
$data['abo_interval'] = $data['abo_interval'] ?? 0;
$data['shopping_user_id'] = $id;
$data['user_price_infos'] = Yard::instance('shopping')->getUserPriceInfos();
+ $data['mode'] = config('app.mode') === 'test' ? 'test' : 'live';
+
+ // Remove unnecessary data
unset($data['quantity']);
unset($data['_token']);
- $data['mode'] = 'live';
-
- if($for === 'ot-customer' || $for === 'abo-ot-customer'){
- ShoppingInstance::create([
- 'identifier' => $identifier,
- 'user_shop_id' => $user->shop->id,
- 'payment' => 6, //Berater Shop to Customer Shop
- 'subdomain' => $user->shop->getSubdomain(),
- 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
- 'language' => \App::getLocale(),
- 'shopping_data' => $data,
- 'back' => url()->previous(),
-
- ]);
- $yard_shopping_items = Shop::getYardShoppingItems();
- Yard::instance('shopping')->store($identifier);
- // send Mail to Customer
- $this->customPaymentSendMail($user, $identifier, $yard_shopping_items, $data);
- UserHistory::create(['user_id' => $user->id, 'action'=>'user_order_customer', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier, 'is_abo'=>$data['is_abo']]);
-
- //eine Abschließen bestellseite für den User + Link zum Kunden Shop + Mail an den Kunden / Berater
- return redirect(route('user_order_my_custom_payment', ['identifier'=>$identifier]));
- }else{
- ShoppingInstance::create([
- 'identifier' => $identifier,
- 'user_shop_id' => 1, //is first faker shop for buy intern
- 'auth_user_id' => Auth::user()->id,
- 'payment' => 2, //Berater Shop
- 'subdomain' => url('/'),
- 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
- 'language' => \App::getLocale(),
- 'shopping_data' => $data,
- 'back' => url()->previous(),
-
- ]);
- Yard::instance('shopping')->store($identifier);
- $path = route('checkout.checkout_card', ['identifier'=>$identifier]);
- UserHistory::create(['user_id' => $user->id, 'action'=>'user_order_payment', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier, 'is_abo'=>$data['is_abo']]);
- //$path = str_replace('http', 'https', $path);
- return redirect()->secure($path);
+
+ Log::channel(self::LOG_CHANNEL)->info("Processing payment for user #{$user->id}", [
+ 'for' => $for,
+ 'identifier' => $identifier,
+ 'is_abo' => $data['is_abo']
+ ]);
+
+ if ($for === 'ot-customer' || $for === 'abo-ot-customer') {
+ return $this->processCustomerPayment($user, $identifier, $data, $id, $for);
+ } else {
+ return $this->processUserPayment($user, $identifier, $data, $id, $for);
}
-
}
- private function checkSendYardForPayment($data, $id){
+ /**
+ * Process payment for customer orders
+ */
+ private function processCustomerPayment($user, $identifier, $data, $id, $for)
+ {
+ $shopping_instance = ShoppingInstance::create([
+ 'identifier' => $identifier,
+ 'user_shop_id' => $user->shop->id,
+ 'payment' => 6, // Berater Shop to Customer Shop
+ 'subdomain' => $user->shop->getSubdomain(),
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'amount' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'status' => 0,
+ 'shopping_user_id' => $id,
+ 'shopping_data' => $data,
+ 'back' => url()->previous(),
+ ]);
+
+ Yard::instance('shopping')->store($identifier);
+ $yard_shopping_items = OrderPaymentService::getRestoredYardShoppingItems($shopping_instance);
- $user = User::find(\Auth::user()->id);
+ // Send Mail to Customer
+ try {
+ $this->customPaymentSendMail($user, $identifier, $yard_shopping_items, $data);
+ Log::channel(self::LOG_CHANNEL)->info("Custom payment email sent successfully", [
+ 'identifier' => $identifier,
+ 'user_id' => $user->id
+ ]);
+ } catch (\Exception $e) {
+ Log::channel(self::LOG_CHANNEL)->error("Failed to send custom payment email: " . $e->getMessage(), [
+ 'identifier' => $identifier,
+ 'user_id' => $user->id
+ ]);
+ }
+
+ UserHistory::create([
+ 'user_id' => $user->id,
+ 'action' => 'user_order_customer',
+ 'status' => 1,
+ 'product_id' => null,
+ 'identifier' => $identifier,
+ 'is_abo' => $data['is_abo']
+ ]);
+
+ return redirect(route('user_order_my_custom_payment', ['identifier' => $identifier]));
+ }
+
+ /**
+ * Process payment for user orders
+ */
+ private function processUserPayment($user, $identifier, $data, $id, $for)
+ {
+ ShoppingInstance::create([
+ 'identifier' => $identifier,
+ 'user_shop_id' => 1, // is first faker shop for buy intern
+ 'auth_user_id' => Auth::user()->id,
+ 'payment' => 2, // Berater Shop
+ 'subdomain' => url('/'),
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'amount' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'status' => 0,
+ 'shopping_user_id' => $id,
+ 'shopping_data' => $data,
+ 'back' => url()->previous(),
+ ]);
+
+ Yard::instance('shopping')->store($identifier);
+
+ UserHistory::create([
+ 'user_id' => $user->id,
+ 'action' => 'user_order_payment',
+ 'status' => 1,
+ 'product_id' => null,
+ 'identifier' => $identifier,
+ 'is_abo' => $data['is_abo']
+ ]);
+
+ $path = route('checkout.checkout_card', ['identifier' => $identifier]);
+ return redirect()->secure($path);
+ }
+
+ /**
+ * Validate the yard before payment
+ */
+ private function checkSendYardForPayment($data, $id)
+ {
+ $user = User::find(Auth::user()->id);
$shopping_user = null;
- if(strpos($data['shipping_is_for'], 'ot') !== false){
+
+ if (strpos($data['shipping_is_for'], 'ot') !== false) {
$shopping_user = Shop::checkShoppingUser($id, $user);
}
$shipping_country_id = Shop::checkShoppingCountry($data['shipping_is_for'], $id);
- if(!$shipping_country_id){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ if (!$shipping_country_id) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'no shipping_country_id found | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shipping_country_was_not_found'));
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier
+ ];
+
+ MyLog::writeLog('payment', 'error', 'no shipping_country_id found | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping country not found", $logData);
+
+ throw new \Exception(__('msg.shipping_country_was_not_found'));
}
- //must be the same shipping country
- if($shipping_country_id != Yard::instance('shopping')->getShippingCountryId()){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+
+ // Must be the same shipping country
+ if ($shipping_country_id != Yard::instance('shopping')->getShippingCountryId()) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'shipping_country_id is not the same from Yard | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shipping_country_was_not_correctly'));
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'expected' => $shipping_country_id,
+ 'actual' => Yard::instance('shopping')->getShippingCountryId()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'shipping_country_id is not the same from Yard | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping country mismatch", $logData);
+
+ throw new \Exception(__('msg.shipping_country_was_not_correctly'));
}
- if($data['shipping_is_for'] !== 'ot-customer'){
- if(Yard::instance('shopping')->shipping_free){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ if ($data['shipping_is_for'] !== 'ot-customer') {
+ if (Yard::instance('shopping')->shipping_free) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'Yard can by not shipping_free | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shopping_cart_was_shipping_free'));
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard can by not shipping_free | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Yard cannot be shipping free", $logData);
+
+ throw new \Exception(__('msg.shopping_cart_was_shipping_free'));
}
}
- if($data['shipping_is_for'] === 'ot-customer'){
- if(!$user->shop){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ if ($data['shipping_is_for'] === 'ot-customer') {
+ if (!$user->shop) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'User has no Shop for an User to Customer order| Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shopping_cart_was_not_user_shop'));
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier
+ ];
+
+ MyLog::writeLog('payment', 'error', 'User has no Shop for an User to Customer order| Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("User has no shop for customer order", $logData);
+
+ throw new \Exception(__('msg.shopping_cart_was_not_user_shop'));
}
}
$shipping_price = Shop::getShippingPriceByShippingCountryId($shipping_country_id, Yard::instance('shopping')->weight());
- //for other and has weight - check
- if(strpos($data['shipping_is_for'], 'ot') !== false && $data['shipping_is_for'] !== 'ot-customer' && Yard::instance('shopping')->weight() > 0){
- if(!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
- Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is 0 or | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shipping_cost_cannot_be_0'));
- }
- if(Yard::instance('shopping')->getShippingPrice() != $shipping_price->price){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+
+ // For other and has weight - check
+ if (strpos($data['shipping_is_for'], 'ot') !== false && $data['shipping_is_for'] !== 'ot-customer' && Yard::instance('shopping')->weight() > 0) {
+ if (!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is not the same from shipping_price | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shipping_costs_were_not_calculated_correctly'));
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'weight' => Yard::instance('shopping')->weight()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is 0 | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping price cannot be zero for order with weight", $logData);
+
+ throw new \Exception(__('msg.shipping_cost_cannot_be_0'));
+ }
+
+ if (Yard::instance('shopping')->getShippingPrice() != $shipping_price->price) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'expected' => $shipping_price->price,
+ 'actual' => Yard::instance('shopping')->getShippingPrice()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is not the same from shipping_price | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping price mismatch", $logData);
+
+ throw new \Exception(__('msg.shipping_costs_were_not_calculated_correctly'));
}
}
- if(($data['shipping_is_for'] == 'me' || $data['shipping_is_for'] == 'abo-me') && Yard::instance('shopping')->weight() > 0){
- if(!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ if (($data['shipping_is_for'] == 'me' || $data['shipping_is_for'] == 'abo-me') && Yard::instance('shopping')->weight() > 0) {
+ if (!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is 0 or | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shipping_cost_cannot_be_0'));
- }
- if(Yard::instance('shopping')->getShippingPrice() != $shipping_price->price_comp){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
- Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is not the same from shipping_price | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.shipping_costs_were_not_calculated_correctly'));
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'weight' => Yard::instance('shopping')->weight()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is 0 | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping price cannot be zero for personal order with weight", $logData);
+
+ throw new \Exception(__('msg.shipping_cost_cannot_be_0'));
}
- if(Yard::instance('shopping')->getNumComp() != $shipping_price->num_comp){
- $identifier = 'error-'.time().mt_rand(1000000, 9999999);
- Yard::instance('shopping')->store($identifier);
- $data['user_id'] = Auth::user()->id;
- $data['shopping_user_id'] = $id;
- \App\Services\MyLog::writeLog('payment', 'error', 'Yard num_comp is 0 | Yard identifier: '.$identifier, $data);
- abort(403, __('msg.compensation_products_cannot_be_0'));
+ if(Shop::isCompProducts($data['shipping_is_for'])){
+ if (Yard::instance('shopping')->getShippingPrice() != $shipping_price->price_comp) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'expected' => $shipping_price->price_comp,
+ 'actual' => Yard::instance('shopping')->getShippingPrice()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is not the same from shipping_price with comp products | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping price mismatch for personal order", $logData);
+
+ throw new \Exception(__('msg.shipping_costs_were_not_calculated_correctly'));
+ }
+
+ if (Yard::instance('shopping')->getNumComp() != $shipping_price->num_comp) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'expected' => $shipping_price->num_comp,
+ 'actual' => Yard::instance('shopping')->getNumComp()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard num_comp is not correct | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Compensation product count mismatch", $logData);
+
+ throw new \Exception(__('msg.compensation_products_cannot_be_0'));
+ }
+ }else{
+ if (Yard::instance('shopping')->getShippingPrice() != $shipping_price->price) {
+ $identifier = 'error-' . time() . mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $logData = [
+ 'user_id' => Auth::user()->id,
+ 'shopping_user_id' => $id,
+ 'yard_identifier' => $identifier,
+ 'expected' => $shipping_price->price,
+ 'actual' => Yard::instance('shopping')->getShippingPrice()
+ ];
+
+ MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is not the same from shipping_price without comp products | Yard identifier: ' . $identifier, $data);
+ Log::channel(self::LOG_CHANNEL)->error("Shipping price mismatch for personal order", $logData);
+
+ throw new \Exception(__('msg.shipping_costs_were_not_calculated_correctly'));
+ }
}
-
+
}
}
- public function datatable(){
-
-
- if(Request::get('shipping_is_for') === 'me' || Request::get('shipping_is_for') === 'abo-me'){
- $show_on = Request::get('is_abo') ? '12' : '2';
- $query = Product::with('product_buyings')
- ->select('products.*')->where('products.active', true)
- ->whereJsonContains('products.show_on', $show_on)
- ->whereDoesntHave('product_buyings', function ($q){
- $q->where('product_buyings.user_id', '=', \Auth::user()->id);
- });
- }else{
- $show_on = Request::get('is_abo') ? '13' : '3';
- $query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', $show_on);
+ public function datatable()
+ {
+ $isAbo = Request::get('is_abo');
+ $shippingIsFor = Request::get('shipping_is_for');
+
+ if ($shippingIsFor === 'me' || $shippingIsFor === 'abo-me') {
+ $show_on_ids = $isAbo ? ['12', '13'] : ['2'];
+
+ $query = Product::with('product_buyings')
+ ->select('products.*')
+ ->where('products.active', true)
+ ->where(function($q) use ($show_on_ids) {
+ foreach ($show_on_ids as $id) {
+ $q->orWhereJsonContains('show_on', $id);
+ }
+ })
+ ->orderByRaw("CASE
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2
+ ELSE 3 END",
+ [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]);
+ } else {
+ $show_on_ids = $isAbo ? ['12', '13'] : ['3'];
+
+ $query = Product::select('products.*')
+ ->where('active', true)
+ ->where(function($q) use ($show_on_ids) {
+ foreach ($show_on_ids as $id) {
+ $q->orWhereJsonContains('show_on', $id);
+ }
+ })
+ ->orderByRaw("CASE
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2
+ ELSE 3 END",
+ [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]);
}
+
+ Log::channel(self::LOG_CHANNEL)->info("Datatable query executed", [
+ 'is_abo' => $isAbo,
+ 'shipping_is_for' => $shippingIsFor,
+ 'show_on_ids' => $show_on_ids
+ ]);
+
return \DataTables::eloquent($query)
-
->addColumn('product', function (Product $product) {
$cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id);
$qty = isset($cartItem->qty) ? $cartItem->qty : 0;
@@ -407,30 +627,9 @@ class OrderController extends Controller
';
})
- /*
-
- ->addColumn('add_card', function (Product $product) {
- return '';
+ ->addColumn('abo', function (Product $product) {
+ return AboHelper::getAboTypeBadge(AboHelper::getAboShowOn($product));
})
- ->addColumn('quantity', function (Product $product) {
- $cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id);
- $qty = isset($cartItem->qty) ? $cartItem->qty : 0;
- $rowId = isset($cartItem->rowId) ? $cartItem->rowId : '';
- return '';
-
- })*/
->addColumn('picture', function (Product $product) {
if(count($product->images)){
return '';
@@ -477,200 +676,289 @@ class OrderController extends Controller
->orderColumn('my_commission_net', 'price $1')
->orderColumn('contents_total', 'contents_total $1')
->orderColumn('weight', 'weight $1')
-
- ->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'customer_price_net', 'customer_price_gross', 'my_commission_net', 'product', 'quantity', 'picture', 'action'])
+ ->orderColumn('abo', 'show_on $1')
+ ->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'customer_price_net', 'customer_price_gross', 'my_commission_net', 'product', 'quantity', 'picture', 'abo', 'action'])
->make(true);
}
-
- public function performRequest(){
-
- if(Request::ajax()) {
- $data = Request::all();
-
- $is_for = isset($data['shipping_is_for']) ? $data['shipping_is_for'] : 'ot-member';
- $data['for'] = $is_for;
- $data['comp_products'] = $this->getCompProducts($is_for);
-
- if($data['action'] === 'updateCart' && isset($data['product_id'])){
- if($product = Product::find($data['product_id'])){
- $image = "";
- if($product->images->count()){
- $image = $product->images->first()->slug;
- }
-
- //get the card item
- if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer'){
- $cartItem = Yard::instance('shopping')
- ->add($product->id, $product->getLang('name'), 1,
- round($product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), 1), false, false,
- ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]);
- }else{
- $cartItem = Yard::instance('shopping')
- ->add($product->id, $product->getLang('name'), 1,
- $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), true, Yard::instance('shopping')->getUserCountry()), false, false,
- ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]);
- }
- if(Yard::instance('shopping')->getUserTaxFree()){
- Yard::setTax($cartItem->rowId, 0);
- }else{
- Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry()));
- }
- if(isset($data['qty']) && $data['qty'] > 0){
- Yard::instance('shopping')->update($cartItem->rowId, $data['qty']);
- }else{
- //if 0 get the item by qty:1 and remove it
- Yard::instance('shopping')->remove($cartItem->rowId);
- }
- Yard::instance('shopping')->reCalculateShippingPrice();
- $this->checkCompProduct(Yard::instance('shopping')->getNumComp());
- $html_card = view("user.order.yard_view_form", $data)->render();
- $html_comp = view("user.order.comp_product", $data)->render();
-
- return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
- }
- }
- if($data['action'] === 'clearCart') {
- Yard::instance('shopping')->destroy();
- return response()->json(['response' => true, 'data'=>Yard::instance('shopping')->count(), 'html_card'=>'', 'html_comp'=>'']);
-
- }
-
- if($data['action'] === 'updateShippingCountry') {
- if(isset($data['shipping_country_id'])){
- if($shipping_country = ShippingCountry::find($data['shipping_country_id'])){
- Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country->id, $is_for);
- $this->checkCompProduct(Yard::instance('shopping')->getNumComp());
- }
- }
- $html_card = view("user.order.yard_view_form", $data)->render();
- $html_comp = view("user.order.comp_product", $data)->render();
- return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
-
- }
- if($data['action'] === 'updateCompProduct'){
- // $data['comp_product_id']
- // $data['comp_num']
- //count_comp_products
- $this->updateCompProduct($data);
- Yard::instance('shopping')->reCalculateShippingPrice();
- $html_card = view("user.order.yard_view_form", $data)->render();
- $html_comp = view("user.order.comp_product", $data)->render();
-
- return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
-
- }
- return response()->json(['response' => false, 'data'=>$data]);
+ /**
+ * Handle AJAX requests for cart operations
+ */
+ public function performRequest()
+ {
+ if (!Request::ajax()) {
+ Log::channel(self::LOG_CHANNEL)->warning("Non-AJAX request to performRequest method");
+ return response()->json(['response' => false, 'message' => 'Only AJAX requests are allowed']);
}
+
+ $data = Request::all();
+ $is_for = isset($data['shipping_is_for']) ? $data['shipping_is_for'] : 'ot-member';
+ $data['for'] = $is_for;
+ $data['comp_products'] = Shop::getCompProducts($is_for);
+
+ Log::channel(self::LOG_CHANNEL)->info("Performing cart action", [
+ 'action' => $data['action'] ?? 'unknown',
+ 'is_for' => $is_for
+ ]);
+
+ if ($data['action'] === 'updateCart' && isset($data['product_id'])) {
+ return $this->handleUpdateCart($data, $is_for);
+ }
+
+ if ($data['action'] === 'clearCart') {
+ Yard::instance('shopping')->destroy();
+ Log::channel(self::LOG_CHANNEL)->info("Cart cleared");
+ return response()->json(['response' => true, 'data' => Yard::instance('shopping')->count(), 'html_card' => '', 'html_comp' => '']);
+ }
+
+ if ($data['action'] === 'updateShippingCountry') {
+ return $this->handleUpdateShippingCountry($data, $is_for);
+ }
+
+ if ($data['action'] === 'updateCompProduct') {
+ return $this->handleUpdateCompProduct($data, $is_for);
+ }
+
+ Log::channel(self::LOG_CHANNEL)->warning("Unknown action in performRequest", ['action' => $data['action'] ?? 'not set']);
+ return response()->json(['response' => false, 'data' => $data]);
}
- private function checkCompProduct($count_comp_products){
+ /**
+ * Handle updating cart items
+ */
+ private function handleUpdateCart($data, $is_for)
+ {
+ $product = Product::find($data['product_id']);
+ if (!$product) {
+ Log::channel(self::LOG_CHANNEL)->warning("Product not found for cart update", ['product_id' => $data['product_id']]);
+ return response()->json(['response' => false, 'message' => 'Product not found']);
+ }
+
+ $image = "";
+ if ($product->images->count()) {
+ $image = $product->images->first()->slug;
+ }
+
+ // Get the cart item
+ if ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer') {
+ $cartItem = Yard::instance('shopping')
+ ->add($product->id, $product->getLang('name'), 1,
+ round($product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), 1), false, false,
+ ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
+ } else {
+ $cartItem = Yard::instance('shopping')
+ ->add($product->id, $product->getLang('name'), 1,
+ $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), true, Yard::instance('shopping')->getUserCountry()), false, false,
+ ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
+ }
+
+ if (Yard::instance('shopping')->getUserTaxFree()) {
+ Yard::setTax($cartItem->rowId, 0);
+ } else {
+ Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry()));
+ }
+
+ if (isset($data['qty']) && $data['qty'] > 0) {
+ Yard::instance('shopping')->update($cartItem->rowId, $data['qty']);
+ Log::channel(self::LOG_CHANNEL)->info("Cart item updated", [
+ 'product_id' => $product->id,
+ 'product_name' => $product->getLang('name'),
+ 'qty' => $data['qty']
+ ]);
+ } else {
+ // If 0 get the item by qty:1 and remove it
+ Yard::instance('shopping')->remove($cartItem->rowId);
+ Log::channel(self::LOG_CHANNEL)->info("Cart item removed", [
+ 'product_id' => $product->id,
+ 'product_name' => $product->getLang('name')
+ ]);
+ }
+
+ Yard::instance('shopping')->reCalculateShippingPrice();
+ $this->checkCompProduct(Yard::instance('shopping')->getNumComp());
+
+ $html_card = view("user.order.yard_view_form", $data)->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+
+ return response()->json(['response' => true, 'data' => $data, 'html_card' => $html_card, 'html_comp' => $html_comp]);
+ }
+
+ /**
+ * Handle updating shipping country
+ */
+ private function handleUpdateShippingCountry($data, $is_for)
+ {
+ if (isset($data['shipping_country_id'])) {
+ $shipping_country = ShippingCountry::find($data['shipping_country_id']);
+ if ($shipping_country) {
+ Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country->id, $is_for);
+ $this->checkCompProduct(Yard::instance('shopping')->getNumComp());
+
+ Log::channel(self::LOG_CHANNEL)->info("Shipping country updated", [
+ 'shipping_country_id' => $shipping_country->id,
+ 'shipping_country_name' => $shipping_country->name ?? 'unknown'
+ ]);
+ } else {
+ Log::channel(self::LOG_CHANNEL)->warning("Shipping country not found", [
+ 'shipping_country_id' => $data['shipping_country_id']
+ ]);
+ }
+ }
+
+ $html_card = view("user.order.yard_view_form", $data)->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+
+ return response()->json(['response' => true, 'data' => $data, 'html_card' => $html_card, 'html_comp' => $html_comp]);
+ }
+
+ /**
+ * Handle updating compensation products
+ */
+ private function handleUpdateCompProduct($data, $is_for)
+ {
+ $this->updateCompProduct($data);
+ Yard::instance('shopping')->reCalculateShippingPrice();
+
+ Log::channel(self::LOG_CHANNEL)->info("Compensation product updated", [
+ 'comp_product_id' => $data['comp_product_id'] ?? null,
+ 'comp_num' => $data['comp_num'] ?? null,
+ 'count_comp_products' => $data['count_comp_products'] ?? null
+ ]);
+
+ $html_card = view("user.order.yard_view_form", $data)->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+
+ return response()->json(['response' => true, 'data' => $data, 'html_card' => $html_card, 'html_comp' => $html_comp]);
+ }
+
+ /**
+ * Check and remove compensation products if needed
+ */
+ private function checkCompProduct($count_comp_products)
+ {
foreach (Yard::instance('shopping')->content() as $row) {
- //wenn gleich löschen, da neue Versandkosten
- if($row->options->comp > $count_comp_products) {
+ // If equal or greater, delete due to new shipping costs
+ if ($row->options->comp && $row->options->comp > intval($count_comp_products)) {
Yard::instance('shopping')->remove($row->rowId);
+ Log::channel(self::LOG_CHANNEL)->info("Compensation product removed due to count change", [
+ 'product_id' => $row->id,
+ 'product_name' => $row->name,
+ 'comp_value' => $row->options->comp,
+ 'required_comp' => $count_comp_products
+ ]);
}
}
}
- private function updateCompProduct($data){
- //clear old
- foreach (Yard::instance('shopping')->content() as $row) {
- //wenn kleiner wurde ein produkt entfernt aufgrund der Anzahl
- //wenn gleich löschen, da neue Versandkosten
- if($row->options->comp === $data['comp_num'] || $row->options->comp > $data['count_comp_products']) {
- Yard::instance('shopping')->remove($row->rowId);
- }
- }
+ /**
+ * Update compensation products
+ */
+ private function updateCompProduct($data)
+ {
+ // Clear old
+ foreach (Yard::instance('shopping')->content() as $row) {
+ // If count_comp_products is smaller, the product was removed due to quantity
+ // if comp_num equals the comp product, the product was removed due to new shipping costs
+ //count_comp_products wie viele comp products werden gebraucht
+ //comp_num welches comp product wird hinzugefügt
+ if ($row->options->comp && ($row->options->comp == intval($data['comp_num']) || $row->options->comp > intval($data['count_comp_products']))) {
+ Yard::instance('shopping')->remove($row->rowId);
+ Log::channel(self::LOG_CHANNEL)->info("Compensation product removed during update", [
+ 'product_id' => $row->id,
+ 'product_name' => $row->name,
+ 'comp_value' => $row->options->comp,
+ 'comp_num' => $data['comp_num'],
+ 'count_comp_products' => $data['count_comp_products']
+ ]);
+ }
+ }
- if(isset($data['comp_product_id'])) {
- if ($product = Product::find($data['comp_product_id'])) {
- $image = "";
- if ($product->images->count()) {
- $image = $product->images->first()->slug;
- }
- $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false,
- ['image' => $image, 'slug' => $product->slug, 'weight' => 0, 'points' => 0,
- 'comp' => $data['comp_num'], 'product_id' => $product->id]);
- Yard::setTax($cartItem->rowId, 0);
+ if (isset($data['comp_product_id'])) {
+ $product = Product::find($data['comp_product_id']);
+ if ($product) {
+ $image = "";
+ if ($product->images->count()) {
+ $image = $product->images->first()->slug;
}
+ $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false, [
+ 'image' => $image,
+ 'slug' => $product->slug,
+ 'weight' => 0,
+ 'points' => 0,
+ 'comp' => intval($data['comp_num']),
+ 'product_id' => $product->id
+ ]
+ );
+
+ Yard::setTax($cartItem->rowId, 0);
+
+ Log::channel(self::LOG_CHANNEL)->info("Compensation product added", [
+ 'product_id' => $product->id,
+ 'product_name' => $product->getLang('name'),
+ 'comp_num' => $data['comp_num']
+ ]);
+ } else {
+ Log::channel(self::LOG_CHANNEL)->warning("Compensation product not found", [
+ 'comp_product_id' => $data['comp_product_id']
+ ]);
}
+ }
}
- private function getCompProducts($for){
- if(Shop::isCompProducts($for)){
- $show_on = '0';
- switch($for){
- case 'me':
- $show_on = '2';
- break;
- case 'abo-me':
- $show_on = '12';
- break;
- case 'ot-member':
- $show_on = '3';
- break;
- case 'ot-customer':
- $show_on = '3';
- break;
- case 'abo-ot-member':
- $show_on = '13';
- break;
- case 'abo-ot-customer':
- $show_on = '13';
- break;
- }
- return Product::whereActive(true)->where('shipping_addon', true)->whereJsonContains('show_on', $show_on)->orderBy('pos', 'DESC')->get();
+ /**
+ * Display custom payment page
+ */
+ public function customPayment($identifier)
+ {
+ try {
+ $data = OrderPaymentService::getCustomPayment($identifier);
+ Log::channel(self::LOG_CHANNEL)->info("Custom payment page accessed", ['identifier' => $identifier]);
+ return view('user.order.payment.custom_payment', $data);
+ } catch (\Exception $e) {
+ Log::channel(self::LOG_CHANNEL)->error("Error accessing custom payment: " . $e->getMessage(), ['identifier' => $identifier]);
+ abort(404, 'Custom payment not found');
}
-
- return null;
}
- public function customPayment($identifier){
-
- $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first();
- if(!$shopping_instance){
- abort(403, __('msg.shopping_instance_not_found'));
- }
- $shopping_data = $shopping_instance->shopping_data;
- $shopping_user = $shopping_data['shopping_user_id'] ? ShoppingUser::find($shopping_data['shopping_user_id']) : null;
- if(!$shopping_user){
- abort(403, __('msg.shopping_user_not_found'));
- }
-
- $yard_shopping_items = Shop::getYardShoppingItems();
-
- $data = [
- 'shopping_instance' => $shopping_instance,
- 'shopping_user' => $shopping_user,
- 'yard_shopping_items' => $yard_shopping_items,
- 'identifier' => $identifier,
- ];
- return view('user.order.custom_payment', $data);
- }
-
-
- private static function customPaymentSendMail($user, $identifier, $yard_shopping_items, $data){
+ /**
+ * Send custom payment email
+ */
+ private function customPaymentSendMail($user, $identifier, $yard_shopping_items, $data)
+ {
$bcc = [];
$shopping_instance = ShoppingInstance::where('identifier', $identifier)->first();
- if(!$shopping_instance){
- abort(403, __('msg.shopping_instance_not_found'));
+
+ if (!$shopping_instance) {
+ Log::channel(self::LOG_CHANNEL)->error("Shopping instance not found for email", ['identifier' => $identifier]);
+ throw new \Exception(__('msg.shopping_instance_not_found'));
}
+
$shopping_user = $data['shopping_user_id'] ? ShoppingUser::find($data['shopping_user_id']) : null;
- if(!$shopping_user){
- abort(403, __('msg.shopping_user_not_found'));
+
+ if (!$shopping_user) {
+ Log::channel(self::LOG_CHANNEL)->error("Shopping user not found for email", ['shopping_user_id' => $data['shopping_user_id']]);
+ throw new \Exception(__('msg.shopping_user_not_found'));
}
- $route = route('checkout.checkout_card', ['identifier'=>$identifier]);
-
+ $route = route('checkout.checkout_card', ['identifier' => $identifier]);
+
$billing_email = $shopping_user->billing_email;
- if(!$billing_email){
+ if (!$billing_email) {
$billing_email = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail');
}
+
$bcc[] = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail');
$bcc[] = $shopping_user->member ? $shopping_user->member->email : $user->email;
- Mail::to($billing_email)->bcc($bcc)->locale(\App::getLocale())
+ Log::channel(self::LOG_CHANNEL)->info("Sending custom payment email", [
+ 'to' => $billing_email,
+ 'bcc' => $bcc,
+ 'identifier' => $identifier
+ ]);
+
+ Mail::to($billing_email)
+ ->bcc($bcc)
+ ->locale(\App::getLocale())
->send(new MailCustomPaymet($route, $shopping_user, $shopping_instance, $yard_shopping_items, $data['mode']));
}
}
\ No newline at end of file
diff --git a/app/Http/Controllers/User/OrderController_bak.php b/app/Http/Controllers/User/OrderController_bak.php
new file mode 100644
index 0000000..3323d65
--- /dev/null
+++ b/app/Http/Controllers/User/OrderController_bak.php
@@ -0,0 +1,674 @@
+middleware('active.account');
+ }
+
+ public function index()
+ {
+
+ $data = [
+ ];
+ return view('user.order.index', $data);
+ }
+
+ public function detail($id)
+ {
+ $user = User::find(\Auth::user()->id);
+ $shopping_order = ShoppingOrder::findOrFail($id);
+ if($shopping_order->auth_user_id !== $user->id){
+ abort(404);
+ }
+ if( $shopping_order->payment_for === 6 || $shopping_order->payment_for === 7){
+ return redirect(route('user_shop_order_detail', [$shopping_order->id]));
+ abort(403, 'Kundenbestellung');
+ }
+ $shopping_order->getLastShoppingPayment();
+
+ $data = [
+ 'shopping_order' => $shopping_order,
+ 'isAdmin' => false,
+ ];
+ return view('user.order.detail', $data);
+ }
+
+ public function ordersDatatable(){
+
+ $user = User::find(\Auth::user()->id);
+ $query = ShoppingOrder::with('shopping_user', 'shopping_payments')->select('shopping_orders.*')->where('auth_user_id', '=', $user->id)->where('txaction', '!=', NULL);
+
+ return \DataTables::eloquent($query)
+ ->addColumn('id', function (ShoppingOrder $ShoppingOrder) {
+ return ' ';
+ })
+ ->addColumn('created_at', function (ShoppingOrder $ShoppingOrder) {
+ return $ShoppingOrder->created_at->format("d.m.Y");
+ })
+ ->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) {
+ return Payment::getShoppingOrderBadge($ShoppingOrder);
+ })
+ ->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) {
+ return ''.$ShoppingOrder->getFormattedTotalShipping()." € ";
+ })
+ ->addColumn('payment', function (ShoppingOrder $ShoppingOrder) {
+ return $ShoppingOrder->getLastShoppingPayment('getPaymentType');
+ })
+ ->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) {
+ if($ShoppingOrder->payment_for === 8){
+ return ' ';
+ }
+ return ''.$ShoppingOrder->getShippedType().' ';
+ })
+ ->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) {
+ return Payment::getPaymentForBadge($ShoppingOrder);
+
+ })
+ ->addColumn('invoice', function (ShoppingOrder $ShoppingOrder) {
+ return $ShoppingOrder->isInvoice() ? '
+ ' : '-';
+ })
+ ->addColumn('reference', function (ShoppingOrder $ShoppingOrder) {
+ return $ShoppingOrder->getLastShoppingPayment('reference');
+ })
+ ->orderColumn('id', 'id $1')
+ ->orderColumn('txaction', 'txaction $1')
+ ->orderColumn('shipped', 'shipped $1')
+ ->orderColumn('total_shipping', 'total_shipping $1')
+ ->orderColumn('payment_for', 'payment_for $1')
+
+ ->rawColumns(['id', 'txaction', 'payment_for', 'total_shipping', 'invoice', 'shipped'])
+ ->make(true);
+ }
+
+ /*
+ $for = me, ot-member, ot-customer, abo-ot-member, abo-ot-customer, abo-me
+ */
+
+ public function delivery($for, $id=null)
+ {
+ $user = User::find(\Auth::user()->id);
+ $shopping_user = null;
+ $delivery_id = null;
+ if(strpos($for, 'ot') !== false){ //ot-member, ot-customer abo-ot-member, abo-ot-customer,
+ $shopping_user = Shop::checkShoppingUser($id, $user);
+ $delivery_id = $shopping_user->id;
+ if(!Shop::checkShoppingCountry($for, $delivery_id) && !\Session()->has('custom-error')){
+ $country = Shop::getDeliveryCountry($for, $delivery_id);
+ \Session()->flash('custom-error', $country.": ".__('validation.custom.shipping_not_found'));
+ return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
+ }
+ if($for === 'abo-ot-customer'){
+ //check if user has an Abo
+ if(AboHelper::hasAboByEmail($shopping_user->billing_email) && !\Session()->has('custom-error')){
+ \Session()->flash('custom-error', __('abo.error_email_has_abo', ['email' => $shopping_user->billing_email]));
+ return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
+ }
+ }
+ }
+ if(Request::get('action') === 'next'){
+ Yard::instance('shopping')->destroy();
+ if(strpos(Request::get('switchers-radio-is-for'), 'ot') !== false){
+ $delivery_id = $id;
+ }
+ return redirect(route('user_order_my_list', [Request::get('switchers-radio-is-for'), $delivery_id]));
+ }
+ $data = [
+ 'shopping_user' => $shopping_user,
+ 'isAdmin' => false,
+ 'isView' => 'customer',
+ 'for' => $for,
+ 'delivery_id' => $delivery_id,
+ ];
+ return view('user.order.delivery', $data);
+ }
+
+ public function list($for, $id=null)
+ {
+ $user = User::find(\Auth::user()->id);
+ if($for === 'abo-me' && AboHelper::userHasAbo($user)){
+ abort(403, 'User has an Abo. Cannot order.');
+ }
+ $shopping_user = null;
+ $delivery_id = null;
+ if(strpos($for, 'ot') !== false){ //ot-member, ot-customer abo-ot-member, abo-ot-customer,
+ $shopping_user = Shop::checkShoppingUser($id, $user);
+ $delivery_id = $shopping_user->id;
+ }
+ if($for === 'ot-customer' || $for === 'abo-ot-customer'){
+ //Liederung an (abo-) ot-customer (Kunden) Zahlung und Rechnung geht an Kunden
+ UserService::initCustomerYard($shopping_user, $for);
+ }else{
+ //Lieferung an user oder (abo-) ot-member (Kunden) rechnung geht an User
+ //lieferland und rechnungsland prüfen
+ $shipping_country_id = Shop::checkShoppingCountry($for, $id);
+ if(!$shipping_country_id){
+ $country = Shop::getDeliveryCountry($for, $id);
+ \Session()->flash('custom-error', $country.": ".__('validation.custom.shipping_not_found'));
+ return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
+ }
+ UserService::initUserYard($user, $shipping_country_id, $for);
+ }
+ $data = [
+ 'shopping_user' => $shopping_user,
+ 'user' => $user,
+ 'isAdmin' => false,
+ 'isView' => 'customer',
+ 'for' => $for,
+ 'template' => str_replace('abo-', '', $for),
+ 'delivery_id' => $delivery_id,
+ 'is_abo' => strpos($for, 'abo') !== false,
+ 'comp_products' => Shop::getCompProducts($for),
+ ];
+ return view('user.order.list', $data);
+ }
+
+ public function payment($for, $id=null){
+ $data = Request::all();
+ $user = User::find(Auth::user()->id);
+ $rules = array(
+ 'shipping_salutation' => 'required',
+ 'shipping_firstname'=>'required',
+ 'shipping_lastname'=>'required',
+ 'shipping_address'=>'required',
+ 'shipping_zipcode'=>'required',
+ 'shipping_city' => 'required',
+ 'shipping_state' => 'required',
+ );
+ $validator = Validator::make(Request::all(), $rules);
+ if ($validator->fails()) {
+ return back()->withErrors($validator)->withInput(Request::all());
+ }
+ //hier prüfen, ob versand etc richtig berechnet wurde
+ $this->checkSendYardForPayment($data, $id);
+
+ if(Yard::instance('shopping')->getNumComp() > 0){
+ if(!isset($data['switchers-comp-product'])){
+ $validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product'));
+ }else{
+ if(!is_array($data['switchers-comp-product'])){
+ $validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product'));
+ }else{
+ if(count($data['switchers-comp-product']) !== Yard::instance('shopping')->getNumComp()){
+ $validator->errors()->add('switchers-comp-product', __('mdg.please_select_count_compensation_products', ['count'=>Yard::instance('shopping')->getNumComp()]));
+ }
+ }
+ }
+ if ($validator->errors()->count()) {
+ return back()->withErrors($validator)->withInput(Request::all());
+ }
+ }
+ do {
+ $identifier = Util::getToken();
+ } while( ShoppingInstance::where('identifier', $identifier)->count() );
+ $data['is_from'] = 'user_order';
+ $data['is_for'] = $for;
+ $data['is_abo'] = $data['is_abo'] ?? 0;
+ $data['abo_interval'] = $data['abo_interval'] ?? 0;
+ $data['shopping_user_id'] = $id;
+ $data['user_price_infos'] = Yard::instance('shopping')->getUserPriceInfos();
+ unset($data['quantity']);
+ unset($data['_token']);
+ $data['mode'] = config('app.mode') === 'test' ? 'test' : 'live';
+ if($for === 'ot-customer' || $for === 'abo-ot-customer'){
+ $shopping_instance = ShoppingInstance::create([
+ 'identifier' => $identifier,
+ 'user_shop_id' => $user->shop->id,
+ 'payment' => 6, //Berater Shop to Customer Shop
+ 'subdomain' => $user->shop->getSubdomain(),
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'amount' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'status' => 0,
+ 'shopping_user_id' => $id,
+ 'shopping_data' => $data,
+ 'back' => url()->previous(),
+
+ ]);
+ Yard::instance('shopping')->store($identifier);
+ $yard_shopping_items = OrderPaymentService::getRestoredYardShoppingItems($shopping_instance);
+
+ // send Mail to Customer
+ $this->customPaymentSendMail($user, $identifier, $yard_shopping_items, $data);
+ UserHistory::create(['user_id' => $user->id, 'action'=>'user_order_customer', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier, 'is_abo'=>$data['is_abo']]);
+
+ //eine Abschließen bestellseite für den User + Link zum Kunden Shop + Mail an den Kunden / Berater
+ return redirect(route('user_order_my_custom_payment', ['identifier'=>$identifier]));
+ }else{
+ ShoppingInstance::create([
+ 'identifier' => $identifier,
+ 'user_shop_id' => 1, //is first faker shop for buy intern
+ 'auth_user_id' => Auth::user()->id,
+ 'payment' => 2, //Berater Shop
+ 'subdomain' => url('/'),
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'amount' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'status' => 0,
+ 'shopping_user_id' => $id,
+ 'shopping_data' => $data,
+ 'back' => url()->previous(),
+
+ ]);
+ Yard::instance('shopping')->store($identifier);
+ $path = route('checkout.checkout_card', ['identifier'=>$identifier]);
+ UserHistory::create(['user_id' => $user->id, 'action'=>'user_order_payment', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier, 'is_abo'=>$data['is_abo']]);
+ //$path = str_replace('http', 'https', $path);
+ return redirect()->secure($path);
+ }
+
+ }
+
+ private function checkSendYardForPayment($data, $id){
+
+ $user = User::find(\Auth::user()->id);
+ $shopping_user = null;
+ if(strpos($data['shipping_is_for'], 'ot') !== false){
+ $shopping_user = Shop::checkShoppingUser($id, $user);
+ }
+
+ $shipping_country_id = Shop::checkShoppingCountry($data['shipping_is_for'], $id);
+ if(!$shipping_country_id){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'no shipping_country_id found | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shipping_country_was_not_found'));
+ }
+ //must be the same shipping country
+ if($shipping_country_id != Yard::instance('shopping')->getShippingCountryId()){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'shipping_country_id is not the same from Yard | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shipping_country_was_not_correctly'));
+ }
+
+ if($data['shipping_is_for'] !== 'ot-customer'){
+ if(Yard::instance('shopping')->shipping_free){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'Yard can by not shipping_free | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shopping_cart_was_shipping_free'));
+ }
+ }
+
+ if($data['shipping_is_for'] === 'ot-customer'){
+ if(!$user->shop){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'User has no Shop for an User to Customer order| Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shopping_cart_was_not_user_shop'));
+ }
+ }
+
+ $shipping_price = Shop::getShippingPriceByShippingCountryId($shipping_country_id, Yard::instance('shopping')->weight());
+ dump($shipping_price);
+ //for other and has weight - check
+ if(strpos($data['shipping_is_for'], 'ot') !== false && $data['shipping_is_for'] !== 'ot-customer' && Yard::instance('shopping')->weight() > 0){
+ if(!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is 0 or | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shipping_cost_cannot_be_0'));
+ }
+ if(Yard::instance('shopping')->getShippingPrice() != $shipping_price->price){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is not the same from shipping_price | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shipping_costs_were_not_calculated_correctly'));
+ }
+ }
+ if(($data['shipping_is_for'] == 'me' || $data['shipping_is_for'] == 'abo-me') && Yard::instance('shopping')->weight() > 0){
+ if(!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is 0 or | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shipping_cost_cannot_be_0'));
+ }
+ dump(Yard::instance('shopping')->getShippingPrice());
+ dump($shipping_price->price_comp);
+ dump(Yard::instance('shopping')->getNumComp());
+ dump($shipping_price->num_comp);
+ dd($data) ;
+
+ if(Yard::instance('shopping')->getShippingPrice() != $shipping_price->price_comp){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is not the same from shipping_price | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.shipping_costs_were_not_calculated_correctly'));
+ }
+
+ if(Yard::instance('shopping')->getNumComp() != $shipping_price->num_comp){
+ $identifier = 'error-'.time().mt_rand(1000000, 9999999);
+ Yard::instance('shopping')->store($identifier);
+ $data['user_id'] = Auth::user()->id;
+ $data['shopping_user_id'] = $id;
+ \App\Services\MyLog::writeLog('payment', 'error', 'Yard num_comp is 0 | Yard identifier: '.$identifier, $data);
+ abort(403, __('msg.compensation_products_cannot_be_0'));
+ }
+
+ }
+ }
+
+ public function datatable(){
+
+
+ if(Request::get('shipping_is_for') === 'me' || Request::get('shipping_is_for') === 'abo-me'){
+ $show_on_ids = Request::get('is_abo') ? ['12', '13'] : ['2'];
+ $query = Product::with('product_buyings')
+ ->select('products.*')->where('products.active', true)
+ ->where(function($q) use ($show_on_ids) {
+ foreach($show_on_ids as $id) {
+ $q->orWhereJsonContains('show_on', $id);
+ }
+ })
+ ->orderByRaw("CASE
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2
+ ELSE 3 END",
+ [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]);
+ }else{
+ $show_on_ids = Request::get('is_abo') ? ['12', '13'] : ['3'];
+ $query = Product::select('products.*')
+ ->where('active', true)
+ ->where(function($q) use ($show_on_ids) {
+ foreach($show_on_ids as $id) {
+ $q->orWhereJsonContains('show_on', $id);
+ }
+ })
+ ->orderByRaw("CASE
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1
+ WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2
+ ELSE 3 END",
+ [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]);
+ }
+ return \DataTables::eloquent($query)
+
+ ->addColumn('product', function (Product $product) {
+ $cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id);
+ $qty = isset($cartItem->qty) ? $cartItem->qty : 0;
+ $rowId = isset($cartItem->rowId) ? $cartItem->rowId : '';
+ return ''.$product->getLang('name').'
+ ';
+ })
+ ->addColumn('abo', function (Product $product) {
+ return AboHelper::getAboTypeBadge(AboHelper::getAboShowOn($product));
+ })
+ /*
+ ->addColumn('add_card', function (Product $product) {
+ return '';
+ })
+ ->addColumn('quantity', function (Product $product) {
+ $cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id);
+ $qty = isset($cartItem->qty) ? $cartItem->qty : 0;
+ $rowId = isset($cartItem->rowId) ? $cartItem->rowId : '';
+ return '';
+
+ })*/
+ ->addColumn('picture', function (Product $product) {
+ if(count($product->images)){
+ return '';
+ }
+ return "";
+ })
+ ->addColumn('price_net', function (Product $product) {
+ return ''.$product->getFormattedPriceWith(true, true, Yard::instance('shopping')->getUserCountry()). " € ".''.$product->getFormattedPriceCurrencyWith(true, true, Yard::instance('shopping')->getUserCountry()).' ';
+ })
+ ->addColumn('price_gross', function (Product $product) {
+ return ''.$product->getFormattedPriceWith(false, true, Yard::instance('shopping')->getUserCountry()). " € ".''.$product->getFormattedPriceCurrencyWith(false, true, Yard::instance('shopping')->getUserCountry()).' ';
+ })
+ ->addColumn('price_vk_gross', function (Product $product) {
+ return ''.$product->getFormattedPriceWith(false, false, Yard::instance('shopping')->getUserCountry()). " € ".''.$product->getFormattedPriceCurrencyWith(false, false, Yard::instance('shopping')->getUserCountry()).' ';
+ })
+ ->addColumn('customer_price_net', function (Product $product) {
+ return ''.$product->getFormattedPriceWith(true, false, Yard::instance('shopping')->getUserCountry()). " € ".''.$product->getFormattedPriceCurrencyWith(true, false, Yard::instance('shopping')->getUserCountry()).' ';
+ })
+ ->addColumn('customer_price_gross', function (Product $product) {
+ return ''.$product->getFormattedPriceWith(false, false, Yard::instance('shopping')->getUserCountry()). " € ".''.$product->getFormattedPriceCurrencyWith(false, false, Yard::instance('shopping')->getUserCountry()).' ';
+ })
+ ->addColumn('my_commission_net', function (Product $product) {
+ return ''.$product->getFormattedPriceWith(true, false, Yard::instance('shopping')->getUserCountry(), true). " € ".''.$product->getFormattedPriceCurrencyWith(true, false, Yard::instance('shopping')->getUserCountry(), true).' ';
+ })
+ ->addColumn('action', function (Product $product) {
+ return ' ';
+ })
+ ->filterColumn('product', function($query, $keyword) {
+ if($keyword != ""){
+ $query->where('name', 'LIKE', '%'.$keyword.'%');
+ }
+ })
+ ->orderColumn('name', 'name $1')
+ ->orderColumn('product', 'name $1')
+ ->orderColumn('number', 'number $1')
+ ->orderColumn('points', 'points $1')
+ ->orderColumn('price_net', 'price_net $1')
+ ->orderColumn('price_gross', 'price_gross $1')
+ ->orderColumn('price_vk_gross', 'price $1')
+ ->orderColumn('customer_price_net', 'price $1')
+ ->orderColumn('customer_price_gross', 'price $1')
+ ->orderColumn('my_commission_net', 'price $1')
+ ->orderColumn('contents_total', 'contents_total $1')
+ ->orderColumn('weight', 'weight $1')
+ ->orderColumn('abo', 'show_on $1')
+ ->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'customer_price_net', 'customer_price_gross', 'my_commission_net', 'product', 'quantity', 'picture', 'abo', 'action'])
+ ->make(true);
+ }
+
+
+ public function performRequest(){
+
+ if(Request::ajax()) {
+ $data = Request::all();
+
+ $is_for = isset($data['shipping_is_for']) ? $data['shipping_is_for'] : 'ot-member';
+ $data['for'] = $is_for;
+ $data['comp_products'] = Shop::getCompProducts($is_for);
+
+ if($data['action'] === 'updateCart' && isset($data['product_id'])){
+ if($product = Product::find($data['product_id'])){
+ $image = "";
+ if($product->images->count()){
+ $image = $product->images->first()->slug;
+ }
+
+ //get the card item
+ if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer'){
+ $cartItem = Yard::instance('shopping')
+ ->add($product->id, $product->getLang('name'), 1,
+ round($product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), 1), false, false,
+ ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
+ }else{
+ $cartItem = Yard::instance('shopping')
+ ->add($product->id, $product->getLang('name'), 1,
+ $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), true, Yard::instance('shopping')->getUserCountry()), false, false,
+ ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
+ }
+ if(Yard::instance('shopping')->getUserTaxFree()){
+ Yard::setTax($cartItem->rowId, 0);
+ }else{
+ Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry()));
+ }
+ if(isset($data['qty']) && $data['qty'] > 0){
+ Yard::instance('shopping')->update($cartItem->rowId, $data['qty']);
+ }else{
+ //if 0 get the item by qty:1 and remove it
+ Yard::instance('shopping')->remove($cartItem->rowId);
+ }
+ Yard::instance('shopping')->reCalculateShippingPrice();
+ $this->checkCompProduct(Yard::instance('shopping')->getNumComp());
+ $html_card = view("user.order.yard_view_form", $data)->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+
+ return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
+ }
+ }
+ if($data['action'] === 'clearCart') {
+ Yard::instance('shopping')->destroy();
+ return response()->json(['response' => true, 'data'=>Yard::instance('shopping')->count(), 'html_card'=>'', 'html_comp'=>'']);
+
+ }
+
+ if($data['action'] === 'updateShippingCountry') {
+ if(isset($data['shipping_country_id'])){
+ if($shipping_country = ShippingCountry::find($data['shipping_country_id'])){
+ Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country->id, $is_for);
+ $this->checkCompProduct(Yard::instance('shopping')->getNumComp());
+ }
+ }
+ $html_card = view("user.order.yard_view_form", $data)->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+ return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
+
+ }
+ if($data['action'] === 'updateCompProduct'){
+ // $data['comp_product_id']
+ // $data['comp_num']
+ //count_comp_products
+ $this->updateCompProduct($data);
+ Yard::instance('shopping')->reCalculateShippingPrice();
+ $html_card = view("user.order.yard_view_form", $data)->render();
+ $html_comp = view("user.order.comp_product", $data)->render();
+
+ return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
+
+ }
+ return response()->json(['response' => false, 'data'=>$data]);
+ }
+ }
+
+ private function checkCompProduct($count_comp_products){
+ foreach (Yard::instance('shopping')->content() as $row) {
+ //wenn gleich löschen, da neue Versandkosten
+ if($row->options->comp > $count_comp_products) {
+ Yard::instance('shopping')->remove($row->rowId);
+ }
+ }
+ }
+
+ private function updateCompProduct($data){
+ //clear old
+ foreach (Yard::instance('shopping')->content() as $row) {
+ //wenn kleiner wurde ein produkt entfernt aufgrund der Anzahl
+ //wenn gleich löschen, da neue Versandkosten
+ if($row->options->comp === $data['comp_num'] || $row->options->comp > $data['count_comp_products']) {
+ Yard::instance('shopping')->remove($row->rowId);
+ }
+ }
+
+ if(isset($data['comp_product_id'])) {
+ if ($product = Product::find($data['comp_product_id'])) {
+ $image = "";
+ if ($product->images->count()) {
+ $image = $product->images->first()->slug;
+ }
+ $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false,
+ ['image' => $image, 'slug' => $product->slug, 'weight' => 0, 'points' => 0,
+ 'comp' => $data['comp_num'], 'product_id' => $product->id]);
+ Yard::setTax($cartItem->rowId, 0);
+ }
+ }
+ }
+
+ public function customPayment($identifier){
+
+ $data = OrderPaymentService::getCustomPayment($identifier);
+ return view('user.order.payment.custom_payment', $data);
+ }
+
+
+ private static function customPaymentSendMail($user, $identifier, $yard_shopping_items, $data){
+ $bcc = [];
+ $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first();
+ if(!$shopping_instance){
+ abort(403, __('msg.shopping_instance_not_found'));
+ }
+ $shopping_user = $data['shopping_user_id'] ? ShoppingUser::find($data['shopping_user_id']) : null;
+ if(!$shopping_user){
+ abort(403, __('msg.shopping_user_not_found'));
+ }
+
+ $route = route('checkout.checkout_card', ['identifier'=>$identifier]);
+
+ $billing_email = $shopping_user->billing_email;
+ if(!$billing_email){
+ $billing_email = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail');
+ }
+ $bcc[] = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail');
+ $bcc[] = $shopping_user->member ? $shopping_user->member->email : $user->email;
+
+ Mail::to($billing_email)->bcc($bcc)->locale(\App::getLocale())
+ ->send(new MailCustomPaymet($route, $shopping_user, $shopping_instance, $yard_shopping_items, $data['mode']));
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/User/OrderPaymentController.php b/app/Http/Controllers/User/OrderPaymentController.php
new file mode 100644
index 0000000..5934028
--- /dev/null
+++ b/app/Http/Controllers/User/OrderPaymentController.php
@@ -0,0 +1,97 @@
+middleware('active.account');
+ }
+
+ public function index()
+ {
+ $data = [
+ ];
+ return view('user.order.payment.index', $data);
+ }
+
+ public function detail($identifier)
+ {
+ $data = OrderPaymentService::getCustomPayment($identifier);
+ $data['backlink'] = route('user_order_payment_links');
+ return view('user.order.payment.custom_payment', $data);
+ }
+
+ public function delete($identifier){
+ OrderPaymentService::deleteInstance($identifier);
+ return redirect(route('user_order_payment_links'));
+ }
+
+ public function datatable(){
+
+ $user = User::find(\Auth::user()->id);
+ $user_shop_id = $user->shop ? $user->shop->id : null;
+ $query = ShoppingInstance::select('*')
+ ->where('user_shop_id', '=', $user_shop_id)
+ ->where('payment', 6);
+
+ return \DataTables::eloquent($query)
+ ->addColumn('id', function (ShoppingInstance $shoppingInstance) {
+ return ' ';
+ })
+ ->addColumn('created_at', function (ShoppingInstance $shoppingInstance) {
+ return $shoppingInstance->created_at->format("d.m.Y");
+ })
+ ->addColumn('status', function (ShoppingInstance $shoppingInstance) {
+ return OrderPaymentService::getStatusBadge($shoppingInstance);
+ })
+ ->addColumn('payment_method', function (ShoppingInstance $shoppingInstance) {
+ return $shoppingInstance->payment_method ? $shoppingInstance->payment_method->name : '-';
+ })
+ ->addColumn('total', function (ShoppingInstance $shoppingInstance) {
+ if($shoppingInstance->amount > 0){
+ return ''.$shoppingInstance->getAmountFormatted()." € ";
+ }else{
+ return '-';
+ }
+ })
+ ->addColumn('type', function (ShoppingInstance $shoppingInstance) {
+ return OrderPaymentService::getTypeBadge($shoppingInstance);
+ })
+ ->addColumn('billing_firstname', function (ShoppingInstance $shoppingInstance) {
+ return $shoppingInstance->shopping_data['billing_firstname'] ?? '-';
+ })
+ ->addColumn('billing_lastname', function (ShoppingInstance $shoppingInstance) {
+ return $shoppingInstance->shopping_data['billing_lastname'] ?? '-';
+ })
+ ->addColumn('billing_email', function (ShoppingInstance $shoppingInstance) {
+ return $shoppingInstance->shopping_data['billing_email'] ?? '-';
+ })
+ ->addColumn('delete', function (ShoppingInstance $shoppingInstance) {
+ return ' ';
+ })
+
+ ->orderColumn('id', 'identifier $1')
+ ->orderColumn('created_at', 'created_at $1')
+ ->orderColumn('status', 'status $1')
+ ->orderColumn('total', 'total $1')
+ ->orderColumn('type', 'type $1')
+ ->orderColumn('billing_firstname', 'billing_firstname $1')
+ ->orderColumn('billing_lastname', 'billing_lastname $1')
+ ->orderColumn('billing_email', 'billing_email $1')
+ ->rawColumns(['id', 'status', 'type', 'total', 'invoice', 'delete'])
+ ->make(true);
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/User/PaymentController.php b/app/Http/Controllers/User/PaymentController.php
index 47050b8..dd340f3 100644
--- a/app/Http/Controllers/User/PaymentController.php
+++ b/app/Http/Controllers/User/PaymentController.php
@@ -50,10 +50,9 @@ class PaymentController extends Controller
if(Credit::isCredit($UserCredit)){
$ret .= ' ';
$ret .= ' ';
- if(Auth::user()->isVIP()){
- $ret .= ' ';
- $ret .= ' ';
- }
+ $ret .= ' ';
+ $ret .= ' ';
+
}else{
$ret = "-";
}
diff --git a/app/Http/Controllers/User/ShopApiController.php b/app/Http/Controllers/User/ShopApiController.php
index 0fdc918..8ff418f 100644
--- a/app/Http/Controllers/User/ShopApiController.php
+++ b/app/Http/Controllers/User/ShopApiController.php
@@ -146,7 +146,7 @@ class ShopApiController extends Controller
return $ShoppingOrder->user_shop ? ''.$ShoppingOrder->user_shop->getSubdomain(false).' ' : '';
})
->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) {
- return ''.$ShoppingOrder->getPaymentForType().' ';
+ return Payment::getPaymentForBadge($ShoppingOrder);
})
->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) {
return ''.$ShoppingOrder->getShippedType().'
diff --git a/app/Http/Controllers/User/ShopSalesController.php b/app/Http/Controllers/User/ShopSalesController.php
index 9078162..9003cf6 100755
--- a/app/Http/Controllers/User/ShopSalesController.php
+++ b/app/Http/Controllers/User/ShopSalesController.php
@@ -28,7 +28,7 @@ class ShopSalesController extends Controller
$user = User::find(\Auth::user()->id);
$shopping_order = ShoppingOrder::findOrFail($id);
if($shopping_order->member_id !== $user->id){
- abort(404);
+ abort(403, 'Unauthorized action. User ID does not match.');
}
if( $shopping_order->payment_for !== 6 && $shopping_order->payment_for !== 7){
return redirect(route('user_order_detail', [$shopping_order->id]));
@@ -67,7 +67,7 @@ class ShopSalesController extends Controller
return $ShoppingOrder->user_shop ? ''.$ShoppingOrder->user_shop->getSubdomain(false).'' : '';
})
->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) {
- return ''.$ShoppingOrder->getPaymentForType().' ';
+ return Payment::getPaymentForBadge($ShoppingOrder);
})
->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) {
return ''.$ShoppingOrder->getShippedType().'
diff --git a/app/Http/Controllers/User/TeamController.php b/app/Http/Controllers/User/TeamController.php
index dedb1d2..7978739 100755
--- a/app/Http/Controllers/User/TeamController.php
+++ b/app/Http/Controllers/User/TeamController.php
@@ -2,6 +2,7 @@
namespace App\Http\Controllers\User;
+
use Auth;
use Request;
use App\User;
@@ -26,11 +27,11 @@ class TeamController extends Controller
public function members()
{
$user = User::find(\Auth::user()->id);
- if($user->isActiveShop() && $user->shop){
- $shop_register_link = $user->shop->getSubdomain(false)."/reg";
- }else{
- $member_id = 'm'.($user->id + config('mivita.add_number_id'));
- $shop_register_link = config('app.protocol').config('app.domain').config('app.tld_care').'/reg/'.$member_id;
+ if ($user->isActiveShop() && $user->shop) {
+ $shop_register_link = $user->shop->getSubdomain(false) . "/reg";
+ } else {
+ $member_id = 'm' . ($user->id + config('mivita.add_number_id'));
+ $shop_register_link = config('app.protocol') . config('app.domain') . config('app.tld_care') . '/reg/' . $member_id;
}
$data = [
'shop_register_link' => $shop_register_link
@@ -71,7 +72,7 @@ class TeamController extends Controller
{
$user = User::find(\Auth::user()->id);
- if(!$user->isVIP()){
+ if (!$user->isVIP()) {
abort(404);
}
$ExportBot = new ExportBot('member');
@@ -82,14 +83,15 @@ class TeamController extends Controller
return view('user.team.export', $data);
}
- public function userTeamExport(){
+ public function userTeamExport()
+ {
- if(Request::get('action') === "export"){
+ if (Request::get('action') === "export") {
$user = User::find(\Auth::user()->id);
$ExportBot = new ExportBot('member');
$ExportBot->initStructureUser($user, 'list'); //tree or list
$columns = [];
- $filename = __('team.filename_export').date('Y-m-d-H-i-s');
+ $filename = __('team.filename_export') . date('Y-m-d-H-i-s');
$headers = array(
__('tables.line'),
__('tables.level'),
@@ -104,12 +106,13 @@ class TeamController extends Controller
__('tables.phone'),
__('tables.mobil'),
__('tables.birthday'),
+ __('tables.partner_since'),
__('tables.account'),
__('tables.account_to'),
__('tables.sponsor'),
);
- if(isset($ExportBot->user_list->childs)){
- foreach ($ExportBot->user_list->childs as $child){
+ if (isset($ExportBot->user_list->childs)) {
+ foreach ($ExportBot->user_list->childs as $child) {
$columns[] = array(
__('tables.line') => $child->line,
__('tables.level') => $child->level_name,
@@ -124,42 +127,44 @@ class TeamController extends Controller
__('tables.phone') => $child->phone,
__('tables.mobil') => $child->mobil,
__('tables.birthday') => $child->birthday,
+ __('tables.partner_since') => $child->partner_since,
__('tables.account') => ($child->active_account == 1 ? __('yes') : __('no')),
__('tables.account_to') => $child->payment_account_date,
__('tables.sponsor') => $child->sponsor_name,
);
}
}
- return Excel::download(new UserTeamExport($columns, $headers), $filename.'.xls');
+ return Excel::download(new UserTeamExport($columns, $headers), $filename . '.xls');
}
}
- private function setFilterVars(){
+ private function setFilterVars()
+ {
- if(!session('team_user_filter_month')){
+ if (!session('team_user_filter_month')) {
session(['team_user_filter_month' => intval(date('m'))]);
}
- if(!session('team_user_filter_year')){
+ if (!session('team_user_filter_year')) {
session(['team_user_filter_year' => intval(date('Y'))]);
}
- if(!session('team_user_points_filter_month')){
+ if (!session('team_user_points_filter_month')) {
session(['team_user_points_filter_month' => intval(date('m'))]);
}
- if(!session('team_user_points_filter_year')){
+ if (!session('team_user_points_filter_year')) {
session(['team_user_points_filter_year' => intval(date('Y'))]);
}
-
- if(Request::get('team_user_filter_month')){
+
+ if (Request::get('team_user_filter_month')) {
session(['team_user_filter_month' => Request::get('team_user_filter_month')]);
}
- if(Request::get('team_user_filter_year')){
+ if (Request::get('team_user_filter_year')) {
session(['team_user_filter_year' => Request::get('team_user_filter_year')]);
}
- if(Request::get('team_user_points_filter_month')){
+ if (Request::get('team_user_points_filter_month')) {
session(['team_user_points_filter_month' => Request::get('team_user_points_filter_month')]);
}
- if(Request::get('team_user_points_filter_year')){
+ if (Request::get('team_user_points_filter_year')) {
session(['team_user_points_filter_year' => Request::get('team_user_points_filter_year')]);
}
}
@@ -170,46 +175,47 @@ class TeamController extends Controller
$user_id = \Auth::user()->id;
$query = UserSalesVolume::with('user', 'user.account')->with('shopping_order')->select('user_sales_volumes.*')
- ->where('user_sales_volumes.user_id', '=', $user_id)
- ->where('user_sales_volumes.month', '=', Request::get('team_user_points_filter_month'))
- ->where('user_sales_volumes.year', '=', Request::get('team_user_points_filter_year'));
+ ->where('user_sales_volumes.user_id', '=', $user_id)
+ ->where('user_sales_volumes.month', '=', Request::get('team_user_points_filter_month'))
+ ->where('user_sales_volumes.year', '=', Request::get('team_user_points_filter_year'));
return $query;
}
- public function datatablePoints(){
+ public function datatablePoints()
+ {
$query = $this->initSearchPoints();
return \DataTables::eloquent($query)
-
+
->addColumn('order', function (UserSalesVolume $UserSalesVolume) {
- if($UserSalesVolume->shopping_order){
- if($UserSalesVolume->status === 1 && $UserSalesVolume->shopping_order->auth_user_id === $UserSalesVolume->user_id){
- return ' '.$UserSalesVolume->shopping_order->id.' ';
+ if ($UserSalesVolume->shopping_order) {
+ if ($UserSalesVolume->status === 1 && $UserSalesVolume->shopping_order->auth_user_id === $UserSalesVolume->user_id) {
+ return '' . $UserSalesVolume->shopping_order->id . ' ';
}
- if(($UserSalesVolume->status === 2 || $UserSalesVolume->status === 3) && $UserSalesVolume->shopping_order->member_id === $UserSalesVolume->user_id){
- return ''.$UserSalesVolume->shopping_order->id.' ';
+ if (($UserSalesVolume->status === 2 || $UserSalesVolume->status === 3) && $UserSalesVolume->shopping_order->member_id === $UserSalesVolume->user_id) {
+ return '' . $UserSalesVolume->shopping_order->id . ' ';
}
}
return '';
})
->addColumn('total_net', function (UserSalesVolume $UserSalesVolume) {
- return formatNumber($UserSalesVolume->total_net).' €';
+ return formatNumber($UserSalesVolume->total_net) . ' €';
})
->addColumn('status_turnover', function (UserSalesVolume $UserSalesVolume) {
- return ''.$UserSalesVolume->getStatusTurnoverType().' ';
+ return '' . $UserSalesVolume->getStatusTurnoverType() . ' ';
})
->addColumn('status', function (UserSalesVolume $UserSalesVolume) {
- return ''.$UserSalesVolume->getStatusType().' ';
+ return '' . $UserSalesVolume->getStatusType() . ' ';
})
->addColumn('message', function (UserSalesVolume $UserSalesVolume) {
- return ''.$UserSalesVolume->message.' ';
+ return '' . $UserSalesVolume->message . ' ';
})
->addColumn('info', function (UserSalesVolume $UserSalesVolume) {
- return ''.$UserSalesVolume->info.' ';
+ return '' . $UserSalesVolume->info . ' ';
})
-
+
->orderColumn('id', 'id $1')
->orderColumn('order', 'order $1')
->orderColumn('status', 'status $1')
@@ -220,7 +226,8 @@ class TeamController extends Controller
->make(true);
}
- public function load(){
+ public function load()
+ {
$user = User::find(\Auth::user()->id);
$userSalesVolume = $user->getUserSalesVolume(intval(session('team_user_points_filter_month')), intval(session('team_user_points_filter_year')), 'first');
@@ -229,9 +236,6 @@ class TeamController extends Controller
'userSalesVolume' => $userSalesVolume,
];
$html = view('user.team._points_sum', $data)->render();
- return response()->json(['response' => true, 'data'=>$data, 'html'=>$html]);
-
+ return response()->json(['response' => true, 'data' => $data, 'html' => $html]);
}
-
-
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/UserDataController.php b/app/Http/Controllers/UserDataController.php
index 1a7cf78..2936081 100755
--- a/app/Http/Controllers/UserDataController.php
+++ b/app/Http/Controllers/UserDataController.php
@@ -64,6 +64,9 @@ class UserDataController extends Controller
'city' => 'required',
'email' => 'required|string|email|max:255|exists:users,email',
'email-confirm' => 'required|same:email',
+ 'bank_owner' => 'required',
+ 'bank_iban' => 'required',
+ 'bank_bic' => 'required',
);
if(!Request::get('same_as_billing')){
$rules = array_merge($rules, [
diff --git a/app/Http/Controllers/Web/CardController.php b/app/Http/Controllers/Web/CardController.php
index fb55deb..0dde4f2 100755
--- a/app/Http/Controllers/Web/CardController.php
+++ b/app/Http/Controllers/Web/CardController.php
@@ -36,7 +36,7 @@ class CardController extends Controller
$cartItem = Yard::instance('shopping')
->add($product->id, $product->getLang('name'), $quantity,
$product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false,
- ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]);
+ ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping, 'show_on' => $product->show_on]);
if(Yard::instance('shopping')->getUserTaxFree()){
Yard::setTax($cartItem->rowId, 0);
}else{
@@ -65,7 +65,7 @@ class CardController extends Controller
$cartItem = Yard::instance('shopping')
->add($product->id, $product->getLang('name'), $quantity,
$product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false,
- ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]);
+ ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping, 'show_on' => $product->show_on]);
if(Yard::instance('shopping')->getUserTaxFree()){
Yard::setTax($cartItem->rowId, 0);
}else{
diff --git a/app/Http/Controllers/Web/CheckoutController.php b/app/Http/Controllers/Web/CheckoutController.php
index c2fbc92..3d7f0ea 100755
--- a/app/Http/Controllers/Web/CheckoutController.php
+++ b/app/Http/Controllers/Web/CheckoutController.php
@@ -2,114 +2,92 @@
namespace App\Http\Controllers\Web;
-
-use Yard;
-use Request;
-use App\User;
-use Validator;
+use App\Http\Controllers\Controller;
+use App\Http\Controllers\Pay\PayoneController;
+use App\Models\PaymentTransaction;
+use App\Models\ShoppingOrder;
+use App\Models\ShoppingPayment;
+use App\Models\ShoppingUser;
+use App\Repositories\CheckoutRepository;
+use App\Services\AboHelper;
+use App\Services\CustomerPriority;
+use App\Services\OrderPaymentService;
+use App\Services\Payment;
use App\Services\Shop;
use App\Services\Util;
-use App\Models\Homeparty;
-use App\Services\Payment;
-use App\Services\AboHelper;
-use App\Models\ShoppingUser;
-use App\Models\PaymentMethod;
-use App\Models\ShoppingOrder;
-use App\Models\ShippingCountry;
-use App\Models\ShoppingPayment;
-use App\Models\ShoppingOrderItem;
-use App\Models\PaymentTransaction;
-use App\Services\CustomerPriority;
-use Illuminate\Support\Collection;
-use App\Http\Controllers\Controller;
-use App\Models\ShoppingCollectOrder;
-use Illuminate\Session\SessionManager;
-use App\Http\Controllers\Pay\PayoneController;
+use App\User;
+use Illuminate\Support\Facades\Session;
+use Request;
+use Validator;
+use Yard;
class CheckoutController extends Controller
{
- private $session;
- private $instance;
+ private $checkoutRepo;
+
/**
* Create a new controller instance.
*
* @return void
*/
- public function __construct(SessionManager $session)
+ public function __construct(CheckoutRepository $checkoutRepository)
{
- $this->session = $session;
- $this->instance = sprintf('%s.%s', 'cart', 'payments');
+ $this->checkoutRepo = $checkoutRepository;
}
+ /**
+ * Zeigt die Checkout-Seite an
+ *
+ * @return \Illuminate\View\View
+ */
+ public function checkout()
+ {
+ $shopping_data = Yard::instance('shopping')->getYardExtra('shopping_data');
+ $is_from = $shopping_data['is_from'] ?? 'shopping';
+ $is_for = $shopping_data['is_for'] ?? false;
+ $is_abo = isset($shopping_data['is_abo']) ? (bool) $shopping_data['is_abo'] : false;
+ $abo_interval = $shopping_data['abo_interval'] ?? 0;
+ $homeparty_id = $shopping_data['homeparty_id'] ?? null;
+ $shopping_user = null;
- public function checkout(){
-
- // dump(Request::all());
-// $user_shop = Util::getUserShop();
- $shopping_data = Yard::instance('shopping')->getYardExtra('shopping_data');
-
- $is_from = isset($shopping_data['is_from']) ? $shopping_data['is_from'] : 'shopping';
- $is_for = isset($shopping_data['is_for']) ? $shopping_data['is_for'] : false;
- $is_abo = isset($shopping_data['is_abo']) ? (bool) $shopping_data['is_abo'] : false;
- $abo_interval = isset($shopping_data['abo_interval']) ? $shopping_data['abo_interval'] : 0;
- if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer'){
+ if ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer') {
$is_from = 'shopping';
- }
- $homeparty_id = isset($shopping_data['homeparty_id']) ? $shopping_data['homeparty_id'] : null;
- $shopping_user = null;
-
- if(\Session::has('new_session')){
- $this->destroy();
- \Session::forget('new_session');
- }
-
- if(!$this->getPayments('shopping_user_id')){
- if($shopping_data && $is_from !== 'shopping'){
- //can wizard membership user_order
- //$shopping_user_id = isset($shopping_data['shopping_user_id']) ? $shopping_data['shopping_user_id'] : false;
- $shopping_user = $this->shoppingUserAuthData($is_from, $is_for, $shopping_data);
- $shopping_user->save();
- $this->putPayments('shopping_user_id', $shopping_user->id);
- }elseif($is_from === 'shopping' && ($is_for !== 'ot-customer' || $is_for !== 'abo-ot-customer')){
- $shopping_user = new ShoppingUser();
- $shopping_user->is_for = $is_for;
- $shopping_user->is_from = $is_from;
- $shopping_user->homeparty_id = $homeparty_id;
- $shopping_user->mode = 'prev';
- $shopping_user->language = \App::getLocale();
- }elseif($is_from === 'shopping' && ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer')){
- $shopping_user = $this->makeCustomerShoppingUser($shopping_data);
- $shopping_user->is_for = $is_for;
- $shopping_user->is_from = $is_from;
- $shopping_user->mode = 'prev';
- $shopping_user->language = \App::getLocale();
- }
- }else{
- $shopping_user = ShoppingUser::findOrFail($this->getPayments('shopping_user_id'));
- $shopping_user->billing_state = Shop::getCountryShippingCountryId($shopping_user->billing_country_id);
- $shopping_user->shipping_state = Shop::getCountryShippingCountryId($shopping_user->shipping_country_id);
- $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert
- }
- if($shopping_user->same_as_billing === NULL){
- $shopping_user->same_as_billing = false;
}
- if(!$shopping_user->billing_country){
- $shopping_user->billing_country = Yard::instance('shopping')->getUserCountry();
- }
- if(!$shopping_user->shipping_country){
- $shopping_user->shipping_country = Yard::instance('shopping')->getUserCountry();
+ Util::setInstanceStatus(1, true); // link_check
+ if ($is_abo) {
+ $instance_status = Util::getInstanceStatus();
+ if ($instance_status === 'link_paid') {
+ return $this->redirectToIsFinal($instance_status);
+ }
}
- if(old('selected_country') && old('selected_country') === 'change'){
- \Session::forget('_old_input.selected_country');
- $shopping_user->billing_state = old('billing_state');
- $shopping_user->shipping_state = old('shipping_state');
- }else{
- $shopping_user->billing_state = Yard::instance('shopping')->getShippingCountryId();
- $shopping_user->shipping_state = Yard::instance('shopping')->getShippingCountryId();
+ if (Session::has('new_session')) {
+ $this->checkoutRepo->sessionDestroy();
+ Session::forget('new_session');
}
- $payment_methods = $this->getPaymentsMethods($is_from, $is_abo);
+
+ if (!$this->checkoutRepo->getSessionPayments('shopping_user_id')) {
+ if ($shopping_data && $is_from !== 'shopping') {
+ $shopping_user = $this->checkoutRepo->shoppingUserAuthData($is_from, $is_for, $shopping_data);
+ $shopping_user->save();
+ $this->checkoutRepo->putSessionPayments('shopping_user_id', $shopping_user->id);
+ } elseif ($is_from === 'shopping' && ($is_for !== 'ot-customer' && $is_for !== 'abo-ot-customer')) {
+ $shopping_user = $this->initializeShoppingUser($is_for, $is_from, $homeparty_id);
+ } elseif ($is_from === 'shopping' && ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer')) {
+ $shopping_user = $this->checkoutRepo->makeCustomerShoppingUser($shopping_data);
+ $shopping_user->is_for = $is_for;
+ $shopping_user->is_from = $is_from;
+ $shopping_user->mode = 'prev';
+ $shopping_user->language = \App::getLocale();
+ }
+ } else {
+ $shopping_user = $this->getExistingShoppingUser();
+ }
+
+ $this->prepareShoppingUserData($shopping_user);
+ $payment_methods = $this->checkoutRepo->getPaymentsMethods($is_from, $is_abo);
+
$data = [
'is_from' => $is_from,
'is_for' => $is_for,
@@ -122,332 +100,394 @@ class CheckoutController extends Controller
'payment_methods' => $payment_methods['default'],
'payment_methods_active' => $payment_methods['active'],
'payment_data' => $payment_methods['data'],
+ 'instance_status' => $instance_status ?? false,
];
+
return view('web.templates.checkout', $data);
}
- private function getPaymentsMethods($is_from, $is_abo = false){
- $payment_methods = [];
- if($is_from !== 'shopping' && Util::getAuthUser()){
- $user = Util::getAuthUser();
- $payment_methods['default'] = $user->payment_methods;
- $payment_methods['data'] = $user->account->payment_data;
- }else{
- $payment_methods['default'] = PaymentMethod::getDefaultAsArray($is_abo)->toArray();
- $payment_methods['data'] = false;
- }
- if($is_abo){
- $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->where('is_abo', true)->get()->pluck( 'id', 'short')->toArray();
- }else{
- $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->get()->pluck( 'id', 'short')->toArray();
- }
- return $payment_methods;
- }
-
- private function isPaymentsMethodsActive($payment_method, $is_from, $is_abo = false){
- $payment_names = ['wlt#PPE' => 'PP', 'cc' => 'CC', 'sb#PNT' => 'SB', 'elv' => 'SEPA', 'vor' => 'VOR', 'fnc#MIV' => 'FNC'];
- $payment_methods = $this->getPaymentsMethods($is_from, $is_abo);
- if(isset($payment_names[$payment_method])){
- $payment_with = $payment_names[$payment_method];
- if(array_key_exists($payment_with, $payment_methods['active']) && in_array($payment_methods['active'][$payment_with], $payment_methods['default'])){
- return true;
- }
- }
- abort(404);
- }
-
- private function shoppingUserAuthData($is_from, $is_for, $data = []){
-
- $user = Util::getAuthUser();
+ /**
+ * Initialisiert einen neuen ShoppingUser
+ *
+ * @param string $is_for
+ * @param string $is_from
+ * @param int|null $homeparty_id
+ * @return ShoppingUser
+ */
+ private function initializeShoppingUser($is_for, $is_from, $homeparty_id = null)
+ {
$shopping_user = new ShoppingUser();
- $shopping_user->auth_user_id = $user->id;
+ $shopping_user->is_for = $is_for;
+ $shopping_user->is_from = $is_from;
+ $shopping_user->homeparty_id = $homeparty_id;
$shopping_user->mode = 'prev';
$shopping_user->language = \App::getLocale();
- $shopping_user->billing_salutation = $user->account->salutation;
- $shopping_user->billing_company = $user->account->company;
- $shopping_user->billing_firstname = $user->account->first_name;
- $shopping_user->billing_lastname = $user->account->last_name;
- $shopping_user->billing_address = $user->account->address;
- $shopping_user->billing_address_2 = $user->account->address_2;
- $shopping_user->billing_zipcode = $user->account->zipcode;
- $shopping_user->billing_city = $user->account->city;
- $shopping_user->billing_country_id = $user->account->country_id;
- $shopping_user->billing_phone = $user->account->phone;
- $shopping_user->billing_email = $user->email;
- $shopping_user->faker_mail = false;
- $shopping_user->shipping_email = $user->email;
-
- $shopping_user->accepted_data_checkbox = 1;
- $shopping_user->is_for = $is_for;
- $shopping_user->is_from = $is_from;
- $shopping_user->homeparty_id = isset($data['homeparty_id']) ? $data['homeparty_id'] : null;
- $shopping_user->shopping_collect_order_id = isset($data['shopping_collect_order_id']) ? $data['shopping_collect_order_id'] : null;
-
- //Lieferadresse
- if($is_from === 'user_order'){
- if(isset($data['shopping_user_id']) && strpos($data['is_for'], 'ot') !== false){
- $s_user = ShoppingUser::findOrFail($data['shopping_user_id']);
- /* $shopping_user->billing_salutation = $s_user->billing_salutation;
- $shopping_user->billing_company = $s_user->billing_company;
- $shopping_user->billing_firstname = $s_user->billing_firstname;
- $shopping_user->billing_lastname = $s_user->billing_lastname;
- $shopping_user->billing_address = $s_user->billing_address;
- $shopping_user->billing_address_2 = $s_user->billing_address_2;
- $shopping_user->billing_zipcode = $s_user->billing_zipcode;
- $shopping_user->billing_city = $s_user->billing_city;
- $shopping_user->billing_country_id = $s_user->billing_country_id;
- $shopping_user->billing_phone = $s_user->billing_phone;
- $shopping_user->billing_email = $s_user->billing_email;
- ;*/
- $shopping_user->faker_mail = $s_user->faker_mail;
- if(!$s_user->faker_mail){
- $shopping_user->shipping_email = $s_user->billing_email;
- }
- $shopping_user->shopping_user_id = $data['shopping_user_id'];
- $shopping_user->member_id = $s_user->member_id;
- }
- $shopping_user->same_as_billing = true;
- $shopping_user->shipping_salutation = isset($data['shipping_salutation']) ? $data['shipping_salutation'] : '';
- $shopping_user->shipping_company = isset($data['shipping_company']) ? $data['shipping_company'] : '';
- $shopping_user->shipping_firstname = isset($data['shipping_firstname']) ? $data['shipping_firstname'] : '';
- $shopping_user->shipping_lastname = isset($data['shipping_lastname']) ? $data['shipping_lastname'] : '';
- $shopping_user->shipping_address = isset($data['shipping_address']) ? $data['shipping_address'] : '';
- $shopping_user->shipping_address_2 = isset($data['shipping_address_2']) ? $data['shipping_address_2'] : '';
- $shopping_user->shipping_zipcode = isset($data['shipping_zipcode']) ? $data['shipping_zipcode'] : '';
- $shopping_user->shipping_city = isset($data['shipping_city']) ? $data['shipping_city'] : '';
- $shopping_user->shipping_country_id = Yard::instance('shopping')->getShippingCountryCountryId();
- $shopping_user->shipping_phone = isset($data['shipping_phone']) ? $data['shipping_phone'] : '';
-
- }else{
- $shopping_user->same_as_billing = $user->account->same_as_billing ? false : true;
- $shopping_user->shipping_salutation = $user->account->shipping_salutation;
- $shopping_user->shipping_company = $user->account->shipping_company;
- $shopping_user->shipping_firstname = $user->account->shipping_firstname;
- $shopping_user->shipping_lastname = $user->account->shipping_lastname;
- $shopping_user->shipping_address = $user->account->shipping_address;
- $shopping_user->shipping_address_2 = $user->account->shipping_address_2;
- $shopping_user->shipping_zipcode = $user->account->shipping_zipcode;
- $shopping_user->shipping_city = $user->account->shipping_city;
- $shopping_user->shipping_country_id = $user->account->shipping_country_id;
- $shopping_user->shipping_phone = $user->account->shipping_phone;
- }
-
return $shopping_user;
}
- public function checkoutFinal(){
+ /**
+ * Holt den existierenden ShoppingUser und bereitet ihn vor
+ *
+ * @return ShoppingUser
+ */
+ private function getExistingShoppingUser()
+ {
+ $shopping_user = ShoppingUser::findOrFail($this->checkoutRepo->getSessionPayments('shopping_user_id'));
+ $shopping_user->billing_state = Shop::getCountryShippingCountryId($shopping_user->billing_country_id);
+ $shopping_user->shipping_state = Shop::getCountryShippingCountryId($shopping_user->shipping_country_id);
+ $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; // reinvert
+
+ return $shopping_user;
+ }
+ /**
+ * Bereitet die ShoppingUser-Daten vor
+ *
+ * @param ShoppingUser $shopping_user
+ * @return void
+ */
+ private function prepareShoppingUserData(ShoppingUser $shopping_user)
+ {
+ if ($shopping_user->same_as_billing === NULL) {
+ $shopping_user->same_as_billing = false;
+ }
+
+ if (!$shopping_user->billing_country_id) {
+ $shopping_user->billing_country_id = Yard::instance('shopping')->getUserCountryId();
+ // Die Zeile unten entfernen, da die Relation automatisch geladen wird
+ // $shopping_user->billing_country = Yard::instance('shopping')->getUserCountry();
+ }
+
+ if (!$shopping_user->shipping_country_id) {
+ $shopping_user->shipping_country_id = Yard::instance('shopping')->getUserCountryId();
+ // Die Zeile unten entfernen, da die Relation automatisch geladen wird
+ // $shopping_user->shipping_country = Yard::instance('shopping')->getUserCountry();
+ }
+ if (old('selected_country') && old('selected_country') === 'change') {
+ Session::forget('_old_input.selected_country');
+ $shopping_user->billing_state = old('billing_state');
+ $shopping_user->shipping_state = old('shipping_state');
+ } else {
+ $shopping_user->billing_state = Yard::instance('shopping')->getShippingCountryId();
+ $shopping_user->shipping_state = Yard::instance('shopping')->getShippingCountryId();
+ }
+ }
+
+ /**
+ * Verarbeitet den Checkout-Prozess
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ public function checkoutFinal()
+ {
$data = Request::all();
- if(isset($data['payment_method'])){
- $this->isPaymentsMethodsActive($data['payment_method'], $data['is_from'], $data['is_abo']);
+
+ if (isset($data['payment_method'])) {
+ $this->checkoutRepo->isPaymentsMethodsActive($data['payment_method'], $data['is_from'], $data['is_abo']);
}
-
- //change selected Country
- if(isset($data['selected_country']) && $data['selected_country'] === 'change'){
- if(!Request::get('same_as_billing')){
- Yard::instance('shopping')->setShippingCountryWithPrice($data['billing_state'], $data['is_for']);
- }else{
- Yard::instance('shopping')->setShippingCountryWithPrice($data['shipping_state'], $data['is_for']);
- }
- return back()->withInput(Request::all());
+
+ Util::setInstanceStatus(2, true); // link_check
+
+ // Länderwechsel verarbeiten
+ if (isset($data['selected_country']) && $data['selected_country'] === 'change') {
+ return $this->handleCountryChange($data);
}
- $rules = array(
- 'billing_salutation' => 'required',
- 'billing_firstname'=>'required',
- 'billing_lastname'=>'required',
- 'billing_email'=>'required|email',
- 'billing_address'=>'required',
- 'billing_zipcode'=>'required',
- 'billing_city' => 'required',
- 'accepted_data_checkbox' => 'accepted',
- );
-
- if(Request::get('same_as_billing')){
- $rules = array_merge($rules, [
- 'shipping_firstname'=>'required',
- 'shipping_lastname'=>'required',
- 'shipping_address'=>'required',
- 'shipping_zipcode'=>'required',
- 'shipping_city' => 'required',
- 'shipping_salutation' => 'required'
-
- ]);
- }
- $validator = Validator::make(Request::all(), $rules);
+ // Validierung
+ $validator = $this->validateCheckoutData();
if ($validator->fails()) {
return back()->withErrors($validator)->withInput(Request::all());
}
- $data = Request::all();
- //make User
- $shopping_user = $this->makeShoppingUser($data);
-
- //make Order and Items
- $shopping_order = $this->makeShoppingOrder($shopping_user, $data);
-
- //delete session
- if(\Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){
- $user_shop_identifier = \Session::get('user_shop_identifier');
- Yard::instance('shopping')->deleteStoredCart($user_shop_identifier);
- \App\Models\ShoppingInstance::where('identifier', $user_shop_identifier)->delete();
+
+ // Benutzer und Bestellung erstellen
+ $shopping_user = $this->checkoutRepo->makeShoppingUser($data);
+ $shopping_order = $this->checkoutRepo->makeShoppingOrder($shopping_user, $data);
+
+ // CustomerPriority prüfen
+ if ($shopping_user->is_from === 'shopping') {
+ CustomerPriority::checkOne(ShoppingUser::find($shopping_user->id), true);
}
-
- //CustomerPriority
- if($shopping_user->is_from === 'shopping'){
- $ret = CustomerPriority::checkOne(ShoppingUser::find($shopping_user->id), true);
- }
- Util::setUserHistoryValue(['status'=>2, 'shopping_order_id'=>$shopping_order->id]);
+
+ Util::setUserHistoryValue(['status' => 2, 'shopping_order_id' => $shopping_order->id]);
- //check credit Card
- if(Request::get('payment_method')){
- $ret = [];
- //Rechnungskauf ohne PAYONE
- if(Request::get('payment_method') === 'fnc#MIV'){
-
- }
- //need precheck the card
- if(Request::get('payment_method') === 'cc'){
- $pay = new PayoneController();
- $pay->init($shopping_user, $shopping_order);
- $ret['cc'] = $pay->checkCreditCard($data);
- if($ret['cc']['status'] === 'ERROR' || $ret['cc']['status'] === 'INVALID'){
- /* PaymentTransaction::create([
- 'shopping_payment_id' => //is no shopping_payment_id at this moment,
- 'request' => 'creditcardcheck,
- 'errorcode' => $ret['cc']['errorcode'],
- 'errormessage' => $ret['cc']['errormessage'],
- 'customermessage' => $ret['cc']['customermessage'],
- 'status' => $response['status'],
- ]);*/
- \Session::flash('cc-error', 1);
- \Session::flash('errormessage', $ret['cc']['errormessage']);
- \Session::flash('customermessage', $ret['cc']['customermessage']);
- return redirect(route('checkout.checkout_card'))->withInput(Request::all());
- }
- if($ret['cc']['status'] === 'VALID'){
- /*
- * array(4) { ["status"]=> string(5) "VALID" ["pseudocardpan"]=> string(19) "9410010000169020567" ["cardtype"]=> string(1) "V" ["truncatedcardpan"]=> string(16) "411111XXXXXX1111" }
- * application through http post
- * get this to the prepayment
- * */
- }
- }
-
- //need precheck the SEPA
- if(Request::get('payment_method') === 'elv' && is_null(Request::get('mandate_identification'))){
- $pay = new PayoneController();
- $pay->init($shopping_user, $shopping_order);
- $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
- $ret['elv'] = $pay->checkBankAccount($data, $amount, 'EUR', $shopping_user);
- if($ret['elv']['status'] === 'ERROR' || $ret['elv']['status'] === 'INVALID'){
- /* PaymentTransaction::create([
- 'shopping_payment_id' => //is no shopping_payment_id at this moment,
- 'request' => 'creditcardcheck,
- 'errorcode' => $ret['cc']['errorcode'],
- 'errormessage' => $ret['cc']['errormessage'],
- 'customermessage' => $ret['cc']['customermessage'],
- 'status' => $response['status'],
- ]);*/
- \Session::flash('elv-error', 1);
- \Session::flash('errormessage', $ret['elv']['errormessage']);
- \Session::flash('customermessage', $ret['elv']['customermessage']);
- return redirect(route('checkout.checkout_card'))->withInput(Request::all());
- }
- // mandate_status active
- if($ret['elv']['status'] === 'APPROVED' && $ret['elv']['mandate_status'] !== "active"){
- \Session::flash('elv-managemandate', 1);
- \Session::flash('elv-mandate_identification', $ret['elv']['mandate_identification']);
- \Session::flash('elv-mandate_text', $ret['elv']['mandate_text']);
- \Session::flash('elv-creditor_identifier', $ret['elv']['creditor_identifier']);
- return redirect(route('checkout.checkout_card'))->withInput(Request::all());
-
- /*
- * array(4) { ["status"]=> string(5) "VALID" ["pseudocardpan"]=> string(19) "9410010000169020567" ["cardtype"]=> string(1) "V" ["truncatedcardpan"]=> string(16) "411111XXXXXX1111" }
- * application through http post
- * get this to the prepayment
- * */
- }
- $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder'];
-
- }
- if(Request::get('payment_method') === 'elv' && Request::get('mandate_identification')) {
- $ret['elv']['mandate_identification'] = Request::get('mandate_identification');
- $ret['elv']['creditor_identifier'] = Request::get('creditor_identifier');
- $ret['elv']['iban'] = $data['elv_iban'];
- $ret['elv']['bic'] = $data['elv_bic'];
- $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder'];
- //check abo and save the mandate
- $this->storeUserPaymentsData($shopping_user, $ret);
- }
- //other
- $pay = new PayoneController();
- $pay->init($shopping_user, $shopping_order);
- $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
- $reference = $pay->setPrePayment(Request::get('payment_method'), $amount, 'EUR', $ret);
- $this->putPayments('payment_reference', $reference);
- $pay->setPersonalData();
- return $pay->ResponseData();
+ // Zahlungsmethode verarbeiten
+ if (Request::get('payment_method')) {
+ return $this->processPaymentMethod($data, $shopping_user, $shopping_order);
}
return redirect()->back();
}
+ /**
+ * Verarbeitet den Länderwechsel
+ *
+ * @param array $data
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ private function handleCountryChange($data)
+ {
+ if (!Request::get('same_as_billing')) {
+ Yard::instance('shopping')->setShippingCountryWithPrice($data['billing_state'], $data['is_for']);
+ } else {
+ Yard::instance('shopping')->setShippingCountryWithPrice($data['shipping_state'], $data['is_for']);
+ }
+
+ return back()->withInput(Request::all());
+ }
- public function transactionStatus($status, $reference){
+ /**
+ * Validiert die Checkout-Daten
+ *
+ * @return \Illuminate\Validation\Validator
+ */
+ private function validateCheckoutData()
+ {
+ $rules = [
+ 'billing_salutation' => 'required',
+ 'billing_firstname' => 'required',
+ 'billing_lastname' => 'required',
+ 'billing_email' => 'required|email',
+ 'billing_address' => 'required',
+ 'billing_zipcode' => 'required',
+ 'billing_city' => 'required',
+ 'accepted_data_checkbox' => 'accepted',
+ ];
- $shopping_order_id = $this->getPayments('shopping_order_id');
+ if (Request::get('same_as_billing')) {
+ $rules = array_merge($rules, [
+ 'shipping_firstname' => 'required',
+ 'shipping_lastname' => 'required',
+ 'shipping_address' => 'required',
+ 'shipping_zipcode' => 'required',
+ 'shipping_city' => 'required',
+ 'shipping_salutation' => 'required'
+ ]);
+ }
+
+ return Validator::make(Request::all(), $rules);
+ }
- $ShoppingPayment = ShoppingPayment::where('shopping_order_id', $shopping_order_id)->where('reference', $reference)->first();
- if(!$ShoppingPayment){
- //TODO log this
- Util::setUserHistoryValue(['status'=>21]);
- \Session::flash('checkout-error', 'Der Zahlungsvorgang konnte nicht abgeschlossen werden, die Zahlung wurde nicht gefunden: '.$reference);
+ /**
+ * Verarbeitet die Zahlungsmethode
+ *
+ * @param array $data
+ * @param ShoppingUser $shopping_user
+ * @param ShoppingOrder $shopping_order
+ * @return mixed
+ */
+ private function processPaymentMethod($data, $shopping_user, $shopping_order)
+ {
+ $result = [];
+ $payment_method = Request::get('payment_method');
+
+ // Kreditkarte prüfen
+ if ($payment_method === 'cc') {
+ $result = $this->checkCreditCard($data, $shopping_user, $shopping_order);
+ if (!isset($result['returnstatus']) || $result['returnstatus'] !== 'VALID') {
+ return $result;
+ }
+ }
+
+ // SEPA prüfen
+ if ($payment_method === 'elv') {
+ $result = $this->checkSepaAccount($data, $shopping_user, $shopping_order);
+ if (!isset($result['returnstatus']) || $result['returnstatus'] !== 'VALID') {
+ return $result;
+ }
+ }
+
+ // Zahlung vorbereiten
+ $pay = new PayoneController();
+ $pay->init($shopping_user, $shopping_order);
+ $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
+ $reference = $pay->setPrePayment($payment_method, $amount, 'EUR', $result);
+ $this->checkoutRepo->putSessionPayments('payment_reference', $reference);
+ $pay->setPersonalData();
+
+ return $pay->ResponseData();
+ }
+
+ /**
+ * Prüft die Kreditkartendaten
+ *
+ * @param array $data
+ * @param ShoppingUser $shopping_user
+ * @param ShoppingOrder $shopping_order
+ * @return bool|\Illuminate\Http\RedirectResponse
+ */
+ private function checkCreditCard($data, $shopping_user, $shopping_order)
+ {
+ $pay = new PayoneController();
+ $pay->init($shopping_user, $shopping_order);
+ $ret['cc'] = $pay->checkCreditCard($data);
+
+ if ($ret['cc']['status'] === 'ERROR' || $ret['cc']['status'] === 'INVALID') {
+ Session::flash('cc-error', 1);
+ Session::flash('errormessage', $ret['cc']['errormessage']);
+ Session::flash('customermessage', $ret['cc']['customermessage']);
+ return redirect(route('checkout.checkout_card'))->withInput(Request::all());
+ }
+ $ret['returnstatus'] = 'VALID';
+ return $ret;
+ }
+
+ /**
+ * Prüft die SEPA-Kontodaten
+ *
+ * @param array $data
+ * @param ShoppingUser $shopping_user
+ * @param ShoppingOrder $shopping_order
+ * @return bool|\Illuminate\Http\RedirectResponse
+ */
+ private function checkSepaAccount($data, $shopping_user, $shopping_order)
+ {
+ if (is_null(Request::get('mandate_identification'))) {
+ $pay = new PayoneController();
+ $pay->init($shopping_user, $shopping_order);
+ $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
+ $ret['elv'] = $pay->checkBankAccount($data, $amount, 'EUR', $shopping_user);
+
+ if ($ret['elv']['status'] === 'ERROR' || $ret['elv']['status'] === 'INVALID') {
+ Session::flash('elv-error', 1);
+ Session::flash('errormessage', $ret['elv']['errormessage']);
+ Session::flash('customermessage', $ret['elv']['customermessage']);
+ return redirect(route('checkout.checkout_card'))->withInput(Request::all());
+ }
+
+ if ($ret['elv']['status'] === 'APPROVED' && $ret['elv']['mandate_status'] !== "active") {
+ Session::flash('elv-managemandate', 1);
+ Session::flash('elv-mandate_identification', $ret['elv']['mandate_identification']);
+ Session::flash('elv-mandate_text', $ret['elv']['mandate_text']);
+ Session::flash('elv-creditor_identifier', $ret['elv']['creditor_identifier']);
+ return redirect(route('checkout.checkout_card'))->withInput(Request::all());
+ }
+
+ $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder'];
+ } else {
+ $ret['elv'] = [
+ 'mandate_identification' => Request::get('mandate_identification'),
+ 'creditor_identifier' => Request::get('creditor_identifier'),
+ 'iban' => $data['elv_iban'],
+ 'bic' => $data['elv_bic'],
+ 'bankaccountholder' => $data['elv_bankaccountholder']
+ ];
+
+ $this->storeUserPaymentsData($shopping_user, $ret);
+ }
+ $ret['returnstatus'] = 'VALID';
+ return $ret;
+ }
+
+ /**
+ * Leitet zur Abschlussseite weiter
+ *
+ * @return \Illuminate\View\View
+ */
+ public function redirectToIsFinal()
+ {
+ $data = [
+ 'user_shop' => Util::getUserShop(),
+ ];
+
+ return view('web.templates.checkout-is-final', $data);
+ }
+
+ /**
+ * Verarbeitet den Transaktionsstatus
+ *
+ * @param string $status
+ * @param string $reference
+ * @return \Illuminate\View\View|\Illuminate\Http\RedirectResponse
+ */
+ public function transactionStatus($status, $reference)
+ {
+ $shopping_order_id = $this->checkoutRepo->getSessionPayments('shopping_order_id');
+ $ShoppingPayment = ShoppingPayment::where('shopping_order_id', $shopping_order_id)
+ ->where('reference', $reference)
+ ->first();
+
+ if (!$ShoppingPayment) {
+ Util::setUserHistoryValue(['status' => 21]);
+ Session::flash('checkout-error', 'Der Zahlungsvorgang konnte nicht abgeschlossen werden, die Zahlung wurde nicht gefunden: ' . $reference);
return redirect(route('checkout.checkout_card'));
}
+
$ShoppingPayment->status = $status;
$ShoppingPayment->save();
- if($status === "success"){
-
- Yard::instance('shopping')->destroy();
- $this->destroy();
-
- $payt = $ShoppingPayment->payment_transactions->last();
- AboHelper::createNewAbo($ShoppingPayment);
- $data = [
- 'user_shop' => Util::getUserShop(),
- 'order_reference' => $reference,
- 'pay_trans' => $payt,
- ];
- return view('web.templates.checkout-final', $data);
+ if ($status === "success") {
+ return $this->handleSuccessfulTransaction($ShoppingPayment, $reference);
}
- if($status === "cancel"){
- Util::setUserHistoryValue(['status'=>22]);
- \Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
- return redirect(route('checkout.checkout_card'));
+ if ($status === "cancel") {
+ Util::setUserHistoryValue(['status' => 22]);
+ Util::setInstanceStatus(5); // link_canceled
+ Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
+ return redirect(route('checkout.checkout_card'));
}
- if($status === "error"){
- Util::setUserHistoryValue(['status'=>23]);
- \Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
+
+ if ($status === "error") {
+ Util::setUserHistoryValue(['status' => 23]);
+ Util::setInstanceStatus(6); // link_failed
+ Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.');
return redirect(route('checkout.checkout_card'));
-
}
}
- public function transactionApproved($transactionId, $reference) {
+ /**
+ * Verarbeitet eine erfolgreiche Transaktion
+ *
+ * @param ShoppingPayment $ShoppingPayment
+ * @param string $reference
+ * @return \Illuminate\View\View
+ */
+ private function handleSuccessfulTransaction($ShoppingPayment, $reference)
+ {
+ Yard::instance('shopping')->destroy();
+ $this->checkoutRepo->sessionDestroy();
+ Util::setInstanceStatus(3, true); // link_pending
+ // Abo erstellen, falls nötig
+ if ($ShoppingPayment->shopping_order->is_abo) {
+ AboHelper::createNewAbo($ShoppingPayment);
+ }
+
+ $payt = $ShoppingPayment->payment_transactions->last();
+ $data = [
+ 'user_shop' => Util::getUserShop(),
+ 'order_reference' => $reference,
+ 'pay_trans' => $payt,
+ ];
+
+ return view('web.templates.checkout-final', $data);
+ }
+
+ /**
+ * Verarbeitet eine genehmigte Transaktion
+ *
+ * @param int $transactionId
+ * @param string $reference
+ * @return \Illuminate\View\View
+ */
+ public function transactionApproved($transactionId, $reference)
+ {
$payt = PaymentTransaction::findOrFail($transactionId);
- if($payt->shopping_payment->reference != $reference){
+ if ($payt->shopping_payment->reference != $reference) {
abort(404);
}
Yard::instance('shopping')->destroy();
- $this->destroy();
+ $this->checkoutRepo->sessionDestroy();
+ Util::setInstanceStatus(3, true); // link_pending
- //Rechnung MIV
- if($payt->status === 'FNCMIV'){
+ // Abo erstellen, falls nötig
+ if ($payt->shopping_payment->shopping_order->is_abo) {
+ AboHelper::createNewAbo($payt->shopping_payment);
+ }
+
+ // Rechnung MIV
+ if ($payt->status === 'FNCMIV') {
$this->directPaymentStatus($payt);
}
@@ -456,14 +496,23 @@ class CheckoutController extends Controller
'order_reference' => $payt->shopping_payment->reference,
'pay_trans' => $payt,
];
+
return view('web.templates.checkout-final', $data);
}
- private function storeUserPaymentsData($shopping_user, $ret){
- if($shopping_user->auth_user_id){
+ /**
+ * Speichert die Zahlungsdaten des Benutzers
+ *
+ * @param ShoppingUser $shopping_user
+ * @param array $ret
+ * @return void
+ */
+ private function storeUserPaymentsData($shopping_user, $ret)
+ {
+ if ($shopping_user->auth_user_id) {
$user = User::find($shopping_user->auth_user_id);
- if($user && $user->account){
- if(isset($ret['elv']) && is_array($ret['elv'])){
+ if ($user && $user->account) {
+ if (isset($ret['elv']) && is_array($ret['elv'])) {
$user->account->payment_data = $ret['elv'];
$user->account->save();
}
@@ -471,266 +520,33 @@ class CheckoutController extends Controller
}
}
- private function makeShoppingUser($data){
-
- $data['same_as_billing'] = isset($data['same_as_billing']) ? false : true; //reinvert
- $data['accepted_data_checkbox'] = isset($data['accepted_data_checkbox']) ? true : false;
- $shopping_user = false;
- if($this->getPayments('shopping_user_id')){
- $shopping_user = ShoppingUser::find($this->getPayments('shopping_user_id'));
- if($shopping_user){
- $shopping_user->fill($data);
- $shopping_user->mode = null;
- $shopping_user->save();
- }
- }
- if(!$shopping_user){
- $shopping_user = ShoppingUser::create($data);
- }
- $this->putPayments('shopping_user_id', $shopping_user->id);
-
- return $shopping_user;
- }
-
- private function makeCustomerShoppingUser($shopping_data){
- // $shopping_user = ShoppingUser::findOrFail($shopping_data['shopping_user_id']);
- $shopping_user = new ShoppingUser();
- $shopping_user->fill($shopping_data);
- $shopping_user->faker_mail = false;
-
- $shopping_user->auth_user_id = null;
- $shopping_user->homeparty_id = null;
- $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert
- // $shopping_user->id = null;
- $shopping_user->accepted_data_checkbox = 1;
-
- return $shopping_user;
-
- }
- private function makeShoppingOrder($shopping_user, $data){
-
- $user_shop = Util::getUserShop();
-
- if($shopping_user->is_from === 'homeparty'){
- //get data
- $homeparty = Homeparty::find($shopping_user->homeparty_id);
- //set Data!
- $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price
- $data = [
- 'shopping_user_id' => $shopping_user->id,
- 'auth_user_id' => $shopping_user->auth_user_id,
- 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
- 'language' => \App::getLocale(),
- 'user_shop_id' => $user_shop->id,
- 'payment_for' => $shopping_user->getOrderPaymentFor(),
- 'homeparty_id' => $shopping_user->homeparty_id,
- 'total' => $total,
- 'subtotal' => $homeparty->order['ek_price_net'],
- 'shipping' => $homeparty->order['shipping_price'],
- 'shipping_net' => $homeparty->order['shipping_price_net'],
- 'subtotal_ws' => 0,
- 'tax' => $total - $homeparty->order['ek_price_net'],
- 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
- 'points' => $homeparty->order['points'] - $homeparty->order['bonus_points_diff'],
- 'weight' => 0,
- 'txaction' => 'prev',
- 'mode' => Util::getUserShoppingMode(),
- ];
- }elseif($shopping_user->is_from === 'collection'){
- //get data
- $ShoppingCollectOrder = ShoppingCollectOrder::find($shopping_user->shopping_collect_order_id);
- //set Data!
- $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price
- $data = [
- 'shopping_user_id' => $shopping_user->id,
- 'auth_user_id' => $shopping_user->auth_user_id,
- 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
- 'language' => \App::getLocale(),
- 'user_shop_id' => $user_shop->id,
- 'payment_for' => $shopping_user->getOrderPaymentFor(),
- 'total' => $total,
- 'subtotal' => $ShoppingCollectOrder->price_total_net,
- 'shipping' => 0,
- 'shipping_net' => 0,
- 'subtotal_ws' => $ShoppingCollectOrder->price_total_net,
- 'tax' => $ShoppingCollectOrder->tax_total,
- 'tax_split' => $ShoppingCollectOrder->tax_split,
- 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
- 'points' => $ShoppingCollectOrder->points,
- 'weight' => 0,
- 'txaction' => 'prev',
- 'mode' => Util::getUserShoppingMode(),
- ];
- }else{
- $data = [
- 'shopping_user_id' => $shopping_user->id,
- 'auth_user_id' => $shopping_user->auth_user_id,
- 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
- 'language' => \App::getLocale(),
- 'user_shop_id' => $user_shop->id,
- 'payment_for' => $shopping_user->getOrderPaymentFor(),
- 'total' => Yard::instance('shopping')->total(2, '.', ''),
- 'subtotal' => Yard::instance('shopping')->subtotal(2, '.', ''),
- 'shipping' => Yard::instance('shopping')->shipping(2, '.', ','),
- 'shipping_net' => Yard::instance('shopping')->shippingNet(2, '.', ''),
- 'subtotal_ws' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
- 'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''),
- 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
- 'points' => Yard::instance('shopping')->points(),
- 'weight' => Yard::instance('shopping')->weight(),
- 'is_abo' => isset($data['is_abo']) ? $data['is_abo'] : false,
- 'abo_interval' => isset($data['abo_interval']) ? $data['abo_interval'] : null,
- 'txaction' => 'prev',
- 'mode' => Util::getUserShoppingMode(),
- ];
- }
-
- $shopping_order= false;
- if($this->getPayments('shopping_order_id')){
- $shopping_order = ShoppingOrder::find($this->getPayments('shopping_order_id'));
- if($shopping_order){
- $shopping_order->fill($data);
- $shopping_order->save();
- }
- }
- if(!$shopping_order){
- $shopping_order = ShoppingOrder::create($data);
- if($shopping_user->is_from === 'collection' && $ShoppingCollectOrder){
- $ShoppingCollectOrder->shopping_order_id = $shopping_order->id;
- $ShoppingCollectOrder->save();
- }
- }
- $this->putPayments('shopping_order_id', $shopping_order->id);
-
- $items = Yard::instance('shopping')->getContentByOrder();
- $shopping_order->shopping_order_items()->each(function($model) use ($items, $shopping_order, $shopping_user) {
- foreach ($items as $item) {
- if ($model->row_id === $item->rowId) {
- $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', '');
- $tax = $item->price - $price_net;
- $data = [
- 'shopping_order_id' => $shopping_order->id,
- 'row_id' => $item->rowId,
- 'product_id' => $item->id,
- 'comp' => $item->options->comp,
- 'qty' => $item->qty,
- 'price' => $item->price,
- 'price_net' => $price_net,
- 'tax_rate' => $item->taxRate,
- 'tax' => $tax,
- 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id),
- 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(),
- 'points' => $item->options->points,
- 'slug' => $item->options->slug,
- ];
- if($shopping_user->is_from === 'homeparty'){
- $data['homeparty_id'] = (int) $shopping_user->homeparty_id;
- $data['product_id'] = null;
- }
- if($shopping_user->is_from === 'collection'){
- $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id;
- $data['product_id'] = null;
- }
- $model->fill($data)->save();
- return false;
- }
- }
- return $model->delete();
- });
- foreach ($items as $item) {
- if (!ShoppingOrderItem::where('shopping_order_id', $shopping_order->id)->where('row_id', $item->rowId)->count()){
-
- $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', '');
- $tax = $item->price - $price_net;
-
- $data = [
- 'shopping_order_id' => $shopping_order->id,
- 'row_id' => $item->rowId,
- 'product_id' => $item->id,
- 'comp' => $item->options->comp,
- 'qty' => $item->qty,
- 'price' => $item->price,
- 'price_net' => $price_net,
- 'tax_rate' => $item->taxRate,
- 'tax' => $tax,
- 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id),
- 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(),
- 'points' => $item->options->points,
- 'slug' => $item->options->slug
- ];
-
- if($shopping_user->is_from === 'homeparty'){
- $data['homeparty_id'] = (int) $shopping_user->homeparty_id;
- $data['price_vk_net'] = 0;
- $data['product_id'] = null;
- }
- if($shopping_user->is_from === 'collection'){
- $data['price_vk_net'] = 0;
- $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id;
- $data['product_id'] = null;
- }
- $shopping_order_item = ShoppingOrderItem::create($data);
- }
- }
- if($shopping_user->is_from === 'homeparty'){
- $shopping_order->makeHomepartyTaxSplit();
- }elseif($shopping_user->is_from === 'collection'){
- //is set on create / filll.
- }else{
- $shopping_order->makeTaxSplit();
- }
- return $shopping_order;
- }
-
- private function putPayments($key, $value){
- $content = $this->getContent();
- $content->put($key, $value);
- $this->session->put($this->instance, $content);
-
- }
-
- private function getPayments($key){
- $content = $this->getContent();
- if ($content->has($key)){
- return $content->get($key);
- }
- return false;
- }
-
- private function getContent()
+ /**
+ * Verarbeitet den direkten Zahlungsstatus (Rechnung MIV)
+ *
+ * @param PaymentTransaction $payt
+ * @return void
+ */
+ private function directPaymentStatus(PaymentTransaction $payt)
{
- if (is_null($this->session->get($this->instance))) {
- return new Collection([]);
- }
- return $this->session->get($this->instance);
- }
-
- public function destroy()
- {
- $this->session->remove($this->instance);
- }
-
- //is for Rechnung MIV
- private function directPaymentStatus(PaymentTransaction $payt){
-
- if(isset($payt->transmitted_data['param'])){
+ if (isset($payt->transmitted_data['param'])) {
$shopping_order = ShoppingOrder::find($payt->transmitted_data['param']);
$shopping_order->txaction = 'invoice_open';
$shopping_order->save();
+
$shopping_payment = ShoppingPayment::where('reference', $payt->transmitted_data['reference'])->first();
- if($shopping_payment){
+ if ($shopping_payment) {
$shopping_payment->txaction = 'invoice_open';
$shopping_payment->save();
}
- $send_link = Payment::paymentStatusPaidAction($shopping_order, false);
+
+ $send_link = Payment::paymentStatusPaidAction($shopping_order, false, $shopping_payment);
$data = [
- 'mode' => $payt->transmitted_data['mode'],
+ 'mode' => $payt->transmitted_data['mode'],
'txaction' => $payt->txaction,
'send_link' => $send_link,
];
+
Payment::paymentStatusSendMail($shopping_order, $shopping_payment, $data);
}
-
}
-
}
\ No newline at end of file
diff --git a/app/Http/Controllers/WizardController.php b/app/Http/Controllers/WizardController.php
index 6b601ee..80f44c7 100755
--- a/app/Http/Controllers/WizardController.php
+++ b/app/Http/Controllers/WizardController.php
@@ -252,6 +252,9 @@ class WizardController extends Controller
'mobil' => 'required_without:phone',
'country_id' => 'required|integer|min:1',
'birthday' => 'required',
+ 'bank_owner' => 'required',
+ 'bank_iban' => 'required',
+ 'bank_bic' => 'required',
);
if (!Request::get('same_as_billing')) {
@@ -572,7 +575,7 @@ class WizardController extends Controller
if($product->images->count()){
$image = $product->images->first()->slug;
}
- $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]);
+ $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
if(\App\Services\UserService::getTaxFree()){
Yard::setTax($cartItem->rowId, 0);
}else{
@@ -587,7 +590,7 @@ class WizardController extends Controller
if($product_on_board->images->count()){
$image = $product_on_board->images->first()->slug;
}
- $cartItem = Yard::instance('shopping')->add($product_on_board->id, $product_on_board->getLang('name'), 1, $product_on_board->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product_on_board->slug, 'weight' => $product_on_board->weight, 'points' => $product_on_board->points, 'no_commission' => $product_on_board->no_commission]);
+ $cartItem = Yard::instance('shopping')->add($product_on_board->id, $product_on_board->getLang('name'), 1, $product_on_board->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product_on_board->slug, 'weight' => $product_on_board->weight, 'points' => $product_on_board->points, 'no_commission' => $product_on_board->no_commission, 'show_on' => $product_on_board->show_on]);
if(\App\Services\UserService::getTaxFree()){
Yard::setTax($cartItem->rowId, 0);
}else{
diff --git a/app/Http/Middleware/Checkout.php b/app/Http/Middleware/Checkout.php
index f7eb56e..b263317 100755
--- a/app/Http/Middleware/Checkout.php
+++ b/app/Http/Middleware/Checkout.php
@@ -61,7 +61,7 @@ class Checkout
Yard::instance('shopping')->setShippingCountryWithPrice($shopping_instance->country_id, $is_for);
if($shopping_instance->payment !== 6){
- //delete shopping instance
+ //delete shopping instance is not save for restore, payment link
ShoppingInstance::where('identifier', $request->route('identifier'))->delete();
}
diff --git a/app/Mail/MailCheckout.php b/app/Mail/MailCheckout.php
index 1ee1ef9..b13282a 100644
--- a/app/Mail/MailCheckout.php
+++ b/app/Mail/MailCheckout.php
@@ -17,18 +17,20 @@ class MailCheckout extends Mailable
protected $shopping_payment;
protected $send_link;
protected $mode;
+ protected $payment_error;
public $subject;
public $data;
- public function __construct($txaction, $shopping_order, $shopping_payment, $send_link, $mode)
+ public function __construct($txaction, $shopping_order, $shopping_payment, $send_link, $mode, $payment_error = false)
{
$this->txaction = $txaction;
$this->shopping_order = $shopping_order;
$this->shopping_payment = $shopping_payment;
$this->send_link = $send_link;
$this->mode = $mode;
+ $this->payment_error = $payment_error;
if($this->txaction === 'paid'){
$this->subject = __('email.checkout_subject_paid')." ";
@@ -77,6 +79,7 @@ class MailCheckout extends Mailable
'txaction' => $this->txaction,
'shopping_order' => $this->shopping_order,
'shopping_payment' => $this->shopping_payment,
+ 'payment_error' => $this->payment_error,
'copy3line' => __('email.checkout_copy3line'),
'greetings' => __('email.greetings'),
'sender' => __('email.sender'),
diff --git a/app/Mail/MailCustomPaymet.php b/app/Mail/MailCustomPaymet.php
index e9a8407..0affbe4 100644
--- a/app/Mail/MailCustomPaymet.php
+++ b/app/Mail/MailCustomPaymet.php
@@ -18,6 +18,8 @@ class MailCustomPaymet extends Mailable
protected $mode;
protected $name;
protected $yard_shopping_items;
+ protected $is_abo;
+ protected $is_for;
public $subject;
@@ -31,9 +33,10 @@ class MailCustomPaymet extends Mailable
$this->shopping_instance = $shopping_instance;
$this->mode = $mode;
$this->yard_shopping_items = $yard_shopping_items;
-
+ $this->is_abo = isset($shopping_instance->shopping_data['is_abo']) ? $shopping_instance->shopping_data['is_abo'] : 0;
+ $this->is_for = isset($shopping_instance->shopping_data['is_for']) ? $shopping_instance->shopping_data['is_for'] : 0;
$this->name = $shopping_user->member->account->first_name." ".$shopping_user->member->account->last_name." - ";
- $this->subject = __('email.subject_custom_payout', ['name' => $this->name]);
+ $this->subject =$this->is_abo ? __('email.subject_custom_abo_payout', ['name' => $this->name]) : __('email.subject_custom_payout', ['name' => $this->name]);
}
@@ -43,10 +46,12 @@ class MailCustomPaymet extends Mailable
return $this->view('emails.custom_payment')->with([
'salutation' => $salutation,
- 'copy1line' => __('email.your_custom_payout', ['name' => $this->name]),
+ 'copy1line' => $this->is_abo ? __('email.your_custom_abo_payout', ['name' => $this->name]) : __('email.your_custom_payout', ['name' => $this->name]),
'shopping_user' => $this->shopping_user,
'shopping_instance' => $this->shopping_instance,
'yard_shopping_items' => $this->yard_shopping_items,
+ 'is_abo' => $this->is_abo,
+ 'is_for' => $this->is_for,
'copy3line' => __('email.checkout_copy3line'),
'greetings' => __('email.greetings'),
'route' => $this->route,
diff --git a/app/Models/Category.php b/app/Models/Category.php
index a61fc67..7f62172 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -60,7 +60,7 @@ class Category extends Model
'parent_id', 'name', 'headline', 'pos', 'active',
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/DbipLookup.php b/app/Models/DbipLookup.php
index dc769ff..aecada8 100644
--- a/app/Models/DbipLookup.php
+++ b/app/Models/DbipLookup.php
@@ -10,13 +10,20 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class DbipLookup
- *
+ *
* @property string $addr_type
* @property string $ip_start
* @property string $ip_end
* @property string $country
- *
* @package App\Models
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereAddrType($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereCountry($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereIpEnd($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereIpStart($value)
+ * @mixin \Eloquent
*/
class DbipLookup extends Model
{
diff --git a/app/Models/DbipLookup2.php b/app/Models/DbipLookup2.php
index 66da7f5..232be9d 100644
--- a/app/Models/DbipLookup2.php
+++ b/app/Models/DbipLookup2.php
@@ -10,13 +10,20 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class DbipLookup
- *
+ *
* @property string $addr_type
* @property string $ip_start
* @property string $ip_end
* @property string $country
- *
* @package App\Models
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereAddrType($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereCountry($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereIpEnd($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereIpStart($value)
+ * @mixin \Eloquent
*/
class DbipLookup2 extends Model
{
diff --git a/app/Models/DbipLookup3.php b/app/Models/DbipLookup3.php
index 930b559..acdb526 100644
--- a/app/Models/DbipLookup3.php
+++ b/app/Models/DbipLookup3.php
@@ -10,13 +10,20 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class DbipLookup
- *
+ *
* @property string $addr_type
* @property string $ip_start
* @property string $ip_end
* @property string $country
- *
* @package App\Models
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereAddrType($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereCountry($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereIpEnd($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereIpStart($value)
+ * @mixin \Eloquent
*/
class DbipLookup3 extends Model
{
diff --git a/app/Models/DcCategory.php b/app/Models/DcCategory.php
index 9bdcd9e..b922a1a 100644
--- a/app/Models/DcCategory.php
+++ b/app/Models/DcCategory.php
@@ -13,15 +13,28 @@ use Cviebrock\EloquentSluggable\Sluggable;
/**
* Class DcCategory
- *
+ *
* @property int $id
* @property string $name
* @property int $pos
* @property string $slug
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
- *
* @package App\Models
+ * @property bool $active
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory findSimilarSlugs(string $attribute, array $config, string $slug)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereActive($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory wherePos($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereSlug($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcCategory withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug)
+ * @mixin \Eloquent
*/
class DcCategory extends Model
{
@@ -41,7 +54,7 @@ class DcCategory extends Model
'active'
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/DcFile.php b/app/Models/DcFile.php
index 81cf0dc..1a13af7 100644
--- a/app/Models/DcFile.php
+++ b/app/Models/DcFile.php
@@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class DcFile
- *
+ *
* @property int $id
* @property string $filename
* @property string $original_name
@@ -22,10 +22,26 @@ use Illuminate\Database\Eloquent\Model;
* @property int|null $active
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
- *
* @property Collection|DcFileTag[] $dc_file_tags
- *
* @package App\Models
+ * @property-read int|null $dc_file_tags_count
+ * @property-read Collection $fileTag
+ * @property-read int|null $file_tag_count
+ * @property-read Collection $tags
+ * @property-read int|null $tags_count
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereActive($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereExt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereFilename($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereMine($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereOriginalName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereSize($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereUpdatedAt($value)
+ * @mixin \Eloquent
*/
class DcFile extends Model
{
diff --git a/app/Models/DcFileTag.php b/app/Models/DcFileTag.php
index 24d68e8..1986d6d 100644
--- a/app/Models/DcFileTag.php
+++ b/app/Models/DcFileTag.php
@@ -11,17 +11,24 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class DcFileTag
- *
+ *
* @property int $id
* @property int $file_id
* @property int $tag_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
- *
* @property DcFile $dc_file
* @property DcTag $dc_tag
- *
* @package App\Models
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereFileId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereTagId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereUpdatedAt($value)
+ * @mixin \Eloquent
*/
class DcFileTag extends Model
{
diff --git a/app/Models/DcTag.php b/app/Models/DcTag.php
index 9cc6f0e..354ab94 100644
--- a/app/Models/DcTag.php
+++ b/app/Models/DcTag.php
@@ -14,7 +14,7 @@ use Cviebrock\EloquentSluggable\Sluggable;
/**
* Class DcTag
- *
+ *
* @property int $id
* @property int|null $category_id
* @property string $name
@@ -22,10 +22,24 @@ use Cviebrock\EloquentSluggable\Sluggable;
* @property string $slug
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
- *
* @property Collection|DcFileTag[] $dc_file_tags
- *
* @package App\Models
+ * @property bool $active
+ * @property-read int|null $dc_file_tags_count
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag findSimilarSlugs(string $attribute, array $config, string $slug)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag query()
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereActive($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereCategoryId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereName($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag wherePos($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereSlug($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|DcTag withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug)
+ * @mixin \Eloquent
*/
class DcTag extends Model
{
@@ -47,7 +61,7 @@ class DcTag extends Model
'active'
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/Homeparty.php b/app/Models/Homeparty.php
index 95dee2a..770d678 100644
--- a/app/Models/Homeparty.php
+++ b/app/Models/Homeparty.php
@@ -71,6 +71,8 @@ use Illuminate\Database\Eloquent\Collection;
* @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereOrder($value)
* @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereSettings($value)
* @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereStep($value)
+ * @property array|null $trans_description
+ * @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereTransDescription($value)
* @mixin \Eloquent
*/
class Homeparty extends Model
diff --git a/app/Models/IqImage.php b/app/Models/IqImage.php
index 8e3eca8..6bdf5ae 100644
--- a/app/Models/IqImage.php
+++ b/app/Models/IqImage.php
@@ -51,7 +51,7 @@ class IqImage extends Model
'filename', 'original_name', 'ext', 'mine', 'size'
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/IqSite.php b/app/Models/IqSite.php
index 34eb80f..eb6e1be 100644
--- a/app/Models/IqSite.php
+++ b/app/Models/IqSite.php
@@ -75,7 +75,11 @@ class IqSite extends Model
public function getProductModels(){
$ret = [];
foreach($this->products as $product_id){
- $ret[] = Product::findOrFail($product_id);
+ $product = Product::findOrFail($product_id);
+ if($product->active){
+ $ret[] = $product;
+ }
+
}
return $ret;
@@ -84,7 +88,10 @@ class IqSite extends Model
public function getProductSetModels(){
$ret = [];
foreach($this->set_products as $product_id){
- $ret[] = Product::findOrFail($product_id);
+ $product = Product::findOrFail($product_id);
+ if($product->active){
+ $ret[] = $product;
+ }
}
return $ret;
diff --git a/app/Models/PaymentMethod.php b/app/Models/PaymentMethod.php
index d66bc69..5e1d6ef 100644
--- a/app/Models/PaymentMethod.php
+++ b/app/Models/PaymentMethod.php
@@ -36,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereUpdatedAt($value)
* @property array|null $show_on
* @method static \Illuminate\Database\Eloquent\Builder|PaymentMethod whereShowOn($value)
+ * @property bool $is_abo
+ * @method static \Illuminate\Database\Eloquent\Builder|PaymentMethod whereIsAbo($value)
* @mixin \Eloquent
*/
class PaymentMethod extends Model
diff --git a/app/Models/Product.php b/app/Models/Product.php
index 2fd7743..92dfc92 100644
--- a/app/Models/Product.php
+++ b/app/Models/Product.php
@@ -249,9 +249,8 @@ class Product extends Model
8 => 'Mitgliedschaft Berater',
9 => 'Onboarding Berater',
10 => 'zur internen Berechnung',
- 12 => 'Abo-ShopBerater',
- 13 => 'Abo-ShopBeraterKunden',
-
+ 12 => 'Abo-BasisProdukt',
+ 13 => 'Abo-AddonProdukt',
];
public $actions = [
@@ -270,7 +269,18 @@ class Product extends Model
];
- public function sluggable()
+/************* ✨ Codeium Command ⭐ *************/
+ /**
+ * Configure the model for auto-generating a slug.
+ *
+ * This method returns an array defining the attributes used
+ * to generate the slug for the model. In this case, the 'name'
+ * attribute is used as the source for generating the slug.
+ *
+ * @return array Configuration for slug generation.
+ */
+
+/****** e935bd41-f49b-4736-9603-2da86dc27f25 *******/ public function sluggable() : array
{
return [
'slug' => [
@@ -393,23 +403,25 @@ class Product extends Model
}
/*price by user Factor*/
- private function calcPriceUserFactor($price){
+ private function calcPriceUserFactor($price, $user=null){
if($this->no_commission){
return $price;
}
- if(\Auth::user() && \Auth::user()->user_level){
- $margin = ((\Auth::user()->user_level->margin -100)*-1) / 100;
+ $user = $user ? $user : \Auth::user();
+ if($user && $user->user_level){
+ $margin = (($user->user_level->margin -100)*-1) / 100;
$price = $price * $margin;
}
return $price;
}
- private function calcPriceUserCommission($price){
+ private function calcPriceUserCommission($price, $user){
if($this->no_commission){
return $price;
}
- if(\Auth::user() && \Auth::user()->user_level){
- $margin = \Auth::user()->user_level->margin;
+ $user = $user ? $user : \Auth::user();
+ if($user && $user->user_level){
+ $margin = $user->user_level->margin;
$price = $price / 100 * $margin;
}
return $price;
@@ -423,13 +435,13 @@ class Product extends Model
return $price / $tax_rate;
}
//price calu with
- public function getPriceWith(Bool $net = true, Bool $ufactor = true, $country = null, $commission=false){
+ public function getPriceWith(Bool $net = true, Bool $ufactor = true, $country = null, $commission=false, $user = null){
$price = isset($this->attributes['price']) ? $this->attributes['price'] : null;
$cprice = $country ? $this->getCPrice($country) : null;
$price = $cprice ? $cprice : $price;
$price = $net ? $this->calcPriceNet($price, $country) : $price;
- $price = $ufactor ? $this->calcPriceUserFactor($price) : $price;
- $price = $commission ? $this->calcPriceUserCommission($price) : $price;
+ $price = $ufactor ? $this->calcPriceUserFactor($price, $user) : $price;
+ $price = $commission ? $this->calcPriceUserCommission($price, $user) : $price;
return round($price, 2);
}
diff --git a/app/Models/ProductImage.php b/app/Models/ProductImage.php
index 85ef780..c16278b 100644
--- a/app/Models/ProductImage.php
+++ b/app/Models/ProductImage.php
@@ -51,7 +51,7 @@ class ProductImage extends Model
'product_id', 'filename', 'original_name', 'ext', 'mine', 'size'
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/Setting.php b/app/Models/Setting.php
index 158ed96..6a290fc 100644
--- a/app/Models/Setting.php
+++ b/app/Models/Setting.php
@@ -78,7 +78,7 @@ class Setting extends Model
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/ShoppingCollectOrder.php b/app/Models/ShoppingCollectOrder.php
index bdc36ec..dc84e4c 100644
--- a/app/Models/ShoppingCollectOrder.php
+++ b/app/Models/ShoppingCollectOrder.php
@@ -121,7 +121,7 @@ class ShoppingCollectOrder extends Model
$add_tax = round($add_tax, 2);
$tax_split[$tax_rate] = isset($tax_split[$tax_rate]) ? round($tax_split[$tax_rate] += $add_tax, 2) : $add_tax;
- foreach($tax_split as $key=>$value){
+ foreach((array)$tax_split as $key=>$value){
$tax_split[$key] = number_format($value, 2);
}
$this->tax_split = $tax_split;
@@ -141,13 +141,31 @@ class ShoppingCollectOrder extends Model
public function addShopItem($shop_item_id, $shop_item)
{
- $shop_item->user_price_net = number_format($shop_item->user_price_net, 2);
- $shop_item->user_price_total_net = number_format($shop_item->user_price_total_net, 2);
- $shop_item->user_tax = number_format($shop_item->user_tax, 2);
- $shop_item->user_tax_total = number_format($shop_item->user_tax_total, 2);
+ $numberFields = [
+ 'user_price_net',
+ 'user_price_total_net',
+ 'user_tax',
+ 'user_tax_total'
+ ];
+
+ $intFields = [
+ 'points_total',
+ 'points'
+ ];
+
+ foreach ($numberFields as $field) {
+ if (isset($shop_item->$field)) {
+ $shop_item->$field = number_format($shop_item->$field, 2);
+ }
+ }
+
+ foreach ($intFields as $field) {
+ if (isset($shop_item->$field)) {
+ $shop_item->$field = intval($shop_item->$field);
+ }
+ }
$this->shop_items[$shop_item_id] = $shop_item;
-
}
public function addOrder($order)
diff --git a/app/Models/ShoppingInstance.php b/app/Models/ShoppingInstance.php
index 1919222..9a3fb22 100644
--- a/app/Models/ShoppingInstance.php
+++ b/app/Models/ShoppingInstance.php
@@ -35,6 +35,12 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereShoppingData($value)
* @property string|null $language
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereLanguage($value)
+ * @property int|null $status
+ * @property float|null $amount
+ * @property int|null $shopping_user_id
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereAmount($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereShoppingUserId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereStatus($value)
* @mixin \Eloquent
*/
class ShoppingInstance extends Model
@@ -50,14 +56,29 @@ class ShoppingInstance extends Model
];
+ public $statuses = [
+ 0 => 'link_sent',
+ 1 => 'link_openly',
+ 2 => 'link_check',
+ 3 => 'link_pending',
+ 4 => 'link_appointed',
+ 5 => 'link_failed',
+ 6 => 'link_canceled',
+ 10 => 'link_paid',
+ ];
+
protected $table = 'shopping_instances';
- protected $casts = ['shopping_data' => 'array'];
+ protected $casts = ['shopping_data' => 'array', 'amount' => 'float'];
protected $fillable = [
- 'identifier', 'user_shop_id', 'auth_user_id', 'payment', 'subdomain', 'language', 'country_id', 'shopping_data', 'back'
+ 'identifier', 'user_shop_id', 'auth_user_id', 'status', 'payment', 'subdomain', 'language', 'country_id', 'amount', 'shopping_user_id', 'shopping_data', 'back'
];
+ public function getStatus(){
+ return isset($this->statuses[$this->status]) ? $this->statuses[$this->status] : 'link_sent';
+ }
+
public function getLocale(){
return $this->language ? $this->language : \App::getLocale();
}
@@ -78,5 +99,11 @@ class ShoppingInstance extends Model
return $this->belongsTo('App\User','auth_user_id');
}
+ public function getAmountFormatted(){
+ return formatNumber($this->amount);
+ }
+
+
+
}
diff --git a/app/Models/ShoppingOrder.php b/app/Models/ShoppingOrder.php
index 1e20e31..861b777 100644
--- a/app/Models/ShoppingOrder.php
+++ b/app/Models/ShoppingOrder.php
@@ -97,6 +97,10 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereNetSplit($value)
* @property string|null $language
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereLanguage($value)
+ * @property bool|null $is_abo
+ * @property int|null $abo_interval
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereAboInterval($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereIsAbo($value)
* @mixin \Eloquent
*/
class ShoppingOrder extends Model
@@ -281,6 +285,13 @@ class ShoppingOrder extends Model
}
+ public function getUserAbo(){
+ $UserAboOrder = UserAboOrder::where('shopping_order_id', $this->id)->first();
+ if($UserAboOrder && $UserAboOrder->user_abo){
+ return $UserAboOrder->user_abo;
+ }
+ return null;
+ }
public function getLocale(){
return $this->language ? $this->language : \App::getLocale();
diff --git a/app/Models/ShoppingOrderItem.php b/app/Models/ShoppingOrderItem.php
index 9173bd7..083ea19 100644
--- a/app/Models/ShoppingOrderItem.php
+++ b/app/Models/ShoppingOrderItem.php
@@ -83,6 +83,16 @@ class ShoppingOrderItem extends Model
'points',
'slug',
];
+ protected $casts = [
+ 'qty' => 'int',
+ 'price' => 'float',
+ 'price_net' => 'float',
+ 'tax_rate' => 'float',
+ 'tax' => 'float',
+ 'price_vk_net' => 'float',
+ 'discount' => 'float',
+ 'points' => 'int',
+ ];
public function shopping_order()
{
diff --git a/app/Models/ShoppingPayment.php b/app/Models/ShoppingPayment.php
index 1abb82a..23139b8 100644
--- a/app/Models/ShoppingPayment.php
+++ b/app/Models/ShoppingPayment.php
@@ -40,23 +40,35 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereWallettype($value)
* @property string|null $mode
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereMode($value)
+ * @property array|null $carddata
+ * @property int|null $is_abo
+ * @property int|null $abo_interval
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingPayment whereAboInterval($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingPayment whereCarddata($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|ShoppingPayment whereIsAbo($value)
* @mixin \Eloquent
*/
class ShoppingPayment extends Model
{
protected $table = 'shopping_payments';
+
+ protected $casts = [
+ 'carddata' => 'array',
+ ];
protected $fillable = [
'shopping_order_id',
'clearingtype',
'wallettype',
'onlinebanktransfertype',
+ 'carddata',
'reference',
'amount',
'currency',
'mode',
'is_abo',
'abo_interval',
+ 'identifier',
];
@@ -69,7 +81,7 @@ class ShoppingPayment extends Model
{
return $this->hasMany('App\Models\PaymentTransaction','shopping_payment_id');
}
-
+
public function getPaymentType(){
if($this->clearingtype === 'wlt') {
diff --git a/app/Models/ShoppingUser.php b/app/Models/ShoppingUser.php
index 4124b05..a5fb39f 100644
--- a/app/Models/ShoppingUser.php
+++ b/app/Models/ShoppingUser.php
@@ -2,6 +2,7 @@
namespace App\Models;
+use App\Services\ShoppingUserService;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
@@ -312,4 +313,8 @@ class ShoppingUser extends Model
];
}
-}
\ No newline at end of file
+
+ public function getAllOrdersByMember(){
+ return ShoppingUserService::getAllOrdersByMember($this);
+ }
+}
diff --git a/app/Models/SySetting.php b/app/Models/SySetting.php
index bab55fa..3ff1f51 100644
--- a/app/Models/SySetting.php
+++ b/app/Models/SySetting.php
@@ -63,7 +63,7 @@ class SySetting extends Model
1 => 'default',
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/UserAbo.php b/app/Models/UserAbo.php
index fa3b7b1..11b582f 100644
--- a/app/Models/UserAbo.php
+++ b/app/Models/UserAbo.php
@@ -8,20 +8,20 @@ namespace App\Models;
use App\User;
use Carbon\Carbon;
+use App\Services\Util;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class UserAbo
- *
+ *
* @property int $id
* @property int $user_id
* @property int $payone_userid
* @property string $clearingtype
* @property string|null $wallettype
* @property int $amount
- * @property string $currency
* @property bool $active
* @property int $status
* @property int $abo_interval
@@ -32,11 +32,51 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property Carbon|null $updated_at
* @property string|null $deleted_at
* @property Carbon|null $user_deleted_at
- *
* @property User $user
* @property Collection|UserAboOrder[] $user_abo_orders
- *
* @package App\Models
+ * @property int|null $member_id
+ * @property int $shopping_user_id
+ * @property string|null $email
+ * @property string|null $is_for
+ * @property array|null $carddata
+ * @property \Illuminate\Support\Carbon|null $start_date
+ * @property \Illuminate\Support\Carbon|null $last_date
+ * @property \Illuminate\Support\Carbon|null $next_date
+ * @property-read User|null $member
+ * @property-read \App\Models\ShoppingUser $shopping_user
+ * @property-read Collection $user_abo_items
+ * @property-read int|null $user_abo_items_count
+ * @property-read int|null $user_abo_orders_count
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo onlyTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo query()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAboInterval($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereActive($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAmount($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCancelDate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCarddata($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereClearingtype($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereEmail($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereIsFor($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereLastDate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereMemberId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereNextDate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo wherePayoneUserid($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereShoppingUserId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereStartDate($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereStatus($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereUserDeletedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereUserId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereWallettype($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo withTrashed()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAbo withoutTrashed()
+ * @mixin \Eloquent
*/
class UserAbo extends Model
{
@@ -45,29 +85,33 @@ class UserAbo extends Model
protected $casts = [
'user_id' => 'int',
+ 'member_id' => 'int',
'shopping_user_id' => 'int',
'payone_userid' => 'int',
- 'amount' => 'int',
'active' => 'bool',
'status' => 'int',
'abo_interval' => 'int',
+ 'amount' => 'int',
'start_date' => 'datetime',
'last_date' => 'datetime',
'next_date' => 'datetime',
'cancel_date' => 'datetime',
- 'count' => 'int',
- 'user_deleted_at' => 'datetime'
+ 'user_deleted_at' => 'datetime',
+ 'carddata' => 'array'
+
];
protected $fillable = [
'user_id',
+ 'member_id',
'shopping_user_id',
'is_for',
+ 'email',
'payone_userid',
'clearingtype',
'wallettype',
+ 'carddata',
'amount',
- 'currency',
'active',
'status',
'abo_interval',
@@ -75,13 +119,43 @@ class UserAbo extends Model
'last_date',
'next_date',
'cancel_date',
- 'count',
'user_deleted_at'
];
+ public static $aboDeliveryDays = [5, 10, 20, 25];
+
+ public static $statusTypes = [
+ 0 => 'abo_new',
+ 1 => 'abo_new',
+ 2 => 'abo_okay',
+ 3 => 'abo_hold',
+ 4 => 'abo_cancel',
+ 5 => 'abo_finish',
+ 6 => 'abo_inactive',
+ 7 => 'abo_grace'
+ ];
+
+ public static $statusColors = [
+ 0 => 'success',
+ 1 => 'success',
+ 2 => 'secondary',
+ 3 => 'warning',
+ 4 => 'danger',
+ 5 => 'info',
+ 6 => 'warning',
+ 7 => 'danger'
+ ];
+
+
+
public function user()
{
- return $this->belongsTo(User::class);
+ return $this->belongsTo(User::class, 'user_id');
+ }
+
+ public function member()
+ {
+ return $this->belongsTo(User::class, 'member_id');
}
public function shopping_user()
@@ -89,12 +163,21 @@ class UserAbo extends Model
return $this->belongsTo('App\Models\ShoppingUser','shopping_user_id');
}
-
public function user_abo_orders()
{
return $this->hasMany(UserAboOrder::class);
}
+ public function user_abo_items()
+ {
+ return $this->hasMany(UserAboItem::class);
+ }
+
+ public function getCountOrders(){
+ //sind bezahlte Bestellungen
+ return $this->user_abo_orders->where('status', '>=', 2)->count();
+ }
+
public function setStartDateAttribute( $value ) {
$this->attributes['start_date'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
}
@@ -127,5 +210,29 @@ class UserAbo extends Model
return $this->attributes['cancel_date'] ? Carbon::parse($this->attributes['cancel_date'])->format(\Util::formatDateDB()) : '';
}
+ public function getFormattedAmount()
+ {
+ return isset($this->attributes['amount']) ? Util::formatNumber($this->attributes['amount']/100) : "";
+ }
+ public function getIsForFormated()
+ {
+ return $this->attributes['is_for'] === 'me' ? ''.__('tables.adviser').' ' : ''.__('tables.customer').' ';
+ }
+
+ public function getStatusFormated(){
+ return ''.$this->getStatusType().' ';
+ }
+
+ public function getStatusType(){
+ return isset(self::$statusTypes[$this->status]) ? __('abo.'.self::$statusTypes[$this->status]) : "";
+ }
+
+ public function getStatusColor(){
+ return isset(self::$statusColors[$this->status]) ? self::$statusColors[$this->status] : "default";
+ }
+
+ public function getPaymentType(){
+ return $this->clearingtype === 'wlt' ? __('payment.paypal') : __('payment.credit_card');
+ }
}
diff --git a/app/Models/UserAboItem.php b/app/Models/UserAboItem.php
new file mode 100644
index 0000000..fa539cb
--- /dev/null
+++ b/app/Models/UserAboItem.php
@@ -0,0 +1,90 @@
+ 'int',
+ 'product_id' => 'int',
+ 'comp' => 'int',
+ 'qty' => 'int',
+ 'status' => 'int'
+ ];
+
+ protected $fillable = [
+ 'user_abo_id',
+ 'product_id',
+ 'comp',
+ 'qty',
+ 'status'
+ ];
+
+ public function product()
+ {
+ return $this->belongsTo(Product::class);
+ }
+
+ public function user_abo()
+ {
+ return $this->belongsTo(UserAbo::class);
+ }
+
+ public function getPrice()
+ {
+ $ufactor = $this->user_abo->is_for === 'me' ? true : false;
+ $tax_free = $ufactor ? true : Yard::instance('shopping')->getUserTaxFree();
+ $userCountry = Yard::instance('shopping')->getUserCountry();
+ return $this->product->getPriceWith($tax_free, $ufactor, $userCountry);
+ }
+
+
+ public function getFormattedPrice(){
+ /** der Preis wird für den User berechnet */
+ return Util::formatNumber($this->getPrice());
+ }
+
+
+ public function getFormattedTotalPrice(){
+ /** der Preis wird für den User berechnet */
+ return Util::formatNumber($this->getPrice() * $this->qty);
+ }
+}
diff --git a/app/Models/UserAboOrder.php b/app/Models/UserAboOrder.php
index c6ad621..76a542d 100644
--- a/app/Models/UserAboOrder.php
+++ b/app/Models/UserAboOrder.php
@@ -12,18 +12,26 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class UserAboOrder
- *
+ *
* @property int $id
* @property int $user_abo_id
* @property int $shopping_order_id
* @property int $status
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
- *
* @property ShoppingOrder $shopping_order
* @property UserAbo $user_abo
- *
* @package App\Models
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder newModelQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder newQuery()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder query()
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereCreatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereShoppingOrderId($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereStatus($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereUpdatedAt($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereUserAboId($value)
+ * @mixin \Eloquent
*/
class UserAboOrder extends Model
{
@@ -42,6 +50,30 @@ class UserAboOrder extends Model
'status'
];
+ public static $statusTypes = [
+ 0 => 'abo_new',
+ 1 => 'abo_new',
+ 2 => 'abo_okay',
+ 3 => 'abo_hold',
+ 4 => 'abo_cancel',
+ 5 => 'abo_finish',
+ 6 => 'abo_inactive',
+ 7 => 'abo_grace'
+ ];
+
+ public static $statusColors = [
+ 0 => 'success',
+ 1 => 'success',
+ 2 => 'secondary',
+ 3 => 'warning',
+ 4 => 'danger',
+ 5 => 'info',
+ 6 => 'warning',
+ 7 => 'danger'
+ ];
+
+
+
public function shopping_order()
{
return $this->belongsTo(ShoppingOrder::class);
@@ -51,4 +83,17 @@ class UserAboOrder extends Model
{
return $this->belongsTo(UserAbo::class);
}
+
+ public function getStatusFormated(){
+ return ''.$this->getStatusType().' ';
+ }
+
+ public function getStatusType(){
+ return isset(self::$statusTypes[$this->status]) ? __('abo.'.self::$statusTypes[$this->status]) : "";
+ }
+
+ public function getStatusColor(){
+ return isset(self::$statusColors[$this->status]) ? self::$statusColors[$this->status] : "default";
+ }
+
}
diff --git a/app/Models/UserBusiness.php b/app/Models/UserBusiness.php
index a7171ff..0ebede7 100644
--- a/app/Models/UserBusiness.php
+++ b/app/Models/UserBusiness.php
@@ -119,6 +119,10 @@ use Illuminate\Database\Eloquent\Casts\AsArrayObject;
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereSalesVolumePointsTPSum($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereSalesVolumeTPPoints($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereVersion($value)
+ * @property string|null $user_birthday
+ * @property string|null $user_phone
+ * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereUserBirthday($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereUserPhone($value)
* @mixin \Eloquent
*/
class UserBusiness extends Model
diff --git a/app/Models/UserCreditItem.php b/app/Models/UserCreditItem.php
index 5599d62..e57d9d3 100644
--- a/app/Models/UserCreditItem.php
+++ b/app/Models/UserCreditItem.php
@@ -40,6 +40,10 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserBusinessId($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserCreditId($value)
* @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserId($value)
+ * @property int|null $from_month
+ * @property int|null $from_year
+ * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereFromMonth($value)
+ * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereFromYear($value)
* @mixin \Eloquent
*/
class UserCreditItem extends Model
diff --git a/app/Models/UserHistory.php b/app/Models/UserHistory.php
index 771ad62..c9b4db5 100644
--- a/app/Models/UserHistory.php
+++ b/app/Models/UserHistory.php
@@ -42,6 +42,8 @@ use App\User;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserHistory whereIdentifier($value)
* @property int|null $abo_options
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserHistory whereAboOptions($value)
+ * @property int|null $is_abo
+ * @method static \Illuminate\Database\Eloquent\Builder|UserHistory whereIsAbo($value)
* @mixin \Eloquent
*/
class UserHistory extends Model
diff --git a/app/Models/UserShop.php b/app/Models/UserShop.php
index 7351c56..e1169d6 100644
--- a/app/Models/UserShop.php
+++ b/app/Models/UserShop.php
@@ -65,6 +65,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withoutTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|UserShop withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug)
+ * @property array|null $trans
+ * @method static \Illuminate\Database\Eloquent\Builder|UserShop whereTrans($value)
* @mixin \Eloquent
*/
class UserShop extends Model
@@ -87,7 +89,7 @@ class UserShop extends Model
protected $dates = ['deleted_at'];
use Sluggable;
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Models/UserShopOnSite.php b/app/Models/UserShopOnSite.php
index 43f0f22..0e147d5 100644
--- a/app/Models/UserShopOnSite.php
+++ b/app/Models/UserShopOnSite.php
@@ -46,7 +46,7 @@ class UserShopOnSite extends Model
'user_shop_id', 'filename', 'original_name', 'ext', 'mine', 'size'
];
- public function sluggable()
+ public function sluggable() : array
{
return [
'slug' => [
diff --git a/app/Policies/AppServiceProvider.php b/app/Policies/AppServiceProvider.php
deleted file mode 100755
index d1f2928..0000000
--- a/app/Policies/AppServiceProvider.php
+++ /dev/null
@@ -1,72 +0,0 @@
-can('view-any-' . $this->getModelClass());
- }
-
- public function view(User $user, Model $model)
- {
- if ($user->can('view-' . $this->getModelClass())) {
- return true;
- }
-
- if ($user->can('view-self-' . $this->getModelClass())) {
- return $this->isOwner($user, $model);
- }
-
- return false;
- }
-
- public function create(User $user)
- {
- return $user->can('create-' . $this->getModelClass());
- }
-
- public function update(User $user, Model $model)
- {
- if ($user->can('update-' . $this->getModelClass())) {
- return true;
- }
-
- if ($user->can('update-self-' . $this->getModelClass())) {
- return $this->isOwner($user, $model);
- }
-
- return false;
- }
-
- public function delete(User $user, Model $model)
- {
- if ($user->can('delete-' . $this->getModelClass())) {
- return true;
- }
-
- if ($user->can('delete-self-' . $this->getModelClass())) {
- return $this->isOwner($user, $model);
- }
-
- return false;
- }
-
- private function isOwner(User $user, Model $model): bool
- {
- if (!empty($user) && method_exists($model, 'user')) {
- return $user->getKey() === $model->getRelation('user')->getKey();
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/app/Repositories/AboRepository.php b/app/Repositories/AboRepository.php
new file mode 100644
index 0000000..188e9cb
--- /dev/null
+++ b/app/Repositories/AboRepository.php
@@ -0,0 +1,89 @@
+model = $model;
+ }
+
+
+ public function setModel(UserAbo $model){
+ $this->model = $model;
+ }
+
+ public function update($data)
+ {
+ if(isset($data['action'])){
+ if($data['action'] === 'abo_update_settings'){
+ if($this->validate($data)){
+ $this->updateStatus($data);
+ $this->model->abo_interval = $data['abo_interval'];
+ $this->model->next_date = AboHelper::setNextDate(now(), $data['abo_interval']);
+ $this->model ->save();
+ \Session()->flash('alert-success', 'Einstellungen gespeichert');
+ return true;
+ }
+ return false;
+ }
+ }
+ return false;
+ }
+
+ public function create($data){
+
+ }
+
+ private function updateStatus($data){
+
+ $active = (isset($data['abo_is_active']) && $data['abo_is_active']) ? true : false;
+ //if status is active and active is false, set status to inactive
+ if($this->model->active && !$active){
+ if($this->model->status = 2){ //okay
+ $this->model->status = 6; //
+ }
+ }
+ if(!$this->model->active && $active){
+ if($this->model->status = 6){ //inactive
+ $this->model->status = 2; //okay
+ }
+ }
+ $this->model->active = $active;
+ return;
+ }
+
+ private function validate($data){
+ if($data['view'] !== 'admin'){
+ if($this->model->is_for === 'me' && $this->model->user_id !== \Auth::user()->id){
+ \Session()->flash('alert-error', 'Unauthorized action. User ID does not match.');
+ return false;
+ }
+ if($this->model->is_for === 'ot' && $this->model->member_id !== \Auth::user()->id){
+ \Session()->flash('alert-error', 'Unauthorized action. User ID does not match.');
+ return false;
+ }
+ if($data['view'] === 'me' && $this->model->is_for !== 'me'){
+ \Session()->flash('alert-error', 'Unauthorized action. Is not for me');
+ return false;
+ }
+ if($data['view'] === 'ot' && $this->model->is_for !== 'ot'){
+ \Session()->flash('alert-error', 'Unauthorized action. Is not your customer');
+ return false;
+ }
+ }
+ if(!in_array($data['abo_interval'], \App\Models\UserAbo::$aboDeliveryDays)){
+ //to check if user is not admin
+ \Session()->flash('alert-error', __('abo.error_abo_interval'));
+ return false;
+ }
+ return true;
+ }
+
+}
\ No newline at end of file
diff --git a/app/Repositories/CheckoutRepository.php b/app/Repositories/CheckoutRepository.php
new file mode 100644
index 0000000..75e0288
--- /dev/null
+++ b/app/Repositories/CheckoutRepository.php
@@ -0,0 +1,376 @@
+session = $session;
+ $this->instance = sprintf('%s.%s', 'cart', 'payments');
+ }
+
+ public function makeShoppingOrder($shopping_user, $data){
+
+ $user_shop = Util::getUserShop();
+
+ if($shopping_user->is_from === 'homeparty'){
+ //get data
+ $homeparty = Homeparty::find($shopping_user->homeparty_id);
+ //set Data!
+ $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price
+ $data = [
+ 'shopping_user_id' => $shopping_user->id,
+ 'auth_user_id' => $shopping_user->auth_user_id,
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'user_shop_id' => $user_shop->id,
+ 'payment_for' => $shopping_user->getOrderPaymentFor(),
+ 'homeparty_id' => $shopping_user->homeparty_id,
+ 'total' => $total,
+ 'subtotal' => $homeparty->order['ek_price_net'],
+ 'shipping' => $homeparty->order['shipping_price'],
+ 'shipping_net' => $homeparty->order['shipping_price_net'],
+ 'subtotal_ws' => 0,
+ 'tax' => $total - $homeparty->order['ek_price_net'],
+ 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'points' => $homeparty->order['points'] - $homeparty->order['bonus_points_diff'],
+ 'weight' => 0,
+ 'txaction' => 'prev',
+ 'mode' => Util::getUserShoppingMode(),
+ ];
+ }elseif($shopping_user->is_from === 'collection'){
+ //get data
+ $ShoppingCollectOrder = ShoppingCollectOrder::find($shopping_user->shopping_collect_order_id);
+ //set Data!
+ $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price
+ $data = [
+ 'shopping_user_id' => $shopping_user->id,
+ 'auth_user_id' => $shopping_user->auth_user_id,
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'user_shop_id' => $user_shop->id,
+ 'payment_for' => $shopping_user->getOrderPaymentFor(),
+ 'total' => $total,
+ 'subtotal' => $ShoppingCollectOrder->price_total_net,
+ 'shipping' => 0,
+ 'shipping_net' => 0,
+ 'subtotal_ws' => $ShoppingCollectOrder->price_total_net,
+ 'tax' => $ShoppingCollectOrder->tax_total,
+ 'tax_split' => $ShoppingCollectOrder->tax_split,
+ 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'points' => $ShoppingCollectOrder->points,
+ 'weight' => 0,
+ 'txaction' => 'prev',
+ 'mode' => Util::getUserShoppingMode(),
+ ];
+ }else{
+ $data = [
+ 'shopping_user_id' => $shopping_user->id,
+ 'auth_user_id' => $shopping_user->auth_user_id,
+ 'country_id' => Yard::instance('shopping')->getShippingCountryId(),
+ 'language' => \App::getLocale(),
+ 'user_shop_id' => $user_shop->id,
+ 'payment_for' => $shopping_user->getOrderPaymentFor(),
+ 'total' => Yard::instance('shopping')->total(2, '.', ''),
+ 'subtotal' => Yard::instance('shopping')->subtotal(2, '.', ''),
+ 'shipping' => Yard::instance('shopping')->shipping(2, '.', ','),
+ 'shipping_net' => Yard::instance('shopping')->shippingNet(2, '.', ''),
+ 'subtotal_ws' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
+ 'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''),
+ 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
+ 'points' => Yard::instance('shopping')->points(),
+ 'weight' => Yard::instance('shopping')->weight(),
+ 'is_abo' => isset($data['is_abo']) ? $data['is_abo'] : false,
+ 'abo_interval' => isset($data['abo_interval']) ? $data['abo_interval'] : null,
+ 'txaction' => 'prev',
+ 'mode' => Util::getUserShoppingMode(),
+ ];
+ }
+
+ $shopping_order= false;
+ if($this->getSessionPayments('shopping_order_id')){
+ $shopping_order = ShoppingOrder::find($this->getSessionPayments('shopping_order_id'));
+ if($shopping_order){
+ $shopping_order->fill($data);
+ $shopping_order->save();
+ }
+ }
+ if(!$shopping_order){
+ $shopping_order = ShoppingOrder::create($data);
+ if($shopping_user->is_from === 'collection' && $ShoppingCollectOrder){
+ $ShoppingCollectOrder->shopping_order_id = $shopping_order->id;
+ $ShoppingCollectOrder->save();
+ }
+ }
+ $this->putSessionPayments('shopping_order_id', $shopping_order->id);
+
+ $items = Yard::instance('shopping')->getContentByOrder();
+ $shopping_order->shopping_order_items()->each(function($model) use ($items, $shopping_order, $shopping_user) {
+ foreach ($items as $item) {
+ if ($model->row_id === $item->rowId) {
+ $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', '');
+ $tax = $item->price - $price_net;
+ $data = [
+ 'shopping_order_id' => $shopping_order->id,
+ 'row_id' => $item->rowId,
+ 'product_id' => $item->id,
+ 'comp' => $item->options->comp,
+ 'qty' => $item->qty,
+ 'price' => $item->price,
+ 'price_net' => $price_net,
+ 'tax_rate' => $item->taxRate,
+ 'tax' => $tax,
+ 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id),
+ 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(),
+ 'points' => $item->options->points,
+ 'slug' => $item->options->slug,
+ ];
+ if($shopping_user->is_from === 'homeparty'){
+ $data['homeparty_id'] = (int) $shopping_user->homeparty_id;
+ $data['product_id'] = null;
+ }
+ if($shopping_user->is_from === 'collection'){
+ $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id;
+ $data['product_id'] = null;
+ }
+ $model->fill($data)->save();
+ return false;
+ }
+ }
+ return $model->delete();
+ });
+ foreach ($items as $item) {
+ if (!ShoppingOrderItem::where('shopping_order_id', $shopping_order->id)->where('row_id', $item->rowId)->count()){
+
+ $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', '');
+ $tax = $item->price - $price_net;
+
+ $data = [
+ 'shopping_order_id' => $shopping_order->id,
+ 'row_id' => $item->rowId,
+ 'product_id' => $item->id,
+ 'comp' => $item->options->comp,
+ 'qty' => $item->qty,
+ 'price' => $item->price,
+ 'price_net' => $price_net,
+ 'tax_rate' => $item->taxRate,
+ 'tax' => $tax,
+ 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id),
+ 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(),
+ 'points' => $item->options->points,
+ 'slug' => $item->options->slug
+ ];
+
+ if($shopping_user->is_from === 'homeparty'){
+ $data['homeparty_id'] = (int) $shopping_user->homeparty_id;
+ $data['price_vk_net'] = 0;
+ $data['product_id'] = null;
+ }
+ if($shopping_user->is_from === 'collection'){
+ $data['price_vk_net'] = 0;
+ $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id;
+ $data['product_id'] = null;
+ }
+ $shopping_order_item = ShoppingOrderItem::create($data);
+ }
+ }
+ if($shopping_user->is_from === 'homeparty'){
+ $shopping_order->makeHomepartyTaxSplit();
+ }elseif($shopping_user->is_from === 'collection'){
+ //is set on create / filll.
+ }else{
+ $shopping_order->makeTaxSplit();
+ }
+ return $shopping_order;
+ }
+ public function makeShoppingUser($data){
+
+ $data['same_as_billing'] = isset($data['same_as_billing']) ? false : true; //reinvert
+ $data['accepted_data_checkbox'] = isset($data['accepted_data_checkbox']) ? true : false;
+ $shopping_user = false;
+ if($this->getSessionPayments('shopping_user_id')){
+ $shopping_user = ShoppingUser::find($this->getSessionPayments('shopping_user_id'));
+ if($shopping_user){
+ $shopping_user->fill($data);
+ $shopping_user->mode = null;
+ $shopping_user->save();
+ }
+ }
+ if(!$shopping_user){
+ $shopping_user = ShoppingUser::create($data);
+ }
+ $this->putSessionPayments('shopping_user_id', $shopping_user->id);
+
+ return $shopping_user;
+ }
+
+ public function getPaymentsMethods($is_from, $is_abo = false){
+ $payment_methods = [];
+ if($is_from !== 'shopping' && Util::getAuthUser()){
+ $user = Util::getAuthUser();
+ $payment_methods['default'] = $user->payment_methods;
+ $payment_methods['data'] = $user->account->payment_data;
+ }else{
+ $payment_methods['default'] = PaymentMethod::getDefaultAsArray($is_abo)->toArray();
+ $payment_methods['data'] = false;
+ }
+ if($is_abo){
+ $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->where('is_abo', true)->get()->pluck( 'id', 'short')->toArray();
+ }else{
+ $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->get()->pluck( 'id', 'short')->toArray();
+ }
+ return $payment_methods;
+ }
+
+ public function isPaymentsMethodsActive($payment_method, $is_from, $is_abo = false){
+ $payment_names = ['wlt#PPE' => 'PP', 'cc' => 'CC', 'sb#PNT' => 'SB', 'elv' => 'SEPA', 'vor' => 'VOR', 'fnc#MIV' => 'FNC'];
+ $payment_methods = $this->getPaymentsMethods($is_from, $is_abo);
+ if(isset($payment_names[$payment_method])){
+ $payment_with = $payment_names[$payment_method];
+ if(array_key_exists($payment_with, $payment_methods['active']) && in_array($payment_methods['active'][$payment_with], $payment_methods['default'])){
+ return true;
+ }
+ }
+ abort(404);
+ }
+
+ public function makeCustomerShoppingUser($shopping_data){
+ // $shopping_user = ShoppingUser::findOrFail($shopping_data['shopping_user_id']);
+ $shopping_user = new ShoppingUser();
+ $shopping_user->fill($shopping_data);
+ $shopping_user->faker_mail = false;
+ $shopping_user->auth_user_id = null;
+ $shopping_user->homeparty_id = null;
+ $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert
+ // $shopping_user->id = null;
+ $shopping_user->accepted_data_checkbox = 1;
+ return $shopping_user;
+
+ }
+
+ public function shoppingUserAuthData($is_from, $is_for, $data = []){
+
+ $user = Util::getAuthUser();
+ $shopping_user = new ShoppingUser();
+ $shopping_user->auth_user_id = $user->id;
+ $shopping_user->mode = 'prev';
+ $shopping_user->language = \App::getLocale();
+
+ $shopping_user->billing_salutation = $user->account->salutation;
+ $shopping_user->billing_company = $user->account->company;
+ $shopping_user->billing_firstname = $user->account->first_name;
+ $shopping_user->billing_lastname = $user->account->last_name;
+ $shopping_user->billing_address = $user->account->address;
+ $shopping_user->billing_address_2 = $user->account->address_2;
+ $shopping_user->billing_zipcode = $user->account->zipcode;
+ $shopping_user->billing_city = $user->account->city;
+ $shopping_user->billing_country_id = $user->account->country_id;
+ $shopping_user->billing_phone = $user->account->phone;
+ $shopping_user->billing_email = $user->email;
+ $shopping_user->faker_mail = false;
+ $shopping_user->shipping_email = $user->email;
+
+ $shopping_user->accepted_data_checkbox = 1;
+ $shopping_user->is_for = $is_for;
+ $shopping_user->is_from = $is_from;
+ $shopping_user->homeparty_id = isset($data['homeparty_id']) ? $data['homeparty_id'] : null;
+ $shopping_user->shopping_collect_order_id = isset($data['shopping_collect_order_id']) ? $data['shopping_collect_order_id'] : null;
+
+ //Lieferadresse
+ if($is_from === 'user_order'){
+ if(isset($data['shopping_user_id']) && strpos($data['is_for'], 'ot') !== false){
+ $s_user = ShoppingUser::findOrFail($data['shopping_user_id']);
+ /* $shopping_user->billing_salutation = $s_user->billing_salutation;
+ $shopping_user->billing_company = $s_user->billing_company;
+ $shopping_user->billing_firstname = $s_user->billing_firstname;
+ $shopping_user->billing_lastname = $s_user->billing_lastname;
+ $shopping_user->billing_address = $s_user->billing_address;
+ $shopping_user->billing_address_2 = $s_user->billing_address_2;
+ $shopping_user->billing_zipcode = $s_user->billing_zipcode;
+ $shopping_user->billing_city = $s_user->billing_city;
+ $shopping_user->billing_country_id = $s_user->billing_country_id;
+ $shopping_user->billing_phone = $s_user->billing_phone;
+ $shopping_user->billing_email = $s_user->billing_email;
+ ;*/
+ $shopping_user->faker_mail = $s_user->faker_mail;
+ if(!$s_user->faker_mail){
+ $shopping_user->shipping_email = $s_user->billing_email;
+ }
+ $shopping_user->shopping_user_id = $data['shopping_user_id'];
+ $shopping_user->member_id = $s_user->member_id;
+ }
+ $shopping_user->same_as_billing = true;
+ $shopping_user->shipping_salutation = isset($data['shipping_salutation']) ? $data['shipping_salutation'] : '';
+ $shopping_user->shipping_company = isset($data['shipping_company']) ? $data['shipping_company'] : '';
+ $shopping_user->shipping_firstname = isset($data['shipping_firstname']) ? $data['shipping_firstname'] : '';
+ $shopping_user->shipping_lastname = isset($data['shipping_lastname']) ? $data['shipping_lastname'] : '';
+ $shopping_user->shipping_address = isset($data['shipping_address']) ? $data['shipping_address'] : '';
+ $shopping_user->shipping_address_2 = isset($data['shipping_address_2']) ? $data['shipping_address_2'] : '';
+ $shopping_user->shipping_zipcode = isset($data['shipping_zipcode']) ? $data['shipping_zipcode'] : '';
+ $shopping_user->shipping_city = isset($data['shipping_city']) ? $data['shipping_city'] : '';
+ $shopping_user->shipping_country_id = Yard::instance('shopping')->getShippingCountryCountryId();
+ $shopping_user->shipping_phone = isset($data['shipping_phone']) ? $data['shipping_phone'] : '';
+
+ }else{
+ $shopping_user->same_as_billing = $user->account->same_as_billing ? false : true;
+ $shopping_user->shipping_salutation = $user->account->shipping_salutation;
+ $shopping_user->shipping_company = $user->account->shipping_company;
+ $shopping_user->shipping_firstname = $user->account->shipping_firstname;
+ $shopping_user->shipping_lastname = $user->account->shipping_lastname;
+ $shopping_user->shipping_address = $user->account->shipping_address;
+ $shopping_user->shipping_address_2 = $user->account->shipping_address_2;
+ $shopping_user->shipping_zipcode = $user->account->shipping_zipcode;
+ $shopping_user->shipping_city = $user->account->shipping_city;
+ $shopping_user->shipping_country_id = $user->account->shipping_country_id;
+ $shopping_user->shipping_phone = $user->account->shipping_phone;
+ }
+
+ return $shopping_user;
+ }
+
+ public function putSessionPayments($key, $value){
+ $content = $this->getContent();
+ $content->put($key, $value);
+ $this->session->put($this->instance, $content);
+
+ }
+
+ public function getSessionPayments($key){
+
+ $content = $this->getContent();
+ if ($content->has($key)){
+ return $content->get($key);
+ }
+ return false;
+ }
+
+ public function sessionDestroy()
+ {
+ $this->session->remove($this->instance);
+ }
+
+ private function getContent()
+ {
+ if (is_null($this->session->get($this->instance))) {
+ return new Collection([]);
+ }
+ return $this->session->get($this->instance);
+ }
+}
\ No newline at end of file
diff --git a/app/Repositories/DC/FileRepository.php b/app/Repositories/DC/FileRepository.php
index 054f432..b274e71 100644
--- a/app/Repositories/DC/FileRepository.php
+++ b/app/Repositories/DC/FileRepository.php
@@ -2,24 +2,36 @@
namespace App\Repositories\DC;
-use Imagick;
-use Request;
+
use App\Models\DcFile;
use App\Services\Util;
use App\Models\DcFileTag;
use App\Repositories\BaseRepository;
use Intervention\Image\Facades\Image;
-
+use Imagick;
class FileRepository extends BaseRepository {
+ private const ALLOWED_IMAGE_TYPES = [
+ 'image/jpeg',
+ 'image/gif',
+ 'image/png'
+ ];
+
+ private const ALLOWED_PDF_TYPES = [
+ 'application/pdf'
+ ];
- public function __construct()
- {
- }
+ private const THUMB_WIDTH = 542;
+ private const THUMB_HEIGHT = 360;
+ private const BIG_WIDTH = 1600;
+ private const BIG_HEIGHT = 900;
- public function uploadFile( $form_data )
+ public function uploadFile(array $form_data): DcFile
{
+ if (!isset($form_data['file']) || !$form_data['file']->isValid()) {
+ throw new \InvalidArgumentException('Invalid file provided');
+ }
$file = $form_data['file'];
$originalName = $file->getClientOriginalName();
$extension = $file->getClientOriginalExtension();
@@ -43,109 +55,163 @@ class FileRepository extends BaseRepository {
return $dc_file;
}
- public function makeThumb($id){
+ public function makeThumb(int $id): bool
+ {
$file = DcFile::findOrFail($id);
$this->makeThumbFromFile($file);
+ return true;
}
- public function makeThumbFromFile($file)
+ public function makeThumbFromFile(DcFile $file): bool
{
- $path = $file->getFile(true);
- $filename = $file->filename;
- $mine = \File::mimeType($path);
- //make thumb
- $allowedMimeTypes = ['image/jpeg','image/gif','image/png'];
- if (in_array($mine, $allowedMimeTypes)) {
- $img = Image::make($path);
- $img->resize(542, 360, function ($c) {
- $c->aspectRatio();
- $c->upsize();
- });
- \Storage::disk('public')->put('dc/thumb/'.basename($filename), (string) $img->encode());
-
- $img = Image::make($path);
- $img->resize(1600, 900, function ($c) {
- $c->aspectRatio();
- $c->upsize();
- });
- \Storage::disk('public')->put('dc/big/'.basename($filename), (string) $img->encode());
- }
-
- $allowedMimeTypes = ['application/pdf'];
- if (in_array($mine, $allowedMimeTypes)) {
- $imagick = new \Imagick ($path.'[0]'); // 0 specifies the first page of the pdf
- $imagick->setImageBackgroundColor('#ffffff');
- $imagick = $imagick->mergeImageLayers( Imagick::LAYERMETHOD_FLATTEN );
- $imagick->setImageFormat('jpg'); // set the format of the output image
- $imagick->setImageCompression(\Imagick::COMPRESSION_JPEG);
- $imagick->setImageCompressionQuality(60);
-
- $imagick->resizeImage(1600, 900, \Imagick::FILTER_LANCZOS, 1,1);
- $filestore = \Storage::disk('public')->path('dc/big/').basename($filename).".jpg";
- $imagick->writeImage($filestore);
-
- $imagick->resizeImage(542, 360, \Imagick::FILTER_LANCZOS, 1,1);
- $filestore = \Storage::disk('public')->path('dc/thumb/').basename($filename).".jpg";
- $imagick->writeImage($filestore);
-
- }
-
- return true;
- }
-
- public function tagsUpdate($id, $tags){
- $file = DcFile::findOrFail($id);
- $file_tags = DcFileTag::where('file_id', $file->id)->get();
-
- //remove Tags
- foreach ($file_tags as $file_tag) {
- if(is_array($tags) && ($pos = array_search($file_tag->tag_id, $tags)) !== FALSE){
- unset($tags[$pos]);
- }else{
- $file_tag->delete();
+ try {
+ $path = $file->getFile(true);
+ if (!file_exists($path)) {
+ throw new \Exception('File not found');
}
- }
- //set taTagsgs
- if(is_array($tags)){
- foreach ($tags as $key => $tag_id) {
- DcFileTag::create([
- 'file_id' => $file->id,
- 'tag_id' => $tag_id
- ]);
- }
- }
+
+ $filename = $file->filename;
+ $mime = \File::mimeType($path);
+
+ if (in_array($mime, self::ALLOWED_IMAGE_TYPES)) {
+ $this->processImage($path, $filename);
+ } elseif (in_array($mime, self::ALLOWED_PDF_TYPES)) {
+ $this->processPdf($path, $filename);
+ }
+
+ return true;
+ } catch (\Exception $e) {
+ \Log::error('Thumbnail creation failed: ' . $e->getMessage());
+ return false;
+ }
+ }
+
+ private function processImage(string $path, string $filename): void
+ {
+ // Thumbnail
+ $img = Image::make($path);
+ $img->resize(542, 360, function ($c) {
+ $c->aspectRatio();
+ $c->upsize();
+ });
+ \Storage::disk('public')->put('dc/thumb/'.basename($filename), (string) $img->encode());
+
+ // Big image
+ $img = Image::make($path);
+ $img->resize(1600, 900, function ($c) {
+ $c->aspectRatio();
+ $c->upsize();
+ });
+ \Storage::disk('public')->put('dc/big/'.basename($filename), (string) $img->encode());
+ }
+
+ private function processPdf(string $path, string $filename): void
+ {
+ try {
+ // PDF mit höherer Auflösung rendern
+ $imagick = new \Imagick();
+ $imagick->setResolution(300, 300);
+ $imagick->readImage($path.'[0]');
+
+ // Grundlegende Bildoptimierungen
+ $imagick->setImageBackgroundColor('#ffffff');
+ $imagick->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
+ $imagick->setImageFormat('jpg');
+ $imagick->setImageCompression(\Imagick::COMPRESSION_JPEG);
+ $imagick->setImageCompressionQuality(80);
+
+ // Große Version erstellen
+ $bigImage = clone $imagick;
+ $bigImage->resizeImage(self::BIG_WIDTH, self::BIG_HEIGHT, \Imagick::FILTER_LANCZOS, 1, true);
+ $bigImage->writeImage(\Storage::disk('public')->path('dc/big/').basename($filename).'.jpg');
+ $bigImage->clear();
+
+ // Thumbnail erstellen
+ $imagick->resizeImage(self::THUMB_WIDTH, self::THUMB_HEIGHT, \Imagick::FILTER_LANCZOS, 1, true);
+ $imagick->writeImage(\Storage::disk('public')->path('dc/thumb/').basename($filename).'.jpg');
+
+ // Ressourcen freigeben
+ $imagick->clear();
+ } catch (\ImagickException $e) {
+ \Log::error('PDF Verarbeitung fehlgeschlagen: ' . $e->getMessage());
+ throw new \RuntimeException('PDF Verarbeitung fehlgeschlagen: ' . $e->getMessage());
+ } finally {
+ if (isset($bigImage)) {
+ $bigImage->destroy();
+ }
+ if (isset($imagick)) {
+ $imagick->destroy();
+ }
+ }
+ }
+
+ public function tagsUpdate($id, array $tags = []): bool
+ {
+ $file = DcFile::findOrFail($id);
+
+ // Get existing tags
+ $existingTags = DcFileTag::where('file_id', $file->id)
+ ->pluck('tag_id')
+ ->toArray();
+
+ // Delete removed tags
+ $tagsToDelete = array_diff($existingTags, $tags);
+ if (!empty($tagsToDelete)) {
+ DcFileTag::where('file_id', $file->id)
+ ->whereIn('tag_id', $tagsToDelete)
+ ->delete();
+ }
+
+ // Add new tags
+ $tagsToAdd = array_diff($tags, $existingTags);
+ $newTags = [];
+ foreach ($tagsToAdd as $tagId) {
+ $newTags[] = [
+ 'file_id' => $file->id,
+ 'tag_id' => $tagId
+ ];
+ }
+
+ if (!empty($newTags)) {
+ DcFileTag::insert($newTags);
+ }
+
return true;
}
- public function deleteThumb($id){
- $file = DcFile::findOrFail($id);
- $path_thumb = $file->getThumb(true);
- if (file_exists($path_thumb)) {
- unlink($path_thumb);
- }
- $path_big = $file->getBig(true);
- if (file_exists($path_big)) {
- unlink($path_big);
- }
- return true;
- }
-
- public function deleteFile($id){
- $file = DcFile::findOrFail($id);
- $path_thumb = $file->getThumb(true);
- if (file_exists($path_thumb)) {
- unlink($path_thumb);
- }
- $path_big = $file->getBig(true);
- if (file_exists($path_big)) {
- unlink($path_big);
- }
- $path = $file->getFile(true);
+ private function deleteFileIfExists(string $path): void
+ {
if (file_exists($path)) {
unlink($path);
}
- $file->delete();
- return true;
+ }
+
+ public function deleteThumb($id): bool
+ {
+ try {
+ $file = DcFile::findOrFail($id);
+ $this->deleteFileIfExists($file->getThumb(true));
+ $this->deleteFileIfExists($file->getBig(true));
+ return true;
+ } catch (\Exception $e) {
+ \Log::error('Thumbnail deletion failed: ' . $e->getMessage());
+ return false;
+ }
+ }
+
+ public function deleteFile(int $id): bool
+ {
+ try {
+ $file = DcFile::findOrFail($id);
+ $this->deleteFileIfExists($file->getThumb(true));
+ $this->deleteFileIfExists($file->getBig(true));
+ $this->deleteFileIfExists($file->getFile(true));
+ $file->delete();
+ return true;
+ } catch (\Exception $e) {
+ \Log::error('File deletion failed: ' . $e->getMessage());
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/app/Repositories/FileRepository.php b/app/Repositories/FileRepository.php
index d64f497..1880879 100644
--- a/app/Repositories/FileRepository.php
+++ b/app/Repositories/FileRepository.php
@@ -89,47 +89,5 @@ class FileRepository extends BaseRepository {
], 200);
}
- /* public function createFile(Request $request)
- {
- $locale = \App::getLocale();
- $data = [
- 'step' => 2,
- 'locale' => $locale,
- ];
- $rules = array(
- 'network_name' => 'required|max:255',
- 'input_file_now' => 'required|mimes:png,pdf,jpg,jpeg|max:30000'
- );
- $validator = Validator::make(Request::all(), $rules);
-
- if ($validator->fails()) {
- // get the error messages from the validator
- $messages = $validator->messages();
- // redirect our user back to the form with the errors from the validator
- return view('user.register_complete', $data)->withErrors($validator);
-
- } else {
- $user = \Auth::user();
- if(!$user->account->network_name){
- $file = request()->file('input_file_now');
- //$ext = $file->guessClientExtension();
- //$file->storeAs('user/' . $user->id .'/verification');
- $data = $file->store('user/' . $user->id .'/verification');
- $account = $user->account;
- $account->network_name = Input::get('network_name');
- $account->network_verification = basename($data);
- $account->save();
-
- $user->role_id = 2; //set as User by default!
- $user->save();
-
-
- }
-
- return redirect('complete_register');
- //return view('user.register_complete', $data);
- }
- }*/
-
}
\ No newline at end of file
diff --git a/app/Repositories/ProductRepository.php b/app/Repositories/ProductRepository.php
index 69c39c1..7e577dc 100644
--- a/app/Repositories/ProductRepository.php
+++ b/app/Repositories/ProductRepository.php
@@ -34,12 +34,12 @@ class ProductRepository extends BaseRepository {
$data['sponsor_buying_points'] = isset($data['sponsor_buying_points']) ? 1 : 0;
$data['show_on'] = isset($data['show_on']) ? $data['show_on'] : null;
-
if($data['id'] === "new"){
$this->model = Product::create($data);
}
else{
$this->model = $this->getById($data['id']);
+ $this->model->slug = null;
$this->model->fill($data);
$this->model->save();
}
diff --git a/app/Services/AboHelper.php b/app/Services/AboHelper.php
index dfcca27..823bff7 100644
--- a/app/Services/AboHelper.php
+++ b/app/Services/AboHelper.php
@@ -1,48 +1,158 @@
'paymend_paid',
+ 'appointed' => 'paymend_open',
+ 'failed' => 'paymend_failed',
+ 'extern' => 'extern_open', //offen
+ 'extern_paid' => 'extern_paid',
+ 'invoice_open' => 'invoice_open',
+ 'invoice_paid' => 'invoice_paid',
+ 'invoice_non' => 'invoice_no_payment',
+ 'NULL' => 'no_payment',
+ ];
+
+ public static function userHasAbo(User $user){
+ $user = $user ? $user : \Auth::user();
+ return UserAbo::where('user_id', $user->id)->where('is_for', 'me')->where('status', '>', 1)->first() === null ? false : true;
+ }
+
+ public static function memberHasAbo(ShoppingUser $shopping_user){
+ if(!$shopping_user){
+ return false;
+ }
+ return UserAbo::where('email', $shopping_user->billing_email)->where('is_for', 'ot')->where('status', '>', 1)->first() === null ? false : true;
+ }
+
+ public static function hasAboByEmail($email){
+ return UserAbo::where('email', $email)->where('status', '>', 1)->first() === null ? false : true;
+ }
+
+ public static function setAboStatus(ShoppingOrder $shopping_order, $status){
+ $user_abo = $shopping_order->getUserAbo();
+ if($user_abo && $user_abo->status < 2){ //status < 2 is not active
+ $user_abo->update(['status' => $status]);
+ }
+ UserAboOrder::where('user_abo_id', $user_abo->id)->where('shopping_order_id', $shopping_order->id)->update(['status' => $status]);
+ }
+ public static function setAboActive(ShoppingOrder $shopping_order, $status){
+ self::setAboStatus($shopping_order, $status);
+
+ //delete UserAbo is not active status = 1
+ //is_for = me
+ UserAbo::where('user_id', $shopping_order->auth_user_id)->where('is_for', 'me')->where('status', 1)->delete();
+ //is_for = ot
+ UserAbo::where('member_id', $shopping_order->member_id)->where('email', $shopping_order->shopping_user->billing_email)->where('is_for', 'ot')->where('status', 1)->delete();
+
+ }
+
+ public static function aboHasBaseProduct($yard_products){
+ foreach($yard_products as $product){
+ if(is_array($product->options->show_on)){
+ if(in_array('12', $product->options->show_on)){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ public static function getAboShowOn(Product $product){
+ $show_on = $product->show_on;
+ if(in_array('12', $show_on)){
+ return 'base';
+ }
+ if(in_array('13', $show_on)){
+ return 'upgrade';
+ }
+ return false;
+ }
+ public static function getAboTypeBadge($abo_type){
+ if($abo_type === 'base'){
+ return ' '.__('abo.'.$abo_type).' ';
+ }
+ if($abo_type === 'upgrade'){
+ return ' '.__('abo.'.$abo_type).' ';
+ }
+ return '';
+ }
+
+ public static function setNextDate($date, $abo_interval){
+ $nextDate = Carbon::parse($date)->firstOfMonth();
+ $nextDate->addDays($abo_interval-1);
+ return $nextDate->gt($date) ? $nextDate : $nextDate->addMonth(1);
+ }
+
public static function createNewAbo(ShoppingPayment $shopping_payment){
+ //is Abo - create init Abo from PP or else
+ if($shopping_payment->shopping_order->is_abo && $shopping_payment->shopping_order->abo_interval > 0){
+ $payment_transaction = $shopping_payment->payment_transactions->last();
- $payment_transaction = $shopping_payment->payment_transactions->last();
- $user_abo = UserAbo::create([
- 'user_id' => $shopping_payment->shopping_order->auth_user_id,
- 'shopping_user_id' => $shopping_payment->shopping_order->shopping_user_id,
- 'is_for' => $shopping_payment->shopping_order->shopping_user->is_for,
- 'payone_userid' => $payment_transaction->userid,
- 'clearingtype' => $shopping_payment->clearingtype,
- 'wallettype' => $shopping_payment->wallettype,
- 'amount' => $shopping_payment->amount,
- 'currency' => $shopping_payment->currency,
- 'status' => 1,
- 'abo_interval' => $shopping_payment->abo_interval,
- 'start_date' => now(),
- 'last_date' => now(),
- 'next_date' => now()->addWeeks($shopping_payment->abo_interval),
- 'next_abo_date' => $shopping_payment->created_at->addMonths($shopping_payment->abo_interval),
- 'count' => 1,
- ]);
- if($user_abo){
- UserAboOrder::create([
+ $user_abo = UserAbo::create([
+ 'user_id' => $shopping_payment->shopping_order->auth_user_id,
+ 'member_id' => $shopping_payment->shopping_order->member_id,
+ 'shopping_user_id' => $shopping_payment->shopping_order->shopping_user_id,
+ 'email' => $shopping_payment->shopping_order->shopping_user->billing_email,
+ 'is_for' => $shopping_payment->shopping_order->shopping_user->is_for,
+ 'payone_userid' => $payment_transaction->userid,
+ 'clearingtype' => $shopping_payment->clearingtype,
+ 'wallettype' => $shopping_payment->wallettype,
+ 'carddata' => $shopping_payment->carddata,
+ 'amount' => $shopping_payment->amount,
+ 'status' => 1,
+ 'abo_interval' => $shopping_payment->abo_interval,
+ 'start_date' => now(),
+ 'last_date' => now(),
+ 'next_date' => self::setNextDate(now(), $shopping_payment->abo_interval),
+ ]);
+
+ if($user_abo){
+ self::createAboItems($user_abo, $shopping_payment);
+ UserAboOrder::create([
+ 'user_abo_id' => $user_abo->id,
+ 'shopping_order_id' => $shopping_payment->shopping_order_id,
+ 'status' => 1,
+ ]);
+ }
+ }
+
+ }
+
+ public static function createAboItems($user_abo, ShoppingPayment $shopping_payment){
+ foreach($shopping_payment->shopping_order->shopping_order_items as $item){
+ UserAboItem::create([
'user_abo_id' => $user_abo->id,
- 'shopping_order_id' => $shopping_payment->shopping_order_id,
+ 'product_id' => $item->product_id,
+ 'comp' => $item->comp ?? 0,
+ 'qty' => $item->qty,
'status' => 1,
]);
}
}
+ public static function getTransStatusFilterText(){
+ $ret = [];
+ foreach(self::$txaction_filter_text as $key=>$val){
+ $ret[$key] = trans('payment.'.$val);
+ }
+ return $ret;
+ }
+
}
\ No newline at end of file
diff --git a/app/Services/AboOrderCart.php b/app/Services/AboOrderCart.php
new file mode 100644
index 0000000..b87ff88
--- /dev/null
+++ b/app/Services/AboOrderCart.php
@@ -0,0 +1,201 @@
+destroy();
+ self::$customer_detail = self::makeCustomerDetail($user_abo);
+ if($user_abo->is_for === 'me'){
+ self::$is_for = 'abo-me';
+ if($user_abo->user && $user_abo->user->account->same_as_billing){
+ $country_id = $user_abo->user->account->country_id;
+ }else{
+ $country_id = $user_abo->user->account->shipping_country_id;
+ }
+ if($country_id && $shipping_country = ShippingCountry::whereCountryId($country_id)->first()){
+ if($shipping_country->shipping && $shipping_country->shipping->active){
+ UserService::initUserYard($user_abo->user, $shipping_country->id, 'abo-me');
+ return true;
+ }
+ }
+ abort(403, 'Fehler: Versandland nicht gefunden');
+ }
+ if($user_abo->is_for === 'ot'){
+ self::$is_for = 'abo-ot-customer';
+ UserService::initCustomerYard(self::$customer_detail, 'abo-ot-customer');
+ return true;
+
+ }
+
+ return false;
+
+ }
+
+ public static function makeOrderYard($user_abo)
+ {
+ self::$user_abo = $user_abo;
+ if($user_abo->is_for === 'ot'){
+ self::$is_for = 'abo-ot-customer';
+ }
+ if($user_abo->is_for === 'me'){
+ self::$is_for = 'abo-me';
+ }
+ foreach($user_abo->user_abo_items as $abo_item){
+ self::addProductToCart($abo_item);
+ }
+ Yard::instance('shopping')->reCalculateShippingPrice();
+
+ $user_abo->amount = Yard::instance('shopping')->totalWithShipping(2, '.', '')*100;
+ $user_abo->save();
+ }
+
+ private static function addProductToCart($item){
+
+ $product = Product::find($item->product_id);
+ $tax_free = Yard::instance('shopping')->getUserTaxFree();
+ $user_country = Yard::instance('shopping')->getUserCountry();
+
+ if($product){
+ if($item->comp){
+ $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false,
+ ['image' => '', 'slug' => $product->slug, 'weight' => 0, 'points' => 0,
+ 'comp' => $item->comp, 'product_id' => $product->id]);
+ Yard::setTax($cartItem->rowId, 0);
+ return true;
+ }
+ if(self::$is_for === 'ot-customer' || self::$is_for === 'abo-ot-customer'){
+ $cartItem = Yard::instance('shopping')
+ ->add($product->id, $product->getLang('name'), $item->qty,
+ round($product->getPriceWith($tax_free, false, $user_country, false, self::$user_abo->user), 1), false, false,
+ ['image' => '', 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
+ }else{
+ $cartItem = Yard::instance('shopping')
+ ->add($product->id, $product->getLang('name'), $item->qty,
+ $product->getPriceWith($tax_free, true, $user_country, false, self::$user_abo->user), false, false,
+ ['image' => '', 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
+ }
+ if($tax_free){
+ Yard::setTax($cartItem->rowId, 0);
+ }else{
+ Yard::setTax($cartItem->rowId, $product->getTaxWith($user_country));
+ }
+ }
+ }
+
+ public static function checkNumOfCompProducts($user_abo){
+
+ if($user_abo->is_for === 'me'){
+ $needNumComp = Yard::instance('shopping')->getNumComp();
+ if($needNumComp > 0){
+ $UserAboItems = UserAboItem::where('user_abo_id', $user_abo->id)->where('comp', '>', 0)->get();
+ if(count($UserAboItems) === $needNumComp){
+ return true;
+ }
+
+ //need to add
+ if(count($UserAboItems) < $needNumComp){
+ $product = Product::whereActive(true)->where('shipping_addon', true)->whereJsonContains('show_on', '12')->orderBy('pos', 'DESC')->first();
+ for($i = count($UserAboItems); $i <= $needNumComp; $i++){
+ $UserAboItem = UserAboItem::create([
+ 'user_abo_id' => $user_abo->id,
+ 'product_id' => $product->id,
+ 'comp' => $i + 1,
+ 'qty' => 1,
+ 'status' => 1,
+ ]);
+ self::addProductToCart($UserAboItem);
+ }
+ }
+ //need to remove
+ if(count($UserAboItems) > $needNumComp){
+ foreach($UserAboItems as $UserAboItem){
+ if($UserAboItem->comp > $needNumComp){
+ $UserAboItem->delete();
+ }
+ }
+ foreach (Yard::instance('shopping')->content() as $row) {
+ if($row->options->comp > $needNumComp) {
+ Yard::instance('shopping')->remove($row->rowId);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public static function getCustomerDetail(){
+ return self::$customer_detail;
+ }
+
+ /* Need this, can change the address */
+ public static function makeCustomerDetail($user_abo){
+
+ if($user_abo->is_for === 'me'){
+ //only on Abo!
+ $user = $user_abo->user;
+ $shopping_user = new ShoppingUser();
+ $shopping_user->billing_salutation = $user->account->salutation;
+ $shopping_user->billing_company = $user->account->company;
+ $shopping_user->billing_firstname = $user->account->first_name;
+ $shopping_user->billing_lastname = $user->account->last_name;
+ $shopping_user->billing_address = $user->account->address;
+ $shopping_user->billing_address_2 = $user->account->address_2;
+ $shopping_user->billing_zipcode = $user->account->zipcode;
+ $shopping_user->billing_city = $user->account->city;
+ $shopping_user->billing_country_id = $user->account->country_id;
+ $shopping_user->billing_phone = $user->account->phone;
+
+ if($user->account->same_as_billing){
+ $shopping_user->shipping_salutation = $user->account->salutation;
+ $shopping_user->shipping_company = $user->account->company;
+ $shopping_user->shipping_firstname = $user->account->first_name;
+ $shopping_user->shipping_lastname = $user->account->last_name;
+ $shopping_user->shipping_address = $user->account->address;
+ $shopping_user->shipping_address_2 = $user->account->address_2;
+ $shopping_user->shipping_zipcode = $user->account->zipcode;
+ $shopping_user->shipping_city = $user->account->city;
+ $shopping_user->shipping_country_id = $user->account->country_id;
+ $shopping_user->shipping_phone = $user->account->phone;
+ }else{
+ $shopping_user->shipping_salutation = $user->account->shipping_salutation;
+ $shopping_user->shipping_company = $user->account->shipping_company;
+ $shopping_user->shipping_firstname = $user->account->shipping_firstname;
+ $shopping_user->shipping_lastname = $user->account->shipping_lastname;
+ $shopping_user->shipping_address = $user->account->shipping_address;
+ $shopping_user->shipping_address_2 = $user->account->shipping_address_2;
+ $shopping_user->shipping_zipcode = $user->account->shipping_zipcode;
+ $shopping_user->shipping_city = $user->account->shipping_city;
+ $shopping_user->shipping_country_id = $user->account->shipping_country_id;
+ $shopping_user->shipping_phone = $user->account->shipping_phone;
+ }
+
+ }
+
+ if($user_abo->is_for === 'ot'){
+ //look for the primary user of this abo
+ $shopping_user = $user_abo->shopping_user->replicate();
+ }
+ return $shopping_user;
+ }
+
+}
\ No newline at end of file
diff --git a/app/Services/BusinessPlan/ExportBot.php b/app/Services/BusinessPlan/ExportBot.php
index 0d6a936..c56b340 100644
--- a/app/Services/BusinessPlan/ExportBot.php
+++ b/app/Services/BusinessPlan/ExportBot.php
@@ -1,4 +1,5 @@
init_from = $init_from;
}
- public function initStructureUser(User $user, $order='list') //tree or list
+ public function initStructureUser(User $user, $order = 'list') //tree or list
{
$line = 0;
$this->order = $order;
$this->root_user = $user;
-
- if($this->order === 'tree'){
- $this->user_tree = $this->setUserValues($user, $line);
- $this->user_tree->childs = $this->readChildUsers($this->user_tree, $line+1);
- }
- if($this->order === 'list'){
- $this->user_list = $this->setUserValues($user, $line);
- $this->readChildUsers($this->user_list, $line+1);
- }
-
+ if ($this->order === 'tree') {
+ $this->user_tree = $this->setUserValues($user, $line);
+ $this->user_tree->childs = $this->readChildUsers($this->user_tree, $line + 1);
+ }
+ if ($this->order === 'list') {
+ $this->user_list = $this->setUserValues($user, $line);
+ $this->readChildUsers($this->user_list, $line + 1);
+ }
}
- private function readChildUsers($parent_user, $line){
+ private function readChildUsers($parent_user, $line)
+ {
$childUsers = [];
$users = User::with('account')->select('users.*')
@@ -55,24 +55,25 @@ class ExportBot
->where('users.active', "=", 1)
->get();
- if($users){
- foreach($users as $user){
+ if ($users) {
+ foreach ($users as $user) {
$user_values = $this->setUserValues($user, $line);
- $childUsers[] = $user_values;
- if($this->order === 'list'){
+ $childUsers[] = $user_values;
+ if ($this->order === 'list') {
$this->user_list->childs[] = $user_values;
- $this->readChildUsers($user_values, $line+1);
- }
+ $this->readChildUsers($user_values, $line + 1);
+ }
}
}
return $childUsers;
}
- private function setUserValues(User $user, $line){
+ private function setUserValues(User $user, $line)
+ {
$sponsor_name = "";
- if($user->m_sponsor && $user->user_sponsor->account){
- $sponsor_name = $user->user_sponsor->account->m_first_name." ".$user->user_sponsor->account->m_last_name;
+ if ($user->m_sponsor && $user->user_sponsor->account) {
+ $sponsor_name = $user->user_sponsor->account->m_first_name . " " . $user->user_sponsor->account->m_last_name;
}
$obj = new stdClass();
$obj->line = $line;
@@ -93,28 +94,28 @@ class ExportBot
$obj->zipcode = $user->account->zipcode;
$obj->city = $user->account->city;
$obj->country_id = $user->account->country_id ? $user->account->country->getLocated() : "";
- $pre_phone = $user->account->pre_phone_id != "" ? $user->account->pre_phone->phone." " : "";
- $pre_mobil = $user->account->pre_mobil_id != "" ? $user->account->pre_mobil->phone." " : "";
- $obj->phone = $pre_phone.$user->account->phone;
- $obj->mobil = $pre_mobil.$user->account->mobil;
+ $pre_phone = $user->account->pre_phone_id != "" ? $user->account->pre_phone->phone . " " : "";
+ $pre_mobil = $user->account->pre_mobil_id != "" ? $user->account->pre_mobil->phone . " " : "";
+ $obj->phone = $pre_phone . $user->account->phone;
+ $obj->mobil = $pre_mobil . $user->account->mobil;
$obj->birthday = $user->account->birthday;
+ $obj->partner_since = $user->active_date ? $user->getActiveDateFormat(false) : "";
- if($this->order === 'tree'){
- $obj->childs = $this->readChildUsers($obj, $line+1);
+ if ($this->order === 'tree') {
+ $obj->childs = $this->readChildUsers($obj, $line + 1);
}
- if($this->order === 'list'){
+ if ($this->order === 'list') {
$obj->childs = [];
}
-
+
return $obj;
}
-
-
- public function getUser(){
+
+
+ public function getUser()
+ {
return $this->root_user;
}
-
-
}
diff --git a/app/Services/BusinessPlan/SalesPointsVolumeHelper.php b/app/Services/BusinessPlan/SalesPointsVolumeHelper.php
index 71d8e63..2c11ee7 100644
--- a/app/Services/BusinessPlan/SalesPointsVolumeHelper.php
+++ b/app/Services/BusinessPlan/SalesPointsVolumeHelper.php
@@ -15,7 +15,8 @@ class SalesPointsVolumeHelper
line: nach reihenfolge sortiert,
*/
private static $business_users_line = [];
-
+ private static $totalcommission = [];
+ private static $totalpoints = [];
private static $cbot = null;
@@ -36,7 +37,6 @@ class SalesPointsVolumeHelper
$deep = 0;
$ret = "";
foreach(self::$cbot->business_users as $business_user){
-
$ret .= self::addTableItemStructur($business_user, $deep);
}
return $ret;
@@ -68,7 +68,7 @@ class SalesPointsVolumeHelper
'.$pp.'
'.$item->first_name.' '.$item->last_name.'
- '.formatNumber($points, 0).' €
+ '.formatNumber($points, 0).'
'.formatNumber($margin, 1).' %
'.formatNumber($commission, 2).' €
'.$item->user_level_name.'
@@ -84,10 +84,16 @@ class SalesPointsVolumeHelper
self::addTableItemLine($business_user, $deep);
}
foreach(self::$business_users_line as $deep => $items){
+ self::$totalcommission[$deep] = 0;
+ self::$totalpoints[$deep] = 0;
foreach($items as $item){
$ret .= self::setTableHTMLItemLine($item, $deep);
}
+ if($deep > 0){
+ $ret .= self::addTableHTMLTotalItemLine($deep, 'line');
+ }
}
+ $ret .= self::addTableHTMLTotalItemLine($deep, 'end');
return $ret;
}
@@ -100,6 +106,39 @@ class SalesPointsVolumeHelper
}
}
}
+ private static function addTableHTMLTotalItemLine($deep, $type){
+ $points = 0;
+ $commission = 0;
+ if($type == 'end'){
+ $pp = ''.__('team.PP').'
';
+ $style = ' style="background-color:#d7d700;"';
+ $text = __('order.total');
+ foreach(self::$totalpoints as $key => $value){
+ $points += $value;
+ $commission += self::$totalcommission[$key];
+ }
+
+ }else{
+ $pp = ''.$deep.'. '.__('team.PP').'
';
+ $style = 'style="background-color:#e5e4e4"';
+ $text = __('order.sum');
+ $points = self::$totalpoints[$deep];
+ $commission = self::$totalcommission[$deep];
+ }
+
+
+
+ $ret = '
+ '.$pp.'
+ '.$text.'
+ '.formatNumber($points, 0).'
+
+ '.formatNumber($commission, 2).' €
+
+ ';
+
+ return $ret;
+ }
private static function setTableHTMLItemLine($item, $deep){
@@ -111,6 +150,8 @@ class SalesPointsVolumeHelper
$pp = ''.$deep.'. '.__('team.PP').'
';
$margin = self::$cbot->getKeybyLine($deep, 'margin');
$commission = $points / 100 * $margin;
+ self::$totalcommission[$deep] += $commission;
+ self::$totalpoints[$deep] += $points;
}
//
/*
@@ -121,11 +162,12 @@ class SalesPointsVolumeHelper
{{__('tables.commission')}} €
{{ __('tables.level') }}
*/
+
$ret = '
'.$pp.'
'.$item->first_name.' '.$item->last_name.'
- '.formatNumber($points, 0).' €
+ '.formatNumber($points, 0).'
'.formatNumber($margin, 1).' %
'.formatNumber($commission, 2).' €
'.$item->user_level_name.'
diff --git a/app/Services/CustomerPriority.php b/app/Services/CustomerPriority.php
index be35c2e..ec82c57 100644
--- a/app/Services/CustomerPriority.php
+++ b/app/Services/CustomerPriority.php
@@ -135,8 +135,8 @@ class CustomerPriority
$matches = [];
$change = [];
$ret = 'update';
+
//email geändert
-
if(isset($data['billing_email']) && $shopping_user->billing_email != $data['billing_email']){
$found = ShoppingUser::where('auth_user_id', '=', NULL)
->where('number', '!=', NULL) //has number
@@ -205,8 +205,10 @@ class CustomerPriority
$shopping_user->member_id = $member_id;
$shopping_user->number = self::nextNumber();
$shopping_user->save();
- $shopping_user->shopping_order->member_id = $member_id;
- $shopping_user->shopping_order->save();
+ if($shopping_user->shopping_order){
+ $shopping_user->shopping_order->member_id = $member_id;
+ $shopping_user->shopping_order->save();
+ }
return true;
}
return false;
diff --git a/app/Services/HTMLHelper.php b/app/Services/HTMLHelper.php
index fa9d943..524079e 100644
--- a/app/Services/HTMLHelper.php
+++ b/app/Services/HTMLHelper.php
@@ -104,23 +104,22 @@ class HTMLHelper
return $ret;
}
- public static function getAboIntervallWeeks($default = 1){
- $values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
+ public static function getAboDeliveryOptions($default = 5){
+ $values = \App\Models\UserAbo::$aboDeliveryDays;
$ret = "";
foreach ($values as $value){
$attr = ($value == $default) ? 'selected="selected"' : '';
- $str = self::getAboWeeksLang($value);
+ $str = self::getAboStrLang($value);
$ret .= ''.$str.' \n';
}
return $ret;
}
- public static function getAboWeeksLang($num){
- if($num == 1){
- return __('order.every_week');
- }
- return __('order.every_weeks', ['num' => $num]);
+ public static function getAboStrLang($num){
+ return $num.'. '.__('abo.of_month');
}
+
+
public static function getAttributesWithoutParents($id = false, $sameId = false, $all = true){
$values = Attribute::where('parent_id', null)->get();
$ret = "";
@@ -157,14 +156,14 @@ class HTMLHelper
if($ids == null){
$ids = array();
}
- $values = Product::where('active', 1)->get();
+ $values = Product::all();
$ret = "";
if($all){
$ret .= ''.__('none').' \n';
}
foreach ($values as $value){
$attr = in_array($value->id, $ids) ? 'selected="selected"' : '';
- $ret .= ''.$value->name.' \n';
+ $ret .= ''.$value->name.' ('.($value->active ? 'on' : 'off').') \n';
}
return $ret;
}
diff --git a/app/Services/OrderPaymentService.php b/app/Services/OrderPaymentService.php
new file mode 100644
index 0000000..8216005
--- /dev/null
+++ b/app/Services/OrderPaymentService.php
@@ -0,0 +1,180 @@
+deleteStoredCart($identifier);
+ \App\Models\ShoppingInstance::where('identifier', $identifier)->delete();
+ //delete session
+ /* if(\Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){
+ $user_shop_identifier = \Session::get('user_shop_identifier');
+ Yard::instance('shopping')->deleteStoredCart($identifier);
+ \App\Models\ShoppingInstance::where('identifier', $identifier)->delete();
+ }*/
+ }
+
+ public static function updateInstanceStatus($identifier, $status, $lower = true){
+ if(!ShoppingInstance::where('identifier', $identifier)->exists()){
+ return false;
+ }
+ if($lower){
+ ShoppingInstance::where('identifier', $identifier)->where('status', '<', $status)
+ ->update(['status' => $status]);
+ }else{
+ ShoppingInstance::where('identifier', $identifier)
+ ->update(['status' => $status]);
+ }
+ }
+
+ public static function getInstanceStatus($identifier){
+ $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first();
+ if(!$shopping_instance){
+ return false;
+ }
+ return $shopping_instance->getStatus();
+ }
+
+ public static function getTypeBadge(ShoppingInstance $shoppingInstance){
+ $isFor = $shoppingInstance->shopping_data['is_for'] ?? '-';
+ if ($isFor === 'abo-ot-customer' ) {
+ return ' '.__('abo.abo').' ';
+ }
+ if ($isFor === 'ot-customer' ) {
+ return ' '.__('order.order').' ';
+ }
+ return "";
+ }
+
+ public static function getStatusBadge(ShoppingInstance $shoppingInstance){
+ $status = $shoppingInstance->getStatus();
+ $badgeClasses = [
+ 'link_sent' => 'success',
+ 'link_openly' => 'warning',
+ 'link_paid' => 'secondary',
+ 'link_check' => 'warning',
+ 'link_pending' => 'warning',
+ 'link_appointed' => 'secondary',
+ 'link_failed' => 'danger',
+ 'link_canceled' => 'danger'
+ ];
+
+ if (isset($badgeClasses[$status])) {
+ return sprintf(' %s ',
+ $badgeClasses[$status],
+ __('payment.' . $status)
+ );
+ }
+
+ return '';
+ }
+
+ public static function getStatusAlert($status){
+ $badgeClasses = [
+ 'link_sent' => 'success',
+ 'link_openly' => 'success',
+ 'link_check' => 'warning',
+ 'link_pending' => 'warning',
+ 'link_failed' => 'danger',
+ 'link_canceled' => 'danger',
+ 'link_appointed' => 'success',
+ 'link_paid' => 'success',
+
+ ];
+
+ if (isset($badgeClasses[$status])) {
+ return sprintf(' %s
',
+ $badgeClasses[$status],
+ __('payment.alert_' . $status)
+ );
+ }
+
+ return '';
+ }
+
+ public static function getCustomPayment($identifier){
+
+ $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first();
+ if(!$shopping_instance){
+ abort(403, __('msg.shopping_instance_not_found'));
+ }
+ $shopping_data = $shopping_instance->shopping_data;
+ $shopping_user = $shopping_data['shopping_user_id'] ? ShoppingUser::find($shopping_data['shopping_user_id']) : null;
+ if(!$shopping_user){
+ abort(403, __('msg.shopping_user_not_found'));
+ }
+ $yard_shopping_items = self::getRestoredYardShoppingItems($shopping_instance);
+
+ $data = [
+ 'shopping_instance' => $shopping_instance,
+ 'shopping_user' => $shopping_user,
+ 'yard_shopping_items' => $yard_shopping_items,
+ 'identifier' => $identifier,
+ 'is_abo' => $shopping_instance->shopping_data['is_abo'] ?? false,
+ 'is_for' => $shopping_instance->shopping_data['is_for'] ?? false,
+ 'backlink' => false,
+ ];
+ return $data;
+ }
+
+ public static function getRestoredYardShoppingItems($shopping_instance){
+
+ Yard::instance('shopping')->destroy();
+ Yard::instance('shopping')->restore($shopping_instance->identifier, [], false);
+ Yard::instance('shopping')->putYardExtra('user_shop_payment', $shopping_instance->payment);
+
+ Yard::instance('shopping')->putYardExtra('shopping_data', $shopping_instance->shopping_data);
+ $is_for = isset($shopping_instance->shopping_data['is_for']) ? $shopping_instance->shopping_data['is_for'] : 'ot-member';
+ Yard::instance('shopping')->setUserPriceInfos($shopping_instance->shopping_data['user_price_infos']);
+ Yard::instance('shopping')->setShippingCountryWithPrice($shopping_instance->country_id, $is_for);
+
+
+ $rows = Yard::instance('shopping')->getContentByOrder();
+ $ret = [];
+ $ret['items'] = [];
+ $is_currency = Yard::instance('shopping')->isPriceCurrency();
+ $tax_free = Yard::instance('shopping')->getUserTaxFree();
+
+ foreach($rows as $row){
+ $product = \App\Models\Product::find($row->id);
+ $item = new \stdClass();
+ $item->image = $row->options->has('image') ? $row->options->image : null;
+ $item->price_net = (float) Yard::instance('shopping')->rowPriceNet($row, 3, '.', '');
+ $item->price_net_total = (float) Yard::instance('shopping')->rowSubtotalNet($row, 2, '.', '');
+ $item->price_currency = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowPriceNetCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+ $item->price_currency_total = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowSubtotalCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+ $item->price = $row->price;
+ $item->price_total = ($row->qty * $row->price);
+ $item->qty = $row->qty;
+ $item->name = $product->name;
+ $item->contents = $product->contents;
+ $item->numbers = $product->numbers;
+ $item->abo_type = AboHelper::getAboShowOn($product);
+ $item->number = $product->number;
+ $item->contents = $product->contents;
+ $ret['items'][] = $item;
+ }
+
+ $ret['tax_free'] = $tax_free;
+ $ret['total']['subtotal'] = Yard::instance('shopping')->subtotal();
+ $ret['total']['subtotal_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotal')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+ $ret['total']['shippingCountryName'] = Yard::instance('shopping')->getShippingCountryName();
+ $ret['total']['shippingNet'] = Yard::instance('shopping')->shippingNet();
+ $ret['total']['shippingNet currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('shippingNet')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+ $ret['total']['subtotalWithShipping'] = Yard::instance('shopping')->subtotalWithShipping();
+ $ret['total']['subtotalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+ $ret['total']['taxWithShipping'] = Yard::instance('shopping')->taxWithShipping();
+ $ret['total']['taxWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('taxWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+ $ret['total']['totalWithShipping'] = Yard::instance('shopping')->totalWithShipping();
+ $ret['total']['totalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('totalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
+
+ return $ret;
+ }
+
+}
\ No newline at end of file
diff --git a/app/Services/Payment.php b/app/Services/Payment.php
index c0d74ad..4d593ec 100644
--- a/app/Services/Payment.php
+++ b/app/Services/Payment.php
@@ -6,6 +6,7 @@ use App\User;
use App\Models\UserLevel;
use App\Mail\MailCheckout;
use App\Services\UserUtil;
+use App\Services\AboHelper;
use App\Models\ProductBuying;
use App\Models\ShoppingOrder;
use App\Models\UserCreditItem;
@@ -91,6 +92,7 @@ class Payment
}
public static function getShoppingOrderBadge(ShoppingOrder $shopping_order){
+
if($shopping_order->mode === 'test'){
return ''.strtoupper($shopping_order->mode).' - '.self::getFormattedTxaction($shopping_order->txaction).' ';
}
@@ -100,6 +102,14 @@ class Payment
return ''.self::getFormattedTxaction($shopping_order->txaction).' ';
}
+ public static function getPaymentForBadge(ShoppingOrder $shopping_order){
+ $abo = '';
+ if($shopping_order->is_abo){
+ $abo = ' '.__('abo.abo').' ';
+ }
+ return ''.$shopping_order->getPaymentForType().' '.$abo;
+ }
+
public static function getShoppingPaymentBadge(ShoppingPayment $shopping_payment){
if($shopping_payment->mode === 'test'){
return ''.strtoupper($shopping_payment->mode).' - '.self::getFormattedTxaction($shopping_payment->txaction).' ';
@@ -159,10 +169,10 @@ class Payment
$paid = Status der Zahlung, Payone = true, MIVITA Rechnung = false damit kann später die rechnung auf bezahlt gesetzt werden.
*/
- public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){
+ public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid, $shopping_payment = null){
$send_link = false;
$shopping_order->setUserHistoryValue(['status' => 8]);
- Shop::userOrders();
+ ShoppingUserService::snycOrdersByShoppingOrder($shopping_order);
$shopping_order->paid = $paid;
$shopping_order->save();
@@ -225,6 +235,7 @@ class Payment
}
}
+
if($shopping_order->homeparty){
$shopping_order->setUserHistoryValue(['status' => 9]);
$shopping_order->homeparty->completed = 1;
@@ -235,12 +246,24 @@ class Payment
$shopping_order->setUserHistoryValue(['status' => 9]);
ShopApiOrderCart::finishOrder($shopping_order->shopping_collect_order);
}
-
- //make Invoice and
- $invoice_repo = new InvoiceRepository($shopping_order);
- if(!$shopping_order->isInvoice()){
- $invoice_repo->createAndSalesVolume();
+ //the Order is Pay, so we can set the Status in the Abo
+ if($shopping_order->is_abo){
+ if($shopping_payment){
+ Util::setInstanceStatusByPayment($shopping_payment, 10); //link_paid
+ $shopping_payment->identifier = null;
+ $shopping_payment->save();
+ }
+ AboHelper::setAboActive($shopping_order, 2);
}
+
+ //make Invoice is not exist and is live
+ if($shopping_order->mode === 'live'){
+ $invoice_repo = new InvoiceRepository($shopping_order);
+ if(!$shopping_order->isInvoice()){
+ $invoice_repo->createAndSalesVolume();
+ }
+ }
+
return $send_link;
}
@@ -263,6 +286,7 @@ class Payment
if(!$shopping_order->shopping_user->is_like && $shopping_order->shopping_user->member){
$bcc[] = $shopping_order->shopping_user->member->email;
}
- Mail::to($billing_email)->bcc($bcc)->locale($shopping_order->getLocale())->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $data['send_link'], $data['mode']));
+ $data['payment_error'] = isset($data['payment_error']) ? $data['payment_error'] : false;
+ Mail::to($billing_email)->bcc($bcc)->locale($shopping_order->getLocale())->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $data['send_link'], $data['mode'], $data['payment_error']));
}
}
diff --git a/app/Services/PaymentHelper.php b/app/Services/PaymentHelper.php
index f214795..bd6d6ad 100644
--- a/app/Services/PaymentHelper.php
+++ b/app/Services/PaymentHelper.php
@@ -17,7 +17,7 @@ class PaymentHelper
public function setProduct($product){
Yard::instance('shopping')->destroy();
- Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, false, false, ['image' => "", 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]);
+ Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, false, false, ['image' => "", 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]);
}
public function initELVPayment($user){
diff --git a/app/Services/Shop.php b/app/Services/Shop.php
index dd5668a..041e01c 100644
--- a/app/Services/Shop.php
+++ b/app/Services/Shop.php
@@ -1,15 +1,17 @@
where('txaction', 'paid')->OrWhere('txaction', 'appointed')->OrWhere('txaction', 'extern')->OrWhere('txaction', 'invoice_open')->OrWhere('txaction', 'invoice_paid');
- })->where('orders', '=', NULL)->get();
- foreach ($shopping_users as $shopping_user) {
- if ($shopping_user->number) {
- $orders = ShoppingUser::where('number', '=', $shopping_user->number)->max('orders');
- $orders = $orders + 1;
- } else {
- $orders = ShoppingUser::where('billing_email', '=', $shopping_user->billing_email)->max('orders');
- $orders = $orders + 1;
- }
- $shopping_user->orders = $orders;
- $shopping_user->save();
- }
+
+ public static function newUserOrder($number)
+ {
+ ShoppingUserService::snycOrdersByNumber($number);
}
- public static function newUserOrder($number){
- if($number > 0){
- $shopping_users = ShoppingUser::where('number', '=', $number)->get();
- $orders = 1;
- foreach ($shopping_users as $shopping_user) {
- if($shopping_user->shopping_order && ($shopping_user->shopping_order->txaction === 'paid' ||
- $shopping_user->shopping_order->txaction === 'appointed' ||
- $shopping_user->shopping_order->txaction === 'extern' ||
- $shopping_user->shopping_order->txaction === 'extern_paid' )){
- $shopping_user->orders = $orders++;
-
- }else{
- $shopping_user->orders = NULL;
- }
- $shopping_user->save();
-
- }
- }
- }
-
- public static function getShippingCountryCountryId($shipping_country_id){
+ public static function getShippingCountryCountryId($shipping_country_id)
+ {
$shippingCountry = ShippingCountry::find($shipping_country_id);
- if($shippingCountry && $shippingCountry->country){
+ if ($shippingCountry && $shippingCountry->country) {
return $shippingCountry->country->id;
}
return 1; //default DE
}
- public static function getCountryShippingCountryId($country_id){
+ public static function getCountryShippingCountryId($country_id)
+ {
$shippingCountry = ShippingCountry::whereCountryId($country_id)->first();
- if($shippingCountry){
+ if ($shippingCountry) {
return $shippingCountry->id;
}
return ShippingCountry::all()->first()->id;
}
- public static function getLangChange(){
+ public static function getLangChange()
+ {
$ret = [];
$countries = Country::whereActive(true)->whereSwitch(true)->get();
$first_country = null;
- foreach($countries as $country){
- $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first();
- if($ShippingCountry && $ShippingCountry->shipping && $ShippingCountry->shipping->active){
- if(!$first_country){
+ foreach ($countries as $country) {
+ $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first();
+ if ($ShippingCountry && $ShippingCountry->shipping && $ShippingCountry->shipping->active) {
+ if (!$first_country) {
$first_country = $country;
- }
- $ret[strtolower($country->code)] = $country;
- }
+ }
+ $ret[strtolower($country->code)] = $country;
+ }
}
Shop::getUserShopLang($first_country);
return $ret;
}
- public static function getUserShopLang($country = null){
- if(\Session::has('user_shop_lang')){
- if($user_shop_lang = \Session::get('user_shop_lang')){
- return $user_shop_lang;
+ public static function getUserShopLang($country = null)
+ {
+ if (\Session::has('user_shop_lang')) {
+ if ($user_shop_lang = \Session::get('user_shop_lang')) {
+ return $user_shop_lang;
}
}
- if($country){
+ if ($country) {
Shop::initUserShopLang($country);
return strtolower($country->code);
}
return false;
}
- public static function initUserShopLang($country){
+ public static function initUserShopLang($country)
+ {
Yard::instance('shopping')->destroy();
\Session::put('user_shop_lang', strtolower($country->code));
//init Yard
self::initUserShopYard($country);
-
}
- public static function initUserShopYard($country){
+ public static function initUserShopYard($country)
+ {
//Lieferadresse im Drittland?
self::$user_tax_free = $country->supply_country ? true : false;
$ShippingCountry = ShippingCountry::whereCountryId($country->id)->first();
@@ -123,8 +99,9 @@ class Shop
Yard::instance('shopping')->setUserPriceInfos(Shop::getShopYardInfo());
}
-
- public static function getShopYardInfo(){
+
+ public static function getShopYardInfo()
+ {
return [
'user_tax_free' => self::$user_tax_free,
'shipping_free' => self::$shipping_free,
@@ -133,107 +110,68 @@ class Shop
'shipping_country_id' => self::$shipping_country->id,
];
}
-
- public static function getYardShoppingItems(){
- $rows = Yard::instance('shopping')->getContentByOrder();
- $ret = [];
- $ret['items'] = [];
- $is_currency = Yard::instance('shopping')->isPriceCurrency();
- $tax_free = Yard::instance('shopping')->getUserTaxFree();
- foreach($rows as $row){
- $product = \App\Models\Product::find($row->id);
- $item = new \stdClass();
- $item->image = $row->options->has('image') ? $row->options->image : null;
- $item->price_net = (float) Yard::instance('shopping')->rowPriceNet($row, 3, '.', '');
- $item->price_net_total = (float) Yard::instance('shopping')->rowSubtotalNet($row, 2, '.', '');
- $item->price_currency = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowPriceNetCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
- $item->price_currency_total = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowSubtotalCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
- $item->price = $row->price;
- $item->price_total = ($row->qty * $row->price);
- $item->qty = $row->qty;
- $item->name = $product->name;
- $item->contents = $product->contents;
- $item->numbers = $product->numbers;
- $ret['items'][] = $item;
- }
-
- $ret['tax_free'] = $tax_free;
- $ret['total']['subtotal'] = Yard::instance('shopping')->subtotal();
- $ret['total']['subtotal_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotal')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
- $ret['total']['shippingCountryName'] = Yard::instance('shopping')->getShippingCountryName();
- $ret['total']['shippingNet'] = Yard::instance('shopping')->shippingNet();
- $ret['total']['shippingNet currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('shippingNet')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
- $ret['total']['subtotalWithShipping'] = Yard::instance('shopping')->subtotalWithShipping();
- $ret['total']['subtotalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
- $ret['total']['taxWithShipping'] = Yard::instance('shopping')->taxWithShipping();
- $ret['total']['taxWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('taxWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
- $ret['total']['totalWithShipping'] = Yard::instance('shopping')->totalWithShipping();
- $ret['total']['totalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('totalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null;
-
-
-
- return $ret;
- }
- public static function checkShoppingUser($id, $user){
- if($id === null){
+ public static function checkShoppingUser($id, $user)
+ {
+ if ($id === null) {
abort(403, 'Error: Keine User ID');
}
$shopping_user = ShoppingUser::findOrFail($id);
- if($shopping_user->member_id !== $user->id){
+ if ($shopping_user->member_id !== $user->id) {
abort(403, 'Error: Falsche User ID');
}
$shopping_user = ShoppingUser::findOrFail($id);
- if($shopping_user->is_like){
+ if ($shopping_user->is_like) {
abort(403, 'Error: Kunde in Prüfung');
}
return $shopping_user;
}
- public static function checkShoppingCountry($for, $id=null){
+ public static function checkShoppingCountry($for, $id = null)
+ {
$country_id = null;
- if($for === 'me' || $for === 'abo-me'){
+ if ($for === 'me' || $for === 'abo-me') {
$user = User::find(\Auth::user()->id);
- if($user->account->same_as_billing){
+ if ($user->account->same_as_billing) {
$country_id = $user->account->country_id;
- }else{
+ } else {
$country_id = $user->account->shipping_country_id;
}
}
- if(strpos($for, 'ot') !== false && $id){
+ if (strpos($for, 'ot') !== false && $id) {
$shopping_user = ShoppingUser::findOrFail($id);
- if($shopping_user->same_as_billing){
+ if ($shopping_user->same_as_billing) {
$country_id = $shopping_user->billing_country->id;
- }else{
+ } else {
$country_id = $shopping_user->shipping_country->id;
}
}
- if($country_id){
- if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){
- if($shipping_country->shipping && $shipping_country->shipping->active){
+ if ($country_id) {
+ if ($shipping_country = ShippingCountry::whereCountryId($country_id)->first()) {
+ if ($shipping_country->shipping && $shipping_country->shipping->active) {
return $shipping_country->id;
}
-
}
}
return false;
}
- public static function getDeliveryCountry($for, $id=null){
+ public static function getDeliveryCountry($for, $id = null)
+ {
$country_id = null;
- if($for === 'me' || $for === 'abo-me'){
+ if ($for === 'me' || $for === 'abo-me') {
$user = User::find(\Auth::user()->id);
- if($user->account->same_as_billing){
- return $user->account->country ? $user->account->country->getLocated() : '';
- }else{
+ if ($user->account->same_as_billing) {
+ return $user->account->country ? $user->account->country->getLocated() : '';
+ } else {
return $user->account->shipping_country ? $user->account->shipping_country->getLocated() : '';
}
}
- if(strpos($for, 'ot') !== false && $id){
+ if (strpos($for, 'ot') !== false && $id) {
$shopping_user = ShoppingUser::findOrFail($id);
- if($shopping_user->same_as_billing){
+ if ($shopping_user->same_as_billing) {
return $shopping_user->billing_country ? $shopping_user->billing_country->getLocated() : '';
- }else{
+ } else {
return $shopping_user->shipping_country ? $shopping_user->shipping_country->getLocated() : '';
}
}
@@ -241,16 +179,17 @@ class Shop
}
- public static function getShippingPriceByShippingCountryId($shipping_country_id, $shipping_weight){
+ public static function getShippingPriceByShippingCountryId($shipping_country_id, $shipping_weight)
+ {
$shippingCountry = ShippingCountry::find($shipping_country_id);
- if(!$shippingCountry){
+ if (!$shippingCountry) {
abort(403, 'Fehler: Versandland nicht gefunden');
}
- if(!isset($shippingCountry->shipping) && count($shippingCountry->shipping->shipping_prices) === 0){
+ if (!isset($shippingCountry->shipping) && count($shippingCountry->shipping->shipping_prices) === 0) {
abort(403, 'Fehler: Kein Preise für das Versandland angelegt');
}
$shipping_price = $shippingCountry->shipping->shipping_prices->first();
- if(!$shipping_price){
+ if (!$shipping_price) {
abort(403, 'Fehler: Preis vom Versandland nicht gefunden');
}
@@ -258,13 +197,13 @@ class Shop
abort(403, 'Fehler: Kein Versandgewicht');
}*/
- if($shipping_weight == 0){
+ if ($shipping_weight == 0) {
$shipping_price->price = 0;
$shipping_price->price_comp = 0;
return $shipping_price;
}
- if($shipping_weight > 0){
+ if ($shipping_weight > 0) {
/*
if($this->shipping_free && $this->total(2, '.', '') >= $this->shipping_free){
if($this->weightByFreeShipping() == 0){
@@ -293,13 +232,13 @@ class Shop
//default
}*/
-
}
- public static function shippingPriceByWeight($shipping_prices, $shipping_weight){
- foreach ($shipping_prices as $price){
- if($price->weight_from > 0 && $price->weight_to > 0){
- if($shipping_weight >= $price->weight_from && $shipping_weight <= $price->weight_to){
+ public static function shippingPriceByWeight($shipping_prices, $shipping_weight)
+ {
+ foreach ($shipping_prices as $price) {
+ if ($price->weight_from > 0 && $price->weight_to > 0) {
+ if ($shipping_weight >= $price->weight_from && $shipping_weight <= $price->weight_to) {
return $price;
}
}
@@ -307,25 +246,56 @@ class Shop
abort(403, 'Fehler: Preis nach Gewicht im Versandland nicht gefunden');
}
- public static function isCompProducts($for){
- /*
+ public static function isCompProducts($for)
+ {
+ /*
$for = me, ot-member, ot-customer, abo-ot-member, abo-ot-customer, abo-me
*/
- if($for === 'me'){
+ if ($for === 'me') {
return (bool) Setting::getContentBySlug('is_comp_me_order');
}
- if($for === 'abo-me'){
+ if ($for === 'abo-me') {
return (bool) Setting::getContentBySlug('is_comp_me_abo');
}
return false;
}
- public static function getIPDatabaseInfo(){
+ public static function getCompProducts($for)
+ {
+ if (Shop::isCompProducts($for)) {
+ $show_on = '0';
+ switch ($for) {
+ case 'me':
+ $show_on = '2';
+ break;
+ case 'abo-me':
+ $show_on = '12';
+ break;
+ case 'ot-member':
+ $show_on = '3';
+ break;
+ case 'ot-customer':
+ $show_on = '3';
+ break;
+ case 'abo-ot-member':
+ $show_on = '13';
+ break;
+ case 'abo-ot-customer':
+ $show_on = '13';
+ break;
+ }
+ return Product::whereActive(true)->where('shipping_addon', true)->whereJsonContains('show_on', $show_on)->orderBy('pos', 'DESC')->get();
+ }
+ return [];
+ }
+
+ public static function getIPDatabaseInfo()
+ {
//first check the DBs for the IP
- /* testing
+ /* testing
foreach(self::testIps() as $ip_address){
$country = MyDBIP::lookup($ip_address);
@@ -355,12 +325,12 @@ class Shop
dd("done");
*/
- /* live */
+ /* live */
$ip_address = \Request::ip();
- // $ip_address = '86.189.47.78'; //testing
+ // $ip_address = '86.189.47.78'; //testing
$country = MyDBIP::lookup($ip_address);
- if($country !== false){
+ if ($country !== false) {
return strtolower($country);
}
//not found search in IPinfo
@@ -368,10 +338,10 @@ class Shop
$client = new IPinfo($access_token);
$details = $client->getDetails($ip_address);
- if(isset($details->error) && $details->error !== null){
+ if (isset($details->error) && $details->error !== null) {
return 'error';
}
- if(isset($details->country) && $details->country !== null){
+ if (isset($details->country) && $details->country !== null) {
MyDBIP::insert($ip_address, $details->country);
return strtolower($details->country);
}
@@ -379,82 +349,83 @@ class Shop
}
- private static function testIps(){
+ private static function testIps()
+ {
return [
- '58.217.40.197'
- ,'207.117.144.54'
- ,'65.169.228.128'
- ,'6.84.3.236'
- ,'214.56.36.93'
- ,'9.43.145.245'
- ,'231.199.26.76'
- ,'86.189.47.78'
- ,'3.122.58.75'
- ,'251.133.143.149'
- ,'6.142.181.83'
- ,'2.55.191.86'
- ,'90.189.58.233'
- ,'57.3.139.111'
- ,'41.130.99.194'
- ,'1.59.123.14'
- ,'9.119.131.109'
- ,'54.240.231.9'
- ,'117.19.131.144'
- ,'221.217.39.211'
- ,'7.43.125.76'
- ,'224.86.233.79'
- ,'32.151.38.98'
- ,'4.134.40.92'
- ,'4.70.188.58'
- ,'24.7.152.228'
- ,'58.122.179.1'
- ,'5.123.9.44'
- ,'3.175.206.5'
- ,'8.142.119.47'
- ,'40.248.58.203'
- ,'7.84.254.187'
- ,'215.215.239.71'
- ,'124.40.66.196'
- ,'215.87.143.102'
- ,'143.39.97.13'
- ,'202.56.79.198'
- ,'143.60.125.142'
- ,'73.233.153.126'
- ,'121.144.28.245'
- ,'53.232.193.122'
- ,'104.222.102.209'
- ,'216.55.215.13'
- ,'84.106.145.239'
- ,'200.131.52.20'
- ,'132.252.158.0'
- ,'220.11.129.27'
- ,'8.153.0.186'
- ,'119.206.117.107'
- ,'222.93.42.133'
- ,'105.104.224.98'
- ,'252.156.181.78'
- ,'7.139.235.187'
- ,'111.140.127.91'
- ,'1.186.17.84'
- ,'85.59.39.221'
- ,'231.152.252.43'
- ,'125.214.216.123'
- ,'69.31.65.238'
- ,'126.12.105.55'
- ,'211.39.4.118'
- ,'73.102.88.79'
- ,'210.229.38.137'
- ,'5.3.230.214'
- ,'208.92.91.242'
- ,'4.105.177.199'
- ,'38.10.48.92'
- ,'133.33.44.13'
- ,'202.189.24.255'
- ,'5.101.244.234'
- ,'2.52.110.194'
- ,'1.130.73.146'
- ,'84.237.232.120'
- ,'25.163.83.194'
+ '58.217.40.197',
+ '207.117.144.54',
+ '65.169.228.128',
+ '6.84.3.236',
+ '214.56.36.93',
+ '9.43.145.245',
+ '231.199.26.76',
+ '86.189.47.78',
+ '3.122.58.75',
+ '251.133.143.149',
+ '6.142.181.83',
+ '2.55.191.86',
+ '90.189.58.233',
+ '57.3.139.111',
+ '41.130.99.194',
+ '1.59.123.14',
+ '9.119.131.109',
+ '54.240.231.9',
+ '117.19.131.144',
+ '221.217.39.211',
+ '7.43.125.76',
+ '224.86.233.79',
+ '32.151.38.98',
+ '4.134.40.92',
+ '4.70.188.58',
+ '24.7.152.228',
+ '58.122.179.1',
+ '5.123.9.44',
+ '3.175.206.5',
+ '8.142.119.47',
+ '40.248.58.203',
+ '7.84.254.187',
+ '215.215.239.71',
+ '124.40.66.196',
+ '215.87.143.102',
+ '143.39.97.13',
+ '202.56.79.198',
+ '143.60.125.142',
+ '73.233.153.126',
+ '121.144.28.245',
+ '53.232.193.122',
+ '104.222.102.209',
+ '216.55.215.13',
+ '84.106.145.239',
+ '200.131.52.20',
+ '132.252.158.0',
+ '220.11.129.27',
+ '8.153.0.186',
+ '119.206.117.107',
+ '222.93.42.133',
+ '105.104.224.98',
+ '252.156.181.78',
+ '7.139.235.187',
+ '111.140.127.91',
+ '1.186.17.84',
+ '85.59.39.221',
+ '231.152.252.43',
+ '125.214.216.123',
+ '69.31.65.238',
+ '126.12.105.55',
+ '211.39.4.118',
+ '73.102.88.79',
+ '210.229.38.137',
+ '5.3.230.214',
+ '208.92.91.242',
+ '4.105.177.199',
+ '38.10.48.92',
+ '133.33.44.13',
+ '202.189.24.255',
+ '5.101.244.234',
+ '2.52.110.194',
+ '1.130.73.146',
+ '84.237.232.120',
+ '25.163.83.194'
];
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/ShoppingUserService.php b/app/Services/ShoppingUserService.php
new file mode 100644
index 0000000..4fedb29
--- /dev/null
+++ b/app/Services/ShoppingUserService.php
@@ -0,0 +1,198 @@
+billing_email)->where('member_id', '=', $shopping_user->member_id)->get();
+ return $users->flatMap(function($user) {
+ return $user->shopping_orders;
+ })->sortByDesc('created_at');
+ }
+
+ public static function syncOrdersByEmail($user)
+ {
+ $maxAttempts = 3;
+ $attempt = 1;
+
+ while ($attempt <= $maxAttempts) {
+ try {
+ DB::beginTransaction();
+
+ $shopping_user = ShoppingUser::where('member_id', $user->id)
+ ->first();
+
+ if (!$shopping_user) {
+ DB::commit();
+ return;
+ }
+
+ $shopping_users = ShoppingUser::where('billing_email', '=', $shopping_user->billing_email)
+ ->whereHas('shopping_order', function($q) {
+ $q->where('txaction', 'paid')
+ ->orWhere('txaction', 'appointed')
+ ->orWhere('txaction', 'extern')
+ ->orWhere('txaction', 'invoice_open')
+ ->orWhere('txaction', 'invoice_paid');
+ })
+ ->lockForUpdate()
+ ->get();
+
+ $order_count = $shopping_users->count();
+
+ foreach($shopping_users as $user) {
+ $user->orders = $order_count;
+ $user->save();
+ }
+
+ DB::commit();
+ return; // Erfolgreicher Fall
+
+ } catch (QueryException $e) {
+ DB::rollBack();
+
+ // Wenn es ein Deadlock ist, versuchen wir es erneut
+ if ($e->getCode() == 40001 && $attempt < $maxAttempts) {
+ $sleepTime = pow(2, $attempt) * 100000; // Exponentielles Backoff in Mikrosekunden
+ usleep($sleepTime);
+ $attempt++;
+ continue;
+ }
+
+ throw $e; // Andere Fehler oder zu viele Versuche
+ }
+ }
+ }
+
+ /*public static function syncOrdersByEmail($user){
+ ShoppingUser::where('member_id', $user->id)
+ ->whereNotNull('billing_email')
+ ->where('billing_email', '!=', '')
+ ->select('billing_email')
+ ->groupBy('billing_email')
+ ->get()
+ ->each(function($shopping_user) {
+ self::snycOrdersByShoppingUser($shopping_user);
+ });
+ }*/
+ /**
+ * Synchronisiert die Bestellungen eines ShoppingOrders mit den Bestellungen des zugehörigen ShoppingUsers
+ *
+ * @param ShoppingOrder $shopping_order Der zu synchronisierende ShoppingOrder
+ */
+ public static function snycOrdersByShoppingOrder(ShoppingOrder $shopping_order) {
+ $shopping_user = $shopping_order->shopping_user ? $shopping_order->shopping_user : null;
+ if($shopping_user){
+ self::snycOrdersByShoppingUser($shopping_user);
+ }
+ }
+
+ /**
+ * Synchronisiert die Bestellungen eines ShoppingUsers mit den Bestellungen des zugehörigen Benutzers
+ *
+ * @param ShoppingUser $shopping_user Der zu synchronisierende ShoppingUser
+ */
+ public static function snycOrdersByShoppingUser(ShoppingUser $shopping_user) {
+
+ // Aktualisiere alle Benutzer mit einer einzigen Datenbankabfrage
+ ShoppingUser::where('billing_email', $shopping_user->billing_email)
+ ->update([
+ 'orders' => ShoppingUser::where('billing_email', $shopping_user->billing_email)
+ ->whereHas('shopping_order', function($q) {
+ $q->whereIn('txaction', ['paid', 'appointed', 'extern', 'invoice_open', 'invoice_paid']);
+ })
+ ->count()
+ ]);
+
+ }
+
+ public static function snycOrdersByNumber($number){
+ if($number <= 0) {
+ return;
+ }
+ // Aktualisiere alle Benutzer mit einer einzigen Datenbankabfrage
+
+ ShoppingUser::where('number', '=', $number)
+ ->update([
+ 'orders' => ShoppingUser::where('number', '=', $number)
+ ->whereHas('shopping_order', function($q) {
+ $q->whereIn('txaction', ['paid', 'appointed', 'extern', 'invoice_open', 'invoice_paid']);
+ })
+ ->count()
+ ]);
+ // Setze orders auf NULL für alle anderen
+ ShoppingUser::where('number', '=', $number)
+ ->whereDoesntHave('shopping_order', function($q) {
+ $q->whereIn('txaction', ['paid', 'appointed', 'extern', 'extern_paid']);
+ })
+ ->update(['orders' => null]);
+ }
+
+ /**
+ * Synchronisiert die Nummern aller ShoppingUser eines Benutzers anhand der E-Mails
+ *
+ * @param User $user Der Benutzer, dessen ShoppingUser synchronisiert werden sollen
+ */
+ public static function syncNumbersByEmail($user) {
+ // Hole alle ShoppingUser mit E-Mail gruppiert
+ $emailGroups = ShoppingUser::where('member_id', $user->id)
+ ->whereNotNull('billing_email')
+ ->where('billing_email', '!=', '')
+ ->get()
+ ->groupBy('billing_email');
+
+ foreach($emailGroups as $email => $users) {
+ // Suche ob es bereits eine Nummer für diese E-Mail gibt
+ $existingNumber = ($users->whereNotNull('number')->first()) ? $users->whereNotNull('number')->first()->number : null;
+
+ if($existingNumber) {
+ // Wenn eine Nummer existiert, nutze diese für alle User mit der E-Mail
+ ShoppingUser::where('member_id', $user->id)
+ ->where('billing_email', $email)
+ ->whereNull('number')
+ ->update(['number' => $existingNumber]);
+ } else {
+ // Wenn keine Nummer existiert, generiere eine neue
+ $maxNumber = ShoppingUser::max('number') ?: 1000;
+ $newNumber = $maxNumber + 1;
+
+ ShoppingUser::where('member_id', $user->id)
+ ->where('billing_email', $email)
+ ->update(['number' => $newNumber]);
+ }
+ }
+ }
+
+ /**
+ * Setzt alle Faker-E-Mails für einen Benutzer auf 1
+ *
+ * @param User $user Der Benutzer, dessen Faker-E-Mails gesetzt werden sollen
+ */
+ public static function setFakerMail($user){
+ // Aktualisiere alle Faker-E-Mails für den Benutzer in einem einzigen Update
+ // Schneller da nur ein einzelner SQL Query ausgeführt wird
+ ShoppingUser::where('member_id', $user->id)
+ ->where('faker_mail', '!=', 1)
+ ->where('billing_email', 'LIKE', '%faker@mivita.care')
+ ->update(['faker_mail' => 1]);
+
+ // Setze alle anderen auf NULL zurück
+ ShoppingUser::where('member_id', $user->id)
+ ->where('billing_email', 'NOT LIKE', '%faker@mivita.care')
+ ->update(['faker_mail' => null]);
+ }
+}
\ No newline at end of file
diff --git a/app/Services/Slim.php b/app/Services/Slim.php
index 79b0faf..10b281b 100644
--- a/app/Services/Slim.php
+++ b/app/Services/Slim.php
@@ -43,9 +43,7 @@ class Slim {
if (empty($value)) {return null;}
// If magic quotes enabled
- if (get_magic_quotes_gpc()) {
- $value = stripslashes($value);
- }
+ // Magic quotes were removed in PHP 5.4, no need to check in PHP 8.2
// The data is posted as a JSON String so to be used it needs to be deserialized first
$data = json_decode($value);
diff --git a/app/Services/SyS/ShoppingOrders.php b/app/Services/SyS/ShoppingOrders.php
index cd67847..dd1ee65 100644
--- a/app/Services/SyS/ShoppingOrders.php
+++ b/app/Services/SyS/ShoppingOrders.php
@@ -5,6 +5,7 @@ use Request;
use App\Services\Shop;
use App\Models\UserShop;
use App\Models\ShoppingUser;
+use App\Services\ShoppingUserService;
use App\Http\Controllers\Api\KasController;
use App\Http\Controllers\Api\KasSLLController;
@@ -55,7 +56,7 @@ class ShoppingOrders
}
if($data['action'] === 'next_run'){
- Shop::userOrders();
+ ShoppingUserService::snycOrdersByShoppingUser($shopping_user);
\Session()->flash('alert-save', true);
}
return back();
diff --git a/app/Services/Util.php b/app/Services/Util.php
index a4f4084..563b880 100644
--- a/app/Services/Util.php
+++ b/app/Services/Util.php
@@ -85,7 +85,15 @@ class Util
return number_format($value, $dec, self::_decimal_separator(), self::_thousands_separator());
}
-
+ public static function cleanIntegerFromString($value) {
+ // Entferne alle nicht-numerischen Zeichen außer Minus
+ $cleanStr = preg_replace("/[^0-9-]/", "", $value);
+
+ // Konvertiere zu Integer und entferne führende Nullen
+ $number = (int)$cleanStr;
+
+ return $number;
+ }
public static function cleanNumberFormat($num = 0, $dec = 2, $fullzero = false){
if($fullzero && $num == 0){
@@ -140,6 +148,35 @@ class Util
}
return false;
}
+
+ public static function getInstanceStatus(){
+ $identifier = self::getUserShopIdentifier();
+ if($identifier && \Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){
+ return OrderPaymentService::getInstanceStatus($identifier);
+ }
+ return false;
+ }
+
+ public static function setInstanceStatus($status, $lower = true){
+ $identifier = self::getUserShopIdentifier();
+ if($identifier && \Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){
+ OrderPaymentService::updateInstanceStatus($identifier, $status, $lower);
+ }
+ }
+
+ public static function setInstanceStatusByPayment($shopping_payment, $status, $lower = true){
+ if($shopping_payment->identifier){
+ OrderPaymentService::updateInstanceStatus($shopping_payment->identifier, $status, $lower);
+ }
+ }
+
+ public static function getShoppingInstance(){
+ if(\Session::has('shopping_instance')){
+ return \Session::get('shopping_instance');
+ }
+ return false;
+ }
+
public static function getUserHistory(){
$auth_user = self::getAuthUser();
$user_shop_identifier = self::getUserShopIdentifier();
@@ -171,7 +208,7 @@ class Util
return 'test';
}
}
- return 'live';
+ return config('app.mode');
}
public static function addRoute($p = []){
$b = [];
diff --git a/app/User.php b/app/User.php
index b9bac03..f48ecb7 100755
--- a/app/User.php
+++ b/app/User.php
@@ -136,12 +136,15 @@ class User extends Authenticatable
*/
protected $fillable = [
- 'email', 'password', 'token',
+ 'email',
+ 'password',
+ 'token',
];
protected $casts = [
'settings' => 'array',
- 'payment_methods' => 'array'
+ 'payment_methods' => 'array',
+
];
/**
@@ -150,41 +153,51 @@ class User extends Authenticatable
* @var array
*/
protected $hidden = [
- 'password', 'remember_token', 'token',
+ 'password',
+ 'remember_token',
+ 'token',
];
private $userSalesVolume = false;
- public function account(){
+ public function account()
+ {
return $this->belongsTo('App\Models\UserAccount', 'account_id');
}
- public function user_level(){
+ public function user_level()
+ {
return $this->belongsTo('App\Models\UserLevel', 'm_level');
}
- public function user_sponsor(){
+ public function user_sponsor()
+ {
return $this->belongsTo('App\User', 'm_sponsor');
}
- public function user_pre_sponsor(){
+ public function user_pre_sponsor()
+ {
return $this->belongsTo('App\User', 'pre_sponsor');
}
- public function payment_order_product(){
+ public function payment_order_product()
+ {
return $this->belongsTo('App\Models\Product', 'payment_order_id');
}
- public function files(){
+ public function files()
+ {
return $this->hasMany('App\Models\File', 'user_id', '');
}
- public function shopping_orders(){
+ public function shopping_orders()
+ {
return $this->hasMany('App\Models\ShoppingOrder', 'auth_user_id', '');
}
- public function user_histories(){
+ public function user_histories()
+ {
return $this->hasMany('App\Models\UserHistory', 'user_id', '');
}
@@ -208,33 +221,35 @@ class User extends Authenticatable
return $this->hasMany('App\Models\ShoppingUser', 'member_id', 'id');
}
- public function getLocale(){
+ public function getLocale()
+ {
return $this->lang ? $this->lang : \App::getLocale();
}
-
- public function getMUserSponsor(){
- if($this->user_sponsor && $this->user_sponsor->account){
- return $this->user_sponsor->account->first_name." ".$this->user_sponsor->account->last_name." | ".$this->user_sponsor->email;
+ public function getMUserSponsor()
+ {
+ if ($this->user_sponsor && $this->user_sponsor->account) {
+ return $this->user_sponsor->account->first_name . " " . $this->user_sponsor->account->last_name . " | " . $this->user_sponsor->email;
}
}
- public function getFullName($email=true){
+ public function getFullName($email = true)
+ {
$ret = "";
- if($this->account){
- $ret = $this->account->first_name." ".$this->account->last_name;
-
+ if ($this->account) {
+ $ret = $this->account->first_name . " " . $this->account->last_name;
}
- if($email && $this->id > 1){
- $ret .= " | ".$this->email;
+ if ($email && $this->id > 1) {
+ $ret .= " | " . $this->email;
}
return $ret;
}
/**
* @return bool
*/
- public function isPasswort(){
- if($this->password == env('APP_KEY')){
+ public function isPasswort()
+ {
+ if ($this->password == env('APP_KEY')) {
return false;
}
return true;
@@ -246,7 +261,7 @@ class User extends Authenticatable
*/
public function isVIP()
{
- if($this->admin >= 1){
+ if ($this->admin >= 1) {
return true;
}
return false;
@@ -258,7 +273,7 @@ class User extends Authenticatable
*/
public function isAdmin()
{
- if($this->admin >= 2){
+ if ($this->admin >= 2) {
return true;
}
return false;
@@ -269,7 +284,7 @@ class User extends Authenticatable
*/
public function isSuperAdmin()
{
- if($this->admin >= 3){
+ if ($this->admin >= 3) {
return true;
}
return false;
@@ -280,7 +295,7 @@ class User extends Authenticatable
*/
public function isSySAdmin()
{
- if($this->admin >= 4){
+ if ($this->admin >= 4) {
return true;
}
return false;
@@ -289,7 +304,7 @@ class User extends Authenticatable
public function isUserHasApi()
{
- if($this->id === 3){
+ if ($this->id === 3) {
return true;
}
return false;
@@ -300,7 +315,7 @@ class User extends Authenticatable
*/
public function isApiUser()
{
- if($this->admin >= 5){
+ if ($this->admin >= 5) {
return true;
}
return false;
@@ -320,68 +335,81 @@ class User extends Authenticatable
*/
public function showSideNav()
{
- if($this->active == 1 && $this->blocked == 0 && $this->wizard >= 10){
+ if ($this->active == 1 && $this->blocked == 0 && $this->wizard >= 10) {
return true;
}
return false;
}
- public function isAboOption(){
- return false;
+ public function isAboOption()
+ {
+ return false;
// Abo Option deaktiviert ($this->abo_options && $this->account && $this->account->payment_data) ? true : false;
}
- public function isActive(){
+ public function isActive()
+ {
return ($this->active == 1 && $this->blocked == 0) ? true : false;
}
- public function isActiveAccount(){
+ public function isActiveAccount()
+ {
return $this->payment_account ? Carbon::parse($this->payment_account)->gt(Carbon::now()) : false;
}
- public function isActiveShop(){
+ public function isActiveShop()
+ {
return $this->payment_shop ? Carbon::parse($this->payment_shop)->gt(Carbon::now()) : false;
}
- public function isRenewalAccount(){
+ public function isRenewalAccount()
+ {
if ($this->payment_account) {
- return Carbon::parse($this->payment_account)->modify('-'.(config('mivita.renewal_days')+1).' days')->lt(Carbon::now());
+ return Carbon::parse($this->payment_account)->modify('-' . (config('mivita.renewal_days') + 1) . ' days')->lt(Carbon::now());
}
return false;
}
- public function nextRenewalAccount(){
- return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-'.config('mivita.renewal_days').' days')->format(\Util::formatDateTimeDB()) : false ;
+ public function nextRenewalAccount()
+ {
+ return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-' . config('mivita.renewal_days') . ' days')->format(\Util::formatDateTimeDB()) : false;
}
- public function daysActiveAccount(){
+ public function daysActiveAccount()
+ {
return Carbon::now()->diffInDays(Carbon::parse($this->payment_account), false);
}
- public function modifyActiveAccount($add = "1 year"){
+ public function modifyActiveAccount($add = "1 year")
+ {
return Carbon::parse($this->payment_account)->modify($add)->format(\Util::formatDateTimeDB());
}
- public function daysHumansActiveAccount(){
+ public function daysHumansActiveAccount()
+ {
return Carbon::now()->diffForHumans(Carbon::parse($this->payment_account));
}
- public function daysActiveShop(){
+ public function daysActiveShop()
+ {
return Carbon::now()->diffInDays(Carbon::parse($this->payment_shop), false);
}
- public function modifyActiveShop($add = "1 year"){
+ public function modifyActiveShop($add = "1 year")
+ {
return Carbon::parse($this->payment_shop)->modify($add)->format(\Util::formatDateTimeDB());
}
- public function daysHumansActiveShop(){
+ public function daysHumansActiveShop()
+ {
return Carbon::now()->diffForHumans(Carbon::parse($this->payment_shop));
}
- public function isAcountAboPayDate(){
- if($this->isAboOption()){
- $pay_days = Carbon::parse($this->payment_account)->modify('- '.config('mivita.abo_booking_days').' days');
+ public function isAcountAboPayDate()
+ {
+ if ($this->isAboOption()) {
+ $pay_days = Carbon::parse($this->payment_account)->modify('- ' . config('mivita.abo_booking_days') . ' days');
$diff_days = Carbon::now()->diffInDays($pay_days, false);
- if($diff_days <= 0){
+ if ($diff_days <= 0) {
return true;
}
}
@@ -391,54 +419,76 @@ class User extends Authenticatable
/**
* @return string
*/
- public function getConfirmationDateFormat(){
- if(!$this->attributes['confirmation_date']){ return ""; }
+ public function getConfirmationDateFormat()
+ {
+ if (!$this->attributes['confirmation_date']) {
+ return "";
+ }
return Carbon::parse($this->attributes['confirmation_date'])->format(\Util::formatDateTimeDB());
}
/**
* @return string
*/
- public function getActiveDateFormat(){
- if(!$this->attributes['active_date']){ return ""; }
+ public function getActiveDateFormat($time = true)
+ {
+ if (!$this->attributes['active_date']) {
+ return "";
+ }
+ if (!$time) {
+ return Carbon::parse($this->attributes['active_date'])->format(\Util::formatDateDB());
+ }
return Carbon::parse($this->attributes['active_date'])->format(\Util::formatDateTimeDB());
}
/**
* @return string
*/
- public function getAgreementFormat(){
- if(!$this->attributes['agreement']){ return ""; }
+ public function getAgreementFormat()
+ {
+ if (!$this->attributes['agreement']) {
+ return "";
+ }
return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB());
}
- public function getPaymentAccountDateFormat($time = true){
- if(!$this->attributes['payment_account']){ return ""; }
- if(!$time){
+ public function getPaymentAccountDateFormat($time = true)
+ {
+ if (!$this->attributes['payment_account']) {
+ return "";
+ }
+ if (!$time) {
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateDB());
}
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB());
}
- public function getPaymentShopDateFormat($time = true){
- if(!$this->attributes['payment_shop']){ return ""; }
- if(!$time){
+ public function getPaymentShopDateFormat($time = true)
+ {
+ if (!$this->attributes['payment_shop']) {
+ return "";
+ }
+ if (!$time) {
return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateDB());
}
return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateTimeDB());
}
- public function getReleaseAccountFormat($time = true){
- if(!$this->attributes['release_account']){ return ""; }
- if(!$time){
+ public function getReleaseAccountFormat($time = true)
+ {
+ if (!$this->attributes['release_account']) {
+ return "";
+ }
+ if (!$time) {
return Carbon::parse($this->attributes['release_account'])->format(\Util::formatDateDB());
}
return Carbon::parse($this->attributes['release_account'])->format(\Util::formatDateTimeDB());
}
- public function setSetting(array $revisions, bool $save = true){
- if(!$this->settings){
+ public function setSetting(array $revisions, bool $save = true)
+ {
+ if (!$this->settings) {
$this->settings = [];
}
$this->settings = array_merge($this->settings, $revisions);
@@ -448,16 +498,18 @@ class User extends Authenticatable
return $this;
}
- public function getSetting($key, $default = null){
+ public function getSetting($key, $default = null)
+ {
return isset($this->settings[$key]) ? $this->settings[$key] : $default;
}
- public function getPaymentMethodsShort(){
+ public function getPaymentMethodsShort()
+ {
$ret = "";
- if($this->payment_methods !== null){
- foreach ($this->payment_methods as $payment_method){
- if($find = PaymentMethod::find($payment_method)){
- $ret .= $find->short." | ";
+ if ($this->payment_methods !== null) {
+ foreach ($this->payment_methods as $payment_method) {
+ if ($find = PaymentMethod::find($payment_method)) {
+ $ret .= $find->short . " | ";
}
}
$ret = rtrim($ret, " | ");
@@ -467,19 +519,20 @@ class User extends Authenticatable
/**
* @return string
*/
- public function getLandByCountry(){
- if($this->account && $this->account->country_id){
+ public function getLandByCountry()
+ {
+ if ($this->account && $this->account->country_id) {
$code = $this->account->country->code;
- if($code == "FR"){
+ if ($code == "FR") {
return 'fr';
}
- if($code == "CH"){
+ if ($code == "CH") {
return 'de';
}
- if($code == "NL"){
+ if ($code == "NL") {
return 'nl';
}
- if($code == "DE"){
+ if ($code == "DE") {
return 'de';
}
}
@@ -504,10 +557,10 @@ class User extends Authenticatable
{
//NOTE check ist, cant change month year !
- if($this->userSalesVolume === false){
+ if ($this->userSalesVolume === false) {
$this->userSalesVolume = $this->getUserSalesVolume($month, $year, 'first');
}
- if($this->userSalesVolume){
+ if ($this->userSalesVolume) {
switch ($key) {
case 'sales_volume_KP_points':
return $this->userSalesVolume->month_KP_points;
@@ -529,7 +582,7 @@ class User extends Authenticatable
case 'sales_volume_total':
return $this->userSalesVolume->month_total_net;
break;
-
+
case 'sales_volume_total_shop':
return $this->userSalesVolume->month_shop_total_net;
break;
@@ -540,7 +593,7 @@ class User extends Authenticatable
}
}
return 0;
- }
+ }
public function getUserSalesVolume($month, $year, $record = 'get')
{
diff --git a/app/helpers.php b/app/helpers.php
index 1248787..04f49d7 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -1,5 +1,7 @@
array (
+ 'aliases' =>
+ array (
+ 'PDF' => 'Barryvdh\\DomPDF\\Facade\\Pdf',
+ 'Pdf' => 'Barryvdh\\DomPDF\\Facade\\Pdf',
+ ),
'providers' =>
array (
0 => 'Barryvdh\\DomPDF\\ServiceProvider',
),
- 'aliases' =>
- array (
- 'Pdf' => 'Barryvdh\\DomPDF\\Facade\\Pdf',
- 'PDF' => 'Barryvdh\\DomPDF\\Facade\\Pdf',
- ),
),
'barryvdh/laravel-ide-helper' =>
array (
@@ -70,14 +70,14 @@
),
'intervention/image' =>
array (
- 'providers' =>
- array (
- 0 => 'Intervention\\Image\\ImageServiceProvider',
- ),
'aliases' =>
array (
'Image' => 'Intervention\\Image\\Facades\\Image',
),
+ 'providers' =>
+ array (
+ 0 => 'Intervention\\Image\\ImageServiceProvider',
+ ),
),
'jenssegers/date' =>
array (
@@ -100,13 +100,20 @@
),
'laracasts/flash' =>
array (
+ 'aliases' =>
+ array (
+ 'Flash' => 'Laracasts\\Flash\\Flash',
+ ),
'providers' =>
array (
0 => 'Laracasts\\Flash\\FlashServiceProvider',
),
- 'aliases' =>
+ ),
+ 'laravel/legacy-factories' =>
+ array (
+ 'providers' =>
array (
- 'Flash' => 'Laracasts\\Flash\\Flash',
+ 0 => 'Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider',
),
),
'laravel/passport' =>
@@ -151,14 +158,14 @@
),
'maatwebsite/excel' =>
array (
- 'providers' =>
- array (
- 0 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- ),
'aliases' =>
array (
'Excel' => 'Maatwebsite\\Excel\\Facades\\Excel',
),
+ 'providers' =>
+ array (
+ 0 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ ),
),
'nesbot/carbon' =>
array (
diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php
index 2a982b8..abb1664 100755
--- a/bootstrap/cache/services.php
+++ b/bootstrap/cache/services.php
@@ -36,29 +36,30 @@
32 => 'JoeDixon\\Translation\\TranslationServiceProvider',
33 => 'JoeDixon\\Translation\\TranslationBindingsServiceProvider',
34 => 'Laracasts\\Flash\\FlashServiceProvider',
- 35 => 'Laravel\\Passport\\PassportServiceProvider',
- 36 => 'Laravel\\Sail\\SailServiceProvider',
- 37 => 'Laravel\\Tinker\\TinkerServiceProvider',
- 38 => 'Laravel\\Ui\\UiServiceProvider',
- 39 => 'Collective\\Html\\HtmlServiceProvider',
- 40 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 41 => 'Carbon\\Laravel\\ServiceProvider',
- 42 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
- 43 => 'Reliese\\Coders\\CodersServiceProvider',
- 44 => 'Yajra\\DataTables\\DataTablesServiceProvider',
- 45 => 'Reliese\\Coders\\CodersServiceProvider',
- 46 => 'Laravel\\Tinker\\TinkerServiceProvider',
- 47 => 'App\\Providers\\AppServiceProvider',
- 48 => 'App\\Providers\\AuthServiceProvider',
- 49 => 'App\\Providers\\EventServiceProvider',
- 50 => 'App\\Providers\\RouteServiceProvider',
- 51 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
- 52 => 'Jenssegers\\Date\\DateServiceProvider',
- 53 => 'Collective\\Html\\HtmlServiceProvider',
- 54 => 'Intervention\\Image\\ImageServiceProvider',
- 55 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 56 => 'Yajra\\DataTables\\DataTablesServiceProvider',
- 57 => 'App\\Providers\\YardServiceProvider',
+ 35 => 'Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider',
+ 36 => 'Laravel\\Passport\\PassportServiceProvider',
+ 37 => 'Laravel\\Sail\\SailServiceProvider',
+ 38 => 'Laravel\\Tinker\\TinkerServiceProvider',
+ 39 => 'Laravel\\Ui\\UiServiceProvider',
+ 40 => 'Collective\\Html\\HtmlServiceProvider',
+ 41 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 42 => 'Carbon\\Laravel\\ServiceProvider',
+ 43 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
+ 44 => 'Reliese\\Coders\\CodersServiceProvider',
+ 45 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 46 => 'Reliese\\Coders\\CodersServiceProvider',
+ 47 => 'Intervention\\Image\\ImageServiceProvider',
+ 48 => 'Laravel\\Tinker\\TinkerServiceProvider',
+ 49 => 'App\\Providers\\AppServiceProvider',
+ 50 => 'App\\Providers\\AuthServiceProvider',
+ 51 => 'App\\Providers\\EventServiceProvider',
+ 52 => 'App\\Providers\\RouteServiceProvider',
+ 53 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
+ 54 => 'Jenssegers\\Date\\DateServiceProvider',
+ 55 => 'Collective\\Html\\HtmlServiceProvider',
+ 56 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 57 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 58 => 'App\\Providers\\YardServiceProvider',
),
'eager' =>
array (
@@ -83,23 +84,24 @@
18 => 'Jenssegers\\Date\\DateServiceProvider',
19 => 'JoeDixon\\Translation\\TranslationServiceProvider',
20 => 'Laracasts\\Flash\\FlashServiceProvider',
- 21 => 'Laravel\\Passport\\PassportServiceProvider',
- 22 => 'Laravel\\Ui\\UiServiceProvider',
- 23 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 24 => 'Carbon\\Laravel\\ServiceProvider',
- 25 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
- 26 => 'Reliese\\Coders\\CodersServiceProvider',
- 27 => 'Yajra\\DataTables\\DataTablesServiceProvider',
- 28 => 'Reliese\\Coders\\CodersServiceProvider',
- 29 => 'App\\Providers\\AppServiceProvider',
- 30 => 'App\\Providers\\AuthServiceProvider',
- 31 => 'App\\Providers\\EventServiceProvider',
- 32 => 'App\\Providers\\RouteServiceProvider',
- 33 => 'Jenssegers\\Date\\DateServiceProvider',
- 34 => 'Intervention\\Image\\ImageServiceProvider',
- 35 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
- 36 => 'Yajra\\DataTables\\DataTablesServiceProvider',
- 37 => 'App\\Providers\\YardServiceProvider',
+ 21 => 'Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider',
+ 22 => 'Laravel\\Passport\\PassportServiceProvider',
+ 23 => 'Laravel\\Ui\\UiServiceProvider',
+ 24 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 25 => 'Carbon\\Laravel\\ServiceProvider',
+ 26 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
+ 27 => 'Reliese\\Coders\\CodersServiceProvider',
+ 28 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 29 => 'Reliese\\Coders\\CodersServiceProvider',
+ 30 => 'Intervention\\Image\\ImageServiceProvider',
+ 31 => 'App\\Providers\\AppServiceProvider',
+ 32 => 'App\\Providers\\AuthServiceProvider',
+ 33 => 'App\\Providers\\EventServiceProvider',
+ 34 => 'App\\Providers\\RouteServiceProvider',
+ 35 => 'Jenssegers\\Date\\DateServiceProvider',
+ 36 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
+ 37 => 'Yajra\\DataTables\\DataTablesServiceProvider',
+ 38 => 'App\\Providers\\YardServiceProvider',
),
'deferred' =>
array (
diff --git a/composer.json b/composer.json
index 759e3ba..2ff425a 100755
--- a/composer.json
+++ b/composer.json
@@ -6,17 +6,17 @@
"type": "project",
"require": {
"php": "^7.4|^8.0",
- "cocur/slugify": "4.4.0",
"askedio/laravel5-profanity-filter": "*",
"barryvdh/laravel-dompdf": "*",
+ "cocur/slugify": "4.4.0",
"cviebrock/eloquent-sluggable": "*",
"doctrine/dbal": "*",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
- "intervention/image": "*",
+ "intervention/image": "^2.7",
"jenssegers/date": "*",
- "joedixon/laravel-translation": "^1.1",
+ "joedixon/laravel-translation": "^2.2",
"laracasts/flash": "*",
"laravel/framework": "^8.12",
"laravel/helpers": "*",
diff --git a/composer.lock b/composer.lock
index c690594..895156e 100755
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "ad50933786d7ea4e9c73f2aed681e366",
+ "content-hash": "210e30f91e8a31b7e86100c180ec0e49",
"packages": [
{
"name": "askedio/laravel5-profanity-filter",
@@ -58,31 +58,31 @@
},
{
"name": "asm89/stack-cors",
- "version": "v2.1.1",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/asm89/stack-cors.git",
- "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a"
+ "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a",
- "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a",
+ "url": "https://api.github.com/repos/asm89/stack-cors/zipball/50f57105bad3d97a43ec4a485eb57daf347eafea",
+ "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea",
"shasum": ""
},
"require": {
- "php": "^7.2|^8.0",
- "symfony/http-foundation": "^4|^5|^6",
- "symfony/http-kernel": "^4|^5|^6"
+ "php": "^7.3|^8.0",
+ "symfony/http-foundation": "^5.3|^6|^7",
+ "symfony/http-kernel": "^5.3|^6|^7"
},
"require-dev": {
- "phpunit/phpunit": "^7|^9",
+ "phpunit/phpunit": "^9",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1-dev"
+ "dev-master": "2.2-dev"
}
},
"autoload": {
@@ -108,48 +108,48 @@
],
"support": {
"issues": "https://github.com/asm89/stack-cors/issues",
- "source": "https://github.com/asm89/stack-cors/tree/v2.1.1"
+ "source": "https://github.com/asm89/stack-cors/tree/v2.2.0"
},
- "time": "2022-01-18T09:12:03+00:00"
+ "time": "2023-11-14T13:51:46+00:00"
},
{
"name": "barryvdh/laravel-dompdf",
- "version": "v2.0.1",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-dompdf.git",
- "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6"
+ "reference": "c96f90c97666cebec154ca1ffb67afed372114d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/9843d2be423670fb434f4c978b3c0f4dd92c87a6",
- "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6",
+ "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/c96f90c97666cebec154ca1ffb67afed372114d8",
+ "reference": "c96f90c97666cebec154ca1ffb67afed372114d8",
"shasum": ""
},
"require": {
- "dompdf/dompdf": "^2.0.1",
- "illuminate/support": "^6|^7|^8|^9|^10",
+ "dompdf/dompdf": "^2.0.7",
+ "illuminate/support": "^6|^7|^8|^9|^10|^11",
"php": "^7.2 || ^8.0"
},
"require-dev": {
- "nunomaduro/larastan": "^1|^2",
- "orchestra/testbench": "^4|^5|^6|^7|^8",
- "phpro/grumphp": "^1",
+ "larastan/larastan": "^1.0|^2.7.0",
+ "orchestra/testbench": "^4|^5|^6|^7|^8|^9",
+ "phpro/grumphp": "^1 || ^2.5",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- },
"laravel": {
+ "aliases": {
+ "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf",
+ "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf"
+ },
"providers": [
"Barryvdh\\DomPDF\\ServiceProvider"
- ],
- "aliases": {
- "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf",
- "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf"
- }
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -175,7 +175,7 @@
],
"support": {
"issues": "https://github.com/barryvdh/laravel-dompdf/issues",
- "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.0.1"
+ "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.2.0"
},
"funding": [
{
@@ -187,30 +187,29 @@
"type": "github"
}
],
- "time": "2023-01-12T15:12:49+00:00"
+ "time": "2024-04-25T13:16:04+00:00"
},
{
"name": "brick/math",
- "version": "0.9.3",
+ "version": "0.12.1",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
- "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae"
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae",
- "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae",
+ "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1",
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1",
"shasum": ""
},
"require": {
- "ext-json": "*",
- "php": "^7.1 || ^8.0"
+ "php": "^8.1"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
- "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0",
- "vimeo/psalm": "4.9.2"
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "5.16.0"
},
"type": "library",
"autoload": {
@@ -230,24 +229,94 @@
"arithmetic",
"bigdecimal",
"bignum",
+ "bignumber",
"brick",
- "math"
+ "decimal",
+ "integer",
+ "math",
+ "mathematics",
+ "rational"
],
"support": {
"issues": "https://github.com/brick/math/issues",
- "source": "https://github.com/brick/math/tree/0.9.3"
+ "source": "https://github.com/brick/math/tree/0.12.1"
},
"funding": [
{
"url": "https://github.com/BenMorel",
"type": "github"
+ }
+ ],
+ "time": "2023-11-29T23:19:16+00:00"
+ },
+ {
+ "name": "carbonphp/carbon-doctrine-types",
+ "version": "2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git",
+ "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb",
+ "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "conflict": {
+ "doctrine/dbal": "<3.7.0 || >=4.0.0"
+ },
+ "require-dev": {
+ "doctrine/dbal": "^3.7.0",
+ "nesbot/carbon": "^2.71.0 || ^3.0.0",
+ "phpunit/phpunit": "^10.3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Carbon\\Doctrine\\": "src/Carbon/Doctrine/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "KyleKatarn",
+ "email": "kylekatarnls@gmail.com"
+ }
+ ],
+ "description": "Types to use Carbon in Doctrine",
+ "keywords": [
+ "carbon",
+ "date",
+ "datetime",
+ "doctrine",
+ "time"
+ ],
+ "support": {
+ "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues",
+ "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/kylekatarnls",
+ "type": "github"
},
{
- "url": "https://tidelift.com/funding/github/packagist/brick/math",
+ "url": "https://opencollective.com/Carbon",
+ "type": "open_collective"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
"type": "tidelift"
}
],
- "time": "2021-08-15T20:50:18+00:00"
+ "time": "2023-12-11T17:09:12+00:00"
},
{
"name": "cocur/slugify",
@@ -324,25 +393,104 @@
"time": "2023-08-05T09:42:11+00:00"
},
{
- "name": "composer/semver",
- "version": "3.4.0",
+ "name": "composer/pcre",
+ "version": "3.3.2",
"source": {
"type": "git",
- "url": "https://github.com/composer/semver.git",
- "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
- "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<1.11.10"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.12 || ^2",
+ "phpstan/phpstan-strict-rules": "^1 || ^2",
+ "phpunit/phpunit": "^8 || ^9"
+ },
+ "type": "library",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon"
+ ]
+ },
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/3.3.2"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-12T16:29:46+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.4.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
+ "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpstan/phpstan": "^1.4",
- "symfony/phpunit-bridge": "^4.2 || ^5"
+ "phpstan/phpstan": "^1.11",
+ "symfony/phpunit-bridge": "^3 || ^7"
},
"type": "library",
"extra": {
@@ -386,7 +534,7 @@
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/3.4.0"
+ "source": "https://github.com/composer/semver/tree/3.4.3"
},
"funding": [
{
@@ -402,7 +550,7 @@
"type": "tidelift"
}
],
- "time": "2023-08-31T09:50:34+00:00"
+ "time": "2024-09-19T14:15:21+00:00"
},
{
"name": "cviebrock/eloquent-sluggable",
@@ -544,6 +692,81 @@
},
"time": "2023-06-19T06:10:36+00:00"
},
+ {
+ "name": "dflydev/dot-access-data",
+ "version": "v3.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dflydev/dflydev-dot-access-data.git",
+ "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f",
+ "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.42",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
+ "scrutinizer/ocular": "1.6.0",
+ "squizlabs/php_codesniffer": "^3.5",
+ "vimeo/psalm": "^4.0.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Dflydev\\DotAccessData\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Dragonfly Development Inc.",
+ "email": "info@dflydev.com",
+ "homepage": "http://dflydev.com"
+ },
+ {
+ "name": "Beau Simensen",
+ "email": "beau@dflydev.com",
+ "homepage": "http://beausimensen.com"
+ },
+ {
+ "name": "Carlos Frutos",
+ "email": "carlos@kiwing.it",
+ "homepage": "https://github.com/cfrutos"
+ },
+ {
+ "name": "Colin O'Dell",
+ "email": "colinodell@gmail.com",
+ "homepage": "https://www.colinodell.com"
+ }
+ ],
+ "description": "Given a deep data structure, access data by dot notation.",
+ "homepage": "https://github.com/dflydev/dflydev-dot-access-data",
+ "keywords": [
+ "access",
+ "data",
+ "dot",
+ "notation"
+ ],
+ "support": {
+ "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
+ "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3"
+ },
+ "time": "2024-07-08T12:26:09+00:00"
+ },
{
"name": "doctrine/cache",
"version": "2.2.0",
@@ -639,38 +862,38 @@
},
{
"name": "doctrine/dbal",
- "version": "3.3.8",
+ "version": "3.9.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "f873a820227bc352d023791775a01f078a30dfe1"
+ "reference": "ec16c82f20be1a7224e65ac67144a29199f87959"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/f873a820227bc352d023791775a01f078a30dfe1",
- "reference": "f873a820227bc352d023791775a01f078a30dfe1",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959",
+ "reference": "ec16c82f20be1a7224e65ac67144a29199f87959",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2",
"doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
- "doctrine/event-manager": "^1.0",
- "php": "^7.3 || ^8.0",
+ "doctrine/event-manager": "^1|^2",
+ "php": "^7.4 || ^8.0",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
"require-dev": {
- "doctrine/coding-standard": "9.0.0",
- "jetbrains/phpstorm-stubs": "2022.1",
- "phpstan/phpstan": "1.8.2",
- "phpstan/phpstan-strict-rules": "^1.3",
- "phpunit/phpunit": "9.5.21",
- "psalm/plugin-phpunit": "0.17.0",
- "squizlabs/php_codesniffer": "3.7.1",
- "symfony/cache": "^5.2|^6.0",
- "symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0",
- "vimeo/psalm": "4.24.0"
+ "doctrine/coding-standard": "12.0.0",
+ "fig/log-test": "^1",
+ "jetbrains/phpstorm-stubs": "2023.1",
+ "phpstan/phpstan": "2.1.1",
+ "phpstan/phpstan-strict-rules": "^2",
+ "phpunit/phpunit": "9.6.22",
+ "slevomat/coding-standard": "8.13.1",
+ "squizlabs/php_codesniffer": "3.10.2",
+ "symfony/cache": "^5.4|^6.0|^7.0",
+ "symfony/console": "^4.4|^5.4|^6.0|^7.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -730,7 +953,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.3.8"
+ "source": "https://github.com/doctrine/dbal/tree/3.9.4"
},
"funding": [
{
@@ -746,33 +969,31 @@
"type": "tidelift"
}
],
- "time": "2022-08-05T15:35:35+00:00"
+ "time": "2025-01-16T08:28:55+00:00"
},
{
"name": "doctrine/deprecations",
- "version": "v1.1.1",
+ "version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
+ "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
- "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
+ "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9",
+ "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/coding-standard": "^9",
- "phpstan/phpstan": "1.4.10 || 1.10.15",
- "phpstan/phpstan-phpunit": "^1.0",
+ "doctrine/coding-standard": "^9 || ^12",
+ "phpstan/phpstan": "1.4.10 || 2.0.3",
+ "phpstan/phpstan-phpunit": "^1.0 || ^2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "psalm/plugin-phpunit": "0.18.4",
- "psr/log": "^1 || ^2 || ^3",
- "vimeo/psalm": "4.30.0 || 5.12.0"
+ "psr/log": "^1 || ^2 || ^3"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
@@ -780,7 +1001,7 @@
"type": "library",
"autoload": {
"psr-4": {
- "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"
+ "Doctrine\\Deprecations\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -791,36 +1012,35 @@
"homepage": "https://www.doctrine-project.org/",
"support": {
"issues": "https://github.com/doctrine/deprecations/issues",
- "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
+ "source": "https://github.com/doctrine/deprecations/tree/1.1.4"
},
- "time": "2023-06-03T09:27:29+00:00"
+ "time": "2024-12-07T21:18:45+00:00"
},
{
"name": "doctrine/event-manager",
- "version": "1.2.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/event-manager.git",
- "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520"
+ "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520",
- "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520",
+ "url": "https://api.github.com/repos/doctrine/event-manager/zipball/b680156fa328f1dfd874fd48c7026c41570b9c6e",
+ "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e",
"shasum": ""
},
"require": {
- "doctrine/deprecations": "^0.5.3 || ^1",
- "php": "^7.1 || ^8.0"
+ "php": "^8.1"
},
"conflict": {
"doctrine/common": "<2.9"
},
"require-dev": {
- "doctrine/coding-standard": "^9 || ^10",
- "phpstan/phpstan": "~1.4.10 || ^1.8.8",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.24"
+ "doctrine/coding-standard": "^12",
+ "phpstan/phpstan": "^1.8.8",
+ "phpunit/phpunit": "^10.5",
+ "vimeo/psalm": "^5.24"
},
"type": "library",
"autoload": {
@@ -869,7 +1089,7 @@
],
"support": {
"issues": "https://github.com/doctrine/event-manager/issues",
- "source": "https://github.com/doctrine/event-manager/tree/1.2.0"
+ "source": "https://github.com/doctrine/event-manager/tree/2.0.1"
},
"funding": [
{
@@ -885,20 +1105,20 @@
"type": "tidelift"
}
],
- "time": "2022-10-12T20:51:15+00:00"
+ "time": "2024-05-22T20:47:39+00:00"
},
{
"name": "doctrine/inflector",
- "version": "2.0.8",
+ "version": "2.0.10",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
- "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff"
+ "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
- "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
+ "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc",
+ "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc",
"shasum": ""
},
"require": {
@@ -960,7 +1180,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
- "source": "https://github.com/doctrine/inflector/tree/2.0.8"
+ "source": "https://github.com/doctrine/inflector/tree/2.0.10"
},
"funding": [
{
@@ -976,7 +1196,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-16T13:40:37+00:00"
+ "time": "2024-02-18T20:23:39+00:00"
},
{
"name": "doctrine/lexer",
@@ -1056,16 +1276,16 @@
},
{
"name": "dompdf/dompdf",
- "version": "v2.0.3",
+ "version": "v2.0.8",
"source": {
"type": "git",
"url": "https://github.com/dompdf/dompdf.git",
- "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85"
+ "reference": "c20247574601700e1f7c8dab39310fca1964dc52"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/e8d2d5e37e8b0b30f0732a011295ab80680d7e85",
- "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85",
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c20247574601700e1f7c8dab39310fca1964dc52",
+ "reference": "c20247574601700e1f7c8dab39310fca1964dc52",
"shasum": ""
},
"require": {
@@ -1073,7 +1293,7 @@
"ext-mbstring": "*",
"masterminds/html5": "^2.0",
"phenx/php-font-lib": ">=0.5.4 <1.0.0",
- "phenx/php-svg-lib": ">=0.3.3 <1.0.0",
+ "phenx/php-svg-lib": ">=0.5.2 <1.0.0",
"php": "^7.1 || ^8.0"
},
"require-dev": {
@@ -1112,22 +1332,22 @@
"homepage": "https://github.com/dompdf/dompdf",
"support": {
"issues": "https://github.com/dompdf/dompdf/issues",
- "source": "https://github.com/dompdf/dompdf/tree/v2.0.3"
+ "source": "https://github.com/dompdf/dompdf/tree/v2.0.8"
},
- "time": "2023-02-07T12:51:48+00:00"
+ "time": "2024-04-29T13:06:17+00:00"
},
{
"name": "dragonmantank/cron-expression",
- "version": "v3.3.3",
+ "version": "v3.4.0",
"source": {
"type": "git",
"url": "https://github.com/dragonmantank/cron-expression.git",
- "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a"
+ "reference": "8c784d071debd117328803d86b2097615b457500"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a",
- "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a",
+ "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8c784d071debd117328803d86b2097615b457500",
+ "reference": "8c784d071debd117328803d86b2097615b457500",
"shasum": ""
},
"require": {
@@ -1140,10 +1360,14 @@
"require-dev": {
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.0",
- "phpstan/phpstan-webmozart-assert": "^1.0",
"phpunit/phpunit": "^7.0|^8.0|^9.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"Cron\\": "src/Cron/"
@@ -1167,7 +1391,7 @@
],
"support": {
"issues": "https://github.com/dragonmantank/cron-expression/issues",
- "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3"
+ "source": "https://github.com/dragonmantank/cron-expression/tree/v3.4.0"
},
"funding": [
{
@@ -1175,7 +1399,7 @@
"type": "github"
}
],
- "time": "2023-08-10T19:36:49+00:00"
+ "time": "2024-10-09T13:47:03+00:00"
},
{
"name": "egulias/email-validator",
@@ -1247,20 +1471,20 @@
},
{
"name": "ezyang/htmlpurifier",
- "version": "v4.16.0",
+ "version": "v4.18.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
- "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8"
+ "reference": "cb56001e54359df7ae76dc522d08845dc741621b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8",
- "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8",
+ "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b",
+ "reference": "cb56001e54359df7ae76dc522d08845dc741621b",
"shasum": ""
},
"require": {
- "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0"
+ "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"cerdic/css-tidy": "^1.7 || ^2.0",
@@ -1302,9 +1526,9 @@
],
"support": {
"issues": "https://github.com/ezyang/htmlpurifier/issues",
- "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0"
+ "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0"
},
- "time": "2022-09-18T07:06:19+00:00"
+ "time": "2024-11-01T03:51:45+00:00"
},
{
"name": "fideloper/proxy",
@@ -1366,26 +1590,26 @@
},
{
"name": "firebase/php-jwt",
- "version": "v6.4.0",
+ "version": "v6.11.0",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
- "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224"
+ "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/4dd1e007f22a927ac77da5a3fbb067b42d3bc224",
- "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712",
+ "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712",
"shasum": ""
},
"require": {
- "php": "^7.1||^8.0"
+ "php": "^8.0"
},
"require-dev": {
- "guzzlehttp/guzzle": "^6.5||^7.4",
- "phpspec/prophecy-phpunit": "^1.1",
- "phpunit/phpunit": "^7.5||^9.5",
- "psr/cache": "^1.0||^2.0",
+ "guzzlehttp/guzzle": "^7.4",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.5",
+ "psr/cache": "^2.0||^3.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0"
},
@@ -1423,9 +1647,9 @@
],
"support": {
"issues": "https://github.com/firebase/php-jwt/issues",
- "source": "https://github.com/firebase/php-jwt/tree/v6.4.0"
+ "source": "https://github.com/firebase/php-jwt/tree/v6.11.0"
},
- "time": "2023-02-09T21:01:23+00:00"
+ "time": "2025-01-23T05:11:06+00:00"
},
{
"name": "fruitcake/laravel-cors",
@@ -1509,24 +1733,24 @@
},
{
"name": "graham-campbell/result-type",
- "version": "v1.1.1",
+ "version": "v1.1.3",
"source": {
"type": "git",
"url": "https://github.com/GrahamCampbell/Result-Type.git",
- "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831"
+ "reference": "3ba905c11371512af9d9bdd27d99b782216b6945"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831",
- "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831",
+ "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945",
+ "reference": "3ba905c11371512af9d9bdd27d99b782216b6945",
"shasum": ""
},
"require": {
"php": "^7.2.5 || ^8.0",
- "phpoption/phpoption": "^1.9.1"
+ "phpoption/phpoption": "^1.9.3"
},
"require-dev": {
- "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12"
+ "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28"
},
"type": "library",
"autoload": {
@@ -1555,7 +1779,7 @@
],
"support": {
"issues": "https://github.com/GrahamCampbell/Result-Type/issues",
- "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1"
+ "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3"
},
"funding": [
{
@@ -1567,26 +1791,26 @@
"type": "tidelift"
}
],
- "time": "2023-02-25T20:23:15+00:00"
+ "time": "2024-07-20T21:45:45+00:00"
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.8.0",
+ "version": "7.9.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9"
+ "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9",
- "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
+ "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
"shasum": ""
},
"require": {
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
- "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.3",
+ "guzzlehttp/psr7": "^2.7.0",
"php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -1595,11 +1819,11 @@
"psr/http-client-implementation": "1.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.1",
+ "bamarni/composer-bin-plugin": "^1.8.2",
"ext-curl": "*",
- "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+ "guzzle/client-integration-tests": "3.0.2",
"php-http/message-factory": "^1.1",
- "phpunit/phpunit": "^8.5.29 || ^9.5.23",
+ "phpunit/phpunit": "^8.5.39 || ^9.6.20",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"suggest": {
@@ -1677,7 +1901,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.8.0"
+ "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
},
"funding": [
{
@@ -1693,28 +1917,28 @@
"type": "tidelift"
}
],
- "time": "2023-08-27T10:20:53+00:00"
+ "time": "2024-07-24T11:22:20+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "2.0.1",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
+ "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
- "reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
+ "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
"shasum": ""
},
"require": {
"php": "^7.2.5 || ^8.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.1",
- "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ "bamarni/composer-bin-plugin": "^1.8.2",
+ "phpunit/phpunit": "^8.5.39 || ^9.6.20"
},
"type": "library",
"extra": {
@@ -1760,7 +1984,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.0.1"
+ "source": "https://github.com/guzzle/promises/tree/2.0.4"
},
"funding": [
{
@@ -1776,20 +2000,20 @@
"type": "tidelift"
}
],
- "time": "2023-08-03T15:11:55+00:00"
+ "time": "2024-10-17T10:06:22+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "2.6.1",
+ "version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727"
+ "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
- "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
+ "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
"shasum": ""
},
"require": {
@@ -1803,9 +2027,9 @@
"psr/http-message-implementation": "1.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.1",
- "http-interop/http-factory-tests": "^0.9",
- "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ "bamarni/composer-bin-plugin": "^1.8.2",
+ "http-interop/http-factory-tests": "0.9.0",
+ "phpunit/phpunit": "^8.5.39 || ^9.6.20"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@@ -1876,7 +2100,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.6.1"
+ "source": "https://github.com/guzzle/psr7/tree/2.7.0"
},
"funding": [
{
@@ -1892,7 +2116,7 @@
"type": "tidelift"
}
],
- "time": "2023-08-27T10:13:57+00:00"
+ "time": "2024-07-18T11:15:46+00:00"
},
{
"name": "intervention/image",
@@ -1924,16 +2148,16 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.4-dev"
- },
"laravel": {
- "providers": [
- "Intervention\\Image\\ImageServiceProvider"
- ],
"aliases": {
"Image": "Intervention\\Image\\Facades\\Image"
- }
+ },
+ "providers": [
+ "Intervention\\Image\\ImageServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "2.4-dev"
}
},
"autoload": {
@@ -2001,16 +2225,16 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- },
"laravel": {
- "providers": [
- "Jenssegers\\Date\\DateServiceProvider"
- ],
"aliases": {
"Date": "Jenssegers\\Date\\Date"
- }
+ },
+ "providers": [
+ "Jenssegers\\Date\\DateServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "3.1-dev"
}
},
"autoload": {
@@ -2057,22 +2281,27 @@
},
{
"name": "joedixon/laravel-translation",
- "version": "v1.1.2",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/joedixon/laravel-translation.git",
- "reference": "4a467398bae73cd16522d523b557e96f3455b9d2"
+ "reference": "feba4d1e3d12722ca60c05d9180f39b7de227e4e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/joedixon/laravel-translation/zipball/4a467398bae73cd16522d523b557e96f3455b9d2",
- "reference": "4a467398bae73cd16522d523b557e96f3455b9d2",
+ "url": "https://api.github.com/repos/joedixon/laravel-translation/zipball/feba4d1e3d12722ca60c05d9180f39b7de227e4e",
+ "reference": "feba4d1e3d12722ca60c05d9180f39b7de227e4e",
"shasum": ""
},
+ "require": {
+ "illuminate/support": "^8.0||^9.0||^10.0",
+ "laravel/legacy-factories": "^1.3",
+ "php": "^8.0"
+ },
"require-dev": {
"mockery/mockery": "^1.0.0",
- "orchestra/testbench": "^4.0",
- "phpunit/phpunit": "^8.0"
+ "orchestra/testbench": "^6.0|^8.0",
+ "phpunit/phpunit": "^9.0|^10.0"
},
"type": "library",
"extra": {
@@ -2101,41 +2330,41 @@
"description": "A tool for managing all of your Laravel translations",
"support": {
"issues": "https://github.com/joedixon/laravel-translation/issues",
- "source": "https://github.com/joedixon/laravel-translation/tree/master"
+ "source": "https://github.com/joedixon/laravel-translation/tree/v2.2.0"
},
- "time": "2020-04-13T20:06:24+00:00"
+ "time": "2023-04-26T09:40:52+00:00"
},
{
"name": "laracasts/flash",
- "version": "3.2.2",
+ "version": "3.2.4",
"source": {
"type": "git",
"url": "https://github.com/laracasts/flash.git",
- "reference": "6330bc3c027d3c03188b41c58133016f8226b8fb"
+ "reference": "0ea47bfbf12a33113247c367798a34e519020f8d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laracasts/flash/zipball/6330bc3c027d3c03188b41c58133016f8226b8fb",
- "reference": "6330bc3c027d3c03188b41c58133016f8226b8fb",
+ "url": "https://api.github.com/repos/laracasts/flash/zipball/0ea47bfbf12a33113247c367798a34e519020f8d",
+ "reference": "0ea47bfbf12a33113247c367798a34e519020f8d",
"shasum": ""
},
"require": {
- "illuminate/support": "~5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
+ "illuminate/support": "~5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"php": ">=5.4.0"
},
"require-dev": {
"mockery/mockery": "dev-master",
- "phpunit/phpunit": "^6.1|^9.5.10"
+ "phpunit/phpunit": "^6.1|^9.5.10|^10.5"
},
"type": "library",
"extra": {
"laravel": {
- "providers": [
- "Laracasts\\Flash\\FlashServiceProvider"
- ],
"aliases": {
"Flash": "Laracasts\\Flash\\Flash"
- }
+ },
+ "providers": [
+ "Laracasts\\Flash\\FlashServiceProvider"
+ ]
}
},
"autoload": {
@@ -2158,22 +2387,22 @@
],
"description": "Easy flash notifications",
"support": {
- "source": "https://github.com/laracasts/flash/tree/3.2.2"
+ "source": "https://github.com/laracasts/flash/tree/3.2.4"
},
- "time": "2023-01-30T20:31:40+00:00"
+ "time": "2025-02-06T14:43:27+00:00"
},
{
"name": "laravel/framework",
- "version": "v8.83.27",
+ "version": "v8.83.29",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49"
+ "reference": "d841a226a50c715431952a10260ba4fac9e91cc4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49",
- "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/d841a226a50c715431952a10260ba4fac9e91cc4",
+ "reference": "d841a226a50c715431952a10260ba4fac9e91cc4",
"shasum": ""
},
"require": {
@@ -2333,28 +2562,29 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2022-12-08T15:28:55+00:00"
+ "time": "2024-11-20T15:55:41+00:00"
},
{
"name": "laravel/helpers",
- "version": "v1.6.0",
+ "version": "v1.7.2",
"source": {
"type": "git",
"url": "https://github.com/laravel/helpers.git",
- "reference": "4dd0f9436d3911611622a6ced8329a1710576f60"
+ "reference": "672d79d5b5f65dc821e57783fa11f22c4d762d70"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/helpers/zipball/4dd0f9436d3911611622a6ced8329a1710576f60",
- "reference": "4dd0f9436d3911611622a6ced8329a1710576f60",
+ "url": "https://api.github.com/repos/laravel/helpers/zipball/672d79d5b5f65dc821e57783fa11f22c4d762d70",
+ "reference": "672d79d5b5f65dc821e57783fa11f22c4d762d70",
"shasum": ""
},
"require": {
- "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0",
- "php": "^7.1.3|^8.0"
+ "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
+ "php": "^7.2.0|^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^7.0|^8.0|^9.0"
+ "phpstan/phpstan": "^1.10",
+ "phpunit/phpunit": "^7.0|^8.0|^9.0|^10.0"
},
"type": "library",
"extra": {
@@ -2387,9 +2617,65 @@
"laravel"
],
"support": {
- "source": "https://github.com/laravel/helpers/tree/v1.6.0"
+ "source": "https://github.com/laravel/helpers/tree/v1.7.2"
},
- "time": "2023-01-09T14:48:11+00:00"
+ "time": "2025-01-24T15:41:25+00:00"
+ },
+ {
+ "name": "laravel/legacy-factories",
+ "version": "v1.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/laravel/legacy-factories.git",
+ "reference": "cd0f8c77d116bac121e9779fcff1f71801aaac50"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/laravel/legacy-factories/zipball/cd0f8c77d116bac121e9779fcff1f71801aaac50",
+ "reference": "cd0f8c77d116bac121e9779fcff1f71801aaac50",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/macroable": "^8.0|^9.0|^10.0|^11.0|^12.0",
+ "php": "^7.3|^8.0",
+ "symfony/finder": "^3.4|^4.0|^5.0|^6.0|^7.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "helpers.php"
+ ],
+ "psr-4": {
+ "Illuminate\\Database\\Eloquent\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Taylor Otwell",
+ "email": "taylor@laravel.com"
+ }
+ ],
+ "description": "The legacy version of the Laravel Eloquent factories.",
+ "homepage": "http://laravel.com",
+ "support": {
+ "issues": "https://github.com/laravel/framework/issues",
+ "source": "https://github.com/laravel/framework"
+ },
+ "time": "2025-01-24T15:41:36+00:00"
},
{
"name": "laravel/passport",
@@ -2431,13 +2717,13 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "10.x-dev"
- },
"laravel": {
"providers": [
"Laravel\\Passport\\PassportServiceProvider"
]
+ },
+ "branch-alias": {
+ "dev-master": "10.x-dev"
}
},
"autoload": {
@@ -2470,26 +2756,27 @@
},
{
"name": "laravel/serializable-closure",
- "version": "v1.3.1",
+ "version": "v1.3.7",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
- "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902"
+ "reference": "4f48ade902b94323ca3be7646db16209ec76be3d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902",
- "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902",
+ "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/4f48ade902b94323ca3be7646db16209ec76be3d",
+ "reference": "4f48ade902b94323ca3be7646db16209ec76be3d",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
- "nesbot/carbon": "^2.61",
+ "illuminate/support": "^8.0|^9.0|^10.0|^11.0",
+ "nesbot/carbon": "^2.61|^3.0",
"pestphp/pest": "^1.21.3",
"phpstan/phpstan": "^1.8.2",
- "symfony/var-dumper": "^5.4.11"
+ "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0"
},
"type": "library",
"extra": {
@@ -2526,43 +2813,40 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
- "time": "2023-07-14T13:56:28+00:00"
+ "time": "2024-11-14T18:34:49+00:00"
},
{
"name": "laravel/tinker",
- "version": "v2.8.2",
+ "version": "v2.10.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/tinker.git",
- "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3"
+ "reference": "22177cc71807d38f2810c6204d8f7183d88a57d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/tinker/zipball/b936d415b252b499e8c3b1f795cd4fc20f57e1f3",
- "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3",
+ "url": "https://api.github.com/repos/laravel/tinker/zipball/22177cc71807d38f2810c6204d8f7183d88a57d3",
+ "reference": "22177cc71807d38f2810c6204d8f7183d88a57d3",
"shasum": ""
},
"require": {
- "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0",
- "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0",
- "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
+ "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
+ "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
+ "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"php": "^7.2.5|^8.0",
- "psy/psysh": "^0.10.4|^0.11.1",
- "symfony/var-dumper": "^4.3.4|^5.0|^6.0"
+ "psy/psysh": "^0.11.1|^0.12.0",
+ "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0"
},
"require-dev": {
"mockery/mockery": "~1.3.3|^1.4.2",
"phpstan/phpstan": "^1.10",
- "phpunit/phpunit": "^8.5.8|^9.3.3"
+ "phpunit/phpunit": "^8.5.8|^9.3.3|^10.0"
},
"suggest": {
- "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)."
+ "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0)."
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- },
"laravel": {
"providers": [
"Laravel\\Tinker\\TinkerServiceProvider"
@@ -2593,9 +2877,9 @@
],
"support": {
"issues": "https://github.com/laravel/tinker/issues",
- "source": "https://github.com/laravel/tinker/tree/v2.8.2"
+ "source": "https://github.com/laravel/tinker/tree/v2.10.1"
},
- "time": "2023-08-15T14:27:00+00:00"
+ "time": "2025-01-27T14:24:01+00:00"
},
{
"name": "laravel/ui",
@@ -2623,13 +2907,13 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "3.x-dev"
- },
"laravel": {
"providers": [
"Laravel\\Ui\\UiServiceProvider"
]
+ },
+ "branch-alias": {
+ "dev-master": "3.x-dev"
}
},
"autoload": {
@@ -2732,69 +3016,56 @@
"time": "2023-04-25T02:46:11+00:00"
},
{
- "name": "lcobucci/jwt",
- "version": "3.4.6",
+ "name": "lcobucci/clock",
+ "version": "3.0.0",
"source": {
"type": "git",
- "url": "https://github.com/lcobucci/jwt.git",
- "reference": "3ef8657a78278dfeae7707d51747251db4176240"
+ "url": "https://github.com/lcobucci/clock.git",
+ "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/lcobucci/jwt/zipball/3ef8657a78278dfeae7707d51747251db4176240",
- "reference": "3ef8657a78278dfeae7707d51747251db4176240",
+ "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc",
+ "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc",
"shasum": ""
},
"require": {
- "ext-mbstring": "*",
- "ext-openssl": "*",
- "php": "^5.6 || ^7.0"
+ "php": "~8.1.0 || ~8.2.0",
+ "psr/clock": "^1.0"
+ },
+ "provide": {
+ "psr/clock-implementation": "1.0"
},
"require-dev": {
- "mikey179/vfsstream": "~1.5",
- "phpmd/phpmd": "~2.2",
- "phpunit/php-invoker": "~1.1",
- "phpunit/phpunit": "^5.7 || ^7.3",
- "squizlabs/php_codesniffer": "~2.3"
- },
- "suggest": {
- "lcobucci/clock": "*"
+ "infection/infection": "^0.26",
+ "lcobucci/coding-standard": "^9.0",
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.9.4",
+ "phpstan/phpstan-deprecation-rules": "^1.1.1",
+ "phpstan/phpstan-phpunit": "^1.3.2",
+ "phpstan/phpstan-strict-rules": "^1.4.4",
+ "phpunit/phpunit": "^9.5.27"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- }
- },
"autoload": {
- "files": [
- "compat/class-aliases.php",
- "compat/json-exception-polyfill.php",
- "compat/lcobucci-clock-polyfill.php"
- ],
"psr-4": {
- "Lcobucci\\JWT\\": "src"
+ "Lcobucci\\Clock\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "BSD-3-Clause"
+ "MIT"
],
"authors": [
{
- "name": "Luís Otávio Cobucci Oblonczyk",
- "email": "lcobucci@gmail.com",
- "role": "Developer"
+ "name": "Luís Cobucci",
+ "email": "lcobucci@gmail.com"
}
],
- "description": "A simple library to work with JSON Web Token and JSON Web Signature",
- "keywords": [
- "JWS",
- "jwt"
- ],
+ "description": "Yet another clock abstraction",
"support": {
- "issues": "https://github.com/lcobucci/jwt/issues",
- "source": "https://github.com/lcobucci/jwt/tree/3.4.6"
+ "issues": "https://github.com/lcobucci/clock/issues",
+ "source": "https://github.com/lcobucci/clock/tree/3.0.0"
},
"funding": [
{
@@ -2806,46 +3077,133 @@
"type": "patreon"
}
],
- "time": "2021-09-28T19:18:28+00:00"
+ "time": "2022-12-19T15:00:24+00:00"
},
{
- "name": "league/commonmark",
- "version": "1.6.7",
+ "name": "lcobucci/jwt",
+ "version": "4.3.0",
"source": {
"type": "git",
- "url": "https://github.com/thephpleague/commonmark.git",
- "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b"
+ "url": "https://github.com/lcobucci/jwt.git",
+ "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2b8185c13bc9578367a5bf901881d1c1b5bbd09b",
- "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b",
+ "url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4",
+ "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4",
+ "shasum": ""
+ },
+ "require": {
+ "ext-hash": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "ext-openssl": "*",
+ "ext-sodium": "*",
+ "lcobucci/clock": "^2.0 || ^3.0",
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "infection/infection": "^0.21",
+ "lcobucci/coding-standard": "^6.0",
+ "mikey179/vfsstream": "^1.6.7",
+ "phpbench/phpbench": "^1.2",
+ "phpstan/extension-installer": "^1.0",
+ "phpstan/phpstan": "^1.4",
+ "phpstan/phpstan-deprecation-rules": "^1.0",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.0",
+ "phpunit/php-invoker": "^3.1",
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Lcobucci\\JWT\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Luís Cobucci",
+ "email": "lcobucci@gmail.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A simple library to work with JSON Web Token and JSON Web Signature",
+ "keywords": [
+ "JWS",
+ "jwt"
+ ],
+ "support": {
+ "issues": "https://github.com/lcobucci/jwt/issues",
+ "source": "https://github.com/lcobucci/jwt/tree/4.3.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/lcobucci",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/lcobucci",
+ "type": "patreon"
+ }
+ ],
+ "time": "2023-01-02T13:28:00+00:00"
+ },
+ {
+ "name": "league/commonmark",
+ "version": "2.6.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/commonmark.git",
+ "reference": "d990688c91cedfb69753ffc2512727ec646df2ad"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad",
+ "reference": "d990688c91cedfb69753ffc2512727ec646df2ad",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
- "php": "^7.1 || ^8.0"
- },
- "conflict": {
- "scrutinizer/ocular": "1.7.*"
+ "league/config": "^1.1.1",
+ "php": "^7.4 || ^8.0",
+ "psr/event-dispatcher": "^1.0",
+ "symfony/deprecation-contracts": "^2.1 || ^3.0",
+ "symfony/polyfill-php80": "^1.16"
},
"require-dev": {
- "cebe/markdown": "~1.0",
- "commonmark/commonmark.js": "0.29.2",
- "erusev/parsedown": "~1.0",
+ "cebe/markdown": "^1.0",
+ "commonmark/cmark": "0.31.1",
+ "commonmark/commonmark.js": "0.31.1",
+ "composer/package-versions-deprecated": "^1.8",
+ "embed/embed": "^4.4",
+ "erusev/parsedown": "^1.0",
"ext-json": "*",
"github/gfm": "0.29.0",
- "michelf/php-markdown": "~1.4",
- "mikehaertl/php-shellcommand": "^1.4",
- "phpstan/phpstan": "^0.12.90",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2",
- "scrutinizer/ocular": "^1.5",
- "symfony/finder": "^4.2"
+ "michelf/php-markdown": "^1.4 || ^2.0",
+ "nyholm/psr7": "^1.5",
+ "phpstan/phpstan": "^1.8.2",
+ "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0",
+ "scrutinizer/ocular": "^1.8.1",
+ "symfony/finder": "^5.3 | ^6.0 | ^7.0",
+ "symfony/process": "^5.4 | ^6.0 | ^7.0",
+ "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0",
+ "unleashedtech/php-coding-standard": "^3.1.1",
+ "vimeo/psalm": "^4.24.0 || ^5.0.0"
+ },
+ "suggest": {
+ "symfony/yaml": "v2.3+ required if using the Front Matter extension"
},
- "bin": [
- "bin/commonmark"
- ],
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.7-dev"
+ }
+ },
"autoload": {
"psr-4": {
"League\\CommonMark\\": "src"
@@ -2863,7 +3221,7 @@
"role": "Lead Developer"
}
],
- "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)",
+ "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)",
"homepage": "https://commonmark.thephpleague.com",
"keywords": [
"commonmark",
@@ -2877,6 +3235,7 @@
],
"support": {
"docs": "https://commonmark.thephpleague.com/",
+ "forum": "https://github.com/thephpleague/commonmark/discussions",
"issues": "https://github.com/thephpleague/commonmark/issues",
"rss": "https://github.com/thephpleague/commonmark/releases.atom",
"source": "https://github.com/thephpleague/commonmark"
@@ -2899,7 +3258,89 @@
"type": "tidelift"
}
],
- "time": "2022-01-13T17:18:13+00:00"
+ "time": "2024-12-29T14:10:59+00:00"
+ },
+ {
+ "name": "league/config",
+ "version": "v1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/config.git",
+ "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
+ "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
+ "shasum": ""
+ },
+ "require": {
+ "dflydev/dot-access-data": "^3.0.1",
+ "nette/schema": "^1.2",
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.8.2",
+ "phpunit/phpunit": "^9.5.5",
+ "scrutinizer/ocular": "^1.8.1",
+ "unleashedtech/php-coding-standard": "^3.1",
+ "vimeo/psalm": "^4.7.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "League\\Config\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Colin O'Dell",
+ "email": "colinodell@gmail.com",
+ "homepage": "https://www.colinodell.com",
+ "role": "Lead Developer"
+ }
+ ],
+ "description": "Define configuration arrays with strict schemas and access values with dot notation",
+ "homepage": "https://config.thephpleague.com",
+ "keywords": [
+ "array",
+ "config",
+ "configuration",
+ "dot",
+ "dot-access",
+ "nested",
+ "schema"
+ ],
+ "support": {
+ "docs": "https://config.thephpleague.com/",
+ "issues": "https://github.com/thephpleague/config/issues",
+ "rss": "https://github.com/thephpleague/config/releases.atom",
+ "source": "https://github.com/thephpleague/config"
+ },
+ "funding": [
+ {
+ "url": "https://www.colinodell.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.paypal.me/colinpodell/10.00",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/colinodell",
+ "type": "github"
+ }
+ ],
+ "time": "2022-12-11T20:36:23+00:00"
},
{
"name": "league/event",
@@ -3051,26 +3492,26 @@
},
{
"name": "league/mime-type-detection",
- "version": "1.12.0",
+ "version": "1.16.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "c7f2872fb273bf493811473dafc88d60ae829f48"
+ "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/c7f2872fb273bf493811473dafc88d60ae829f48",
- "reference": "c7f2872fb273bf493811473dafc88d60ae829f48",
+ "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9",
+ "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
+ "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
},
"type": "library",
"autoload": {
@@ -3091,7 +3532,7 @@
"description": "Mime-type detection for Flysystem",
"support": {
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
- "source": "https://github.com/thephpleague/mime-type-detection/tree/1.12.0"
+ "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0"
},
"funding": [
{
@@ -3103,41 +3544,41 @@
"type": "tidelift"
}
],
- "time": "2023-08-03T07:14:11+00:00"
+ "time": "2024-09-21T08:32:55+00:00"
},
{
"name": "league/oauth2-server",
- "version": "8.4.2",
+ "version": "8.5.5",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/oauth2-server.git",
- "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3"
+ "reference": "cc8778350f905667e796b3c2364a9d3bd7a73518"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/007dc5f6c0151a73b133fec36c9686cc956209d3",
- "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3",
+ "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/cc8778350f905667e796b3c2364a9d3bd7a73518",
+ "reference": "cc8778350f905667e796b3c2364a9d3bd7a73518",
"shasum": ""
},
"require": {
- "defuse/php-encryption": "^2.2.1",
- "ext-json": "*",
+ "defuse/php-encryption": "^2.3",
"ext-openssl": "*",
- "lcobucci/jwt": "^3.4.6 || ^4.0.4",
+ "lcobucci/clock": "^2.2 || ^3.0",
+ "lcobucci/jwt": "^4.3 || ^5.0",
"league/event": "^2.2",
- "league/uri": "^6.4",
- "php": "^7.2 || ^8.0",
- "psr/http-message": "^1.0.1"
+ "league/uri": "^6.7 || ^7.0",
+ "php": "^8.0",
+ "psr/http-message": "^1.0.1 || ^2.0"
},
"replace": {
"league/oauth2server": "*",
"lncd/oauth2": "*"
},
"require-dev": {
- "laminas/laminas-diactoros": "^2.4.1",
+ "laminas/laminas-diactoros": "^3.0.0",
"phpstan/phpstan": "^0.12.57",
"phpstan/phpstan-phpunit": "^0.12.16",
- "phpunit/phpunit": "^8.5.13",
+ "phpunit/phpunit": "^9.6.6",
"roave/security-advisories": "dev-master"
},
"type": "library",
@@ -3183,7 +3624,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/oauth2-server/issues",
- "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.2"
+ "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.5"
},
"funding": [
{
@@ -3191,54 +3632,48 @@
"type": "github"
}
],
- "time": "2023-08-02T22:54:39+00:00"
+ "time": "2024-12-20T23:06:10+00:00"
},
{
"name": "league/uri",
- "version": "6.5.0",
+ "version": "7.5.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/uri.git",
- "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a"
+ "reference": "81fb5145d2644324614cc532b28efd0215bda430"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/uri/zipball/c68ca445abb04817d740ddd6d0b3551826ef0c5a",
- "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a",
+ "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430",
+ "reference": "81fb5145d2644324614cc532b28efd0215bda430",
"shasum": ""
},
"require": {
- "ext-json": "*",
- "league/uri-interfaces": "^2.3",
- "php": "^7.3 || ^8.0",
- "psr/http-message": "^1.0"
+ "league/uri-interfaces": "^7.5",
+ "php": "^8.1"
},
"conflict": {
"league/uri-schemes": "^1.0"
},
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^2.19 || ^3.0",
- "phpstan/phpstan": "^0.12.90",
- "phpstan/phpstan-phpunit": "^0.12.22",
- "phpstan/phpstan-strict-rules": "^0.12.11",
- "phpunit/phpunit": "^8.0 || ^9.0",
- "psr/http-factory": "^1.0"
- },
"suggest": {
- "ext-fileinfo": "Needed to create Data URI from a filepath",
- "ext-intl": "Needed to improve host validation",
- "league/uri-components": "Needed to easily manipulate URI objects",
- "psr/http-factory": "Needed to use the URI factory"
+ "ext-bcmath": "to improve IPV4 host parsing",
+ "ext-fileinfo": "to create Data URI from file contennts",
+ "ext-gmp": "to improve IPV4 host parsing",
+ "ext-intl": "to handle IDN host with the best performance",
+ "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain",
+ "league/uri-components": "Needed to easily manipulate URI objects components",
+ "php-64bit": "to improve IPV4 host parsing",
+ "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.x-dev"
+ "dev-master": "7.x-dev"
}
},
"autoload": {
"psr-4": {
- "League\\Uri\\": "src"
+ "League\\Uri\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -3253,7 +3688,7 @@
}
],
"description": "URI manipulation library",
- "homepage": "http://uri.thephpleague.com",
+ "homepage": "https://uri.thephpleague.com",
"keywords": [
"data-uri",
"file-uri",
@@ -3278,8 +3713,8 @@
"support": {
"docs": "https://uri.thephpleague.com",
"forum": "https://thephpleague.slack.com",
- "issues": "https://github.com/thephpleague/uri/issues",
- "source": "https://github.com/thephpleague/uri/tree/6.5.0"
+ "issues": "https://github.com/thephpleague/uri-src/issues",
+ "source": "https://github.com/thephpleague/uri/tree/7.5.1"
},
"funding": [
{
@@ -3287,46 +3722,44 @@
"type": "github"
}
],
- "time": "2021-08-27T09:54:07+00:00"
+ "time": "2024-12-08T08:40:02+00:00"
},
{
"name": "league/uri-interfaces",
- "version": "2.3.0",
+ "version": "7.5.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/uri-interfaces.git",
- "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383"
+ "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383",
- "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383",
+ "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742",
+ "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742",
"shasum": ""
},
"require": {
- "ext-json": "*",
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^2.19",
- "phpstan/phpstan": "^0.12.90",
- "phpstan/phpstan-phpunit": "^0.12.19",
- "phpstan/phpstan-strict-rules": "^0.12.9",
- "phpunit/phpunit": "^8.5.15 || ^9.5"
+ "ext-filter": "*",
+ "php": "^8.1",
+ "psr/http-factory": "^1",
+ "psr/http-message": "^1.1 || ^2.0"
},
"suggest": {
- "ext-intl": "to use the IDNA feature",
- "symfony/intl": "to use the IDNA feature via Symfony Polyfill"
+ "ext-bcmath": "to improve IPV4 host parsing",
+ "ext-gmp": "to improve IPV4 host parsing",
+ "ext-intl": "to handle IDN host with the best performance",
+ "php-64bit": "to improve IPV4 host parsing",
+ "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.x-dev"
+ "dev-master": "7.x-dev"
}
},
"autoload": {
"psr-4": {
- "League\\Uri\\": "src/"
+ "League\\Uri\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -3340,17 +3773,32 @@
"homepage": "https://nyamsprod.com"
}
],
- "description": "Common interface for URI representation",
- "homepage": "http://github.com/thephpleague/uri-interfaces",
+ "description": "Common interfaces and classes for URI representation and interaction",
+ "homepage": "https://uri.thephpleague.com",
"keywords": [
+ "data-uri",
+ "file-uri",
+ "ftp",
+ "hostname",
+ "http",
+ "https",
+ "parse_str",
+ "parse_url",
+ "psr-7",
+ "query-string",
+ "querystring",
"rfc3986",
"rfc3987",
+ "rfc6570",
"uri",
- "url"
+ "url",
+ "ws"
],
"support": {
- "issues": "https://github.com/thephpleague/uri-interfaces/issues",
- "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0"
+ "docs": "https://uri.thephpleague.com",
+ "forum": "https://thephpleague.slack.com",
+ "issues": "https://github.com/thephpleague/uri-src/issues",
+ "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0"
},
"funding": [
{
@@ -3358,43 +3806,44 @@
"type": "github"
}
],
- "time": "2021-06-28T04:27:21+00:00"
+ "time": "2024-12-08T08:18:47+00:00"
},
{
"name": "maatwebsite/excel",
- "version": "3.1.48",
+ "version": "3.1.63",
"source": {
"type": "git",
"url": "https://github.com/SpartnerNL/Laravel-Excel.git",
- "reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9"
+ "reference": "fccd234da23b39ab03e1a1f6fe9178fb96ec1be1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d0fe2a1d195960c7af7bf0de760582da02a34b9",
- "reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9",
+ "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/fccd234da23b39ab03e1a1f6fe9178fb96ec1be1",
+ "reference": "fccd234da23b39ab03e1a1f6fe9178fb96ec1be1",
"shasum": ""
},
"require": {
"composer/semver": "^3.3",
"ext-json": "*",
- "illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0",
- "php": "^7.0|^8.0",
- "phpoffice/phpspreadsheet": "^1.18",
- "psr/simple-cache": "^1.0|^2.0|^3.0"
+ "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0",
+ "php": "^7.0||^8.0",
+ "phpoffice/phpspreadsheet": "^1.29.9",
+ "psr/simple-cache": "^1.0||^2.0||^3.0"
},
"require-dev": {
- "orchestra/testbench": "^6.0|^7.0|^8.0",
+ "laravel/scout": "^7.0||^8.0||^9.0||^10.0",
+ "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0||^10.0",
"predis/predis": "^1.1"
},
"type": "library",
"extra": {
"laravel": {
- "providers": [
- "Maatwebsite\\Excel\\ExcelServiceProvider"
- ],
"aliases": {
"Excel": "Maatwebsite\\Excel\\Facades\\Excel"
- }
+ },
+ "providers": [
+ "Maatwebsite\\Excel\\ExcelServiceProvider"
+ ]
}
},
"autoload": {
@@ -3426,7 +3875,7 @@
],
"support": {
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
- "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.48"
+ "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.63"
},
"funding": [
{
@@ -3438,33 +3887,39 @@
"type": "github"
}
],
- "time": "2023-02-22T21:01:38+00:00"
+ "time": "2025-02-19T14:24:57+00:00"
},
{
"name": "maennchen/zipstream-php",
- "version": "2.1.0",
+ "version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
- "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
+ "reference": "6187e9cc4493da94b9b63eb2315821552015fca9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
- "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
+ "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/6187e9cc4493da94b9b63eb2315821552015fca9",
+ "reference": "6187e9cc4493da94b9b63eb2315821552015fca9",
"shasum": ""
},
"require": {
- "myclabs/php-enum": "^1.5",
- "php": ">= 7.1",
- "psr/http-message": "^1.0",
- "symfony/polyfill-mbstring": "^1.0"
+ "ext-mbstring": "*",
+ "ext-zlib": "*",
+ "php-64bit": "^8.1"
},
"require-dev": {
"ext-zip": "*",
- "guzzlehttp/guzzle": ">= 6.3",
+ "friendsofphp/php-cs-fixer": "^3.16",
+ "guzzlehttp/guzzle": "^7.5",
"mikey179/vfsstream": "^1.6",
- "phpunit/phpunit": ">= 7.5"
+ "php-coveralls/php-coveralls": "^2.5",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": "^5.0"
+ },
+ "suggest": {
+ "guzzlehttp/psr7": "^2.4",
+ "psr/http-message": "^2.0"
},
"type": "library",
"autoload": {
@@ -3501,19 +3956,15 @@
],
"support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
- "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.1.0"
+ "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.1"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
- },
- {
- "url": "https://opencollective.com/zipstream",
- "type": "open_collective"
}
],
- "time": "2020-05-30T13:11:16+00:00"
+ "time": "2024-10-10T12:33:01+00:00"
},
{
"name": "markbaker/complex",
@@ -3624,16 +4075,16 @@
},
{
"name": "masterminds/html5",
- "version": "2.8.1",
+ "version": "2.9.0",
"source": {
"type": "git",
"url": "https://github.com/Masterminds/html5-php.git",
- "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf"
+ "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf",
- "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf",
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
+ "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
"shasum": ""
},
"require": {
@@ -3641,7 +4092,7 @@
"php": ">=5.3.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8"
+ "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
},
"type": "library",
"extra": {
@@ -3685,22 +4136,22 @@
],
"support": {
"issues": "https://github.com/Masterminds/html5-php/issues",
- "source": "https://github.com/Masterminds/html5-php/tree/2.8.1"
+ "source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
},
- "time": "2023-05-10T11:58:31+00:00"
+ "time": "2024-03-31T07:05:07+00:00"
},
{
"name": "monolog/monolog",
- "version": "2.9.1",
+ "version": "2.10.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
+ "reference": "5cf826f2991858b54d5c3809bee745560a1042a7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
- "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5cf826f2991858b54d5c3809bee745560a1042a7",
+ "reference": "5cf826f2991858b54d5c3809bee745560a1042a7",
"shasum": ""
},
"require": {
@@ -3721,8 +4172,8 @@
"mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3",
"phpspec/prophecy": "^1.15",
- "phpstan/phpstan": "^0.12.91",
- "phpunit/phpunit": "^8.5.14",
+ "phpstan/phpstan": "^1.10",
+ "phpunit/phpunit": "^8.5.38 || ^9.6.19",
"predis/predis": "^1.1 || ^2.0",
"rollbar/rollbar": "^1.3 || ^2 || ^3",
"ruflin/elastica": "^7",
@@ -3777,7 +4228,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
- "source": "https://github.com/Seldaek/monolog/tree/2.9.1"
+ "source": "https://github.com/Seldaek/monolog/tree/2.10.0"
},
"funding": [
{
@@ -3789,86 +4240,24 @@
"type": "tidelift"
}
],
- "time": "2023-02-06T13:44:46+00:00"
- },
- {
- "name": "myclabs/php-enum",
- "version": "1.8.4",
- "source": {
- "type": "git",
- "url": "https://github.com/myclabs/php-enum.git",
- "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483",
- "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "php": "^7.3 || ^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.5",
- "squizlabs/php_codesniffer": "1.*",
- "vimeo/psalm": "^4.6.2"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "MyCLabs\\Enum\\": "src/"
- },
- "classmap": [
- "stubs/Stringable.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP Enum contributors",
- "homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
- }
- ],
- "description": "PHP Enum implementation",
- "homepage": "http://github.com/myclabs/php-enum",
- "keywords": [
- "enum"
- ],
- "support": {
- "issues": "https://github.com/myclabs/php-enum/issues",
- "source": "https://github.com/myclabs/php-enum/tree/1.8.4"
- },
- "funding": [
- {
- "url": "https://github.com/mnapoli",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
- "type": "tidelift"
- }
- ],
- "time": "2022-08-04T09:53:51+00:00"
+ "time": "2024-11-12T12:43:37+00:00"
},
{
"name": "nesbot/carbon",
- "version": "2.70.0",
+ "version": "2.73.0",
"source": {
"type": "git",
- "url": "https://github.com/briannesbitt/Carbon.git",
- "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d"
+ "url": "https://github.com/CarbonPHP/carbon.git",
+ "reference": "9228ce90e1035ff2f0db84b40ec2e023ed802075"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3298b38ea8612e5f77d38d1a99438e42f70341d",
- "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d",
+ "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/9228ce90e1035ff2f0db84b40ec2e023ed802075",
+ "reference": "9228ce90e1035ff2f0db84b40ec2e023ed802075",
"shasum": ""
},
"require": {
+ "carbonphp/carbon-doctrine-types": "*",
"ext-json": "*",
"php": "^7.1.8 || ^8.0",
"psr/clock": "^1.0",
@@ -3880,11 +4269,11 @@
"psr/clock-implementation": "1.0"
},
"require-dev": {
- "doctrine/dbal": "^2.0 || ^3.1.4",
- "doctrine/orm": "^2.7",
+ "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0",
+ "doctrine/orm": "^2.7 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
- "ondrejmirtes/better-reflection": "*",
+ "ondrejmirtes/better-reflection": "<6",
"phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.99 || ^1.7.14",
@@ -3897,10 +4286,6 @@
],
"type": "library",
"extra": {
- "branch-alias": {
- "dev-3.x": "3.x-dev",
- "dev-master": "2.x-dev"
- },
"laravel": {
"providers": [
"Carbon\\Laravel\\ServiceProvider"
@@ -3910,6 +4295,10 @@
"includes": [
"extension.neon"
]
+ },
+ "branch-alias": {
+ "dev-2.x": "2.x-dev",
+ "dev-master": "3.x-dev"
}
},
"autoload": {
@@ -3958,29 +4347,179 @@
"type": "tidelift"
}
],
- "time": "2023-09-07T16:43:50+00:00"
+ "time": "2025-01-08T20:10:23+00:00"
},
{
- "name": "nikic/php-parser",
- "version": "v4.17.1",
+ "name": "nette/schema",
+ "version": "v1.3.2",
"source": {
"type": "git",
- "url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
+ "url": "https://github.com/nette/schema.git",
+ "reference": "da801d52f0354f70a638673c4a0f04e16529431d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
- "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
+ "url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d",
+ "reference": "da801d52f0354f70a638673c4a0f04e16529431d",
"shasum": ""
},
"require": {
+ "nette/utils": "^4.0",
+ "php": "8.1 - 8.4"
+ },
+ "require-dev": {
+ "nette/tester": "^2.5.2",
+ "phpstan/phpstan-nette": "^1.0",
+ "tracy/tracy": "^2.8"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause",
+ "GPL-2.0-only",
+ "GPL-3.0-only"
+ ],
+ "authors": [
+ {
+ "name": "David Grudl",
+ "homepage": "https://davidgrudl.com"
+ },
+ {
+ "name": "Nette Community",
+ "homepage": "https://nette.org/contributors"
+ }
+ ],
+ "description": "📐 Nette Schema: validating data structures against a given Schema.",
+ "homepage": "https://nette.org",
+ "keywords": [
+ "config",
+ "nette"
+ ],
+ "support": {
+ "issues": "https://github.com/nette/schema/issues",
+ "source": "https://github.com/nette/schema/tree/v1.3.2"
+ },
+ "time": "2024-10-06T23:10:23+00:00"
+ },
+ {
+ "name": "nette/utils",
+ "version": "v4.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nette/utils.git",
+ "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96",
+ "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96",
+ "shasum": ""
+ },
+ "require": {
+ "php": "8.0 - 8.4"
+ },
+ "conflict": {
+ "nette/finder": "<3",
+ "nette/schema": "<1.2.2"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "dev-master",
+ "nette/tester": "^2.5",
+ "phpstan/phpstan": "^1.0",
+ "tracy/tracy": "^2.9"
+ },
+ "suggest": {
+ "ext-gd": "to use Image",
+ "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
+ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
+ "ext-json": "to use Nette\\Utils\\Json",
+ "ext-mbstring": "to use Strings::lower() etc...",
+ "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause",
+ "GPL-2.0-only",
+ "GPL-3.0-only"
+ ],
+ "authors": [
+ {
+ "name": "David Grudl",
+ "homepage": "https://davidgrudl.com"
+ },
+ {
+ "name": "Nette Community",
+ "homepage": "https://nette.org/contributors"
+ }
+ ],
+ "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
+ "homepage": "https://nette.org",
+ "keywords": [
+ "array",
+ "core",
+ "datetime",
+ "images",
+ "json",
+ "nette",
+ "paginator",
+ "password",
+ "slugify",
+ "string",
+ "unicode",
+ "utf-8",
+ "utility",
+ "validation"
+ ],
+ "support": {
+ "issues": "https://github.com/nette/utils/issues",
+ "source": "https://github.com/nette/utils/tree/v4.0.5"
+ },
+ "time": "2024-08-07T15:39:19+00:00"
+ },
+ {
+ "name": "nikic/php-parser",
+ "version": "v5.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "447a020a1f875a434d62f2a401f53b82a396e494"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494",
+ "reference": "447a020a1f875a434d62f2a401f53b82a396e494",
+ "shasum": ""
+ },
+ "require": {
+ "ext-ctype": "*",
+ "ext-json": "*",
"ext-tokenizer": "*",
- "php": ">=7.0"
+ "php": ">=7.4"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+ "phpunit/phpunit": "^9.0"
},
"bin": [
"bin/php-parse"
@@ -3988,7 +4527,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.9-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -4012,22 +4551,22 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0"
},
- "time": "2023-08-13T19:53:39+00:00"
+ "time": "2024-12-30T11:07:19+00:00"
},
{
"name": "nyholm/psr7",
- "version": "1.8.0",
+ "version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/Nyholm/psr7.git",
- "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be"
+ "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Nyholm/psr7/zipball/3cb4d163b58589e47b35103e8e5e6a6a475b47be",
- "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be",
+ "url": "https://api.github.com/repos/Nyholm/psr7/zipball/a71f2b11690f4b24d099d6b16690a90ae14fc6f3",
+ "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3",
"shasum": ""
},
"require": {
@@ -4080,7 +4619,7 @@
],
"support": {
"issues": "https://github.com/Nyholm/psr7/issues",
- "source": "https://github.com/Nyholm/psr7/tree/1.8.0"
+ "source": "https://github.com/Nyholm/psr7/tree/1.8.2"
},
"funding": [
{
@@ -4092,7 +4631,7 @@
"type": "github"
}
],
- "time": "2023-05-02T11:26:24+00:00"
+ "time": "2024-09-09T07:06:30+00:00"
},
{
"name": "opis/closure",
@@ -4161,24 +4700,24 @@
},
{
"name": "paragonie/constant_time_encoding",
- "version": "v2.6.3",
+ "version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "58c3f47f650c94ec05a151692652a868995d2938"
+ "reference": "df1e7fde177501eee2037dd159cf04f5f301a512"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
- "reference": "58c3f47f650c94ec05a151692652a868995d2938",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512",
+ "reference": "df1e7fde177501eee2037dd159cf04f5f301a512",
"shasum": ""
},
"require": {
- "php": "^7|^8"
+ "php": "^8"
},
"require-dev": {
- "phpunit/phpunit": "^6|^7|^8|^9",
- "vimeo/psalm": "^1|^2|^3|^4"
+ "phpunit/phpunit": "^9",
+ "vimeo/psalm": "^4|^5"
},
"type": "library",
"autoload": {
@@ -4224,7 +4763,7 @@
"issues": "https://github.com/paragonie/constant_time_encoding/issues",
"source": "https://github.com/paragonie/constant_time_encoding"
},
- "time": "2022-06-14T06:56:20+00:00"
+ "time": "2024-05-08T12:36:18+00:00"
},
{
"name": "paragonie/random_compat",
@@ -4278,23 +4817,23 @@
},
{
"name": "phenx/php-font-lib",
- "version": "0.5.4",
+ "version": "0.5.6",
"source": {
"type": "git",
"url": "https://github.com/dompdf/php-font-lib.git",
- "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4"
+ "reference": "a1681e9793040740a405ac5b189275059e2a9863"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/dd448ad1ce34c63d09baccd05415e361300c35b4",
- "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4",
+ "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/a1681e9793040740a405ac5b189275059e2a9863",
+ "reference": "a1681e9793040740a405ac5b189275059e2a9863",
"shasum": ""
},
"require": {
"ext-mbstring": "*"
},
"require-dev": {
- "symfony/phpunit-bridge": "^3 || ^4 || ^5"
+ "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6"
},
"type": "library",
"autoload": {
@@ -4304,7 +4843,7 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "LGPL-3.0"
+ "LGPL-2.1-or-later"
],
"authors": [
{
@@ -4316,22 +4855,22 @@
"homepage": "https://github.com/PhenX/php-font-lib",
"support": {
"issues": "https://github.com/dompdf/php-font-lib/issues",
- "source": "https://github.com/dompdf/php-font-lib/tree/0.5.4"
+ "source": "https://github.com/dompdf/php-font-lib/tree/0.5.6"
},
- "time": "2021-12-17T19:44:54+00:00"
+ "time": "2024-01-29T14:45:26+00:00"
},
{
"name": "phenx/php-svg-lib",
- "version": "0.5.0",
+ "version": "0.5.4",
"source": {
"type": "git",
"url": "https://github.com/dompdf/php-svg-lib.git",
- "reference": "76876c6cf3080bcb6f249d7d59705108166a6685"
+ "reference": "46b25da81613a9cf43c83b2a8c2c1bdab27df691"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685",
- "reference": "76876c6cf3080bcb6f249d7d59705108166a6685",
+ "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/46b25da81613a9cf43c83b2a8c2c1bdab27df691",
+ "reference": "46b25da81613a9cf43c83b2a8c2c1bdab27df691",
"shasum": ""
},
"require": {
@@ -4350,7 +4889,7 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "LGPL-3.0"
+ "LGPL-3.0-or-later"
],
"authors": [
{
@@ -4362,25 +4901,26 @@
"homepage": "https://github.com/PhenX/php-svg-lib",
"support": {
"issues": "https://github.com/dompdf/php-svg-lib/issues",
- "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0"
+ "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.4"
},
- "time": "2022-09-06T12:16:56+00:00"
+ "time": "2024-04-08T12:52:34+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
- "version": "1.25.2",
+ "version": "1.29.10",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
- "reference": "a317a09e7def49852400a4b3eca4a4b0790ceeb5"
+ "reference": "c80041b1628c4f18030407134fe88303661d4e4e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a317a09e7def49852400a4b3eca4a4b0790ceeb5",
- "reference": "a317a09e7def49852400a4b3eca4a4b0790ceeb5",
+ "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c80041b1628c4f18030407134fe88303661d4e4e",
+ "reference": "c80041b1628c4f18030407134fe88303661d4e4e",
"shasum": ""
},
"require": {
+ "composer/pcre": "^1||^2||^3",
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
@@ -4395,26 +4935,26 @@
"ext-zip": "*",
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.15",
- "maennchen/zipstream-php": "^2.1",
+ "maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
- "php": "^7.3 || ^8.0",
+ "php": "^7.4 || ^8.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
- "dompdf/dompdf": "^1.0 || ^2.0",
+ "dealerdirect/phpcodesniffer-composer-installer": "dev-main",
+ "dompdf/dompdf": "^1.0 || ^2.0 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.2",
- "mitoteam/jpgraph": "10.2.4",
- "mpdf/mpdf": "8.1.1",
+ "mitoteam/jpgraph": "^10.3",
+ "mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"squizlabs/php_codesniffer": "^3.7",
- "tecnickcom/tcpdf": "6.5"
+ "tecnickcom/tcpdf": "^6.5"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
@@ -4467,22 +5007,22 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
- "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.25.2"
+ "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.10"
},
- "time": "2022-09-25T17:21:01+00:00"
+ "time": "2025-02-08T02:56:14+00:00"
},
{
"name": "phpoption/phpoption",
- "version": "1.9.1",
+ "version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/php-option.git",
- "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e"
+ "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e",
- "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e",
+ "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54",
+ "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54",
"shasum": ""
},
"require": {
@@ -4490,13 +5030,13 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
- "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12"
+ "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28"
},
"type": "library",
"extra": {
"bamarni-bin": {
"bin-links": true,
- "forward-command": true
+ "forward-command": false
},
"branch-alias": {
"dev-master": "1.9-dev"
@@ -4532,7 +5072,7 @@
],
"support": {
"issues": "https://github.com/schmittjoh/php-option/issues",
- "source": "https://github.com/schmittjoh/php-option/tree/1.9.1"
+ "source": "https://github.com/schmittjoh/php-option/tree/1.9.3"
},
"funding": [
{
@@ -4544,24 +5084,24 @@
"type": "tidelift"
}
],
- "time": "2023-02-25T19:38:58+00:00"
+ "time": "2024-07-20T21:41:07+00:00"
},
{
"name": "phpseclib/phpseclib",
- "version": "3.0.21",
+ "version": "3.0.43",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1"
+ "reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1",
- "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
+ "reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
"shasum": ""
},
"require": {
- "paragonie/constant_time_encoding": "^1|^2",
+ "paragonie/constant_time_encoding": "^1|^2|^3",
"paragonie/random_compat": "^1.4|^2.0|^9.99.99",
"php": ">=5.6.1"
},
@@ -4638,7 +5178,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
- "source": "https://github.com/phpseclib/phpseclib/tree/3.0.21"
+ "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
},
"funding": [
{
@@ -4654,24 +5194,24 @@
"type": "tidelift"
}
],
- "time": "2023-07-09T15:24:48+00:00"
+ "time": "2024-12-14T21:12:59+00:00"
},
{
"name": "psr/cache",
- "version": "1.0.1",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/cache.git",
- "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+ "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
- "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
+ "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=8.0.0"
},
"type": "library",
"extra": {
@@ -4691,7 +5231,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
@@ -4701,9 +5241,9 @@
"psr-6"
],
"support": {
- "source": "https://github.com/php-fig/cache/tree/master"
+ "source": "https://github.com/php-fig/cache/tree/3.0.0"
},
- "time": "2016-08-06T20:24:11+00:00"
+ "time": "2021-02-03T23:26:27+00:00"
},
{
"name": "psr/clock",
@@ -4755,20 +5295,20 @@
},
{
"name": "psr/container",
- "version": "1.1.1",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
- "php": ">=7.2.0"
+ "php": ">=7.4.0"
},
"type": "library",
"autoload": {
@@ -4797,9 +5337,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/1.1.1"
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
},
- "time": "2021-03-05T17:36:06+00:00"
+ "time": "2021-11-05T16:50:12+00:00"
},
{
"name": "psr/event-dispatcher",
@@ -4853,16 +5393,16 @@
},
{
"name": "psr/http-client",
- "version": "1.0.2",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-client.git",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
"shasum": ""
},
"require": {
@@ -4899,26 +5439,26 @@
"psr-18"
],
"support": {
- "source": "https://github.com/php-fig/http-client/tree/1.0.2"
+ "source": "https://github.com/php-fig/http-client"
},
- "time": "2023-04-10T20:12:12+00:00"
+ "time": "2023-09-23T14:17:50+00:00"
},
{
"name": "psr/http-factory",
- "version": "1.0.2",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-factory.git",
- "reference": "e616d01114759c4c489f93b099585439f795fe35"
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
- "reference": "e616d01114759c4c489f93b099585439f795fe35",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
"shasum": ""
},
"require": {
- "php": ">=7.0.0",
+ "php": ">=7.1",
"psr/http-message": "^1.0 || ^2.0"
},
"type": "library",
@@ -4942,7 +5482,7 @@
"homepage": "https://www.php-fig.org/"
}
],
- "description": "Common interfaces for PSR-7 HTTP message factories",
+ "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
"keywords": [
"factory",
"http",
@@ -4954,22 +5494,22 @@
"response"
],
"support": {
- "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
+ "source": "https://github.com/php-fig/http-factory"
},
- "time": "2023-04-10T20:10:41+00:00"
+ "time": "2024-04-15T12:06:14+00:00"
},
{
"name": "psr/http-message",
- "version": "1.1",
+ "version": "2.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
"shasum": ""
},
"require": {
@@ -4978,7 +5518,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -4993,7 +5533,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
@@ -5007,36 +5547,36 @@
"response"
],
"support": {
- "source": "https://github.com/php-fig/http-message/tree/1.1"
+ "source": "https://github.com/php-fig/http-message/tree/2.0"
},
- "time": "2023-04-04T09:50:52+00:00"
+ "time": "2023-04-04T09:54:51+00:00"
},
{
"name": "psr/log",
- "version": "1.1.4",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376",
+ "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
- "Psr\\Log\\": "Psr/Log/"
+ "Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -5057,9 +5597,9 @@
"psr-3"
],
"support": {
- "source": "https://github.com/php-fig/log/tree/1.1.4"
+ "source": "https://github.com/php-fig/log/tree/2.0.0"
},
- "time": "2021-05-03T11:20:27+00:00"
+ "time": "2021-07-14T16:41:46+00:00"
},
{
"name": "psr/simple-cache",
@@ -5114,25 +5654,25 @@
},
{
"name": "psy/psysh",
- "version": "v0.11.20",
+ "version": "v0.12.7",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "0fa27040553d1d280a67a4393194df5228afea5b"
+ "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0fa27040553d1d280a67a4393194df5228afea5b",
- "reference": "0fa27040553d1d280a67a4393194df5228afea5b",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c",
+ "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-tokenizer": "*",
- "nikic/php-parser": "^4.0 || ^3.1",
- "php": "^8.0 || ^7.0.8",
- "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4",
- "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4"
+ "nikic/php-parser": "^5.0 || ^4.0",
+ "php": "^8.0 || ^7.4",
+ "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4",
+ "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4"
},
"conflict": {
"symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4"
@@ -5143,16 +5683,19 @@
"suggest": {
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
"ext-pdo-sqlite": "The doc command requires SQLite to work.",
- "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
- "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history."
+ "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well."
},
"bin": [
"bin/psysh"
],
"type": "library",
"extra": {
+ "bamarni-bin": {
+ "bin-links": false,
+ "forward-command": false
+ },
"branch-alias": {
- "dev-main": "0.11.x-dev"
+ "dev-main": "0.12.x-dev"
}
},
"autoload": {
@@ -5184,9 +5727,9 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
- "source": "https://github.com/bobthecow/psysh/tree/v0.11.20"
+ "source": "https://github.com/bobthecow/psysh/tree/v0.12.7"
},
- "time": "2023-07-31T14:32:22+00:00"
+ "time": "2024-12-10T01:58:33+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -5234,42 +5777,52 @@
},
{
"name": "ramsey/collection",
- "version": "1.2.2",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/ramsey/collection.git",
- "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a"
+ "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a",
- "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a",
+ "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
+ "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
"shasum": ""
},
"require": {
- "php": "^7.3 || ^8",
- "symfony/polyfill-php81": "^1.23"
+ "php": "^8.1"
},
"require-dev": {
- "captainhook/captainhook": "^5.3",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "ergebnis/composer-normalize": "^2.6",
- "fakerphp/faker": "^1.5",
- "hamcrest/hamcrest-php": "^2",
- "jangregor/phpstan-prophecy": "^0.8",
- "mockery/mockery": "^1.3",
+ "captainhook/plugin-composer": "^5.3",
+ "ergebnis/composer-normalize": "^2.28.3",
+ "fakerphp/faker": "^1.21",
+ "hamcrest/hamcrest-php": "^2.0",
+ "jangregor/phpstan-prophecy": "^1.0",
+ "mockery/mockery": "^1.5",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpcsstandards/phpcsutils": "^1.0.0-rc1",
"phpspec/prophecy-phpunit": "^2.0",
- "phpstan/extension-installer": "^1",
- "phpstan/phpstan": "^0.12.32",
- "phpstan/phpstan-mockery": "^0.12.5",
- "phpstan/phpstan-phpunit": "^0.12.11",
- "phpunit/phpunit": "^8.5 || ^9",
- "psy/psysh": "^0.10.4",
- "slevomat/coding-standard": "^6.3",
- "squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "^4.4"
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.9",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5",
+ "psalm/plugin-mockery": "^1.1",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "ramsey/coding-standard": "^2.0.3",
+ "ramsey/conventional-commits": "^1.3",
+ "vimeo/psalm": "^5.4"
},
"type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ },
+ "ramsey/conventional-commits": {
+ "configFile": "conventional-commits.json"
+ }
+ },
"autoload": {
"psr-4": {
"Ramsey\\Collection\\": "src/"
@@ -5297,7 +5850,7 @@
],
"support": {
"issues": "https://github.com/ramsey/collection/issues",
- "source": "https://github.com/ramsey/collection/tree/1.2.2"
+ "source": "https://github.com/ramsey/collection/tree/2.0.0"
},
"funding": [
{
@@ -5309,29 +5862,27 @@
"type": "tidelift"
}
],
- "time": "2021-10-10T03:01:02+00:00"
+ "time": "2022-12-31T21:50:55+00:00"
},
{
"name": "ramsey/uuid",
- "version": "4.2.3",
+ "version": "4.7.6",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
- "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df"
+ "reference": "91039bc1faa45ba123c4328958e620d382ec7088"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
- "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088",
+ "reference": "91039bc1faa45ba123c4328958e620d382ec7088",
"shasum": ""
},
"require": {
- "brick/math": "^0.8 || ^0.9",
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12",
"ext-json": "*",
- "php": "^7.2 || ^8.0",
- "ramsey/collection": "^1.0",
- "symfony/polyfill-ctype": "^1.8",
- "symfony/polyfill-php80": "^1.14"
+ "php": "^8.0",
+ "ramsey/collection": "^1.2 || ^2.0"
},
"replace": {
"rhumsaa/uuid": "self.version"
@@ -5343,24 +5894,23 @@
"doctrine/annotations": "^1.8",
"ergebnis/composer-normalize": "^2.15",
"mockery/mockery": "^1.3",
- "moontoast/math": "^1.1",
"paragonie/random-lib": "^2",
"php-mock/php-mock": "^2.2",
"php-mock/php-mock-mockery": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpbench/phpbench": "^1.0",
- "phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "^0.12",
- "phpstan/phpstan-mockery": "^0.12",
- "phpstan/phpstan-phpunit": "^0.12",
+ "phpstan/extension-installer": "^1.1",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9",
- "slevomat/coding-standard": "^7.0",
+ "ramsey/composer-repl": "^1.4",
+ "slevomat/coding-standard": "^8.4",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.9"
},
"suggest": {
"ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
- "ext-ctype": "Enables faster processing of character classification using ctype functions.",
"ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
"ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
"paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
@@ -5368,9 +5918,6 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "4.x-dev"
- },
"captainhook": {
"force-install": true
}
@@ -5395,7 +5942,7 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
- "source": "https://github.com/ramsey/uuid/tree/4.2.3"
+ "source": "https://github.com/ramsey/uuid/tree/4.7.6"
},
"funding": [
{
@@ -5407,20 +5954,20 @@
"type": "tidelift"
}
],
- "time": "2021-09-25T23:10:38+00:00"
+ "time": "2024-04-27T21:32:50+00:00"
},
{
"name": "reliese/laravel",
- "version": "v1.2.3",
+ "version": "v1.3.5",
"source": {
"type": "git",
"url": "https://github.com/reliese/laravel.git",
- "reference": "3e0d2e5054c6c4f815d72f22915b35e3ffe82858"
+ "reference": "2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/reliese/laravel/zipball/3e0d2e5054c6c4f815d72f22915b35e3ffe82858",
- "reference": "3e0d2e5054c6c4f815d72f22915b35e3ffe82858",
+ "url": "https://api.github.com/repos/reliese/laravel/zipball/2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c",
+ "reference": "2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c",
"shasum": ""
},
"require": {
@@ -5470,7 +6017,7 @@
"issues": "https://github.com/reliese/laravel/issues",
"source": "https://github.com/reliese/laravel"
},
- "time": "2023-08-17T07:50:33+00:00"
+ "time": "2024-09-26T13:33:01+00:00"
},
{
"name": "rguedes/pdfmerger",
@@ -5524,30 +6071,34 @@
},
{
"name": "sabberworm/php-css-parser",
- "version": "8.4.0",
+ "version": "v8.7.0",
"source": {
"type": "git",
- "url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
- "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30"
+ "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
+ "reference": "f414ff953002a9b18e3a116f5e462c56f21237cf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30",
- "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30",
+ "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/f414ff953002a9b18e3a116f5e462c56f21237cf",
+ "reference": "f414ff953002a9b18e3a116f5e462c56f21237cf",
"shasum": ""
},
"require": {
"ext-iconv": "*",
- "php": ">=5.6.20"
+ "php": "^5.6.20 || ^7.0.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
- "codacy/coverage": "^1.4",
- "phpunit/phpunit": "^4.8.36"
+ "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.40"
},
"suggest": {
"ext-mbstring": "for parsing UTF-8 CSS"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "9.0.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"Sabberworm\\CSS\\": "src/"
@@ -5560,6 +6111,14 @@
"authors": [
{
"name": "Raphael Schweikert"
+ },
+ {
+ "name": "Oliver Klee",
+ "email": "github@oliverklee.de"
+ },
+ {
+ "name": "Jake Hotson",
+ "email": "jake.github@qzdesign.co.uk"
}
],
"description": "Parser for CSS Files written in PHP",
@@ -5570,32 +6129,35 @@
"stylesheet"
],
"support": {
- "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues",
- "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0"
+ "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
+ "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.7.0"
},
- "time": "2021-12-11T13:40:54+00:00"
+ "time": "2024-10-27T17:38:32+00:00"
},
{
"name": "sabre/uri",
- "version": "2.2.4",
+ "version": "2.3.4",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/uri.git",
- "reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0"
+ "reference": "b76524c22de90d80ca73143680a8e77b1266c291"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/uri/zipball/c0c9af9f7754e60a49ebd760e1708adc6d1510c0",
- "reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0",
+ "url": "https://api.github.com/repos/sabre-io/uri/zipball/b76524c22de90d80ca73143680a8e77b1266c291",
+ "reference": "b76524c22de90d80ca73143680a8e77b1266c291",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "~2.19.3",
- "phpstan/phpstan": "^0.12",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
+ "friendsofphp/php-cs-fixer": "^3.63",
+ "phpstan/extension-installer": "^1.4",
+ "phpstan/phpstan": "^1.12",
+ "phpstan/phpstan-phpunit": "^1.4",
+ "phpstan/phpstan-strict-rules": "^1.6",
+ "phpunit/phpunit": "^9.6"
},
"type": "library",
"autoload": {
@@ -5630,20 +6192,20 @@
"issues": "https://github.com/sabre-io/uri/issues",
"source": "https://github.com/fruux/sabre-uri"
},
- "time": "2022-09-19T12:25:28+00:00"
+ "time": "2024-08-27T12:18:16+00:00"
},
{
"name": "sabre/xml",
- "version": "2.2.6",
+ "version": "2.2.11",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/xml.git",
- "reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b"
+ "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/xml/zipball/9cde7cdab1e50893cc83b037b40cd47bfde42a2b",
- "reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b",
+ "url": "https://api.github.com/repos/sabre-io/xml/zipball/01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc",
+ "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc",
"shasum": ""
},
"require": {
@@ -5655,9 +6217,9 @@
"sabre/uri": ">=1.0,<3.0.0"
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "~2.17.1",
+ "friendsofphp/php-cs-fixer": "~2.17.1||3.63.2",
"phpstan/phpstan": "^0.12",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6"
},
"type": "library",
"autoload": {
@@ -5699,7 +6261,7 @@
"issues": "https://github.com/sabre-io/xml/issues",
"source": "https://github.com/fruux/sabre-xml"
},
- "time": "2023-06-28T12:56:05+00:00"
+ "time": "2024-09-06T07:37:46+00:00"
},
{
"name": "setasign/fpdf",
@@ -5749,31 +6311,31 @@
},
{
"name": "setasign/fpdi",
- "version": "v2.4.1",
+ "version": "v2.6.3",
"source": {
"type": "git",
"url": "https://github.com/Setasign/FPDI.git",
- "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b"
+ "reference": "67c31f5e50c93c20579ca9e23035d8c540b51941"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Setasign/FPDI/zipball/f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b",
- "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b",
+ "url": "https://api.github.com/repos/Setasign/FPDI/zipball/67c31f5e50c93c20579ca9e23035d8c540b51941",
+ "reference": "67c31f5e50c93c20579ca9e23035d8c540b51941",
"shasum": ""
},
"require": {
"ext-zlib": "*",
- "php": "^5.6 || ^7.0 || ^8.0"
+ "php": "^7.1 || ^8.0"
},
"conflict": {
"setasign/tfpdf": "<1.31"
},
"require-dev": {
- "phpunit/phpunit": "~5.7",
- "setasign/fpdf": "~1.8",
- "setasign/tfpdf": "~1.31",
+ "phpunit/phpunit": "^7",
+ "setasign/fpdf": "~1.8.6",
+ "setasign/tfpdf": "~1.33",
"squizlabs/php_codesniffer": "^3.5",
- "tecnickcom/tcpdf": "~6.2"
+ "tecnickcom/tcpdf": "^6.2"
},
"suggest": {
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured."
@@ -5809,7 +6371,7 @@
],
"support": {
"issues": "https://github.com/Setasign/FPDI/issues",
- "source": "https://github.com/Setasign/FPDI/tree/v2.4.1"
+ "source": "https://github.com/Setasign/FPDI/tree/v2.6.3"
},
"funding": [
{
@@ -5817,7 +6379,7 @@
"type": "tidelift"
}
],
- "time": "2023-07-27T08:12:09+00:00"
+ "time": "2025-02-05T13:22:35+00:00"
},
{
"name": "swiftmailer/swiftmailer",
@@ -5897,16 +6459,16 @@
},
{
"name": "symfony/console",
- "version": "v5.4.28",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "f4f71842f24c2023b91237c72a365306f3c58827"
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827",
- "reference": "f4f71842f24c2023b91237c72a365306f3c58827",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
"shasum": ""
},
"require": {
@@ -5976,7 +6538,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.4.28"
+ "source": "https://github.com/symfony/console/tree/v5.4.47"
},
"funding": [
{
@@ -5992,25 +6554,24 @@
"type": "tidelift"
}
],
- "time": "2023-08-07T06:12:30+00:00"
+ "time": "2024-11-06T11:30:55+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v5.4.26",
+ "version": "v6.4.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a"
+ "reference": "cb23e97813c5837a041b73a6d63a9ddff0778f5e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a",
- "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/cb23e97813c5837a041b73a6d63a9ddff0778f5e",
+ "reference": "cb23e97813c5837a041b73a6d63a9ddff0778f5e",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/polyfill-php80": "^1.16"
+ "php": ">=8.1"
},
"type": "library",
"autoload": {
@@ -6042,7 +6603,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/css-selector/tree/v5.4.26"
+ "source": "https://github.com/symfony/css-selector/tree/v6.4.13"
},
"funding": [
{
@@ -6058,33 +6619,33 @@
"type": "tidelift"
}
],
- "time": "2023-07-07T06:10:25+00:00"
+ "time": "2024-09-25T14:18:03+00:00"
},
{
"name": "symfony/deprecation-contracts",
- "version": "v2.5.2",
+ "version": "v3.5.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
+ "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
- "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
+ "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=8.1"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "2.5-dev"
- },
"thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "3.5-dev"
}
},
"autoload": {
@@ -6109,7 +6670,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
},
"funding": [
{
@@ -6125,20 +6686,20 @@
"type": "tidelift"
}
],
- "time": "2022-01-02T09:53:40+00:00"
+ "time": "2024-09-25T14:20:29+00:00"
},
{
"name": "symfony/error-handler",
- "version": "v5.4.26",
+ "version": "v5.4.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
- "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9"
+ "reference": "d19ede7a2cafb386be9486c580649d0f9e3d0363"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/error-handler/zipball/b26719213a39c9ba57520cbc5e52bfcc5e8d92f9",
- "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9",
+ "url": "https://api.github.com/repos/symfony/error-handler/zipball/d19ede7a2cafb386be9486c580649d0f9e3d0363",
+ "reference": "d19ede7a2cafb386be9486c580649d0f9e3d0363",
"shasum": ""
},
"require": {
@@ -6180,7 +6741,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/error-handler/tree/v5.4.26"
+ "source": "https://github.com/symfony/error-handler/tree/v5.4.46"
},
"funding": [
{
@@ -6196,48 +6757,43 @@
"type": "tidelift"
}
],
- "time": "2023-07-16T16:48:57+00:00"
+ "time": "2024-11-05T14:17:06+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v5.4.26",
+ "version": "v6.4.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac"
+ "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac",
- "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e",
+ "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/event-dispatcher-contracts": "^2|^3",
- "symfony/polyfill-php80": "^1.16"
+ "php": ">=8.1",
+ "symfony/event-dispatcher-contracts": "^2.5|^3"
},
"conflict": {
- "symfony/dependency-injection": "<4.4"
+ "symfony/dependency-injection": "<5.4",
+ "symfony/service-contracts": "<2.5"
},
"provide": {
"psr/event-dispatcher-implementation": "1.0",
- "symfony/event-dispatcher-implementation": "2.0"
+ "symfony/event-dispatcher-implementation": "2.0|3.0"
},
"require-dev": {
"psr/log": "^1|^2|^3",
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/dependency-injection": "^4.4|^5.0|^6.0",
- "symfony/error-handler": "^4.4|^5.0|^6.0",
- "symfony/expression-language": "^4.4|^5.0|^6.0",
- "symfony/http-foundation": "^4.4|^5.0|^6.0",
- "symfony/service-contracts": "^1.1|^2|^3",
- "symfony/stopwatch": "^4.4|^5.0|^6.0"
- },
- "suggest": {
- "symfony/dependency-injection": "",
- "symfony/http-kernel": ""
+ "symfony/config": "^5.4|^6.0|^7.0",
+ "symfony/dependency-injection": "^5.4|^6.0|^7.0",
+ "symfony/error-handler": "^5.4|^6.0|^7.0",
+ "symfony/expression-language": "^5.4|^6.0|^7.0",
+ "symfony/http-foundation": "^5.4|^6.0|^7.0",
+ "symfony/service-contracts": "^2.5|^3",
+ "symfony/stopwatch": "^5.4|^6.0|^7.0"
},
"type": "library",
"autoload": {
@@ -6265,7 +6821,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13"
},
"funding": [
{
@@ -6281,37 +6837,34 @@
"type": "tidelift"
}
],
- "time": "2023-07-06T06:34:20+00:00"
+ "time": "2024-09-25T14:18:03+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
- "version": "v2.5.2",
+ "version": "v3.5.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
- "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1"
+ "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1",
- "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f",
+ "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
+ "php": ">=8.1",
"psr/event-dispatcher": "^1"
},
- "suggest": {
- "symfony/event-dispatcher-implementation": ""
- },
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "2.5-dev"
- },
"thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "3.5-dev"
}
},
"autoload": {
@@ -6344,7 +6897,7 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2"
+ "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1"
},
"funding": [
{
@@ -6360,20 +6913,20 @@
"type": "tidelift"
}
],
- "time": "2022-01-02T09:53:40+00:00"
+ "time": "2024-09-25T14:20:29+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.4.27",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d"
+ "reference": "63741784cd7b9967975eec610b256eed3ede022b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d",
- "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b",
+ "reference": "63741784cd7b9967975eec610b256eed3ede022b",
"shasum": ""
},
"require": {
@@ -6407,7 +6960,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v5.4.27"
+ "source": "https://github.com/symfony/finder/tree/v5.4.45"
},
"funding": [
{
@@ -6423,20 +6976,20 @@
"type": "tidelift"
}
],
- "time": "2023-07-31T08:02:31+00:00"
+ "time": "2024-09-28T13:32:08+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v5.4.28",
+ "version": "v5.4.48",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2"
+ "reference": "3f38b8af283b830e1363acd79e5bc3412d055341"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2",
- "reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3f38b8af283b830e1363acd79e5bc3412d055341",
+ "reference": "3f38b8af283b830e1363acd79e5bc3412d055341",
"shasum": ""
},
"require": {
@@ -6446,7 +6999,7 @@
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
- "predis/predis": "~1.0",
+ "predis/predis": "^1.0|^2.0",
"symfony/cache": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/expression-language": "^4.4|^5.0|^6.0",
@@ -6483,7 +7036,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-foundation/tree/v5.4.28"
+ "source": "https://github.com/symfony/http-foundation/tree/v5.4.48"
},
"funding": [
{
@@ -6499,20 +7052,20 @@
"type": "tidelift"
}
],
- "time": "2023-08-21T07:23:18+00:00"
+ "time": "2024-11-13T18:58:02+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v5.4.28",
+ "version": "v5.4.48",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "127a2322ca1828157901092518b8ea8e4e1109d4"
+ "reference": "c2dbfc92b851404567160d1ecf3fb7d9b7bde9b0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/127a2322ca1828157901092518b8ea8e4e1109d4",
- "reference": "127a2322ca1828157901092518b8ea8e4e1109d4",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c2dbfc92b851404567160d1ecf3fb7d9b7bde9b0",
+ "reference": "c2dbfc92b851404567160d1ecf3fb7d9b7bde9b0",
"shasum": ""
},
"require": {
@@ -6561,6 +7114,7 @@
"symfony/stopwatch": "^4.4|^5.0|^6.0",
"symfony/translation": "^4.4|^5.0|^6.0",
"symfony/translation-contracts": "^1.1|^2|^3",
+ "symfony/var-dumper": "^4.4.31|^5.4",
"twig/twig": "^2.13|^3.0.4"
},
"suggest": {
@@ -6595,7 +7149,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-kernel/tree/v5.4.28"
+ "source": "https://github.com/symfony/http-kernel/tree/v5.4.48"
},
"funding": [
{
@@ -6611,20 +7165,20 @@
"type": "tidelift"
}
],
- "time": "2023-08-26T13:47:51+00:00"
+ "time": "2024-11-27T12:43:17+00:00"
},
{
"name": "symfony/mime",
- "version": "v5.4.26",
+ "version": "v5.4.45",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
- "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2"
+ "reference": "8c1b9b3e5b52981551fc6044539af1d974e39064"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mime/zipball/2ea06dfeee20000a319d8407cea1d47533d5a9d2",
- "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2",
+ "url": "https://api.github.com/repos/symfony/mime/zipball/8c1b9b3e5b52981551fc6044539af1d974e39064",
+ "reference": "8c1b9b3e5b52981551fc6044539af1d974e39064",
"shasum": ""
},
"require": {
@@ -6639,15 +7193,16 @@
"phpdocumentor/reflection-docblock": "<3.2.2",
"phpdocumentor/type-resolver": "<1.4.0",
"symfony/mailer": "<4.4",
- "symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2"
+ "symfony/serializer": "<5.4.35|>=6,<6.3.12|>=6.4,<6.4.3"
},
"require-dev": {
"egulias/email-validator": "^2.1.10|^3.1|^4",
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/process": "^5.4|^6.4",
"symfony/property-access": "^4.4|^5.1|^6.0",
"symfony/property-info": "^4.4|^5.1|^6.0",
- "symfony/serializer": "^5.4.26|~6.2.13|^6.3.2"
+ "symfony/serializer": "^5.4.35|~6.3.12|^6.4.3"
},
"type": "library",
"autoload": {
@@ -6679,7 +7234,7 @@
"mime-type"
],
"support": {
- "source": "https://github.com/symfony/mime/tree/v5.4.26"
+ "source": "https://github.com/symfony/mime/tree/v5.4.45"
},
"funding": [
{
@@ -6695,24 +7250,24 @@
"type": "tidelift"
}
],
- "time": "2023-07-27T06:29:31+00:00"
+ "time": "2024-10-23T20:18:32+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
- "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"provide": {
"ext-ctype": "*"
@@ -6722,12 +7277,9 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -6761,7 +7313,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
},
"funding": [
{
@@ -6777,24 +7329,24 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-iconv",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
- "reference": "6de50471469b8c9afc38164452ab2b6170ee71c1"
+ "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6de50471469b8c9afc38164452ab2b6170ee71c1",
- "reference": "6de50471469b8c9afc38164452ab2b6170ee71c1",
+ "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/48becf00c920479ca2e910c22a5a39e5d47ca956",
+ "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"provide": {
"ext-iconv": "*"
@@ -6804,12 +7356,9 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -6844,7 +7393,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-iconv/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-iconv/tree/v1.31.0"
},
"funding": [
{
@@ -6860,36 +7409,33 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "875e90aeea2777b6f135677f618529449334a612"
+ "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612",
- "reference": "875e90aeea2777b6f135677f618529449334a612",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
+ "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -6925,7 +7471,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0"
},
"funding": [
{
@@ -6941,38 +7487,34 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
- "reference": "ecaafce9f77234a6a449d29e49267ba10499116d"
+ "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d",
- "reference": "ecaafce9f77234a6a449d29e49267ba10499116d",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773",
+ "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773",
"shasum": ""
},
"require": {
- "php": ">=7.1",
- "symfony/polyfill-intl-normalizer": "^1.10",
- "symfony/polyfill-php72": "^1.10"
+ "php": ">=7.2",
+ "symfony/polyfill-intl-normalizer": "^1.10"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -7012,7 +7554,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0"
},
"funding": [
{
@@ -7028,36 +7570,33 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:30:37+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
- "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -7096,7 +7635,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0"
},
"funding": [
{
@@ -7112,24 +7651,24 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "42292d99c55abe617799667f454222c54c60e229"
+ "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
- "reference": "42292d99c55abe617799667f454222c54c60e229",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
+ "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"provide": {
"ext-mbstring": "*"
@@ -7139,12 +7678,9 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -7179,7 +7715,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
},
"funding": [
{
@@ -7195,109 +7731,30 @@
"type": "tidelift"
}
],
- "time": "2023-07-28T09:04:16+00:00"
- },
- {
- "name": "symfony/polyfill-php72",
- "version": "v1.28.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179",
- "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Php72\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5"
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5",
- "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -7334,7 +7791,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0"
},
"funding": [
{
@@ -7350,33 +7807,30 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.28.0",
+ "version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
+ "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
- "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
+ "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.2"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
"thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
}
},
"autoload": {
@@ -7417,7 +7871,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
},
"funding": [
{
@@ -7433,99 +7887,20 @@
"type": "tidelift"
}
],
- "time": "2023-01-26T09:26:14+00:00"
- },
- {
- "name": "symfony/polyfill-php81",
- "version": "v1.28.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php81.git",
- "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b",
- "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.28-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Php81\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-01-26T09:26:14+00:00"
+ "time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/process",
- "version": "v5.4.28",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b"
+ "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b",
- "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b",
+ "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d",
+ "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d",
"shasum": ""
},
"require": {
@@ -7558,7 +7933,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v5.4.28"
+ "source": "https://github.com/symfony/process/tree/v5.4.47"
},
"funding": [
{
@@ -7574,7 +7949,7 @@
"type": "tidelift"
}
],
- "time": "2023-08-07T10:36:04+00:00"
+ "time": "2024-11-06T11:36:42+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
@@ -7667,16 +8042,16 @@
},
{
"name": "symfony/routing",
- "version": "v5.4.26",
+ "version": "v5.4.48",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "853fc7df96befc468692de0a48831b38f04d2cb2"
+ "reference": "dd08c19879a9b37ff14fd30dcbdf99a4cf045db1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/853fc7df96befc468692de0a48831b38f04d2cb2",
- "reference": "853fc7df96befc468692de0a48831b38f04d2cb2",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/dd08c19879a9b37ff14fd30dcbdf99a4cf045db1",
+ "reference": "dd08c19879a9b37ff14fd30dcbdf99a4cf045db1",
"shasum": ""
},
"require": {
@@ -7737,7 +8112,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v5.4.26"
+ "source": "https://github.com/symfony/routing/tree/v5.4.48"
},
"funding": [
{
@@ -7753,47 +8128,47 @@
"type": "tidelift"
}
],
- "time": "2023-07-24T13:28:37+00:00"
+ "time": "2024-11-12T18:20:21+00:00"
},
{
"name": "symfony/service-contracts",
- "version": "v2.5.2",
+ "version": "v3.5.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c"
+ "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
- "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0",
+ "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "psr/container": "^1.1",
- "symfony/deprecation-contracts": "^2.1|^3"
+ "php": ">=8.1",
+ "psr/container": "^1.1|^2.0",
+ "symfony/deprecation-contracts": "^2.5|^3"
},
"conflict": {
"ext-psr": "<1.1|>=2"
},
- "suggest": {
- "symfony/service-implementation": ""
- },
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "2.5-dev"
- },
"thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "3.5-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Test/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -7820,7 +8195,7 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/service-contracts/tree/v2.5.2"
+ "source": "https://github.com/symfony/service-contracts/tree/v3.5.1"
},
"funding": [
{
@@ -7836,38 +8211,38 @@
"type": "tidelift"
}
],
- "time": "2022-05-30T19:17:29+00:00"
+ "time": "2024-09-25T14:20:29+00:00"
},
{
"name": "symfony/string",
- "version": "v5.4.26",
+ "version": "v6.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "1181fe9270e373537475e826873b5867b863883c"
+ "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c",
- "reference": "1181fe9270e373537475e826873b5867b863883c",
+ "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f",
+ "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
+ "php": ">=8.1",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php80": "~1.15"
+ "symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/translation-contracts": ">=3.0"
+ "symfony/translation-contracts": "<2.5"
},
"require-dev": {
- "symfony/error-handler": "^4.4|^5.0|^6.0",
- "symfony/http-client": "^4.4|^5.0|^6.0",
- "symfony/translation-contracts": "^1.1|^2",
- "symfony/var-exporter": "^4.4|^5.0|^6.0"
+ "symfony/error-handler": "^5.4|^6.0|^7.0",
+ "symfony/http-client": "^5.4|^6.0|^7.0",
+ "symfony/intl": "^6.2|^7.0",
+ "symfony/translation-contracts": "^2.5|^3.0",
+ "symfony/var-exporter": "^5.4|^6.0|^7.0"
},
"type": "library",
"autoload": {
@@ -7906,7 +8281,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v5.4.26"
+ "source": "https://github.com/symfony/string/tree/v6.4.15"
},
"funding": [
{
@@ -7922,57 +8297,55 @@
"type": "tidelift"
}
],
- "time": "2023-06-28T12:46:07+00:00"
+ "time": "2024-11-13T13:31:12+00:00"
},
{
"name": "symfony/translation",
- "version": "v5.4.24",
+ "version": "v6.4.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "de237e59c5833422342be67402d487fbf50334ff"
+ "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/de237e59c5833422342be67402d487fbf50334ff",
- "reference": "de237e59c5833422342be67402d487fbf50334ff",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/bee9bfabfa8b4045a66bf82520e492cddbaffa66",
+ "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66",
"shasum": ""
},
"require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
+ "php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php80": "^1.16",
- "symfony/translation-contracts": "^2.3"
+ "symfony/translation-contracts": "^2.5|^3.0"
},
"conflict": {
- "symfony/config": "<4.4",
- "symfony/console": "<5.3",
- "symfony/dependency-injection": "<5.0",
- "symfony/http-kernel": "<5.0",
- "symfony/twig-bundle": "<5.0",
- "symfony/yaml": "<4.4"
+ "symfony/config": "<5.4",
+ "symfony/console": "<5.4",
+ "symfony/dependency-injection": "<5.4",
+ "symfony/http-client-contracts": "<2.5",
+ "symfony/http-kernel": "<5.4",
+ "symfony/service-contracts": "<2.5",
+ "symfony/twig-bundle": "<5.4",
+ "symfony/yaml": "<5.4"
},
"provide": {
- "symfony/translation-implementation": "2.3"
+ "symfony/translation-implementation": "2.3|3.0"
},
"require-dev": {
+ "nikic/php-parser": "^4.18|^5.0",
"psr/log": "^1|^2|^3",
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/console": "^5.4|^6.0",
- "symfony/dependency-injection": "^5.0|^6.0",
- "symfony/finder": "^4.4|^5.0|^6.0",
- "symfony/http-client-contracts": "^1.1|^2.0|^3.0",
- "symfony/http-kernel": "^5.0|^6.0",
- "symfony/intl": "^4.4|^5.0|^6.0",
+ "symfony/config": "^5.4|^6.0|^7.0",
+ "symfony/console": "^5.4|^6.0|^7.0",
+ "symfony/dependency-injection": "^5.4|^6.0|^7.0",
+ "symfony/finder": "^5.4|^6.0|^7.0",
+ "symfony/http-client-contracts": "^2.5|^3.0",
+ "symfony/http-kernel": "^5.4|^6.0|^7.0",
+ "symfony/intl": "^5.4|^6.0|^7.0",
"symfony/polyfill-intl-icu": "^1.21",
- "symfony/service-contracts": "^1.1.2|^2|^3",
- "symfony/yaml": "^4.4|^5.0|^6.0"
- },
- "suggest": {
- "psr/log-implementation": "To use logging capability in translator",
- "symfony/config": "",
- "symfony/yaml": ""
+ "symfony/routing": "^5.4|^6.0|^7.0",
+ "symfony/service-contracts": "^2.5|^3",
+ "symfony/yaml": "^5.4|^6.0|^7.0"
},
"type": "library",
"autoload": {
@@ -8003,7 +8376,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/translation/tree/v5.4.24"
+ "source": "https://github.com/symfony/translation/tree/v6.4.13"
},
"funding": [
{
@@ -8019,42 +8392,42 @@
"type": "tidelift"
}
],
- "time": "2023-05-19T12:34:17+00:00"
+ "time": "2024-09-27T18:14:25+00:00"
},
{
"name": "symfony/translation-contracts",
- "version": "v2.5.2",
+ "version": "v3.5.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation-contracts.git",
- "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe"
+ "reference": "4667ff3bd513750603a09c8dedbea942487fb07c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe",
- "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe",
+ "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c",
+ "reference": "4667ff3bd513750603a09c8dedbea942487fb07c",
"shasum": ""
},
"require": {
- "php": ">=7.2.5"
- },
- "suggest": {
- "symfony/translation-implementation": ""
+ "php": ">=8.1"
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-main": "2.5-dev"
- },
"thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "3.5-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Translation\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Test/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -8081,7 +8454,7 @@
"standards"
],
"support": {
- "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2"
+ "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1"
},
"funding": [
{
@@ -8097,20 +8470,20 @@
"type": "tidelift"
}
],
- "time": "2022-06-27T16:58:25+00:00"
+ "time": "2024-09-25T14:20:29+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v5.4.28",
+ "version": "v5.4.48",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "684b36ff415e1381d4a943c3ca2502cd2debad73"
+ "reference": "42f18f170aa86d612c3559cfb3bd11a375df32c8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/684b36ff415e1381d4a943c3ca2502cd2debad73",
- "reference": "684b36ff415e1381d4a943c3ca2502cd2debad73",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/42f18f170aa86d612c3559cfb3bd11a375df32c8",
+ "reference": "42f18f170aa86d612c3559cfb3bd11a375df32c8",
"shasum": ""
},
"require": {
@@ -8170,7 +8543,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v5.4.28"
+ "source": "https://github.com/symfony/var-dumper/tree/v5.4.48"
},
"funding": [
{
@@ -8186,35 +8559,37 @@
"type": "tidelift"
}
],
- "time": "2023-08-24T13:38:36+00:00"
+ "time": "2024-11-08T15:21:10+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
- "version": "2.2.6",
+ "version": "v2.3.0",
"source": {
"type": "git",
"url": "https://github.com/tijsverkoyen/CssToInlineStyles.git",
- "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c"
+ "reference": "0d72ac1c00084279c1816675284073c5a337c20d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/c42125b83a4fa63b187fdf29f9c93cb7733da30c",
- "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c",
+ "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d",
+ "reference": "0d72ac1c00084279c1816675284073c5a337c20d",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
- "php": "^5.5 || ^7.0 || ^8.0",
- "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
+ "php": "^7.4 || ^8.0",
+ "symfony/css-selector": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10"
+ "phpstan/phpstan": "^2.0",
+ "phpstan/phpstan-phpunit": "^2.0",
+ "phpunit/phpunit": "^8.5.21 || ^9.5.10"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.2.x-dev"
+ "dev-master": "2.x-dev"
}
},
"autoload": {
@@ -8237,9 +8612,9 @@
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"support": {
"issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues",
- "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.6"
+ "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0"
},
- "time": "2023-01-03T09:29:04+00:00"
+ "time": "2024-12-21T16:25:41+00:00"
},
{
"name": "vitalybaev/google-merchant-feed",
@@ -8289,31 +8664,31 @@
},
{
"name": "vlucas/phpdotenv",
- "version": "v5.5.0",
+ "version": "v5.6.1",
"source": {
"type": "git",
"url": "https://github.com/vlucas/phpdotenv.git",
- "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7"
+ "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7",
- "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7",
+ "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2",
+ "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2",
"shasum": ""
},
"require": {
"ext-pcre": "*",
- "graham-campbell/result-type": "^1.0.2",
- "php": "^7.1.3 || ^8.0",
- "phpoption/phpoption": "^1.8",
- "symfony/polyfill-ctype": "^1.23",
- "symfony/polyfill-mbstring": "^1.23.1",
- "symfony/polyfill-php80": "^1.23.1"
+ "graham-campbell/result-type": "^1.1.3",
+ "php": "^7.2.5 || ^8.0",
+ "phpoption/phpoption": "^1.9.3",
+ "symfony/polyfill-ctype": "^1.24",
+ "symfony/polyfill-mbstring": "^1.24",
+ "symfony/polyfill-php80": "^1.24"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.4.1",
+ "bamarni/composer-bin-plugin": "^1.8.2",
"ext-filter": "*",
- "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25"
+ "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
},
"suggest": {
"ext-filter": "Required to use the boolean validator."
@@ -8322,10 +8697,10 @@
"extra": {
"bamarni-bin": {
"bin-links": true,
- "forward-command": true
+ "forward-command": false
},
"branch-alias": {
- "dev-master": "5.5-dev"
+ "dev-master": "5.6-dev"
}
},
"autoload": {
@@ -8357,7 +8732,7 @@
],
"support": {
"issues": "https://github.com/vlucas/phpdotenv/issues",
- "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0"
+ "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1"
},
"funding": [
{
@@ -8369,7 +8744,7 @@
"type": "tidelift"
}
],
- "time": "2022-10-16T01:01:54+00:00"
+ "time": "2024-07-20T21:52:34+00:00"
},
{
"name": "voku/portable-ascii",
@@ -8536,16 +8911,16 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "9.0-dev"
- },
"laravel": {
- "providers": [
- "Yajra\\DataTables\\DataTablesServiceProvider"
- ],
"aliases": {
"DataTables": "Yajra\\DataTables\\Facades\\DataTables"
- }
+ },
+ "providers": [
+ "Yajra\\DataTables\\DataTablesServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "9.0-dev"
}
},
"autoload": {
@@ -8620,16 +8995,16 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "3.6-dev"
- },
"laravel": {
- "providers": [
- "Barryvdh\\Debugbar\\ServiceProvider"
- ],
"aliases": {
"Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar"
- }
+ },
+ "providers": [
+ "Barryvdh\\Debugbar\\ServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "3.6-dev"
}
},
"autoload": {
@@ -8676,16 +9051,16 @@
},
{
"name": "barryvdh/laravel-ide-helper",
- "version": "v2.13.0",
+ "version": "v2.14.0",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
- "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a"
+ "reference": "485c756f6cff408d6b273274c5e86112c3973d98"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/81d5b223ff067a1f38e14c100997e153b837fe4a",
- "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a",
+ "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/485c756f6cff408d6b273274c5e86112c3973d98",
+ "reference": "485c756f6cff408d6b273274c5e86112c3973d98",
"shasum": ""
},
"require": {
@@ -8696,7 +9071,7 @@
"illuminate/console": "^8 || ^9 || ^10",
"illuminate/filesystem": "^8 || ^9 || ^10",
"illuminate/support": "^8 || ^9 || ^10",
- "nikic/php-parser": "^4.7",
+ "nikic/php-parser": "^4.18 || ^5",
"php": "^7.3 || ^8.0",
"phpdocumentor/type-resolver": "^1.1.0"
},
@@ -8709,20 +9084,20 @@
"orchestra/testbench": "^6 || ^7 || ^8",
"phpunit/phpunit": "^8.5 || ^9",
"spatie/phpunit-snapshot-assertions": "^3 || ^4",
- "vimeo/psalm": "^3.12"
+ "vimeo/psalm": "^5.4"
},
"suggest": {
"illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10)."
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.12-dev"
- },
"laravel": {
"providers": [
"Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider"
]
+ },
+ "branch-alias": {
+ "dev-master": "2.14-dev"
}
},
"autoload": {
@@ -8754,7 +9129,7 @@
],
"support": {
"issues": "https://github.com/barryvdh/laravel-ide-helper/issues",
- "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.13.0"
+ "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.14.0"
},
"funding": [
{
@@ -8766,24 +9141,24 @@
"type": "github"
}
],
- "time": "2023-02-04T13:56:40+00:00"
+ "time": "2024-02-05T08:16:36+00:00"
},
{
"name": "barryvdh/reflection-docblock",
- "version": "v2.1.1",
+ "version": "v2.3.1",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
- "reference": "e6811e927f0ecc37cc4deaa6627033150343e597"
+ "reference": "b6ff9f93603561f50e53b64310495d20b8dff5d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/e6811e927f0ecc37cc4deaa6627033150343e597",
- "reference": "e6811e927f0ecc37cc4deaa6627033150343e597",
+ "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/b6ff9f93603561f50e53b64310495d20b8dff5d8",
+ "reference": "b6ff9f93603561f50e53b64310495d20b8dff5d8",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^8.5.14|^9"
@@ -8795,7 +9170,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.3.x-dev"
}
},
"autoload": {
@@ -8816,22 +9191,22 @@
}
],
"support": {
- "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.1.1"
+ "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.3.1"
},
- "time": "2023-06-14T05:06:27+00:00"
+ "time": "2025-01-18T19:26:32+00:00"
},
{
"name": "composer/class-map-generator",
- "version": "1.1.0",
+ "version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/composer/class-map-generator.git",
- "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9"
+ "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9",
- "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9",
+ "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9",
+ "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9",
"shasum": ""
},
"require": {
@@ -8840,12 +9215,12 @@
"symfony/finder": "^4.4 || ^5.3 || ^6 || ^7"
},
"require-dev": {
- "phpstan/phpstan": "^1.6",
- "phpstan/phpstan-deprecation-rules": "^1",
- "phpstan/phpstan-phpunit": "^1",
- "phpstan/phpstan-strict-rules": "^1.1",
- "symfony/filesystem": "^5.4 || ^6",
- "symfony/phpunit-bridge": "^5"
+ "phpstan/phpstan": "^1.12 || ^2",
+ "phpstan/phpstan-deprecation-rules": "^1 || ^2",
+ "phpstan/phpstan-phpunit": "^1 || ^2",
+ "phpstan/phpstan-strict-rules": "^1.1 || ^2",
+ "phpunit/phpunit": "^8",
+ "symfony/filesystem": "^5.4 || ^6"
},
"type": "library",
"extra": {
@@ -8875,7 +9250,7 @@
],
"support": {
"issues": "https://github.com/composer/class-map-generator/issues",
- "source": "https://github.com/composer/class-map-generator/tree/1.1.0"
+ "source": "https://github.com/composer/class-map-generator/tree/1.6.0"
},
"funding": [
{
@@ -8891,105 +9266,34 @@
"type": "tidelift"
}
],
- "time": "2023-06-30T13:58:57+00:00"
- },
- {
- "name": "composer/pcre",
- "version": "2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/pcre.git",
- "reference": "3fdb2807b31a78a40ad89570e30ec77466c98717"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/pcre/zipball/3fdb2807b31a78a40ad89570e30ec77466c98717",
- "reference": "3fdb2807b31a78a40ad89570e30ec77466c98717",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "phpstan/phpstan": "^1.3",
- "phpstan/phpstan-strict-rules": "^1.1",
- "symfony/phpunit-bridge": "^5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Composer\\Pcre\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jordi Boggiano",
- "email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
- }
- ],
- "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
- "keywords": [
- "PCRE",
- "preg",
- "regex",
- "regular expression"
- ],
- "support": {
- "issues": "https://github.com/composer/pcre/issues",
- "source": "https://github.com/composer/pcre/tree/2.1.0"
- },
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ],
- "time": "2022-11-16T18:32:04+00:00"
+ "time": "2025-02-05T10:05:34+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "1.5.0",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "php": "^8.1"
},
"require-dev": {
- "doctrine/coding-standard": "^9 || ^11",
+ "doctrine/coding-standard": "^11",
"ext-pdo": "*",
"ext-phar": "*",
- "phpbench/phpbench": "^0.16 || ^1",
- "phpstan/phpstan": "^1.4",
- "phpstan/phpstan-phpunit": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.30 || ^5.4"
+ "phpbench/phpbench": "^1.2",
+ "phpstan/phpstan": "^1.9.4",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5.27",
+ "vimeo/psalm": "^5.4"
},
"type": "library",
"autoload": {
@@ -9016,7 +9320,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
+ "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
},
"funding": [
{
@@ -9032,7 +9336,7 @@
"type": "tidelift"
}
],
- "time": "2022-12-30T00:15:36+00:00"
+ "time": "2022-12-30T00:23:10+00:00"
},
{
"name": "facade/flare-client-php",
@@ -9137,16 +9441,16 @@
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- },
"laravel": {
- "providers": [
- "Facade\\Ignition\\IgnitionServiceProvider"
- ],
"aliases": {
"Flare": "Facade\\Ignition\\Facades\\Flare"
- }
+ },
+ "providers": [
+ "Facade\\Ignition\\IgnitionServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-master": "2.x-dev"
}
},
"autoload": {
@@ -9232,20 +9536,20 @@
},
{
"name": "fakerphp/faker",
- "version": "v1.20.0",
+ "version": "v1.24.1",
"source": {
"type": "git",
"url": "https://github.com/FakerPHP/Faker.git",
- "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b"
+ "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b",
- "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b",
+ "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5",
+ "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0",
+ "php": "^7.4 || ^8.0",
"psr/container": "^1.0 || ^2.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
},
@@ -9256,7 +9560,8 @@
"bamarni/composer-bin-plugin": "^1.4.1",
"doctrine/persistence": "^1.3 || ^2.0",
"ext-intl": "*",
- "symfony/phpunit-bridge": "^4.4 || ^5.2"
+ "phpunit/phpunit": "^9.5.26",
+ "symfony/phpunit-bridge": "^5.4.16"
},
"suggest": {
"doctrine/orm": "Required to use Faker\\ORM\\Doctrine",
@@ -9266,11 +9571,6 @@
"ext-mbstring": "Required for multibyte Unicode string functionality."
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "v1.20-dev"
- }
- },
"autoload": {
"psr-4": {
"Faker\\": "src/Faker/"
@@ -9293,32 +9593,32 @@
],
"support": {
"issues": "https://github.com/FakerPHP/Faker/issues",
- "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0"
+ "source": "https://github.com/FakerPHP/Faker/tree/v1.24.1"
},
- "time": "2022-07-20T13:12:54+00:00"
+ "time": "2024-11-21T13:46:39+00:00"
},
{
"name": "filp/whoops",
- "version": "2.15.3",
+ "version": "2.17.0",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
- "reference": "c83e88a30524f9360b11f585f71e6b17313b7187"
+ "reference": "075bc0c26631110584175de6523ab3f1652eb28e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187",
- "reference": "c83e88a30524f9360b11f585f71e6b17313b7187",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e",
+ "reference": "075bc0c26631110584175de6523ab3f1652eb28e",
"shasum": ""
},
"require": {
- "php": "^5.5.9 || ^7.0 || ^8.0",
+ "php": "^7.1 || ^8.0",
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"require-dev": {
- "mockery/mockery": "^0.9 || ^1.0",
- "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
- "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
+ "symfony/var-dumper": "^4.0 || ^5.0"
},
"suggest": {
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
@@ -9358,7 +9658,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
- "source": "https://github.com/filp/whoops/tree/2.15.3"
+ "source": "https://github.com/filp/whoops/tree/2.17.0"
},
"funding": [
{
@@ -9366,7 +9666,7 @@
"type": "github"
}
],
- "time": "2023-07-13T12:00:00+00:00"
+ "time": "2025-01-25T12:00:00+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -9421,36 +9721,41 @@
},
{
"name": "laravel/sail",
- "version": "v1.19.0",
+ "version": "v1.25.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
- "reference": "4f230634a3163f3442def6a4e6ffdb02b02e14d6"
+ "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/sail/zipball/4f230634a3163f3442def6a4e6ffdb02b02e14d6",
- "reference": "4f230634a3163f3442def6a4e6ffdb02b02e14d6",
+ "url": "https://api.github.com/repos/laravel/sail/zipball/e81a7bd7ac1a745ccb25572830fecf74a89bb48a",
+ "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a",
"shasum": ""
},
"require": {
"illuminate/console": "^8.0|^9.0|^10.0",
"illuminate/contracts": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0",
- "php": "^7.3|^8.0"
+ "php": "^8.0",
+ "symfony/yaml": "^6.0"
+ },
+ "require-dev": {
+ "orchestra/testbench": "^6.0|^7.0|^8.0",
+ "phpstan/phpstan": "^1.10"
},
"bin": [
"bin/sail"
],
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "1.x-dev"
- },
"laravel": {
"providers": [
"Laravel\\Sail\\SailServiceProvider"
]
+ },
+ "branch-alias": {
+ "dev-master": "1.x-dev"
}
},
"autoload": {
@@ -9477,29 +9782,31 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
- "time": "2023-01-31T13:37:57+00:00"
+ "time": "2023-09-11T17:37:09+00:00"
},
{
"name": "maximebf/debugbar",
- "version": "v1.18.2",
+ "version": "v1.23.6",
"source": {
"type": "git",
- "url": "https://github.com/maximebf/php-debugbar.git",
- "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274"
+ "url": "https://github.com/php-debugbar/php-debugbar.git",
+ "reference": "4b3d5f1afe09a7db5a9d3282890f49f6176d6542"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/17dcf3f6ed112bb85a37cf13538fd8de49f5c274",
- "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274",
+ "url": "https://api.github.com/repos/php-debugbar/php-debugbar/zipball/4b3d5f1afe09a7db5a9d3282890f49f6176d6542",
+ "reference": "4b3d5f1afe09a7db5a9d3282890f49f6176d6542",
"shasum": ""
},
"require": {
- "php": "^7.1|^8",
+ "php": "^7.2|^8",
"psr/log": "^1|^2|^3",
- "symfony/var-dumper": "^4|^5|^6"
+ "symfony/var-dumper": "^4|^5|^6|^7"
},
"require-dev": {
- "phpunit/phpunit": ">=7.5.20 <10.0",
+ "dbrekelmans/bdi": "^1",
+ "phpunit/phpunit": "^8|^9",
+ "symfony/panther": "^1|^2.1",
"twig/twig": "^1.38|^2.7|^3.0"
},
"suggest": {
@@ -9510,7 +9817,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.18-dev"
+ "dev-master": "1.23-dev"
}
},
"autoload": {
@@ -9540,23 +9847,23 @@
"debugbar"
],
"support": {
- "issues": "https://github.com/maximebf/php-debugbar/issues",
- "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.2"
+ "issues": "https://github.com/php-debugbar/php-debugbar/issues",
+ "source": "https://github.com/php-debugbar/php-debugbar/tree/v1.23.6"
},
- "time": "2023-02-04T15:27:00+00:00"
+ "time": "2025-02-13T12:22:36+00:00"
},
{
"name": "mockery/mockery",
- "version": "1.6.6",
+ "version": "1.6.12",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
- "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e"
+ "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/b8e0bb7d8c604046539c1115994632c74dcb361e",
- "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699",
+ "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699",
"shasum": ""
},
"require": {
@@ -9568,10 +9875,8 @@
"phpunit/phpunit": "<8.0"
},
"require-dev": {
- "phpunit/phpunit": "^8.5 || ^9.6.10",
- "psalm/plugin-phpunit": "^0.18.4",
- "symplify/easy-coding-standard": "^11.5.0",
- "vimeo/psalm": "^4.30"
+ "phpunit/phpunit": "^8.5 || ^9.6.17",
+ "symplify/easy-coding-standard": "^12.1.14"
},
"type": "library",
"autoload": {
@@ -9628,20 +9933,20 @@
"security": "https://github.com/mockery/mockery/security/advisories",
"source": "https://github.com/mockery/mockery"
},
- "time": "2023-08-09T00:03:52+00:00"
+ "time": "2024-05-16T03:13:13+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.11.1",
+ "version": "1.13.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
+ "reference": "024473a478be9df5fdaca2c793f2232fe788e414"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414",
+ "reference": "024473a478be9df5fdaca2c793f2232fe788e414",
"shasum": ""
},
"require": {
@@ -9649,11 +9954,12 @@
},
"conflict": {
"doctrine/collections": "<1.6.8",
- "doctrine/common": "<2.13.3 || >=3,<3.2.2"
+ "doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpspec/prophecy": "^1.10",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
@@ -9679,7 +9985,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0"
},
"funding": [
{
@@ -9687,7 +9993,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-08T13:26:56+00:00"
+ "time": "2025-02-12T12:17:51+00:00"
},
{
"name": "nunomaduro/collision",
@@ -9778,20 +10084,21 @@
},
{
"name": "phar-io/manifest",
- "version": "2.0.3",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
+ "reference": "54750ef60c58e43759730615a392c31c80e23176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
- "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-phar": "*",
"ext-xmlwriter": "*",
"phar-io/version": "^3.0.1",
@@ -9832,9 +10139,15 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
- "source": "https://github.com/phar-io/manifest/tree/2.0.3"
+ "source": "https://github.com/phar-io/manifest/tree/2.0.4"
},
- "time": "2021-07-20T11:28:43+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:33:53+00:00"
},
{
"name": "phar-io/version",
@@ -9942,25 +10255,33 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.6.1",
+ "version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "77a32518733312af16a44300404e945338981de3"
+ "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
- "reference": "77a32518733312af16a44300404e945338981de3",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a",
+ "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a",
"shasum": ""
},
"require": {
- "php": "^7.2 || ^8.0",
- "phpdocumentor/reflection-common": "^2.0"
+ "doctrine/deprecations": "^1.0",
+ "php": "^7.3 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.0",
+ "phpstan/phpdoc-parser": "^1.18|^2.0"
},
"require-dev": {
"ext-tokenizer": "*",
- "psalm/phar": "^4.8"
+ "phpbench/phpbench": "^1.2",
+ "phpstan/extension-installer": "^1.1",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpunit/phpunit": "^9.5",
+ "rector/rector": "^0.13.9",
+ "vimeo/psalm": "^4.25"
},
"type": "library",
"extra": {
@@ -9986,41 +10307,88 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0"
},
- "time": "2022-03-15T21:29:03+00:00"
+ "time": "2024-11-09T15:12:26+00:00"
},
{
- "name": "phpunit/php-code-coverage",
- "version": "9.2.28",
+ "name": "phpstan/phpdoc-parser",
+ "version": "2.1.0",
"source": {
"type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef"
+ "url": "https://github.com/phpstan/phpdoc-parser.git",
+ "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef",
- "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68",
+ "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "^2.0",
+ "nikic/php-parser": "^5.3.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/extension-installer": "^1.0",
+ "phpstan/phpstan": "^2.0",
+ "phpstan/phpstan-phpunit": "^2.0",
+ "phpstan/phpstan-strict-rules": "^2.0",
+ "phpunit/phpunit": "^9.6",
+ "symfony/process": "^5.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\PhpDocParser\\": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPDoc parser with support for nullable, intersection and generic types",
+ "support": {
+ "issues": "https://github.com/phpstan/phpdoc-parser/issues",
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0"
+ },
+ "time": "2025-02-19T13:28:12+00:00"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "9.2.32",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5",
+ "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.15",
+ "nikic/php-parser": "^4.19.1 || ^5.1.0",
"php": ">=7.3",
- "phpunit/php-file-iterator": "^3.0.3",
- "phpunit/php-text-template": "^2.0.2",
- "sebastian/code-unit-reverse-lookup": "^2.0.2",
- "sebastian/complexity": "^2.0",
- "sebastian/environment": "^5.1.2",
- "sebastian/lines-of-code": "^1.0.3",
- "sebastian/version": "^3.0.1",
- "theseer/tokenizer": "^1.2.0"
+ "phpunit/php-file-iterator": "^3.0.6",
+ "phpunit/php-text-template": "^2.0.4",
+ "sebastian/code-unit-reverse-lookup": "^2.0.3",
+ "sebastian/complexity": "^2.0.3",
+ "sebastian/environment": "^5.1.5",
+ "sebastian/lines-of-code": "^1.0.4",
+ "sebastian/version": "^3.0.2",
+ "theseer/tokenizer": "^1.2.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^9.6"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
@@ -10029,7 +10397,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.2-dev"
+ "dev-main": "9.2.x-dev"
}
},
"autoload": {
@@ -10058,7 +10426,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.28"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32"
},
"funding": [
{
@@ -10066,7 +10434,7 @@
"type": "github"
}
],
- "time": "2023-09-12T14:36:20+00:00"
+ "time": "2024-08-22T04:23:01+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -10311,45 +10679,45 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.6.12",
+ "version": "9.6.22",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f"
+ "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a122c2ebd469b751d774aa0f613dc0d67697653f",
- "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c",
+ "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1 || ^2",
+ "doctrine/instantiator": "^1.5.0 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.3",
- "phar-io/version": "^3.0.2",
+ "myclabs/deep-copy": "^1.12.1",
+ "phar-io/manifest": "^2.0.4",
+ "phar-io/version": "^3.2.1",
"php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.28",
- "phpunit/php-file-iterator": "^3.0.5",
+ "phpunit/php-code-coverage": "^9.2.32",
+ "phpunit/php-file-iterator": "^3.0.6",
"phpunit/php-invoker": "^3.1.1",
- "phpunit/php-text-template": "^2.0.3",
- "phpunit/php-timer": "^5.0.2",
- "sebastian/cli-parser": "^1.0.1",
- "sebastian/code-unit": "^1.0.6",
+ "phpunit/php-text-template": "^2.0.4",
+ "phpunit/php-timer": "^5.0.3",
+ "sebastian/cli-parser": "^1.0.2",
+ "sebastian/code-unit": "^1.0.8",
"sebastian/comparator": "^4.0.8",
- "sebastian/diff": "^4.0.3",
- "sebastian/environment": "^5.1.3",
- "sebastian/exporter": "^4.0.5",
- "sebastian/global-state": "^5.0.1",
- "sebastian/object-enumerator": "^4.0.3",
- "sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.2",
+ "sebastian/diff": "^4.0.6",
+ "sebastian/environment": "^5.1.5",
+ "sebastian/exporter": "^4.0.6",
+ "sebastian/global-state": "^5.0.7",
+ "sebastian/object-enumerator": "^4.0.4",
+ "sebastian/resource-operations": "^3.0.4",
+ "sebastian/type": "^3.2.1",
"sebastian/version": "^3.0.2"
},
"suggest": {
@@ -10394,7 +10762,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.12"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22"
},
"funding": [
{
@@ -10410,20 +10778,20 @@
"type": "tidelift"
}
],
- "time": "2023-09-12T14:39:31+00:00"
+ "time": "2024-12-05T13:48:26+00:00"
},
{
"name": "sebastian/cli-parser",
- "version": "1.0.1",
+ "version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
"shasum": ""
},
"require": {
@@ -10458,7 +10826,7 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
- "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
},
"funding": [
{
@@ -10466,7 +10834,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:08:49+00:00"
+ "time": "2024-03-02T06:27:43+00:00"
},
{
"name": "sebastian/code-unit",
@@ -10655,20 +11023,20 @@
},
{
"name": "sebastian/complexity",
- "version": "2.0.2",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
- "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.7",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3"
},
"require-dev": {
@@ -10700,7 +11068,7 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
},
"funding": [
{
@@ -10708,20 +11076,20 @@
"type": "github"
}
],
- "time": "2020-10-26T15:52:27+00:00"
+ "time": "2023-12-22T06:19:30+00:00"
},
{
"name": "sebastian/diff",
- "version": "4.0.5",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
+ "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
- "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
+ "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
"shasum": ""
},
"require": {
@@ -10766,7 +11134,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
},
"funding": [
{
@@ -10774,7 +11142,7 @@
"type": "github"
}
],
- "time": "2023-05-07T05:35:17+00:00"
+ "time": "2024-03-02T06:30:58+00:00"
},
{
"name": "sebastian/environment",
@@ -10841,16 +11209,16 @@
},
{
"name": "sebastian/exporter",
- "version": "4.0.5",
+ "version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
+ "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
- "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
"shasum": ""
},
"require": {
@@ -10906,7 +11274,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
},
"funding": [
{
@@ -10914,20 +11282,20 @@
"type": "github"
}
],
- "time": "2022-09-14T06:03:37+00:00"
+ "time": "2024-03-02T06:33:00+00:00"
},
{
"name": "sebastian/global-state",
- "version": "5.0.6",
+ "version": "5.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bde739e7565280bda77be70044ac1047bc007e34"
+ "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
- "reference": "bde739e7565280bda77be70044ac1047bc007e34",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
"shasum": ""
},
"require": {
@@ -10970,7 +11338,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
},
"funding": [
{
@@ -10978,24 +11346,24 @@
"type": "github"
}
],
- "time": "2023-08-02T09:26:13+00:00"
+ "time": "2024-03-02T06:35:11+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "1.0.3",
+ "version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
- "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.6",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3"
},
"require-dev": {
@@ -11027,7 +11395,7 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
},
"funding": [
{
@@ -11035,7 +11403,7 @@
"type": "github"
}
],
- "time": "2020-11-28T06:42:11+00:00"
+ "time": "2023-12-22T06:20:34+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -11214,16 +11582,16 @@
},
{
"name": "sebastian/resource-operations",
- "version": "3.0.3",
+ "version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
+ "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
- "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
+ "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
"shasum": ""
},
"require": {
@@ -11235,7 +11603,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -11256,8 +11624,7 @@
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
- "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
},
"funding": [
{
@@ -11265,7 +11632,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:45:17+00:00"
+ "time": "2024-03-14T16:00:52+00:00"
},
{
"name": "sebastian/type",
@@ -11377,17 +11744,89 @@
"time": "2020-09-28T06:39:44+00:00"
},
{
- "name": "theseer/tokenizer",
- "version": "1.2.1",
+ "name": "symfony/yaml",
+ "version": "v6.4.18",
"source": {
"type": "git",
- "url": "https://github.com/theseer/tokenizer.git",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5",
+ "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "symfony/console": "<5.4"
+ },
+ "require-dev": {
+ "symfony/console": "^5.4|^6.0|^7.0"
+ },
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Loads and dumps YAML files",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/yaml/tree/v6.4.18"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-01-07T09:44:41+00:00"
+ },
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": ""
},
"require": {
@@ -11416,7 +11855,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
},
"funding": [
{
@@ -11424,7 +11863,7 @@
"type": "github"
}
],
- "time": "2021-07-28T10:34:58+00:00"
+ "time": "2024-03-03T12:36:25+00:00"
}
],
"aliases": [],
@@ -11433,8 +11872,8 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": "^7.3|^8.0"
+ "php": "^7.4|^8.0"
},
"platform-dev": [],
- "plugin-api-version": "2.3.0"
+ "plugin-api-version": "2.2.0"
}
diff --git a/config/app.php b/config/app.php
index a7b8065..b5f5638 100755
--- a/config/app.php
+++ b/config/app.php
@@ -51,7 +51,7 @@ return [
| your application so that it is used when running Artisan tasks.
|
*/
-
+ 'mode' => env('APP_MODE', 'live'),
'url' => env('APP_URL', 'https://mivita'),
'domain' => env('APP_DOMAIN', 'mivita'),
'tld_care' => env('APP_TLD_CARE', '.local'),
@@ -76,7 +76,7 @@ return [
'main_tax_rate' => env('APP_MAIN_TAX_RATE', 19),
'shipping_tax' => env('APP_SHIPPING_TAX', 19),
- 'php_version' => env('APP_PHP_VERSION', '7.4'),
+ 'php_version' => env('APP_PHP_VERSION', '8.2'),
/* 'url_backend' => env('APP_URL', 'http://mivita.local/'),
'url_backend' => env('APP_URL', 'http://mivita.local/'),
@@ -177,7 +177,7 @@ return [
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Reliese\Coders\CodersServiceProvider::class,
-
+ Intervention\Image\ImageServiceProvider::class,
/*
* Package Service Providers...
*/
@@ -192,11 +192,9 @@ return [
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
-
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Jenssegers\Date\DateServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
- Intervention\Image\ImageServiceProvider::class,
Maatwebsite\Excel\ExcelServiceProvider::class,
Yajra\DataTables\DataTablesServiceProvider::class,
App\Providers\YardServiceProvider::class
@@ -250,10 +248,10 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
- 'Input' => Illuminate\Support\Facades\Input::class,
+ //'Input' => Illuminate\Support\Facades\Input::class,
'Form' => Collective\Html\FormFacade::class,
'HTML' => Collective\Html\HtmlFacade::class,
- 'Image' => Intervention\Image\Facades\Image::class,
+ 'Image' => Intervention\Image\Facades\Image::class,
'Carbon' => Carbon\Carbon::class,
'Date' => Jenssegers\Date\Date::class,
'HTMLHelper' => App\Services\HTMLHelper::class,
diff --git a/config/image.php b/config/image.php
deleted file mode 100644
index 2b1d2c3..0000000
--- a/config/image.php
+++ /dev/null
@@ -1,20 +0,0 @@
- 'gd'
-
-];
diff --git a/cron_script_local.sh b/cron_script_local.sh
index c519548..8829457 100644
--- a/cron_script_local.sh
+++ b/cron_script_local.sh
@@ -1,8 +1,10 @@
#!/bin/bash
echo $(date) # Will print the output of date command
/Applications/MAMP/bin/php/php7.4.33/bin/php -v
-/Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan business:store 0 0 2>&1
-/Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan user:cleanup 2>&1
+# /Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan business:store 0 0 2>&1
+# /Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan user:cleanup 2>&1
+/Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan user:make_abo_order 2>&1
+
# php /path/to/artisan schedule:run 1>> /dev/null 2>&1
# cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
\ No newline at end of file
diff --git a/cron_script_server.sh b/cron_script_server.sh
index 34ac6ee..8d66ac6 100644
--- a/cron_script_server.sh
+++ b/cron_script_server.sh
@@ -1,7 +1,8 @@
#!/bin/bash
echo $(date) # Will print the output of date command
-/usr/bin/php74 -v
-/usr/bin/php74 ../artisan business:store 0 0 2>&1
-/usr/bin/php74 ../artisan user:cleanup 2>&1
+/usr/bin/php82 -v
+/usr/bin/php82 ../artisan business:store 0 0 2>&1
+/usr/bin/php82 ../artisan user:cleanup 2>&1
+/usr/bin/php82 ../artisan user:make_abo_order 2>&1
# php /path/to/artisan schedule:run 1>> /dev/null 2>&1
# cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
\ No newline at end of file
diff --git a/database/migrations/2019_02_23_163832_create_shopping_payments_table.php b/database/migrations/2019_02_23_163832_create_shopping_payments_table.php
index 16ff321..feb8150 100644
--- a/database/migrations/2019_02_23_163832_create_shopping_payments_table.php
+++ b/database/migrations/2019_02_23_163832_create_shopping_payments_table.php
@@ -21,7 +21,9 @@ class CreateShoppingPaymentsTable extends Migration
$table->string('clearingtype',3);
$table->string('wallettype', 3)->nullable();
$table->string('onlinebanktransfertype',3)->nullable();
+ $table->string('pseudocardpan')->nullable();
+
$table->string('reference', 16);
$table->unsignedInteger('amount');
$table->string('currency', 6);
@@ -31,6 +33,7 @@ class CreateShoppingPaymentsTable extends Migration
$table->boolean('is_abo')->default(false);
$table->unsignedTinyInteger('abo_interval')->nullable();
+ $table->string('identifier')->nullable();
$table->char('mode', 4)->nullable();
diff --git a/database/migrations/2024_07_29_144455_create_user_abos_table.php b/database/migrations/2024_07_29_144455_create_user_abos_table.php
index 7512c0f..848e23e 100644
--- a/database/migrations/2024_07_29_144455_create_user_abos_table.php
+++ b/database/migrations/2024_07_29_144455_create_user_abos_table.php
@@ -16,15 +16,18 @@ class CreateUserAbosTable extends Migration
Schema::create('user_abos', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id')->nullable();
+ $table->unsignedInteger('member_id')->nullable();
+
$table->unsignedInteger('shopping_user_id');
$table->char('is_for', 2)->nullable();
+ $table->string('email')->nullable();
$table->unsignedInteger('payone_userid');
$table->string('clearingtype',3);
$table->string('wallettype', 3)->nullable();
- $table->unsignedInteger('amount');
- $table->string('currency', 6);
-
+ $table->string('carddata')->nullable();
+
+ $table->decimal('amount', 13, 2)->default(0.00);
$table->boolean('active')->default(true);
$table->unsignedTinyInteger('status')->index()->default(0);
@@ -34,9 +37,6 @@ class CreateUserAbosTable extends Migration
$table->date('next_date')->nullable();
$table->date('cancel_date')->nullable();
- $table->unsignedTinyInteger('count')->default(0);
-
-
$table->timestamps();
$table->softDeletes();
$table->timestamp('user_deleted_at')->nullable();
@@ -45,6 +45,10 @@ class CreateUserAbosTable extends Migration
->references('id')
->on('users');
+ $table->foreign('member_id')
+ ->references('id')
+ ->on('users');
+
$table->foreign('shopping_user_id')
->references('id')
->on('shopping_users');
diff --git a/database/migrations/2024_10_17_161306_create_user_abo_items_table.php b/database/migrations/2024_10_17_161306_create_user_abo_items_table.php
new file mode 100644
index 0000000..d006229
--- /dev/null
+++ b/database/migrations/2024_10_17_161306_create_user_abo_items_table.php
@@ -0,0 +1,49 @@
+increments('id');
+ $table->unsignedInteger('user_abo_id');
+ $table->unsignedInteger('product_id');
+ $table->unsignedTinyInteger('comp')->nullable();
+ $table->unsignedInteger('qty');
+
+ $table->unsignedTinyInteger('status')->index()->default(0);
+ $table->timestamps();
+
+ $table->foreign('user_abo_id')
+ ->references('id')
+ ->on('user_abos')
+ ->onDelete('cascade');
+
+ $table->foreign('product_id')
+ ->references('id')
+ ->on('products');
+
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('user_abo_items');
+ }
+}
diff --git a/mivita.code-workspace b/mivita.code-workspace
index 876a149..29881eb 100644
--- a/mivita.code-workspace
+++ b/mivita.code-workspace
@@ -4,5 +4,7 @@
"path": "."
}
],
- "settings": {}
+ "settings": {
+ "CodeGPT.apiKey": "CodeGPT Plus Beta"
+ }
}
\ No newline at end of file
diff --git a/packages/shoppingcart/.gitignore b/packages/shoppingcart/.gitignore
deleted file mode 100644
index 225319b..0000000
--- a/packages/shoppingcart/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/vendor
-composer.phar
-composer.lock
-.DS_Store
-.idea/
\ No newline at end of file
diff --git a/packages/shoppingcart/.travis.yml b/packages/shoppingcart/.travis.yml
deleted file mode 100644
index 51c3700..0000000
--- a/packages/shoppingcart/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-language: php
-
-php:
- - 7.0
-
-before_script:
- - composer self-update
- - composer install --prefer-source --no-interaction
-
-script: vendor/bin/phpunit
\ No newline at end of file
diff --git a/packages/shoppingcart/CanBeBought.php b/packages/shoppingcart/CanBeBought.php
deleted file mode 100644
index 75b2729..0000000
--- a/packages/shoppingcart/CanBeBought.php
+++ /dev/null
@@ -1,43 +0,0 @@
-getKey() : $this->id;
- }
-
- /**
- * Get the description or title of the Buyable item.
- *
- * @return string
- */
- public function getBuyableDescription($options = null)
- {
- if(property_exists($this, 'name')) return $this->name;
- if(property_exists($this, 'title')) return $this->title;
- if(property_exists($this, 'description')) return $this->description;
-
- return null;
- }
-
- /**
- * Get the price of the Buyable item.
- *
- * @return float
- */
- public function getBuyablePrice($options = null)
- {
- if(property_exists($this, 'price')) return $this->price;
-
- return null;
- }
-}
\ No newline at end of file
diff --git a/packages/shoppingcart/Cart.php b/packages/shoppingcart/Cart.php
deleted file mode 100644
index eaaf942..0000000
--- a/packages/shoppingcart/Cart.php
+++ /dev/null
@@ -1,686 +0,0 @@
-session = $session;
- $this->events = $events;
- $this->extraCosts = new Collection();
-
- $this->instance(self::DEFAULT_INSTANCE);
- }
-
- /**
- * Set the current cart instance.
- *
- * @param string|null $instance
- * @return Cart
- */
- public function instance($instance = null)
- {
- $instance = $instance ?: self::DEFAULT_INSTANCE;
-
- $this->instance = sprintf('%s.%s', 'cart', $instance);
-
- return $this;
- }
-
- /**
- * Get the current cart instance.
- *
- * @return string
- */
- public function currentInstance()
- {
- return str_replace('cart.', '', $this->instance);
- }
-
- /**
- * Add an item to the cart.
- *
- * @param mixed $id
- * @param mixed $name
- * @param int|float $qty
- * @param float $price
- * @param array $options
- * @return CartItem
- */
- public function add($id, $name = null, $qty = null, $price = null, array $options = [])
- {
- if ($this->isMulti($id)) {
- return array_map(function ($item) {
- return $this->add($item);
- }, $id);
- }
-
- $cartItem = $this->createCartItem($id, $name, $qty, $price, $options);
-
- $content = $this->getContent();
-
- if ($content->has($cartItem->rowId)) {
- $cartItem->qty += $content->get($cartItem->rowId)->qty;
- }
-
- $content->put($cartItem->rowId, $cartItem);
-
- $this->events->dispatch('cart.added', $cartItem);
-
- $this->session->put($this->instance, $content);
-
- return $cartItem;
- }
-
- /**
- * Sets/adds an additional cost on the cart.
- *
- * @param string $name
- * @param float $price
- * @todo add in session
- */
- public function addCost($name, $price)
- {
- $oldCost = $this->extraCosts->pull($name, 0);
-
- $this->extraCosts->put($name, $price + $oldCost);
- }
-
- /**
- * Gets an additional cost by name
- *
- * @param $name
- * @param int|null $decimals
- * @param string|null $decimalPoint
- * @param string|null $thousandSeparator
- * @return string
- */
- public function getCost($name)
- {
- $cost = $this->extraCosts->get($name, 0);
-
- return $this->numberFormat($cost);
- }
-
- /**
- * Update the cart item with the given rowId.
- *
- * @param string $rowId
- * @param mixed $qty
- * @return CartItem
- */
- public function update($rowId, $qty)
- {
- $cartItem = $this->get($rowId);
-
- if ($qty instanceof Buyable) {
- $cartItem->updateFromBuyable($qty);
- } elseif (is_array($qty)) {
- $cartItem->updateFromArray($qty);
- } else {
- $cartItem->qty = $qty;
- }
-
- $content = $this->getContent();
-
- if ($rowId !== $cartItem->rowId) {
- $content->pull($rowId);
-
- if ($content->has($cartItem->rowId)) {
- $existingCartItem = $this->get($cartItem->rowId);
- $cartItem->setQuantity($existingCartItem->qty + $cartItem->qty);
- }
- }
-
- if ($cartItem->qty <= 0) {
- $this->remove($cartItem->rowId);
- return;
- } else {
- $content->put($cartItem->rowId, $cartItem);
- }
-
- $this->events->dispatch('cart.updated', $cartItem);
-
- $this->session->put($this->instance, $content);
-
- return $cartItem;
- }
-
- /**
- * Remove the cart item with the given rowId from the cart.
- *
- * @param string $rowId
- * @return void
- */
- public function remove($rowId)
- {
- $cartItem = $this->get($rowId);
-
- $content = $this->getContent();
-
- $content->pull($cartItem->rowId);
-
- $this->events->dispatch('cart.removed', $cartItem);
-
- $this->session->put($this->instance, $content);
- }
-
- /**
- * Get a cart item from the cart by its rowId.
- *
- * @param string $rowId
- * @return CartItem
- */
- public function get($rowId)
- {
- $content = $this->getContent();
-
- if ( ! $content->has($rowId))
- throw new InvalidRowIDException("The cart does not contain rowId {$rowId}.");
-
- return $content->get($rowId);
- }
-
- /**
- * Destroy the current cart instance.
- *
- * @return void
- */
- public function destroy()
- {
- $this->session->remove($this->instance);
- }
-
- /**
- * Get the content of the cart.
- *
- * @return Collection
- */
- public function content()
- {
- if (is_null($this->session->get($this->instance))) {
- return new Collection();
- }
-
- return $this->session->get($this->instance);
- }
-
- /**
- * Get the number of items in the cart.
- *
- * @return int|float
- */
- public function count()
- {
- $content = $this->getContent();
-
- return $content->sum('qty');
- }
-
- /**
- * Get the total price of the items in the cart.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function total()
- {
- $content = $this->getContent();
-
- $total = $content->reduce(function ($total, CartItem $cartItem) {
- return $total + ($cartItem->qty * $cartItem->priceTax);
- }, 0);
-
- $totalCost = $this->extraCosts->reduce(function ($total, $cost) {
- return $total + $cost;
- }, 0);
-
- $total += $totalCost;
-
- return $this->numberFormat($total);
- }
-
- /**
- * Get the total tax of the items in the cart.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return float
- */
- public function tax()
- {
- $content = $this->getContent();
-
- $tax = $content->reduce(function ($tax, CartItem $cartItem) {
- return $tax + ($cartItem->qty * $cartItem->tax);
- }, 0);
-
- return $this->numberFormat($tax);
- }
-
- /**
- * Get the subtotal (total - tax) of the items in the cart.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return float
- */
- public function subtotal()
- {
- $content = $this->getContent();
-
- $subTotal = $content->reduce(function ($subTotal, CartItem $cartItem) {
- return $subTotal + ($cartItem->qty * $cartItem->price);
- }, 0);
-
- return $this->numberFormat($subTotal);
- }
-
- /**
- * Search the cart content for a cart item matching the given search closure.
- *
- * @param \Closure $search
- * @return Collection
- */
- public function search(Closure $search)
- {
- $content = $this->getContent();
-
- return $content->filter($search);
- }
-
- /**
- * Associate the cart item with the given rowId with the given model.
- *
- * @param string $rowId
- * @param mixed $model
- * @return void
- */
- public function associate($rowId, $model)
- {
- if(is_string($model) && ! class_exists($model)) {
- throw new UnknownModelException("The supplied model {$model} does not exist.");
- }
-
- $cartItem = $this->get($rowId);
-
- $cartItem->associate($model);
-
- $content = $this->getContent();
-
- $content->put($cartItem->rowId, $cartItem);
-
- $this->session->put($this->instance, $content);
- }
-
- /**
- * Set the tax rate for the cart item with the given rowId.
- *
- * @param string $rowId
- * @param int|float $taxRate
- * @return void
- */
- public function setTax($rowId, $taxRate)
- {
- $cartItem = $this->get($rowId);
-
- $cartItem->setTaxRate($taxRate);
-
- $content = $this->getContent();
-
- $content->put($cartItem->rowId, $cartItem);
-
- $this->session->put($this->instance, $content);
- }
-
- /**
- * Store an the current instance of the cart.
- *
- * @param mixed $identifier
- * @return void
- */
- public function store($identifier)
- {
- $content = $this->getContent();
-
- if ($identifier instanceof InstanceIdentifier) {
- $identifier = $identifier->getInstanceIdentifier();
- }
-
- $instance = $this->currentInstance();
-
- if ($this->storedCartInstanceWithIdentifierExists($instance, $identifier)) {
- throw new CartAlreadyStoredException("A cart with identifier {$identifier} was already stored.");
- }
-
- $this->getConnection()->table($this->getTableName())->insert([
- 'identifier' => $identifier,
- 'instance' => $instance,
- 'content' => serialize($content),
- 'created_at' => $this->createdAt ?: Carbon::now(),
- 'updated_at' => Carbon::now(),
- ]);
-
- $this->events->dispatch('cart.stored');
-
- }
-
- /**
- * @param $identifier
- *
- * @return bool
- */
- private function storedCartInstanceWithIdentifierExists($instance, $identifier)
- {
- return $this->getConnection()->table($this->getTableName())->where(['identifier' => $identifier, 'instance'=> $instance])->exists();
- }
-
-
- /**
- * Restore the cart with the given identifier.
- *
- * @param mixed $identifier
- * @return void
- */
- public function restore($identifier)
- {
- if ($identifier instanceof InstanceIdentifier) {
- $identifier = $identifier->getInstanceIdentifier();
- }
-
- $currentInstance = $this->currentInstance();
-
- if (!$this->storedCartInstanceWithIdentifierExists($currentInstance, $identifier)) {
- return;
- }
-
- $stored = $this->getConnection()->table($this->getTableName())
- ->where(['identifier'=> $identifier, 'instance' => $currentInstance])->first();
-
- $storedContent = unserialize(data_get($stored, 'content'));
-
- $this->instance(data_get($stored, 'instance'));
-
- $content = $this->getContent();
-
- foreach ($storedContent as $cartItem) {
- $content->put($cartItem->rowId, $cartItem);
- }
-
- $this->events->dispatch('cart.restored');
-
- $this->session->put($this->instance, $content);
-
- $this->instance($currentInstance);
-
- $this->createdAt = Carbon::parse(data_get($stored, 'created_at'));
- $this->updatedAt = Carbon::parse(data_get($stored, 'updated_at'));
-
- $this->getConnection()->table($this->getTableName())->where(['identifier' => $identifier, 'instance' => $currentInstance])->delete();
-
- }
-
- /**
- * Merges the contents of another cart into this cart.
- *
- * @param mixed $identifier Identifier of the Cart to merge with.
- * @param bool $keepDiscount Keep the discount of the CartItems.
- * @param bool $keepTax Keep the tax of the CartItems.
- * @param bool $dispatchAdd Flag to dispatch the add events.
- *
- * @return bool
- */
- public function merge($identifier, $keepTax = false, $dispatchAdd = true, $instance = self::DEFAULT_INSTANCE)
- {
- if (!$this->storedCartInstanceWithIdentifierExists($instance, $identifier)) {
- return false;
- }
-
- $stored = $this->getConnection()->table($this->getTableName())
- ->where(['identifier'=> $identifier, 'instance'=> $instance])->first();
-
- $storedContent = unserialize($stored->content);
-
- foreach ($storedContent as $cartItem) {
- $this->addCartItem($cartItem, $keepTax, $dispatchAdd);
- }
-
- $this->events->dispatch('cart.merged');
-
- return true;
- }
-
- /**
- * Add an item to the cart.
- *
- * @param \Gloudemans\Shoppingcart\CartItem $item Item to add to the Cart
- * @param bool $keepDiscount Keep the discount rate of the Item
- * @param bool $keepTax Keep the Tax rate of the Item
- * @param bool $dispatchEvent
- *
- * @return \Gloudemans\Shoppingcart\CartItem The CartItem
- */
- public function addCartItem($item, $keepTax = false, $dispatchEvent = true)
- {
- if (!$keepTax) {
- $item->setTaxRate($this->taxRate);
- }
-
- $content = $this->getContent();
-
- if ($content->has($item->rowId)) {
- $item->qty += $content->get($item->rowId)->qty;
- }
-
- $content->put($item->rowId, $item);
-
- if ($dispatchEvent) {
- $this->events->dispatch('cart.adding', $item);
- }
-
- $this->session->put($this->instance, $content);
-
- if ($dispatchEvent) {
- $this->events->dispatch('cart.added', $item);
- }
-
- return $item;
- }
-
- /**
- * Magic method to make accessing the total, tax and subtotal properties possible.
- *
- * @param string $attribute
- * @return float|null
- */
- public function __get($attribute)
- {
- if($attribute === 'total') {
- return $this->total();
- }
-
- if($attribute === 'tax') {
- return $this->tax();
- }
-
- if($attribute === 'subtotal') {
- return $this->subtotal();
- }
-
- return null;
- }
-
- /**
- * Get the carts content, if there is no cart content set yet, return a new empty Collection
- *
- * @return Collection
- */
- protected function getContent()
- {
- $content = $this->session->has($this->instance)
- ? $this->session->get($this->instance)
- : new Collection;
-
- return $content;
- }
-
- /**
- * Create a new CartItem from the supplied attributes.
- *
- * @param mixed $id
- * @param mixed $name
- * @param int|float $qty
- * @param float $price
- * @param array $options
- * @return CartItem
- */
- private function createCartItem($id, $name, $qty, $price, array $options)
- {
- if ($id instanceof Buyable) {
- $cartItem = CartItem::fromBuyable($id, $qty ?: []);
- $cartItem->setQuantity($name ?: 1);
- $cartItem->associate($id);
- } elseif (is_array($id)) {
- $cartItem = CartItem::fromArray($id);
- $cartItem->setQuantity($id['qty']);
- } else {
- $cartItem = CartItem::fromAttributes($id, $name, $price, $options);
- $cartItem->setQuantity($qty);
- }
-
- $cartItem->setTaxRate(config('cart.tax'));
-
- return $cartItem;
- }
-
- /**
- * Check if the item is a multidimensional array or an array of Buyables.
- *
- * @param mixed $item
- * @return bool
- */
- private function isMulti($item)
- {
- if ( ! is_array($item)) return false;
-
- return is_array(head($item)) || head($item) instanceof Buyable;
- }
-
- /**
- * @param $identifier
- * @return bool
- */
- private function storedCartWithIdentifierExists($identifier)
- {
- return $this->getConnection()->table($this->getTableName())->where('identifier', $identifier)->exists();
- }
-
- /**
- * Get the database connection.
- *
- * @return Connection
- */
- private function getConnection()
- {
- $connectionName = $this->getConnectionName();
-
- return app(DatabaseManager::class)->connection($connectionName);
- }
-
- /**
- * Get the database table name.
- *
- * @return string
- */
- private function getTableName()
- {
- return 'shopping_cart';
- }
-
- /**
- * Get the database connection name.
- *
- * @return string
- */
- private function getConnectionName()
- {
- $connection = config('cart.database.connection');
-
- return is_null($connection) ? config('database.default') : $connection;
- }
-
- /**
- * Get the Formated number
- *
- * @param $value
- * @param $decimals
- * @param $decimalPoint
- * @param $thousandSeparator
- * @return string
- */
- private function numberFormat($value)
- {
- $decimals = is_null(config('cart.format.decimals')) ? 2 : config('cart.format.decimals');
- $decimalPoint = is_null(config('cart.format.decimal_point')) ? '.' : config('cart.format.decimal_point');
- $thousandSeparator = '';
-
- return number_format($value, $decimals, $decimalPoint, $thousandSeparator);
- }
-}
diff --git a/packages/shoppingcart/CartItem.php b/packages/shoppingcart/CartItem.php
deleted file mode 100644
index 4e74020..0000000
--- a/packages/shoppingcart/CartItem.php
+++ /dev/null
@@ -1,386 +0,0 @@
-id = $id;
- $this->name = $name;
- $this->price = floatval($price);
- $this->options = new CartItemOptions($options);
- $this->rowId = $this->generateRowId($id, $options);
- }
-
- /**
- * Returns the formatted price without TAX.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function price()
- {
- return $this->numberFormat($this->price);
- }
-
- /**
- * Returns the formatted price with TAX.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function priceTax()
- {
- return $this->numberFormat($this->priceTax);
- }
-
- /**
- * Returns the formatted subtotal.
- * Subtotal is price for whole CartItem without TAX
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function subtotal()
- {
- return $this->numberFormat($this->subtotal);
- }
-
- /**
- * Returns the formatted total.
- * Total is price for whole CartItem with TAX
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function total()
- {
- return $this->numberFormat($this->total);
- }
-
- /**
- * Returns the formatted tax.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function tax()
- {
- return $this->numberFormat($this->tax);
- }
-
- /**
- * Returns the formatted tax.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- public function taxTotal()
- {
- return $this->numberFormat($this->taxTotal);
- }
-
- /**
- * Set the quantity for this cart item.
- *
- * @param int|float $qty
- */
- public function setQuantity($qty)
- {
- if(empty($qty) || ! is_numeric($qty))
- throw new \InvalidArgumentException('Please supply a valid quantity.');
-
- $this->qty = $qty;
- }
-
- /**
- * Update the cart item from a Buyable.
- *
- * @param Buyable $item
- * @return void
- */
- public function updateFromBuyable(Buyable $item)
- {
- $this->id = $item->getBuyableIdentifier($this->options);
- $this->name = $item->getBuyableDescription($this->options);
- $this->price = $item->getBuyablePrice($this->options);
- $this->priceTax = $this->price + $this->tax;
- }
-
- /**
- * Update the cart item from an array.
- *
- * @param array $attributes
- * @return void
- */
- public function updateFromArray(array $attributes)
- {
- $this->id = Arr::get($attributes, 'id', $this->id);
- $this->qty = Arr::get($attributes, 'qty', $this->qty);
- $this->name = Arr::get($attributes, 'name', $this->name);
- $this->price = Arr::get($attributes, 'price', $this->price);
- $this->priceTax = $this->price + $this->tax;
- $this->options = new CartItemOptions(Arr::get($attributes, 'options', $this->options));
-
- $this->rowId = $this->generateRowId($this->id, $this->options->all());
- }
-
- /**
- * Associate the cart item with the given model.
- *
- * @param mixed $model
- * @return CartItem
- */
- public function associate($model)
- {
- $this->associatedModel = is_string($model) ? $model : get_class($model);
-
- return $this;
- }
-
- /**
- * Set the tax rate.
- *
- * @param int|float $taxRate
- * @return CartItem
- */
- public function setTaxRate($taxRate)
- {
- $this->taxRate = $taxRate;
-
- return $this;
- }
-
- /**
- * Get an attribute from the cart item or get the associated model.
- *
- * @param string $attribute
- * @return mixed
- */
- public function __get($attribute)
- {
- if(property_exists($this, $attribute)) {
- return $this->{$attribute};
- }
-
- if($attribute === 'priceTax') {
- return number_format($this->price + $this->tax, 2, '.', '');
- }
-
- if($attribute === 'subtotal') {
- return number_format($this->qty * $this->price, 2, '.', '');
- }
-
- if($attribute === 'total') {
- return number_format($this->qty * $this->priceTax, 2, '.', '');
- }
-
- if($attribute === 'tax') {
- return number_format($this->price * ($this->taxRate / 100), 2, '.', '');
- }
-
- if($attribute === 'taxTotal') {
- return number_format($this->tax * $this->qty, 2, '.', '');
- }
-
- if($attribute === 'model' && isset($this->associatedModel)) {
- return with(new $this->associatedModel)->find($this->id);
- }
-
- return null;
- }
-
- /**
- * Create a new instance from a Buyable.
- *
- * @param Buyable $item
- * @param array $options
- * @return CartItem
- */
- public static function fromBuyable(Buyable $item, array $options = [])
- {
- return new self($item->getBuyableIdentifier($options), $item->getBuyableDescription($options), $item->getBuyablePrice($options), $options);
- }
-
- /**
- * Create a new instance from the given array.
- *
- * @param array $attributes
- * @return CartItem
- */
- public static function fromArray(array $attributes)
- {
- $options = Arr::get($attributes, 'options', []);
-
- return new self($attributes['id'], $attributes['name'], $attributes['price'], $options);
- }
-
- /**
- * Create a new instance from the given attributes.
- *
- * @param int|string $id
- * @param string $name
- * @param float $price
- * @param array $options
- * @return CartItem
- */
- public static function fromAttributes($id, $name, $price, array $options = [])
- {
- return new self($id, $name, $price, $options);
- }
-
- /**
- * Generate a unique id for the cart item.
- *
- * @param string $id
- * @param array $options
- * @return string
- */
- protected function generateRowId($id, array $options)
- {
- ksort($options);
-
- return md5($id . serialize($options));
- }
-
- /**
- * Get the instance as an array.
- *
- * @return array
- */
- public function toArray()
- {
- return [
- 'rowId' => $this->rowId,
- 'id' => $this->id,
- 'name' => $this->name,
- 'qty' => $this->qty,
- 'price' => $this->price,
- 'options' => $this->options->toArray(),
- 'tax' => $this->tax,
- 'subtotal' => $this->subtotal
- ];
- }
-
- /**
- * Convert the object to its JSON representation.
- *
- * @param int $options
- * @return string
- */
- public function toJson($options = 0)
- {
- return json_encode($this->toArray(), $options);
- }
-
- /**
- * Get the formatted number.
- *
- * @param float $value
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeparator
- * @return string
- */
- private function numberFormat($value)
- {
- $decimals = is_null(config('cart.format.decimals')) ? 2 : config('cart.format.decimals');
- $decimalPoint = is_null(config('cart.format.decimal_point')) ? '.' : config('cart.format.decimal_point');
- $thousandSeparator = '';
-
- return number_format($value, $decimals, $decimalPoint, $thousandSeparator);
- }
-}
diff --git a/packages/shoppingcart/CartItemOptions.php b/packages/shoppingcart/CartItemOptions.php
deleted file mode 100644
index 18b9552..0000000
--- a/packages/shoppingcart/CartItemOptions.php
+++ /dev/null
@@ -1,19 +0,0 @@
-get($key);
- }
-}
\ No newline at end of file
diff --git a/packages/shoppingcart/Contracts/Buyable.php b/packages/shoppingcart/Contracts/Buyable.php
deleted file mode 100644
index aeb9509..0000000
--- a/packages/shoppingcart/Contracts/Buyable.php
+++ /dev/null
@@ -1,27 +0,0 @@
-app->bind('cart', 'Gloudemans\Shoppingcart\Cart');
-
- $config = __DIR__ . '/../config/cart.php';
- $this->mergeConfigFrom($config, 'cart');
-
- $this->publishes([__DIR__ . '/../config/cart.php' => config_path('cart.php')], 'config');
-
- $this->app['events']->listen(Logout::class, function () {
- if ($this->app['config']->get('cart.destroy_on_logout')) {
- $this->app->make(SessionManager::class)->forget('cart');
- }
- });
-
- if ( ! class_exists('CreateShoppingcartTable')) {
- // Publish the migration
- $timestamp = date('Y_m_d_His', time());
-
- $this->publishes([
- __DIR__ . '/../database/migrations/0000_00_00_000000_create_shopping_cart_table.php' => database_path('migrations/'.$timestamp.'_create_shoppingcart_table.php'),
- ], 'migrations');
- }
- }
-}
diff --git a/packages/shoppingcart/_info/LICENSE b/packages/shoppingcart/_info/LICENSE
deleted file mode 100644
index 61c6afc..0000000
--- a/packages/shoppingcart/_info/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Rob Gloudemans
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/packages/shoppingcart/_info/README.md b/packages/shoppingcart/_info/README.md
deleted file mode 100644
index de8f5ab..0000000
--- a/packages/shoppingcart/_info/README.md
+++ /dev/null
@@ -1,477 +0,0 @@
-## LaravelShoppingcart
-
-A simple shopping cart implementation for Laravel 7 & 8 & 9 & 10.
-
-## Installation
-
-Install the package through [Composer](http://getcomposer.org/).
-
-Run the Composer require command from the Terminal:
-
- composer require mindscms/laravelshoppingcart
-
-### Laravel <= 7.0
-
-Should you still be on version 7.0 of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your `config/app.php` file.
-
-Add a new line to the `providers` array:
-
- Gloudemans\Shoppingcart\ShoppingcartServiceProvider::class
-
-And optionally add a new line to the `aliases` array:
-
- 'Cart' => Gloudemans\Shoppingcart\Facades\Cart::class,
-
-Now you're ready to start using the shopping cart in your application.
-
-**As of version 2 of this package it's possibly to use dependency injection to inject an instance of the Cart class into your controller or other class**
-
-## Overview
-Look at one of the following topics to learn more about LaravelShoppingcart
-
-* [Usage](#usage)
-* [Collections](#collections)
-* [Instances](#instances)
-* [Models](#models)
-* [Database](#database)
-* [Exceptions](#exceptions)
-* [Events](#events)
-* [Example](#example)
-
-## Usage
-
-The shoppingcart gives you the following methods to use:
-
-### Cart::add()
-
-Adding an item to the cart is really simple, you just use the `add()` method, which accepts a variety of parameters.
-
-In its most basic form you can specify the id, name, quantity, price of the product you'd like to add to the cart.
-
-```php
-Cart::add('293ad', 'Product 1', 1, 9.99);
-```
-
-As an optional fifth parameter you can pass it options, so you can add multiple items with the same id, but with (for instance) a different size.
-
-```php
-Cart::add('293ad', 'Product 1', 1, 9.99, ['size' => 'large']);
-```
-
-**The `add()` method will return an CartItem instance of the item you just added to the cart.**
-
-Maybe you prefer to add the item using an array? As long as the array contains the required keys, you can pass it to the method. The options key is optional.
-
-```php
-Cart::add(['id' => '293ad', 'name' => 'Product 1', 'qty' => 1, 'price' => 9.99, 'options' => ['size' => 'large']]);
-```
-
-New in version 2 of the package is the possibility to work with the `Buyable` interface. The way this works is that you have a model implement the `Buyable` interface, which will make you implement a few methods so the package knows how to get the id, name and price from your model.
-This way you can just pass the `add()` method a model and the quantity and it will automatically add it to the cart.
-
-**As an added bonus it will automatically associate the model with the CartItem**
-
-```php
-Cart::add($product, 1, ['size' => 'large']);
-```
-As an optional third parameter you can add options.
-```php
-Cart::add($product, 1, ['size' => 'large']);
-```
-
-Finally, you can also add multipe items to the cart at once.
-You can just pass the `add()` method an array of arrays, or an array of Buyables and they will be added to the cart.
-
-**When adding multiple items to the cart, the `add()` method will return an array of CartItems.**
-
-```php
-Cart::add([
- ['id' => '293ad', 'name' => 'Product 1', 'qty' => 1, 'price' => 10.00],
- ['id' => '4832k', 'name' => 'Product 2', 'qty' => 1, 'price' => 10.00, 'options' => ['size' => 'large']]
-]);
-
-Cart::add([$product1, $product2]);
-
-```
-
-### Cart::update()
-
-To update an item in the cart, you'll first need the rowId of the item.
-Next you can use the `update()` method to update it.
-
-If you simply want to update the quantity, you'll pass the update method the rowId and the new quantity:
-
-```php
-$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';
-
-Cart::update($rowId, 2); // Will update the quantity
-```
-
-If you want to update more attributes of the item, you can either pass the update method an array or a `Buyable` as the second parameter. This way you can update all information of the item with the given rowId.
-
-```php
-Cart::update($rowId, ['name' => 'Product 1']); // Will update the name
-
-Cart::update($rowId, $product); // Will update the id, name and price
-
-```
-
-### Cart::remove()
-
-To remove an item for the cart, you'll again need the rowId. This rowId you simply pass to the `remove()` method and it will remove the item from the cart.
-
-```php
-$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';
-
-Cart::remove($rowId);
-```
-
-### Cart::get()
-
-If you want to get an item from the cart using its rowId, you can simply call the `get()` method on the cart and pass it the rowId.
-
-```php
-$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';
-
-Cart::get($rowId);
-```
-
-### Cart::content()
-
-Of course you also want to get the carts content. This is where you'll use the `content` method. This method will return a Collection of CartItems which you can iterate over and show the content to your customers.
-
-```php
-Cart::content();
-```
-
-This method will return the content of the current cart instance, if you want the content of another instance, simply chain the calls.
-
-```php
-Cart::instance('wishlist')->content();
-```
-
-### Cart::destroy()
-
-If you want to completely remove the content of a cart, you can call the destroy method on the cart. This will remove all CartItems from the cart for the current cart instance.
-
-```php
-Cart::destroy();
-```
-
-### Cart::total()
-
-The `total()` method can be used to get the calculated total of all items in the cart, given there price and quantity. Includes any additional costs too.
-
-```php
-Cart::total();
-```
-
-The method will automatically format the result, which you can tweak using the three optional parameters
-
-```php
-Cart::total($decimals, $decimalSeperator, $thousandSeperator);
-```
-
-You can set the default number format in the config file.
-
-**If you're not using the Facade, but use dependency injection in your (for instance) Controller, you can also simply get the total property `$cart->total`**
-
-### Cart::tax()
-
-The `tax()` method can be used to get the calculated amount of tax for all items in the cart, given there price and quantity.
-
-```php
-Cart::tax();
-```
-
-The method will automatically format the result, which you can tweak using the three optional parameters
-
-```php
-Cart::tax($decimals, $decimalSeperator, $thousandSeperator);
-```
-
-You can set the default number format in the config file.
-
-**If you're not using the Facade, but use dependency injection in your (for instance) Controller, you can also simply get the tax property `$cart->tax`**
-
-### Cart::subtotal()
-
-The `subtotal()` method can be used to get the total of all items in the cart, minus the total amount of tax.
-
-```php
-Cart::subtotal();
-```
-
-The method will automatically format the result, which you can tweak using the three optional parameters
-
-```php
-Cart::subtotal($decimals, $decimalSeperator, $thousandSeperator);
-```
-
-You can set the default number format in the config file.
-
-**If you're not using the Facade, but use dependency injection in your (for instance) Controller, you can also simply get the subtotal property `$cart->subtotal`**
-
-### Cart::count()
-
-If you want to know how many items there are in your cart, you can use the `count()` method. This method will return the total number of items in the cart. So if you've added 2 books and 1 shirt, it will return 3 items.
-
-```php
-Cart::count();
-```
-
-### Cart::search()
-
-To find an item in the cart, you can use the `search()` method.
-
-**This method was changed on version 2**
-
-Behind the scenes, the method simply uses the filter method of the Laravel Collection class. This means you must pass it a Closure in which you'll specify you search terms.
-
-If you for instance want to find all items with an id of 1:
-
-```php
-$cart->search(function ($cartItem, $rowId) {
- return $cartItem->id === 1;
-});
-```
-
-As you can see the Closure will receive two parameters. The first is the CartItem to perform the check against. The second parameter is the rowId of this CartItem.
-
-**The method will return a Collection containing all CartItems that where found**
-
-This way of searching gives you total control over the search process and gives you the ability to create very precise and specific searches.
-
-### Cart::addCost()
-
-If you want to add additional costs to the cart you can use the `addCost()` method. The method accepts a cost name and the price of the cost. This can be used for eg shipping or transaction costs.
-
-```php
-Cart::addCost($name, $price)
-```
-
-**Add this method before summarizing the whole cart. The costs are not saved in the session (yet).**
-
-### Cart::getCost()
-
-Get an addition cost you added by `addCost()`. Accepts the cost name. Returns the formatted price of the cost.
-
-```php
-Cart::getCost($name, $decimals, $decimalPoint, $thousandSeperator)
-```
-
-## Collections
-
-On multiple instances the Cart will return to you a Collection. This is just a simple Laravel Collection, so all methods you can call on a Laravel Collection are also available on the result.
-
-As an example, you can quicky get the number of unique products in a cart:
-
-```php
-Cart::content()->count();
-```
-
-Or you can group the content by the id of the products:
-
-```php
-Cart::content()->groupBy('id');
-```
-
-## Instances
-
-The packages supports multiple instances of the cart. The way this works is like this:
-
-You can set the current instance of the cart by calling `Cart::instance('newInstance')`. From this moment, the active instance of the cart will be `newInstance`, so when you add, remove or get the content of the cart, you're work with the `newInstance` instance of the cart.
-If you want to switch instances, you just call `Cart::instance('otherInstance')` again, and you're working with the `otherInstance` again.
-
-So a little example:
-
-```php
-Cart::instance('shopping')->add('192ao12', 'Product 1', 1, 9.99);
-
-// Get the content of the 'shopping' cart
-Cart::content();
-
-Cart::instance('wishlist')->add('sdjk922', 'Product 2', 1, 19.95, ['size' => 'medium']);
-
-// Get the content of the 'wishlist' cart
-Cart::content();
-
-// If you want to get the content of the 'shopping' cart again
-Cart::instance('shopping')->content();
-
-// And the count of the 'wishlist' cart again
-Cart::instance('wishlist')->count();
-```
-
-**N.B. Keep in mind that the cart stays in the last set instance for as long as you don't set a different one during script execution.**
-
-**N.B.2 The default cart instance is called `default`, so when you're not using instances,`Cart::content();` is the same as `Cart::instance('default')->content()`.**
-
-## Models
-
-Because it can be very convenient to be able to directly access a model from a CartItem is it possible to associate a model with the items in the cart. Let's say you have a `Product` model in your application. With the `associate()` method, you can tell the cart that an item in the cart, is associated to the `Product` model.
-
-That way you can access your model right from the `CartItem`!
-
-The model can be accessed via the `model` property on the CartItem.
-
-**If your model implements the `Buyable` interface and you used your model to add the item to the cart, it will associate automatically.**
-
-Here is an example:
-
-```php
-
-// First we'll add the item to the cart.
-$cartItem = Cart::add('293ad', 'Product 1', 1, 9.99, ['size' => 'large']);
-
-// Next we associate a model with the item.
-Cart::associate($cartItem->rowId, 'Product');
-
-// Or even easier, call the associate method on the CartItem!
-$cartItem->associate('Product');
-
-// You can even make it a one-liner
-Cart::add('293ad', 'Product 1', 1, 9.99, ['size' => 'large'])->associate('Product');
-
-// Now, when iterating over the content of the cart, you can access the model.
-foreach(Cart::content() as $row) {
- echo 'You have ' . $row->qty . ' items of ' . $row->model->name . ' with description: "' . $row->model->description . '" in your cart.';
-}
-```
-## Database
-
-- [Config](#configuration)
-- [Storing the cart](#save-cart-to-database)
-- [Restoring the cart](#retrieve-cart-from-database)
-
-### Configuration
-To save cart into the database so you can retrieve it later, the package needs to know which database connection to use and what the name of the table is.
-By default the package will use the default database connection and use a table named `shopping_cart`.
-If you want to change these options, you'll have to publish the `config` file.
-
- php artisan vendor:publish --provider="Gloudemans\Shoppingcart\ShoppingcartServiceProvider" --tag="config"
-
-This will give you a `cart.php` config file in which you can make the changes.
-
-To make your life easy, the package also includes a ready to use `migration` which you can publish by running:
-
- php artisan vendor:publish --provider="Gloudemans\Shoppingcart\ShoppingcartServiceProvider" --tag="migrations"
-
-This will place a `shopping_cart` table's migration file into `database/migrations` directory. Now all you have to do is run `php artisan migrate` to migrate your database.
-
-### Storing the cart
-To store your cart instance into the database, you have to call the `store($identifier) ` method. Where `$identifier` is a random key, for instance the id or username of the user.
-
- Cart::store('username');
-
- // To store a cart instance named 'wishlist'
- Cart::instance('wishlist')->store('username');
-
-### Restoring the cart
-If you want to retrieve the cart from the database and restore it, all you have to do is call the `restore($identifier)` where `$identifier` is the key you specified for the `store` method.
-
- Cart::restore('username');
-
- // To restore a cart instance named 'wishlist'
- Cart::instance('wishlist')->restore('username');
-
-## Exceptions
-
-The Cart package will throw exceptions if something goes wrong. This way it's easier to debug your code using the Cart package or to handle the error based on the type of exceptions. The Cart packages can throw the following exceptions:
-
-| Exception | Reason |
-| ---------------------------- | ---------------------------------------------------------------------------------- |
-| *CartAlreadyStoredException* | When trying to store a cart that was already stored using the specified identifier |
-| *InvalidRowIDException* | When the rowId that got passed doesn't exists in the current cart instance |
-| *UnknownModelException* | When you try to associate an none existing model to a CartItem. |
-
-## Events
-
-The cart also has events build in. There are five events available for you to listen for.
-
-| Event | Fired | Parameter |
-| ------------- | ---------------------------------------- | -------------------------------- |
-| cart.added | When an item was added to the cart. | The `CartItem` that was added. |
-| cart.updated | When an item in the cart was updated. | The `CartItem` that was updated. |
-| cart.removed | When an item is removed from the cart. | The `CartItem` that was removed. |
-| cart.stored | When the content of a cart was stored. | - |
-| cart.restored | When the content of a cart was restored. | - |
-
-## Example
-
-Below is a little example of how to list the cart content in a table:
-
-```php
-
-// Add some items in your Controller.
-Cart::add('192ao12', 'Product 1', 1, 9.99);
-Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']);
-
-// Set an additional cost (on the same page where you display your cart content)
-Cart::addCost(Cart::COST_TRANSACTION, 0.10);
-Cart::addCost(Cart::COST_SHIPPING, 5.00);
-Cart::addCost('somethingelse', 1.11);
-
-// Display the content in a View.
-
-```
diff --git a/packages/shoppingcart/_info/_composer.json b/packages/shoppingcart/_info/_composer.json
deleted file mode 100644
index ee51015..0000000
--- a/packages/shoppingcart/_info/_composer.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "mindscms/laravelshoppingcart",
- "description": "Laravel Shopping cart",
- "keywords": ["laravel", "shoppingcart"],
- "license": "MIT",
- "authors": [
- {
- "name": "Rob Gloudemans",
- "email": "info@robgloudemans.nl"
- },
- {
- "name": "Michael V.",
- "email": "michael@michaelbelgium.me"
- },
- {
- "name": "Sami Mansour",
- "email": "mindscms@gmail.com"
- }
- ],
- "require": {
- "illuminate/support": "^7.0|^8.0|^9.0|^10.0",
- "illuminate/session": "^7.0|^8.0|^9.0|^10.0",
- "illuminate/events": "^7.0|^8.0|^9.0|^10.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.5|^10.1",
- "mockery/mockery": "^1.4",
- "orchestra/testbench": "^7"
- },
- "autoload": {
- "psr-4": {
- "Gloudemans\\Shoppingcart\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Gloudemans\\Tests\\Shoppingcart\\": "tests/"
- }
- },
- "minimum-stability": "stable",
- "extra": {
- "laravel": {
- "providers": [
- "Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider"
- ],
- "aliases": {
- "Cart": "Gloudemans\\Shoppingcart\\Facades\\Cart"
- }
- }
- }
-}
diff --git a/packages/shoppingcart/_info/phpunit.xml b/packages/shoppingcart/_info/phpunit.xml
deleted file mode 100644
index f994f39..0000000
--- a/packages/shoppingcart/_info/phpunit.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- ./tests/
-
-
-
\ No newline at end of file
diff --git a/packages/shoppingcart/_info/tests/CartAssertions.php b/packages/shoppingcart/_info/tests/CartAssertions.php
deleted file mode 100644
index c351f40..0000000
--- a/packages/shoppingcart/_info/tests/CartAssertions.php
+++ /dev/null
@@ -1,35 +0,0 @@
-count();
-
- PHPUnit::assertEquals($items, $cart->count(), "Expected the cart to contain {$items} items, but got {$actual}.");
- }
-
- /**
- * Assert that the cart contains the given number of rows.
- *
- * @param int $rows
- * @param \Gloudemans\Shoppingcart\Cart $cart
- */
- public function assertRowsInCart($rows, Cart $cart)
- {
- $actual = $cart->content()->count();
-
- PHPUnit::assertCount($rows, $cart->content(), "Expected the cart to contain {$rows} rows, but got {$actual}.");
- }
-}
diff --git a/packages/shoppingcart/_info/tests/CartItemTest.php b/packages/shoppingcart/_info/tests/CartItemTest.php
deleted file mode 100644
index ac0bdf4..0000000
--- a/packages/shoppingcart/_info/tests/CartItemTest.php
+++ /dev/null
@@ -1,55 +0,0 @@
- 'XL', 'color' => 'red']);
- $cartItem->setQuantity(2);
-
- $this->assertEquals([
- 'id' => 1,
- 'name' => 'Some item',
- 'price' => 10.00,
- 'rowId' => '07d5da5550494c62daf9993cf954303f',
- 'qty' => 2,
- 'options' => [
- 'size' => 'XL',
- 'color' => 'red'
- ],
- 'tax' => 0,
- 'subtotal' => 20.00,
- ], $cartItem->toArray());
- }
-
- /** @test */
- public function it_can_be_cast_to_json()
- {
- $cartItem = new CartItem(1, 'Some item', 10.00, ['size' => 'XL', 'color' => 'red']);
- $cartItem->setQuantity(2);
-
- $this->assertJson($cartItem->toJson());
-
- $json = '{"rowId":"07d5da5550494c62daf9993cf954303f","id":1,"name":"Some item","qty":2,"price":10,"options":{"size":"XL","color":"red"},"tax":"0.00","subtotal":"20.00"}';
-
- $this->assertEquals($json, $cartItem->toJson());
- }
-}
\ No newline at end of file
diff --git a/packages/shoppingcart/_info/tests/CartTest.php b/packages/shoppingcart/_info/tests/CartTest.php
deleted file mode 100644
index ae2f878..0000000
--- a/packages/shoppingcart/_info/tests/CartTest.php
+++ /dev/null
@@ -1,945 +0,0 @@
-set('cart.database.connection', 'testing');
-
- $app['config']->set('session.driver', 'array');
-
- $app['config']->set('database.default', 'testing');
- $app['config']->set('database.connections.testing', [
- 'driver' => 'sqlite',
- 'database' => ':memory:',
- 'prefix' => '',
- ]);
- }
-
- /**
- * Setup the test environment.
- *
- * @return void
- */
- protected function setUp()
- {
- parent::setUp();
-
- $this->app->afterResolving('migrator', function ($migrator) {
- $migrator->path(realpath(__DIR__.'/../database/migrations'));
- });
- }
-
- /** @test */
- public function it_has_a_default_instance()
- {
- $cart = $this->getCart();
-
- $this->assertEquals(Cart::DEFAULT_INSTANCE, $cart->currentInstance());
- }
-
- /** @test */
- public function it_can_have_multiple_instances()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'First item'));
-
- $cart->instance('wishlist')->add(new BuyableProduct(2, 'Second item'));
-
- $this->assertItemsInCart(1, $cart->instance(Cart::DEFAULT_INSTANCE));
- $this->assertItemsInCart(1, $cart->instance('wishlist'));
- }
-
- /** @test */
- public function it_can_add_an_item()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $this->assertEquals(1, $cart->count());
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_will_return_the_cartitem_of_the_added_item()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cartItem = $cart->add(new BuyableProduct);
-
- $this->assertInstanceOf(CartItem::class, $cartItem);
- $this->assertEquals('027c91341fd5cf4d2579b49c4b6a90da', $cartItem->rowId);
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_can_add_multiple_buyable_items_at_once()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add([new BuyableProduct(1), new BuyableProduct(2)]);
-
- $this->assertEquals(2, $cart->count());
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_will_return_an_array_of_cartitems_when_you_add_multiple_items_at_once()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cartItems = $cart->add([new BuyableProduct(1), new BuyableProduct(2)]);
-
- $this->assertTrue(is_array($cartItems));
- $this->assertCount(2, $cartItems);
- $this->assertContainsOnlyInstancesOf(CartItem::class, $cartItems);
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_can_add_an_item_from_attributes()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(1, 'Test item', 1, 10.00);
-
- $this->assertEquals(1, $cart->count());
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_can_add_an_item_from_an_array()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(['id' => 1, 'name' => 'Test item', 'qty' => 1, 'price' => 10.00]);
-
- $this->assertEquals(1, $cart->count());
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_can_add_multiple_array_items_at_once()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add([
- ['id' => 1, 'name' => 'Test item 1', 'qty' => 1, 'price' => 10.00],
- ['id' => 2, 'name' => 'Test item 2', 'qty' => 1, 'price' => 10.00]
- ]);
-
- $this->assertEquals(2, $cart->count());
-
- Event::assertDispatched('cart.added');
- }
-
- /** @test */
- public function it_can_add_an_item_with_options()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $options = ['size' => 'XL', 'color' => 'red'];
-
- $cart->add(new BuyableProduct, 1, $options);
-
- $cartItem = $cart->get('07d5da5550494c62daf9993cf954303f');
-
- $this->assertInstanceOf(CartItem::class, $cartItem);
- $this->assertEquals('XL', $cartItem->options->size);
- $this->assertEquals('red', $cartItem->options->color);
-
- Event::assertDispatched('cart.added');
- }
-
- /**
- * @test
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Please supply a valid identifier.
- */
- public function it_will_validate_the_identifier()
- {
- $cart = $this->getCart();
-
- $cart->add(null, 'Some title', 1, 10.00);
- }
-
- /**
- * @test
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Please supply a valid name.
- */
- public function it_will_validate_the_name()
- {
- $cart = $this->getCart();
-
- $cart->add(1, null, 1, 10.00);
- }
-
- /**
- * @test
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Please supply a valid quantity.
- */
- public function it_will_validate_the_quantity()
- {
- $cart = $this->getCart();
-
- $cart->add(1, 'Some title', 'invalid', 10.00);
- }
-
- /**
- * @test
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Please supply a valid price.
- */
- public function it_will_validate_the_price()
- {
- $cart = $this->getCart();
-
- $cart->add(1, 'Some title', 1, 'invalid');
- }
-
- /** @test */
- public function it_will_update_the_cart_if_the_item_already_exists_in_the_cart()
- {
- $cart = $this->getCart();
-
- $item = new BuyableProduct;
-
- $cart->add($item);
- $cart->add($item);
-
- $this->assertItemsInCart(2, $cart);
- $this->assertRowsInCart(1, $cart);
- }
-
- /** @test */
- public function it_will_keep_updating_the_quantity_when_an_item_is_added_multiple_times()
- {
- $cart = $this->getCart();
-
- $item = new BuyableProduct;
-
- $cart->add($item);
- $cart->add($item);
- $cart->add($item);
-
- $this->assertItemsInCart(3, $cart);
- $this->assertRowsInCart(1, $cart);
- }
-
- /** @test */
- public function it_can_update_the_quantity_of_an_existing_item_in_the_cart()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->update('027c91341fd5cf4d2579b49c4b6a90da', 2);
-
- $this->assertItemsInCart(2, $cart);
- $this->assertRowsInCart(1, $cart);
-
- Event::assertDispatched('cart.updated');
- }
-
- /** @test */
- public function it_can_update_an_existing_item_in_the_cart_from_a_buyable()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->update('027c91341fd5cf4d2579b49c4b6a90da', new BuyableProduct(1, 'Different description'));
-
- $this->assertItemsInCart(1, $cart);
- $this->assertEquals('Different description', $cart->get('027c91341fd5cf4d2579b49c4b6a90da')->name);
-
- Event::assertDispatched('cart.updated');
- }
-
- /** @test */
- public function it_can_update_an_existing_item_in_the_cart_from_an_array()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->update('027c91341fd5cf4d2579b49c4b6a90da', ['name' => 'Different description']);
-
- $this->assertItemsInCart(1, $cart);
- $this->assertEquals('Different description', $cart->get('027c91341fd5cf4d2579b49c4b6a90da')->name);
-
- Event::assertDispatched('cart.updated');
- }
-
- /**
- * @test
- * @expectedException \Gloudemans\Shoppingcart\Exceptions\InvalidRowIDException
- */
- public function it_will_throw_an_exception_if_a_rowid_was_not_found()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->update('none-existing-rowid', new BuyableProduct(1, 'Different description'));
- }
-
- /** @test */
- public function it_will_regenerate_the_rowid_if_the_options_changed()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct, 1, ['color' => 'red']);
-
- $cart->update('ea65e0bdcd1967c4b3149e9e780177c0', ['options' => ['color' => 'blue']]);
-
- $this->assertItemsInCart(1, $cart);
- $this->assertEquals('7e70a1e9aaadd18c72921a07aae5d011', $cart->content()->first()->rowId);
- $this->assertEquals('blue', $cart->get('7e70a1e9aaadd18c72921a07aae5d011')->options->color);
- }
-
- /** @test */
- public function it_will_add_the_item_to_an_existing_row_if_the_options_changed_to_an_existing_rowid()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct, 1, ['color' => 'red']);
- $cart->add(new BuyableProduct, 1, ['color' => 'blue']);
-
- $cart->update('7e70a1e9aaadd18c72921a07aae5d011', ['options' => ['color' => 'red']]);
-
- $this->assertItemsInCart(2, $cart);
- $this->assertRowsInCart(1, $cart);
- }
-
- /** @test */
- public function it_can_remove_an_item_from_the_cart()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->remove('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertItemsInCart(0, $cart);
- $this->assertRowsInCart(0, $cart);
-
- Event::assertDispatched('cart.removed');
- }
-
- /** @test */
- public function it_will_remove_the_item_if_its_quantity_was_set_to_zero()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->update('027c91341fd5cf4d2579b49c4b6a90da', 0);
-
- $this->assertItemsInCart(0, $cart);
- $this->assertRowsInCart(0, $cart);
-
- Event::assertDispatched('cart.removed');
- }
-
- /** @test */
- public function it_will_remove_the_item_if_its_quantity_was_set_negative()
- {
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->update('027c91341fd5cf4d2579b49c4b6a90da', -1);
-
- $this->assertItemsInCart(0, $cart);
- $this->assertRowsInCart(0, $cart);
-
- Event::assertDispatched('cart.removed');
- }
-
- /** @test */
- public function it_can_get_an_item_from_the_cart_by_its_rowid()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertInstanceOf(CartItem::class, $cartItem);
- }
-
- /** @test */
- public function it_can_get_the_content_of_the_cart()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1));
- $cart->add(new BuyableProduct(2));
-
- $content = $cart->content();
-
- $this->assertInstanceOf(Collection::class, $content);
- $this->assertCount(2, $content);
- }
-
- /** @test */
- public function it_will_return_an_empty_collection_if_the_cart_is_empty()
- {
- $cart = $this->getCart();
-
- $content = $cart->content();
-
- $this->assertInstanceOf(Collection::class, $content);
- $this->assertCount(0, $content);
- }
-
- /** @test */
- public function it_will_include_the_tax_and_subtotal_when_converted_to_an_array()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1));
- $cart->add(new BuyableProduct(2));
-
- $content = $cart->content();
-
- $this->assertInstanceOf(Collection::class, $content);
- $this->assertEquals([
- '027c91341fd5cf4d2579b49c4b6a90da' => [
- 'rowId' => '027c91341fd5cf4d2579b49c4b6a90da',
- 'id' => 1,
- 'name' => 'Item name',
- 'qty' => 1,
- 'price' => 10.00,
- 'tax' => 2.10,
- 'subtotal' => 10.0,
- 'options' => [],
- ],
- '370d08585360f5c568b18d1f2e4ca1df' => [
- 'rowId' => '370d08585360f5c568b18d1f2e4ca1df',
- 'id' => 2,
- 'name' => 'Item name',
- 'qty' => 1,
- 'price' => 10.00,
- 'tax' => 2.10,
- 'subtotal' => 10.0,
- 'options' => [],
- ]
- ], $content->toArray());
- }
-
- /** @test */
- public function it_can_destroy_a_cart()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $this->assertItemsInCart(1, $cart);
-
- $cart->destroy();
-
- $this->assertItemsInCart(0, $cart);
- }
-
- /** @test */
- public function it_can_get_the_total_price_of_the_cart_content()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'First item', 10.00));
- $cart->add(new BuyableProduct(2, 'Second item', 25.00), 2);
-
- $this->assertItemsInCart(3, $cart);
- $this->assertEquals(60.00, $cart->subtotal());
- }
-
- /** @test */
- public function it_can_return_a_formatted_total()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'First item', 1000.00));
- $cart->add(new BuyableProduct(2, 'Second item', 2500.00), 2);
-
- $this->assertItemsInCart(3, $cart);
- $this->assertEquals('6.000,00', $cart->subtotal(2, ',', '.'));
- }
-
- /** @test */
- public function it_can_search_the_cart_for_a_specific_item()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some item'));
- $cart->add(new BuyableProduct(2, 'Another item'));
-
- $cartItem = $cart->search(function ($cartItem, $rowId) {
- return $cartItem->name == 'Some item';
- });
-
- $this->assertInstanceOf(Collection::class, $cartItem);
- $this->assertCount(1, $cartItem);
- $this->assertInstanceOf(CartItem::class, $cartItem->first());
- $this->assertEquals(1, $cartItem->first()->id);
- }
-
- /** @test */
- public function it_can_search_the_cart_for_multiple_items()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some item'));
- $cart->add(new BuyableProduct(2, 'Some item'));
- $cart->add(new BuyableProduct(3, 'Another item'));
-
- $cartItem = $cart->search(function ($cartItem, $rowId) {
- return $cartItem->name == 'Some item';
- });
-
- $this->assertInstanceOf(Collection::class, $cartItem);
- }
-
- /** @test */
- public function it_can_search_the_cart_for_a_specific_item_with_options()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some item'), 1, ['color' => 'red']);
- $cart->add(new BuyableProduct(2, 'Another item'), 1, ['color' => 'blue']);
-
- $cartItem = $cart->search(function ($cartItem, $rowId) {
- return $cartItem->options->color == 'red';
- });
-
- $this->assertInstanceOf(Collection::class, $cartItem);
- $this->assertCount(1, $cartItem);
- $this->assertInstanceOf(CartItem::class, $cartItem->first());
- $this->assertEquals(1, $cartItem->first()->id);
- }
-
- /** @test */
- public function it_will_associate_the_cart_item_with_a_model_when_you_add_a_buyable()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertContains(BuyableProduct::class, Assert::readAttribute($cartItem, 'associatedModel'));
- }
-
- /** @test */
- public function it_can_associate_the_cart_item_with_a_model()
- {
- $cart = $this->getCart();
-
- $cart->add(1, 'Test item', 1, 10.00);
-
- $cart->associate('027c91341fd5cf4d2579b49c4b6a90da', new ProductModel);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals(ProductModel::class, Assert::readAttribute($cartItem, 'associatedModel'));
- }
-
- /**
- * @test
- * @expectedException \Gloudemans\Shoppingcart\Exceptions\UnknownModelException
- * @expectedExceptionMessage The supplied model SomeModel does not exist.
- */
- public function it_will_throw_an_exception_when_a_non_existing_model_is_being_associated()
- {
- $cart = $this->getCart();
-
- $cart->add(1, 'Test item', 1, 10.00);
-
- $cart->associate('027c91341fd5cf4d2579b49c4b6a90da', 'SomeModel');
- }
-
- /** @test */
- public function it_can_get_the_associated_model_of_a_cart_item()
- {
- $cart = $this->getCart();
-
- $cart->add(1, 'Test item', 1, 10.00);
-
- $cart->associate('027c91341fd5cf4d2579b49c4b6a90da', new ProductModel);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertInstanceOf(ProductModel::class, $cartItem->model);
- $this->assertEquals('Some value', $cartItem->model->someValue);
- }
-
- /** @test */
- public function it_can_calculate_the_subtotal_of_a_cart_item()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 9.99), 3);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals(29.97, $cartItem->subtotal);
- }
-
- /** @test */
- public function it_can_return_a_formatted_subtotal()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 500), 3);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals('1.500,00', $cartItem->subtotal(2, ',', '.'));
- }
-
- /** @test */
- public function it_can_calculate_tax_based_on_the_default_tax_rate_in_the_config()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals(2.10, $cartItem->tax);
- }
-
- /** @test */
- public function it_can_calculate_tax_based_on_the_specified_tax()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1);
-
- $cart->setTax('027c91341fd5cf4d2579b49c4b6a90da', 19);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals(1.90, $cartItem->tax);
- }
-
- /** @test */
- public function it_can_return_the_calculated_tax_formatted()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 10000.00), 1);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals('2.100,00', $cartItem->tax(2, ',', '.'));
- }
-
- /** @test */
- public function it_can_calculate_the_total_tax_for_all_cart_items()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1);
- $cart->add(new BuyableProduct(2, 'Some title', 20.00), 2);
-
- $this->assertEquals(10.50, $cart->tax);
- }
-
- /** @test */
- public function it_can_return_formatted_total_tax()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 1000.00), 1);
- $cart->add(new BuyableProduct(2, 'Some title', 2000.00), 2);
-
- $this->assertEquals('1.050,00', $cart->tax(2, ',', '.'));
- }
-
- /** @test */
- public function it_can_return_the_subtotal()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1);
- $cart->add(new BuyableProduct(2, 'Some title', 20.00), 2);
-
- $this->assertEquals(50.00, $cart->subtotal);
- }
-
- /** @test */
- public function it_can_return_formatted_subtotal()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 1000.00), 1);
- $cart->add(new BuyableProduct(2, 'Some title', 2000.00), 2);
-
- $this->assertEquals('5000,00', $cart->subtotal(2, ',', ''));
- }
-
- /** @test */
- public function it_can_return_cart_formated_numbers_by_config_values()
- {
- $this->setConfigFormat(2, ',', '');
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 1000.00), 1);
- $cart->add(new BuyableProduct(2, 'Some title', 2000.00), 2);
-
- $this->assertEquals('5000,00', $cart->subtotal());
- $this->assertEquals('1050,00', $cart->tax());
- $this->assertEquals('6050,00', $cart->total());
-
- $this->assertEquals('5000,00', $cart->subtotal);
- $this->assertEquals('1050,00', $cart->tax);
- $this->assertEquals('6050,00', $cart->total);
- }
-
- /** @test */
- public function it_can_return_cartItem_formated_numbers_by_config_values()
- {
- $this->setConfigFormat(2, ',', '');
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'Some title', 2000.00), 2);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $this->assertEquals('2000,00', $cartItem->price());
- $this->assertEquals('2420,00', $cartItem->priceTax());
- $this->assertEquals('4000,00', $cartItem->subtotal());
- $this->assertEquals('4840,00', $cartItem->total());
- $this->assertEquals('420,00', $cartItem->tax());
- $this->assertEquals('840,00', $cartItem->taxTotal());
- }
-
- /** @test */
- public function it_can_store_the_cart_in_a_database()
- {
- $this->artisan('migrate', [
- '--database' => 'testing',
- ]);
-
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->store($identifier = 123);
-
- $serialized = serialize($cart->content());
-
- $this->assertDatabaseHas('shopping_cart', ['identifier' => $identifier, 'instance' => 'default', 'content' => $serialized]);
-
- Event::assertDispatched('cart.stored');
- }
-
- /**
- * @test
- * @expectedException \Gloudemans\Shoppingcart\Exceptions\CartAlreadyStoredException
- * @expectedExceptionMessage A cart with identifier 123 was already stored.
- */
- public function it_will_throw_an_exception_when_a_cart_was_already_stored_using_the_specified_identifier()
- {
- $this->artisan('migrate', [
- '--database' => 'testing',
- ]);
-
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->store($identifier = 123);
-
- $cart->store($identifier);
-
- Event::assertDispatched('cart.stored');
- }
-
- /** @test */
- public function it_can_restore_a_cart_from_the_database()
- {
- $this->artisan('migrate', [
- '--database' => 'testing',
- ]);
-
- Event::fake();
-
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct);
-
- $cart->store($identifier = 123);
-
- $cart->destroy();
-
- $this->assertItemsInCart(0, $cart);
-
- $cart->restore($identifier);
-
- $this->assertItemsInCart(1, $cart);
-
- $this->assertDatabaseMissing('shopping_cart', ['identifier' => $identifier, 'instance' => 'default']);
-
- Event::assertDispatched('cart.restored');
- }
-
- /** @test */
- public function it_will_just_keep_the_current_instance_if_no_cart_with_the_given_identifier_was_stored()
- {
- $this->artisan('migrate', [
- '--database' => 'testing',
- ]);
-
- $cart = $this->getCart();
-
- $cart->restore($identifier = 123);
-
- $this->assertItemsInCart(0, $cart);
- }
-
- /** @test */
- public function it_can_calculate_all_values()
- {
- $cart = $this->getCart();
-
- $cart->add(new BuyableProduct(1, 'First item', 10.00), 2);
-
- $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da');
-
- $cart->setTax('027c91341fd5cf4d2579b49c4b6a90da', 19);
-
- $this->assertEquals(10.00, $cartItem->price(2));
- $this->assertEquals(11.90, $cartItem->priceTax(2));
- $this->assertEquals(20.00, $cartItem->subtotal(2));
- $this->assertEquals(23.80, $cartItem->total(2));
- $this->assertEquals(1.90, $cartItem->tax(2));
- $this->assertEquals(3.80, $cartItem->taxTotal(2));
-
- $this->assertEquals(20.00, $cart->subtotal(2));
- $this->assertEquals(23.80, $cart->total(2));
- $this->assertEquals(3.80, $cart->tax(2));
- }
-
- /** @test */
- public function it_will_destroy_the_cart_when_the_user_logs_out_and_the_config_setting_was_set_to_true()
- {
- $this->app['config']->set('cart.destroy_on_logout', true);
-
- $this->app->instance(SessionManager::class, Mockery::mock(SessionManager::class, function ($mock) {
- $mock->shouldReceive('forget')->once()->with('cart');
- }));
-
- $user = Mockery::mock(Authenticatable::class);
-
- event(new Logout($user));
- }
-
- /**
- * Get an instance of the cart.
- *
- * @return \Gloudemans\Shoppingcart\Cart
- */
- private function getCart()
- {
- $session = $this->app->make('session');
- $events = $this->app->make('events');
-
- return new Cart($session, $events);
- }
-
- /**
- * Set the config number format.
- *
- * @param int $decimals
- * @param string $decimalPoint
- * @param string $thousandSeperator
- */
- private function setConfigFormat($decimals, $decimalPoint, $thousandSeperator)
- {
- $this->app['config']->set('cart.format.decimals', $decimals);
- $this->app['config']->set('cart.format.decimal_point', $decimalPoint);
- $this->app['config']->set('cart.format.thousand_separator', $thousandSeperator);
- }
-}
diff --git a/packages/shoppingcart/_info/tests/Fixtures/BuyableProduct.php b/packages/shoppingcart/_info/tests/Fixtures/BuyableProduct.php
deleted file mode 100644
index a58e830..0000000
--- a/packages/shoppingcart/_info/tests/Fixtures/BuyableProduct.php
+++ /dev/null
@@ -1,67 +0,0 @@
-id = $id;
- $this->name = $name;
- $this->price = $price;
- }
-
- /**
- * Get the identifier of the Buyable item.
- *
- * @return int|string
- */
- public function getBuyableIdentifier($options = null)
- {
- return $this->id;
- }
-
- /**
- * Get the description or title of the Buyable item.
- *
- * @return string
- */
- public function getBuyableDescription($options = null)
- {
- return $this->name;
- }
-
- /**
- * Get the price of the Buyable item.
- *
- * @return float
- */
- public function getBuyablePrice($options = null)
- {
- return $this->price;
- }
-}
\ No newline at end of file
diff --git a/packages/shoppingcart/_info/tests/Fixtures/ProductModel.php b/packages/shoppingcart/_info/tests/Fixtures/ProductModel.php
deleted file mode 100644
index 70494ca..0000000
--- a/packages/shoppingcart/_info/tests/Fixtures/ProductModel.php
+++ /dev/null
@@ -1,13 +0,0 @@
- 15,
-
- /*
- |--------------------------------------------------------------------------
- | Shopping cart database settings
- |--------------------------------------------------------------------------
- |
- | Here you can set the connection that the shopping cart should use when
- | storing and restoring a cart.
- |
- */
-
- 'database' => [
-
- 'connection' => env('DB_CONNECTION', 'mysql'),
-
- 'table' => 'shopping_cart',
-
- ],
-
- /*
- |--------------------------------------------------------------------------
- | Destroy the cart on user logout
- |--------------------------------------------------------------------------
- |
- | When this option is set to 'true' the cart will automatically
- | destroy all cart instances when the user logs out.
- |
- */
-
- 'destroy_on_logout' => false,
-
- /*
- |--------------------------------------------------------------------------
- | Default number format
- |--------------------------------------------------------------------------
- |
- | This defaults will be used for the formated numbers if you don't
- | set them in the method call.
- |
- */
-
- 'format' => [
-
- 'decimals' => 2,
-
- 'decimal_point' => '.',
-
- 'thousand_separator' => ''
-
- ],
-
-];
\ No newline at end of file
diff --git a/packages/shoppingcart/database/migrations/0000_00_00_000000_create_shopping_cart_table.php b/packages/shoppingcart/database/migrations/0000_00_00_000000_create_shopping_cart_table.php
deleted file mode 100644
index 891afc7..0000000
--- a/packages/shoppingcart/database/migrations/0000_00_00_000000_create_shopping_cart_table.php
+++ /dev/null
@@ -1,30 +0,0 @@
-string('identifier');
- $table->string('instance');
- $table->longText('content');
- $table->nullableTimestamps();
-
- $table->primary(['identifier', 'instance']);
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down()
- {
- Schema::drop('shopping_cart');
- }
-}
diff --git a/public/assets/css/custom-style.css b/public/assets/css/custom-style.css
index b72c1f9..2315f98 100644
--- a/public/assets/css/custom-style.css
+++ b/public/assets/css/custom-style.css
@@ -1,6 +1,6 @@
h1, .h1 {
- font-family: 'Pacifico', cursive;
+ font-family: 'Raleway', 'Open Sans', Arial, Helvetica, sans-serif;
font-size: 1.2em;
}
@@ -21,7 +21,7 @@ h2 {
h3.h3 {
- font-family: 'Pacifico', cursive;
+ font-family: 'Raleway', 'Open Sans', Arial, Helvetica, sans-serif;
font-size: 1.6em;
color:#b5c49b;
margin-bottom: 25px;
diff --git a/public/assets/images/logo_dark.png b/public/assets/images/logo_dark.png
index f52accb..7149a6c 100644
Binary files a/public/assets/images/logo_dark.png and b/public/assets/images/logo_dark.png differ
diff --git a/public/assets/images/logo_dark_old.png b/public/assets/images/logo_dark_old.png
index 372016e..0ecbf0a 100644
Binary files a/public/assets/images/logo_dark_old.png and b/public/assets/images/logo_dark_old.png differ
diff --git a/public/assets/images/logo_mivita.png b/public/assets/images/logo_mivita.png
index 44d3619..7bada40 100644
Binary files a/public/assets/images/logo_mivita.png and b/public/assets/images/logo_mivita.png differ
diff --git a/public/assets/images/logo_mivita_fixed.png b/public/assets/images/logo_mivita_fixed.png
index ec7f5c7..c86a11d 100644
Binary files a/public/assets/images/logo_mivita_fixed.png and b/public/assets/images/logo_mivita_fixed.png differ
diff --git a/public/assets/images/produktfamilie.jpg b/public/assets/images/produktfamilie.jpg
index a65c82c..cbf60ca 100644
Binary files a/public/assets/images/produktfamilie.jpg and b/public/assets/images/produktfamilie.jpg differ
diff --git a/public/assets/images/slider-hg_gruen-mitte.jpg b/public/assets/images/slider-hg_gruen-mitte.jpg
index 634ada8..4b675ab 100644
Binary files a/public/assets/images/slider-hg_gruen-mitte.jpg and b/public/assets/images/slider-hg_gruen-mitte.jpg differ
diff --git a/public/assets/plugins/text-rotator/demo.html b/public/assets/plugins/text-rotator/demo.html
index ab19ca8..306e18f 100644
--- a/public/assets/plugins/text-rotator/demo.html
+++ b/public/assets/plugins/text-rotator/demo.html
@@ -52,7 +52,7 @@
.pointer {
color: #9b59b6;
- font-family: 'Pacifico', cursive;
+ font-family: 'Open Sans', Arial, Helvetica, sans-serif;
font-size: 30px;
margin-top: 15px;
}
diff --git a/public/images/logo_mivita.png b/public/images/logo_mivita.png
index 09a6b2e..5032188 100644
Binary files a/public/images/logo_mivita.png and b/public/images/logo_mivita.png differ
diff --git a/public/js/iq-abo-cart.js b/public/js/iq-abo-cart.js
new file mode 100644
index 0000000..c1e5450
--- /dev/null
+++ b/public/js/iq-abo-cart.js
@@ -0,0 +1,201 @@
+
+var IqAboCart = {
+ form: "#homeparty-order-form",
+ btn_modal_add: '.add-product-basket',
+ btn_add: '.add-from-basket',
+ btn_remove: '.remove-from-basket',
+ table_input: '.table-input-event-onchange',
+ oTable: null,
+ cart_holder: '#insert_show_products_order_',
+ cart_holders: '.insert_show_products_order',
+ modal: '#modals-load-content',
+ remove_item_cart: '.remove_item_form_cart',
+ insert_show_total_order: '#insert_show_total_order',
+ insert_show_bonus: '#insert_show_bonus',
+ insert_show_bonus_host: '#insert_show_bonus_host',
+ select_delivery_option: '.select_delivery_option',
+ /*
+ comp_holder: '#holder_html_view_comp_product',
+ is_for: null,
+ url: null,
+ btn_clear: '#clear-products-basket',
+
+ cart_input: '.cart-input-event-onchange',
+ remove_item: '.remove_item_form_cart',
+ shipping_state: '#change_shipping_state',
+ comp_products: 'switchers-comp-product',
+ count_comp_products: 'count_comp_products',
+ shipping_is_for: 'shipping_is_for',*/
+
+ _log: function ($msg){
+ console.log($msg);
+ },
+ init: function () {
+ var _self = this;
+ _self.url = $(_self.form).attr('action');
+
+
+ $(_self.cart_holders).each(function (key, obj){
+ _self.reInit($(obj));
+
+ });
+ //_self.showInit();
+
+ /*$(_self.shipping_state).on('change', function(){
+ _self.update_shipping_state($(this));
+ });*/
+ return _self;
+ },
+ setDatabase: function (oTable){
+ var _self = this;
+ _self.oTable = oTable;
+ },
+ reInitModal: function (){
+ var _self = this;
+ $(_self.oTable).find(_self.btn_modal_add).on('click', function(){
+ _self.add_product_modal($(this))
+ });
+ },
+ add_product_modal: function (_obj){
+ var _self = this;
+ _self.performRequest({
+ product_id: _obj.data('product-id'),
+ homeparty_id: $(_self.oTable).data('homeparty-id'),
+ homeparty_user_id: $(_self.oTable).data('homeparty-user-id'),
+ qty: 1,
+ action: 'addProduct'
+ }).done(_self.refreshView);
+
+ },
+ reInit: function (obj){
+ var _self = this;
+ var _obj = obj;
+ obj.find(_self.btn_add).off('click').on('click', function(){
+ _self.add_product($(this), _obj)
+ });
+ obj.find(_self.btn_remove).off('click').on('click', function(){
+ _self.remove_product($(this), _obj)
+ });
+ obj.find(_self.table_input).off('change').on('change', function(){
+ _self.update_input_table($(this), _obj);
+ });
+
+ obj.find(_self.remove_item_cart).off('click').on('click', function(){
+ _self.remove_from_cart($(this), _obj);
+ });
+
+ obj.find(_self.select_delivery_option).off('change').on('change', function(){
+ _self.update_delivery_option($(this), _obj);
+ });
+ },
+
+ add_product: function (_obj, _holder){
+ var _self = this;
+ var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]');
+ var qty = parseInt(input.val()) + 1;
+ qty = _self.checkNumber(qty);
+ input.val(qty);
+ _self.update_cart(_holder, _obj, qty);
+ },
+ remove_product: function (_obj, _holder){
+ var _self = this;
+ var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]');
+ var qty = parseInt(input.val()) - 1;
+ qty = _self.checkNumber(qty);
+ input.val(qty);
+ _self.update_cart(_holder, _obj, qty);
+ },
+ update_input_table: function (_obj, _holder){
+ var _self = this;
+ var qty = parseInt(_obj.val());
+ qty = _self.checkNumber(qty);
+ _obj.val(qty);
+ _self.update_cart(_holder, _obj, qty);
+ },
+ update_cart: function (_holder, _obj, qty){
+ var _self = this;
+ _self.performRequest({
+ product_id: _obj.data('product-id'),
+ order_item_id: _obj.data('order-item-id'),
+ homeparty_id: _holder.data('homeparty-id'),
+ homeparty_user_id: _holder.data('homeparty-user-id'),
+ qty: qty,
+ action: 'updateCart'
+ }).done(_self.refreshView);
+ },
+ remove_from_cart: function (_obj, _holder){
+ var _self = this;
+ _self.performRequest({
+ product_id: _obj.data('product-id'),
+ order_item_id: _obj.data('order-item-id'),
+ homeparty_id: _holder.data('homeparty-id'),
+ homeparty_user_id: _holder.data('homeparty-user-id'),
+ action: 'removeFromCart'
+ }).done(_self.refreshView);
+ },
+ update_delivery_option: function (_obj, _holder){
+ var _self = this;
+ _self.performRequest({
+ delivery: _obj.val(),
+ homeparty_id: _holder.data('homeparty-id'),
+ homeparty_user_id: _holder.data('homeparty-user-id'),
+ action: 'updateDeliveryOption'
+ }).done(_self.refreshView);
+ },
+
+ refreshView: function (data) {
+ var _self = IqHomepartyCart;
+ var obj = $(_self.cart_holder+data.data.homeparty_user_id)
+ obj.html(data.html_user_cart);
+ $(_self.insert_show_total_order).html(data.html_total);
+ $(_self.insert_show_bonus).html(data.html_bonus);
+ $(_self.insert_show_bonus_host).html(data.html_host_bonus);
+ $(_self.modal).modal('hide');
+ _self.reInit(obj);
+ //$(_self.comp_holder).html(data.html_comp);
+ // var input = $(_self.table).find('input[name="product_qty_'+data.data.product_id+'"]');
+ // input.val(data.data.qty);
+ // _self.showInit();
+ },
+ performRequest : function(data) {
+ var _self = this;
+ var url = _self.url,
+ contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
+
+ console.log(data);
+ console.log(url);
+
+ return $.ajax({
+ url: url,
+ data: data,
+ type: "POST",
+ dataType: "json",
+ cache: false,
+ contentType: contentType,
+ encode: true,
+ headers: {
+ 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
+ }
+ })
+ .done(function (data) {
+ console.log('performRequest');
+ console.log(data);
+
+ }).fail(function (jqXHR, textStatus, errorThrown) {
+ console.log(jqXHR);
+ console.log(jqXHR.responseText);
+ console.log(textStatus);
+ console.log(errorThrown);
+ console.log("Sorry, there was a problem!");
+ });
+ },
+ checkNumber : function(number){
+ if(number < 1 || isNaN(number)){
+ return 1;
+ }
+ if(number >= 999){
+ return 999;
+ }
+ return number;
+ }
+};
\ No newline at end of file
diff --git a/public/js/iq-modal-cart.js b/public/js/iq-modal-cart.js
new file mode 100644
index 0000000..e065a4e
--- /dev/null
+++ b/public/js/iq-modal-cart.js
@@ -0,0 +1,181 @@
+
+var IqModalCart = {
+ form: "#cart-order-form",
+ btn_modal_add: '.add-product-basket',
+ btn_add: '.add-from-basket',
+ btn_remove: '.remove-from-basket',
+ table_input: '.table-input-event-onchange',
+ oTable: null,
+ cart_holder: '#insert_show_products_order',
+ is_for: null,
+ modal: '#modals-load-content',
+ remove_item_cart: '.remove_item_form_cart',
+ insert_show_total_order: '#insert_show_total_order',
+ input_is_for: 'is_for',
+ comp_holder: '#holder_html_view_comp_product',
+ comp_products: 'switchers-comp-product',
+ count_comp_products: 'count_comp_products',
+
+ _log: function ($msg){
+ console.log($msg);
+ },
+ init: function () {
+ var _self = this;
+ _self.url = $(_self.form).attr('action');
+ _self.is_for = $('input[name="'+_self.input_is_for+'"]').val();
+ _self.reInitCart($(_self.cart_holder));
+ return _self;
+ },
+ setDatabase: function (oTable){
+ var _self = this;
+ _self.oTable = oTable;
+ },
+ reInitModal: function (){
+ var _self = this;
+ $(_self.oTable).find(_self.btn_modal_add).on('click', function(){
+ _self.add_product_modal($(this))
+ });
+ },
+ add_product_modal: function (_obj){
+ var _self = this;
+ _self.performRequest({
+ product_id: _obj.data('product-id'),
+ qty: 1,
+ action: 'addProduct'
+ }).done(_self.refreshView);
+
+ },
+ reInitCart: function (obj){
+ var _self = this;
+ var _obj = obj;
+ obj.find(_self.btn_add).off('click').on('click', function(){
+ _self.add_product($(this), _obj)
+ });
+ obj.find(_self.btn_remove).off('click').on('click', function(){
+ _self.remove_product($(this), _obj)
+ });
+ obj.find(_self.table_input).off('change').on('change', function(){
+ _self.update_input_table($(this), _obj);
+ });
+ obj.find(_self.remove_item_cart).off('click').on('click', function(event){
+ event.preventDefault()
+ _self.remove_from_cart($(this), _obj);
+ });
+ if(_self.is_for === 'me' || _self.is_for === 'abo-me'){
+ $('input[name^="'+_self.comp_products+'"]').on('change', function(){
+ _self.update_comp_product($(this));
+ });
+ }
+ },
+ update_comp_product: function (_obj){
+ var _self = this;
+ _self.performRequest({
+ comp_product_id: _obj.val(),
+ comp_num: _obj.data('comp_num'),
+ count_comp_products: $('input[name="'+_self.count_comp_products+'"]').val(),
+ action: 'updateCompProduct'})
+ .done(_self.refreshView);
+ },
+ add_product: function (_obj, _holder){
+ var _self = this;
+ var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]');
+ var qty = parseInt(input.val()) + 1;
+ qty = _self.checkNumber(qty);
+ input.val(qty);
+ _self.update_cart(_holder, _obj, qty);
+ },
+ remove_product: function (_obj, _holder){
+ var _self = this;
+ var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]');
+ var qty = parseInt(input.val()) - 1;
+ qty = _self.checkNumber(qty);
+ input.val(qty);
+ _self.update_cart(_holder, _obj, qty);
+ },
+ update_input_table: function (_obj, _holder){
+ var _self = this;
+ var qty = parseInt(_obj.val());
+ qty = _self.checkNumber(qty);
+ _obj.val(qty);
+ _self.update_cart(_holder, _obj, qty);
+ },
+ update_cart: function (_holder, _obj, qty){
+ var _self = this;
+ _self.performRequest({
+ product_id: _obj.data('product-id'),
+ order_item_id: _obj.data('order-item-id'),
+ cart_order_id: _holder.data('cart-order-id'),
+ qty: qty,
+ action: 'updateCart'
+ }).done(_self.refreshView);
+ },
+ remove_from_cart: function (_obj, _holder){
+ var _self = this;
+ _self.performRequest({
+ product_id: _obj.data('product-id'),
+ order_item_id: _obj.data('order-item-id'),
+ cart_order_id: _holder.data('cart-order-id'),
+ action: 'removeFromCart'
+ }).done(_self.refreshView);
+ },
+
+ refreshView: function (data) {
+ var _self = IqModalCart;
+ var obj = $(_self.cart_holder)
+ obj.html(data.html_cart);
+ $(_self.insert_show_total_order).html(data.html_total);
+ $(_self.modal).modal('hide');
+ if($(_self.comp_holder)){
+ $(_self.comp_holder).html(data.html_comp);
+ }
+ if($('#value-amount')){
+ $('#value-amount').html(data.amount);
+ }
+ _self.reInitCart(obj);
+
+ // var input = $(_self.table).find('input[name="product_qty_'+data.data.product_id+'"]');
+ // input.val(data.data.qty);
+ // _self.showInit();
+ },
+ performRequest : function(data) {
+ var _self = this;
+ var url = _self.url,
+ contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
+
+ console.log(data);
+ console.log(url);
+
+ return $.ajax({
+ url: url,
+ data: data,
+ type: "POST",
+ dataType: "json",
+ cache: false,
+ contentType: contentType,
+ encode: true,
+ headers: {
+ 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
+ }
+ })
+ .done(function (data) {
+ console.log('performRequest');
+ console.log(data);
+
+ }).fail(function (jqXHR, textStatus, errorThrown) {
+ console.log(jqXHR);
+ console.log(jqXHR.responseText);
+ console.log(textStatus);
+ console.log(errorThrown);
+ console.log("Sorry, there was a problem!");
+ });
+ },
+ checkNumber : function(number){
+ if(number < 1 || isNaN(number)){
+ return 1;
+ }
+ if(number >= 999){
+ return 999;
+ }
+ return number;
+ }
+};
\ No newline at end of file
diff --git a/resources/lang/de.json b/resources/lang/de.json
index 3fc184b..1fab60d 100644
--- a/resources/lang/de.json
+++ b/resources/lang/de.json
@@ -91,6 +91,7 @@
"Data, Login & Security": "Daten, Anmeldung & Sicherheit",
"Sign in with your e-mail:": "Anmeldung mit Deiner E-Mail:",
"delete": "löschen",
+ "confirm_delete": "Wirklich löschen?",
"imprint": "Impressum",
"data protections": "Datenschutz",
"Thank you for your registration!": "Vielen Dank für Deine Registrierung!",
diff --git a/resources/lang/de/abo.php b/resources/lang/de/abo.php
new file mode 100644
index 0000000..ae45be1
--- /dev/null
+++ b/resources/lang/de/abo.php
@@ -0,0 +1,65 @@
+ 'Abo',
+ 'payment_for_abo' => 'Zahlungsart für Abo',
+ 'abo_delivery' => 'Abo - regelmäßige Lieferung',
+ 'abo_are_for_me_and_shipped' => 'Abo ist für mich und wird an meine Adresse versendet',
+ 'abo_are_for_customer_and_shipped' => 'Abo ist für einen Kunden und wird an den Kunden versendet',
+ 'abo_delivery_to_me' => 'Abo-Lieferung an mich',
+ 'abo_delivery_to_the_customer' => 'Abo-Lieferung an den Kunden',
+ 'every_week' => 'jede Woche',
+ 'every_weeks' => 'alle :num Wochen',
+ 'of_month' => 'des Monat',
+ 'delivery_intervall' => 'Liefertag anpassen',
+ 'abo_order_info' => 'Mit dem Abschluss des Abonnements wird eine regelmäßige Lieferung eingerichtet, die automatisch an dem gewählten Liefertag versendet und abgerechnet wird, beginnend ab dem heutigen Datum. Anpassungen können jederzeit bequem im Kundenkonto vorgenommen werden. Als Zahlungsmethoden stehen PayPal und Kreditkarte zur Verfügung.',
+ 'abo_infos' => 'Abo Infos',
+ 'abo_delivery_infos' => 'Abo Lieferinfos',
+ 'abo_start_date' => 'Beginn des Abos',
+ 'abo_delivery_intervall' => 'Liefertag des Abos',
+ 'delivery_day' => 'Liefertag anpassen',
+ 'abo_settings' => 'Abo Einstellungen',
+ 'add_new_abo' => 'Neues Abo anlegen',
+ 'abo_edit' => 'Abo bearbeiten',
+ 'abo_details' => 'Abo Details',
+ 'abo_is_active' => 'Abo ist aktiv',
+ 'abo_copy_active' => 'Wenn das Abonnement nicht aktiv ist, erfolgt keine automatische Ausführung.',
+ 'abo_copy_next_date' => 'Der nächste Ausführungstermin kann frühesten auf den Folgetag festgelegt werden.',
+ 'abo_copy_abo_interval' => 'Die Anpassung des Abonnement-Liefertags wirkt sich auf den kommenden Ausführungstermin aus, wenn das Abonnement aktiv ist.',
+ 'error_abo_interval' => 'Das Abo Interval nicht korrekt',
+ 'error_next_date' => 'Das Datum für die nächste Ausführung nicht korrekt',
+ 'checkout_mail_abo_hl' => 'Dein Abo / regelmäßige Lieferung.',
+ 'checkout_mail_abo_start' => 'Dein Abo wurde erfolgreich mit folgenden Einstellungen angelegt:',
+ 'checkout_mail_abo_info' => 'Deine Abo-Einstellungen findest Du in Deinem Account unter "Meine Abos" und dort können die Einstellungen auch bearbeitet werden.',
+ 'abo_new' => 'neu',
+ 'abo_okay' => 'okay',
+ 'abo_hold' => 'angehalten',
+ 'abo_cancel' => 'storniert',
+ 'abo_finish' => 'beendet',
+ 'abo_inactive' => 'inaktiv',
+ 'abo_grace' => 'kulanz',
+ 'pros_hl' => 'Die Vorteile eines Abos',
+ 'pros_list' => ' Abo-Abschluss für Berater und Kunden: Jeder Berater oder Kunde kann ein Abo abschließen, das an einem festgelegten Tag im Monat ausgeführt wird, um eine regelmäßige und planbare Lieferung zu gewährleisten.
+ Monatliche Lieferung: Einmal im Monat wird eine neue Lieferung direkt an die Haustür gesendet.
+ Flexibel anpassbar: Das Abonnement kann jederzeit angepasst werden, z.B. in Bezug auf Produkte, Mengen oder Lieferzeitpunkte.
+ Vielfältige Produktauswahl: Verschiedene Produkte können im Abo enthalten sein.
+ Einfache Verwaltung: Änderungen und Anpassungen können bequem im Salescenter vorgenommen werden.
+ Pausieren oder Beenden: Das Abo kann flexibel pausiert oder beendet werden.
+ Preisvorteil: Die Abo-Produkte erhalten oft spezielle Rabatte oder Angebote.
+ Jetzt starten: Wähle Deine Produkte, passe das Abo an deine Bedürfnisse an, zahle die erste Bestellung und aktiviere damit Dein Abo für die nächsten Lieferungen. ',
+ 'abo_pros' => 'Abo Vorteile',
+ 'abo_order_info' => 'Du kannst die Produkte Deines Abos jederzeit anpassen, bei der nächsten Ausführung werden Dir Deine zusammengestellen Produkte zugesendet.',
+ 'abo_order_hl' => 'Abo Zusammenstellung',
+ 'add_product' => 'Produkt hinzufügen',
+ 'product_prices_career_level_info' => 'Die Produktpreise werden entsprechend Deinem Karriere-Level :user_level_name abzüglich :user_level_margin % Marge angezeigt und brechnet.',
+ 'product_prices_career_level_cpay_info' => 'Die Produktpreise werden als Kunden VK-Preise angezeigt, nach Abschluss der Kundenzahlung erhälst du Deine Provision entsprechend Deinem Karriere-Level :user_level_name Provision :user_level_margin % .',
+ 'error_email_has_abo' => 'Für die E-Mail-Adresse :email ist bereits ein Abonnement vorhanden.',
+ 'abo_assigned' => 'Abo aktiv',
+ 'base' => 'Basis',
+ 'upgrade' => 'Upgrade',
+ 'abo_type_info' => 'Hinweis:Jedes Abo besteht mindestens aus einem Basis-Produkt :base ! Upgrade-Produkte :upgrade sind optional und können nach belieben hinzugefügt werden.',
+ 'abo_type_info_base' => 'Das Abo benötigt mindestens ein Basis-Produkt :base !',
+ 'need_basis_product' => 'Sie müssen min. ein Basis-Produkt in Ihrem Abo haben, bitte fügen Sie erst ein neues Basis-Produkt hinzu und entfernen Sie dann das alte Basis-Produkt!',
+ 'abo_item_not_found' => 'Abo-Position nicht gefunden',
+ 'product_not_found' => 'Produkt nicht gefunden',
+);
diff --git a/resources/lang/de/actions.php b/resources/lang/de/actions.php
index 0510007..a78f355 100644
--- a/resources/lang/de/actions.php
+++ b/resources/lang/de/actions.php
@@ -20,5 +20,5 @@ return array (
'dictResponseError' => 'Server responded with {{statusCode}} code.',
'dictCancelUpload' => 'Cancel upload',
'dictRemoveFile' => 'Remove file',
- 'dictMaxFilesExceeded' => 'You can not upload any more files.'
+ 'dictMaxFilesExceeded' => 'You can not upload any more files.',
);
diff --git a/resources/lang/de/email.php b/resources/lang/de/email.php
index 5af469e..b3c3a3d 100644
--- a/resources/lang/de/email.php
+++ b/resources/lang/de/email.php
@@ -96,8 +96,10 @@ Dein Team von MIVITA',
'verify_copy1line' => 'Wir haben Daten über Dich in unserem System gespeichert. Bitte folge dem unten stehenden Link um Deine E-Mail-Adresse zu bestätigen. Weitherhin kannst Du Deine Daten ändern oder auch löschen.',
'verify_e_mail' => 'Bestätige Deine Daten und E-Mail-Adresse',
'your_request_from' => 'Deine Anfrage von',
- 'your_custom_payout' => 'Dein persönlicher mivita Berater - :name hat eine individuelle Bestellung für Dich zusammengestellt. Jetzt musst Du nur noch Deine Bestellung bezahlen. Klicke auf den Link und gelange zum Checkout von mivita.care.',
+ 'your_custom_payout' => 'Dein persönlicher mivita Berater - :name hat eine individuelle Bestellung für Dich zusammengestellt. Jetzt musst Du nur noch Deine Bestellung bezahlen. Klicke auf den Link und gelange zum Checkout von mivita.care.',
+ 'your_custom_abo_payout' => 'Dein persönlicher mivita Berater - :name hat eine individuelle Abo-Bestellung für Dich zusammengestellt. Jetzt musst Du nur noch Deine Abo-Bestellung bezahlen. Klicke auf den Link und gelange zum Checkout von mivita.care.',
'subject_custom_payout' => 'Deine individuelle Bestellung von :name auf mivita.care',
+ 'subject_custom_abo_payout' => 'Deine individuelle Abo-Bestellung von :name auf mivita.care',
'button_custom_payout' => 'zur Zahlung',
'checkout_custom_payout' => 'Dein Berater hat folgende Produkte für Dich zusammengestellt',
diff --git a/resources/lang/de/membership.php b/resources/lang/de/membership.php
index 06f9a98..d65ba11 100644
--- a/resources/lang/de/membership.php
+++ b/resources/lang/de/membership.php
@@ -41,9 +41,9 @@ return array (
'inactive' => 'inaktiv',
'is_no_longer_possible_to_change_package' => 'Eine Änderung Deines Berater-Paketes ist nicht mehr möglich.',
'membership' => 'Mitgliedschaft',
- 'membership_was_renewed' => 'Deine Mitglidschaft wurde am :date verlängert. ',
+ 'membership_was_renewed' => 'Dein Vertrag wurde am :date verlängert. ',
'open_payment_options' => 'Zahlungsoptionen öffnen',
- 'payment_copy_1' => 'Alternativ hast Du die Möglichkeit jetzt direkt Deine Mitgliedschaft mit anderen Zahlungsmöglichkeite zu bezahlen.',
+ 'payment_copy_1' => 'Alternativ hast Du die Möglichkeit jetzt direkt Deine Mitgliedschaft mit anderen Zahlungsmöglichkeiten zu bezahlen.',
'payment_copy_2' => 'Ist die Mitgliedschaft vor dem :date bezahlt, wird das SEPA Mandart nicht ausgeführt!',
'payment_has_been_made' => 'Eine Zahlung wurde ausgeführt.',
'renewal_is_active_membership_fee_automatic' => ' Deine automatische Verlängerung ist aktiv, wir werden am :date Deine Mitgliedschaftsgebühr automatisch per SEPA Mandat einziehen.',
@@ -55,4 +55,6 @@ return array (
'upgrade_package_and_proceed_payment' => 'Du hast die Möglichkeit Dein Paket zu upgraden, wähle einfach das erweiterte Paket aus und gehe weiter zur Zahlung.',
'we_do_not_collect_membership_fee' => 'Wir konnten am :date Deine Mitgliedschaftsgebühr nicht automatisch per SEPA Mandat einziehen.',
'your_booked_package' => 'Dein gebuchtes Paket',
+ 'info_contract_renewal' => 'Dein Vertrag wird :days Tage vor Ablauf Deiner Berater-Mitgliedschaft automatisch verlängert. Nach der Vertragsverlängerung ist eine Änderung des Berater-Pakets nicht mehr möglich und du musst die Zahlung für Deine Mitgliedschaft vornehmen.',
+ 'alert_contract_renewal' => 'Um Deine Berater-Mitgliedschaft zu verlängern, führe bitte die Zahlung für Dein gebuchtes MIVITA-Paket durch.'
);
diff --git a/resources/lang/de/navigation.php b/resources/lang/de/navigation.php
index dc297be..44d92be 100644
--- a/resources/lang/de/navigation.php
+++ b/resources/lang/de/navigation.php
@@ -57,5 +57,12 @@ return array (
'downloadcenter' => 'Downloadcenter',
'files' => 'Dateien',
'tags' => 'Tags',
+ 'myabos' => 'Meine Abos',
+ 'customerabos' => 'Kunden Abos',
+ 'myabo' => 'Mein Abo',
+ 'customerabo' => 'Kunden Abo',
+ 'abo' => 'Abo',
+ 'abos' => 'Abos',
+ 'payment_links' => 'Bezahllinks',
);
diff --git a/resources/lang/de/order.php b/resources/lang/de/order.php
index b069a12..e8ae271 100644
--- a/resources/lang/de/order.php
+++ b/resources/lang/de/order.php
@@ -48,6 +48,7 @@ return array (
'invoice' => 'Rechnung',
'invoice_address' => 'Rechnungsadresse',
'land_can_no_longer_be_changed' => 'Das Land kann nicht mehr geändert werden',
+ 'email_can_not_be_changed' => 'Deine E-Mail Adresse kann nicht mehr geändert werden',
'link_to_the_invoice' => 'Link zur Rechnung',
'my_delivery_address' => 'Meine Lieferadresse',
'net' => 'netto',
@@ -76,8 +77,10 @@ return array (
'ship_to_existing_customer_select_customer' => 'An bestehenden Kunden versenden | Kunden auswählen',
'ship_to_new_customer' => 'An neuen Kunden versenden',
'ship_to_this_customer' => 'An diesen Kunde versenden',
- 'ship_to_this_customer_check' => 'Mir ist bekannt, dass dieser Bestellvorgang nur für Kundenbestellungen ist und nicht für meine eigenen Bestellungen',
- 'ship_to_this_customer_info' => 'Sollten unten stehende Angaben nicht korrekt sein oder aktualisiert werden müssen, ändere diese bitte vorerst unter',
+ 'ship_to_this_customer_check' => 'Mir ist bekannt, dass dieser Bestellvorgang nur für Kundenbestellungen ist und nicht für meine eigenen Bestellungen.',
+ 'ship_to_this_customer_info' => 'Sollten die Rechnungsadresse oder das Lieferland nicht korrekt sein, ändere diese bitte vor der Bestellung unter',
+ 'ship_to_this_customer_info_2' => 'Die Lieferadresse, bis auf das Lieferland, kann auch im Checkout angepassst werden.',
+ 'ship_to_this_email_info' => 'Der Bestelllink wird Deinem Kunden an folgenden E-Mail-Adresse gesendet:',
'shipping' => 'Versand',
'shipping_compensation_product' => 'Versand Kompensationsprodukt',
'shipping_costs' => 'Versandkosten',
@@ -107,23 +110,8 @@ return array (
'sum_net' => 'Summe netto',
'confirm_and_send_order' => 'Bestellung abschließen und Zahlungslink versenden',
'confirm_send_order_info' => 'Mit dem Abschließen der Bestellung wird ein Zahlungslink erstellt und per E-Mail an Deinen Kunden versendet. Dein Kunde kann dann die Zahlung abschließen und die Ware wird versendet, Deine Provision wird mit dem Abschluss der Zahlung gutgeschrieben.',
- 'order_was_placed_successfully' => 'Die Bestellung wurde erfolgreich aufgegeben.',
+ 'order_was_placed_successfully' => 'Die Bestellung wurde erfolgreich angelegt.',
+ 'order_abo_was_placed_successfully' => 'Die Abo-Bestellung wurde erfolgreich angelegt.',
'payment_link_for_your_customer' => 'Der Bezahllink für Deinen Kunden',
'delivery' => 'Lierferung',
- 'payment_for_abo' => 'Zahlungsart für Abo',
- 'abo_delivery' => 'Abo - regelmäßige Lieferung',
- 'abo_are_for_me_and_shipped' => 'Abo ist für mich und wird an meine Adresse versendet',
- 'abo_are_for_customer_and_shipped' => 'Abo ist für einen Kunden und wird an den Kunden versendet',
- 'abo_delivery_to_me' => 'Abo-Lieferung an mich',
- 'abo_delivery_to_the_customer' => 'Abo-Lieferung an den Kunden',
- 'every_week' => 'jede Woche',
- 'every_weeks' => 'alle :num Wochen',
- 'abo_settings' => 'Abo Einstellungen',
- 'delivery_intervall' => 'Lieferintervall anpassen',
- 'abo_order_info' => 'Durch das Abschließen des Abonnements wird eine regelmäßige Lieferung eingerichtet, die automatisch im festgelegten Intervall geliefert und abgerechnet wird, beginnend ab heute. Anpassungen am Abonnement können im Kundenkonto vorgenommen werden. Mögliche Zahlungsarten sind PayPal und Kreditkarte.',
- 'abo_infos' => 'Abo Infos',
- 'abo_delivery_infos' => 'Abo Lieferinfos',
- 'abo_start_date' => 'Beginn des Abos',
- 'abo_delivery_intervall' => 'Lieferintervall des Abos',
-
);
diff --git a/resources/lang/de/payment.php b/resources/lang/de/payment.php
index 7a11ee6..40db3e1 100644
--- a/resources/lang/de/payment.php
+++ b/resources/lang/de/payment.php
@@ -84,13 +84,29 @@ return array (
'your_mivita_team' => 'Dein Team von mivita.care',
'your_order_number_is' => 'Deine Bestellnummer ist',
'open'=>'offen',
+ 'openly'=>'geöffnet',
'paid'=>'bezahlt',
'check'=>'prüfen',
'cancelled'=>'storniert',
-
+ 'link_sent'=>'Link gesendet',
+ 'link_openly'=>'Link geöffnet',
+ 'link_check'=>'Zahlung in Ausführung',
+ 'link_pending'=>'Zahlung in Bearbeitung',
+ 'link_failed'=>'Zahlung fehlgeschlagen',
+ 'link_canceled'=>'Zahlung abgebrochen',
+ 'link_appointed'=>'Zahlung genehmigt',
+ 'link_paid'=>'bezahlt',
+ 'alert_link_sent'=>'Zahlungslink gesendet',
+ 'alert_link_openly'=>'Zahlungslink geöffnet',
+ 'alert_link_check'=>'Zahlung in Ausführung',
+ 'alert_link_pending'=>'Zahlung in Bearbeitung',
+ 'alert_link_failed'=>'Zahlung ist fehlgeschlagen',
+ 'alert_link_canceled'=>'Zahlung wurde abgebrochen',
+ 'alert_link_appointed'=>'Zahlung wurde genehmigt',
+ 'alert_link_paid'=>'Zahlung war erfolgreich',
'failed' => 'abbruch',
'no_payment' => 'keine Zahlung',
-
+ 'link_was_paid' => 'Die Zahlung wurde erfolgreich abgeschlossen.',
'paymend_paid' => 'Zahlung bezahlt',
'paymend_open' => 'Zahlung offen',
'paymend_failed' => 'Zahlung abbruch',
@@ -121,7 +137,6 @@ return array (
'shop'=> 'Shop',
'external'=> 'extern',
'collective_invoice'=> 'Sammelrechnung',
-
'in_process'=> 'in Bearbeitung',
'shipped'=> 'versendet',
'completed'=> 'abgeschlossen',
diff --git a/resources/lang/de/tables.php b/resources/lang/de/tables.php
index ba37609..5f87cb8 100644
--- a/resources/lang/de/tables.php
+++ b/resources/lang/de/tables.php
@@ -1,6 +1,6 @@
'',
'VAT' => 'MwSt',
'account' => 'Account',
@@ -76,5 +76,19 @@ return array (
'type' => 'Art',
've' => 'VE',
'vk_price' => 'VK-Preis',
- 'my_commission' => 'Meine Provision',
+ 'my_commission' => 'Mein Provision',
+ 'start_date' => 'Start Datum',
+ 'next_date' => 'Nächste Ausführung',
+ 'last_date' => 'Letzte Ausführung',
+ 'abo_delivery_day' => 'Abo-Liefertag',
+ 'abo_delivery' => 'Abo-Lieferungen',
+ 'active' => 'Aktiv',
+ 'is_for' => 'Ist für',
+ 'count' => 'Anzahl',
+ 'member' => 'Mitglied',
+ 'adviser' => 'Berater',
+ 'exc' => 'Ausf.',
+ 'executions' => 'Ausführungen',
+ 'previous_orders' => 'bisherige Kundebestellungen',
+ 'partner_since' => 'Partner seit',
);
diff --git a/resources/lang/de/team.php b/resources/lang/de/team.php
index 4f03a1b..0d93398 100644
--- a/resources/lang/de/team.php
+++ b/resources/lang/de/team.php
@@ -22,7 +22,7 @@ return array (
'current_commission_level' => 'aktuelle Provisions-Stufe',
'customer_commission' => 'Kundenprovision',
'consultant_margin' => 'Beratermarge',
- 'consultant_margin_info' => 'Hinweis: Die Marge wurde bei der Bestellung (an den Produkten) bereits abgezogen.',
+ 'consultant_margin_info' => 'Hinweis: Die Marge wurde bei der Bestellung bereits abgezogen und somit schon ausbezahlt.',
'customer_points' => 'Kunden Points',
'date' => 'Datum',
'e' => 'E',
diff --git a/resources/lang/en/abo.php b/resources/lang/en/abo.php
new file mode 100644
index 0000000..25926b0
--- /dev/null
+++ b/resources/lang/en/abo.php
@@ -0,0 +1,40 @@
+ 'Subscription',
+ 'payment_for_abo' => 'Payment method for subscription',
+ 'abo_delivery' => 'Subscription - regular delivery',
+ 'abo_are_for_me_and_shipped' => 'Subscription is for me and will be shipped to my address',
+ 'abo_are_for_customer_and_shipped' => 'Subscription is for a customer and will be sent to the customer',
+ 'abo_delivery_to_me' => 'Subscription delivery to me',
+ 'abo_delivery_to_the_customer' => 'Subscription delivery to the customer',
+ 'every_week' => 'every week',
+ 'every_weeks' => 'every :num weeks',
+ 'abo_settings' => 'Subscription settings',
+ 'delivery_interval' => 'customize delivery interval',
+ 'abo_order_info' => 'By completing the subscription, a regular delivery is set up, which is automatically delivered and billed at the specified interval, starting today. Adjustments to the subscription can be made in the customer account. Possible payment methods are PayPal and credit card.',
+ 'abo_infos' => 'Subscription info',
+ 'abo_delivery_infos' => 'Subscription delivery information',
+ 'abo_start_date' => 'Start date of the subscription',
+ 'abo_delivery_interval' => 'Delivery interval of the subscription',
+ 'abo_settings' => 'Subscription settings',
+ 'add_new_abo' => 'Add new subscription',
+ 'abo_edit' => 'Edit subscription',
+ 'abo_details' => 'Subscription details',
+ 'abo_is_active' => 'Subscription is active',
+ 'abo_copy_active' => 'If the subscription is not active, it will not be executed automatically',
+ 'abo_copy_next_date' => 'The next execution date can be set to the following day at the earliest',
+ 'abo_copy_abo_interval' => 'The adjustment of the subscription interval does not affect the next execution date, but affects the dates after the next execution',
+ 'error_abo_interval' => 'The subscription interval is not correct',
+ 'error_next_date' => 'The date for the next execution is not correct',
+ 'checkout_mail_abo_hl' => 'Your subscription / regular delivery',
+ 'checkout_mail_abo_start' => 'Your subscription was successfully created with the following settings:',
+ 'checkout_mail_abo_info' => 'You can find your subscription settings in your account under "My subscriptions" and the settings can also be edited there',
+ 'abo_new' => 'new',
+ 'abo_okay' => 'okay',
+ 'abo_hold' => 'stopped',
+ 'abo_cancel' => 'canceled',
+ 'abo_finish' => 'finished',
+ 'abo_inactive' => 'inactive',
+ 'abo_grace' => 'grace',
+);
diff --git a/resources/lang/en/membership.php b/resources/lang/en/membership.php
index 9fd2b1e..0a87872 100644
--- a/resources/lang/en/membership.php
+++ b/resources/lang/en/membership.php
@@ -7,6 +7,7 @@ return array (
'abo_copy_3' => 'I hereby confirm that I will delete my SEPA and deactivate the automatic extension.',
'active' => 'active',
'active_package' => 'active package',
+ 'alert_contract_renewal' => 'To extend your consultant membership, please complete the payment for your booked MIVITA package.',
'booked_package' => 'booked package',
'change' => 'adjust',
'change_copy_1' => 'You can change your membership until the next contract extension, on :date.',
@@ -38,9 +39,10 @@ return array (
'home_copy_last_36' => 'As announced, we have paused your advisor account because you did not renew your membership in time. If you would like to benefit from the advantages and features of MIVITA again, you can reactivate your account at any time.',
'home_hl' => 'membership / annual fee',
'inactive' => 'inactive',
+ 'info_contract_renewal' => 'Your contract will be automatically extended :days before your consultant membership expires. Once the contract has been extended, it is no longer possible to change the consultant package and you must make the payment for your membership.',
'is_no_longer_possible_to_change_package' => 'It is no longer possible to change your advisor package.',
'membership' => 'membership',
- 'membership_was_renewed' => 'Your membership was renewed on :date.',
+ 'membership_was_renewed' => 'Your contract was renewed on :date.',
'open_payment_options' => 'open payment options',
'payment_copy_1' => 'Alternatively, you now have the option of paying for your membership directly using other payment options.',
'payment_copy_2' => 'If the membership is paid before the :date, the SEPA mandate will not be executed!',
diff --git a/resources/lang/es/abo.php b/resources/lang/es/abo.php
new file mode 100644
index 0000000..352cee7
--- /dev/null
+++ b/resources/lang/es/abo.php
@@ -0,0 +1,40 @@
+ 'Suscripción',
+ 'payment_for_abo' => 'Forma de pago para la suscripción',
+ 'abo_delivery' => 'Suscripción - entrega regular',
+ 'abo_are_for_me_and_shipped' => 'La suscripción es para mí y se enviará a mi dirección',
+ 'abo_are_for_customer_and_shipped' => 'La suscripción es para un cliente y será enviada al cliente',
+ 'abo_delivery_to_me' => 'Envío de la suscripción a mi dirección',
+ 'abo_delivery_to_the_customer' => 'Entrega de suscripción al cliente',
+ 'every_week' => 'cada semana',
+ 'every_weeks' => 'cada :num semanas',
+ 'abo_settings' => 'Ajustes de suscripción',
+ 'delivery_interval' => 'personalizar intervalo de entrega',
+ 'abo_order_info' => 'Al completar la suscripción, se establece una entrega regular, que se entrega y factura automáticamente en el intervalo especificado, a partir de hoy. Los ajustes a la suscripción se pueden hacer en la cuenta del cliente. Los métodos de pago posibles son PayPal y tarjeta de crédito.',
+ 'abo_infos' => 'Información de suscripción',
+ 'abo_delivery_infos' => 'Información de entrega de la suscripción',
+ 'abo_start_date' => 'Fecha de inicio de la suscripción',
+ 'abo_delivery_interval' => 'Intervalo de entrega de la suscripción',
+ 'abo_settings' => 'Configuración de la suscripción',
+ 'add_new_abo' => 'Añadir nueva suscripción',
+ 'abo_edit' => 'Editar suscripción',
+ 'abo_details' => 'Detalles de suscripción',
+ 'abo_is_active' => 'La suscripción está activa',
+ 'abo_copy_active' => 'Si la suscripción no está activa, no se ejecutará automáticamente',
+ 'abo_copy_next_date' => 'La siguiente fecha de ejecución puede establecerse como muy pronto al día siguiente',
+ 'abo_copy_abo_interval' => 'El ajuste del intervalo de suscripción no afecta a la siguiente fecha de ejecución, pero afecta a las fechas posteriores a la siguiente ejecución',
+ 'error_abo_interval' => 'El intervalo de suscripción no es correcto',
+ 'error_next_date' => 'La fecha de la siguiente ejecución no es correcta',
+ 'checkout_mail_abo_hl' => 'Su suscripción / entrega regular',
+ 'checkout_mail_abo_start' => 'Su suscripción se ha creado correctamente con la siguiente configuración:',
+ 'checkout_mail_abo_info' => 'Puede encontrar la configuración de su suscripción en su cuenta en «Mis suscripciones» y la configuración también se puede editar allí',
+ 'abo_new' => 'nuevo',
+ 'abo_okay' => 'ok',
+ 'abo_hold' => 'parado',
+ 'abo_cancel' => 'cancelado',
+ 'abo_finish' => 'terminado',
+ 'abo_inactive' => 'inactivo',
+ 'abo_grace' => 'gracia',
+);
diff --git a/resources/lang/es/cal.php b/resources/lang/es/cal.php
index bce94f5..e016bf5 100644
--- a/resources/lang/es/cal.php
+++ b/resources/lang/es/cal.php
@@ -11,7 +11,7 @@ return array (
'July' => 'julio',
'June' => 'junio',
'March' => 'marzo',
- 'May' => 'puede',
+ 'May' => 'mayo',
'November' => 'noviembre',
'October' => 'octubre',
'September' => 'septiembre',
diff --git a/resources/lang/es/homeparty.php b/resources/lang/es/homeparty.php
index 6abc192..8b2b022 100644
--- a/resources/lang/es/homeparty.php
+++ b/resources/lang/es/homeparty.php
@@ -14,18 +14,18 @@ return array (
'create_guest' => 'crear invitado',
'create_guests' => 'crear invitados',
'create_guests_info' => 'Luego se pueden crear invitados y realizar pedidos.',
- 'create_new_homeparty' => 'crear un nuevo grupo de tiempo muerto',
+ 'create_new_homeparty' => 'Recrea la fiesta de descanso',
'credit_bonus' => 'bonificación de crédito',
- 'credit_homeparty_voucher' => 'bono de fiesta de tiempo muerto de crédito',
+ 'credit_homeparty_voucher' => 'bono de fiesta de descanso de crédito',
'current_bonus_view' => 'vista de bonificación actual',
'data_protection' => 'protección de Datos',
'data_protection_reasons_your_personal_data_will_not_be_shown' => 'Nota: Por motivos de protección de datos, sus datos personales no se mostrarán aquí a otros participantes. Una vez enviados, ya no se pueden editar. Si desea realizar un cambio más adelante, comuníquese con su asesor personal de MIVITA.',
'deduct_points_by_voucher' => 'deducción de puntos mediante bono',
- 'delivery_address_homeparty' => 'fiesta de tiempo de espera de dirección de entrega',
+ 'delivery_address_homeparty' => 'Dirección de entrega de la fiesta de descanso',
'delivery_directly_to_the_guest' => 'entrega directamente al huésped.',
'delivery_to_host' => 'entrega al anfitrión',
'description_welcome_text' => 'descripción/texto de bienvenida',
- 'enter_your_personal_data_for_homeparty' => 'introduce tus datos personales para la fiesta de tiempo muerto',
+ 'enter_your_personal_data_for_homeparty' => 'Introduce tus datos personales para la fiesta de descanso',
'event_date' => 'fecha del evento',
'event_place' => 'evento',
'from' => 'lejos',
@@ -36,14 +36,14 @@ return array (
'guest_order_sent_directly_info' => 'Si un huésped desea que su pedido se envíe directamente a su dirección personal, puede especificarlo por separado durante el proceso de pedido.',
'guests' => 'invitados',
'homeparty' => 'Fiesta de descanso',
- 'homeparty_add_host_address_info' => 'Ingrese la dirección del anfitrión donde se organiza la fiesta de tiempo muerto.',
- 'homeparty_delete_really' => '¿Realmente eliminar la fiesta de tiempo muerto?',
+ 'homeparty_add_host_address_info' => 'Ingrese la dirección del anfitrión donde se organiza la fiesta de descanso.',
+ 'homeparty_delete_really' => '¿Realmente eliminar la fiesta de descanso?',
'homeparty_invoice_info' => 'La factura de mivita se enviará a su dirección (consultor). Usted es responsable de facturar al anfitrión y a los invitados.',
- 'homeparty_manage' => 'gestionar fiesta de tiempo muerto',
+ 'homeparty_manage' => 'gestionar fiesta de descanso',
'host' => 'anfitriona',
'host_address_save' => 'guardar dirección de host',
'host_can_not_delete' => 'el host no se puede eliminar',
- 'host_homeparty' => 'anfitrión: fiesta de tiempo muerto',
+ 'host_homeparty' => 'anfitrión: fiesta de descanso',
'host_organiser_event' => 'anfitrión/organizador',
'invitation' => 'invitación',
'invitation_link_for_guests' => 'enlace de invitación para invitados.',
@@ -65,9 +65,9 @@ return array (
'voucher_bonus' => 'bono de vale',
'voucher_bonus_cannot_be_applied' => 'El cupón/bono no se puede aplicar porque el anfitrión no ha agregado ningún producto.',
'voucher_total' => 'bono total',
- 'welcome_copy' => 'Bienvenidos a nuestra fiesta time-out sobre aloe vera ecológico y cosmética natural. Le informaremos sobre lo que realmente significa calidad superior en cosmética natural, le mostraremos muchos ejemplos de aplicaciones para problemas de la piel y los intestinos y, por supuesto, podrá probar nuestros productos exhaustivamente. ¡Esperamos verte!',
+ 'welcome_copy' => 'Bienvenidos a nuestra fiesta de descando sobre aloe vera ecológico y cosmética natural. Le informaremos sobre lo que realmente significa calidad superior en cosmética natural, le mostraremos muchos ejemplos de aplicaciones para problemas de la piel y los intestinos y, por supuesto, podrá probar nuestros productos exhaustivamente. ¡Esperamos verte!',
'your_MIVITA_advice' => 'tu consejo MIVITA',
- 'your_data_has_been_successfully_created_have_fun' => 'Tus datos han sido creados exitosamente. ¡Diviértete en la fiesta del descanso!',
+ 'your_data_has_been_successfully_created_have_fun' => 'Tus datos han sido creados exitosamente. ¡Diviértete en la fiesta de descanso!',
'your_host' => 'tu anfitrión',
'your_hostess' => 'tu anfitriona',
);
diff --git a/resources/lang/es/membership.php b/resources/lang/es/membership.php
index 7c9e134..86be59f 100644
--- a/resources/lang/es/membership.php
+++ b/resources/lang/es/membership.php
@@ -7,6 +7,7 @@ return array (
'abo_copy_3' => 'Por la presente confirmo que eliminaré mi SEPA y desactivaré la extensión automática.',
'active' => 'activo',
'active_package' => 'paquete activo',
+ 'alert_contract_renewal' => 'Para ampliar su afiliación como consultor, complete el pago de su paquete MIVITA reservado.',
'booked_package' => 'paquete reservado',
'change' => 'ajustar',
'change_copy_1' => 'Puedes cambiar tu membresía hasta la próxima extensión de contrato, el :date.',
@@ -38,9 +39,10 @@ return array (
'home_copy_last_36' => 'Como lo anunciamos, hemos pausado su cuenta de asesor porque no renovó su membresía a tiempo. Si deseas volver a beneficiarte de las ventajas y características de MIVITA, puedes reactivar tu cuenta en cualquier momento.',
'home_hl' => 'membresía / cuota anual',
'inactive' => 'inactivo',
+ 'info_contract_renewal' => 'Su contrato se renovará automáticamente :días antes de que expire su afiliación como consultor. Una vez prorrogado el contrato, ya no será posible cambiar el paquete de consultor y deberá abonar su afiliación.',
'is_no_longer_possible_to_change_package' => 'Ya no es posible cambiar su paquete de asesor.',
'membership' => 'membresía',
- 'membership_was_renewed' => 'Su membresía fue renovada el :date.',
+ 'membership_was_renewed' => 'Su contrato se prorrogó en :date.',
'open_payment_options' => 'abrir opciones de pago',
'payment_copy_1' => 'Alternativamente, ahora tiene la opción de pagar su membresía directamente utilizando otras opciones de pago.',
'payment_copy_2' => 'Si la membresía se paga antes de la :date, ¡el mandato SEPA no se ejecutará!',
diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php
index cdd11cc..34d4542 100644
--- a/resources/lang/es/validation.php
+++ b/resources/lang/es/validation.php
@@ -65,8 +65,8 @@ return array (
'shipping_salutation' => 'saludo',
'shipping_zipcode' => 'código postal',
'size' => 'tamaño',
- 'tax_identification_number' => 'número de identificación tributaria',
- 'tax_number' => 'número de impuesto',
+ 'tax_identification_number' => 'número de RIO',
+ 'tax_number' => 'número de impuesto (NIE ó NIF)',
'time' => 'tiempo',
'title' => 'título',
'user_shop_active' => 'condiciones de uso',
diff --git a/resources/lang/es/website.php b/resources/lang/es/website.php
index 8aa3512..130ed3b 100644
--- a/resources/lang/es/website.php
+++ b/resources/lang/es/website.php
@@ -21,7 +21,7 @@ return array (
'contents' => 'contenido',
'email' => 'correo electrónico',
'for_you_on_spot' => 'para ti en el sitio',
- 'for_you_on_spot_copy' => 'Estuvimos a su disposición en Aloe Vera Farm en Mallorca, porque para nosotros la transparencia es importante. De esta manera sabrá exactamente de dónde provienen sus productos y cómo se producen. Calidad auténtica.',
+ 'for_you_on_spot_copy' => 'La transparencia es muy imprtante para nosotros. Por eso estuvimos en Mallorca para visitar la granja de Aloe Vera. Para que sepa exactamente de dónde proceden nuestros productos y cómo se producen.',
'gtc' => 'condiciones',
'impress' => 'imprimir',
'language' => 'idioma',
@@ -33,7 +33,7 @@ return array (
'note_on_use_copy' => '¡El uso, reproducción, distribución, publicación o uso comercial no autorizado sin el permiso del autor del contenido de este sitio web está prohibido y será perseguido tanto bajo la ley penal como civil!',
'online_dispute_resolution' => 'resolución de disputas en línea',
'online_dispute_resolution_copy' => 'Según el artículo 14, apartado 1, ODR-VO: la Comisión Europea proporciona una plataforma para la resolución de disputas (OS) en línea, que puede encontrar aquí',
- 'partner' => 'pareja',
+ 'partner' => 'socio',
'payment_methods' => 'métodos de pago',
'phone' => 'teléfono',
'phone_number' => 'teléfono: +49 (0) 8333 946 17 67',
@@ -70,7 +70,7 @@ return array (
'to_privacy_policy' => 'declaracion de privacidad',
'we_will_get_back_to_you' => 'Le contactaremos inmediatamente.',
'welcome' => 'bienvenido',
- 'welcome_copy' => 'Espero su visita a mi tienda online MIVITA. Soy tu consejo personal sobre los productos y su aplicación.',
+ 'welcome_copy' => 'Espero su visita a mi tienda online MIVITA. Soy tu asesor personal sobre los productos y su aplicación.',
'yes' => 'SÍ',
'you_are_now_in_shop' => 'Estás en la tienda:',
'you_are_now_in_shop_notice' => 'Nota importante: Los pedidos en el país seleccionado solo se pueden enviar dentro de ese país. Si cambia su país, se cerrará su sesión actual y se vaciará su carrito de compras.',
diff --git a/resources/views/admin/abo/_detail.blade.php b/resources/views/admin/abo/_detail.blade.php
new file mode 100644
index 0000000..62fe806
--- /dev/null
+++ b/resources/views/admin/abo/_detail.blade.php
@@ -0,0 +1,109 @@
+
+
+
+
+
+
{{ __('tables.start_date') }}
+ {{ $user_abo->start_date }}
+
+
+
{{ __('tables.next_date') }}
+
{{ $user_abo->next_date }}
+
+
+
{{ __('tables.abo_delivery_day') }}
+
{{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
+
+
+
{{ __('tables.last_date') }}
+ {{ $user_abo->last_date }}
+
+
+
+
+
+
+
+
+
{{ __('tables.status') }} / {{ __('tables.active') }}
+ {!! $user_abo->getStatusFormated() !!} {!! get_active_badge($user_abo->active) !!}
+
+
+
{{ __('tables.abo_delivery') }}
+ {{ $user_abo->getCountOrders() }}
+
+
+
+
+
{{ __('tables.payment') }}
+ {{ $user_abo->getPaymentType() }}
+
+
+
{{ __('tables.amount') }}
+
{{ $user_abo->getFormattedAmount() }} €
+
+
+
+
+
+ @if($isAdmin)
+
+
+
+ {{ __('abo.abo_settings') }}
+
+
+
+
+
+
{{ __('tables.is_for') }}
+ {!! $user_abo->getIsForFormated() !!}
+ @if($user_abo->is_for === 'me')
+
+
+ @endif
+
+ @if($user_abo->is_for === 'ot')
+
+ @endif
+
+
+
+
+ @else
+
+
+
+ {{ __('abo.abo_settings') }}
+
+
+
+ {!! $user_abo->getIsForFormated() !!}
+ @if($user_abo->is_for === 'me')
+
+
+ @endif
+
+ @if($user_abo->is_for === 'ot')
+
+ @endif
+
+
+
+ @endif
+
+
+
\ No newline at end of file
diff --git a/resources/views/admin/abo/_executions.blade.php b/resources/views/admin/abo/_executions.blade.php
new file mode 100644
index 0000000..e35053d
--- /dev/null
+++ b/resources/views/admin/abo/_executions.blade.php
@@ -0,0 +1,109 @@
+
+
+
+ {{ __('navigation.abo') }} {{ __('tables.executions') }}
+
+
+
+
+
+
+
+ #
+ {{__('tables.date')}}
+ {{__('tables.amount')}}
+ {{__('tables.payment')}}
+ {{__('tables.status')}}
+ {{__('tables.shipping')}}
+ {{__('tables.art')}}
+ {{__('tables.invoice')}}
+ {{__('tables.firstname')}}
+ {{__('tables.lastname')}}
+ {{__('tables.email')}}
+ {{__('tables.status')}}
+
+ {{__('tables.rf_no')}}
+
+ @if($user_abo->user_abo_orders)
+ @foreach($user_abo->user_abo_orders()->orderBy('id', 'desc')->get() as $user_abo_order)
+ @if($user_abo_order->shopping_order)
+
+
+ @if($isAdmin)
+ @if($user_abo->is_for === 'me')
+ {!! ''.$user_abo_order->shopping_order_id.' ' !!}
+ @endif
+ @if($user_abo->is_for === 'ot')
+ {!! ''.$user_abo_order->shopping_order_id.' ' !!}
+ @endif
+ @else
+ @if($user_abo->is_for === 'me')
+ {!! ''.$user_abo_order->shopping_order_id.' ' !!}
+ @endif
+ @if($user_abo->is_for === 'ot')
+ {!! ''.$user_abo_order->shopping_order_id.' ' !!}
+ @endif
+ @endif
+
+
+ {!! $user_abo_order->shopping_order->created_at->format("d.m.Y H:i") !!}
+
+
+ {!! $user_abo_order->shopping_order->getFormattedTotalShipping() !!} €
+
+
+ {!! $user_abo_order->shopping_order->getLastShoppingPayment('getPaymentType'); !!}
+
+
+ {!! \App\Services\Payment::getShoppingOrderBadge($user_abo_order->shopping_order) !!}
+
+
+ {!! ''.$user_abo_order->shopping_order->getShippedType().' ' !!}
+
+
+ {!! ''.$user_abo_order->shopping_order->getPaymentForType().' ' !!}
+
+
+ @if($user_abo_order->shopping_order->isInvoice())
+ {!! '
+ ' !!}
+ @endif
+
+
+ {{ $user_abo_order->shopping_order->shopping_user->shipping_firstname }}
+
+
+ {{ $user_abo_order->shopping_order->shopping_user->shipping_lastname }}
+
+
+ {{ $user_abo_order->shopping_order->shopping_user->shipping_email }}
+
+
+ {!! $user_abo_order->getStatusFormated()!!}
+
+
+ {{ $user_abo_order->shopping_order->getLastShoppingPayment('reference') }}
+
+
+ @endif
+ @endforeach
+ @endif
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/admin/abo/_order_abo.blade.php b/resources/views/admin/abo/_order_abo.blade.php
new file mode 100644
index 0000000..175a9c7
--- /dev/null
+++ b/resources/views/admin/abo/_order_abo.blade.php
@@ -0,0 +1,123 @@
+
+
+
+
+
+ {{ __('abo.abo_order_hl') }}
+
+
{{ __('abo.abo_order_info') }}
+
+ @include('user.abo.vat_info')
+
+
{{ __('abo.add_product') }}
+
+
+ @include('admin.abo._order_abo_show')
+
+
+
\ No newline at end of file
diff --git a/resources/views/admin/abo/_order_abo_show.blade.php b/resources/views/admin/abo/_order_abo_show.blade.php
new file mode 100644
index 0000000..93a1ea6
--- /dev/null
+++ b/resources/views/admin/abo/_order_abo_show.blade.php
@@ -0,0 +1,93 @@
+@if(isset($error_message) && $error_message)
+{{ $error_message }}
+@endif
+
+
+
+ #
+ {{__('order.article')}}
+ {{__('tables.quantity')}}
+ {{ __('tables.price') }}
+
+
+
+ @if($user_abo->user_abo_items)
+ @foreach($user_abo->user_abo_items as $abo_item)
+ @if(!$abo_item->comp)
+
+
+ @if(count($abo_item->product->images))
+
+ @endif
+
+
+
+ {{ $abo_item->product->getLang('name') }}
+ {!! get_abo_type_badge_by_product($abo_item->product) !!}
+
+
{{ __('order.content') }}: {{ $abo_item->product->contents }}
+
{{ __('order.art_no') }}: {{ $abo_item->product->number }}
+
+
+
+
+
+
+
+ {{ $abo_item->getFormattedTotalPrice() }} €
+
+
+ @endif
+ @endforeach
+ @endif
+
+
+
+
+
+
+ {{ __('order.subtotal') }}:
+ {{ Yard::instance('shopping')->subtotal() }} €
+
+
+ {{ __('Delivery country') }}:
+ {{ Yard::instance('shopping')->getShippingCountryName() }}
+
+
+ {{ __('order.shipping_costs') }}:
+ {{ Yard::instance('shopping')->shipping() }} €
+
+ @if(Yard::instance('shopping')->getUserTaxFree())
+
+ {{ __('order.sum_net') }}:
+ {{ Yard::instance('shopping')->subtotalWithShipping() }} €
+
+ @else
+
+ {{ __('order.total_without_VAT') }}:
+ {{ Yard::instance('shopping')->subtotalWithShipping() }} €
+
+
+ {{ __('order.plus_VAT') }}:
+ {{ Yard::instance('shopping')->taxWithShipping() }} €
+
+ @endif
+
+ {{ __('order.total_sum') }}:
+ {{ Yard::instance('shopping')->totalWithShipping() }} €
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/admin/abo/detail.blade.php b/resources/views/admin/abo/detail.blade.php
new file mode 100644
index 0000000..38a6b01
--- /dev/null
+++ b/resources/views/admin/abo/detail.blade.php
@@ -0,0 +1,61 @@
+@extends('layouts.layout-2')
+
+@section('content')
+
+
+ {{ __('back') }}
+ {{ __('navigation.abo') }} {{ '#'.$user_abo->payone_userid }}
+
+
+
+@if(Session::has('alert-error'))
+
+
+
+ {{ Session::get('alert-error') }}
+
+
+
+@endif
+
+ @include('admin.abo._detail')
+
+
+ @include('admin.customer._customer_detail', ['shopping_user' => $customer_detail])
+
+
+ {!! Form::open(['url' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!}
+
+
+ @include('admin.abo._order_abo')
+
+
+ @if($comp_products && Yard::instance('shopping')->getNumComp() > 0)
+
+ @include('user.order.comp_product')
+
+ @endif
+
+{{ Form::close() }}
+
+
+ @include('admin.abo._executions')
+
+
+
+ {{ __('back') }}
+
+
+
+@endsection
+
+@section('scripts')
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/abo/index.blade.php b/resources/views/admin/abo/index.blade.php
new file mode 100644
index 0000000..77906ba
--- /dev/null
+++ b/resources/views/admin/abo/index.blade.php
@@ -0,0 +1,118 @@
+@extends('layouts.layout-2')
+
+@section('content')
+
+
+
+ {{ __('Abos') }}
+
+
+ {{--
+
+ --}}
+
+
+
+
+ #
+ {{__('tables.start_date')}}
+ {{__('tables.next_date')}}
+ {{__('tables.abo_delivery_day')}}
+ {{__('tables.status')}}
+ {{__('tables.active')}}
+ {{__('tables.is_for')}}
+ {{__('First name')}}
+ {{__('Last name')}}
+ {{__('E-Mail')}}
+ {{__('tables.exc')}}
+ {{__('tables.amount')}}
+ {{__('tables.payment')}}
+ {{__('tables.adviser')}}
+ {{__('PayOneID')}}
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/admin/abo/modal_abo_update.blade.php b/resources/views/admin/abo/modal_abo_update.blade.php
new file mode 100644
index 0000000..cfcf99b
--- /dev/null
+++ b/resources/views/admin/abo/modal_abo_update.blade.php
@@ -0,0 +1,88 @@
+{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
+
+
+
+
+
+
+ @if($data['view'] !== 'admin' && ($user_abo->user_id != \Auth::user()->id && $user_abo->member_id != \Auth::user()->id))
+
+ Unauthorized action. Is not my abo
+
+ @else
+
+
+
+
+ {{--
+
+ --}}
+
+
+
+ @endif
+
+
+
+{!! Form::close() !!}
+
+
+
diff --git a/resources/views/admin/category/products.blade.php b/resources/views/admin/category/products.blade.php
index d423615..c121f7e 100644
--- a/resources/views/admin/category/products.blade.php
+++ b/resources/views/admin/category/products.blade.php
@@ -41,7 +41,7 @@
@else
|
@endif
- | {!! implode($product_category->product->getShowOnTypes(), ' / ') !!}
+ | {!! implode(' / ', $product_category->product->getShowOnTypes()) !!}
|
@else
-
diff --git a/resources/views/admin/customer/_customer_detail.blade.php b/resources/views/admin/customer/_customer_detail.blade.php
index 0c7403d..7c1154a 100644
--- a/resources/views/admin/customer/_customer_detail.blade.php
+++ b/resources/views/admin/customer/_customer_detail.blade.php
@@ -47,6 +47,10 @@
{{ __('Phone') }}
{{ $shopping_user->billing_phone }}
+
+
{{ __('E-Mail') }}
+ @if($shopping_user->faker_mail) "-" @else {{ $shopping_user->billing_email }} @endif
+
diff --git a/resources/views/admin/customer/_detail.blade.php b/resources/views/admin/customer/_detail.blade.php
index 2c86068..84eb564 100644
--- a/resources/views/admin/customer/_detail.blade.php
+++ b/resources/views/admin/customer/_detail.blade.php
@@ -90,8 +90,8 @@
{{ __('customer.about_shop') }}
- @if($shopping_user->shopping_order)
- @if($shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop())
+ @if($shopping_user->shopping_order && $shopping_user->shopping_order->user_shop)
+ @if($shopping_user->shopping_order->user_shop->user && $shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop())
{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}
@else
{{$shopping_user->shopping_order->user_shop->getSubdomain(false)}}
@@ -195,7 +195,6 @@
@endif
@endif
-
@endif
+
+
+
+ {{ __('tables.previous_orders') }}
+
+
+
+
+
+ #
+ {{__('tables.date')}}
+ {{__('tables.amount')}}
+ {{__('tables.status')}}
+ {{__('tables.shipping')}}
+ {{__('tables.art')}}
+
+ @if($shopping_user->shopping_order)
+ @forelse($shopping_user->getAllOrdersByMember() as $shopping_order)
+
+
+
+
+
+
+ {{ $shopping_order->created_at->format('d.m.Y') }}
+
+
+ {{ $shopping_order->getFormattedTotalShipping() }} €
+
+
+ {!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!}
+
+
+ {{ $shopping_order->getShippedType() }}
+
+
+ {!! \App\Services\Payment::getPaymentForBadge($shopping_order) !!}
+
+ @empty
+
+ {{ __('order.no_orders_found') }}
+
+ @endforelse
+ @endif
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/admin/modal/show_user_customers.blade.php b/resources/views/admin/modal/show_user_customers.blade.php
index a6752e2..8dcc1c0 100644
--- a/resources/views/admin/modal/show_user_customers.blade.php
+++ b/resources/views/admin/modal/show_user_customers.blade.php
@@ -21,8 +21,6 @@
{{ __('City') }}
{{ __('Country') }}
{{__('Käufe')}}
- {{__('Newsletter')}}
- {{__('erstellt')}}
{{__('tables.status')}}
{{__('ID Kunden')}}
WP
@@ -43,7 +41,7 @@
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
- d.isfor = "{{ $data['isfor'] }}";
+ d.isfor = "{{ $data['isfor'] }}";
}
},
"order": [[0, "desc" ]],
@@ -58,8 +56,6 @@
{ data: 'billing_city', name: 'billing_city' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
- { data: 'subscribed', name: 'subscribed' },
- { data: 'first_created_at', name: 'first_created_at' },
{data: 'status', name: 'status', searchable: false, orderable: false },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
@@ -75,6 +71,5 @@
});
-
-
+
\ No newline at end of file
diff --git a/resources/views/admin/payment/credit_detail.blade.php b/resources/views/admin/payment/credit_detail.blade.php
index e81b3d1..20f418e 100644
--- a/resources/views/admin/payment/credit_detail.blade.php
+++ b/resources/views/admin/payment/credit_detail.blade.php
@@ -90,6 +90,78 @@
@endif
+
+ {{-- Eigene Marge --}}
+ @if (isset($collection->own_order[$date]))
+ @php($order = $collection->own_order[$date])
+ @if (isset($cbot))
+
+ @endif
+
+
+
+
+ {{ __('tables.date') }}
+ {{ __('tables.net_sales') }}
+ {{ __('tables.margin') }} %
+ {{ __('tables.margin') }} €
+ {{ __('tables.order') }}
+
+
+
+ @foreach ($order->user_sales_volumes as $user_sales_volume)
+
+ {{ $user_sales_volume->date }}
+ {{ formatNumber($user_sales_volume->total_net) }} €
+ {{ $cbot->business_user->margin }} %
+ {{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} €
+
+ {{ $user_sales_volume->shopping_order_id }}
+ @if ($user_sales_volume->shopping_order)
+ {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}
+ @endif
+
+
+ @endforeach
+
+
+
+ {{ __('tables.total') }}
+ {{ formatNumber($order->credit_total_net) }} €
+
+ {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} €
+
+
+
+
+
+
+ @endif
+
+ {{-- Provision Shop --}}
@if (isset($collection->commission_shop[$date]))
@php($cs = $collection->commission_shop[$date])
@if (isset($cbot))
@@ -159,8 +231,8 @@
-
- {{ __('tables.total') }}
+
+ {{ __('tables.total') }}
{{ formatNumber($cs->user_sales_volumes_total->month_shop_total_net) }} €
{{ formatNumber($cbot->business_user->commission_shop_sales) }} €
@@ -173,78 +245,9 @@
@endif
- @if (isset($collection->own_order[$date]))
- @php($order = $collection->own_order[$date])
- @if (isset($cbot))
-
- @endif
-
-
-
-
-
- {{ __('tables.date') }}
- {{ __('tables.net_sales') }}
- {{ __('tables.margin') }} %
- {{ __('tables.margin') }} €
- {{ __('tables.order') }}
-
-
-
- @foreach ($order->user_sales_volumes as $user_sales_volume)
-
- {{ $user_sales_volume->date }}
- {{ formatNumber($user_sales_volume->total_net) }} €
- {{ $cbot->business_user->margin }} %
- {{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} €
-
- {{ $user_sales_volume->shopping_order_id }}
- @if ($user_sales_volume->shopping_order)
- {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}
- @endif
-
-
- @endforeach
-
-
-
- {{ __('tables.total') }}
- {{ formatNumber($order->credit_total_net) }} €
-
- {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} €
-
-
-
-
-
-
-
- @endif
-
+
+ {{-- Points Registration
@if (isset($collection->commission_registration[$date]))
@php($cr = $collection->commission_registration[$date])
diff --git a/resources/views/pdf/credit_details_long.blade.php b/resources/views/pdf/credit_details_long.blade.php
index b716aaa..fcf7498 100644
--- a/resources/views/pdf/credit_details_long.blade.php
+++ b/resources/views/pdf/credit_details_long.blade.php
@@ -328,6 +328,11 @@
color: #565600;
}
+ .badge-info {
+ background-color: #28c3d7;
+ color: #fff;
+ }
+
.badge-outline-success {
background-color: #fff;
border-color: #64bc40;
@@ -452,6 +457,84 @@
@endif
+ {{-- Eigene Marge --}}
+ @if (isset($collection->own_order[$date]))
+
+ @php($order = $collection->own_order[$date])
+ @if (isset($cbot))
+
+ @endif
+
+
+
+
+ #
+ {{ __('Datum') }}
+ {{ __('Typ') }}
+ {{ __('Umsatz netto') }}
+ {{ __('tables.points') }}
+ {{ __('für') }}
+ {{ __('VE') }}
+ {{ __('Bestellung') }}
+
+
+
+ @foreach ($order->user_sales_volumes as $user_sales_volume)
+
+ {{ $user_sales_volume->id }}
+ {{ $user_sales_volume->date }}
+ {{ $user_sales_volume->getStatusType() }}
+ {{ formatNumber($user_sales_volume->total_net) }} €
+ {{ $user_sales_volume->points }}
+ {{ $user_sales_volume->getStatusPointsType() }}
+ {{ $user_sales_volume->getStatusTurnoverType() }}
+
+ {{ $user_sales_volume->shopping_order_id }}
+ @if ($user_sales_volume->shopping_order)
+ {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}
+ @endif
+
+
+ @endforeach
+
+
+
+ {{ __('tables.total') }}
+ {{ formatNumber($order->credit_total_net) }} €
+ {{ $order->credit_total_points }}
+
+
+
+
+
+
+
+ @endif
+
+ {{-- Provision Shop --}}
@if (isset($collection->commission_shop[$date]))
@php($cs = $collection->commission_shop[$date])
@@ -544,84 +627,9 @@
@endif
- @if (isset($collection->own_order[$date]))
-
- @php($order = $collection->own_order[$date])
- @if (isset($cbot))
-
- @endif
-
-
-
-
-
- #
- {{ __('Datum') }}
- {{ __('Typ') }}
- {{ __('Umsatz netto') }}
- {{ __('tables.points') }}
- {{ __('für') }}
- {{ __('VE') }}
- {{ __('Bestellung') }}
-
-
-
- @foreach ($order->user_sales_volumes as $user_sales_volume)
-
- {{ $user_sales_volume->id }}
- {{ $user_sales_volume->date }}
- {{ $user_sales_volume->getStatusType() }}
- {{ formatNumber($user_sales_volume->total_net) }} €
- {{ $user_sales_volume->points }}
- {{ $user_sales_volume->getStatusPointsType() }}
- {{ $user_sales_volume->getStatusTurnoverType() }}
-
- {{ $user_sales_volume->shopping_order_id }}
- @if ($user_sales_volume->shopping_order)
- {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}
- @endif
-
-
- @endforeach
-
-
-
- {{ __('tables.total') }}
- {{ formatNumber($order->credit_total_net) }} €
- {{ $order->credit_total_points }}
-
-
-
-
-
-
-
- @endif
+ {{-- Points Registration
@if (isset($collection->commission_registration[$date]))
@php($cr = $collection->commission_registration[$date])
@@ -674,9 +682,11 @@
@endif
-
+ --}}
@if (isset($cbot))
+
+ {{-- Gesamt
+ ––}}
+
+ {{-- Payline Points / Provision / Wachstumsbonus
-
+
+
+ --}}
diff --git a/resources/views/pdf/delivery-detail.blade.php b/resources/views/pdf/delivery-detail.blade.php
index 1fc3c96..a194a15 100644
--- a/resources/views/pdf/delivery-detail.blade.php
+++ b/resources/views/pdf/delivery-detail.blade.php
@@ -19,7 +19,7 @@
{{ maxStrLength($shopping_order_item->product->getLang('name'), 35) }}
- {{ $shopping_order_item->qty }}
+ {{ cleanIntegerFromString($shopping_order_item->qty) }}
@endforeach
diff --git a/resources/views/pdf/delivery-homeparty-detail.blade.php b/resources/views/pdf/delivery-homeparty-detail.blade.php
index 14d2907..648b4c0 100644
--- a/resources/views/pdf/delivery-homeparty-detail.blade.php
+++ b/resources/views/pdf/delivery-homeparty-detail.blade.php
@@ -9,7 +9,7 @@
{{ maxStrLength($value->product->getLang('name'), 35) }}
- {{ $value->qty }}
+ {{ cleanIntegerFromString($value->qty) }}
@endforeach
diff --git a/resources/views/pdf/invoice-collection.blade.php b/resources/views/pdf/invoice-collection.blade.php
index 13ae702..663e13b 100644
--- a/resources/views/pdf/invoice-collection.blade.php
+++ b/resources/views/pdf/invoice-collection.blade.php
@@ -28,13 +28,13 @@
{{ maxStrLength($shop_item['name'], 30) }}
- {{$shop_item['points_total']}}
+ {{ number_format($shop_item['points_total'], 0) }}
{{ formatNumber($shop_item['user_price_net']) }} €
- {{$shop_item['qty']}}
+ {{ number_format($shop_item['qty'], 0) }}
{{ formatNumber($shop_item['user_price_total_net']) }} €
@@ -80,7 +80,7 @@
- {{ $shopping_order->shopping_collect_order->qty_total }}
+ {{ cleanIntegerFromString($shopping_order->shopping_collect_order->qty_total) }}
diff --git a/resources/views/pdf/invoice-detail.blade.php b/resources/views/pdf/invoice-detail.blade.php
index e6d61b8..8bd873e 100644
--- a/resources/views/pdf/invoice-detail.blade.php
+++ b/resources/views/pdf/invoice-detail.blade.php
@@ -39,7 +39,7 @@
{{ $shopping_order_item->getFormattedPrice() }} €
- {{ $shopping_order_item->qty }}
+ {{ cleanIntegerFromString($shopping_order_item->qty) }}
{{ $shopping_order_item->getFormattedTaxRate() }}%
@@ -52,7 +52,7 @@
{{ $shopping_order_item->getFormattedPriceVkNet() }} €
- {{ $shopping_order_item->qty }}
+ {{ cleanIntegerFromString($shopping_order_item->qty) }}
{{ $shopping_order_item->points }}
diff --git a/resources/views/pdf/invoice-homeparty-detail.blade.php b/resources/views/pdf/invoice-homeparty-detail.blade.php
index 2b37d0a..649213b 100644
--- a/resources/views/pdf/invoice-homeparty-detail.blade.php
+++ b/resources/views/pdf/invoice-homeparty-detail.blade.php
@@ -9,7 +9,7 @@
{{ maxStrLength($value->product->getLang('name') , 35) }}
- {{ $value->qty }}
+ {{ cleanIntegerFromString($value->qty) }}
{{ $value->getFormattedTotalPoints() }}
diff --git a/resources/views/pdf/invoice-journal-collection.blade.php b/resources/views/pdf/invoice-journal-collection.blade.php
index 37f25e2..d12741c 100644
--- a/resources/views/pdf/invoice-journal-collection.blade.php
+++ b/resources/views/pdf/invoice-journal-collection.blade.php
@@ -106,7 +106,7 @@
{{ $shopping_order_item->getFormattedPrice() }} €
- {{ $shopping_order_item->qty }}
+ {{ cleanIntegerFromString($shopping_order_item->qty) }}
{{ $shopping_order_item->getFormattedTotalPrice() }} €
diff --git a/resources/views/user/abo/_bak_index.blade.php b/resources/views/user/abo/_bak_index.blade.php
new file mode 100644
index 0000000..ebf2916
--- /dev/null
+++ b/resources/views/user/abo/_bak_index.blade.php
@@ -0,0 +1,130 @@
+@extends('layouts.layout-2')
+
+@section('content')
+
+
+ @if($view === 'ot') {{ __('navigation.customerabos') }} @endif
+ @if($view === 'me') {{ __('navigation.myabos') }} @endif
+ / {{ __('navigation.overview') }}
+
+
+
+
+
+
+ @if($user_abos->isEmpty())
+
+
+
+
+
{{ __('abo.abo_delivery') }}
+
+
+
+
+
+
+
+
+
+ @endif
+ @foreach($user_abos as $user_abo)
+
+
+
+
+
+
+
{{ __('tables.start_date') }}
+
{{ $user_abo->start_date }}
+
+
+
{{ __('tables.next_date') }}
+
{{ $user_abo->next_date }}
+
+
+
{{ __('tables.abo_delivery_day') }}
+
{{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
+
+
+
{{ __('tables.last_date') }}
+
{{ $user_abo->last_date }} / {{ $user_abo->getCountOrders() }}
+
+
+
+
+
+
+
+
{{ __('tables.status') }}
+ {!! $user_abo->getStatusFormated() !!}
+
+
+
{{ __('tables.active') }}
+ {!! get_active_badge($user_abo->active) !!}
+
+
+
{{ __('tables.amount') }}
+ {{ $user_abo->getFormattedAmount() }} €
+
+
+
{{ __('tables.payment') }}
+ {{ $user_abo->getPaymentType() }}
+
+
+
+ @if($view === 'ot')
+
+
+
+
+
{{ __('First name') }}
+ @if($user_abo->shopping_user)
+ {{ $user_abo->shopping_user->billing_firstname }}
+ @endif
+
+
+
{{ __('Last name') }}
+ @if($user_abo->shopping_user)
+ {{ $user_abo->shopping_user->billing_lastname }}
+ @endif
+
+
+
{{ __('E-Mail') }}
+ @if($user_abo->shopping_user)
+ {{ $user_abo->shopping_user->billing_email }}
+ @endif
+
+
+
{{ __('tables.customer') }}
+ @if($user_abo->shopping_user)
+
+ @endif
+
+
+
+
+ @endif
+
+ @endforeach
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/user/abo/detail.blade.php b/resources/views/user/abo/detail.blade.php
new file mode 100644
index 0000000..3276120
--- /dev/null
+++ b/resources/views/user/abo/detail.blade.php
@@ -0,0 +1,65 @@
+@extends('layouts.layout-2')
+
+@section('content')
+
+
+ {{ __('back') }}
+
+
+ @if($view === 'ot') {{ __('navigation.customerabo') }} @endif
+ @if($view === 'me') {{ __('navigation.myabo') }} @endif
+ {{ '#'.$user_abo->payone_userid }}
+
+
+
+
+@if(Session::has('alert-error'))
+
+
+
+ {{ Session::get('alert-error') }}
+
+
+
+@endif
+
+ @include('admin.abo._detail')
+
+
+
+ @include('admin.customer._customer_detail', ['shopping_user' => $customer_detail])
+
+
+ {!! Form::open(['url' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!}
+
+
+ @include('admin.abo._order_abo')
+
+
+ @if($comp_products && Yard::instance('shopping')->getNumComp() > 0)
+
+ @include('user.order.comp_product')
+
+ @endif
+
+ {{ Form::close() }}
+
+
+ @include('admin.abo._executions')
+
+
+
+ {{ __('back') }}
+
+@endsection
+
+@section('scripts')
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/user/abo/index.blade.php b/resources/views/user/abo/index.blade.php
new file mode 100644
index 0000000..3f9a064
--- /dev/null
+++ b/resources/views/user/abo/index.blade.php
@@ -0,0 +1,130 @@
+@extends('layouts.layout-2')
+
+@section('content')
+
+
+ @if($view === 'ot') {{ __('navigation.customerabos') }} @endif
+ @if($view === 'me') {{ __('navigation.myabos') }} @endif
+ / {{ __('navigation.overview') }}
+
+
+
+
+
+
+ @if(!$user_abos || $user_abos->isEmpty())
+
+
+
+
+
{{ __('abo.abo_delivery') }}
+
+
+
+
+
+
+
+
+ @endif
+
+ @foreach($user_abos as $user_abo)
+
+
+
+
+
+
+
{{ __('tables.start_date') }}
+
{{ $user_abo->start_date }}
+
+
+
{{ __('tables.next_date') }}
+
{{ $user_abo->next_date }}
+
+
+
{{ __('tables.abo_delivery_day') }}
+
{{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
+
+
+
{{ __('tables.last_date') }}
+
{{ $user_abo->last_date }}
+
+
+
+
+
+
+
+
{{ __('tables.status') }} / {{ __('tables.active') }}
+ {!! $user_abo->getStatusFormated() !!} {!! get_active_badge($user_abo->active) !!}
+
+
+
{{ __('tables.abo_delivery') }}
+ {{ $user_abo->getCountOrders() }}
+
+
+
{{ __('tables.amount') }}
+ {{ $user_abo->getFormattedAmount() }} €
+
+
+
{{ __('tables.payment') }}
+ {{ $user_abo->getPaymentType() }}
+
+
+
+ @if($view === 'ot')
+
+
+
+
+
{{ __('First name') }}
+ @if($user_abo->shopping_user)
+ {{ $user_abo->shopping_user->billing_firstname }}
+ @endif
+
+
+
{{ __('Last name') }}
+ @if($user_abo->shopping_user)
+ {{ $user_abo->shopping_user->billing_lastname }}
+ @endif
+
+
+
{{ __('E-Mail') }}
+ @if($user_abo->shopping_user)
+ {{ $user_abo->shopping_user->billing_email }}
+ @endif
+
+
+
{{ __('tables.customer') }}
+ @if($user_abo->shopping_user)
+
+ @endif
+
+
+
+
+ @endif
+
+ @endforeach
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/user/abo/modal_abo_show_products.blade.php b/resources/views/user/abo/modal_abo_show_products.blade.php
new file mode 100644
index 0000000..86a2ca1
--- /dev/null
+++ b/resources/views/user/abo/modal_abo_show_products.blade.php
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+ {{__('tables.image')}}
+ {{__('tables.products')}}
+ {{__('tables.article_no')}}
+ {{ __('tables.price') }} {{__('tables.net')}}
+ {{ __('tables.price') }} {{__('tables.gross')}}
+ {{__('tables.points')}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/user/abo/vat_info.blade.php b/resources/views/user/abo/vat_info.blade.php
new file mode 100644
index 0000000..ab36d80
--- /dev/null
+++ b/resources/views/user/abo/vat_info.blade.php
@@ -0,0 +1,28 @@
+
+
+
+
+
{{ __('payment.ordering_country') }}
+ {{ App\Services\UserService::getOrderInfo('billing_state') }}
+
+
+
{{ __('payment.country_of_delivery') }}
+ {{ App\Services\UserService::getOrderInfo('shipping_state') }}
+
+
+
{{ __('payment.VAT') }}
+ {{ App\Services\UserService::getOrderInfo('tax_free') }}
+
+
+
{{ __('payment.reverse_charge_procedure') }}
+ {{ App\Services\UserService::getOrderInfo('user_reverse_charge') }}
+
+
+
+
+ @if($view === 'me' || $view === 'ot-member')
+ {!! __('abo.product_prices_career_level_info', ['user_level_name'=>$user_abo->user->user_level->getLang('name'), 'user_level_margin'=>$user_abo->user->user_level->getFormattedMargin()]) !!}
+ @endif
+ @if($view === 'ot')
+ {!! __('abo.product_prices_career_level_cpay_info', ['user_level_name'=>$user_abo->member->user_level->getLang('name'), 'user_level_margin'=>$user_abo->member->user_level->getFormattedMargin()]) !!}
+ @endif
diff --git a/resources/views/user/homeparty/modal_hp_show_products.blade.php b/resources/views/user/homeparty/modal_hp_show_products.blade.php
new file mode 100644
index 0000000..7062b3b
--- /dev/null
+++ b/resources/views/user/homeparty/modal_hp_show_products.blade.php
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+ {{__('tables.image')}}
+ {{__('tables.products')}}
+ {{__('tables.article_no')}}
+ @if($homeparty->getCardInfo('user_tax_free'))
+ {{ __('tables.ek_price') }} {{__('tables.net')}}
+ {{__('tables.vk_price')}} {{__('tables.net')}}
+ @else
+ {{ __('tables.ek_price') }} {{__('tables.gross')}}
+ {{__('tables.vk_price')}} {{__('tables.gross')}}
+ @endif
+ {{__('tables.points')}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/user/membership/index.blade.php b/resources/views/user/membership/index.blade.php
index f465c5b..fd14d7f 100644
--- a/resources/views/user/membership/index.blade.php
+++ b/resources/views/user/membership/index.blade.php
@@ -20,15 +20,19 @@
-
+ {{-- isRenewalAccount payment_account date - config('mivita.renewal_days') Vertragsverlängerung --}}
@if($user->isRenewalAccount())
+
{{ __('membership.info_contract_renewal', ['days'=>config('mivita.renewal_days')]) }}
@if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
{{__('membership.payment_has_been_made') }} {{__('membership.status') }}: {{ trans('payment.status.'.$userHistoryPaymentOrder->getStatusType())}}
+ @else
+
{{ __('membership.alert_contract_renewal') }}
+
@endif
{{--
Abo Option deaktiviert
@@ -51,15 +55,7 @@
@endif
@endif
--}}
- @if($user->payment_order_id)
- @if($user->payment_order_product->identifier === 'show_upgrade')
-
{{ __('membership.downgrade_membership_is_not_possible') }}
-
{{ __('membership.upgrade_package_and_proceed_payment') }}
- @endif
- @if($user->payment_order_product->identifier === 'show_order')
-
{{ __('membership.is_no_longer_possible_to_change_package') }}
- @endif
- @endif
+
@if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
{{ __('membership.downgrade_membership_is_not_possible') }}
+
{{ __('membership.upgrade_package_and_proceed_payment') }}
+ @endif
+ @if($user->payment_order_product->identifier === 'show_order')
+
{{ __('membership.is_no_longer_possible_to_change_package') }}
+ @endif
+ @endif
@else
@@ -119,6 +125,50 @@
@endif
@endif
+
+
+
+
+
+
+ Die Zahlungshistorie zeigt Dir alle Zahlungen für Deine MIVITA Mitgliedschaft.
+
+
+
+
+
+ #
+ {{__('tables.date')}}
+ {{__('tables.amount')}}
+ {{__('tables.payment')}}
+ {{__('tables.status')}}
+ {{__('tables.art')}}
+ {{__('tables.rf_no')}}
+
+
+
+ @foreach($userShoppingOrders as $value)
+
+
+
+
+
+
+ {{ $value->created_at->format("d.m.Y") }}
+ {{ $value->getFormattedTotalShipping() }}€
+ {{ $value->getLastShoppingPayment('getPaymentType') }}
+ {!! \App\Services\Payment::getShoppingOrderBadge($value) !!}
+ {!! App\Services\Payment::getPaymentForBadge($value) !!}
+ {{ $value->getLastShoppingPayment('reference') }}
+
+
+ @endforeach
+
+
+
+
+
+
{{-- remove ABO Options --}}
{{--
Abo Option deaktiviert
diff --git a/resources/views/user/order/_list_delivery_vat_info.blade.php b/resources/views/user/order/_list_delivery_vat_info.blade.php
index 55abfb8..c9fc691 100644
--- a/resources/views/user/order/_list_delivery_vat_info.blade.php
+++ b/resources/views/user/order/_list_delivery_vat_info.blade.php
@@ -1,14 +1,14 @@
@if($template === 'me')
-
@if($is_abo) {{ __('order.abo_delivery_to_me') }} @else {{ __('order.delivery_to_me') }} @endif
+
@if($is_abo) {{ __('abo.abo_delivery_to_me') }} @else {{ __('order.delivery_to_me') }} @endif
@endif
@if($template === 'ot-customer')
-
@if($is_abo) {{ __('order.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif
+
@if($is_abo) {{ __('abo.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif
{{ __('order.cpay_text') }}.
@endif
@if($template === 'ot-member')
-
@if($is_abo) {{ __('order.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif
+
@if($is_abo) {{ __('abo.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif
{{ __('order.ipay_text') }}.
@endif
@@ -46,6 +46,12 @@
@endif
@else
{{ __('order.no_career_level_info') }}
+@endif
+@if($is_abo)
+
+
{!! __('abo.abo_type_info', ['base'=>get_abo_type_badge('base'), 'upgrade'=>get_abo_type_badge('upgrade')]) !!}
+
@endif
-
\ No newline at end of file
+
+
diff --git a/resources/views/user/order/comp_product.blade.php b/resources/views/user/order/comp_product.blade.php
index 18fbdc9..2416c77 100644
--- a/resources/views/user/order/comp_product.blade.php
+++ b/resources/views/user/order/comp_product.blade.php
@@ -4,36 +4,35 @@
@for($i = 1; $i <= Yard::instance('shopping')->getNumComp(); $i++)
@if(Yard::instance('shopping')->getNumComp() > 1)
- {{$i}}. {{ __('order.shipping_compensation_product') }}
+ {{$i}}. {{ __('order.shipping_compensation_product') }}
@else
- {{ __('order.shipping_compensation_product') }}
+ {{ __('order.shipping_compensation_product') }}
@endif
@php($counter = 1)
@php($checked_id = Yard::instance('shopping')->getCompProductBy($i))
- @foreach($comp_products as $comp_product)
-
-
@endfor
diff --git a/resources/views/user/order/custom_payment.blade.php b/resources/views/user/order/custom_payment.blade.php
index d72ec0e..6817b4e 100644
--- a/resources/views/user/order/custom_payment.blade.php
+++ b/resources/views/user/order/custom_payment.blade.php
@@ -3,8 +3,12 @@
@section('content')
+ @if($is_abo)
+
{{ __('order.order_abo_was_placed_successfully') }}
+ @else
{{ __('order.order_was_placed_successfully') }}
-
+ @endif
+
{{ __('order.payment_link_for_your_customer') }}
@@ -64,6 +68,10 @@
{{ __('Phone') }}
{{ $shopping_user->billing_phone }}
+
+
{{ __('E-Mail') }}
+ @if($shopping_user->faker_mail) "-" @else {{ $shopping_user->billing_email }} @endif
+
@@ -133,7 +141,7 @@
@if(isset($yard_shopping_items))
-
+
{{ __('tables.product') }}
@@ -155,7 +163,12 @@
@endif
- {{ $item->name }}
+
{{ $item->name }}
+ {!! get_abo_type_badge($item->abo_type) !!}
+
+
{{ __('order.content') }}: {{ $item->contents }}
+
{{ __('order.art_no') }}: {{ $item->number }}
+
@@ -179,11 +192,6 @@
@endforeach
-
-
-
-
-
{{__('order.subtotal')}}
diff --git a/resources/views/user/order/delivery.blade.php b/resources/views/user/order/delivery.blade.php
index 8e54c8b..3ca7138 100644
--- a/resources/views/user/order/delivery.blade.php
+++ b/resources/views/user/order/delivery.blade.php
@@ -44,53 +44,61 @@
({{ __('order.cpay') }})
+ @if(Auth::user()->isVIP())
- {{ __('order.abo_delivery') }}
+
-
-
-
-
-
-
- {{ __('order.abo_are_for_me_and_shipped') }}
-
+ {{ __('abo.abo_delivery') }}
+
+
+
+
+ @endif
- @if(Session::has('custom-error'))
-
- ×
- {{ Session::get('custom-error') }}
-
- @endif
-
+
+
{!! Form::close() !!}
-
-
+@endsection
\ No newline at end of file
diff --git a/resources/views/user/order/shipping_ot.blade.php b/resources/views/user/order/shipping_ot.blade.php
index b217dff..02f6db9 100644
--- a/resources/views/user/order/shipping_ot.blade.php
+++ b/resources/views/user/order/shipping_ot.blade.php
@@ -1,5 +1,5 @@
- @if($for == 'ot-customer')
+ @if($for == 'ot-customer' || $for == 'abo-ot-customer')
{{ Form::hidden('billing_company', $shopping_user->billing_company) }}
{{ Form::hidden('billing_salutation', $shopping_user->billing_salutation) }}
{{ Form::hidden('billing_firstname', $shopping_user->billing_firstname) }}
diff --git a/resources/views/user/order/yard_view_form.blade.php b/resources/views/user/order/yard_view_form.blade.php
index 324e7ca..44d5073 100644
--- a/resources/views/user/order/yard_view_form.blade.php
+++ b/resources/views/user/order/yard_view_form.blade.php
@@ -125,7 +125,7 @@
-
{{ $row->name }}
+
{{ $row->name }} @if(isset($is_abo) && $is_abo) {!! get_abo_type_badge_by_product($product) !!} @endif
{{ __('order.content') }}: {{ $product->contents }}
{{ __('order.art_no') }}: {{ $product->number }}
@@ -258,14 +258,14 @@
@if(isset($is_abo) && $is_abo)
-
{{ __('order.abo_settings') }}
+
{{ __('abo.abo_settings') }}
- {!! __('order.abo_order_info') !!}
+ {!! __('abo.abo_order_info') !!}
+
+
-
-
+
-
-
@endif
- @if((isset($data['for']) && $data['for'] === 'ot-customer') || (isset($for) && $for === 'ot-customer'))
+ @php($is_disabled = false)
+ @if(isset($is_abo) && $is_abo && !\App\Services\AboHelper::aboHasBaseProduct(Yard::instance('shopping')->getContentByOrder()))
+ @php($is_disabled = true)
-
{{ __('order.confirm_and_send_order') }}
+
+ {!! __('abo.abo_type_info_base', ['base'=>get_abo_type_badge('base')]) !!}
+
+
+
+ @endif
+ @if((isset($data['for']) && $data['for'] === 'ot-customer') || (isset($for) && $for === 'abo-ot-customer'))
+
+ {{ __('order.confirm_and_send_order') }}
@@ -294,12 +303,13 @@
@else
- {{ __('order.confirm_and_proceed_to_checkout') }}
+ {{ __('order.confirm_and_proceed_to_checkout') }}
{!! __('payment.checkout_ssl_server') !!}
@endif
+
@endif
@endif
diff --git a/resources/views/user/shop/sales/api_order_list_total.blade.php b/resources/views/user/shop/sales/api_order_list_total.blade.php
index 85a6f1c..abf57e4 100644
--- a/resources/views/user/shop/sales/api_order_list_total.blade.php
+++ b/resources/views/user/shop/sales/api_order_list_total.blade.php
@@ -22,13 +22,13 @@
- {{$shop_item->points_total}}
+ {{ number_format($shop_item->points_total, 0) }}
{{ formatNumber($shop_item->user_price_net) }} €
- {{$shop_item->qty}}
+ {{ number_format($shop_item->qty, 0) }}
diff --git a/resources/views/user/team/export.blade.php b/resources/views/user/team/export.blade.php
index 4dfde51..1bf119e 100644
--- a/resources/views/user/team/export.blade.php
+++ b/resources/views/user/team/export.blade.php
@@ -47,6 +47,7 @@
{{__('tables.phone') }}
{{__('tables.mobil') }}
{{__('tables.birthday') }}
+ {{__('tables.partner_since') }}
{{__('tables.account') }}
{{__('tables.account_to') }}
{{__('tables.sponsor')}}
@@ -69,6 +70,7 @@
{{ $child->phone }}
{{ $child->mobil }}
{{ $child->birthday }}
+ {{ $child->partner_since }}
{!! ($child->active_account == 1 ? __('yes') : __('no')) !!}
{{ $child->payment_account_date }}
{{ $child->sponsor_name }}
diff --git a/resources/views/user/user_form.blade.php b/resources/views/user/user_form.blade.php
index 277e23a..515f193 100644
--- a/resources/views/user/user_form.blade.php
+++ b/resources/views/user/user_form.blade.php
@@ -312,16 +312,16 @@
diff --git a/resources/views/vendor/translation/languages/index.blade.php b/resources/views/vendor/translation/languages/index.blade.php
index 57f763c..e958934 100644
--- a/resources/views/vendor/translation/languages/index.blade.php
+++ b/resources/views/vendor/translation/languages/index.blade.php
@@ -24,7 +24,7 @@
-
+ {{ __('translation::translation.translations') }} {{ __('edit') }}
{{ $name }}
diff --git a/resources/views/web/layouts/application.blade.php b/resources/views/web/layouts/application.blade.php
index 21f2110..cd8add1 100644
--- a/resources/views/web/layouts/application.blade.php
+++ b/resources/views/web/layouts/application.blade.php
@@ -11,6 +11,7 @@
+
diff --git a/resources/views/web/templates/_bcategories.blade.php b/resources/views/web/templates/_bcategories.blade.php
index 64dd20b..b6e9d26 100644
--- a/resources/views/web/templates/_bcategories.blade.php
+++ b/resources/views/web/templates/_bcategories.blade.php
@@ -22,11 +22,11 @@
{{ __('webcontent.compatibility_with_family_private_life') }}
-
+ {{--
{{ __('webcontent.start_up') }}
-
+--}}
diff --git a/resources/views/web/templates/existenzgruendung.blade.php b/resources/views/web/templates/_existenzgruendung.blade.php
similarity index 100%
rename from resources/views/web/templates/existenzgruendung.blade.php
rename to resources/views/web/templates/_existenzgruendung.blade.php
diff --git a/resources/views/web/templates/checkout-is-final.blade.php b/resources/views/web/templates/checkout-is-final.blade.php
new file mode 100644
index 0000000..cd05132
--- /dev/null
+++ b/resources/views/web/templates/checkout-is-final.blade.php
@@ -0,0 +1,111 @@
+@extends($user_shop ?'web.user.layouts.layout' : 'web.layouts.layout')
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ __('payment.thank_you_very_much') }}
+
+
{{ __('payment.link_was_paid') }}
+
+
+
+
+ {{ __('payment.your_mivita_team') }}
+
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/web/templates/checkout.blade.php b/resources/views/web/templates/checkout.blade.php
index fe42f83..3af9fa4 100644
--- a/resources/views/web/templates/checkout.blade.php
+++ b/resources/views/web/templates/checkout.blade.php
@@ -217,6 +217,13 @@
@endif
+ @if($instance_status)
+
+
+ {!! \App\Services\OrderPaymentService::getStatusAlert($instance_status) !!}
+
+
+ @endif
{{-- LEFT --}}
@@ -252,7 +259,7 @@
@endif
- {{ $row->name }}
+ {{ $row->name }} @if(isset($is_abo) && $is_abo) {!! get_abo_type_badge_by_product($product) !!} @endif
{{ __('order.content') }}: {{ $product->contents }}
{{ __('order.art_no') }}: {{ $product->number }}
{{ __('weborder.delivery_time_1_3') }}
@@ -359,7 +366,6 @@
{!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'checkout_card_final']) !!}
-
{!! Form::hidden('selected_country', '') !!}
{!! Form::hidden('is_for', $shopping_user->is_for) !!}
{!! Form::hidden('is_from', $shopping_user->is_from) !!}
@@ -406,7 +412,7 @@