diff --git a/.gitignore b/.gitignore index dc691e6fbef4..8091b7cec6bf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /app/config/ubuntu /app/config/packages/anahkiasen/rocketeer/ /app/storage +/public/logo /public/build /public/vendor /bootstrap/compiled.php diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index fb5a3731f806..64c2c729cab9 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -39,18 +39,8 @@ class AccountController extends \BaseController { if (!$user) { - $account = new Account; - $account->ip = Request::getClientIp(); - $account->account_key = str_random(RANDOM_KEY_LENGTH); - $account->save(); - - $random = str_random(RANDOM_KEY_LENGTH); - - $user = new User; - $user->password = $random; - $user->password_confirmation = $random; - $user->username = $random; - $account->users()->save($user); + $account = $this->accountRepo->create(); + $user = $account->users()->first(); Session::forget(RECENTLY_VIEWED); } @@ -73,8 +63,8 @@ class AccountController extends \BaseController { $ninjaAccount = $this->getNinjaAccount(); $ninjaClient = $this->getNinjaClient($ninjaAccount); - - + //$invoice = new Invoice(); + //$ninjaClient->invoices()->save($invoice); } private function getNinjaAccount() @@ -651,7 +641,7 @@ class AccountController extends \BaseController { { $path = Input::file('logo')->getRealPath(); File::delete('logo/' . $account->account_key . '.jpg'); - Image::make($path)->resize(null, 120, true, false)->save('logo/' . $account->account_key . '.jpg'); + Image::make($path)->resize(200, 120, true, false)->save('logo/' . $account->account_key . '.jpg'); } Event::fire('user.refresh'); diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index 1494c077147e..ec66c426a568 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -356,6 +356,8 @@ class InvoiceController extends \BaseController { */ public function show($publicId) { + Session::reflash(); + return Redirect::to('invoices/'.$publicId.'/edit'); } diff --git a/app/database/migrations/2014_03_19_201454_add_language_support.php b/app/database/migrations/2014_03_19_201454_add_language_support.php index b48683073e2f..6acc56e2d478 100644 --- a/app/database/migrations/2014_03_19_201454_add_language_support.php +++ b/app/database/migrations/2014_03_19_201454_add_language_support.php @@ -24,6 +24,8 @@ class AddLanguageSupport extends Migration { DB::table('languages')->insert(['name' => 'German', 'locale' => 'de']); DB::table('languages')->insert(['name' => 'French', 'locale' => 'fr']); DB::table('languages')->insert(['name' => 'Brazilian Portuguese', 'locale' => 'pt_BR']); + DB::table('languages')->insert(['name' => 'Dutch', 'locale' => 'nl']); + DB::table('languages')->insert(['name' => 'Spanish', 'locale' => 'es']); Schema::table('accounts', function($table) { diff --git a/app/filters.php b/app/filters.php index 18ed154ca049..8ad7d5ae42fd 100755 --- a/app/filters.php +++ b/app/filters.php @@ -23,7 +23,9 @@ App::before(function($request) if (Input::has('lang')) { - App::setLocale(Input::get('lang')); + $locale = Input::get('lang'); + Session::set(SESSION_LOCALE, $locale); + App::setLocale($locale); } else if (Auth::check()) { diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php index 230c93a9118a..fb3de4111d57 100644 --- a/app/lang/de/texts.php +++ b/app/lang/de/texts.php @@ -252,9 +252,8 @@ return array( 'confirmation_subject' => 'Invoice Ninja Konto Bestätigung', 'confirmation_header' => 'Konto Bestätigung', 'confirmation_message' => 'Bitte klicke auf den folgenden Link um dein Konto zu bestätigen.', - 'invoice_subject' => 'Neue Rechnung :invoice', 'invoice_message' => 'Um Ihre Rechnung über :amount einzusehen, klicken Sie bitte auf den folgenden Link.', - 'payment_subject' => 'Zahlungseingang :invoice', + 'payment_subject' => 'Zahlungseingang', 'payment_message' => 'Vielen Dank für Ihre Zahlung von :amount.', 'email_salutation' => 'Sehr geehrte/r :name,', 'email_signature' => 'Freundliche Grüße,', @@ -293,5 +292,18 @@ return array( 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo_link' => 'Click here', ], - + + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + 'invoice_subject' => 'New invoice from :account', + 'close' => 'Close', + ); diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index f8614863490e..b9e214172944 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -96,6 +96,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -230,10 +231,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -252,9 +253,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -294,4 +295,16 @@ return array( 'remove_logo_link' => 'Click here', ], -); \ No newline at end of file + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already registered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + + +); diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php index 728286f3bd3c..04c987563820 100644 --- a/app/lang/es/texts.php +++ b/app/lang/es/texts.php @@ -95,6 +95,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -229,10 +230,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -251,9 +252,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -292,6 +293,17 @@ return array( 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo_link' => 'Click here', ], - + + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + ); diff --git a/app/lang/fr/texts.php b/app/lang/fr/texts.php index 0c0d220181d6..a9fe84daa529 100644 --- a/app/lang/fr/texts.php +++ b/app/lang/fr/texts.php @@ -96,6 +96,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -230,10 +231,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -252,9 +253,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -293,6 +294,17 @@ return array( 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo_link' => 'Click here', ], + + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', ); diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php index e8ed6ee7c3e8..3eac655a4d92 100644 --- a/app/lang/it/texts.php +++ b/app/lang/it/texts.php @@ -96,6 +96,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -230,10 +231,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -252,9 +253,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -294,6 +295,17 @@ return array( 'remove_logo_link' => 'Click here', ], + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + ); \ No newline at end of file diff --git a/app/lang/nl/pagination.php b/app/lang/nl/pagination.php new file mode 100644 index 000000000000..583b463a6375 --- /dev/null +++ b/app/lang/nl/pagination.php @@ -0,0 +1,20 @@ + '« Vorige', + + 'next' => 'Volgende »', + +); \ No newline at end of file diff --git a/app/lang/nl/reminders.php b/app/lang/nl/reminders.php new file mode 100644 index 000000000000..1a517a658edd --- /dev/null +++ b/app/lang/nl/reminders.php @@ -0,0 +1,24 @@ + "Wachtwoord moet minimaal zes tekens lang zijn en de wachtwoorden moeten overeenkomen.", + + "user" => "Geen gebruiker bekend met dat e-mailadres.", + + "token" => "Dit wachtwoord reset token is niet geldig.", + + "sent" => "Wachtwoord herinnering verzonden!", + +); diff --git a/app/lang/nl/texts.php b/app/lang/nl/texts.php new file mode 100644 index 000000000000..00dfd8c3faf5 --- /dev/null +++ b/app/lang/nl/texts.php @@ -0,0 +1,309 @@ + 'Organisatie', + 'name' => 'Naam', + 'website' => 'Website', + 'work_phone' => 'Telefoon', + 'address' => 'Adres', + 'address1' => 'Straat', + 'address2' => 'Bus/Suite', + 'city' => 'Gemeente', + 'state' => 'Staat/Provincie', + 'postal_code' => 'Postcode', + 'country_id' => 'Land', + 'contacts' => 'Contacten', + 'first_name' => 'Voornaam', + 'last_name' => 'Achternaam', + 'phone' => 'Telefoon', + 'email' => 'E-mail', + 'additional_info' => 'Extra Informatie', + 'payment_terms' => 'Betalingsvoorwaarden', + 'currency_id' => 'Munteenheid', + 'size_id' => 'Grootte', + 'industry_id' => 'Industrie', + 'private_notes' => 'Privé Bericht', + + // invoice + 'invoice' => 'Factuur', + 'client' => 'Klant', + 'invoice_date' => 'Factuurdatum', + 'due_date' => 'Vervaldatum', + 'invoice_number' => 'Factuur nummer', + 'invoice_number_short' => 'Factuur #', + 'po_number' => 'Bestelnummer', + 'po_number_short' => 'Bestel #', + 'frequency_id' => 'Hoe vaak', + 'discount' => 'Korting', + 'taxes' => 'Belastingen', + 'tax' => 'Belasting', + 'item' => 'Naam', + 'description' => 'Beschrijving', + 'unit_cost' => 'Eenheidsprijs', + 'quantity' => 'Aantal', + 'line_total' => 'Totaal lijn', + 'subtotal' => 'Subtotaal', + 'paid_to_date' => 'Betaal Datum', + 'balance_due' => 'Openstaand saldo', + 'invoice_design_id' => 'Ontwerp', + 'terms' => 'Voorwaarden', + 'your_invoice' => 'Jouw factuur', + + 'remove_contact' => 'Verwijder contact', + 'add_contact' => 'Voeg contact toe', + 'create_new_client' => 'Maak nieuwe klant', + 'edit_client_details' => 'Pas klantdetails aan', + 'enable' => 'Activeer', + 'learn_more' => 'Meer te weten komen', + 'manage_rates' => 'Beheer prijzen', + 'note_to_client' => 'Bericht aan klant', + 'invoice_terms' => 'Factuur voorwaarden', + 'save_as_default_terms' => 'Opslaan als standaard voorwaarden', + 'download_pdf' => 'Download PDF', + 'pay_now' => 'Betaal nu', + 'save_invoice' => 'Sla Factuur op', + 'clone_invoice' => 'Kopieer Factuur', + 'archive_invoice' => 'Archiveer Factuur', + 'delete_invoice' => 'Verwijder Factuur', + 'email_invoice' => 'E-mail Factuur', + 'enter_payment' => 'Betaling ingeven', + 'tax_rates' => 'BTW tarief', + 'rate' => 'Tarief', + 'settings' => 'Instellingen', + 'enable_invoice_tax' => 'Activeer instelling van BTW op volledige factuur', + 'enable_line_item_tax' => 'Activeer instelling van BTW per lijn', + + // navigation + 'dashboard' => 'Dashboard', + 'clients' => 'Klanten', + 'invoices' => 'Facturen', + 'payments' => 'Betalingen', + 'credits' => 'Kredietnota\'s', + 'history' => 'Geschiedenis', + 'search' => 'Zoeken', + 'sign_up' => 'Aanmelden', + 'guest' => 'Gast', + 'company_details' => 'Bedrijfsdetails', + 'online_payments' => 'Online betalingen', + 'notifications' => 'Meldingen', + 'import_export' => 'Importeer/Exporteer', + 'done' => 'Klaar', + 'save' => 'Opslaan', + 'create' => 'Aanmaken', + 'upload' => 'Uploaden', + 'import' => 'Importeer', + 'download' => 'Downloaden', + 'cancel' => 'Annuleren', + 'provide_email' => 'Geef een geldig e-mailadres aub.', + 'powered_by' => 'Factuur gemaakt via', + 'no_items' => 'Geen artikelen', + + // recurring invoices + 'recurring_invoices' => 'Terugkerende facturen', + 'recurring_help' => '

Zend klanten automatisch wekelijks, twee keer per maand, maandelijks, per kwartaal of jaarlijks dezelfde facturen.

+

Gebruik :MONTH, :QUARTER of :YEAR voor dynamische datums. Eenvoudige wiskunde werkt ook, bijvoorbeeld :MONTH-1.

+

Voorbeelden van dynamische factuur variabelen:

+ ', + + // dashboard + 'in_total_revenue' => 'in totale opbrengst', + 'billed_client' => 'Gefactureerde klant', + 'billed_clients' => 'Gefactureerde klanten', + 'active_client' => 'Actieve klant', + 'active_clients' => 'Actieve klanten', + 'invoices_past_due' => 'Vervallen facturen', + 'upcoming_invoices' => 'Aankomende facturen', + 'average_invoice' => 'Gemiddelde factuur', + + // list pages + 'archive' => 'Archiveer', + 'delete' => 'Verwijder', + 'archive_client' => 'Archiveer klant', + 'delete_client' => 'Verwijder klant', + 'archive_payment' => 'Archiveer betaling', + 'delete_payment' => 'Verwijder betaling', + 'archive_credit' => 'Archiveer kredietnota', + 'delete_credit' => 'Verwijder kredietnota', + 'show_archived_deleted' => 'Toon gearchiveerde/verwijderde', + 'filter' => 'Filter', + 'new_client' => 'Nieuwe Klant', + 'new_invoice' => 'Nieuwe Factuur', + 'new_payment' => 'Nieuwe Betaling', + 'new_credit' => 'Nieuwe Kredietnota', + 'contact' => 'Contact', + 'date_created' => 'Aanmaakdatum', + 'last_login' => 'Laatste login', + 'balance' => 'Saldo', + 'action' => 'Actie', + 'status' => 'Status', + 'invoice_total' => 'Factuur totaal', + 'frequency' => 'Frequentie', + 'start_date' => 'Startdatum', + 'end_date' => 'Einddatum', + 'transaction_reference' => 'Transactie Referentie', + 'method' => 'Methode', + 'payment_amount' => 'Betalingsbedrag', + 'payment_date' => 'Betalingsdatum', + 'credit_amount' => 'Kredietbedrag', + 'credit_balance' => 'Kredietsaldo', + 'credit_date' => 'Kredietdatum', + 'empty_table' => 'Geen gegevens beschikbaar in de tabel', + 'select' => 'Selecteer', + 'edit_client' => 'Klant aanpassen', + 'edit_invoice' => 'Factuur aanpassen', + + // client view page + 'create_invoice' => 'Factuur aanmaken', + 'enter_credit' => 'Kredietnota ingeven', + 'last_logged_in' => 'Laatste login', + 'details' => 'Details', + 'standing' => 'Openstaand', + 'credit' => 'Krediet', + 'activity' => 'Activiteit', + 'date' => 'Datum', + 'message' => 'Bericht', + 'adjustment' => 'Aanpassing', + 'are_you_sure' => 'Ben je zeker?', + + // payment pages + 'payment_type_id' => 'Betalingstype', + 'amount' => 'Bedrag', + + // account/company pages + 'work_email' => 'E-mail', + 'language_id' => 'Taal', + 'timezone_id' => 'Tijdszone', + 'date_format_id' => 'Formaat datum', + 'datetime_format_id' => 'Datum/Tijd Formaat', + 'users' => 'Gebruikers', + 'localization' => 'Localisatie', + 'remove_logo' => 'Verwijder logo', + 'logo_help' => 'Ondersteund: JPEG, GIF en PNG. Aangeraden hoogte: 120px', + 'payment_gateway' => 'Betalingsmiddel', + 'gateway_id' => 'Leverancier', + 'email_notifications' => 'E-mail meldingen', + 'email_sent' => 'E-mail me wanneer een factuur is verzonden', + 'email_viewed' => 'E-mail me wanneer een factuur is bekeken', + 'email_paid' => 'E-mail me wanneer een factuur is betaald', + 'site_updates' => 'Site Aanpassingen', + 'custom_messages' => 'Aangepaste berichten', + 'default_invoice_terms' => 'Stel standaard factuursvoorwaarden in', + 'default_email_footer' => 'Stel standaard e-mail signatuur in', + 'import_clients' => 'Importeer Klant Gegevens', + 'csv_file' => 'Selecteer CSV bestand', + 'export_clients' => 'Exporteer Klant Gegevens', + 'select_file' => 'Selecteer alstublieft een bestand', + 'first_row_headers' => 'Gebruik eerste rij als hoofdding', + 'column' => 'Kolom', + 'sample' => 'Voorbeeld', + 'import_to' => 'Importeer naar', + 'client_will_create' => 'klant zal aangemaakt worden', + 'clients_will_create' => 'klanten zullen aangemaakt worden', + + // application messages + 'created_client' => 'Klant succesvol aangemaakt', + 'created_clients' => ':count klanten succesvol aangemaakt', + 'updated_settings' => 'Instellingen succesvol aangepast', + 'removed_logo' => 'Logo succesvol verwijderd', + 'sent_message' => 'Bericht succesvol verzonden', + 'invoice_error' => 'Selecteer een klant alstublieft en corrigeer mogelijke fouten', + 'limit_clients' => 'Sorry, dit zal de klantenlimiet van :count klanten overschrijden', + 'payment_error' => 'Er was een fout bij het verwerken van uw betaling. Probeer later alstublieft opnieuw.', + 'registration_required' => 'Meld je aan om een factuur te mailen', + 'confirmation_required' => 'Bevestig je e-mail adres alstublieft', + + 'updated_client' => 'Klant succesvol aangepast', + 'created_client' => 'Klant succesvol aangemaakt', + 'archived_client' => 'Klant succesvol gearchiveerd', + 'archived_clients' => ':count klanten succesvol gearchiveerd', + 'deleted_client' => 'Klant succesvol verwijderd', + 'deleted_clients' => ':count klanten succesvol verwijderd', + + 'updated_invoice' => 'Factuur succesvol aangepast', + 'created_invoice' => 'Factuur succesvol aangemaakt', + 'cloned_invoice' => 'Factuur succesvol gekopieerd', + 'emailed_invoice' => 'Factuur succesvol gemaild', + 'and_created_client' => 'en klant aangemaakt', + 'archived_invoice' => 'Factuur succesvol gearchiveerd', + 'archived_invoices' => ':count facturen succesvol gearchiveerd', + 'deleted_invoice' => 'Factuur succesvol verwijderd', + 'deleted_invoices' => ':count facturen succesvol verwijderd', + + 'created_payment' => 'Betaling succesvol aangemaakt', + 'archived_payment' => 'Betaling succesvol gearchiveerd', + 'archived_payments' => ':count betalingen succesvol gearchiveerd', + 'deleted_payment' => 'Betaling succesvol verwijderd', + 'deleted_payments' => ':count betalingen succesvol verwijderd', + 'applied_payment' => 'Betaling succesvol toegepast', + + 'created_credit' => 'Kredietnota succesvol aangemaakt', + 'archived_credit' => 'Kredietnota succesvol gearchiveerd', + 'archived_credits' => ':count kredietnota\'s succesvol gearchiveerd', + 'deleted_credit' => 'Kredietnota succesvol verwijderd', + 'deleted_credits' => ':count kredietnota\'s succesvol verwijderd', + + // E-mails + 'confirmation_subject' => 'Invoice Ninja Bevestiging Account', + 'confirmation_header' => 'Bevestiging Account', + 'confirmation_message' => 'Ga alstublieft naar onderstaande link om je account te bevestiging.', + 'invoice_message' => 'Om je factuur voor :amount te bekijken, klik op onderstaande link.', + 'payment_subject' => 'Betaling ontvangen', + 'payment_message' => 'Bedankt voor je betaling van :amount.', + 'email_salutation' => 'Beste :name,', + 'email_signature' => 'Met vriendelijke groeten,', + 'email_from' => 'Het InvoiceNinja Team', + 'user_email_footer' => 'Ga alstublieft naar http://www.invoiceninja.com/company/notifications om je e-mail notificatie instellingen aan te passen ', + 'invoice_link_message' => 'Klik op volgende link om de Factuur van je klant te bekijken:', + 'notification_paid_subject' => 'Factuur :invoice is betaald door :client', + 'notification_sent_subject' => 'Factuur :invoice is gezonden door :client', + 'notification_viewed_subject' => 'Factuur :invoice is bekeken door :client', + 'notification_paid' => 'Een betaling voor :amount is gemaakt door klant :client voor Factuur :invoice.', + 'notification_sent' => 'De volgende klant :client heeft Factuur :invoice voor :amount gemaild gekregen.', + 'notification_viewed' => 'De volgende klant :client heeft Factuur :invoice voor :amount bekeken.', + 'reset_password' => 'Je kan het paswoord van je account resetten door op volgende link te klikken:', + 'reset_password_footer' => 'Als je deze paswoord reset niet aangevraagd hebt contacteer dan onze helpdesk alstublieft: ' . CONTACT_EMAIL, + + // Payment page + 'secure_payment' => 'Veilige betaling', + 'card_number' => 'Kaart nummer', + 'expiration_month' => 'Verval maand', + 'expiration_year' => 'Verval jaar', + 'cvv' => 'CVV', + + // Security alerts + 'confide' => [ + 'too_many_attempts' => 'Te veel pogingen. Probeer opnieuw binnen enkele minuten.', + 'wrong_credentials' => 'Verkeerd e-mailadres of paswoord.', + 'confirmation' => 'Je account is bevestigd!', + 'wrong_confirmation' => 'Verkeerde bevestigingscode.', + 'password_forgot' => 'De informatie over je paswoord reset is verzonden naar je e-mailadres.', + 'password_reset' => 'Je paswoord is succesvol aangepast.', + 'wrong_password_reset' => 'Ongeldig paswoord. Probeer opnieuw', + ], + + // Pro Plan + 'pro_plan' => [ + 'remove_logo' => ':link om het Invoice Ninja logo te verwijderen door het pro plan te nemen', + 'remove_logo_link' => 'Klik hier', + ], + + 'logout' => 'Afmelden', + 'sign_up_to_save' => 'Registreer je om je werk op te slaan', + 'agree_to_terms' =>'Ik accepteer de Invoice Ninja :terms', + 'terms_of_service' => 'Gebruiksvoorwaarden', + 'email_taken' => 'Het e-mailadres is al geregistreerd', + 'working' => 'Actief', + 'success' => 'Succes', + 'success_message' => 'Je bent succesvol geregistreerd. Ga alstublieft naar de link in de bevestigingsmail om je e-mailadres te verifiëren.', + 'erase_data' => 'Dit zal uw data permanent verwijderen.', + 'password' => 'Wachtwoord', + 'invoice_subject' => 'Nieuwe factuur van :account', + 'close' => 'Sluiten', + +); diff --git a/app/lang/nl/validation.php b/app/lang/nl/validation.php new file mode 100644 index 000000000000..39fce046e258 --- /dev/null +++ b/app/lang/nl/validation.php @@ -0,0 +1,107 @@ + ":attribute moet geaccepteerd zijn.", + "active_url" => ":attribute is geen geldige URL.", + "after" => ":attribute moet een datum na :date zijn.", + "alpha" => ":attribute mag alleen letters bevatten.", + "alpha_dash" => ":attribute mag alleen letters, nummers, onderstreep(_) en strepen(-) bevatten.", + "alpha_num" => ":attribute mag alleen letters en nummers bevatten.", + "array" => ":attribute moet geselecteerde elementen bevatten.", + "before" => ":attribute moet een datum voor :date zijn.", + "between" => array( + "numeric" => ":attribute moet tussen :min en :max zijn.", + "file" => ":attribute moet tussen :min en :max kilobytes zijn.", + "string" => ":attribute moet tussen :min en :max karakters zijn.", + "array" => ":attribute moet tussen :min en :max items bevatten." + ), + "confirmed" => ":attribute bevestiging komt niet overeen.", + "count" => ":attribute moet precies :count geselecteerde elementen bevatten.", + "countbetween" => ":attribute moet tussen :min en :max geselecteerde elementen bevatten.", + "countmax" => ":attribute moet minder dan :max geselecteerde elementen bevatten.", + "countmin" => ":attribute moet minimaal :min geselecteerde elementen bevatten.", + "date_format" => ":attribute moet een geldig datum formaat bevatten.", + "different" => ":attribute en :other moeten verschillend zijn.", + "email" => ":attribute is geen geldig e-mailadres.", + "exists" => ":attribute bestaat niet.", + "image" => ":attribute moet een afbeelding zijn.", + "in" => ":attribute is ongeldig.", + "integer" => ":attribute moet een getal zijn.", + "ip" => ":attribute moet een geldig IP-adres zijn.", + "match" => "Het formaat van :attribute is ongeldig.", + "max" => array( + "numeric" => ":attribute moet minder dan :max zijn.", + "file" => ":attribute moet minder dan :max kilobytes zijn.", + "string" => ":attribute moet minder dan :max karakters zijn.", + "array" => ":attribute mag maximaal :max items bevatten." + ), + "mimes" => ":attribute moet een bestand zijn van het bestandstype :values.", + "min" => array( + "numeric" => ":attribute moet minimaal :min zijn.", + "file" => ":attribute moet minimaal :min kilobytes zijn.", + "string" => ":attribute moet minimaal :min karakters zijn.", + "array" => ":attribute moet minimaal :min items bevatten." + ), + "not_in" => "Het formaat van :attribute is ongeldig.", + "numeric" => ":attribute moet een nummer zijn.", + "required" => ":attribute is verplicht.", + "required_with" => ":attribute is verplicht i.c.m. :values", + "required_with_all" => ":attribute is verplicht i.c.m. :values", + "required_without" => ":attribute is verplicht als :values niet ingevuld is.", + "required_without_all" => ":attribute is verplicht als :values niet ingevuld zijn.", + "same" => ":attribute en :other moeten overeenkomen.", + "size" => array( + "numeric" => ":attribute moet :size zijn.", + "file" => ":attribute moet :size kilobyte zijn.", + "string" => ":attribute moet :size characters zijn.", + "array" => ":attribute moet :size items bevatten." + ), + "unique" => ":attribute is al in gebruik.", + "url" => ":attribute is geen geldige URL.", + + "positive" => ":attribute moet groter zijn dan nul.", + "has_credit" => "De klant heeft niet voldoende krediet.", + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => array( + 'attribute-name' => array( + 'rule-name' => 'custom-message', + ), + ), + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => array(), + +); diff --git a/app/lang/pt_BR/texts.php b/app/lang/pt_BR/texts.php index 880480d7d669..08407c46c58c 100644 --- a/app/lang/pt_BR/texts.php +++ b/app/lang/pt_BR/texts.php @@ -229,10 +229,10 @@ return array( 'cloned_invoice' => 'Fatura clonada com sucesso', 'emailed_invoice' => 'Fatura enviada por email com sucesso', 'and_created_client' => 'e o cliente foi criado', - 'archived_invoice' => 'Crédito arquivado com sucesso', - 'archived_invoices' => ':count créditos arquivados com sucesso', - 'deleted_invoice' => 'Créditos apagados com sucesso', - 'deleted_invoices' => ':count créditos apagados com sucesso', + 'archived_invoice' => 'Fatura arquivado com sucesso', + 'archived_invoices' => ':count faturas arquivados com sucesso', + 'deleted_invoice' => 'Fatura apagados com sucesso', + 'deleted_invoices' => ':count faturas apagados com sucesso', 'created_payment' => 'Pagamento criado com sucesso', 'archived_payment' => 'Pagamento arquivado com sucesso', @@ -251,9 +251,7 @@ return array( 'confirmation_subject' => 'Confirmação de Conta do Invoice Ninja', 'confirmation_header' => 'Confirmação de Conta', 'confirmation_message' => 'Favor acessar o link abaixo para confirmar a sua conta.', - 'invoice_subject' => 'Nova fatura :invoice', 'invoice_message' => 'Para visualizar a sua fatura de :amount, clique no link abaixo.', - 'payment_subject' => 'Recebido Pagamento de :invoice', 'payment_message' => 'Obrigado pelo seu pagamento de :amount.', 'email_salutation' => 'Caro :name,', 'email_signature' => 'Até mais,', @@ -282,5 +280,18 @@ return array( 'remove_logo_link' => 'Click here', ], - + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + 'close' => 'Close', + 'invoice_subject' => 'New invoice from :account', + 'payment_subject' => 'Recebido Pagamento de', // I remove the invoice number, is it still correct? Thanks! + ); diff --git a/app/models/Invoice.php b/app/models/Invoice.php index 7e73122f8649..4fda510865e6 100755 --- a/app/models/Invoice.php +++ b/app/models/Invoice.php @@ -52,6 +52,13 @@ class Invoice extends EntityModel return $this->invoice_status_id >= INVOICE_STATUS_VIEWED; } + public function isPaid() + { + return $this->invoice_status_id >= INVOICE_STATUS_PAID; + } + + + public function hidePrivateFields() { $this->setVisible(['invoice_number', 'discount', 'po_number', 'invoice_date', 'due_date', 'terms', 'public_notes', 'amount', 'balance', 'invoice_items', 'client', 'tax_name', 'tax_rate', 'account', 'invoice_design_id']); diff --git a/app/ninja/mailers/ContactMailer.php b/app/ninja/mailers/ContactMailer.php index d10405a32c95..37be8e02ed04 100755 --- a/app/ninja/mailers/ContactMailer.php +++ b/app/ninja/mailers/ContactMailer.php @@ -13,11 +13,11 @@ class ContactMailer extends Mailer { public function sendInvoice(Invoice $invoice) { - $view = 'invoice'; - $subject = trans('texts.invoice_subject', ['invoice' => $invoice->invoice_number]); - $invoice->load('invitations', 'client', 'account'); + $view = 'invoice'; + $subject = trans('texts.invoice_subject', ['invoice' => $invoice->invoice_number, 'account' => $invoice->account->getDisplayName()]); + foreach ($invoice->invitations as $invitation) { if (!$invitation->user->email) diff --git a/app/ninja/repositories/AccountRepository.php b/app/ninja/repositories/AccountRepository.php index 23bef9c54178..069814e83a5c 100755 --- a/app/ninja/repositories/AccountRepository.php +++ b/app/ninja/repositories/AccountRepository.php @@ -2,9 +2,44 @@ use Client; use Contact; +use Account; +use Request; +use Session; +use Language; +use User; class AccountRepository { + public function create() + { + $account = new Account; + $account->ip = Request::getClientIp(); + $account->account_key = str_random(RANDOM_KEY_LENGTH); + + if (Session::has(SESSION_LOCALE)) + { + $locale = Session::get(SESSION_LOCALE); + $language = Language::whereLocale($locale)->first(); + + if ($language) + { + $account->language_id = $language->id; + } + } + + $account->save(); + + $random = str_random(RANDOM_KEY_LENGTH); + + $user = new User; + $user->password = $random; + $user->password_confirmation = $random; + $user->username = $random; + $account->users()->save($user); + + return $account; + } + public function getSearchData() { $clients = \DB::table('clients') diff --git a/app/routes.php b/app/routes.php index ab0a00b29a1f..56a6b007cdad 100755 --- a/app/routes.php +++ b/app/routes.php @@ -113,20 +113,13 @@ HTML::macro('menu_link', function($type) { $Type = ucfirst($type); $Types = ucfirst($types); $class = ( Request::is($types) || Request::is('*'.$type.'*')) ? ' active' : ''; - $str= ''; + + return ''; }); HTML::macro('image_data', function($imagePath) { diff --git a/app/views/header.blade.php b/app/views/header.blade.php index 16d3744be515..75460051c7aa 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -108,11 +108,11 @@