From b5f817cf141ca640149125a9d2be84349ca986a8 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 11 Feb 2016 21:27:58 +0200 Subject: [PATCH] Changed future white-label licenses to one year --- app/Http/Middleware/StartupCheck.php | 2 +- app/Models/Account.php | 6 +++++- resources/lang/da/texts.php | 3 ++- resources/lang/de/texts.php | 3 ++- resources/lang/en/texts.php | 3 ++- resources/lang/es/texts.php | 3 ++- resources/lang/es_ES/texts.php | 3 ++- resources/lang/fr/texts.php | 3 ++- resources/lang/fr_CA/texts.php | 3 ++- resources/lang/it/texts.php | 3 ++- resources/lang/lt/texts.php | 3 ++- resources/lang/nb_NO/texts.php | 3 ++- resources/lang/nl/texts.php | 3 ++- resources/lang/pt_BR/texts.php | 3 ++- resources/lang/sv/texts.php | 3 ++- 15 files changed, 32 insertions(+), 15 deletions(-) diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index bfda7bcb4916..dc9f9420f973 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -139,7 +139,7 @@ class StartupCheck } elseif ($productId == PRODUCT_WHITE_LABEL) { if ($data == 'valid') { $account = Auth::user()->account; - $account->pro_plan_paid = NINJA_DATE; + $account->pro_plan_paid = date_create()->format('Y-m-d'); $account->save(); Session::flash('message', trans('texts.bought_white_label')); diff --git a/app/Models/Account.php b/app/Models/Account.php index 746f0d361b52..cca359734ee0 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -770,7 +770,11 @@ class Account extends Eloquent if (Utils::isNinjaProd()) { return self::isPro() && $this->pro_plan_paid != NINJA_DATE; } else { - return $this->pro_plan_paid == NINJA_DATE; + if ($this->pro_plan_paid == NINJA_DATE) { + return true; + } + + return Utils::withinPastYear($this->pro_plan_paid); } } diff --git a/resources/lang/da/texts.php b/resources/lang/da/texts.php index e525eb5a726b..e9e36806c144 100644 --- a/resources/lang/da/texts.php +++ b/resources/lang/da/texts.php @@ -469,7 +469,6 @@ return array( 'id_number' => 'SE/CVR nummer', 'white_label_link' => 'Hvid Label', - 'white_label_text' => 'Køb en Hvid Label licens til $'.WHITE_LABEL_PRICE.' for at fjerne Invoice Ninja mærket fra toppen af klient siderne.', 'white_label_header' => 'Hvid Label', 'bought_white_label' => 'Hvid Label licens accepteret', 'white_labeled' => 'Hvid Label', @@ -1111,4 +1110,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); \ No newline at end of file diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php index 8d223ce59b51..19e0125043a6 100644 --- a/resources/lang/de/texts.php +++ b/resources/lang/de/texts.php @@ -469,7 +469,6 @@ return array( 'id_number' => 'ID-Nummer', 'white_label_link' => 'Branding entfernen', - 'white_label_text' => 'Um das Invoice Ninja Logo auf der Kundenseite zu entfernen, kaufe bitte eine Lizenz für $'.WHITE_LABEL_PRICE, 'white_label_header' => 'Branding entfernen', 'bought_white_label' => 'Branding-freie Lizenz erfolgreich aktiviert', 'white_labeled' => 'Branding entfernt', @@ -1112,4 +1111,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index b94a2b5edbd8..92a838b6ea5c 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -481,7 +481,6 @@ return array( 'id_number' => 'ID Number', 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', 'white_label_header' => 'White Label', 'bought_white_label' => 'Successfully enabled white label license', 'white_labeled' => 'White labeled', @@ -1150,5 +1149,7 @@ return array( 'trial_call_to_action' => 'Start Free Trial', 'trial_success' => 'Successfully enabled two week free pro plan trial', 'overdue' => 'Overdue', + + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', ); diff --git a/resources/lang/es/texts.php b/resources/lang/es/texts.php index c1aa74687c20..a90f028f0308 100644 --- a/resources/lang/es/texts.php +++ b/resources/lang/es/texts.php @@ -442,7 +442,6 @@ return array( 'id_number' => 'ID Number', 'white_label_link' => 'Etiqueta Blanca', - 'white_label_text' => 'Adquiere una licencia de etiqueta blanca por $'.WHITE_LABEL_PRICE.' para eliminar la marca de Invoice Ninja branding de la parte superior de las páginas de los clientes.', 'white_label_header' => 'Etiqueta Blanca', 'bought_white_label' => 'Licencia de etiqueta blanca habilitada con éxito', 'white_labeled' => 'Etiqueta Blanca', @@ -1088,4 +1087,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); diff --git a/resources/lang/es_ES/texts.php b/resources/lang/es_ES/texts.php index 61d9d46e5902..e7fc2c357567 100644 --- a/resources/lang/es_ES/texts.php +++ b/resources/lang/es_ES/texts.php @@ -460,7 +460,6 @@ return array( 'id_number' => 'Número de Identificación', 'white_label_link' => 'Marca Blanca" ', - 'white_label_text' => 'Obtener una licencia de marca blanca por'.WHITE_LABEL_PRICE.' para quitar la marca Invoice Ninja de la parte superior de las páginas del cliente.', // comprobar 'white_label_link' => 'Marca Blanca" ', 'bought_white_label' => 'Se ha conseguido con exito la licencia de Marca Blanca', 'white_labeled' => 'Marca Blanca', @@ -1110,4 +1109,6 @@ return array( 'iframe_url_help3' => 'Nota: Si piensas aceptar tarjetas de credito recomendamos tener habilitado HTTPS.', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); diff --git a/resources/lang/fr/texts.php b/resources/lang/fr/texts.php index 0636014ce477..d434aee5bfaa 100644 --- a/resources/lang/fr/texts.php +++ b/resources/lang/fr/texts.php @@ -462,7 +462,6 @@ return array( 'id_number' => 'Numéro ID', 'white_label_link' => 'Marque blanche', - 'white_label_text' => 'Pour retirer la marque Invoice Ninja en haut de la page client, achetez un licence en marque blanche de '.WHITE_LABEL_PRICE.'$.', 'white_label_header' => 'Marque blanche', 'bought_white_label' => 'Licence marque blanche entrée avec succès', 'white_labeled' => 'Marque blanche', @@ -1103,4 +1102,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); diff --git a/resources/lang/fr_CA/texts.php b/resources/lang/fr_CA/texts.php index c32001f0d115..6ec1a6d40493 100644 --- a/resources/lang/fr_CA/texts.php +++ b/resources/lang/fr_CA/texts.php @@ -462,7 +462,6 @@ return array( 'id_number' => 'Numéro ID', 'white_label_link' => 'Marque blanche', - 'white_label_text' => 'Pour retirer la marque Invoice Ninja en haut de la page client, achetez un licence en marque blanche de '.WHITE_LABEL_PRICE.'$.', 'white_label_header' => 'Entête de marque blanche', 'bought_white_label' => 'License de marque blanche activée', 'white_labeled' => 'White labeled', @@ -1102,4 +1101,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); diff --git a/resources/lang/it/texts.php b/resources/lang/it/texts.php index d047b3d018d3..43523fc95206 100644 --- a/resources/lang/it/texts.php +++ b/resources/lang/it/texts.php @@ -464,7 +464,6 @@ return array( 'id_number' => 'ID Number', 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', 'white_label_header' => 'White Label', 'bought_white_label' => 'Successfully enabled white label license', 'white_labeled' => 'White labeled', @@ -1106,4 +1105,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); \ No newline at end of file diff --git a/resources/lang/lt/texts.php b/resources/lang/lt/texts.php index 64dc7c7161c1..08f70594abd6 100644 --- a/resources/lang/lt/texts.php +++ b/resources/lang/lt/texts.php @@ -473,7 +473,6 @@ return array( 'id_number' => 'ID Number', 'white_label_link' => 'White label', - 'white_label_text' => 'Purchase a white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', 'white_label_header' => 'White Label', 'bought_white_label' => 'Successfully enabled white label license', 'white_labeled' => 'White labeled', @@ -1113,4 +1112,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); \ No newline at end of file diff --git a/resources/lang/nb_NO/texts.php b/resources/lang/nb_NO/texts.php index d0267a0b661c..41549997dd0c 100644 --- a/resources/lang/nb_NO/texts.php +++ b/resources/lang/nb_NO/texts.php @@ -469,7 +469,6 @@ return array( 'id_number' => 'ID Nummer', 'white_label_link' => 'Reklamefri', - 'white_label_text' => 'Kjøp en reklamefri lisens for $'.WHITE_LABEL_PRICE.' for å fjerne Invoice Ninja reklamen fra toppen av klient sidene.', 'white_label_header' => 'Reklamefri', 'bought_white_label' => 'Du har suksessfullt aktivert din reklamefrie lisens.', 'white_labeled' => 'Reklamefrie', @@ -1111,4 +1110,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); \ No newline at end of file diff --git a/resources/lang/nl/texts.php b/resources/lang/nl/texts.php index fd81361669ca..961f701df898 100644 --- a/resources/lang/nl/texts.php +++ b/resources/lang/nl/texts.php @@ -465,7 +465,6 @@ return array( 'id_number' => 'Identificatienummer', 'white_label_link' => 'White label', - 'white_label_text' => 'Koop een white labellicentie voor $'.WHITE_LABEL_PRICE.' om de InvoiceNinja merknaam te verwijderen uit de bovenkant van de klantenpagina\'s.', 'white_label_header' => 'White label', 'bought_white_label' => 'White label licentie succesvol geactiveerd', 'white_labeled' => 'White labeled', @@ -1106,4 +1105,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); \ No newline at end of file diff --git a/resources/lang/pt_BR/texts.php b/resources/lang/pt_BR/texts.php index 98c2c77138fa..dfbd3a8f3c5f 100644 --- a/resources/lang/pt_BR/texts.php +++ b/resources/lang/pt_BR/texts.php @@ -463,7 +463,6 @@ return array( 'id_number' => 'CNPJ', 'white_label_link' => 'White Label', - 'white_label_text' => 'Adquira uma "white label license" por $'.WHITE_LABEL_PRICE.' para utilizar sua própria marca no topo da página.', 'white_label_header' => 'White Label', 'bought_white_label' => 'Licença "white label" habilitada', 'white_labeled' => 'White labeled', @@ -1103,4 +1102,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + ); diff --git a/resources/lang/sv/texts.php b/resources/lang/sv/texts.php index 23694fb64139..f763205c1bfa 100644 --- a/resources/lang/sv/texts.php +++ b/resources/lang/sv/texts.php @@ -468,7 +468,6 @@ return array( 'id_number' => 'ID-nummer', 'white_label_link' => 'White label', - 'white_label_text' => 'Köp en white label licens för $'.WHITE_LABEL_PRICE.' för att ta bort Invoice Ninja loggan från kundernas sidor.', 'white_label_header' => 'White Label', 'bought_white_label' => 'White label licens köpt', 'white_labeled' => 'White labeled', @@ -1108,4 +1107,6 @@ return array( 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + );