diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index bf047ded36c3..118311781588 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -118,21 +118,21 @@ class AccountController extends BaseController if (Auth::user()->isPro() && ! Auth::user()->isTrial()) { return false; } - + $invitation = $this->accountRepo->enablePlan(); return $invitation->invitation_key; } - + public function changePlan() { $user = Auth::user(); $account = $user->account; - + $plan = Input::get('plan'); $term = Input::get('plan_term'); - + $planDetails = $account->getPlanDetails(false, false); - + $credit = 0; if ($planDetails) { if ($planDetails['plan'] == PLAN_PRO && $plan == PLAN_ENTERPRISE) { @@ -142,7 +142,7 @@ class AccountController extends BaseController $pending_monthly = true; $term = PLAN_TERM_YEARLY; } - + $new_plan = array( 'plan' => PLAN_ENTERPRISE, 'term' => $term, @@ -170,7 +170,7 @@ class AccountController extends BaseController // Downgrade $refund_deadline = clone $planDetails['started']; $refund_deadline->modify('+30 days'); - + if ($plan == PLAN_FREE && $refund_deadline >= date_create()) { // Refund $account->company->plan = null; @@ -180,7 +180,7 @@ class AccountController extends BaseController $account->company->plan_paid = null; $account->company->pending_plan = null; $account->company->pending_term = null; - + if ($account->company->payment) { $payment = $account->company->payment; $this->paymentService->refund($payment); @@ -189,9 +189,9 @@ class AccountController extends BaseController } else { Session::flash('message', trans('texts.updated_plan')); } - + $account->company->save(); - + } else { $pending_change = array( 'plan' => $plan, @@ -199,18 +199,18 @@ class AccountController extends BaseController ); } } - + if (!empty($new_plan)) { $time_used = $planDetails['paid']->diff(date_create()); $days_used = $time_used->days; - + if ($time_used->invert) { // They paid in advance $days_used *= -1; } - + $days_total = $planDetails['paid']->diff($planDetails['expires'])->days; - + $percent_used = $days_used / $days_total; $old_plan_price = Account::$plan_prices[$planDetails['plan']][$planDetails['term']]; $credit = $old_plan_price * (1 - $percent_used); @@ -221,20 +221,20 @@ class AccountController extends BaseController 'term' => $term, ); } - + if (!empty($pending_change) && empty($new_plan)) { $account->company->pending_plan = $pending_change['plan']; $account->company->pending_term = $pending_change['term']; $account->company->save(); - + Session::flash('message', trans('texts.updated_plan')); } - + if (!empty($new_plan)) { $invitation = $this->accountRepo->enablePlan($new_plan['plan'], $new_plan['term'], $credit, !empty($pending_monthly)); return Redirect::to('view/'.$invitation->invitation_key); } - + return Redirect::to('/settings/'.ACCOUNT_MANAGEMENT, 301); } @@ -501,7 +501,7 @@ class AccountController extends BaseController $client->postal_code = trans('texts.postal_code'); $client->work_phone = trans('texts.work_phone'); $client->work_email = trans('texts.work_id'); - + $invoice->invoice_number = '0000'; $invoice->invoice_date = Utils::fromSqlDate(date('Y-m-d')); $invoice->account = json_decode($account->toJson()); @@ -519,7 +519,7 @@ class AccountController extends BaseController $invoiceItem->product_key = 'Item'; $document->base64 = 'data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAyAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNBCUAAAAAABAAAAAAAAAAAAAAAAAAAAAA/+4AIUFkb2JlAGTAAAAAAQMAEAMDBgkAAAW8AAALrQAAEWf/2wCEAAgGBgYGBggGBggMCAcIDA4KCAgKDhANDQ4NDRARDA4NDQ4MEQ8SExQTEg8YGBoaGBgjIiIiIycnJycnJycnJycBCQgICQoJCwkJCw4LDQsOEQ4ODg4REw0NDg0NExgRDw8PDxEYFhcUFBQXFhoaGBgaGiEhICEhJycnJycnJycnJ//CABEIAGQAlgMBIgACEQEDEQH/xADtAAABBQEBAAAAAAAAAAAAAAAAAQIDBAUGBwEBAAMBAQEAAAAAAAAAAAAAAAIDBAUBBhAAAQQCAQMDBQEAAAAAAAAAAgABAwQRBRIQIBMwIQYxIiMUFUARAAIBAgMFAwgHBwUBAAAAAAECAwARIRIEMUFRYROhIkIgcYGRsdFSIzDBMpKyFAVA4WJyM0MkUPGiU3OTEgABAgQBCQYEBwAAAAAAAAABEQIAITESAyBBUWFxkaGxIhAwgdEyE8HxYnLw4UJSg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4QRr5JcRHqajXulVBqlghaxQnLR092G41E0g3djqcHWMXuExr0VmhZdW7FsLT+gynKYpXXjGV7wreJppoapXL7oQD0sBYvCAX4tIpESrHmFyooWQqCbMCN1vpBgtacBgtAYVZcF7afsYf9lQisQlRdvDkWyqGZBthXx7RPvKkUrlb5Q/CrdFT5neoWdIZSWgR/VBQwZ0nUGPeBAJdZvWE38qghbIlumjVcdMzdAL5o/BAVDYFa5xT2qVhDQIAA5pB+5aemryoxhX0jk3pALPvUXhzAK5y/XUnskCEqEqMLSHNUwwLAQBRotLMeIdlDn5FpRZUUm5R2ZJ7EpNZRMobAO5K5hOAUuBYHYG+8SddNHz0+EKEOCcKzlT1BZYb4uB90OpYUAVM2rcL3vCknNK+bjWGKs6bZa9oVhmRdpg/YWAAlUVJkcjdXD11Lgke0VcU2MbHfygaFKWEnTL5GJZzMyGuGMPMbSQlbPagPOZaKOHjusEyaLtXgeW3iK4+oDc4bNYnwcKiQaks/Caxh5wK7kdeZvb3LEJhAMqbKrhAqim522Qv5gPgqp9FxlL7mnZpXi3MxIMgDkG/ug65qHbsEF8zXvjwBFAU4jmwArRmKjV6XLdNd1TvoiF1X5vX/fMHBChWDvd+4paeJz4FDgzLjs70CdhHznQBjzv7Sxo8bd2NfcZmYNWs8RxQGYGe1+olGV9n7Z+0UPFyYwlYvmDNJctGQPGwnyQAWPv0haPhQ4abtsUxZfaFBalqvypK8pGizJpYO+aShBw+h2xgHf3CNeSAXzRnTRxS/szKo3P+IMAszsGE7iUiOwZy99tXZg3BCqz2L+qH0gU09RzxfaMDrstvwgKoDsPRrCLj7jcKSy6oH5pLZC0I+L/UPAvRNDQUa9oMU7aNedH3NWIKBWuO+m4lsAS60VfopKsCajNR6AT7l8D418EaQCisod0YIUK9U/PBh6loQegqKly/QfkBmNzMzM/i+jOk/9k='; - + $invoice->client = $client; $invoice->invoice_items = [$invoiceItem]; //$invoice->documents = $account->hasFeature(FEATURE_DOCUMENTS) ? [$document] : []; @@ -532,7 +532,7 @@ class AccountController extends BaseController $data['invoiceDesigns'] = InvoiceDesign::getDesigns(); $data['invoiceFonts'] = Cache::get('fonts'); $data['section'] = $section; - + $pageSizes = [ 'A0', 'A1', @@ -710,6 +710,13 @@ class AccountController extends BaseController private function saveClientPortal() { + $account = Auth::user()->account; + + $account->enable_client_portal = !!Input::get('enable_client_portal'); + $account->enable_client_portal_dashboard = !!Input::get('enable_client_portal_dashboard'); + $account->enable_portal_password = !!Input::get('enable_portal_password'); + $account->send_portal_password = !!Input::get('send_portal_password'); + // Only allowed for pro Invoice Ninja users or white labeled self-hosted users if (Auth::user()->account->hasFeature(FEATURE_CLIENT_PORTAL_CSS)) { $input_css = Input::get('client_view_css'); @@ -744,19 +751,13 @@ class AccountController extends BaseController $sanitized_css = $input_css; } - $account = Auth::user()->account; $account->client_view_css = $sanitized_css; - - $account->enable_client_portal = !!Input::get('enable_client_portal'); - $account->enable_client_portal_dashboard = !!Input::get('enable_client_portal_dashboard'); - $account->enable_portal_password = !!Input::get('enable_portal_password'); - $account->send_portal_password = !!Input::get('send_portal_password'); - - $account->save(); - - Session::flash('message', trans('texts.updated_settings')); } + $account->save(); + + Session::flash('message', trans('texts.updated_settings')); + return Redirect::to('settings/'.ACCOUNT_CLIENT_PORTAL); } @@ -1012,15 +1013,15 @@ class AccountController extends BaseController /* Logo image file */ if ($uploaded = Input::file('logo')) { $path = Input::file('logo')->getRealPath(); - + $disk = $account->getLogoDisk(); if ($account->hasLogo()) { $disk->delete($account->logo); } - + $extension = strtolower($uploaded->getClientOriginalExtension()); if(empty(Document::$types[$extension]) && !empty(Document::$extraExtensions[$extension])){ - $documentType = Document::$extraExtensions[$extension]; + $documentType = Document::$extraExtensions[$extension]; } else{ $documentType = $extension; @@ -1039,19 +1040,19 @@ class AccountController extends BaseController } else { if ($documentType != 'gif') { $account->logo = $account->account_key.'.'.$documentType; - + $imageSize = getimagesize($filePath); $account->logo_width = $imageSize[0]; $account->logo_height = $imageSize[1]; $account->logo_size = $size; - + // make sure image isn't interlaced if (extension_loaded('fileinfo')) { $image = Image::make($path); $image->interlace(false); $imageStr = (string) $image->encode($documentType); $disk->put($account->logo, $imageStr); - + $account->logo_size = strlen($imageStr); } else { $stream = fopen($filePath, 'r'); @@ -1064,12 +1065,12 @@ class AccountController extends BaseController $image->resize(200, 120, function ($constraint) { $constraint->aspectRatio(); }); - + $account->logo = $account->account_key.'.png'; $image = Image::canvas($image->width(), $image->height(), '#FFFFFF')->insert($image); $imageStr = (string) $image->encode('png'); $disk->put($account->logo, $imageStr); - + $account->logo_size = strlen($imageStr); $account->logo_width = $image->width(); $account->logo_height = $image->height(); @@ -1079,7 +1080,7 @@ class AccountController extends BaseController } } } - + $account->save(); } @@ -1149,7 +1150,7 @@ class AccountController extends BaseController $account = Auth::user()->account; if ($account->hasLogo()) { $account->getLogoDisk()->delete($account->logo); - + $account->logo = null; $account->logo_size = null; $account->logo_width = null; @@ -1254,7 +1255,7 @@ class AccountController extends BaseController $this->accountRepo->unlinkAccount($account); if ($account->company->accounts->count() == 1) { - $account->company->forceDelete(); + $account->company->forceDelete(); } $account->forceDelete(); @@ -1302,7 +1303,7 @@ class AccountController extends BaseController return Redirect::to("/settings/$section/", 301); } - + public function previewEmail(\App\Services\TemplateService $templateService) { $template = Input::get('template'); @@ -1310,29 +1311,29 @@ class AccountController extends BaseController ->invoices() ->withTrashed() ->first(); - + if ( ! $invoice) { return trans('texts.create_invoice_for_sample'); } - + $account = Auth::user()->account; - + // replace the variables with sample data $data = [ 'account' => $account, 'invoice' => $invoice, 'invitation' => $invoice->invitations->first(), 'client' => $invoice->client, - 'amount' => $invoice->amount + 'amount' => $invoice->amount ]; - - // create the email view + + // create the email view $view = 'emails.' . $account->getTemplateView(ENTITY_INVOICE) . '_html'; $data = array_merge($data, [ 'body' => $templateService->processVariables($template, $data), 'entityType' => ENTITY_INVOICE, ]); - + return Response::view($view, $data); } } diff --git a/app/Http/Controllers/InvoiceApiController.php b/app/Http/Controllers/InvoiceApiController.php index 667690395eb2..983e8fa14d71 100644 --- a/app/Http/Controllers/InvoiceApiController.php +++ b/app/Http/Controllers/InvoiceApiController.php @@ -1,7 +1,6 @@ withArchived() ->with('contacts') ->with(['invoices' => function($query) use ($startDate, $endDate, $dateField) { - $query->withArchived(); - if ($dateField == FILTER_PAYMENT_DATE) { + $query->with('invoice_items')->withArchived(); + if ($dateField == FILTER_INVOICE_DATE) { $query->where('invoice_date', '>=', $startDate) ->where('invoice_date', '<=', $endDate) - ->whereHas('payments', function($query) use ($startDate, $endDate) { + ->with('payments'); + } else { + $query->whereHas('payments', function($query) use ($startDate, $endDate) { $query->where('payment_date', '>=', $startDate) ->where('payment_date', '<=', $endDate) ->withArchived(); @@ -260,9 +262,8 @@ class ReportController extends BaseController ->with(['payments' => function($query) use ($startDate, $endDate) { $query->where('payment_date', '>=', $startDate) ->where('payment_date', '<=', $endDate) - ->withArchived() - ->with('payment_type', 'account_gateway.gateway'); - }, 'invoice_items']); + ->withArchived(); + }]); } }]); diff --git a/app/Http/routes.php b/app/Http/routes.php index 8a69b8d53e38..321eeade2acc 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -391,6 +391,7 @@ if (!defined('CONTACT_EMAIL')) { define('ACTION_RESTORE', 'restore'); define('ACTION_ARCHIVE', 'archive'); + define('ACTION_CLONE', 'clone'); define('ACTION_CONVERT', 'convert'); define('ACTION_DELETE', 'delete'); diff --git a/app/Ninja/Transformers/UserTransformer.php b/app/Ninja/Transformers/UserTransformer.php index 532c1f6fa4f2..63428ed64bb6 100644 --- a/app/Ninja/Transformers/UserTransformer.php +++ b/app/Ninja/Transformers/UserTransformer.php @@ -26,6 +26,8 @@ class UserTransformer extends EntityTransformer 'notify_viewed' => (bool) $user->notify_viewed, 'notify_paid' => (bool) $user->notify_paid, 'notify_approved' => (bool) $user->notify_approved, + 'is_admin' => (bool) $user->is_admin, + 'permissions' => (int) $user->getOriginal('permissions'), ]; } } \ No newline at end of file diff --git a/config/app.php b/config/app.php index 4a75f65f9e5f..d9aa4ef00030 100644 --- a/config/app.php +++ b/config/app.php @@ -82,7 +82,7 @@ return [ | */ - 'key' => env('APP_KEY', ''), + 'key' => env('APP_KEY', 'SomeRandomString'), 'cipher' => env('APP_CIPHER', MCRYPT_RIJNDAEL_128), @@ -139,7 +139,7 @@ return [ 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', 'Illuminate\Broadcasting\BroadcastServiceProvider', - + /* * Additional Providers */ diff --git a/database/migrations/2013_11_05_180133_confide_setup_users_table.php b/database/migrations/2013_11_05_180133_confide_setup_users_table.php index 6bd69f503980..e9c10da1ad1e 100644 --- a/database/migrations/2013_11_05_180133_confide_setup_users_table.php +++ b/database/migrations/2013_11_05_180133_confide_setup_users_table.php @@ -9,37 +9,37 @@ class ConfideSetupUsersTable extends Migration { * @return void */ public function up() - { - Schema::dropIfExists('payment_terms'); - Schema::dropIfExists('themes'); - Schema::dropIfExists('credits'); + { + Schema::dropIfExists('payment_terms'); + Schema::dropIfExists('themes'); + Schema::dropIfExists('credits'); Schema::dropIfExists('activities'); Schema::dropIfExists('invitations'); Schema::dropIfExists('payments'); Schema::dropIfExists('account_gateways'); Schema::dropIfExists('invoice_items'); Schema::dropIfExists('products'); - Schema::dropIfExists('tax_rates'); + Schema::dropIfExists('tax_rates'); Schema::dropIfExists('contacts'); Schema::dropIfExists('invoices'); Schema::dropIfExists('password_reminders'); Schema::dropIfExists('clients'); Schema::dropIfExists('users'); Schema::dropIfExists('accounts'); - Schema::dropIfExists('currencies'); + Schema::dropIfExists('currencies'); Schema::dropIfExists('invoice_statuses'); Schema::dropIfExists('countries'); - Schema::dropIfExists('timezones'); - Schema::dropIfExists('frequencies'); - Schema::dropIfExists('date_formats'); - Schema::dropIfExists('datetime_formats'); + Schema::dropIfExists('timezones'); + Schema::dropIfExists('frequencies'); + Schema::dropIfExists('date_formats'); + Schema::dropIfExists('datetime_formats'); Schema::dropIfExists('sizes'); Schema::dropIfExists('industries'); Schema::dropIfExists('gateways'); Schema::dropIfExists('payment_types'); Schema::create('countries', function($table) - { + { $table->increments('id'); $table->string('capital', 255)->nullable(); $table->string('citizenship', 255)->nullable(); @@ -53,7 +53,7 @@ class ConfideSetupUsersTable extends Migration { $table->string('name', 255)->default(''); $table->string('region_code', 3)->default(''); $table->string('sub_region_code', 3)->default(''); - $table->boolean('eea')->default(0); + $table->boolean('eea')->default(0); }); Schema::create('themes', function($t) @@ -85,21 +85,21 @@ class ConfideSetupUsersTable extends Migration { Schema::create('date_formats', function($t) { $t->increments('id'); - $t->string('format'); - $t->string('picker_format'); - $t->string('label'); + $t->string('format'); + $t->string('picker_format'); + $t->string('label'); }); Schema::create('datetime_formats', function($t) { $t->increments('id'); - $t->string('format'); - $t->string('label'); + $t->string('format'); + $t->string('label'); }); Schema::create('currencies', function($t) { - $t->increments('id'); + $t->increments('id'); $t->string('name'); $t->string('symbol'); @@ -107,20 +107,20 @@ class ConfideSetupUsersTable extends Migration { $t->string('thousand_separator'); $t->string('decimal_separator'); $t->string('code'); - }); + }); Schema::create('sizes', function($t) { $t->increments('id'); $t->string('name'); - }); + }); Schema::create('industries', function($t) { $t->increments('id'); $t->string('name'); - }); - + }); + Schema::create('accounts', function($t) { $t->increments('id'); @@ -136,13 +136,13 @@ class ConfideSetupUsersTable extends Migration { $t->string('ip'); $t->string('account_key')->unique(); $t->timestamp('last_login')->nullable(); - + $t->string('address1')->nullable(); $t->string('address2')->nullable(); $t->string('city')->nullable(); $t->string('state')->nullable(); $t->string('postal_code')->nullable(); - $t->unsignedInteger('country_id')->nullable(); + $t->unsignedInteger('country_id')->nullable(); $t->text('invoice_terms')->nullable(); $t->text('email_footer')->nullable(); $t->unsignedInteger('industry_id')->nullable(); @@ -158,17 +158,17 @@ class ConfideSetupUsersTable extends Migration { $t->foreign('currency_id')->references('id')->on('currencies'); $t->foreign('industry_id')->references('id')->on('industries'); $t->foreign('size_id')->references('id')->on('sizes'); - }); - + }); + Schema::create('gateways', function($t) { $t->increments('id'); - $t->timestamps(); + $t->timestamps(); $t->string('name'); $t->string('provider'); $t->boolean('visible')->default(true); - }); + }); Schema::create('users', function($t) { @@ -206,31 +206,31 @@ class ConfideSetupUsersTable extends Migration { $t->unsignedInteger('gateway_id'); $t->timestamps(); $t->softDeletes(); - + $t->text('config'); $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('gateway_id')->references('id')->on('gateways'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - + $t->unsignedInteger('public_id')->index(); $t->unique( array('account_id','public_id') ); - }); + }); Schema::create('password_reminders', function($t) { $t->string('email'); $t->timestamps(); - + $t->string('token'); - }); + }); Schema::create('clients', function($t) { $t->increments('id'); $t->unsignedInteger('user_id'); - $t->unsignedInteger('account_id')->index(); + $t->unsignedInteger('account_id')->index(); $t->unsignedInteger('currency_id')->nullable(); $t->timestamps(); $t->softDeletes(); @@ -255,14 +255,14 @@ class ConfideSetupUsersTable extends Migration { $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); - $t->foreign('country_id')->references('id')->on('countries'); - $t->foreign('industry_id')->references('id')->on('industries'); - $t->foreign('size_id')->references('id')->on('sizes'); + $t->foreign('country_id')->references('id')->on('countries'); + $t->foreign('industry_id')->references('id')->on('industries'); + $t->foreign('size_id')->references('id')->on('sizes'); $t->foreign('currency_id')->references('id')->on('currencies'); - + $t->unsignedInteger('public_id')->index(); $t->unique( array('account_id','public_id') ); - }); + }); Schema::create('contacts', function($t) { @@ -279,14 +279,14 @@ class ConfideSetupUsersTable extends Migration { $t->string('last_name')->nullable(); $t->string('email')->nullable(); $t->string('phone')->nullable(); - $t->timestamp('last_login')->nullable(); + $t->timestamp('last_login')->nullable(); - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); + $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; $t->unsignedInteger('public_id')->nullable(); $t->unique( array('account_id','public_id') ); - }); + }); Schema::create('invoice_statuses', function($t) { @@ -325,15 +325,15 @@ class ConfideSetupUsersTable extends Migration { $t->timestamp('last_sent_date')->nullable(); $t->unsignedInteger('recurring_invoice_id')->index()->nullable(); - $t->string('tax_name'); - $t->decimal('tax_rate', 13, 2); + $t->string('tax_name1'); + $t->decimal('tax_rate1', 13, 3); $t->decimal('amount', 13, 2); $t->decimal('balance', 13, 2); - + $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); + $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); + $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $t->foreign('invoice_status_id')->references('id')->on('invoice_statuses'); $t->foreign('recurring_invoice_id')->references('id')->on('invoices')->onDelete('cascade'); @@ -375,11 +375,11 @@ class ConfideSetupUsersTable extends Migration { $t->softDeletes(); $t->string('name'); - $t->decimal('rate', 13, 2); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); + $t->decimal('rate', 13, 3); + + $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - + $t->unsignedInteger('public_id'); $t->unique( array('account_id','public_id') ); }); @@ -396,10 +396,10 @@ class ConfideSetupUsersTable extends Migration { $t->text('notes'); $t->decimal('cost', 13, 2); $t->decimal('qty', 13, 2)->nullable(); - - $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); + + $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - + $t->unsignedInteger('public_id'); $t->unique( array('account_id','public_id') ); }); @@ -420,8 +420,8 @@ class ConfideSetupUsersTable extends Migration { $t->decimal('cost', 13, 2); $t->decimal('qty', 13, 2)->nullable(); - $t->string('tax_name')->nullable(); - $t->decimal('tax_rate', 13, 2)->nullable(); + $t->string('tax_name1')->nullable(); + $t->decimal('tax_rate1', 13, 3)->nullable(); $t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade'); $t->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); @@ -458,10 +458,10 @@ class ConfideSetupUsersTable extends Migration { $t->foreign('account_gateway_id')->references('id')->on('account_gateways')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; $t->foreign('payment_type_id')->references('id')->on('payment_types'); - + $t->unsignedInteger('public_id')->index(); $t->unique( array('account_id','public_id') ); - }); + }); Schema::create('credits', function($t) { @@ -471,21 +471,21 @@ class ConfideSetupUsersTable extends Migration { $t->unsignedInteger('user_id'); $t->timestamps(); $t->softDeletes(); - + $t->boolean('is_deleted')->default(false); $t->decimal('amount', 13, 2); $t->decimal('balance', 13, 2); $t->date('credit_date')->nullable(); $t->string('credit_number')->nullable(); $t->text('private_notes'); - + $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; - + $t->unsignedInteger('public_id')->index(); $t->unique( array('account_id','public_id') ); - }); + }); Schema::create('activities', function($t) { @@ -500,13 +500,13 @@ class ConfideSetupUsersTable extends Migration { $t->unsignedInteger('invoice_id')->nullable(); $t->unsignedInteger('credit_id')->nullable(); $t->unsignedInteger('invitation_id')->nullable(); - + $t->text('message')->nullable(); $t->text('json_backup')->nullable(); - $t->integer('activity_type_id'); + $t->integer('activity_type_id'); $t->decimal('adjustment', 13, 2)->nullable(); $t->decimal('balance', 13, 2)->nullable(); - + $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); }); @@ -519,9 +519,9 @@ class ConfideSetupUsersTable extends Migration { */ public function down() { - Schema::dropIfExists('payment_terms'); - Schema::dropIfExists('themes'); - Schema::dropIfExists('credits'); + Schema::dropIfExists('payment_terms'); + Schema::dropIfExists('themes'); + Schema::dropIfExists('credits'); Schema::dropIfExists('activities'); Schema::dropIfExists('invitations'); Schema::dropIfExists('payments'); @@ -535,16 +535,16 @@ class ConfideSetupUsersTable extends Migration { Schema::dropIfExists('clients'); Schema::dropIfExists('users'); Schema::dropIfExists('accounts'); - Schema::dropIfExists('currencies'); + Schema::dropIfExists('currencies'); Schema::dropIfExists('invoice_statuses'); Schema::dropIfExists('countries'); - Schema::dropIfExists('timezones'); - Schema::dropIfExists('frequencies'); - Schema::dropIfExists('date_formats'); - Schema::dropIfExists('datetime_formats'); + Schema::dropIfExists('timezones'); + Schema::dropIfExists('frequencies'); + Schema::dropIfExists('date_formats'); + Schema::dropIfExists('datetime_formats'); Schema::dropIfExists('sizes'); Schema::dropIfExists('industries'); - Schema::dropIfExists('gateways'); + Schema::dropIfExists('gateways'); Schema::dropIfExists('payment_types'); } } diff --git a/database/migrations/2016_01_04_175228_create_vendors_table.php b/database/migrations/2016_01_04_175228_create_vendors_table.php index 1295748b0801..5e8551004c20 100644 --- a/database/migrations/2016_01_04_175228_create_vendors_table.php +++ b/database/migrations/2016_01_04_175228_create_vendors_table.php @@ -57,7 +57,7 @@ class CreateVendorsTable extends Migration $table->foreign('vendor_id')->references('id')->on('vendors')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - + $table->unsignedInteger('public_id')->nullable(); $table->unique(array('account_id', 'public_id')); }); @@ -79,7 +79,7 @@ class CreateVendorsTable extends Migration $table->date('expense_date')->nullable(); $table->text('private_notes'); $table->text('public_notes'); - $table->unsignedInteger('currency_id')->nullable(); + $table->unsignedInteger('invoice_currency_id')->nullable(false); $table->boolean('should_be_invoiced')->default(true); // Relations diff --git a/database/migrations/2016_01_24_112646_add_bank_subaccounts.php b/database/migrations/2016_01_24_112646_add_bank_subaccounts.php index 92b283a52662..5c01fdd5de8b 100644 --- a/database/migrations/2016_01_24_112646_add_bank_subaccounts.php +++ b/database/migrations/2016_01_24_112646_add_bank_subaccounts.php @@ -35,13 +35,13 @@ class AddBankSubaccounts extends Migration { Schema::table('expenses', function($table) { - $table->string('transaction_id'); - $table->unsignedInteger('bank_id'); + $table->string('transaction_id')->nullable(); + $table->unsignedInteger('bank_id')->nullable(); }); Schema::table('vendors', function($table) { - $table->string('transaction_name'); + $table->string('transaction_name')->nullable(); }); } @@ -53,7 +53,7 @@ class AddBankSubaccounts extends Migration { public function down() { Schema::drop('bank_subaccounts'); - + Schema::table('expenses', function($table) { $table->dropColumn('transaction_id'); diff --git a/database/migrations/2016_01_27_173015_add_header_footer_option.php b/database/migrations/2016_01_27_173015_add_header_footer_option.php index 0cb690a17383..d840b31e8f13 100644 --- a/database/migrations/2016_01_27_173015_add_header_footer_option.php +++ b/database/migrations/2016_01_27_173015_add_header_footer_option.php @@ -25,20 +25,24 @@ class AddHeaderFooterOption extends Migration { $table->boolean('is_offsite'); $table->boolean('is_secure'); }); - + Schema::table('expenses', function($table) { - $table->string('transaction_id')->nullable()->change(); - $table->unsignedInteger('bank_id')->nullable()->change(); - }); + if (Schema::hasColumn('expenses', 'transaction_id')) { + $table->string('transaction_id')->nullable()->change(); + $table->unsignedInteger('bank_id')->nullable()->change(); + } + }); Schema::table('vendors', function($table) { - $table->string('transaction_name')->nullable()->change(); - }); - + if (Schema::hasColumn('vendors', 'transaction_name')) { + $table->string('transaction_name')->nullable()->change(); + } + }); + } - + /** * Reverse the migrations. * diff --git a/database/migrations/2016_02_01_135956_add_source_currency_to_expenses.php b/database/migrations/2016_02_01_135956_add_source_currency_to_expenses.php index 4fcfa367d6be..a4b1fa62436b 100644 --- a/database/migrations/2016_02_01_135956_add_source_currency_to_expenses.php +++ b/database/migrations/2016_02_01_135956_add_source_currency_to_expenses.php @@ -16,10 +16,12 @@ class AddSourceCurrencyToExpenses extends Migration $table->dropColumn('foreign_amount'); - $table->unsignedInteger('currency_id')->nullable(false)->change(); - $table->renameColumn('currency_id', 'invoice_currency_id'); - $table->unsignedInteger('expense_currency_id'); + if (Schema::hasColumn('expenses', 'currency_id')) { + $table->unsignedInteger('currency_id')->nullable(false)->change(); + $table->renameColumn('currency_id', 'invoice_currency_id'); + } + $table->unsignedInteger('expense_currency_id'); }); Schema::table('expenses', function (Blueprint $table) { diff --git a/database/migrations/2016_03_14_214710_add_support_three_decimal_taxes.php b/database/migrations/2016_03_14_214710_add_support_three_decimal_taxes.php index af35fc927564..339a29b521b7 100644 --- a/database/migrations/2016_03_14_214710_add_support_three_decimal_taxes.php +++ b/database/migrations/2016_03_14_214710_add_support_three_decimal_taxes.php @@ -11,7 +11,9 @@ class AddSupportThreeDecimalTaxes extends Migration { public function up() { Schema::table('tax_rates', function($table) { - $table->decimal('rate', 13, 3)->change(); + if (Schema::hasColumn('tax_rates', 'rate')) { + $table->decimal('rate', 13, 3)->change(); + } }); } /** diff --git a/database/migrations/2016_03_22_168362_add_documents.php b/database/migrations/2016_03_22_168362_add_documents.php index 3d0a44f20c25..233f420c198b 100644 --- a/database/migrations/2016_03_22_168362_add_documents.php +++ b/database/migrations/2016_03_22_168362_add_documents.php @@ -19,7 +19,7 @@ class AddDocuments extends Migration { $table->boolean('document_email_attachment')->default(1); }); - DB::table('accounts')->update(array('logo' => '')); + \DB::table('accounts')->update(array('logo' => '')); Schema::dropIfExists('documents'); Schema::create('documents', function($t) { diff --git a/database/migrations/2016_03_23_215049_support_multiple_tax_rates.php b/database/migrations/2016_03_23_215049_support_multiple_tax_rates.php index 4c2d8a29b931..cda2aef7b428 100644 --- a/database/migrations/2016_03_23_215049_support_multiple_tax_rates.php +++ b/database/migrations/2016_03_23_215049_support_multiple_tax_rates.php @@ -13,30 +13,38 @@ class SupportMultipleTaxRates extends Migration public function up() { Schema::table('invoices', function($table) { - $table->decimal('tax_rate', 13, 3)->change(); - }); + if (Schema::hasColumn('invoices', 'tax_rate')) { + $table->decimal('tax_rate', 13, 3)->change(); + } + }); Schema::table('invoice_items', function($table) { - $table->decimal('tax_rate', 13, 3)->change(); - }); - + if (Schema::hasColumn('invoice_items', 'tax_rate')) { + $table->decimal('tax_rate', 13, 3)->change(); + } + }); + Schema::table('invoices', function($table) { + if (Schema::hasColumn('invoices', 'tax_rate')) { $table->renameColumn('tax_rate', 'tax_rate1'); $table->renameColumn('tax_name', 'tax_name1'); - $table->string('tax_name2')->nullable(); - $table->decimal('tax_rate2', 13, 3); + } + $table->string('tax_name2')->nullable(); + $table->decimal('tax_rate2', 13, 3); }); Schema::table('invoice_items', function($table) { + if (Schema::hasColumn('invoice_items', 'tax_rate')) { $table->renameColumn('tax_rate', 'tax_rate1'); $table->renameColumn('tax_name', 'tax_name1'); - $table->string('tax_name2')->nullable(); - $table->decimal('tax_rate2', 13, 3); + } + $table->string('tax_name2')->nullable(); + $table->decimal('tax_rate2', 13, 3); }); - Schema::table('accounts', function($table) { - $table->boolean('enable_client_portal_dashboard')->default(true); - }); + Schema::table('accounts', function($table) { + $table->boolean('enable_client_portal_dashboard')->default(true); + }); } /** * Reverse the migrations. @@ -65,4 +73,4 @@ class SupportMultipleTaxRates extends Migration $table->dropColumn('enable_client_portal_dashboard'); }); } -} \ No newline at end of file +} diff --git a/database/seeds/CurrenciesSeeder.php b/database/seeds/CurrenciesSeeder.php index 3b44d55d8d7f..857dbe628405 100644 --- a/database/seeds/CurrenciesSeeder.php +++ b/database/seeds/CurrenciesSeeder.php @@ -58,6 +58,7 @@ class CurrenciesSeeder extends Seeder ['name' => 'Maldivian Rufiyaa', 'code' => 'MVR', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['name' => 'Costa Rican Colón', 'code' => 'CRC', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['name' => 'Pakistani Rupee', 'code' => 'PKR', 'symbol' => 'Rs ', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.'], + ['name' => 'Polish Zloty', 'code' => 'PLN', 'symbol' => 'zł', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => ','], ]; foreach ($currencies as $currency) { diff --git a/readme.md b/readme.md index 93b30a8003d4..e435d9e90657 100644 --- a/readme.md +++ b/readme.md @@ -31,10 +31,11 @@ ### Features * Built using Laravel 5.2 * Live PDF generation using [pdfmake](http://pdfmake.org/) -* Integrates with 50+ payment providers with [OmniPay](https://github.com/thephpleague/omnipay) +* Integrates with 50+ payment providers with [Omnipay](https://github.com/thephpleague/omnipay) * Recurring invoices with auto-billing * Expenses and vendors * Tasks with time-tracking +* File Attachments * Multi-user/multi-company support * Tax rates and payment terms * Reminder emails diff --git a/resources/lang/pl/texts.php b/resources/lang/pl/texts.php index 9b91d00cfdd6..176e8520466c 100644 --- a/resources/lang/pl/texts.php +++ b/resources/lang/pl/texts.php @@ -43,7 +43,7 @@ $LANG = array( 'subtotal' => 'Suma częściowa', 'paid_to_date' => 'Wypłacono do tej pory', 'balance_due' => 'Balance Due', - 'invoice_design_id' => 'Szablon', + 'invoice_design_id' => 'Motyw', 'terms' => 'Warunki', 'your_invoice' => 'Twoja faktura', 'remove_contact' => 'Usuń kontakt', @@ -185,69 +185,69 @@ $LANG = array( 'clients_will_create' => 'klienci będą utworzeni', 'email_settings' => 'Ustawienia e-mail', 'client_view_styling' => 'Client View Styling', - 'pdf_email_attachment' => 'Attach PDFs', + 'pdf_email_attachment' => 'Dodaj PDF', 'custom_css' => 'Custom CSS', - 'import_clients' => 'Import Client Data', - 'csv_file' => 'CSV file', - 'export_clients' => 'Export Client Data', - 'created_client' => 'Successfully created client', + 'import_clients' => 'Importuj dane klienta', + 'csv_file' => 'Plik CSV', + 'export_clients' => 'Eksportuj dane klienta', + 'created_client' => 'Klient został utworzony', 'created_clients' => 'Successfully created :count client(s)', - 'updated_settings' => 'Successfully updated settings', - 'removed_logo' => 'Successfully removed logo', - 'sent_message' => 'Successfully sent message', - 'invoice_error' => 'Please make sure to select a client and correct any errors', + 'updated_settings' => 'Ustawienia zostały zaktualizowane', + 'removed_logo' => 'Logo zostało usunięte', + 'sent_message' => 'Wiadomość została wysłana', + 'invoice_error' => 'Pamiętaj aby wybrać klienta i poprawidź błędy', 'limit_clients' => 'Sorry, this will exceed the limit of :count clients', 'payment_error' => 'There was an error processing your payment. Please try again later.', 'registration_required' => 'Please sign up to email an invoice', - 'confirmation_required' => 'Please confirm your email address', - 'updated_client' => 'Successfully updated client', - 'created_client' => 'Successfully created client', - 'archived_client' => 'Successfully archived client', - 'archived_clients' => 'Successfully archived :count clients', - 'deleted_client' => 'Successfully deleted client', - 'deleted_clients' => 'Successfully deleted :count clients', - 'updated_invoice' => 'Successfully updated invoice', - 'created_invoice' => 'Successfully created invoice', - 'cloned_invoice' => 'Successfully cloned invoice', - 'emailed_invoice' => 'Successfully emailed invoice', - 'and_created_client' => 'and created client', - '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', - 'created_payments' => 'Successfully created :count payment(s)', - 'archived_payment' => 'Successfully archived payment', - 'archived_payments' => 'Successfully archived :count payments', - 'deleted_payment' => 'Successfully deleted payment', - 'deleted_payments' => 'Successfully deleted :count payments', - 'applied_payment' => 'Successfully applied payment', - 'created_credit' => 'Successfully created credit', - 'archived_credit' => 'Successfully archived credit', - 'archived_credits' => 'Successfully archived :count credits', - 'deleted_credit' => 'Successfully deleted credit', - 'deleted_credits' => 'Successfully deleted :count credits', - 'imported_file' => 'Successfully imported file', - 'updated_vendor' => 'Successfully updated vendor', - 'created_vendor' => 'Successfully created vendor', - 'archived_vendor' => 'Successfully archived vendor', - 'archived_vendors' => 'Successfully archived :count vendors', - 'deleted_vendor' => 'Successfully deleted vendor', - 'deleted_vendors' => 'Successfully deleted :count vendors', - 'confirmation_subject' => 'Invoice Ninja Account Confirmation', - 'confirmation_header' => 'Account Confirmation', + 'confirmation_required' => 'Proszę potwierdzić adres email', + 'updated_client' => 'Klient został zaktualizowany', + 'created_client' => 'Klient został uwtorzony', + 'archived_client' => 'Klient został zarchiwizowany', + 'archived_clients' => 'Zarchiwizowano :count klientów', + 'deleted_client' => 'Klient został usunięty', + 'deleted_clients' => 'Usunięto :count klientów', + 'updated_invoice' => 'Faktura została zaktualizowana', + 'created_invoice' => 'Faktura została utworzona', + 'cloned_invoice' => 'Faktura została sklonowana', + 'emailed_invoice' => 'Faktura została wysłana', + 'and_created_client' => 'i utworzono klienta', + 'archived_invoice' => 'Faktura została zarchiwizowana', + 'archived_invoices' => 'Zarchiwizowano :count faktury', + 'deleted_invoice' => 'Faktura została usunięta', + 'deleted_invoices' => 'Usunięto :count faktury', + 'created_payment' => 'Płatność została utworzona', + 'created_payments' => 'Utworzono :count płatność/płatności', + 'archived_payment' => 'Płatność zostałą zarchiwizowana', + 'archived_payments' => 'Zarchiwizowano :count płatności', + 'deleted_payment' => 'Płatność została usunięta', + 'deleted_payments' => 'Usunięto :count płatności', + 'applied_payment' => 'Zastosowano płatność', + 'created_credit' => 'Kredyt został utworzony', + 'archived_credit' => 'Kredyt zarchiwizowano', + 'archived_credits' => 'Zarchiwizowano :count kredyty', + 'deleted_credit' => 'Kredyt został usunięty', + 'deleted_credits' => 'Usunięto :count kredyty', + 'imported_file' => 'Plik został zaimportowany', + 'updated_vendor' => 'Zaktualizowano sprzedawcę', + 'created_vendor' => 'Sprzedawca został utworzony', + 'archived_vendor' => 'Sprzedawca został zarchiwizowany', + 'archived_vendors' => 'Zarchiwizowano :count sprzedawców', + 'deleted_vendor' => 'Sprzedawca usunięty', + 'deleted_vendors' => 'Usunięto :count sprzedawców', + 'confirmation_subject' => 'Potwierdzenie konta Invoice Ninja', + 'confirmation_header' => 'Potwierdzenie konta', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice from :account', - 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received', + 'invoice_subject' => 'Nowa faktura :invoice z :account', + 'invoice_message' => 'Aby wyświetlić fakturę za :amount, kliknij link poniżej.', + 'payment_subject' => 'Otrzymano płatność', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Drogi :name,', 'email_signature' => 'Pozdrowienia,', 'email_from' => 'Zespół The Invoice Ninja', - 'invoice_link_message' => 'To view the invoice click the link below:', - 'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client', - 'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client', - 'notification_invoice_viewed_subject' => 'Invoice :invoice was viewed by :client', + 'invoice_link_message' => 'Aby wyświetlić fakturę kliknij link poniżej:', + 'notification_invoice_paid_subject' => 'Faktura :invoice zapłacona przez :client', + 'notification_invoice_sent_subject' => 'Faktura :invoice wysłana do :client', + 'notification_invoice_viewed_subject' => 'Faktura :invoice wyświetlona przez :client', 'notification_invoice_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.', 'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.', 'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.', @@ -260,14 +260,14 @@ $LANG = array( 'logout' => 'Wyloguj się', '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', + 'terms_of_service' => 'Warunki korzystania z Serwisu', + 'email_taken' => 'Podany adres email już istnieje', + 'working' => 'Pracuję', + 'success' => 'Sukces', 'success_message' => 'You have successfully registered! Please visit the link in the account confirmation email to verify your email address.', 'erase_data' => 'This will permanently erase your data.', 'password' => 'Hasło', - 'pro_plan_product' => 'Pro Plan', + 'pro_plan_product' => 'Plan Pro', 'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!
To access a child property using dot notation. For example to show the client name you could use $client.name
.
If you need help figuring something out post a question to our support forum.
', 'invoice_due_date' => 'Termin', - 'quote_due_date' => 'Valid Until', - 'valid_until' => 'Valid Until', + 'quote_due_date' => 'Ważny do', + 'valid_until' => 'Ważny do', 'reset_terms' => 'Resetuj warunki', 'reset_footer' => 'Resetuj stópkę', 'invoices_sent' => ':count faktura wysłana|:count faktury wysłane', @@ -668,7 +668,7 @@ $LANG = array( 'status_partial' => 'Częściowo', 'status_paid' => 'Zapłacone', 'show_line_item_tax' => 'Wyświetl podatki pozycji w tej samej linii', - 'iframe_url' => 'Website', + 'iframe_url' => 'Strona internetowa', 'iframe_url_help1' => 'Copy the following code to a page on your site.', 'iframe_url_help2' => 'You can test the feature by clicking \'View as recipient\' for an invoice.', 'auto_bill' => 'Automatyczny Rachunek', @@ -710,10 +710,10 @@ $LANG = array( 'basic_settings' => 'Ustawienia podstawowe', 'pro' => 'Pro', 'gateways' => 'Payment Gateways', - 'next_send_on' => 'Send Next: :date', + 'next_send_on' => 'Wyślij ponownie: :date', 'no_longer_running' => 'This invoice is not scheduled to run', - 'general_settings' => 'General Settings', - 'customize' => 'Customize', + 'general_settings' => 'Ustawienia ogólne', + 'customize' => 'Dostosuj', 'oneclick_login_help' => 'Connect an account to login without a password', 'referral_code_help' => 'Earn money by sharing our app online', 'enable_with_stripe' => 'Aktywuj | Wymaga Stripe', @@ -721,21 +721,21 @@ $LANG = array( 'create_tax_rate' => 'Dodaj stawkę podatkową', 'updated_tax_rate' => 'Successfully updated tax rate', 'created_tax_rate' => 'Successfully created tax rate', - 'edit_tax_rate' => 'Edit tax rate', - 'archive_tax_rate' => 'Archive Tax Rate', - 'archived_tax_rate' => 'Successfully archived the tax rate', + 'edit_tax_rate' => 'Edytuj stawkę podatkową', + 'archive_tax_rate' => 'Archiwizuj stawkę podatkową', + 'archived_tax_rate' => 'Zarchiwizowano stawkę podatkową', 'default_tax_rate_id' => 'Domyśłna stawka podatkowa', 'tax_rate' => 'Stawka podatkowa', 'recurring_hour' => 'Okresowa godzina', - 'pattern' => 'Pattern', - 'pattern_help_title' => 'Pattern Help', + 'pattern' => 'Wzór', + 'pattern_help_title' => 'Wzór pomoc', 'pattern_help_1' => 'Create custom invoice and quote numbers by specifying a pattern', - 'pattern_help_2' => 'Available variables:', - 'pattern_help_3' => 'For example, :example would be converted to :value', - 'see_options' => 'See options', - 'invoice_counter' => 'Invoice Counter', - 'quote_counter' => 'Quote Counter', - 'type' => 'Type', + 'pattern_help_2' => 'Dostępne zmienne:', + 'pattern_help_3' => 'Na przykład, :example będzie skonwertowane do :value', + 'see_options' => 'Zobacz opcje', + 'invoice_counter' => 'Licznik faktur', + 'quote_counter' => 'Licznik ofert', + 'type' => 'Typ', 'activity_1' => ':user created client :client', 'activity_2' => ':user archived client :client', 'activity_3' => ':user deleted client :client', @@ -782,14 +782,14 @@ $LANG = array( 'default_invoice_terms' => 'Domyślne warunki faktury', 'default_invoice_footer' => 'Domyślna stopka faktury', 'quote_footer' => 'Quote Footer', - 'free' => 'Free', + 'free' => 'Darmowe', 'quote_is_approved' => 'This quote is approved', - 'apply_credit' => 'Apply Credit', - 'system_settings' => 'System Settings', - 'archive_token' => 'Archive Token', - 'archived_token' => 'Successfully archived token', - 'archive_user' => 'Archive User', - 'archived_user' => 'Successfully archived user', + 'apply_credit' => 'Zastosuj kredyt', + 'system_settings' => 'Ustawienia systemowe', + 'archive_token' => 'Archiwizuj token', + 'archived_token' => 'Token został zarchiwizowany', + 'archive_user' => 'Archiwizuj użytkownika', + 'archived_user' => 'Użytkownik został zarchiwizowany', 'archive_account_gateway' => 'Archive Gateway', 'archived_account_gateway' => 'Successfully archived gateway', 'archive_recurring_invoice' => 'Archiwizuj okresową fakturę', @@ -807,39 +807,39 @@ $LANG = array( 'export_data' => 'Exportuj dane', 'user' => 'Użytkownik', 'country' => 'Kraj', - 'include' => 'Include', + 'include' => 'Dołącz', 'logo_too_large' => 'Your logo is :size, for better PDF performance we suggest uploading an image file less than 200KB', 'import_freshbooks' => 'Import From FreshBooks', - 'import_data' => 'Import Data', + 'import_data' => 'Importuj dane', 'source' => 'Źródło', 'csv' => 'CSV', 'client_file' => 'Plik klienta', 'invoice_file' => 'Plik faktury', 'task_file' => 'Plik zadania', 'no_mapper' => 'No valid mapping for file', - 'invalid_csv_header' => 'Invalid CSV Header', + 'invalid_csv_header' => 'Nieprawidłowy nagłówek CSV', 'client_portal' => 'Portal klienta', 'admin' => 'Administrator', 'disabled' => 'Wyłączony', 'show_archived_users' => 'Pokaż zarchiwizowanych użytkowników', 'notes' => 'Notatki', - 'invoice_will_create' => 'client will be created', - 'invoices_will_create' => 'invoices will be created', + 'invoice_will_create' => 'klient zostanie utworzony', + 'invoices_will_create' => 'faktury zostaną utworzone', 'failed_to_import' => 'The following records failed to import, they either already exist or are missing required fields.', 'publishable_key' => 'Publishable Key', 'secret_key' => 'Sekretny klucz', 'missing_publishable_key' => 'Set your Stripe publishable key for an improved checkout process', - 'email_design' => 'Email Design', + 'email_design' => 'Motyw email', 'due_by' => 'Płatny do :date', - 'enable_email_markup' => 'Enable Markup', + 'enable_email_markup' => 'Aktywuj Markup', 'enable_email_markup_help' => 'Make it easier for your clients to pay you by adding schema.org markup to your emails.', - 'template_help_title' => 'Templates Help', - 'template_help_1' => 'Available variables:', - 'email_design_id' => 'Email Style', + 'template_help_title' => 'Szablony Pomoc', + 'template_help_1' => 'Dostępne zmienne:', + 'email_design_id' => 'Motyw email', 'email_design_help' => 'Make your emails look more professional with HTML layouts', - 'plain' => 'Plain', - 'light' => 'Light', - 'dark' => 'Dark', + 'plain' => 'Zwykły', + 'light' => 'Jasny', + 'dark' => 'Ciemny', 'industry_help' => 'Used to provide comparisons against the averages of companies of similar size and industry.', 'subdomain_help' => 'Customize the invoice link subdomain or display the invoice on your own website.', 'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.', @@ -849,61 +849,61 @@ $LANG = array( 'custom_invoice_fields_helps' => 'Add a field when creating an invoice and display the label and value on the PDF.', 'custom_invoice_charges_helps' => 'Add a field when creating an invoice and include the charge in the invoice subtotals.', 'token_expired' => 'Validation token was expired. Please try again.', - 'invoice_link' => 'Invoice Link', + 'invoice_link' => 'Link faktury', 'button_confirmation_message' => 'Click to confirm your email address.', - 'confirm' => 'Confirm', - 'email_preferences' => 'Email Preferences', + 'confirm' => 'Potwierdź', + 'email_preferences' => 'Preferencje email', 'created_invoices' => 'Successfully created :count invoice(s)', - 'next_invoice_number' => 'The next invoice number is :number.', - 'next_quote_number' => 'The next quote number is :number.', - 'days_before' => 'days before', - 'days_after' => 'days after', + 'next_invoice_number' => 'Następny numer faktury jest :number.', + 'next_quote_number' => 'Następny numer oferty jest :number.', + 'days_before' => 'dni przed', + 'days_after' => 'dni po', 'field_due_date' => 'termin', - 'field_invoice_date' => 'invoice date', - 'schedule' => 'Schedule', - 'email_designs' => 'Email Designs', + 'field_invoice_date' => 'data faktury', + 'schedule' => 'Zaplanuj', + 'email_designs' => 'Motyw email', 'assigned_when_sent' => 'Assigned when sent', 'white_label_purchase_link' => 'Purchase a white label license', 'expense' => 'Wydatek', 'expenses' => 'Wydatki', 'new_expense' => 'Nowy wydatek', 'enter_expense' => 'Dodaj wydatek', - 'vendors' => 'Vendors', - 'new_vendor' => 'New Vendor', + 'vendors' => 'Sprzedawcy', + 'new_vendor' => 'Nowy sprzedawca', 'payment_terms_net' => 'Net', - 'vendor' => 'Vendor', - 'edit_vendor' => 'Edit Vendor', - 'archive_vendor' => 'Archive Vendor', - 'delete_vendor' => 'Delete Vendor', - 'view_vendor' => 'View Vendor', - 'deleted_expense' => 'Successfully deleted expense', - 'archived_expense' => 'Successfully archived expense', - 'deleted_expenses' => 'Successfully deleted expenses', - 'archived_expenses' => 'Successfully archived expenses', - 'expense_amount' => 'Expense Amount', - 'expense_balance' => 'Expense Balance', - 'expense_date' => 'Expense Date', - 'expense_should_be_invoiced' => 'Should this expense be invoiced?', - 'public_notes' => 'Public Notes', - 'invoice_amount' => 'Invoice Amount', - 'exchange_rate' => 'Exchange Rate', - 'yes' => 'Yes', - 'no' => 'No', - 'should_be_invoiced' => 'Should be invoiced', - 'view_expense' => 'View expense # :expense', - 'edit_expense' => 'Edit Expense', - 'archive_expense' => 'Archive Expense', - 'delete_expense' => 'Delete Expense', - 'view_expense_num' => 'Expense # :expense', - 'updated_expense' => 'Successfully updated expense', - 'created_expense' => 'Successfully created expense', + 'vendor' => 'Sprzedawca', + 'edit_vendor' => 'Edytuj sprzedawcę', + 'archive_vendor' => 'Archiwizuj sprzedawcę', + 'delete_vendor' => 'Usuń sprzedawcę', + 'view_vendor' => 'Zobacz sprzedawcę', + 'deleted_expense' => 'Wydatki zostały usunięte', + 'archived_expense' => 'Wydatki zostały zarchiwizowane', + 'deleted_expenses' => 'Wydatki zostały usunięte', + 'archived_expenses' => 'Wydatki zostały zarchiwizowane', + 'expense_amount' => 'Wartość wydatków', + 'expense_balance' => 'Saldo wydatków', + 'expense_date' => 'Data obciążenia', + 'expense_should_be_invoiced' => 'Utwórz fakturę dla poniesionego kosztu?', + 'public_notes' => 'Notatki publiczne', + 'invoice_amount' => 'Kwota faktury', + 'exchange_rate' => 'Kurs wymiany', + 'yes' => 'Tak', + 'no' => 'Nie', + 'should_be_invoiced' => 'Utwórz fakturę', + 'view_expense' => 'Zobacz wydatek # :expense', + 'edit_expense' => 'Edytuj wydatek', + 'archive_expense' => 'Archiwizuj wydatek', + 'delete_expense' => 'Usuń wydatek', + 'view_expense_num' => 'Wydatek # :expense', + 'updated_expense' => 'Wydatek został zaktualizowany', + 'created_expense' => 'Wydatek został utworzony', 'enter_expense' => 'Dodaj wydatek', - 'view' => 'View', + 'view' => 'Podgląd', 'restore_expense' => 'Przywróć wydatek', 'invoice_expense' => 'Faktura na wydatek', - 'expense_error_multiple_clients' => 'The expenses can\'t belong to different clients', - 'expense_error_invoiced' => 'Expense has already been invoiced', - 'convert_currency' => 'Konwersja waluty', + 'expense_error_multiple_clients' => 'Wydatek nie może należeć do innych klientów', + 'expense_error_invoiced' => 'Faktura do wydatku została już utworzona', + 'convert_currency' => 'Konwertuj walutę', 'num_days' => 'Liczba dni', 'create_payment_term' => 'Utwórz warunki płatności', 'edit_payment_terms' => 'Edytuj warunki płatności', @@ -913,7 +913,7 @@ $LANG = array( 'recurring_due_date_help' => 'Automatycznie ustawia termin faktury.
Invoices on a monthly or yearly cycle set to be due on or before the day they are created will be due the next month. Invoices set to be due on the 29th or 30th in months that don\'t have that day will be due the last day of the month.
Invoices on a weekly cycle set to be due on the day of the week they are created will be due the next week.
-For example:
+Na przykład: