diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index fba5d4a2b5be..9a69ff0d9c2b 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -382,18 +382,14 @@ class CheckData extends Command return; } - $current = config('database.default'); - config(['database.default' => env('QUEUE_DATABASE')]); - - $count = DB::table('failed_jobs')->count(); + $queueDB = config('queue.connections.database.connection'); + $count = DB::connection($queueDB)->table('failed_jobs')->count(); if ($count > 0) { $this->isValid = false; } $this->logMessage($count . ' failed jobs'); - - config(['database.default' => $current]); } private function checkBlankInvoiceHistory() diff --git a/app/Console/Commands/UpdateKey.php b/app/Console/Commands/UpdateKey.php index d2c1b2f2098c..7fbcd7c17f40 100644 --- a/app/Console/Commands/UpdateKey.php +++ b/app/Console/Commands/UpdateKey.php @@ -29,6 +29,11 @@ class UpdateKey extends Command { $this->info(date('Y-m-d h:i:s') . ' Running UpdateKey...'); + if (! env('APP_KEY') || ! env('APP_CIPHER')) { + $this->info(date('Y-m-d h:i:s') . ' Error: app key and cipher are not set'); + exit; + } + // load the current values $gatewayConfigs = []; $bankUsernames = []; @@ -41,9 +46,17 @@ class UpdateKey extends Command $bankUsernames[$bank->id] = $bank->getUsername(); } - // set the new key and create a new encrypter - Artisan::call('key:generate'); - $key = base64_decode(str_replace('base64:', '', config('app.key'))); + // check if we can write to the .env file + $envPath = base_path() . '/.env'; + $envWriteable = file_exists($envPath) && @fopen($envPath, 'a'); + + if ($envWriteable) { + Artisan::call('key:generate'); + $key = base64_decode(str_replace('base64:', '', config('app.key'))); + } else { + $key = str_random(32); + } + $crypt = new Encrypter($key, config('app.cipher')); // update values using the new key/encrypter @@ -59,7 +72,11 @@ class UpdateKey extends Command $bank->save(); } - $this->info(date('Y-m-d h:i:s') . ' Successfully updated the application key'); + if ($envWriteable) { + $this->info(date('Y-m-d h:i:s') . ' Successfully update the key'); + } else { + $this->info(date('Y-m-d h:i:s') . ' Successfully update data, make sure to set the new app key: ' . $key); + } } /** diff --git a/app/Constants.php b/app/Constants.php index a352d83cc88f..6440eeb593fe 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -38,6 +38,7 @@ if (! defined('APP_NAME')) { define('ENTITY_EXPENSE_CATEGORY', 'expense_category'); define('ENTITY_PROJECT', 'project'); define('ENTITY_RECURRING_EXPENSE', 'recurring_expense'); + define('ENTITY_CUSTOMER', 'customer'); define('INVOICE_TYPE_STANDARD', 1); define('INVOICE_TYPE_QUOTE', 2); @@ -169,6 +170,7 @@ if (! defined('APP_NAME')) { define('IMPORT_INVOICEABLE', 'Invoiceable'); define('IMPORT_INVOICEPLANE', 'InvoicePlane'); define('IMPORT_HARVEST', 'Harvest'); + define('IMPORT_STRIPE', 'Stripe'); define('MAX_NUM_CLIENTS', 100); define('MAX_NUM_CLIENTS_PRO', 20000); @@ -271,11 +273,9 @@ if (! defined('APP_NAME')) { define('GATEWAY_SAGE_PAY_DIRECT', 20); define('GATEWAY_SAGE_PAY_SERVER', 21); define('GATEWAY_STRIPE', 23); - define('GATEWAY_GOCARDLESS', 6); define('GATEWAY_TWO_CHECKOUT', 27); define('GATEWAY_BEANSTREAM', 29); define('GATEWAY_PSIGATE', 30); - define('GATEWAY_MOOLAH', 31); define('GATEWAY_BITPAY', 42); define('GATEWAY_DWOLLA', 43); define('GATEWAY_CHECKOUT_COM', 47); @@ -283,6 +283,7 @@ if (! defined('APP_NAME')) { define('GATEWAY_WEPAY', 60); define('GATEWAY_BRAINTREE', 61); define('GATEWAY_CUSTOM', 62); + define('GATEWAY_GOCARDLESS', 64); // The customer exists, but only as a local concept // The remote gateway doesn't understand the concept of customers @@ -308,7 +309,7 @@ if (! defined('APP_NAME')) { define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com')); define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest')); define('NINJA_DATE', '2000-01-01'); - define('NINJA_VERSION', '3.6.1' . env('NINJA_VERSION_SUFFIX')); + define('NINJA_VERSION', '3.7.0' . env('NINJA_VERSION_SUFFIX')); define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja')); define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja')); @@ -402,6 +403,8 @@ if (! defined('APP_NAME')) { define('PAYMENT_TYPE_MAESTRO', 21); define('PAYMENT_TYPE_SOLO', 22); define('PAYMENT_TYPE_SWITCH', 23); + define('PAYMENT_TYPE_ALIPAY', 28); + define('PAYMENT_TYPE_SOFORT', 29); define('PAYMENT_METHOD_STATUS_NEW', 'new'); define('PAYMENT_METHOD_STATUS_VERIFICATION_FAILED', 'verification_failed'); @@ -413,11 +416,17 @@ if (! defined('APP_NAME')) { define('GATEWAY_TYPE_BITCOIN', 4); define('GATEWAY_TYPE_DWOLLA', 5); define('GATEWAY_TYPE_CUSTOM', 6); + define('GATEWAY_TYPE_ALIPAY', 7); + define('GATEWAY_TYPE_SOFORT', 8); define('GATEWAY_TYPE_TOKEN', 'token'); - define('REMINDER1', 'reminder1'); - define('REMINDER2', 'reminder2'); - define('REMINDER3', 'reminder3'); + define('TEMPLATE_INVOICE', 'invoice'); + define('TEMPLATE_QUOTE', 'quote'); + define('TEMPLATE_PARTIAL', 'partial'); + define('TEMPLATE_PAYMENT', 'payment'); + define('TEMPLATE_REMINDER1', 'reminder1'); + define('TEMPLATE_REMINDER2', 'reminder2'); + define('TEMPLATE_REMINDER3', 'reminder3'); define('RESET_FREQUENCY_DAILY', 1); define('RESET_FREQUENCY_WEEKLY', 2); @@ -573,10 +582,20 @@ if (! defined('APP_NAME')) { // Fix for mPDF: https://github.com/kartik-v/yii2-mpdf/issues/9 define('_MPDF_TTFONTDATAPATH', storage_path('framework/cache/')); - // TODO remove these translation functions - function uctrans($text) + function uctrans($text, $data = []) { - return ucwords(trans($text)); + $locale = Session::get(SESSION_LOCALE); + $text = trans($text, $data); + + return $locale == 'en' ? ucwords($text) : $text; + } + + function utrans($text, $data = []) + { + $locale = Session::get(SESSION_LOCALE); + $text = trans($text, $data); + + return $locale == 'en' ? strtoupper($text) : $text; } // optional trans: only return the string if it's translated diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 15284d1b7fa5..6aa8054d38f0 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -49,18 +49,19 @@ class Handler extends ExceptionHandler return false; } + if (Crawler::isCrawler()) { + return false; + } + // don't show these errors in the logs if ($e instanceof NotFoundHttpException) { - if (Crawler::isCrawler()) { - return false; - } // The logo can take a few seconds to get synced between servers // TODO: remove once we're using cloud storage for logos if (Utils::isNinja() && strpos(request()->url(), '/logo/') !== false) { return false; } // Log 404s to a separate file - $errorStr = date('Y-m-d h:i:s') . ' ' . request()->url() . "\n" . json_encode(Utils::prepareErrorData('PHP')) . "\n\n"; + $errorStr = date('Y-m-d h:i:s') . ' ' . $e->getMessage() . ' URL:' . request()->url() . "\n" . json_encode(Utils::prepareErrorData('PHP')) . "\n\n"; @file_put_contents(storage_path('logs/not-found.log'), $errorStr, FILE_APPEND); return false; } elseif ($e instanceof HttpResponseException) { @@ -69,7 +70,7 @@ class Handler extends ExceptionHandler if (! Utils::isTravis()) { Utils::logError(Utils::getErrorString($e)); - $stacktrace = date('Y-m-d h:i:s') . ' ' . $e->getTraceAsString() . "\n\n"; + $stacktrace = date('Y-m-d h:i:s') . ' ' . $e->getMessage() . ': ' . $e->getTraceAsString() . "\n\n"; @file_put_contents(storage_path('logs/stacktrace.log'), $stacktrace, FILE_APPEND); return false; } else { diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 7a43000b6346..23e7b5710b54 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -20,6 +20,7 @@ use App\Models\PaymentTerm; use App\Models\Product; use App\Models\TaxRate; use App\Models\User; +use App\Models\AccountEmailSettings; use App\Ninja\Mailers\ContactMailer; use App\Ninja\Mailers\UserMailer; use App\Ninja\Repositories\AccountRepository; @@ -653,7 +654,7 @@ class AccountController extends BaseController $data['account'] = $account; $data['templates'] = []; $data['defaultTemplates'] = []; - foreach ([ENTITY_INVOICE, ENTITY_QUOTE, ENTITY_PAYMENT, REMINDER1, REMINDER2, REMINDER3] as $type) { + foreach (AccountEmailSettings::$templates as $type) { $data['templates'][$type] = [ 'subject' => $account->getEmailSubject($type), 'template' => $account->getEmailTemplate($type), @@ -800,7 +801,7 @@ class AccountController extends BaseController if (Auth::user()->account->hasFeature(FEATURE_EMAIL_TEMPLATES_REMINDERS)) { $account = Auth::user()->account; - foreach ([ENTITY_INVOICE, ENTITY_QUOTE, ENTITY_PAYMENT, REMINDER1, REMINDER2, REMINDER3] as $type) { + foreach (AccountEmailSettings::$templates as $type) { $subjectField = "email_subject_{$type}"; $subject = Input::get($subjectField, $account->getEmailSubject($type)); $account->account_email_settings->$subjectField = ($subject == $account->getDefaultEmailSubject($type) ? null : $subject); @@ -810,7 +811,7 @@ class AccountController extends BaseController $account->account_email_settings->$bodyField = ($body == $account->getDefaultEmailTemplate($type) ? null : $body); } - foreach ([REMINDER1, REMINDER2, REMINDER3] as $type) { + foreach ([TEMPLATE_REMINDER1, TEMPLATE_REMINDER2, TEMPLATE_REMINDER3] as $type) { $enableField = "enable_{$type}"; $account->$enableField = Input::get($enableField) ? true : false; $account->{"num_days_{$type}"} = Input::get("num_days_{$type}"); @@ -1364,7 +1365,12 @@ class AccountController extends BaseController $user = Auth::user(); $account = Auth::user()->account; + \Log::info("Canceled Account: {$account->name} - {$user->email}"); + $type = $account->hasMultipleAccounts() ? 'company' : 'account'; + $subject = trans("texts.deleted_{$type}"); + $message = trans("texts.deleted_{$type}_details", ['account' => $account->getDisplayName()]); + $this->userMailer->sendMessage($user, $subject, $message); $refunded = false; if (! $account->hasMultipleAccounts()) { diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index d28e73850481..ee0c11f8b06a 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -294,6 +294,11 @@ class AccountGatewayController extends BaseController $config->plaidPublicKey = $oldConfig->plaidPublicKey; } + if ($gatewayId == GATEWAY_STRIPE) { + $config->enableAlipay = boolval(Input::get('enable_alipay')); + $config->enableSofort = boolval(Input::get('enable_sofort')); + } + if ($gatewayId == GATEWAY_STRIPE || $gatewayId == GATEWAY_WEPAY) { $config->enableAch = boolval(Input::get('enable_ach')); } diff --git a/app/Http/Controllers/AppController.php b/app/Http/Controllers/AppController.php index 78f31ad6ae57..ba0dc4cea421 100644 --- a/app/Http/Controllers/AppController.php +++ b/app/Http/Controllers/AppController.php @@ -353,12 +353,30 @@ class AppController extends BaseController try { Artisan::call('ninja:check-data'); Artisan::call('ninja:init-lookup', ['--validate' => true]); + + // check error log is empty + $errorLog = storage_path('logs/laravel-error.log'); + if (file_exists($errorLog)) { + return 'Failure: error log exists'; + } + return RESULT_SUCCESS; } catch (Exception $exception) { return $exception->getMessage() ?: RESULT_FAILURE; } } + public function errors() + { + if (Utils::isNinjaProd()) { + return redirect('/'); + } + + $errors = Utils::getErrors(); + + return view('errors.list', compact('errors')); + } + public function stats() { if (! hash_equals(Input::get('password'), env('RESELLER_PASSWORD'))) { diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index 0fb64d2d8ffd..b0c3c043fc50 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -117,6 +117,10 @@ class AuthController extends Controller */ public function getLoginWrapper() { + if (auth()->check()) { + return redirect('/'); + } + if (! Utils::isNinja() && ! User::count()) { return redirect()->to('/setup'); } diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index 42fa1c76d90d..97e84eb58627 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -35,4 +35,18 @@ class PasswordController extends Controller { $this->middleware('guest'); } + + /** + * Display the form to request a password reset link. + * + * @return \Illuminate\Http\Response + */ + public function getEmailWrapper() + { + if (auth()->check()) { + return redirect('/'); + } + + return $this->getEmail(); + } } diff --git a/app/Http/Controllers/ClientPortalController.php b/app/Http/Controllers/ClientPortalController.php index 414e7caa52dc..0349e08c2904 100644 --- a/app/Http/Controllers/ClientPortalController.php +++ b/app/Http/Controllers/ClientPortalController.php @@ -69,10 +69,6 @@ class ClientPortalController extends BaseController $account->loadLocalizationSettings($client); - if (! Input::has('phantomjs')) { - $this->invoiceRepo->clearGatewayFee($invoice); - } - if (! Input::has('phantomjs') && ! session('silent:' . $client->id) && ! Session::has($invitation->invitation_key) && (! Auth::check() || Auth::user()->account_id != $invoice->account_id)) { if ($invoice->isType(INVOICE_TYPE_QUOTE)) { @@ -130,6 +126,10 @@ class ClientPortalController extends BaseController if ($wepayGateway = $account->getGatewayConfig(GATEWAY_WEPAY)) { $data['enableWePayACH'] = $wepayGateway->getAchEnabled(); } + if ($stripeGateway = $account->getGatewayConfig(GATEWAY_STRIPE)) { + //$data['enableStripeSources'] = $stripeGateway->getAlipayEnabled(); + $data['enableStripeSources'] = true; + } $showApprove = $invoice->quote_invoice_id ? false : true; if ($invoice->due_date) { diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 046682cc7ee2..65cccabfcfc6 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -198,7 +198,7 @@ class ExportController extends BaseController if ($request->input('include') === 'all' || $request->input('invoices')) { $data['invoices'] = Invoice::scope() ->invoiceType(INVOICE_TYPE_STANDARD) - ->with('user', 'client.contacts', 'invoice_status') + ->with('user', 'client.contacts', 'invoice_status', 'invoice_items') ->withArchived() ->where('is_recurring', '=', false) ->get(); @@ -207,7 +207,7 @@ class ExportController extends BaseController if ($request->input('include') === 'all' || $request->input('quotes')) { $data['quotes'] = Invoice::scope() ->invoiceType(INVOICE_TYPE_QUOTE) - ->with('user', 'client.contacts', 'invoice_status') + ->with('user', 'client.contacts', 'invoice_status', 'invoice_items') ->withArchived() ->where('is_recurring', '=', false) ->get(); @@ -216,7 +216,7 @@ class ExportController extends BaseController if ($request->input('include') === 'all' || $request->input('recurring')) { $data['recurringInvoices'] = Invoice::scope() ->invoiceType(INVOICE_TYPE_STANDARD) - ->with('user', 'client.contacts', 'invoice_status', 'frequency') + ->with('user', 'client.contacts', 'invoice_status', 'frequency', 'invoice_items') ->withArchived() ->where('is_recurring', '=', true) ->get(); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f073b99cfae0..716d96860b7e 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -131,12 +131,18 @@ class HomeController extends BaseController */ public function contactUs() { - Mail::raw(request()->contact_us_message, function ($message) { + $message = request()->contact_us_message; + + if (request()->include_errors) { + $message .= "\n\n" . join("\n", Utils::getErrors()); + } + + Mail::raw($message, function ($message) { $subject = 'Customer Message: '; - if (Utils::isNinja()) { - $subject .= config('database.default'); + if (Utils::isNinjaProd()) { + $subject .= str_replace('db-', '', config('database.default')); } else { - $subject .= 'v' . NINJA_VERSION; + $subject .= 'Self-Host'; } $message->to(env('CONTACT_EMAIL', 'contact@invoiceninja.com')) ->from(CONTACT_EMAIL, Auth::user()->present()->fullName) diff --git a/app/Http/Controllers/InvoiceApiController.php b/app/Http/Controllers/InvoiceApiController.php index a6f700ef0f84..d3e758b08eda 100644 --- a/app/Http/Controllers/InvoiceApiController.php +++ b/app/Http/Controllers/InvoiceApiController.php @@ -206,7 +206,8 @@ class InvoiceApiController extends BaseAPIController if ($invoice->is_recurring && $recurringInvoice = $this->invoiceRepo->createRecurringInvoice($invoice)) { $invoice = $recurringInvoice; } - app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice); + $reminder = isset($data['email_type']) ? $data['email_type'] : false; + app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice, $reminder); //$this->dispatch(new SendInvoiceEmail($invoice)); } } @@ -423,6 +424,11 @@ class InvoiceApiController extends BaseAPIController public function download(InvoiceRequest $request) { $invoice = $request->entity(); + + if ($invoice->is_deleted) { + abort(404); + } + $pdfString = $invoice->getPDFString(); if ($pdfString) { diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index d8232b426439..ef87f90749ad 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -98,8 +98,11 @@ class InvoiceController extends BaseController $clients = Client::scope()->withTrashed()->with('contacts', 'country'); if ($clone) { + $entityType = $clone == INVOICE_TYPE_STANDARD ? ENTITY_INVOICE : ENTITY_QUOTE; $invoice->id = $invoice->public_id = null; $invoice->is_public = false; + $invoice->is_recurring = $invoice->is_recurring && $clone == INVOICE_TYPE_STANDARD; + $invoice->invoice_type_id = $clone; $invoice->invoice_number = $account->getNextNumber($invoice); $invoice->due_date = null; $invoice->balance = $invoice->amount; @@ -371,8 +374,10 @@ class InvoiceController extends BaseController $message = trans("texts.updated_{$entityType}"); Session::flash('message', $message); - if ($action == 'clone') { - return url(sprintf('%ss/%s/clone', $entityType, $invoice->public_id)); + if ($action == 'clone_invoice') { + return url(sprintf('invoices/%s/clone', $invoice->public_id)); + } else if ($action == 'clone_quote') { + return url(sprintf('quotes/%s/clone', $invoice->public_id)); } elseif ($action == 'convert') { return $this->convertQuote($request, $invoice->public_id); } elseif ($action == 'email') { @@ -506,7 +511,12 @@ class InvoiceController extends BaseController public function cloneInvoice(InvoiceRequest $request, $publicId) { - return self::edit($request, $publicId, true); + return self::edit($request, $publicId, INVOICE_TYPE_STANDARD); + } + + public function cloneQuote(InvoiceRequest $request, $publicId) + { + return self::edit($request, $publicId, INVOICE_TYPE_QUOTE); } public function invoiceHistory(InvoiceRequest $request) diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index 696a4c6736dd..4a490add165e 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -149,6 +149,10 @@ class OnlinePaymentController extends BaseController */ public function offsitePayment($invitationKey = false, $gatewayTypeAlias = false) { + if (Crawler::isCrawler()) { + return redirect()->to(NINJA_WEB_URL, 301); + } + $invitationKey = $invitationKey ?: Session::get('invitation_key'); $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.account_gateways.gateway') ->where('invitation_key', '=', $invitationKey)->firstOrFail(); @@ -194,6 +198,18 @@ class OnlinePaymentController extends BaseController } } + public function completeSource($invitationKey, $gatewayType) + { + if (! $invitation = $this->invoiceRepo->findInvoiceByInvitation($invitationKey)) { + return response()->view('error', [ + 'error' => trans('texts.invoice_not_found'), + 'hideHeader' => true, + ]); + } + + return redirect()->to('view/' . $invitation->invitation_key); + } + /** * @param $paymentDriver * @param $exception @@ -283,7 +299,9 @@ class OnlinePaymentController extends BaseController return response()->json(['message' => $result]); } catch (Exception $exception) { - //Utils::logError($exception->getMessage(), 'PHP'); + if (! Utils::isNinjaProd()) { + Utils::logError($exception->getMessage(), 'HOOK'); + } return response()->json(['message' => $exception->getMessage()], 500); } diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index b5e167ecceb1..2501c4d4ea79 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -91,7 +91,7 @@ class PaymentController extends BaseController { $invoices = Invoice::scope() ->invoices() - ->where('invoices.balance', '!=', 0) + ->where('invoices.invoice_status_id', '!=', INVOICE_STATUS_PAID) ->with('client', 'invoice_status') ->orderBy('invoice_number')->get(); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 7f364b7716a9..f4f5ac3a29af 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -65,6 +65,21 @@ class UserController extends BaseController return Redirect::to('/dashboard'); } + /** + * Display the specified resource. + * + * @param int $id + * @param mixed $publicId + * + * @return Response + */ + public function show($publicId) + { + Session::reflash(); + + return redirect("users/$publicId/edit"); + } + public function edit($publicId) { $user = User::where('account_id', '=', Auth::user()->account_id) diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index de8f7be8a580..5db83b89b0c0 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -72,11 +72,38 @@ class StartupCheck } } - // Check the application is up to date and for any news feed messages if (Auth::check()) { + $company = Auth::user()->account->company; $count = Session::get(SESSION_COUNTER, 0); Session::put(SESSION_COUNTER, ++$count); + if (Utils::isNinja()) { + if ($coupon = request()->coupon) { + if ($code = config('ninja.coupon_50_off')) { + if (hash_equals($coupon, $code)) { + $company->applyDiscount(.5); + $company->save(); + Session::flash('message', trans('texts.applied_discount', ['discount' => 50])); + } + } + if ($code = config('ninja.coupon_75_off')) { + if (hash_equals($coupon, $code)) { + $company->applyDiscount(.75); + $company->save(); + Session::flash('message', trans('texts.applied_discount', ['discount' => 75])); + } + } + if ($code = config('ninja.coupon_free_year')) { + if (hash_equals($coupon, $code)) { + $company->applyFreeYear(); + $company->save(); + Session::flash('message', trans('texts.applied_free_year')); + } + } + } + } + + // Check the application is up to date and for any news feed messages if (isset($_SERVER['REQUEST_URI']) && ! Utils::startsWith($_SERVER['REQUEST_URI'], '/news_feed') && ! Session::has('news_feed_id')) { $data = false; if (Utils::isNinja()) { @@ -144,7 +171,6 @@ class StartupCheck if ($data == RESULT_FAILURE) { Session::flash('error', trans('texts.invalid_white_label_license')); } elseif ($data) { - $company = Auth::user()->account->company; $company->plan_term = PLAN_TERM_YEARLY; $company->plan_paid = $data; $date = max(date_create($data), date_create($company->plan_expires)); diff --git a/app/Http/Requests/CreateCustomerRequest.php b/app/Http/Requests/CreateCustomerRequest.php new file mode 100644 index 000000000000..3f490a1a106e --- /dev/null +++ b/app/Http/Requests/CreateCustomerRequest.php @@ -0,0 +1,33 @@ +user()->can('create', ENTITY_CUSTOMER); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + $rules = [ + 'token' => 'required', + 'client_id' => 'required', + 'contact_id' => 'required', + 'payment_method.source_reference' => 'required', + ]; + + return $rules; + } +} diff --git a/app/Http/Requests/CreatePaymentAPIRequest.php b/app/Http/Requests/CreatePaymentAPIRequest.php index c6b4657080c3..2292c5212e24 100644 --- a/app/Http/Requests/CreatePaymentAPIRequest.php +++ b/app/Http/Requests/CreatePaymentAPIRequest.php @@ -26,7 +26,7 @@ class CreatePaymentAPIRequest extends PaymentRequest if (! $this->invoice_id || ! $this->amount) { return [ 'invoice_id' => 'required|numeric|min:1', - 'amount' => 'required|numeric|not_in:0', + 'amount' => 'required|numeric', ]; } diff --git a/app/Http/Requests/CreatePaymentRequest.php b/app/Http/Requests/CreatePaymentRequest.php index f9a912b59eec..18654f6ee2de 100644 --- a/app/Http/Requests/CreatePaymentRequest.php +++ b/app/Http/Requests/CreatePaymentRequest.php @@ -37,7 +37,7 @@ class CreatePaymentRequest extends PaymentRequest $rules = [ 'client' => 'required', // TODO: change to client_id once views are updated 'invoice' => 'required', // TODO: change to invoice_id once views are updated - 'amount' => 'required|numeric|not_in:0', + 'amount' => 'required|numeric', 'payment_date' => 'required', ]; diff --git a/app/Http/Requests/CustomerRequest.php b/app/Http/Requests/CustomerRequest.php new file mode 100644 index 000000000000..d3f7dc69f528 --- /dev/null +++ b/app/Http/Requests/CustomerRequest.php @@ -0,0 +1,8 @@ +entity; } + $class = EntityModel::getClassName($this->entityType); + // The entity id can appear as invoices, invoice_id, public_id or id $publicId = false; $field = $this->entityType . '_id'; @@ -37,8 +39,6 @@ class EntityRequest extends Request return null; } - $class = EntityModel::getClassName($this->entityType); - if (method_exists($class, 'trashed')) { $this->entity = $class::scope($publicId)->withTrashed()->firstOrFail(); } else { diff --git a/app/Http/routes.php b/app/Http/routes.php index 3c48fdaf83dd..23b4950447b5 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -33,6 +33,7 @@ Route::group(['middleware' => ['lookup:contact', 'auth:client']], function () { Route::get('approve/{invitation_key}', 'QuoteController@approve'); Route::get('payment/{invitation_key}/{gateway_type?}/{source_id?}', 'OnlinePaymentController@showPayment'); Route::post('payment/{invitation_key}', 'OnlinePaymentController@doPayment'); + Route::get('complete_source/{invitation_key}/{gateway_type}', 'OnlinePaymentController@completeSource'); Route::match(['GET', 'POST'], 'complete/{invitation_key?}/{gateway_type?}', 'OnlinePaymentController@offsitePayment'); Route::get('bank/{routing_number}', 'OnlinePaymentController@getBankInfo'); Route::get('client/payment_methods', 'ClientPortalController@paymentMethods'); @@ -87,7 +88,7 @@ Route::get('/signup', ['as' => 'signup', 'uses' => 'Auth\AuthController@getRegis Route::post('/signup', ['as' => 'signup', 'uses' => 'Auth\AuthController@postRegister']); Route::get('/login', ['as' => 'login', 'uses' => 'Auth\AuthController@getLoginWrapper']); Route::get('/logout', ['as' => 'logout', 'uses' => 'Auth\AuthController@getLogoutWrapper']); -Route::get('/recover_password', ['as' => 'forgot', 'uses' => 'Auth\PasswordController@getEmail']); +Route::get('/recover_password', ['as' => 'forgot', 'uses' => 'Auth\PasswordController@getEmailWrapper']); Route::get('/password/reset/{token}', ['as' => 'forgot', 'uses' => 'Auth\PasswordController@getReset']); Route::get('/auth/{provider}', 'Auth\AuthController@authLogin'); @@ -156,6 +157,7 @@ Route::group(['middleware' => ['lookup:user', 'auth:user']], function () { Route::post('projects', 'ProjectController@store'); Route::put('projects/{projects}', 'ProjectController@update'); Route::get('projects/{projects}/edit', 'ProjectController@edit'); + Route::get('projects/{projects}', 'ProjectController@edit'); Route::post('projects/bulk', 'ProjectController@bulk'); Route::get('api/recurring_invoices/{client_id?}', 'InvoiceController@getRecurringDatatable'); @@ -190,7 +192,7 @@ Route::group(['middleware' => ['lookup:user', 'auth:user']], function () { Route::delete('documents/{documents}', 'DocumentController@delete'); Route::get('quotes/create/{client_id?}', 'QuoteController@create'); - Route::get('quotes/{invoices}/clone', 'InvoiceController@cloneInvoice'); + Route::get('quotes/{invoices}/clone', 'InvoiceController@cloneQuote'); Route::get('quotes/{invoices}/edit', 'InvoiceController@edit'); Route::put('quotes/{invoices}', 'InvoiceController@update'); Route::get('quotes/{invoices}', 'InvoiceController@edit'); @@ -260,6 +262,7 @@ Route::group([ Route::get('/account/{account_key}', 'UserController@viewAccountByKey'); Route::get('/unlink_account/{user_account_id}/{user_id}', 'UserController@unlinkAccount'); Route::get('/manage_companies', 'UserController@manageCompanies'); + Route::get('/errors', 'AppController@errors'); Route::get('api/tokens', 'TokenController@getDatatable'); Route::resource('tokens', 'TokenController'); diff --git a/app/Includes/parsecsv.lib.php b/app/Includes/parsecsv.lib.php deleted file mode 100644 index 5c45a847d8b2..000000000000 --- a/app/Includes/parsecsv.lib.php +++ /dev/null @@ -1,879 +0,0 @@ -data); - ---------------- - # tab delimited, and encoding conversion - $csv = new parseCSV(); - $csv->encoding('UTF-16', 'UTF-8'); - $csv->delimiter = "\t"; - $csv->parse('data.tsv'); - print_r($csv->data); - ---------------- - # auto-detect delimiter character - $csv = new parseCSV(); - $csv->auto('data.csv'); - print_r($csv->data); - ---------------- - # modify data in a csv file - $csv = new parseCSV(); - $csv->sort_by = 'id'; - $csv->parse('data.csv'); - # "4" is the value of the "id" column of the CSV row - $csv->data[4] = array('firstname' => 'John', 'lastname' => 'Doe', 'email' => 'john@doe.com'); - $csv->save(); - ---------------- - # add row/entry to end of CSV file - # - only recommended when you know the extact sctructure of the file - $csv = new parseCSV(); - $csv->save('data.csv', array('1986', 'Home', 'Nowhere', ''), true); - ---------------- - # convert 2D array to csv data and send headers - # to browser to treat output as a file and download it - $csv = new parseCSV(); - $csv->output (true, 'movies.csv', $array); - ---------------- - - -*/ - - /** - * Configuration - * - set these options with $object->var_name = 'value';. - */ - - // use first line/entry as field names - public $heading = true; - - // override field names - public $fields = []; - - // sort entries by this field - public $sort_by = null; - public $sort_reverse = false; - - // delimiter (comma) and enclosure (double quote) - public $delimiter = ','; - public $enclosure = '"'; - - // basic SQL-like conditions for row matching - public $conditions = null; - - // number of rows to ignore from beginning of data - public $offset = null; - - // limits the number of returned rows to specified amount - public $limit = null; - - // number of rows to analyze when attempting to auto-detect delimiter - public $auto_depth = 15; - - // characters to ignore when attempting to auto-detect delimiter - public $auto_non_chars = "a-zA-Z0-9\n\r"; - - // preferred delimiter characters, only used when all filtering method - // returns multiple possible delimiters (happens very rarely) - public $auto_preferred = ",;\t.:|"; - - // character encoding options - public $convert_encoding = false; - public $input_encoding = 'ISO-8859-1'; - public $output_encoding = 'ISO-8859-1'; - - // used by unparse(), save(), and output() functions - public $linefeed = "\r\n"; - - // only used by output() function - public $output_delimiter = ','; - public $output_filename = 'data.csv'; - - /** - * Internal variables. - */ - - // current file - public $file; - - // loaded file contents - public $file_data; - - // array of field values in data parsed - public $titles = []; - - // two dimentional array of CSV data - public $data = []; - - /** - * Constructor. - * - * @param input CSV file or string - * @param null|mixed $input - * @param null|mixed $offset - * @param null|mixed $limit - * @param null|mixed $conditions - * - * @return nothing - */ - public function __construct($input = null, $offset = null, $limit = null, $conditions = null) - { - if ($offset !== null) { - $this->offset = $offset; - } - if ($limit !== null) { - $this->limit = $limit; - } - if (count($conditions) > 0) { - $this->conditions = $conditions; - } - if (! empty($input)) { - $this->parse($input); - } - } - - // ============================================== - // ----- [ Main Functions ] --------------------- - // ============================================== - - /** - * Parse CSV file or string. - * - * @param input CSV file or string - * @param null|mixed $input - * @param null|mixed $offset - * @param null|mixed $limit - * @param null|mixed $conditions - * - * @return nothing - */ - public function parse($input = null, $offset = null, $limit = null, $conditions = null) - { - if (! empty($input)) { - if ($offset !== null) { - $this->offset = $offset; - } - if ($limit !== null) { - $this->limit = $limit; - } - if (count($conditions) > 0) { - $this->conditions = $conditions; - } - if (is_readable($input)) { - $this->data = $this->parse_file($input); - } else { - $this->file_data = &$input; - $this->data = $this->parse_string(); - } - if ($this->data === false) { - return false; - } - } - - return true; - } - - /** - * Save changes, or new file and/or data. - * - * @param file file to save to - * @param data 2D array with data - * @param append append current data to end of target CSV if exists - * @param fields field names - * @param null|mixed $file - * @param mixed $data - * @param mixed $append - * @param mixed $fields - * - * @return true or false - */ - public function save($file = null, $data = [], $append = false, $fields = []) - { - if (empty($file)) { - $file = &$this->file; - } - $mode = ($append) ? 'at' : 'wt'; - $is_php = (preg_match('/\.php$/i', $file)) ? true : false; - - return $this->_wfile($file, $this->unparse($data, $fields, $append, $is_php), $mode); - } - - /** - * Generate CSV based string for output. - * - * @param output if true, prints headers and strings to browser - * @param filename filename sent to browser in headers if output is true - * @param data 2D array with data - * @param fields field names - * @param delimiter delimiter used to separate data - * @param mixed $output - * @param null|mixed $filename - * @param mixed $data - * @param mixed $fields - * @param null|mixed $delimiter - * - * @return CSV data using delimiter of choice, or default - */ - public function output($output = true, $filename = null, $data = [], $fields = [], $delimiter = null) - { - if (empty($filename)) { - $filename = $this->output_filename; - } - if ($delimiter === null) { - $delimiter = $this->output_delimiter; - } - $data = $this->unparse($data, $fields, null, null, $delimiter); - if ($output) { - header('Content-type: application/csv'); - header('Content-Disposition: inline; filename="'.$filename.'"'); - echo $data; - } - - return $data; - } - - /** - * Convert character encoding. - * - * @param input input character encoding, uses default if left blank - * @param output output character encoding, uses default if left blank - * @param null|mixed $input - * @param null|mixed $output - * - * @return nothing - */ - public function encoding($input = null, $output = null) - { - $this->convert_encoding = true; - if ($input !== null) { - $this->input_encoding = $input; - } - if ($output !== null) { - $this->output_encoding = $output; - } - } - - /** - * Auto-Detect Delimiter: Find delimiter by analyzing a specific number of - * rows to determine most probable delimiter character. - * - * @param file local CSV file - * @param parse true/false parse file directly - * @param search_depth number of rows to analyze - * @param preferred preferred delimiter characters - * @param enclosure enclosure character, default is double quote ("). - * @param null|mixed $file - * @param mixed $parse - * @param null|mixed $search_depth - * @param null|mixed $preferred - * @param null|mixed $enclosure - * - * @return delimiter character - */ - public function auto($file = null, $parse = true, $search_depth = null, $preferred = null, $enclosure = null) - { - if ($file === null) { - $file = $this->file; - } - if (empty($search_depth)) { - $search_depth = $this->auto_depth; - } - if ($enclosure === null) { - $enclosure = $this->enclosure; - } - - if ($preferred === null) { - $preferred = $this->auto_preferred; - } - - if (empty($this->file_data)) { - if ($this->_check_data($file)) { - $data = &$this->file_data; - } else { - return false; - } - } else { - $data = &$this->file_data; - } - - $chars = []; - $strlen = strlen($data); - $enclosed = false; - $n = 1; - $to_end = true; - - // walk specific depth finding posssible delimiter characters - for ($i = 0; $i < $strlen; $i++) { - $ch = $data{$i}; - $nch = (isset($data{$i + 1})) ? $data{$i + 1} : false; - $pch = (isset($data{$i - 1})) ? $data{$i - 1} : false; - - // open and closing quotes - if ($ch == $enclosure && (! $enclosed || $nch != $enclosure)) { - $enclosed = ($enclosed) ? false : true; - - // inline quotes - } elseif ($ch == $enclosure && $enclosed) { - $i++; - - // end of row - } elseif (($ch == "\n" && $pch != "\r" || $ch == "\r") && ! $enclosed) { - if ($n >= $search_depth) { - $strlen = 0; - $to_end = false; - } else { - $n++; - } - - // count character - } elseif (! $enclosed) { - if (! preg_match('/['.preg_quote($this->auto_non_chars, '/').']/i', $ch)) { - if (! isset($chars[$ch][$n])) { - $chars[$ch][$n] = 1; - } else { - $chars[$ch][$n]++; - } - } - } - } - - // filtering - $depth = ($to_end) ? $n - 1 : $n; - $filtered = []; - foreach ($chars as $char => $value) { - if ($match = $this->_check_count($char, $value, $depth, $preferred)) { - $filtered[$match] = $char; - } - } - - // capture most probable delimiter - ksort($filtered); - $delimiter = reset($filtered); - $this->delimiter = $delimiter; - - // parse data - if ($parse) { - $this->data = $this->parse_string(); - } - - return $delimiter; - } - - // ============================================== - // ----- [ Core Functions ] --------------------- - // ============================================== - - /** - * Read file to string and call parse_string(). - * - * @param file local CSV file - * @param null|mixed $file - * - * @return 2D array with CSV data, or false on failure - */ - public function parse_file($file = null) - { - if ($file === null) { - $file = $this->file; - } - if (empty($this->file_data)) { - $this->load_data($file); - } - - return (! empty($this->file_data)) ? $this->parse_string() : false; - } - - /** - * Parse CSV strings to arrays. - * - * @param data CSV string - * @param null|mixed $data - * - * @return 2D array with CSV data, or false on failure - */ - public function parse_string($data = null) - { - if (empty($data)) { - if ($this->_check_data()) { - $data = &$this->file_data; - } else { - return false; - } - } - - $rows = []; - $row = []; - $row_count = 0; - $current = ''; - $head = (! empty($this->fields)) ? $this->fields : []; - $col = 0; - $enclosed = false; - $was_enclosed = false; - $strlen = strlen($data); - - // walk through each character - for ($i = 0; $i < $strlen; $i++) { - $ch = $data{$i}; - $nch = (isset($data{$i + 1})) ? $data{$i + 1} : false; - $pch = (isset($data{$i - 1})) ? $data{$i - 1} : false; - - // open and closing quotes - if ($ch == $this->enclosure && (! $enclosed || $nch != $this->enclosure)) { - $enclosed = ($enclosed) ? false : true; - if ($enclosed) { - $was_enclosed = true; - } - - // inline quotes - } elseif ($ch == $this->enclosure && $enclosed) { - $current .= $ch; - $i++; - - // end of field/row - } elseif (($ch == $this->delimiter || ($ch == "\n" && $pch != "\r") || $ch == "\r") && ! $enclosed) { - if (! $was_enclosed) { - $current = trim($current); - } - $key = (! empty($head[$col])) ? $head[$col] : $col; - $row[$key] = $current; - $current = ''; - $col++; - - // end of row - if ($ch == "\n" || $ch == "\r") { - if ($this->_validate_offset($row_count) && $this->_validate_row_conditions($row, $this->conditions)) { - if ($this->heading && empty($head)) { - $head = $row; - } elseif (empty($this->fields) || (! empty($this->fields) && (($this->heading && $row_count > 0) || ! $this->heading))) { - if (! empty($this->sort_by) && ! empty($row[$this->sort_by])) { - if (isset($rows[$row[$this->sort_by]])) { - $rows[$row[$this->sort_by].'_0'] = &$rows[$row[$this->sort_by]]; - unset($rows[$row[$this->sort_by]]); - for ($sn = 1; isset($rows[$row[$this->sort_by].'_'.$sn]); $sn++) { - } - $rows[$row[$this->sort_by].'_'.$sn] = $row; - } else { - $rows[$row[$this->sort_by]] = $row; - } - } else { - $rows[] = $row; - } - } - } - $row = []; - $col = 0; - $row_count++; - if ($this->sort_by === null && $this->limit !== null && count($rows) == $this->limit) { - $i = $strlen; - } - } - - // append character to current field - } else { - $current .= $ch; - } - } - $this->titles = $head; - if (! empty($this->sort_by)) { - ($this->sort_reverse) ? krsort($rows) : ksort($rows); - if ($this->offset !== null || $this->limit !== null) { - $rows = array_slice($rows, ($this->offset === null ? 0 : $this->offset), $this->limit, true); - } - } - - return $rows; - } - - /** - * Create CSV data from array. - * - * @param data 2D array with data - * @param fields field names - * @param append if true, field names will not be output - * @param is_php if a php die() call should be put on the first - * line of the file, this is later ignored when read. - * @param delimiter field delimiter to use - * @param mixed $data - * @param mixed $fields - * @param mixed $append - * @param mixed $is_php - * @param null|mixed $delimiter - * - * @return CSV data (text string) - */ - public function unparse($data = [], $fields = [], $append = false, $is_php = false, $delimiter = null) - { - if (! is_array($data) || empty($data)) { - $data = &$this->data; - } - if (! is_array($fields) || empty($fields)) { - $fields = &$this->titles; - } - if ($delimiter === null) { - $delimiter = $this->delimiter; - } - - $string = ($is_php) ? "".$this->linefeed : ''; - $entry = []; - - // create heading - if ($this->heading && ! $append) { - foreach ($fields as $key => $value) { - $entry[] = $this->_enclose_value($value); - } - $string .= implode($delimiter, $entry).$this->linefeed; - $entry = []; - } - - // create data - foreach ($data as $key => $row) { - foreach ($row as $field => $value) { - $entry[] = $this->_enclose_value($value); - } - $string .= implode($delimiter, $entry).$this->linefeed; - $entry = []; - } - - return $string; - } - - /** - * Load local file or string. - * - * @param input local CSV file - * @param null|mixed $input - * - * @return true or false - */ - public function load_data($input = null) - { - $data = null; - $file = null; - if ($input === null) { - $file = $this->file; - } elseif (file_exists($input)) { - $file = $input; - } else { - $data = $input; - } - if (! empty($data) || $data = $this->_rfile($file)) { - if ($this->file != $file) { - $this->file = $file; - } - if (preg_match('/\.php$/i', $file) && preg_match('/<\?.*?\?>(.*)/ims', $data, $strip)) { - $data = ltrim($strip[1]); - } - if ($this->convert_encoding) { - $data = iconv($this->input_encoding, $this->output_encoding, $data); - } - if (substr($data, -1) != "\n") { - $data .= "\n"; - } - $this->file_data = &$data; - - return true; - } - - return false; - } - - // ============================================== - // ----- [ Internal Functions ] ----------------- - // ============================================== - - /** - * Validate a row against specified conditions. - * - * @param row array with values from a row - * @param conditions specified conditions that the row must match - * @param mixed $row - * @param null|mixed $conditions - * - * @return true of false - */ - public function _validate_row_conditions($row = [], $conditions = null) - { - if (! empty($row)) { - if (! empty($conditions)) { - $conditions = (strpos($conditions, ' OR ') !== false) ? explode(' OR ', $conditions) : [$conditions]; - $or = ''; - foreach ($conditions as $key => $value) { - if (strpos($value, ' AND ') !== false) { - $value = explode(' AND ', $value); - $and = ''; - foreach ($value as $k => $v) { - $and .= $this->_validate_row_condition($row, $v); - } - $or .= (strpos($and, '0') !== false) ? '0' : '1'; - } else { - $or .= $this->_validate_row_condition($row, $value); - } - } - - return (strpos($or, '1') !== false) ? true : false; - } - - return true; - } - - return false; - } - - /** - * Validate a row against a single condition. - * - * @param row array with values from a row - * @param condition specified condition that the row must match - * @param mixed $row - * @param mixed $condition - * - * @return true of false - */ - public function _validate_row_condition($row, $condition) - { - $operators = [ - '=', 'equals', 'is', - '!=', 'is not', - '<', 'is less than', - '>', 'is greater than', - '<=', 'is less than or equals', - '>=', 'is greater than or equals', - 'contains', - 'does not contain', - ]; - $operators_regex = []; - foreach ($operators as $value) { - $operators_regex[] = preg_quote($value, '/'); - } - $operators_regex = implode('|', $operators_regex); - if (preg_match('/^(.+) ('.$operators_regex.') (.+)$/i', trim($condition), $capture)) { - $field = $capture[1]; - $op = $capture[2]; - $value = $capture[3]; - if (preg_match('/^([\'\"]{1})(.*)([\'\"]{1})$/i', $value, $capture)) { - if ($capture[1] == $capture[3]) { - $value = $capture[2]; - $value = str_replace('\\n', "\n", $value); - $value = str_replace('\\r', "\r", $value); - $value = str_replace('\\t', "\t", $value); - $value = stripslashes($value); - } - } - if (array_key_exists($field, $row)) { - if (($op == '=' || $op == 'equals' || $op == 'is') && $row[$field] == $value) { - return '1'; - } elseif (($op == '!=' || $op == 'is not') && $row[$field] != $value) { - return '1'; - } elseif (($op == '<' || $op == 'is less than') && $row[$field] < $value) { - return '1'; - } elseif (($op == '>' || $op == 'is greater than') && $row[$field] > $value) { - return '1'; - } elseif (($op == '<=' || $op == 'is less than or equals') && $row[$field] <= $value) { - return '1'; - } elseif (($op == '>=' || $op == 'is greater than or equals') && $row[$field] >= $value) { - return '1'; - } elseif ($op == 'contains' && preg_match('/'.preg_quote($value, '/').'/i', $row[$field])) { - return '1'; - } elseif ($op == 'does not contain' && ! preg_match('/'.preg_quote($value, '/').'/i', $row[$field])) { - return '1'; - } else { - return '0'; - } - } - } - - return '1'; - } - - /** - * Validates if the row is within the offset or not if sorting is disabled. - * - * @param current_row the current row number being processed - * @param mixed $current_row - * - * @return true of false - */ - public function _validate_offset($current_row) - { - if ($this->sort_by === null && $this->offset !== null && $current_row < $this->offset) { - return false; - } - - return true; - } - - /** - * Enclose values if needed - * - only used by unparse(). - * - * @param value string to process - * @param null|mixed $value - * - * @return Processed value - */ - public function _enclose_value($value = null) - { - if ($value !== null && $value != '') { - $delimiter = preg_quote($this->delimiter, '/'); - $enclosure = preg_quote($this->enclosure, '/'); - if (preg_match('/'.$delimiter.'|'.$enclosure."|\n|\r/i", $value) || ($value{0} == ' ' || substr($value, -1) == ' ')) { - $value = str_replace($this->enclosure, $this->enclosure.$this->enclosure, $value); - $value = $this->enclosure.$value.$this->enclosure; - } - } - - return $value; - } - - /** - * Check file data. - * - * @param file local filename - * @param null|mixed $file - * - * @return true or false - */ - public function _check_data($file = null) - { - if (empty($this->file_data)) { - if ($file === null) { - $file = $this->file; - } - - return $this->load_data($file); - } - - return true; - } - - /** - * Check if passed info might be delimiter - * - only used by find_delimiter(). - * - * @param mixed $char - * @param mixed $array - * @param mixed $depth - * @param mixed $preferred - * - * @return special string used for delimiter selection, or false - */ - public function _check_count($char, $array, $depth, $preferred) - { - if ($depth == count($array)) { - $first = null; - $equal = null; - $almost = false; - foreach ($array as $key => $value) { - if ($first == null) { - $first = $value; - } elseif ($value == $first && $equal !== false) { - $equal = true; - } elseif ($value == $first + 1 && $equal !== false) { - $equal = true; - $almost = true; - } else { - $equal = false; - } - } - if ($equal) { - $match = ($almost) ? 2 : 1; - $pref = strpos($preferred, $char); - $pref = ($pref !== false) ? str_pad($pref, 3, '0', STR_PAD_LEFT) : '999'; - - return $pref.$match.'.'.(99999 - str_pad($first, 5, '0', STR_PAD_LEFT)); - } else { - return false; - } - } - } - - /** - * Read local file. - * - * @param file local filename - * @param null|mixed $file - * - * @return Data from file, or false on failure - */ - public function _rfile($file = null) - { - if (is_readable($file)) { - if (! ($fh = fopen($file, 'r'))) { - return false; - } - $data = fread($fh, filesize($file)); - fclose($fh); - - return $data; - } - - return false; - } - - /** - * Write to local file. - * - * @param file local filename - * @param string data to write to file - * @param mode fopen() mode - * @param lock flock() mode - * @param mixed $file - * @param mixed $string - * @param mixed $mode - * @param mixed $lock - * - * @return true or false - */ - public function _wfile($file, $string = '', $mode = 'wb', $lock = 2) - { - if ($fp = fopen($file, $mode)) { - flock($fp, $lock); - $re = fwrite($fp, $string); - $re2 = fclose($fp); - if ($re != false && $re2 != false) { - return true; - } - } - - return false; - } -} diff --git a/app/Jobs/ImportData.php b/app/Jobs/ImportData.php index 4d0d5765ab69..2f2ba53c8828 100644 --- a/app/Jobs/ImportData.php +++ b/app/Jobs/ImportData.php @@ -91,7 +91,7 @@ class ImportData extends Job implements ShouldQueue } catch (Exception $exception) { $subject = trans('texts.import_failed'); $message = $exception->getMessage(); - Utils::logError($subject . ':' . $message); + Utils::logError($subject . ': ' . $message); } $userMailer->sendMessage($this->user, $subject, $message); diff --git a/app/Jobs/PurgeAccountData.php b/app/Jobs/PurgeAccountData.php index 2430292c76f1..1151d70c7f97 100644 --- a/app/Jobs/PurgeAccountData.php +++ b/app/Jobs/PurgeAccountData.php @@ -8,6 +8,7 @@ use App\Models\LookupAccount; use Auth; use DB; use Exception; +use App\Ninja\Mailers\UserMailer; class PurgeAccountData extends Job { @@ -16,7 +17,7 @@ class PurgeAccountData extends Job * * @return void */ - public function handle() + public function handle(UserMailer $userMailer) { $user = Auth::user(); $account = $user->account; @@ -73,5 +74,9 @@ class PurgeAccountData extends Job config(['database.default' => $current]); } + + $subject = trans('texts.purge_successful'); + $message = trans('texts.purge_details', ['account' => $user->account->getDisplayName()]); + $userMailer->sendMessage($user, $subject, $message); } } diff --git a/app/Libraries/CurlUtils.php b/app/Libraries/CurlUtils.php index 79e9332f474c..7e699c226b94 100644 --- a/app/Libraries/CurlUtils.php +++ b/app/Libraries/CurlUtils.php @@ -63,7 +63,6 @@ class CurlUtils if ($response->getStatus() === 200) { return $response->getContent(); } else { - Utils::logError('Local PhantomJS Error: ' . $response->getStatus() . ' - ' . $url); return false; } } diff --git a/app/Libraries/HTMLUtils.php b/app/Libraries/HTMLUtils.php index ad8ea6c8cb53..1b42f1bbe7b7 100644 --- a/app/Libraries/HTMLUtils.php +++ b/app/Libraries/HTMLUtils.php @@ -22,6 +22,7 @@ class HTMLUtils $config->set('CSS.AllowImportant', true); $config->set('CSS.AllowTricky', true); $config->set('CSS.Trusted', true); + $config->set('Cache.SerializerPath', base_path('storage/framework/cache')); // Create a new purifier instance $purifier = new HTMLPurifier($config); @@ -42,6 +43,8 @@ class HTMLUtils $html = html_entity_decode($html); $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache.SerializerPath', base_path('storage/framework/cache')); + $purifier = new HTMLPurifier($config); return $purifier->purify($html); diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 0e932c450514..ccf2bb162d55 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -2,6 +2,7 @@ namespace App\Libraries; +use DB; use App; use Auth; use Cache; @@ -235,6 +236,26 @@ class Utils return App::getLocale() == 'en'; } + public static function getDebugInfo() + { + if ($info = session('DEBUG_INFO')) { + return $info; + } + + $mysqlVersion = DB::select( DB::raw("select version() as version") )[0]->version; + $accountKey = Auth::check() ? Auth::user()->account->account_key : ''; + + $info = "App Version: v" . NINJA_VERSION . "\\n" . + "White Label: " . (Utils::isWhiteLabel() ? 'Yes' : 'No') . " - {$accountKey}\\n" . + "Server OS: " . php_uname('s') . ' ' . php_uname('r') . "\\n" . + "PHP Version: " . phpversion() . "\\n" . + "MySQL Version: " . $mysqlVersion; + + session(['DEBUG_INFO' => $info]); + + return $info; + } + public static function getLocaleRegion() { $parts = explode('_', App::getLocale()); @@ -410,6 +431,27 @@ class Utils ]; } + public static function getErrors() + { + $data = []; + $filename = storage_path('logs/laravel-error.log'); + + if (! file_exists($filename)) { + return $data; + } + + $errors = file($filename); + + for ($i=count($errors)-1; $i>=0; $i--) { + $data[] = $errors[$i]; + if (count($data) >= 10) { + break; + } + } + + return $data; + } + public static function parseFloat($value) { $value = preg_replace('/[^0-9\.\-]/', '', $value); @@ -1228,6 +1270,18 @@ class Utils return round($amount + $tax1 + $tax2, 2); } + public static function roundSignificant($value, $precision = 2) { + if (round($value, 3) != $value) { + $precision = 4; + } elseif (round($value, 2) != $value) { + $precision = 3; + } elseif (round($value, 1) != $value) { + $precision = 2; + } + + return number_format($value, $precision, '.', ''); + } + public static function truncateString($string, $length) { return strlen($string) > $length ? rtrim(substr($string, 0, $length)) . '...' : $string; diff --git a/app/Listeners/InvoiceListener.php b/app/Listeners/InvoiceListener.php index a4da0c9b7892..073cd87e8609 100644 --- a/app/Listeners/InvoiceListener.php +++ b/app/Listeners/InvoiceListener.php @@ -48,7 +48,7 @@ class InvoiceListener public function updatedInvoice(InvoiceWasUpdated $event) { $invoice = $event->invoice; - $invoice->updatePaidStatus(false); + $invoice->updatePaidStatus(false, false); } /** @@ -71,7 +71,7 @@ class InvoiceListener $partial = max(0, $invoice->partial - $payment->amount); $invoice->updateBalances($adjustment, $partial); - $invoice->updatePaidStatus(); + $invoice->updatePaidStatus(true); // store a backup of the invoice $activity = Activity::wherePaymentId($payment->id) diff --git a/app/Models/Account.php b/app/Models/Account.php index 97d9cd604b28..2f28c19a3d59 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -226,6 +226,7 @@ class Account extends Eloquent public static $customLabels = [ 'balance_due', + 'credit_card', 'description', 'discount', 'due_date', @@ -233,6 +234,7 @@ class Account extends Eloquent 'id_number', 'item', 'line_total', + 'outstanding', 'paid_to_date', 'partial_due', 'po_number', diff --git a/app/Models/AccountEmailSettings.php b/app/Models/AccountEmailSettings.php index 8de75d1d3451..5fafc0d7a608 100644 --- a/app/Models/AccountEmailSettings.php +++ b/app/Models/AccountEmailSettings.php @@ -35,4 +35,14 @@ class AccountEmailSettings extends Eloquent 'late_fee3_percent', ]; + public static $templates = [ + TEMPLATE_INVOICE, + TEMPLATE_QUOTE, + //TEMPLATE_PARTIAL, + TEMPLATE_PAYMENT, + TEMPLATE_REMINDER1, + TEMPLATE_REMINDER2, + TEMPLATE_REMINDER3, + ]; + } diff --git a/app/Models/AccountGateway.php b/app/Models/AccountGateway.php index 514fea0cfb3f..846c1605d361 100644 --- a/app/Models/AccountGateway.php +++ b/app/Models/AccountGateway.php @@ -64,6 +64,7 @@ class AccountGateway extends EntityModel public static function paymentDriverClass($provider) { $folder = 'App\\Ninja\\PaymentDrivers\\'; + $provider = str_replace('\\', '', $provider); $class = $folder . $provider . 'PaymentDriver'; $class = str_replace('_', '', $class); @@ -143,6 +144,22 @@ class AccountGateway extends EntityModel return ! empty($this->getConfigField('enableAch')); } + /** + * @return bool + */ + public function getAlipayEnabled() + { + return ! empty($this->getConfigField('enableAlipay')); + } + + /** + * @return bool + */ + public function getSofortEnabled() + { + return ! empty($this->getConfigField('enableSofort')); + } + /** * @return bool */ diff --git a/app/Models/AccountGatewayToken.php b/app/Models/AccountGatewayToken.php index 16fddfe24300..4f85dd7a0272 100644 --- a/app/Models/AccountGatewayToken.php +++ b/app/Models/AccountGatewayToken.php @@ -25,6 +25,16 @@ class AccountGatewayToken extends Eloquent */ protected $casts = []; + /** + * @var array + */ + protected $fillable = [ + 'contact_id', + 'account_gateway_id', + 'client_id', + 'token', + ]; + /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ @@ -41,6 +51,14 @@ class AccountGatewayToken extends Eloquent return $this->belongsTo('App\Models\AccountGateway'); } + /** + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function contact() + { + return $this->belongsTo('App\Models\Contact'); + } + /** * @return \Illuminate\Database\Eloquent\Relations\HasOne */ @@ -49,6 +67,14 @@ class AccountGatewayToken extends Eloquent return $this->hasOne('App\Models\PaymentMethod', 'id', 'default_payment_method_id'); } + /** + * @return mixed + */ + public function getEntityType() + { + return ENTITY_CUSTOMER; + } + /** * @return mixed */ @@ -96,8 +122,10 @@ class AccountGatewayToken extends Eloquent } elseif ($accountGateway->gateway_id == GATEWAY_BRAINTREE) { $merchantId = $accountGateway->getConfigField('merchantId'); $testMode = $accountGateway->getConfigField('testMode'); - return $testMode ? "https://sandbox.braintreegateway.com/merchants/{$merchantId}/customers/{$this->token}" : "https://www.braintreegateway.com/merchants/{$merchantId}/customers/{$this->token}"; + } elseif ($accountGateway->gateway_id == GATEWAY_GOCARDLESS) { + $testMode = $accountGateway->getConfigField('testMode'); + return $testMode ? "https://manage-sandbox.gocardless.com/customers/{$this->token}" : "https://manage.gocardless.com/customers/{$this->token}"; } else { return false; } diff --git a/app/Models/Client.php b/app/Models/Client.php index 4a6d8486e67e..4ff71cee43f0 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -94,16 +94,16 @@ class Client extends EntityModel { return [ 'first' => 'contact_first_name', - 'last' => 'contact_last_name', + 'last^last4' => 'contact_last_name', 'email' => 'contact_email', 'work|office' => 'work_phone', 'mobile|phone' => 'contact_phone', - 'name|organization' => 'name', - 'apt|street2|address2' => 'address2', - 'street|address|address1' => 'address1', + 'name|organization|description^card' => 'name', + 'apt|street2|address2|line2' => 'address2', + 'street|address1|line1^avs' => 'address1', 'city' => 'city', 'state|province' => 'state', - 'zip|postal|code' => 'postal_code', + 'zip|postal|code^avs' => 'postal_code', 'country' => 'country', 'public' => 'public_notes', 'private|note' => 'private_notes', diff --git a/app/Models/Company.php b/app/Models/Company.php index 42bb4b1a43e6..948a2b251627 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -190,6 +190,22 @@ class Company extends Eloquent return false; } + + public function applyDiscount($amount) + { + $this->discount = $amount; + $this->promo_expires = date_create()->modify('14 days')->format('Y-m-d'); + } + + public function applyFreeYear() + { + $this->plan = PLAN_PRO; + $this->plan_term = PLAN_TERM_YEARLY; + $this->plan_price = PLAN_PRICE_PRO_MONTHLY; + $this->plan_started = date_create()->format('Y-m-d'); + $this->plan_paid = date_create()->format('Y-m-d'); + $this->plan_expires = date_create()->modify('1 year')->format('Y-m-d'); + } } Company::deleted(function ($company) diff --git a/app/Models/Contact.php b/app/Models/Contact.php index 0e9c719f56aa..fffc93c6d753 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -154,7 +154,7 @@ class Contact extends EntityModel implements AuthenticatableContract, CanResetPa $url = trim(SITE_URL, '/'); if ($account->hasFeature(FEATURE_CUSTOM_URL)) { - if (Utils::isNinjaProd()) { + if (Utils::isNinjaProd() && ! Utils::isReseller()) { $url = $account->present()->clientPortalLink(); } diff --git a/app/Models/Country.php b/app/Models/Country.php index 410e1595b6a9..34bd9746e59a 100644 --- a/app/Models/Country.php +++ b/app/Models/Country.php @@ -24,6 +24,7 @@ class Country extends Eloquent 'swap_currency_symbol', 'thousand_separator', 'decimal_separator', + 'iso_3166_3', ]; /** diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index 793473fe9f36..8215f135d72d 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -47,6 +47,7 @@ class Gateway extends Eloquent GATEWAY_BRAINTREE, GATEWAY_AUTHORIZE_NET, GATEWAY_MOLLIE, + GATEWAY_GOCARDLESS, GATEWAY_CUSTOM, ]; diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index 1aa6860ebf41..76d395efd744 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -82,7 +82,7 @@ class Invitation extends EntityModel } if ($account->hasFeature(FEATURE_CUSTOM_URL)) { - if (Utils::isNinjaProd()) { + if (Utils::isNinjaProd() && ! Utils::isReseller()) { $url = $account->present()->clientPortalLink(); } diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index c5582c808291..43df86c63c64 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -109,14 +109,16 @@ class Invoice extends EntityModel implements BalanceAffecting 'po_number', 'invoice_date', 'due_date', - 'amount', 'paid', - 'notes', 'terms', - 'product', - 'quantity', - 'tax1', - 'tax2', + 'public_notes', + 'private_notes', + 'item_product', + 'item_notes', + 'item_quantity', + 'item_cost', + 'item_tax1', + 'item_tax2', ]; } @@ -127,17 +129,19 @@ class Invoice extends EntityModel implements BalanceAffecting { return [ 'number^po' => 'invoice_number', - 'amount' => 'amount', 'client|organization' => 'name', 'paid^date' => 'paid', 'invoice date|create date' => 'invoice_date', 'po number' => 'po_number', 'due date' => 'due_date', 'terms' => 'terms', - 'notes' => 'notes', - 'product|item' => 'product', - 'quantity|qty' => 'quantity', - 'tax' => 'tax1', + 'public notes' => 'public_notes', + 'private notes' => 'private_notes', + 'description' => 'item_notes', + 'quantity|qty' => 'item_quantity', + 'amount|cost' => 'item_cost', + 'product|item' => 'item_product', + 'tax' => 'item_tax1', ]; } @@ -357,6 +361,14 @@ class Invoice extends EntityModel implements BalanceAffecting return $this->belongsTo('App\Models\Invoice'); } + /** + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ + public function quote() + { + return $this->belongsTo('App\Models\Invoice'); + } + /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ @@ -560,12 +572,12 @@ class Invoice extends EntityModel implements BalanceAffecting /** * @param bool $save */ - public function updatePaidStatus($save = true) + public function updatePaidStatus($paid = false, $save = true) { $statusId = false; - if ($this->amount != 0 && $this->balance == 0) { + if ($paid && $this->balance == 0) { $statusId = INVOICE_STATUS_PAID; - } elseif ($this->isSent() && $this->balance > 0 && $this->balance < $this->amount) { + } elseif ($paid && $this->balance > 0 && $this->balance < $this->amount) { $statusId = INVOICE_STATUS_PARTIAL; } elseif ($this->isPartial() && $this->balance > 0) { $statusId = ($this->balance == $this->amount ? INVOICE_STATUS_SENT : INVOICE_STATUS_PARTIAL); @@ -648,7 +660,7 @@ class Invoice extends EntityModel implements BalanceAffecting public function canBePaid() { - return floatval($this->balance) != 0 && ! $this->is_deleted && $this->isStandard(); + return ! $this->isPaid() && ! $this->is_deleted && $this->isStandard(); } public static function calcStatusLabel($status, $class, $entityType, $quoteInvoiceId) @@ -1175,10 +1187,17 @@ class Invoice extends EntityModel implements BalanceAffecting $link = $invitation->getLink('view', true); $pdfString = false; $phantomjsSecret = env('PHANTOMJS_SECRET'); + $phantomjsLink = $link . "?phantomjs=true&phantomjs_secret={$phantomjsSecret}"; try { if (env('PHANTOMJS_BIN_PATH')) { - $pdfString = CurlUtils::phantom('GET', $link . "?phantomjs=true&phantomjs_secret={$phantomjsSecret}"); + // we see occasional 408 errors + for ($i=1; $i<=5; $i++) { + $pdfString = CurlUtils::phantom('GET', $phantomjsLink); + if ($pdfString) { + break; + } + } } if (! $pdfString && ($key = env('PHANTOMJS_CLOUD_KEY'))) { @@ -1188,12 +1207,12 @@ class Invoice extends EntityModel implements BalanceAffecting $pdfString = strip_tags($pdfString); } catch (\Exception $exception) { - Utils::logError("PhantomJS - Failed to load: {$exception->getMessage()}"); + Utils::logError("PhantomJS - Failed to load {$phantomjsLink}: {$exception->getMessage()}"); return false; } if (! $pdfString || strlen($pdfString) < 200) { - Utils::logError("PhantomJS - Invalid response: {$pdfString}"); + Utils::logError("PhantomJS - Invalid response {$phantomjsLink}: {$pdfString}"); return false; } @@ -1201,7 +1220,7 @@ class Invoice extends EntityModel implements BalanceAffecting if ($pdf = Utils::decodePDF($pdfString)) { return $pdf; } else { - Utils::logError("PhantomJS - Unable to decode: {$pdfString}"); + Utils::logError("PhantomJS - Unable to decode {$phantomjsLink}: {$pdfString}"); return false; } } else { @@ -1452,6 +1471,17 @@ class Invoice extends EntityModel implements BalanceAffecting { return $this->isQuote() ? 'valid_until' : 'due_date'; } + + public function onlyHasTasks() + { + foreach ($this->invoice_items as $item) { + if ($item->invoice_item_type_id != INVOICE_ITEM_TYPE_TASK) { + return false; + } + } + + return true; + } } Invoice::creating(function ($invoice) { diff --git a/app/Models/LookupModel.php b/app/Models/LookupModel.php index 023287306bfc..291b26735817 100644 --- a/app/Models/LookupModel.php +++ b/app/Models/LookupModel.php @@ -96,7 +96,7 @@ class LookupModel extends Eloquent ->first(); } if (! $isFound) { - abort(500, "Looked up {$className} not found: {$field} => {$value}"); + abort(404, "Looked up {$className} not found: {$field} => {$value}"); } Cache::put($key, $server, 120); diff --git a/app/Models/PaymentMethod.php b/app/Models/PaymentMethod.php index 0f97cf96b64c..76dce0891bf0 100644 --- a/app/Models/PaymentMethod.php +++ b/app/Models/PaymentMethod.php @@ -21,11 +21,26 @@ class PaymentMethod extends EntityModel * @var array */ protected $dates = ['deleted_at']; + /** * @var array */ protected $hidden = ['id']; + /** + * @var array + */ + protected $fillable = [ + 'contact_id', + 'payment_type_id', + 'source_reference', + 'last4', + 'expiration', + 'email', + 'currency_id', + ]; + + /** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ diff --git a/app/Models/PaymentType.php b/app/Models/PaymentType.php index 850e3d34668c..0c8a30c837c2 100644 --- a/app/Models/PaymentType.php +++ b/app/Models/PaymentType.php @@ -21,4 +21,37 @@ class PaymentType extends Eloquent { return $this->belongsTo('App\Models\GatewayType'); } + + public static function parseCardType($cardName) + { + $cardTypes = [ + 'visa' => PAYMENT_TYPE_VISA, + 'americanexpress' => PAYMENT_TYPE_AMERICAN_EXPRESS, + 'amex' => PAYMENT_TYPE_AMERICAN_EXPRESS, + 'mastercard' => PAYMENT_TYPE_MASTERCARD, + 'discover' => PAYMENT_TYPE_DISCOVER, + 'jcb' => PAYMENT_TYPE_JCB, + 'dinersclub' => PAYMENT_TYPE_DINERS, + 'carteblanche' => PAYMENT_TYPE_CARTE_BLANCHE, + 'chinaunionpay' => PAYMENT_TYPE_UNIONPAY, + 'unionpay' => PAYMENT_TYPE_UNIONPAY, + 'laser' => PAYMENT_TYPE_LASER, + 'maestro' => PAYMENT_TYPE_MAESTRO, + 'solo' => PAYMENT_TYPE_SOLO, + 'switch' => PAYMENT_TYPE_SWITCH, + ]; + + $cardName = strtolower(str_replace([' ', '-', '_'], '', $cardName)); + + if (empty($cardTypes[$cardName]) && 1 == preg_match('/^('.implode('|', array_keys($cardTypes)).')/', $cardName, $matches)) { + // Some gateways return extra stuff after the card name + $cardName = $matches[1]; + } + + if (! empty($cardTypes[$cardName])) { + return $cardTypes[$cardName]; + } else { + return PAYMENT_TYPE_CREDIT_CARD_OTHER; + } + } } diff --git a/app/Models/Traits/SendsEmails.php b/app/Models/Traits/SendsEmails.php index 0d9abb2c7b43..b2f7c42a6848 100644 --- a/app/Models/Traits/SendsEmails.php +++ b/app/Models/Traits/SendsEmails.php @@ -22,7 +22,12 @@ trait SendsEmails $entityType = 'reminder'; } - return trans("texts.{$entityType}_subject", ['invoice' => '$invoice', 'account' => '$account', 'quote' => '$quote']); + return trans("texts.{$entityType}_subject", [ + 'invoice' => '$invoice', + 'account' => '$account', + 'quote' => '$quote', + 'number' => '$number', + ]); } /** diff --git a/app/Ninja/Datatables/InvoiceDatatable.php b/app/Ninja/Datatables/InvoiceDatatable.php index efbd4e9905cf..9e98b18d3889 100644 --- a/app/Ninja/Datatables/InvoiceDatatable.php +++ b/app/Ninja/Datatables/InvoiceDatatable.php @@ -83,23 +83,23 @@ class InvoiceDatatable extends EntityDatatable return [ [ - trans("texts.edit_{$entityType}"), - function ($model) use ($entityType) { - return URL::to("{$entityType}s/{$model->public_id}/edit"); - }, + trans("texts.clone_invoice"), function ($model) { - return Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]); - }, - ], - [ - trans("texts.clone_{$entityType}"), - function ($model) use ($entityType) { - return URL::to("{$entityType}s/{$model->public_id}/clone"); + return URL::to("invoices/{$model->public_id}/clone"); }, function ($model) { return Auth::user()->can('create', ENTITY_INVOICE); }, ], + [ + trans("texts.clone_quote"), + function ($model) { + return URL::to("quotes/{$model->public_id}/clone"); + }, + function ($model) { + return Auth::user()->can('create', ENTITY_QUOTE); + }, + ], [ trans('texts.view_history'), function ($model) use ($entityType) { @@ -129,7 +129,7 @@ class InvoiceDatatable extends EntityDatatable return "javascript:submitForm_{$entityType}('markPaid', {$model->public_id})"; }, function ($model) use ($entityType) { - return $entityType == ENTITY_INVOICE && $model->balance != 0 && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]); + return $entityType == ENTITY_INVOICE && $model->invoice_status_id != INVOICE_STATUS_PAID && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]); }, ], [ @@ -138,16 +138,7 @@ class InvoiceDatatable extends EntityDatatable return URL::to("payments/create/{$model->client_public_id}/{$model->public_id}"); }, function ($model) use ($entityType) { - return $entityType == ENTITY_INVOICE && $model->balance > 0 && Auth::user()->can('create', ENTITY_PAYMENT); - }, - ], - [ - trans('texts.view_quote'), - function ($model) { - return URL::to("quotes/{$model->quote_id}/edit"); - }, - function ($model) use ($entityType) { - return $entityType == ENTITY_INVOICE && $model->quote_id && Auth::user()->can('editByOwner', [ENTITY_INVOICE, $model->user_id]); + return $entityType == ENTITY_INVOICE && $model->invoice_status_id != INVOICE_STATUS_PAID && Auth::user()->can('create', ENTITY_PAYMENT); }, ], [ diff --git a/app/Ninja/Datatables/PaymentDatatable.php b/app/Ninja/Datatables/PaymentDatatable.php index 05d23b59e297..17d2605359a8 100644 --- a/app/Ninja/Datatables/PaymentDatatable.php +++ b/app/Ninja/Datatables/PaymentDatatable.php @@ -52,7 +52,7 @@ class PaymentDatatable extends EntityDatatable [ 'method', function ($model) { - return ($model->payment_type && ! $model->last4) ? trans('texts.payment_type_' . $model->payment_type) : ($model->account_gateway_id ? $model->gateway_name : ''); + return $model->account_gateway_id ? $model->gateway_name : ($model->payment_type ? trans('texts.payment_type_' . $model->payment_type) : ''); }, ], [ @@ -67,6 +67,8 @@ class PaymentDatatable extends EntityDatatable return '' . htmlentities($card_type) . '  •••' . $model->last4 . ' ' . $expiration; } elseif ($model->email) { return $model->email; + } elseif ($model->payment_type) { + return trans('texts.payment_type_' . $model->payment_type); } } elseif ($model->last4) { if ($model->bank_name) { diff --git a/app/Ninja/Datatables/RecurringInvoiceDatatable.php b/app/Ninja/Datatables/RecurringInvoiceDatatable.php index a7d20ad355a8..df434b11902f 100644 --- a/app/Ninja/Datatables/RecurringInvoiceDatatable.php +++ b/app/Ninja/Datatables/RecurringInvoiceDatatable.php @@ -105,7 +105,7 @@ class RecurringInvoiceDatatable extends EntityDatatable }, ], [ - trans('texts.clone_invoice'), + trans("texts.clone_invoice"), function ($model) { return URL::to("invoices/{$model->public_id}/clone"); }, @@ -113,6 +113,15 @@ class RecurringInvoiceDatatable extends EntityDatatable return Auth::user()->can('create', ENTITY_INVOICE); }, ], + [ + trans("texts.clone_quote"), + function ($model) { + return URL::to("quotes/{$model->public_id}/clone"); + }, + function ($model) { + return Auth::user()->can('create', ENTITY_QUOTE); + }, + ], ]; } diff --git a/app/Ninja/Datatables/VendorDatatable.php b/app/Ninja/Datatables/VendorDatatable.php index d226a78079bd..761d12ebccf9 100644 --- a/app/Ninja/Datatables/VendorDatatable.php +++ b/app/Ninja/Datatables/VendorDatatable.php @@ -39,7 +39,7 @@ class VendorDatatable extends EntityDatatable }, ], [ - 'client_created_at', + 'created_at', function ($model) { return Utils::timestampToDateString(strtotime($model->created_at)); }, diff --git a/app/Ninja/Import/BaseTransformer.php b/app/Ninja/Import/BaseTransformer.php index f83112c6a7ce..63435b45d3bb 100644 --- a/app/Ninja/Import/BaseTransformer.php +++ b/app/Ninja/Import/BaseTransformer.php @@ -114,6 +114,38 @@ class BaseTransformer extends TransformerAbstract return $product->$field ?: $default; } + /** + * @param $name + * + * @return null + */ + public function getContact($email) + { + $email = trim(strtolower($email)); + + if (! isset($this->maps['contact'][$email])) { + return false; + } + + return $this->maps['contact'][$email]; + } + + /** + * @param $name + * + * @return null + */ + public function getCustomer($key) + { + $key = trim($key); + + if (! isset($this->maps['customer'][$key])) { + return false; + } + + return $this->maps['customer'][$key]; + } + /** * @param $name * @@ -215,7 +247,7 @@ class BaseTransformer extends TransformerAbstract */ public function getInvoiceNumber($number) { - return str_pad(trim($number), 4, '0', STR_PAD_LEFT); + return $number ? str_pad(trim($number), 4, '0', STR_PAD_LEFT) : null; } /** diff --git a/app/Ninja/Import/CSV/InvoiceTransformer.php b/app/Ninja/Import/CSV/InvoiceTransformer.php index 6d8f2e414888..5e54e947785b 100644 --- a/app/Ninja/Import/CSV/InvoiceTransformer.php +++ b/app/Ninja/Import/CSV/InvoiceTransformer.php @@ -33,18 +33,19 @@ class InvoiceTransformer extends BaseTransformer 'po_number' => $this->getString($data, 'po_number'), 'terms' => $this->getString($data, 'terms'), 'public_notes' => $this->getString($data, 'public_notes'), + 'private_notes' => $this->getString($data, 'private_notes'), 'invoice_date_sql' => $this->getDate($data, 'invoice_date'), 'due_date_sql' => $this->getDate($data, 'due_date'), 'invoice_items' => [ [ - 'product_key' => $this->getString($data, 'product'), - 'notes' => $this->getString($data, 'notes') ?: $this->getProduct($data, 'product', 'notes', ''), - 'cost' => $this->getFloat($data, 'amount') ?: $this->getProduct($data, 'product', 'cost', 0), - 'qty' => $this->getFloat($data, 'quantity') ?: 1, - 'tax_name1' => $this->getTaxName($this->getString($data, 'tax1')), - 'tax_rate1' => $this->getTaxRate($this->getString($data, 'tax1')), - 'tax_name2' => $this->getTaxName($this->getString($data, 'tax2')), - 'tax_rate2' => $this->getTaxRate($this->getString($data, 'tax2')), + 'product_key' => $this->getString($data, 'item_product'), + 'notes' => $this->getString($data, 'item_notes') ?: $this->getProduct($data, 'item_product', 'notes', ''), + 'cost' => $this->getFloat($data, 'item_notes') ?: $this->getProduct($data, 'item_product', 'cost', 0), + 'qty' => $this->getFloat($data, 'item_quantity') ?: 1, + 'tax_name1' => $this->getTaxName($this->getString($data, 'item_tax1')) ?: $this->getProduct($data, 'item_product', 'tax_name1', ''), + 'tax_rate1' => $this->getTaxRate($this->getString($data, 'item_tax1')) ?: $this->getProduct($data, 'item_product', 'tax_rate1', 0), + 'tax_name2' => $this->getTaxName($this->getString($data, 'item_tax2')) ?: $this->getProduct($data, 'item_product', 'tax_name2', ''), + 'tax_rate2' => $this->getTaxRate($this->getString($data, 'item_tax2')) ?: $this->getProduct($data, 'item_product', 'tax_rate2', 0), ], ], ]; diff --git a/app/Ninja/Import/Stripe/CustomerTransformer.php b/app/Ninja/Import/Stripe/CustomerTransformer.php new file mode 100644 index 000000000000..ce6305d049f5 --- /dev/null +++ b/app/Ninja/Import/Stripe/CustomerTransformer.php @@ -0,0 +1,54 @@ +getContact($data->email)) { + return false; + } + + $account = auth()->user()->account; + $accountGateway = $account->getGatewayConfig(GATEWAY_STRIPE); + + if (! $accountGateway) { + return false; + } + + if ($this->getCustomer($data->id) || $this->getCustomer($data->email)) { + return false; + } + + return new Item($data, function ($data) use ($account, $contact, $accountGateway) { + return [ + 'contact_id' => $contact->id, + 'client_id' => $contact->client_id, + 'account_gateway_id' => $accountGateway->id, + 'token' => $data->id, + 'payment_method' => [ + 'contact_id' => $contact->id, + 'payment_type_id' => PaymentType::parseCardType($data->card_brand), + 'source_reference' => $data->card_id, + 'last4' => $data->card_last4, + 'expiration' => $data->card_exp_year . '-' . $data->card_exp_month . '-01', + 'email' => $contact->email, + 'currency_id' => $account->getCurrencyId(), + ] + ]; + }); + } +} diff --git a/app/Ninja/Mailers/UserMailer.php b/app/Ninja/Mailers/UserMailer.php index aacfb530fadb..bc464525e438 100644 --- a/app/Ninja/Mailers/UserMailer.php +++ b/app/Ninja/Mailers/UserMailer.php @@ -131,8 +131,8 @@ class UserMailer extends Mailer $data = $data ?: []; $data += [ 'userName' => $user->getDisplayName(), - 'primaryMessage' => $subject, - 'secondaryMessage' => $message, + 'primaryMessage' => $message, + //'secondaryMessage' => $message, 'invoiceLink' => $invoice ? $invoice->present()->multiAccountLink : false, ]; diff --git a/app/Ninja/OAuth/OAuth.php b/app/Ninja/OAuth/OAuth.php index 487cd6172fd9..647d372a5819 100644 --- a/app/Ninja/OAuth/OAuth.php +++ b/app/Ninja/OAuth/OAuth.php @@ -1,10 +1,17 @@ providerInstance = new Providers\Google(); + $this->providerId = self::SOCIAL_GOOGLE; return $this; default: @@ -26,11 +34,16 @@ class OAuth { public function getTokenResponse($token) { - $email = null; $user = null; + $payload = $this->providerInstance->getTokenResponse($token); + $oauthUserId = $this->providerInstance->harvestSubField($payload); + + LookupUser::setServerByField('oauth_user_key', $this->providerId . '-' . $oauthUserId); + if($this->providerInstance) - $user = User::where('email', $this->providerInstance->getTokenResponse($token))->first(); + $user = User::where('oauth_user_id', $oauthUserId)->where('oauth_provider_id', $this->providerId)->first(); + if ($user) return $user; diff --git a/app/Ninja/OAuth/Providers/Google.php b/app/Ninja/OAuth/Providers/Google.php index 0425b3f1d6aa..49e9c3b32aa3 100644 --- a/app/Ninja/OAuth/Providers/Google.php +++ b/app/Ninja/OAuth/Providers/Google.php @@ -7,11 +7,7 @@ class Google implements ProviderInterface { $client = new \Google_Client(['client_id' => env('GOOGLE_CLIENT_ID','')]); - $payload = $client->verifyIdToken($token); - if ($payload) - return $this->harvestEmail($payload); - else - return null; + return $client->verifyIdToken($token); } public function harvestEmail($payload) @@ -19,5 +15,8 @@ class Google implements ProviderInterface return $payload['email']; } - + public function harvestSubField($payload) + { + return $payload['sub']; // user ID + } } diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index 5e5558c8cb8d..98992cae1c77 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -141,6 +141,11 @@ class BasePaymentDriver $invoicRepo->setGatewayFee($this->invoice(), $this->gatewayType); } + // For these gateway types we use the API directrly rather than Omnipay + if ($this->shouldUseSource()) { + return $this->createSource(); + } + if ($this->isGatewayType(GATEWAY_TYPE_TOKEN) || $gateway->is_offsite) { if (Session::has('error')) { Session::reflash(); @@ -515,6 +520,12 @@ class BasePaymentDriver ]; } + public function shouldUseSource() + { + // Use Omnipay by default + return false; + } + protected function shouldCreateToken() { if ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER)) { @@ -947,7 +958,11 @@ class BasePaymentDriver $label = e($this->accountGateway->getConfigField('name')); } else { $url = $this->paymentUrl($gatewayTypeAlias); - $label = trans("texts.{$gatewayTypeAlias}"); + if ($custom = $this->account()->getLabel($gatewayTypeAlias)) { + $label = $custom; + } else { + $label = trans("texts.{$gatewayTypeAlias}"); + } } $label .= $this->invoice()->present()->gatewayFee($gatewayTypeId); @@ -999,39 +1014,6 @@ class BasePaymentDriver return $url; } - protected function parseCardType($cardName) - { - $cardTypes = [ - 'visa' => PAYMENT_TYPE_VISA, - 'americanexpress' => PAYMENT_TYPE_AMERICAN_EXPRESS, - 'amex' => PAYMENT_TYPE_AMERICAN_EXPRESS, - 'mastercard' => PAYMENT_TYPE_MASTERCARD, - 'discover' => PAYMENT_TYPE_DISCOVER, - 'jcb' => PAYMENT_TYPE_JCB, - 'dinersclub' => PAYMENT_TYPE_DINERS, - 'carteblanche' => PAYMENT_TYPE_CARTE_BLANCHE, - 'chinaunionpay' => PAYMENT_TYPE_UNIONPAY, - 'unionpay' => PAYMENT_TYPE_UNIONPAY, - 'laser' => PAYMENT_TYPE_LASER, - 'maestro' => PAYMENT_TYPE_MAESTRO, - 'solo' => PAYMENT_TYPE_SOLO, - 'switch' => PAYMENT_TYPE_SWITCH, - ]; - - $cardName = strtolower(str_replace([' ', '-', '_'], '', $cardName)); - - if (empty($cardTypes[$cardName]) && 1 == preg_match('/^('.implode('|', array_keys($cardTypes)).')/', $cardName, $matches)) { - // Some gateways return extra stuff after the card name - $cardName = $matches[1]; - } - - if (! empty($cardTypes[$cardName])) { - return $cardTypes[$cardName]; - } else { - return PAYMENT_TYPE_CREDIT_CARD_OTHER; - } - } - public function handleWebHook($input) { throw new Exception('Unsupported gateway'); diff --git a/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php b/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php index 00250f398207..980ad8003005 100644 --- a/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BraintreePaymentDriver.php @@ -7,6 +7,7 @@ use Exception; use Session; use Utils; use App\Models\GatewayType; +use App\Models\PaymentType; class BraintreePaymentDriver extends BasePaymentDriver { @@ -108,7 +109,7 @@ class BraintreePaymentDriver extends BasePaymentDriver if ($tokenResponse->isSuccessful()) { $customerReference = $tokenResponse->getCustomerData()->id; } else { - Utils::logError($tokenResponse->getMessage()); + Utils::logError('Failed to create Braintree customer: ' . $tokenResponse->getMessage()); return false; } } @@ -124,7 +125,7 @@ class BraintreePaymentDriver extends BasePaymentDriver if ($tokenResponse->isSuccessful()) { $this->tokenResponse = $tokenResponse->getData()->paymentMethod; } else { - Utils::logError($tokenResponse->getMessage()); + Utils::logError('Failed to create Braintree token: ' . $tokenResponse->getMessage()); return false; } } @@ -158,7 +159,7 @@ class BraintreePaymentDriver extends BasePaymentDriver $paymentMethod->source_reference = $response->token; if ($this->isGatewayType(GATEWAY_TYPE_CREDIT_CARD)) { - $paymentMethod->payment_type_id = $this->parseCardType($response->cardType); + $paymentMethod->payment_type_id = PaymentType::parseCardType($response->cardType); $paymentMethod->last4 = $response->last4; $paymentMethod->expiration = $response->expirationYear . '-' . $response->expirationMonth . '-01'; } elseif ($this->isGatewayType(GATEWAY_TYPE_PAYPAL)) { @@ -211,4 +212,15 @@ class BraintreePaymentDriver extends BasePaymentDriver ->send() ->getToken(); } + + public function isValid() + { + try { + $this->createTransactionToken(); + return true; + } catch (Exception $exception) { + return get_class($exception); + } + } + } diff --git a/app/Ninja/PaymentDrivers/GoCardlessV2RedirectPaymentDriver.php b/app/Ninja/PaymentDrivers/GoCardlessV2RedirectPaymentDriver.php new file mode 100644 index 000000000000..9e233b986ea7 --- /dev/null +++ b/app/Ninja/PaymentDrivers/GoCardlessV2RedirectPaymentDriver.php @@ -0,0 +1,127 @@ +source_reference; + } + + if ($ref = request()->redirect_flow_id) { + $data['transaction_reference'] = $ref; + } + + return $data; + } + + protected function shouldCreateToken() + { + return false; + } + + public function completeOffsitePurchase($input) + { + $details = $this->paymentDetails(); + $this->purchaseResponse = $response = $this->gateway()->completePurchase($details)->send(); + + if (! $response->isSuccessful()) { + return false; + } + + $paymentMethod = $this->createToken(); + $payment = $this->completeOnsitePurchase(false, $paymentMethod); + + return $payment; + } + + protected function creatingCustomer($customer) + { + $customer->token = $this->purchaseResponse->getCustomerId(); + + return $customer; + } + + protected function creatingPaymentMethod($paymentMethod) + { + $paymentMethod->source_reference = $this->purchaseResponse->getMandateId(); + $paymentMethod->payment_type_id = PAYMENT_TYPE_ACH; + $paymentMethod->status = PAYMENT_METHOD_STATUS_VERIFIED; + + return $paymentMethod; + } + + protected function creatingPayment($payment, $paymentMethod) + { + $payment->payment_status_id = PAYMENT_STATUS_PENDING; + + return $payment; + } + + public function handleWebHook($input) + { + $accountGateway = $this->accountGateway; + $accountId = $accountGateway->account_id; + + $token = $accountGateway->getConfigField('webhookSecret'); + $rawPayload = file_get_contents('php://input'); + $providedSignature = $_SERVER['HTTP_WEBHOOK_SIGNATURE']; + $calculatedSignature = hash_hmac('sha256', $rawPayload, $token); + + if (! hash_equals($providedSignature, $calculatedSignature)) { + throw new Exception('Signature does not match'); + } + + foreach ($input['events'] as $event) { + $type = $event['resource_type']; + $action = $event['action']; + + $supported = [ + 'paid_out', + 'failed', + 'charged_back', + ]; + + if ($type != 'payments' || ! in_array($action, $supported)) { + continue; + } + + $sourceRef = isset($event['links']['payment']) ? $event['links']['payment'] : false; + $payment = Payment::scope(false, $accountId)->where('transaction_reference', '=', $sourceRef)->first(); + + if (! $payment) { + continue; + } + + if ($action == 'failed' || $action == 'charged_back') { + if (! $payment->isFailed()) { + $payment->markFailed($event['details']['description']); + + $userMailer = app('App\Ninja\Mailers\UserMailer'); + $userMailer->sendNotification($payment->user, $payment->invoice, 'payment_failed', $payment); + } + } elseif ($action == 'paid_out') { + $payment->markComplete(); + } + } + } +} diff --git a/app/Ninja/PaymentDrivers/StripePaymentDriver.php b/app/Ninja/PaymentDrivers/StripePaymentDriver.php index fc93b1325069..0584fb64b23f 100644 --- a/app/Ninja/PaymentDrivers/StripePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/StripePaymentDriver.php @@ -3,9 +3,12 @@ namespace App\Ninja\PaymentDrivers; use App\Models\Payment; +use App\Models\Invitation; use App\Models\PaymentMethod; +use App\Models\GatewayType; use Cache; use Exception; +use App\Models\PaymentType; class StripePaymentDriver extends BasePaymentDriver { @@ -19,8 +22,30 @@ class StripePaymentDriver extends BasePaymentDriver GATEWAY_TYPE_TOKEN, ]; - if ($this->accountGateway && $this->accountGateway->getAchEnabled()) { - $types[] = GATEWAY_TYPE_BANK_TRANSFER; + if ($gateway = $this->accountGateway) { + $achEnabled = $gateway->getAchEnabled(); + $sofortEnabled = $gateway->getSofortEnabled(); + if ($achEnabled && $sofortEnabled) { + if ($this->invitation) { + $country = ($this->client() && $this->client()->country) ? $this->client()->country->iso_3166_3 : ($this->account()->country ? $this->account()->country->iso_3166_3 : false); + // https://stripe.com/docs/sources/sofort + if ($country && in_array($country, ['AUT', 'BEL', 'DEU', 'ITA', 'NLD', 'ESP'])) { + $types[] = GATEWAY_TYPE_SOFORT; + } else { + $types[] = GATEWAY_TYPE_BANK_TRANSFER; + } + } else { + $types[] = GATEWAY_TYPE_BANK_TRANSFER; + $types[] = GATEWAY_TYPE_SOFORT; + } + } elseif ($achEnabled) { + $types[] = GATEWAY_TYPE_BANK_TRANSFER; + } elseif ($sofortEnabled) { + $types[] = GATEWAY_TYPE_SOFORT; + } + if ($gateway->getAlipayEnabled()) { + $types[] = GATEWAY_TYPE_ALIPAY; + } } return $types; @@ -57,6 +82,11 @@ class StripePaymentDriver extends BasePaymentDriver } } + public function shouldUseSource() + { + return in_array($this->gatewayType, [GATEWAY_TYPE_ALIPAY, GATEWAY_TYPE_SOFORT]); + } + protected function checkCustomerExists($customer) { $response = $this->gateway() @@ -189,7 +219,7 @@ class StripePaymentDriver extends BasePaymentDriver // In that case we'd use GATEWAY_TYPE_TOKEN even though we're creating the credit card if ($this->isGatewayType(GATEWAY_TYPE_CREDIT_CARD) || $this->isGatewayType(GATEWAY_TYPE_TOKEN)) { $paymentMethod->expiration = $source['exp_year'] . '-' . $source['exp_month'] . '-01'; - $paymentMethod->payment_type_id = $this->parseCardType($source['brand']); + $paymentMethod->payment_type_id = PaymentType::parseCardType($source['brand']); } elseif ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER)) { $paymentMethod->routing_number = $source['routing_number']; $paymentMethod->payment_type_id = PAYMENT_TYPE_ACH; @@ -207,8 +237,17 @@ class StripePaymentDriver extends BasePaymentDriver protected function creatingPayment($payment, $paymentMethod) { - if ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER, $paymentMethod)) { + $isBank = $this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER, $paymentMethod); + $isAlipay = $this->isGatewayType(GATEWAY_TYPE_ALIPAY, $paymentMethod); + $isSofort = $this->isGatewayType(GATEWAY_TYPE_SOFORT, $paymentMethod); + + if ($isBank || $isAlipay || $isSofort) { $payment->payment_status_id = $this->purchaseResponse['status'] == 'succeeded' ? PAYMENT_STATUS_COMPLETED : PAYMENT_STATUS_PENDING; + if ($isAlipay) { + $payment->payment_type_id = PAYMENT_TYPE_ALIPAY; + } elseif ($isSofort) { + $payment->payment_type_id = PAYMENT_TYPE_SOFORT; + } } return $payment; @@ -307,6 +346,42 @@ class StripePaymentDriver extends BasePaymentDriver return true; } + public function createSource() + { + $amount = intval($this->invoice()->getRequestedAmount() * 100); + $invoiceNumber = $this->invoice()->invoice_number; + $currency = $this->client()->getCurrencyCode(); + $gatewayType = GatewayType::getAliasFromId($this->gatewayType); + $redirect = url("/complete_source/{$this->invitation->invitation_key}/{$gatewayType}"); + $country = $this->client()->country ? $this->client()->country->iso_3166_2 : ($this->account()->country ? $this->account()->country->iso_3166_2 : ''); + $extra = ''; + + if ($this->gatewayType == GATEWAY_TYPE_ALIPAY) { + if (! $this->accountGateway->getAlipayEnabled()) { + throw new Exception('Alipay is not enabled'); + } + $type = 'alipay'; + } else { + if (! $this->accountGateway->getSofortEnabled()) { + throw new Exception('Sofort is not enabled'); + } + $type = 'sofort'; + $extra = "&sofort[country]={$country}&statement_descriptor={$invoiceNumber}"; + } + + $data = "type={$type}&amount={$amount}¤cy={$currency}&redirect[return_url]={$redirect}{$extra}"; + $response = $this->makeStripeCall('POST', 'sources', $data); + + if (is_array($response) && isset($response['id'])) { + $this->invitation->transaction_reference = $response['id']; + $this->invitation->save(); + + return redirect($response['redirect']['url']); + } else { + throw new Exception($response); + } + } + public function makeStripeCall($method, $url, $body = null) { $apiKey = $this->accountGateway->getConfig()->apiKey; @@ -367,6 +442,7 @@ class StripePaymentDriver extends BasePaymentDriver 'customer.source.updated', 'customer.source.deleted', 'customer.bank_account.deleted', + 'source.chargeable', ]; if (! in_array($eventType, $supportedEvents)) { @@ -388,11 +464,11 @@ class StripePaymentDriver extends BasePaymentDriver return false; } - if ($eventType == 'charge.failed' || $eventType == 'charge.succeeded' || $eventType == 'charge.refunded') { - $charge = $eventDetails['data']['object']; - $transactionRef = $charge['id']; + $source = $eventDetails['data']['object']; + $sourceRef = $source['id']; - $payment = Payment::scope(false, $accountId)->where('transaction_reference', '=', $transactionRef)->first(); + if ($eventType == 'charge.failed' || $eventType == 'charge.succeeded' || $eventType == 'charge.refunded') { + $payment = Payment::scope(false, $accountId)->where('transaction_reference', '=', $sourceRef)->first(); if (! $payment) { return false; @@ -400,7 +476,7 @@ class StripePaymentDriver extends BasePaymentDriver if ($eventType == 'charge.failed') { if (! $payment->isFailed()) { - $payment->markFailed($charge['failure_message']); + $payment->markFailed($source['failure_message']); $userMailer = app('App\Ninja\Mailers\UserMailer'); $userMailer->sendNotification($payment->user, $payment->invoice, 'payment_failed', $payment); @@ -408,12 +484,9 @@ class StripePaymentDriver extends BasePaymentDriver } elseif ($eventType == 'charge.succeeded') { $payment->markComplete(); } elseif ($eventType == 'charge.refunded') { - $payment->recordRefund($charge['amount_refunded'] / 100 - $payment->refunded); + $payment->recordRefund($source['amount_refunded'] / 100 - $payment->refunded); } } elseif ($eventType == 'customer.source.updated' || $eventType == 'customer.source.deleted' || $eventType == 'customer.bank_account.deleted') { - $source = $eventDetails['data']['object']; - $sourceRef = $source['id']; - $paymentMethod = PaymentMethod::scope(false, $accountId)->where('source_reference', '=', $sourceRef)->first(); if (! $paymentMethod) { @@ -425,6 +498,17 @@ class StripePaymentDriver extends BasePaymentDriver } elseif ($eventType == 'customer.source.updated') { //$this->paymentService->convertPaymentMethodFromStripe($source, null, $paymentMethod)->save(); } + } elseif ($eventType == 'source.chargeable') { + $this->invitation = Invitation::scope(false, $accountId)->where('transaction_reference', '=', $sourceRef)->first(); + if (! $this->invitation) { + return false; + } + $data = sprintf('amount=%d¤cy=%s&source=%s', $source['amount'], $source['currency'], $source['id']); + $this->purchaseResponse = $response = $this->makeStripeCall('POST', 'charges', $data); + $this->gatewayType = GatewayType::getIdFromAlias($source['type']); + if (is_array($response) && isset($response['id'])) { + $this->createPayment($response['id']); + } } return 'Processed successfully'; diff --git a/app/Ninja/PaymentDrivers/WePayPaymentDriver.php b/app/Ninja/PaymentDrivers/WePayPaymentDriver.php index e7000048c1cd..838b63439877 100644 --- a/app/Ninja/PaymentDrivers/WePayPaymentDriver.php +++ b/app/Ninja/PaymentDrivers/WePayPaymentDriver.php @@ -7,6 +7,7 @@ use App\Models\PaymentMethod; use Exception; use Session; use Utils; +use App\Models\PaymentType; class WePayPaymentDriver extends BasePaymentDriver { @@ -159,7 +160,7 @@ class WePayPaymentDriver extends BasePaymentDriver } } else { $paymentMethod->last4 = $source->last_four; - $paymentMethod->payment_type_id = $this->parseCardType($source->credit_card_name); + $paymentMethod->payment_type_id = PaymentType::parseCardType($source->credit_card_name); $paymentMethod->expiration = $source->expiration_year . '-' . $source->expiration_month . '-01'; $paymentMethod->source_reference = $source->credit_card_id; } diff --git a/app/Ninja/Presenters/AccountPresenter.php b/app/Ninja/Presenters/AccountPresenter.php index 5cfd0e70dd68..21f662284997 100644 --- a/app/Ninja/Presenters/AccountPresenter.php +++ b/app/Ninja/Presenters/AccountPresenter.php @@ -63,9 +63,16 @@ class AccountPresenter extends Presenter return $currency->code; } - public function clientPortalLink() + public function clientPortalLink($subdomain = false) { - return Domain::getLinkFromId($this->entity->domain_id); + $account = $this->entity; + $url = Domain::getLinkFromId($account->domain_id); + + if ($subdomain && $account->subdomain) { + $url = Utils::replaceSubdomain($url, $account->subdomain); + } + + return $url; } public function industry() diff --git a/app/Ninja/Presenters/ClientPresenter.php b/app/Ninja/Presenters/ClientPresenter.php index 5493b3751c0c..88353ac8846a 100644 --- a/app/Ninja/Presenters/ClientPresenter.php +++ b/app/Ninja/Presenters/ClientPresenter.php @@ -2,6 +2,8 @@ namespace App\Ninja\Presenters; +use Utils; + class ClientPresenter extends EntityPresenter { public function country() @@ -17,6 +19,19 @@ class ClientPresenter extends EntityPresenter return $account->formatMoney($client->balance, $client); } + public function websiteLink() + { + $client = $this->entity; + + if (! $client->website) { + return ''; + } + + $link = Utils::addHttp($client->website); + + return link_to($link, $client->website, ['target' => '_blank']); + } + public function paid_to_date() { $client = $this->entity; diff --git a/app/Ninja/Presenters/InvoicePresenter.php b/app/Ninja/Presenters/InvoicePresenter.php index 2063675aca0a..3ffd3430342e 100644 --- a/app/Ninja/Presenters/InvoicePresenter.php +++ b/app/Ninja/Presenters/InvoicePresenter.php @@ -8,6 +8,7 @@ use Carbon; use DropdownButton; use stdClass; use Utils; +use Auth; class InvoicePresenter extends EntityPresenter { @@ -37,6 +38,14 @@ class InvoicePresenter extends EntityPresenter return $account->formatMoney($invoice->balance, $invoice->client); } + public function partial() + { + $invoice = $this->entity; + $account = $invoice->account; + + return $account->formatMoney($invoice->partial, $invoice->client); + } + public function requestedAmount() { $invoice = $this->entity; @@ -217,11 +226,16 @@ class InvoicePresenter extends EntityPresenter $entityType = $invoice->getEntityType(); $actions = [ - ['url' => 'javascript:onCloneClick()', 'label' => trans("texts.clone_{$entityType}")], - ['url' => url("{$entityType}s/{$entityType}_history/{$invoice->public_id}"), 'label' => trans('texts.view_history')], - DropdownButton::DIVIDER, + ['url' => 'javascript:onCloneInvoiceClick()', 'label' => trans("texts.clone_invoice")] ]; + if (Auth::user()->can('create', ENTITY_QUOTE)) { + $actions[] = ['url' => 'javascript:onCloneQuoteClick()', 'label' => trans("texts.clone_quote")]; + } + + $actions[] = ['url' => url("{$entityType}s/{$entityType}_history/{$invoice->public_id}"), 'label' => trans('texts.view_history')]; + $actions[] = DropdownButton::DIVIDER; + if ($entityType == ENTITY_QUOTE) { if ($invoice->quote_invoice_id) { $actions[] = ['url' => url("invoices/{$invoice->quote_invoice_id}/edit"), 'label' => trans('texts.view_invoice')]; @@ -229,11 +243,15 @@ class InvoicePresenter extends EntityPresenter $actions[] = ['url' => 'javascript:onConvertClick()', 'label' => trans('texts.convert_to_invoice')]; } } elseif ($entityType == ENTITY_INVOICE) { - if ($invoice->quote_id) { - $actions[] = ['url' => url("quotes/{$invoice->quote_id}/edit"), 'label' => trans('texts.view_quote')]; + if ($invoice->quote_id && $invoice->quote) { + $actions[] = ['url' => url("quotes/{$invoice->quote->public_id}/edit"), 'label' => trans('texts.view_quote')]; } - if (!$invoice->deleted_at && ! $invoice->is_recurring && $invoice->balance != 0) { + if ($invoice->onlyHasTasks()) { + $actions[] = ['url' => 'javascript:onAddItemClick()', 'label' => trans('texts.add_item')]; + } + + if ($invoice->canBePaid()) { $actions[] = ['url' => 'javascript:submitBulkAction("markPaid")', 'label' => trans('texts.mark_paid')]; $actions[] = ['url' => 'javascript:onPaymentClick()', 'label' => trans('texts.enter_payment')]; } diff --git a/app/Ninja/Reports/ProductReport.php b/app/Ninja/Reports/ProductReport.php index 37ad9b6cfd2c..3d1b8aa74a4d 100644 --- a/app/Ninja/Reports/ProductReport.php +++ b/app/Ninja/Reports/ProductReport.php @@ -4,6 +4,7 @@ namespace App\Ninja\Reports; use App\Models\Client; use Auth; +use Utils; class ProductReport extends AbstractReport { @@ -48,8 +49,8 @@ class ProductReport extends AbstractReport $this->isExport ? $invoice->invoice_number : $invoice->present()->link, $invoice->present()->invoice_date, $item->product_key, - $item->qty, - $account->formatMoney($item->cost, $client), + Utils::roundSignificant($item->qty, 0), + Utils::roundSignificant($item->cost, 2), ]; } diff --git a/app/Ninja/Reports/TaskReport.php b/app/Ninja/Reports/TaskReport.php index 29d83e1486f3..fbc52b0591de 100644 --- a/app/Ninja/Reports/TaskReport.php +++ b/app/Ninja/Reports/TaskReport.php @@ -26,9 +26,9 @@ class TaskReport extends AbstractReport foreach ($tasks->get() as $task) { $this->data[] = [ $task->client ? ($this->isExport ? $task->client->getDisplayName() : $task->client->present()->link) : trans('texts.unassigned'), - link_to($task->present()->url, $task->getStartTime()), + $this->isExport ? $task->getStartTime() : link_to($task->present()->url, $task->getStartTime()), $task->present()->project, - $task->present()->description, + $task->description, Utils::formatTime($task->getDuration()), ]; } diff --git a/app/Ninja/Repositories/AccountRepository.php b/app/Ninja/Repositories/AccountRepository.php index 39d3475030e7..092493794f01 100644 --- a/app/Ninja/Repositories/AccountRepository.php +++ b/app/Ninja/Repositories/AccountRepository.php @@ -42,17 +42,11 @@ class AccountRepository if (Input::get('utm_campaign')) { if (env('PROMO_CAMPAIGN') && hash_equals(Input::get('utm_campaign'), env('PROMO_CAMPAIGN'))) { - $company->discount = .75; - $company->promo_expires = date_create()->modify('14 days')->format('Y-m-d'); + $company->applyDiscount(.75); } if (env('PARTNER_CAMPAIGN') && hash_equals(Input::get('utm_campaign'), env('PARTNER_CAMPAIGN'))) { - $company->plan = PLAN_PRO; - $company->plan_term = PLAN_TERM_YEARLY; - $company->plan_price = PLAN_PRICE_PRO_MONTHLY; - $company->plan_started = date_create()->format('Y-m-d'); - $company->plan_paid = date_create()->format('Y-m-d'); - $company->plan_expires = date_create()->modify('1 year')->format('Y-m-d'); + $company->applyFreeYear(); } } diff --git a/app/Ninja/Repositories/ClientRepository.php b/app/Ninja/Repositories/ClientRepository.php index b01db1225da2..8ee2e5a90375 100644 --- a/app/Ninja/Repositories/ClientRepository.php +++ b/app/Ninja/Repositories/ClientRepository.php @@ -117,6 +117,11 @@ class ClientRepository extends BaseRepository } } + // set default payment terms + if (auth()->check() && ! isset($data['payment_terms'])) { + $data['payment_terms'] = auth()->user()->account->payment_terms; + } + $client->fill($data); $client->save(); diff --git a/app/Ninja/Repositories/ContactRepository.php b/app/Ninja/Repositories/ContactRepository.php index 7a72fda3e2d3..992712cfa22b 100644 --- a/app/Ninja/Repositories/ContactRepository.php +++ b/app/Ninja/Repositories/ContactRepository.php @@ -6,6 +6,13 @@ use App\Models\Contact; class ContactRepository extends BaseRepository { + public function all() + { + return Contact::scope() + ->withTrashed() + ->get(); + } + public function save($data, $contact = false) { $publicId = isset($data['public_id']) ? $data['public_id'] : false; diff --git a/app/Ninja/Repositories/CustomerRepository.php b/app/Ninja/Repositories/CustomerRepository.php new file mode 100644 index 000000000000..d5eb58de4641 --- /dev/null +++ b/app/Ninja/Repositories/CustomerRepository.php @@ -0,0 +1,42 @@ +user()->account_id) + ->with(['contact']) + ->get(); + } + + public function save($data) + { + $account = auth()->user()->account; + + $customer = new AccountGatewayToken(); + $customer->account_id = $account->id; + $customer->fill($data); + $customer->save(); + + $paymentMethod = PaymentMethod::createNew(); + $paymentMethod->account_gateway_token_id = $customer->id; + $paymentMethod->fill($data['payment_method']); + $paymentMethod->save(); + + $customer->default_payment_method_id = $paymentMethod->id; + $customer->save(); + + return $customer; + } +} diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index f34bc89d0181..6404e2aed4d7 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -526,8 +526,8 @@ class InvoiceRepository extends BaseRepository continue; } - $invoiceItemCost = round(Utils::parseFloat($item['cost']), 2); - $invoiceItemQty = round(Utils::parseFloat($item['qty']), 2); + $invoiceItemCost = Utils::roundSignificant(Utils::parseFloat($item['cost'])); + $invoiceItemQty = Utils::roundSignificant(Utils::parseFloat($item['qty'])); $lineTotal = $invoiceItemCost * $invoiceItemQty; $total += round($lineTotal, 2); @@ -535,8 +535,8 @@ class InvoiceRepository extends BaseRepository foreach ($data['invoice_items'] as $item) { $item = (array) $item; - $invoiceItemCost = round(Utils::parseFloat($item['cost']), 2); - $invoiceItemQty = round(Utils::parseFloat($item['qty']), 2); + $invoiceItemCost = Utils::roundSignificant(Utils::parseFloat($item['cost'])); + $invoiceItemQty = Utils::roundSignificant(Utils::parseFloat($item['qty'])); $lineTotal = $invoiceItemCost * $invoiceItemQty; if ($invoice->discount > 0) { @@ -815,11 +815,11 @@ class InvoiceRepository extends BaseRepository /** * @param Invoice $invoice - * @param null $quotePublicId + * @param null $quoteId * * @return mixed */ - public function cloneInvoice(Invoice $invoice, $quotePublicId = null) + public function cloneInvoice(Invoice $invoice, $quoteId = null) { $invoice->load('invitations', 'invoice_items'); $account = $invoice->account; @@ -873,9 +873,9 @@ class InvoiceRepository extends BaseRepository $clone->$field = $invoice->$field; } - if ($quotePublicId) { + if ($quoteId) { $clone->invoice_type_id = INVOICE_TYPE_STANDARD; - $clone->quote_id = $quotePublicId; + $clone->quote_id = $quoteId; if ($account->invoice_terms) { $clone->terms = $account->invoice_terms; } @@ -890,7 +890,7 @@ class InvoiceRepository extends BaseRepository $clone->due_date = $account->defaultDueDate($invoice->client); $clone->save(); - if ($quotePublicId) { + if ($quoteId) { $invoice->quote_invoice_id = $clone->public_id; $invoice->save(); } diff --git a/app/Ninja/Transformers/ExpenseTransformer.php b/app/Ninja/Transformers/ExpenseTransformer.php index 5a8317f70daa..4bc82660670f 100644 --- a/app/Ninja/Transformers/ExpenseTransformer.php +++ b/app/Ninja/Transformers/ExpenseTransformer.php @@ -17,6 +17,7 @@ class ExpenseTransformer extends EntityTransformer * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) * @SWG\Property(property="transaction_id", type="integer", example=1) + * @SWG\Property(property="transaction_reference", type="string", example="") * @SWG\Property(property="bank_id", type="integer", example=1) * @SWG\Property(property="expense_currency_id", type="integer", example=1) * @SWG\Property(property="expense_category_id", type="integer", example=1) @@ -67,6 +68,7 @@ class ExpenseTransformer extends EntityTransformer 'updated_at' => $this->getTimestamp($expense->updated_at), 'archived_at' => $this->getTimestamp($expense->deleted_at), 'transaction_id' => $expense->transaction_id, + 'transaction_reference' => $expense->transaction_reference, 'bank_id' => $expense->bank_id, 'expense_currency_id' => (int) $expense->expense_currency_id, 'expense_category_id' => $expense->expense_category ? (int) $expense->expense_category->public_id : null, diff --git a/app/Ninja/Transformers/TaskTransformer.php b/app/Ninja/Transformers/TaskTransformer.php index a150ed7e0a6d..234295dea73f 100644 --- a/app/Ninja/Transformers/TaskTransformer.php +++ b/app/Ninja/Transformers/TaskTransformer.php @@ -18,6 +18,7 @@ class TaskTransformer extends EntityTransformer */ protected $availableIncludes = [ 'client', + 'project', ]; public function __construct(Account $account) @@ -36,6 +37,17 @@ class TaskTransformer extends EntityTransformer } } + public function includeProject(Task $task) + { + if ($task->project) { + $transformer = new ProjectTransformer($this->account, $this->serializer); + + return $this->includeItem($task->project, $transformer, 'project'); + } else { + return null; + } + } + public function transform(Task $task) { return array_merge($this->getDefaults($task), [ diff --git a/app/Policies/CustomerPolicy.php b/app/Policies/CustomerPolicy.php new file mode 100644 index 000000000000..f0ee286cfc69 --- /dev/null +++ b/app/Policies/CustomerPolicy.php @@ -0,0 +1,7 @@ + \App\Policies\BankAccountPolicy::class, \App\Models\PaymentTerm::class => \App\Policies\PaymentTermPolicy::class, \App\Models\Project::class => \App\Policies\ProjectPolicy::class, + \App\Models\AccountGatewayToken::class => \App\Policies\CustomerPolicy::class, ]; /** diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index 1e604a5ede61..39229a7a8b90 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -3,6 +3,7 @@ namespace App\Services; use App\Models\Client; +use App\Models\Contact; use App\Models\EntityModel; use App\Models\Expense; use App\Models\ExpenseCategory; @@ -10,8 +11,10 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\Product; use App\Models\Vendor; +use App\Models\AccountGatewayToken; use App\Ninja\Import\BaseTransformer; use App\Ninja\Repositories\ClientRepository; +use App\Ninja\Repositories\CustomerRepository; use App\Ninja\Repositories\ContactRepository; use App\Ninja\Repositories\ExpenseCategoryRepository; use App\Ninja\Repositories\ExpenseRepository; @@ -53,6 +56,11 @@ class ImportService */ protected $clientRepo; + /** + * @var CustomerRepository + */ + protected $customerRepo; + /** * @var ContactRepository */ @@ -90,6 +98,7 @@ class ImportService ENTITY_TASK, ENTITY_PRODUCT, ENTITY_EXPENSE, + ENTITY_CUSTOMER, ]; /** @@ -104,6 +113,7 @@ class ImportService IMPORT_INVOICEPLANE, IMPORT_NUTCACHE, IMPORT_RONIN, + IMPORT_STRIPE, IMPORT_WAVE, IMPORT_ZOHO, ]; @@ -113,6 +123,7 @@ class ImportService * * @param Manager $manager * @param ClientRepository $clientRepo + * @param CustomerRepository $customerRepo * @param InvoiceRepository $invoiceRepo * @param PaymentRepository $paymentRepo * @param ContactRepository $contactRepo @@ -121,6 +132,7 @@ class ImportService public function __construct( Manager $manager, ClientRepository $clientRepo, + CustomerRepository $customerRepo, InvoiceRepository $invoiceRepo, PaymentRepository $paymentRepo, ContactRepository $contactRepo, @@ -134,6 +146,7 @@ class ImportService $this->fractal->setSerializer(new ArraySerializer()); $this->clientRepo = $clientRepo; + $this->customerRepo = $customerRepo; $this->invoiceRepo = $invoiceRepo; $this->paymentRepo = $paymentRepo; $this->contactRepo = $contactRepo; @@ -428,8 +441,10 @@ class ImportService $entity = $this->{"{$entityType}Repo"}->save($data); // update the entity maps - $mapFunction = 'add' . ucwords($entity->getEntityType()) . 'ToMaps'; - $this->$mapFunction($entity); + if ($entityType != ENTITY_CUSTOMER) { + $mapFunction = 'add' . ucwords($entity->getEntityType()) . 'ToMaps'; + $this->$mapFunction($entity); + } // if the invoice is paid we'll also create a payment record if ($entityType === ENTITY_INVOICE && isset($data['paid']) && $data['paid'] > 0) { @@ -632,14 +647,8 @@ class ImportService private function getCsvData($fileName) { - require_once app_path().'/Includes/parsecsv.lib.php'; - $this->checkForFile($fileName); - - $csv = new parseCSV(); - $csv->heading = false; - $csv->auto($fileName); - $data = $csv->data; + $data = array_map('str_getcsv', file($fileName)); if (count($data) > 0) { $headers = $data[0]; @@ -842,6 +851,8 @@ class ImportService $this->maps = [ 'client' => [], + 'contact' => [], + 'customer' => [], 'invoice' => [], 'invoice_client' => [], 'product' => [], @@ -861,6 +872,16 @@ class ImportService $this->addClientToMaps($client); } + $customers = $this->customerRepo->all(); + foreach ($customers as $customer) { + $this->addCustomerToMaps($customer); + } + + $contacts = $this->contactRepo->all(); + foreach ($contacts as $contact) { + $this->addContactToMaps($contact); + } + $invoices = $this->invoiceRepo->all(); foreach ($invoices as $invoice) { $this->addInvoiceToMaps($invoice); @@ -927,6 +948,25 @@ class ImportService } } + /** + * @param Customer $customer + */ + private function addCustomerToMaps(AccountGatewayToken $customer) + { + $this->maps['customer'][$customer->token] = $customer; + $this->maps['customer'][$customer->contact->email] = $customer; + } + + /** + * @param Product $product + */ + private function addContactToMaps(Contact $contact) + { + if ($key = strtolower(trim($contact->email))) { + $this->maps['contact'][$key] = $contact; + } + } + /** * @param Product $product */ diff --git a/app/Services/TemplateService.php b/app/Services/TemplateService.php index bb370b555b2b..d25665277e38 100644 --- a/app/Services/TemplateService.php +++ b/app/Services/TemplateService.php @@ -54,6 +54,8 @@ class TemplateService '$balance' => $invoice->present()->balance, '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, + '$number' => $invoice->invoice_number, + '$partial' => $invoice->present()->partial, '$link' => $invitation->getLink(), '$password' => $passwordHTML, '$viewLink' => $invitation->getLink().'$password', diff --git a/bootstrap/app.php b/bootstrap/app.php index 1e44122c80c4..38d13967a889 100755 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -58,11 +58,12 @@ if (strstr($_SERVER['HTTP_USER_AGENT'], 'PhantomJS') && Utils::isNinjaDev()) { } */ -// Write info messages to a separate file $app->configureMonologUsing(function($monolog) { - $monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-info.log', Monolog\Logger::INFO, false)); - $monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-warning.log', Monolog\Logger::WARNING, false)); - $monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-error.log', Monolog\Logger::ERROR, false)); + if (config('app.log') == 'single') { + $monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-info.log', Monolog\Logger::INFO, false)); + $monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-warning.log', Monolog\Logger::WARNING, false)); + $monolog->pushHandler(new Monolog\Handler\StreamHandler(storage_path() . '/logs/laravel-error.log', Monolog\Logger::ERROR, false)); + } }); // Capture real IP if using cloudflare diff --git a/composer.json b/composer.json index fea2bd3b9446..7587d6b8d49e 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,7 @@ "descubraomundo/omnipay-pagarme": "dev-master", "digitickets/omnipay-barclays-epdq": "~3.0", "digitickets/omnipay-datacash": "~3.0", + "digitickets/omnipay-gocardlessv2": "dev-payment-fix", "digitickets/omnipay-realex": "~5.0", "dioscouri/omnipay-cybersource": "dev-master", "doctrine/dbal": "2.5.x", @@ -66,7 +67,7 @@ "meebio/omnipay-creditcall": "dev-master", "meebio/omnipay-secure-trading": "dev-master", "mfauveau/omnipay-pacnet": "~2.0", - "mpdf/mpdf": "^6.1", + "mpdf/mpdf": "6.1.3", "nwidart/laravel-modules": "^1.14", "omnipay/2checkout": "dev-master#e9c079c2dde0d7ba461903b3b7bd5caf6dee1248", "omnipay/bitpay": "dev-master", @@ -161,6 +162,10 @@ { "type": "vcs", "url": "https://github.com/hillelcoren/l5-google-cloud-storage" + }, + { + "type": "vcs", + "url": "https://github.com/hillelcoren/omnipay-gocardlessv2" } ] } diff --git a/composer.lock b/composer.lock index a3d7da98e61b..f9e9a057f39b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f57537fe1dab41aac024b12e4a284570", - "content-hash": "9d0ce024f2c50440bf896ecc2a37350f", + "hash": "a39a505121abab0985f7c0cb1734920c", + "content-hash": "4067bb1f3c6d2b3397e3a005b642ddb6", "packages": [ { "name": "agmscode/omnipay-agms", @@ -69,12 +69,12 @@ "source": { "type": "git", "url": "https://github.com/xcaliber-tech/omnipay-skrill.git", - "reference": "41a7a03c5b90d496720e288bebc157d898837ccd" + "reference": "e8f3f76103e1f311b4d922c9b0b14689aa7938b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/xcaliber-tech/omnipay-skrill/zipball/41a7a03c5b90d496720e288bebc157d898837ccd", - "reference": "41a7a03c5b90d496720e288bebc157d898837ccd", + "url": "https://api.github.com/repos/xcaliber-tech/omnipay-skrill/zipball/e8f3f76103e1f311b4d922c9b0b14689aa7938b4", + "reference": "e8f3f76103e1f311b4d922c9b0b14689aa7938b4", "shasum": "" }, "require": { @@ -115,7 +115,7 @@ "payment", "skrill" ], - "time": "2016-01-13 16:33:07" + "time": "2017-07-24 10:13:29" }, { "name": "anahkiasen/former", @@ -330,16 +330,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.31.3", + "version": "3.33.3", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0b3b64ce80d3381aa25c7bab69411a4a8297b6cb" + "reference": "2820644f411fa261f126727c1c00de15227b9520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0b3b64ce80d3381aa25c7bab69411a4a8297b6cb", - "reference": "0b3b64ce80d3381aa25c7bab69411a4a8297b6cb", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2820644f411fa261f126727c1c00de15227b9520", + "reference": "2820644f411fa261f126727c1c00de15227b9520", "shasum": "" }, "require": { @@ -406,7 +406,7 @@ "s3", "sdk" ], - "time": "2017-07-12 18:22:23" + "time": "2017-08-18 18:04:40" }, { "name": "barracudanetworks/archivestream-php", @@ -508,16 +508,16 @@ }, { "name": "barryvdh/laravel-debugbar", - "version": "v2.4.1", + "version": "v2.4.3", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "af98b3a4ccac9364f2145fae974ff3392ec402b1" + "reference": "d7c88f08131f6404cb714f3f6cf0642f6afa3903" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/af98b3a4ccac9364f2145fae974ff3392ec402b1", - "reference": "af98b3a4ccac9364f2145fae974ff3392ec402b1", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/d7c88f08131f6404cb714f3f6cf0642f6afa3903", + "reference": "d7c88f08131f6404cb714f3f6cf0642f6afa3903", "shasum": "" }, "require": { @@ -527,19 +527,6 @@ "symfony/finder": "~2.7|~3.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], - "aliases": { - "Debugbar": "Barryvdh\\Debugbar\\Facade" - } - } - }, "autoload": { "psr-4": { "Barryvdh\\Debugbar\\": "src/" @@ -566,20 +553,20 @@ "profiler", "webprofiler" ], - "time": "2017-06-14 07:44:44" + "time": "2017-07-21 11:56:48" }, { "name": "barryvdh/laravel-ide-helper", - "version": "v2.4.0", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "87a02ff574f722c685e011f76692ab869ab64f6c" + "reference": "2b1273c45e2f8df7a625563e2283a17c14f02ae8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/87a02ff574f722c685e011f76692ab869ab64f6c", - "reference": "87a02ff574f722c685e011f76692ab869ab64f6c", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/2b1273c45e2f8df7a625563e2283a17c14f02ae8", + "reference": "2b1273c45e2f8df7a625563e2283a17c14f02ae8", "shasum": "" }, "require": { @@ -639,7 +626,7 @@ "phpstorm", "sublime" ], - "time": "2017-06-16 14:08:59" + "time": "2017-07-16 00:24:12" }, { "name": "barryvdh/reflection-docblock", @@ -692,16 +679,16 @@ }, { "name": "braintree/braintree_php", - "version": "3.23.1", + "version": "3.24.0", "source": { "type": "git", "url": "https://github.com/braintree/braintree_php.git", - "reference": "8a66302c0ae9d4be120f8c4e02603027f2067196" + "reference": "c0e856104f95a75c08db4af5b5ace8fe0e80e573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/braintree/braintree_php/zipball/8a66302c0ae9d4be120f8c4e02603027f2067196", - "reference": "8a66302c0ae9d4be120f8c4e02603027f2067196", + "url": "https://api.github.com/repos/braintree/braintree_php/zipball/c0e856104f95a75c08db4af5b5ace8fe0e80e573", + "reference": "c0e856104f95a75c08db4af5b5ace8fe0e80e573", "shasum": "" }, "require": { @@ -735,7 +722,7 @@ } ], "description": "Braintree PHP Client Library", - "time": "2017-05-05 21:51:18" + "time": "2017-08-10 16:54:00" }, { "name": "cardgate/omnipay-cardgate", @@ -1440,6 +1427,92 @@ ], "time": "2016-11-17 13:32:25" }, + { + "name": "digitickets/omnipay-gocardlessv2", + "version": "dev-payment-fix", + "source": { + "type": "git", + "url": "https://github.com/hillelcoren/omnipay-gocardlessv2.git", + "reference": "4eb63d8591de9a3da610c74480a7344617791235" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hillelcoren/omnipay-gocardlessv2/zipball/4eb63d8591de9a3da610c74480a7344617791235", + "reference": "4eb63d8591de9a3da610c74480a7344617791235", + "shasum": "" + }, + "require": { + "gocardless/gocardless-pro": "^1", + "omnipay/common": "~2.0", + "php": "^5.5|^7" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "omnipay/tests": "~2.0", + "satooshi/php-coveralls": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Omnipay\\GoCardlessV2\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Omnipay\\GoCardlessV2Tests\\": "tests/" + } + }, + "scripts": { + "run-sa": [ + "vendor/bin/phpstan analyse --ansi --no-progress -c phpstan.neon -l 4 src tests" + ], + "run-fixer": [ + "vendor/bin/php-cs-fixer fix" + ], + "run-tests": [ + "vendor/bin/phpunit" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Digitickets Contributors", + "homepage": "https://github.com/digitickets/omnipay-gocardlessv2/contributors" + }, + { + "name": "Kayla Daniels", + "email": "kayladnls@gmail.com", + "role": "Original Developer of Base Package" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com", + "role": "Original Developer of Base Package" + }, + { + "name": "Omnipay Contributors", + "homepage": "https://github.com/thephpleague/omnipay-braintree/contributors", + "role": "Original Base Package" + } + ], + "description": "GoCardless gateway for Omnipay payment processing library, using the v2 GoCardless API", + "homepage": "https://github.com/digitickets/omnipay-gocardlessv2", + "keywords": [ + "gateway", + "gocardless", + "merchant", + "omnipay", + "pay", + "payment", + "purchase" + ], + "support": { + "source": "https://github.com/hillelcoren/omnipay-gocardlessv2/tree/payment-fix" + }, + "time": "2017-09-07 10:13:36" + }, { "name": "digitickets/omnipay-realex", "version": "5.0.0", @@ -1641,16 +1714,16 @@ }, { "name": "doctrine/cache", - "version": "v1.6.1", + "version": "v1.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" + "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b", + "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b", "shasum": "" }, "require": { @@ -1707,7 +1780,7 @@ "cache", "caching" ], - "time": "2016-10-29 11:16:17" + "time": "2017-07-22 12:49:21" }, { "name": "doctrine/collections", @@ -1778,16 +1851,16 @@ }, { "name": "doctrine/common", - "version": "v2.7.2", + "version": "v2.7.3", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "930297026c8009a567ac051fd545bf6124150347" + "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/930297026c8009a567ac051fd545bf6124150347", - "reference": "930297026c8009a567ac051fd545bf6124150347", + "url": "https://api.github.com/repos/doctrine/common/zipball/4acb8f89626baafede6ee5475bc5844096eba8a9", + "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9", "shasum": "" }, "require": { @@ -1847,20 +1920,20 @@ "persistence", "spl" ], - "time": "2017-01-13 14:02:13" + "time": "2017-07-22 08:35:12" }, { "name": "doctrine/dbal", - "version": "v2.5.12", + "version": "v2.5.13", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44" + "reference": "729340d8d1eec8f01bff708e12e449a3415af873" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/7b9e911f9d8b30d43b96853dab26898c710d8f44", - "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873", + "reference": "729340d8d1eec8f01bff708e12e449a3415af873", "shasum": "" }, "require": { @@ -1918,37 +1991,37 @@ "persistence", "queryobject" ], - "time": "2017-02-08 12:53:47" + "time": "2017-07-22 20:44:48" }, { "name": "doctrine/inflector", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", + "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -1985,7 +2058,7 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2017-07-22 12:18:28" }, { "name": "doctrine/lexer", @@ -2147,21 +2220,24 @@ }, { "name": "firebase/php-jwt", - "version": "v4.0.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "dccf163dc8ed7ed6a00afc06c51ee5186a428d35" + "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/dccf163dc8ed7ed6a00afc06c51ee5186a428d35", - "reference": "dccf163dc8ed7ed6a00afc06c51ee5186a428d35", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/9984a4d3a32ae7673d6971ea00bae9d0a1abba0e", + "reference": "9984a4d3a32ae7673d6971ea00bae9d0a1abba0e", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": " 4.8.35" + }, "type": "library", "autoload": { "psr-4": { @@ -2186,7 +2262,7 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", - "time": "2016-07-18 04:51:16" + "time": "2017-06-27 22:17:23" }, { "name": "fotografde/omnipay-checkoutcom", @@ -2299,29 +2375,31 @@ }, { "name": "fzaninotto/faker", - "version": "v1.6.0", + "version": "v1.7.1", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" + "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", - "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", + "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", "shasum": "" }, "require": { - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { "ext-intl": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" + "phpunit/phpunit": "^4.0 || ^5.0", + "squizlabs/php_codesniffer": "^1.5" }, "type": "library", "extra": { - "branch-alias": [] + "branch-alias": { + "dev-master": "1.8-dev" + } }, "autoload": { "psr-4": { @@ -2343,7 +2421,7 @@ "faker", "fixtures" ], - "time": "2016-04-29 12:21:54" + "time": "2017-08-15 16:48:10" }, { "name": "gatepay/FedACHdir", @@ -2362,6 +2440,58 @@ "type": "library", "time": "2016-10-12 12:00:38" }, + { + "name": "gocardless/gocardless-pro", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/gocardless/gocardless-pro-php.git", + "reference": "48ae4c194e4735007de58b67176a9cb6548e83d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/gocardless/gocardless-pro-php/zipball/48ae4c194e4735007de58b67176a9cb6548e83d5", + "reference": "48ae4c194e4735007de58b67176a9cb6548e83d5", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5" + }, + "require-dev": { + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "4.6.*", + "satooshi/php-coveralls": "~0.6.1", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "GoCardlessPro\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "GoCardless and contributors", + "homepage": "https://github.com/gocardless/gocardless-pro-php/contributors" + } + ], + "description": "GoCardless Pro PHP Client Library", + "homepage": "https://gocardless.com/", + "keywords": [ + "api", + "direct debit", + "gocardless" + ], + "time": "2017-05-19 13:01:53" + }, { "name": "google/apiclient", "version": "v2.2.0", @@ -2423,16 +2553,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.14", + "version": "v0.20", "source": { "type": "git", "url": "https://github.com/google/google-api-php-client-services.git", - "reference": "b8c3ee8adab9eaffc3825cabc12740ad6e2ed76f" + "reference": "c1a6e6ac716c6563ca6c240120cde69fde49af4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/b8c3ee8adab9eaffc3825cabc12740ad6e2ed76f", - "reference": "b8c3ee8adab9eaffc3825cabc12740ad6e2ed76f", + "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/c1a6e6ac716c6563ca6c240120cde69fde49af4f", + "reference": "c1a6e6ac716c6563ca6c240120cde69fde49af4f", "shasum": "" }, "require": { @@ -2456,24 +2586,24 @@ "keywords": [ "google" ], - "time": "2017-07-10 00:18:15" + "time": "2017-08-20 00:20:36" }, { "name": "google/auth", - "version": "v1.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/google/google-auth-library-php.git", - "reference": "db77bd2de0bcc40bf50ebe851e9eed332aeaa4df" + "reference": "db8e3022a308cb0e988026d38e67b91a42b41622" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/db77bd2de0bcc40bf50ebe851e9eed332aeaa4df", - "reference": "db77bd2de0bcc40bf50ebe851e9eed332aeaa4df", + "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/db8e3022a308cb0e988026d38e67b91a42b41622", + "reference": "db8e3022a308cb0e988026d38e67b91a42b41622", "shasum": "" }, "require": { - "firebase/php-jwt": "~2.0|~3.0|~4.0", + "firebase/php-jwt": "~2.0|~3.0|~4.0|~5.0", "guzzlehttp/guzzle": "~5.3.1|~6.0", "guzzlehttp/psr7": "~1.2", "php": ">=5.4", @@ -2504,24 +2634,24 @@ "google", "oauth2" ], - "time": "2017-06-13 18:00:07" + "time": "2017-07-31 16:34:40" }, { "name": "google/cloud", - "version": "v0.34.1", + "version": "v0.36.0", "source": { "type": "git", "url": "https://github.com/GoogleCloudPlatform/google-cloud-php.git", - "reference": "a2a9ef78a359f2a40e09118c09113e4710f8bbd0" + "reference": "eebf5291ab903647c7e8422f1b2361355db66b59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/zipball/a2a9ef78a359f2a40e09118c09113e4710f8bbd0", - "reference": "a2a9ef78a359f2a40e09118c09113e4710f8bbd0", + "url": "https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/zipball/eebf5291ab903647c7e8422f1b2361355db66b59", + "reference": "eebf5291ab903647c7e8422f1b2361355db66b59", "shasum": "" }, "require": { - "google/auth": "^1.0", + "google/auth": "~0.9|^1.0", "guzzlehttp/guzzle": "^5.3|^6.0", "guzzlehttp/psr7": "^1.2", "monolog/monolog": "~1", @@ -2531,18 +2661,18 @@ "rize/uri-template": "~0.3" }, "replace": { - "google/cloud-bigquery": "0.2.1", - "google/cloud-core": "1.6.0", + "google/cloud-bigquery": "0.2.2", + "google/cloud-core": "1.8.0", "google/cloud-datastore": "1.0.0", "google/cloud-error-reporting": "0.4.1", "google/cloud-language": "0.4.0", - "google/cloud-logging": "1.3.0", + "google/cloud-logging": "1.3.1", "google/cloud-monitoring": "0.4.1", - "google/cloud-pubsub": "0.6.0", - "google/cloud-spanner": "0.3.1", - "google/cloud-speech": "0.6.0", + "google/cloud-pubsub": "0.6.1", + "google/cloud-spanner": "0.4.0", + "google/cloud-speech": "0.6.1", "google/cloud-storage": "1.1.3", - "google/cloud-trace": "0.3.0", + "google/cloud-trace": "0.3.1", "google/cloud-translate": "1.0.0", "google/cloud-videointelligence": "0.3.1", "google/cloud-vision": "0.4.0" @@ -2562,9 +2692,8 @@ }, "suggest": { "google/gax": "Required to support gRPC", - "google/proto-client-php": "Required to support gRPC", - "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2.", - "symfony/lock": "Required for the Spanner cached based session pool. Please require the following commit: 3.3.x-dev#1ba6ac9" + "google/proto-client": "Required to support gRPC", + "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2." }, "bin": [ "src/Core/bin/google-cloud-batch" @@ -2624,7 +2753,7 @@ "translation", "vision" ], - "time": "2017-07-12 18:33:11" + "time": "2017-08-02 20:02:30" }, { "name": "guzzle/guzzle", @@ -3247,16 +3376,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.50", + "version": "v1.2.51", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "c9638a5d7d6fc4ecfb35f32a9cc6d05bc4f5a914" + "reference": "be9074b1206ba7b5ac5662f900295edc088a9da8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/c9638a5d7d6fc4ecfb35f32a9cc6d05bc4f5a914", - "reference": "c9638a5d7d6fc4ecfb35f32a9cc6d05bc4f5a914", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/be9074b1206ba7b5ac5662f900295edc088a9da8", + "reference": "be9074b1206ba7b5ac5662f900295edc088a9da8", "shasum": "" }, "require": { @@ -3292,7 +3421,7 @@ "crawlerdetect", "php crawler detect" ], - "time": "2017-07-03 20:56:40" + "time": "2017-08-07 18:48:00" }, { "name": "jaybizzle/laravel-crawler-detect", @@ -3903,16 +4032,16 @@ }, { "name": "league/flysystem", - "version": "1.0.40", + "version": "1.0.41", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "3828f0b24e2c1918bb362d57a53205d6dc8fde61" + "reference": "f400aa98912c561ba625ea4065031b7a41e5a155" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3828f0b24e2c1918bb362d57a53205d6dc8fde61", - "reference": "3828f0b24e2c1918bb362d57a53205d6dc8fde61", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f400aa98912c561ba625ea4065031b7a41e5a155", + "reference": "f400aa98912c561ba625ea4065031b7a41e5a155", "shasum": "" }, "require": { @@ -3933,13 +4062,13 @@ "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-copy": "Allows you to use Copy.com storage", "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", "league/flysystem-webdav": "Allows you to use WebDAV storage", "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage" + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" }, "type": "library", "extra": { @@ -3982,7 +4111,7 @@ "sftp", "storage" ], - "time": "2017-04-28 10:15:08" + "time": "2017-08-06 17:41:04" }, { "name": "league/flysystem-aws-s3-v3", @@ -4310,16 +4439,16 @@ }, { "name": "maatwebsite/excel", - "version": "2.1.19", + "version": "2.1.20", "source": { "type": "git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "f4535ac21968f6086438e098cdf289b350aa993c" + "reference": "a8baf7de1030d261318f90fa5c273a47ef616b59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/f4535ac21968f6086438e098cdf289b350aa993c", - "reference": "f4535ac21968f6086438e098cdf289b350aa993c", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/a8baf7de1030d261318f90fa5c273a47ef616b59", + "reference": "a8baf7de1030d261318f90fa5c273a47ef616b59", "shasum": "" }, "require": { @@ -4335,7 +4464,7 @@ }, "require-dev": { "mockery/mockery": "~0.9", - "orchestra/testbench": "3.1.*", + "orchestra/testbench": "3.1.*|3.2.*|3.3.*|3.4.*|3.5.*", "phpseclib/phpseclib": "~1.0", "phpunit/phpunit": "~4.0" }, @@ -4384,7 +4513,7 @@ "import", "laravel" ], - "time": "2017-07-02 07:00:56" + "time": "2017-07-26 18:04:04" }, { "name": "maximebf/debugbar", @@ -4979,16 +5108,16 @@ }, { "name": "nwidart/laravel-modules", - "version": "1.26.0", + "version": "1.27.1", "source": { "type": "git", "url": "https://github.com/nWidart/laravel-modules.git", - "reference": "d819c4ace5e5a6b0c168d88170d20e90b958667a" + "reference": "ca3a1b5bbd22d5e91c413fbf6a29e6ad18f58961" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/d819c4ace5e5a6b0c168d88170d20e90b958667a", - "reference": "d819c4ace5e5a6b0c168d88170d20e90b958667a", + "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/ca3a1b5bbd22d5e91c413fbf6a29e6ad18f58961", + "reference": "ca3a1b5bbd22d5e91c413fbf6a29e6ad18f58961", "shasum": "" }, "require": { @@ -4996,10 +5125,10 @@ "php": ">=5.5" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^1.11", + "friendsofphp/php-cs-fixer": "^2.4", "mockery/mockery": "~0.9", "orchestra/testbench": "^3.1|^3.2|^3.3|^3.4", - "phpro/grumphp": "^0.9.1", + "phpro/grumphp": "^0.11", "phpunit/phpunit": "~5.7" }, "type": "library", @@ -5041,7 +5170,7 @@ "nwidart", "rad" ], - "time": "2017-07-06 19:33:38" + "time": "2017-07-31 09:06:50" }, { "name": "omnipay/2checkout", @@ -6258,16 +6387,16 @@ }, { "name": "omnipay/payfast", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/thephpleague/omnipay-payfast.git", - "reference": "f352e89e5901756e861ddcadaed9b8693aaaa239" + "reference": "21741c7197509bfc295c0b9a944fcd7c1b3a0633" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-payfast/zipball/f352e89e5901756e861ddcadaed9b8693aaaa239", - "reference": "f352e89e5901756e861ddcadaed9b8693aaaa239", + "url": "https://api.github.com/repos/thephpleague/omnipay-payfast/zipball/21741c7197509bfc295c0b9a944fcd7c1b3a0633", + "reference": "21741c7197509bfc295c0b9a944fcd7c1b3a0633", "shasum": "" }, "require": { @@ -6311,7 +6440,7 @@ "payfast", "payment" ], - "time": "2014-09-29 01:07:03" + "time": "2017-08-15 07:52:52" }, { "name": "omnipay/payflow", @@ -6670,12 +6799,12 @@ "source": { "type": "git", "url": "https://github.com/thephpleague/omnipay-stripe.git", - "reference": "f5d5ef91f420d7f0bc83692cde7bb4474043c454" + "reference": "26a33414a75939af75064022112005d5e51fc9ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-stripe/zipball/f5d5ef91f420d7f0bc83692cde7bb4474043c454", - "reference": "f5d5ef91f420d7f0bc83692cde7bb4474043c454", + "url": "https://api.github.com/repos/thephpleague/omnipay-stripe/zipball/26a33414a75939af75064022112005d5e51fc9ea", + "reference": "26a33414a75939af75064022112005d5e51fc9ea", "shasum": "" }, "require": { @@ -6719,7 +6848,7 @@ "payment", "stripe" ], - "time": "2017-07-01 03:24:42" + "time": "2017-07-14 09:22:01" }, { "name": "omnipay/targetpay", @@ -7464,16 +7593,16 @@ }, { "name": "ramsey/uuid", - "version": "3.6.1", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e" + "reference": "0ef23d1b10cf1bc576e9d865a7e9c47982c5715e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", - "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/0ef23d1b10cf1bc576e9d865a7e9c47982c5715e", + "reference": "0ef23d1b10cf1bc576e9d865a7e9c47982c5715e", "shasum": "" }, "require": { @@ -7542,7 +7671,7 @@ "identifier", "uuid" ], - "time": "2017-03-26 20:37:53" + "time": "2017-08-04 13:39:04" }, { "name": "rize/uri-template", @@ -7643,17 +7772,17 @@ "source": { "type": "git", "url": "https://github.com/simshaun/recurr.git", - "reference": "7a6480d1b64bb31de4d63d680cfecea27659a201" + "reference": "7d0e8942cb1d00d4bc11d5eb87fa990d77b0de61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simshaun/recurr/zipball/7a6480d1b64bb31de4d63d680cfecea27659a201", - "reference": "7a6480d1b64bb31de4d63d680cfecea27659a201", + "url": "https://api.github.com/repos/simshaun/recurr/zipball/7d0e8942cb1d00d4bc11d5eb87fa990d77b0de61", + "reference": "7d0e8942cb1d00d4bc11d5eb87fa990d77b0de61", "shasum": "" }, "require": { "doctrine/collections": "~1.3", - "php": ">=5.3.0" + "php": ">=5.5.0" }, "require-dev": { "phpunit/phpunit": "~4.5" @@ -7689,7 +7818,7 @@ "recurring", "rrule" ], - "time": "2017-05-05 22:06:58" + "time": "2017-08-03 23:25:58" }, { "name": "softcommerce/omnipay-paytrace", @@ -7799,7 +7928,7 @@ }, { "name": "symfony/class-loader", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", @@ -7855,7 +7984,7 @@ }, { "name": "symfony/config", - "version": "v3.2.11", + "version": "v3.2.13", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -7971,7 +8100,7 @@ }, { "name": "symfony/css-selector", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -8081,16 +8210,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v3.2.11", + "version": "v3.2.13", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "dcec2b3ae52a6fe92154321682b01028deea6406" + "reference": "d9f2e62e1a93d52ad4e4f6faaf66f6eef723d761" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/dcec2b3ae52a6fe92154321682b01028deea6406", - "reference": "dcec2b3ae52a6fe92154321682b01028deea6406", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d9f2e62e1a93d52ad4e4f6faaf66f6eef723d761", + "reference": "d9f2e62e1a93d52ad4e4f6faaf66f6eef723d761", "shasum": "" }, "require": { @@ -8140,7 +8269,7 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2017-06-03 15:50:21" + "time": "2017-07-28 15:22:55" }, { "name": "symfony/event-dispatcher", @@ -8204,16 +8333,16 @@ }, { "name": "symfony/filesystem", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "311fa718389efbd8b627c272b9324a62437018cc" + "reference": "427987eb4eed764c3b6e38d52a0f87989e010676" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/311fa718389efbd8b627c272b9324a62437018cc", - "reference": "311fa718389efbd8b627c272b9324a62437018cc", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/427987eb4eed764c3b6e38d52a0f87989e010676", + "reference": "427987eb4eed764c3b6e38d52a0f87989e010676", "shasum": "" }, "require": { @@ -8249,7 +8378,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-06-24 09:29:48" + "time": "2017-07-11 07:17:58" }, { "name": "symfony/finder", @@ -8439,7 +8568,7 @@ }, { "name": "symfony/options-resolver", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -8493,16 +8622,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", "shasum": "" }, "require": { @@ -8514,7 +8643,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -8548,20 +8677,20 @@ "portable", "shim" ], - "time": "2017-06-09 14:24:12" + "time": "2017-06-14 15:44:48" }, { "name": "symfony/polyfill-php54", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "7dd1a8b9f0442273fdfeb1c4f5eaff6890a82789" + "reference": "b7763422a5334c914ef0298ed21b253d25913a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/7dd1a8b9f0442273fdfeb1c4f5eaff6890a82789", - "reference": "7dd1a8b9f0442273fdfeb1c4f5eaff6890a82789", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/b7763422a5334c914ef0298ed21b253d25913a6e", + "reference": "b7763422a5334c914ef0298ed21b253d25913a6e", "shasum": "" }, "require": { @@ -8570,7 +8699,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -8606,20 +8735,20 @@ "portable", "shim" ], - "time": "2017-06-09 08:25:21" + "time": "2017-06-14 15:44:48" }, { "name": "symfony/polyfill-php55", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "94566239a7720cde0820f15f0cc348ddb51ba51d" + "reference": "29b1381d66f16e0581aab0b9f678ccf073288f68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/94566239a7720cde0820f15f0cc348ddb51ba51d", - "reference": "94566239a7720cde0820f15f0cc348ddb51ba51d", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/29b1381d66f16e0581aab0b9f678ccf073288f68", + "reference": "29b1381d66f16e0581aab0b9f678ccf073288f68", "shasum": "" }, "require": { @@ -8629,7 +8758,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -8662,20 +8791,20 @@ "portable", "shim" ], - "time": "2017-06-09 08:25:21" + "time": "2017-06-14 15:44:48" }, { "name": "symfony/polyfill-php56", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929" + "reference": "e85ebdef569b84e8709864e1a290c40f156b30ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/bc0b7d6cb36b10cfabb170a3e359944a95174929", - "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/e85ebdef569b84e8709864e1a290c40f156b30ca", + "reference": "e85ebdef569b84e8709864e1a290c40f156b30ca", "shasum": "" }, "require": { @@ -8685,7 +8814,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -8718,20 +8847,20 @@ "portable", "shim" ], - "time": "2017-06-09 08:25:21" + "time": "2017-06-14 15:44:48" }, { "name": "symfony/polyfill-util", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d" + "reference": "67925d1cf0b84bd234a83bebf26d4eb281744c6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", - "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/67925d1cf0b84bd234a83bebf26d4eb281744c6d", + "reference": "67925d1cf0b84bd234a83bebf26d4eb281744c6d", "shasum": "" }, "require": { @@ -8740,7 +8869,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -8770,7 +8899,7 @@ "polyfill", "shim" ], - "time": "2017-06-09 08:25:21" + "time": "2017-07-05 15:09:33" }, { "name": "symfony/process", @@ -9025,16 +9154,16 @@ }, { "name": "symfony/yaml", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "1f93a8d19b8241617f5074a123e282575b821df8" + "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8", - "reference": "1f93a8d19b8241617f5074a123e282575b821df8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", "shasum": "" }, "require": { @@ -9076,7 +9205,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-06-15 12:58:50" + "time": "2017-07-23 12:43:26" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -10002,16 +10131,16 @@ }, { "name": "zendframework/zend-validator", - "version": "2.9.1", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-validator.git", - "reference": "c9a8160a0191e34bb98ac1ecd4e453391c424bb3" + "reference": "07ef29e31353592e99eb32b2feb7248681ffb630" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/c9a8160a0191e34bb98ac1ecd4e453391c424bb3", - "reference": "c9a8160a0191e34bb98ac1ecd4e453391c424bb3", + "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/07ef29e31353592e99eb32b2feb7248681ffb630", + "reference": "07ef29e31353592e99eb32b2feb7248681ffb630", "shasum": "" }, "require": { @@ -10030,7 +10159,7 @@ "zendframework/zend-i18n": "^2.6", "zendframework/zend-math": "^2.6", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", - "zendframework/zend-session": "^2.6.2", + "zendframework/zend-session": "^2.8", "zendframework/zend-uri": "^2.5" }, "suggest": { @@ -10040,14 +10169,14 @@ "zendframework/zend-i18n-resources": "Translations of validator messages", "zendframework/zend-math": "Zend\\Math component, required by the Csrf validator", "zendframework/zend-servicemanager": "Zend\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "zendframework/zend-session": "Zend\\Session component, required by the Csrf validator", + "zendframework/zend-session": "Zend\\Session component, ^2.8; required by the Csrf validator", "zendframework/zend-uri": "Zend\\Uri component, required by the Uri and Sitemap\\Loc validators" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.9-dev", - "dev-develop": "2.10-dev" + "dev-master": "2.10-dev", + "dev-develop": "2.11-dev" }, "zf": { "component": "Zend\\Validator", @@ -10069,7 +10198,7 @@ "validator", "zf2" ], - "time": "2017-05-17 22:06:13" + "time": "2017-08-14 20:36:46" }, { "name": "zendframework/zendservice-apple-apns", @@ -10160,16 +10289,16 @@ }, { "name": "zircote/swagger-php", - "version": "2.0.10", + "version": "2.0.11", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "68e25262d95b9f70f145b488f49be0d6cc73302b" + "reference": "d010ab67536784f8b578cb4ba7d15c906f3e1a45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/68e25262d95b9f70f145b488f49be0d6cc73302b", - "reference": "68e25262d95b9f70f145b488f49be0d6cc73302b", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/d010ab67536784f8b578cb4ba7d15c906f3e1a45", + "reference": "d010ab67536784f8b578cb4ba7d15c906f3e1a45", "shasum": "" }, "require": { @@ -10218,7 +10347,7 @@ "rest", "service discovery" ], - "time": "2017-05-12 22:02:20" + "time": "2017-08-16 08:32:59" } ], "packages-dev": [ @@ -10582,22 +10711,22 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "3.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157", + "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157", "shasum": "" }, "require": { "php": ">=5.5", "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "phpdocumentor/type-resolver": "^0.3.0", "webmozart/assert": "^1.0" }, "require-dev": { @@ -10623,24 +10752,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2017-08-08 06:39:58" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2.1", + "version": "0.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773", + "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -10670,7 +10799,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2017-06-03 08:32:36" }, { "name": "phpspec/php-diff", @@ -10708,16 +10837,16 @@ }, { "name": "phpspec/phpspec", - "version": "2.5.7", + "version": "2.5.8", "source": { "type": "git", "url": "https://github.com/phpspec/phpspec.git", - "reference": "a1dd5db803e75591c0e3cc1a054f7942133b4d05" + "reference": "d8a153dcb52f929b448c0bf2cc19c7388951adb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/phpspec/zipball/a1dd5db803e75591c0e3cc1a054f7942133b4d05", - "reference": "a1dd5db803e75591c0e3cc1a054f7942133b4d05", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/d8a153dcb52f929b448c0bf2cc19c7388951adb1", + "reference": "d8a153dcb52f929b448c0bf2cc19c7388951adb1", "shasum": "" }, "require": { @@ -10734,7 +10863,7 @@ "symfony/yaml": "~2.1|~3.0" }, "require-dev": { - "behat/behat": "^3.0.11", + "behat/behat": "^3.0.11,!=3.3.1", "ciaranmcnulty/versionbasedtestskipper": "^0.2.1", "phpunit/phpunit": "~4.4", "symfony/filesystem": "~2.1|~3.0" @@ -10782,7 +10911,7 @@ "testing", "tests" ], - "time": "2017-05-12 06:09:08" + "time": "2017-07-29 17:19:38" }, { "name": "phpspec/prophecy", @@ -11642,16 +11771,16 @@ }, { "name": "symfony/browser-kit", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "3a4435e79a8401746e8525e98039199d0924b4e5" + "reference": "8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/3a4435e79a8401746e8525e98039199d0924b4e5", - "reference": "3a4435e79a8401746e8525e98039199d0924b4e5", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0", + "reference": "8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0", "shasum": "" }, "require": { @@ -11695,11 +11824,11 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-06-24 09:29:48" + "time": "2017-07-12 13:03:20" }, { "name": "symfony/dom-crawler", - "version": "v3.3.4", + "version": "v3.3.6", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -11816,6 +11945,7 @@ "delatbabel/omnipay-fatzebra": 20, "dercoder/omnipay-paysafecard": 20, "descubraomundo/omnipay-pagarme": 20, + "digitickets/omnipay-gocardlessv2": 20, "dioscouri/omnipay-cybersource": 20, "gatepay/fedachdir": 20, "incube8/omnipay-multicards": 20, diff --git a/config/ninja.php b/config/ninja.php new file mode 100644 index 000000000000..3b428f9f3724 --- /dev/null +++ b/config/ninja.php @@ -0,0 +1,10 @@ + env('COUPON_50_OFF', false), + 'coupon_75_off' => env('COUPON_75_OFF', false), + 'coupon_free_year' => env('COUPON_FREE_YEAR', false), + +]; diff --git a/database/migrations/2017_08_14_085334_increase_precision.php b/database/migrations/2017_08_14_085334_increase_precision.php new file mode 100644 index 000000000000..717ac1608222 --- /dev/null +++ b/database/migrations/2017_08_14_085334_increase_precision.php @@ -0,0 +1,42 @@ +decimal('cost', 15, 4)->change(); + $table->decimal('qty', 15, 4)->change(); + }); + + Schema::table('invoice_items', function ($table) { + $table->decimal('cost', 15, 4)->change(); + $table->decimal('qty', 15, 4)->change(); + }); + + Schema::table('clients', function ($table) { + $table->integer('credit_number_counter')->default(1)->nullable(); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('clients', function ($table) { + $table->dropColumn('credit_number_counter'); + }); + } +} diff --git a/database/seeds/GatewayTypesSeeder.php b/database/seeds/GatewayTypesSeeder.php index f339ff4f8521..6ec180a9001f 100644 --- a/database/seeds/GatewayTypesSeeder.php +++ b/database/seeds/GatewayTypesSeeder.php @@ -15,6 +15,8 @@ class GatewayTypesSeeder extends Seeder ['alias' => 'bitcoin', 'name' => 'Bitcoin'], ['alias' => 'dwolla', 'name' => 'Dwolla'], ['alias' => 'custom', 'name' => 'Custom'], + ['alias' => 'alipay', 'name' => 'Alipay'], + ['alias' => 'sofort', 'name' => 'Sofort'], ]; foreach ($gateway_types as $gateway_type) { diff --git a/database/seeds/LanguageSeeder.php b/database/seeds/LanguageSeeder.php index dc8cf64913ba..955b75a9ea1f 100644 --- a/database/seeds/LanguageSeeder.php +++ b/database/seeds/LanguageSeeder.php @@ -37,6 +37,7 @@ class LanguageSeeder extends Seeder ['name' => 'Finnish', 'locale' => 'fi'], ['name' => 'Romanian', 'locale' => 'ro'], ['name' => 'Turkish - Turkey', 'locale' => 'tr_TR'], + ['name' => 'Thai', 'locale' => 'th'], ]; foreach ($languages as $language) { diff --git a/database/seeds/PaymentLibrariesSeeder.php b/database/seeds/PaymentLibrariesSeeder.php index d57be08e2fa4..664c9bb4d998 100644 --- a/database/seeds/PaymentLibrariesSeeder.php +++ b/database/seeds/PaymentLibrariesSeeder.php @@ -14,7 +14,7 @@ class PaymentLibrariesSeeder extends Seeder ['name' => 'CardSave', 'provider' => 'CardSave'], ['name' => 'Eway Rapid', 'provider' => 'Eway_RapidShared', 'is_offsite' => true], ['name' => 'FirstData Connect', 'provider' => 'FirstData_Connect'], - ['name' => 'GoCardless', 'provider' => 'GoCardless', 'is_offsite' => true], + ['name' => 'GoCardless', 'provider' => 'GoCardless', 'is_offsite' => true, 'payment_library_id' => 2], ['name' => 'Migs ThreeParty', 'provider' => 'Migs_ThreeParty'], ['name' => 'Migs TwoParty', 'provider' => 'Migs_TwoParty'], ['name' => 'Mollie', 'provider' => 'Mollie', 'is_offsite' => true, 'sort_order' => 7], @@ -70,12 +70,15 @@ class PaymentLibrariesSeeder extends Seeder ['name' => 'WeChat Express', 'provider' => 'WeChat_Express', 'payment_library_id' => 2], ['name' => 'WePay', 'provider' => 'WePay', 'is_offsite' => false], ['name' => 'Braintree', 'provider' => 'Braintree', 'sort_order' => 2], - ['name' => 'Custom', 'provider' => 'Custom', 'is_offsite' => true, 'sort_order' => 8], + ['name' => 'Custom', 'provider' => 'Custom', 'is_offsite' => true, 'sort_order' => 9], ['name' => 'FirstData Payeezy', 'provider' => 'FirstData_Payeezy'], + ['name' => 'GoCardless', 'provider' => 'GoCardlessV2\Redirect', 'sort_order' => 8, 'is_offsite' => true], ]; foreach ($gateways as $gateway) { - $record = Gateway::where('name', '=', $gateway['name'])->first(); + $record = Gateway::whereName($gateway['name']) + ->whereProvider($gateway['provider']) + ->first(); if ($record) { $record->fill($gateway); $record->save(); diff --git a/database/seeds/PaymentTypesSeeder.php b/database/seeds/PaymentTypesSeeder.php index 395f9e96dff3..afd679f3f493 100644 --- a/database/seeds/PaymentTypesSeeder.php +++ b/database/seeds/PaymentTypesSeeder.php @@ -36,6 +36,8 @@ class PaymentTypesSeeder extends Seeder ['name' => 'Swish', 'gateway_type_id' => GATEWAY_TYPE_BANK_TRANSFER], ['name' => 'Venmo'], ['name' => 'Money Order'], + ['name' => 'Alipay', 'gateway_type_id' => GATEWAY_TYPE_ALIPAY], + ['name' => 'Sofort', 'gateway_type_id' => GATEWAY_TYPE_SOFORT], ]; foreach ($paymentTypes as $paymentType) { diff --git a/database/setup.sql b/database/setup.sql index aab7b116e445..be4a9f6d9908 100644 --- a/database/setup.sql +++ b/database/setup.sql @@ -624,6 +624,7 @@ CREATE TABLE `clients` ( `invoice_number_counter` int(11) DEFAULT '1', `quote_number_counter` int(11) DEFAULT '1', `public_notes` text COLLATE utf8_unicode_ci, + `credit_number_counter` int(11) DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `clients_account_id_public_id_unique` (`account_id`,`public_id`), KEY `clients_user_id_foreign` (`user_id`), @@ -1186,7 +1187,7 @@ CREATE TABLE `gateway_types` ( `alias` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1195,7 +1196,7 @@ CREATE TABLE `gateway_types` ( LOCK TABLES `gateway_types` WRITE; /*!40000 ALTER TABLE `gateway_types` DISABLE KEYS */; -INSERT INTO `gateway_types` VALUES (1,'credit_card','Credit Card'),(2,'bank_transfer','Bank Transfer'),(3,'paypal','PayPal'),(4,'bitcoin','Bitcoin'),(5,'dwolla','Dwolla'),(6,'custom','Custom'); +INSERT INTO `gateway_types` VALUES (1,'credit_card','Credit Card'),(2,'bank_transfer','Bank Transfer'),(3,'paypal','PayPal'),(4,'bitcoin','Bitcoin'),(5,'dwolla','Dwolla'),(6,'custom','Custom'),(7,'alipay','Alipay'),(8,'sofort','Sofort'); /*!40000 ALTER TABLE `gateway_types` ENABLE KEYS */; UNLOCK TABLES; @@ -1222,7 +1223,7 @@ CREATE TABLE `gateways` ( PRIMARY KEY (`id`), KEY `gateways_payment_library_id_foreign` (`payment_library_id`), CONSTRAINT `gateways_payment_library_id_foreign` FOREIGN KEY (`payment_library_id`) REFERENCES `payment_libraries` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1231,7 +1232,7 @@ CREATE TABLE `gateways` ( LOCK TABLES `gateways` WRITE; /*!40000 ALTER TABLE `gateways` DISABLE KEYS */; -INSERT INTO `gateways` VALUES (1,'2017-08-07 08:11:39','2017-08-07 08:11:39','Authorize.Net AIM','AuthorizeNet_AIM',1,1,4,0,NULL,0,0),(2,'2017-08-07 08:11:39','2017-08-07 08:11:39','Authorize.Net SIM','AuthorizeNet_SIM',1,2,10000,0,NULL,0,0),(3,'2017-08-07 08:11:39','2017-08-07 08:11:39','CardSave','CardSave',1,1,10000,0,NULL,0,0),(4,'2017-08-07 08:11:39','2017-08-07 08:11:39','Eway Rapid','Eway_RapidShared',1,1,10000,0,NULL,1,0),(5,'2017-08-07 08:11:39','2017-08-07 08:11:39','FirstData Connect','FirstData_Connect',1,1,10000,0,NULL,0,0),(6,'2017-08-07 08:11:39','2017-08-07 08:11:39','GoCardless','GoCardless',1,1,10000,0,NULL,1,0),(7,'2017-08-07 08:11:39','2017-08-07 08:11:39','Migs ThreeParty','Migs_ThreeParty',1,1,10000,0,NULL,0,0),(8,'2017-08-07 08:11:39','2017-08-07 08:11:39','Migs TwoParty','Migs_TwoParty',1,1,10000,0,NULL,0,0),(9,'2017-08-07 08:11:39','2017-08-07 08:11:39','Mollie','Mollie',1,1,7,0,NULL,1,0),(10,'2017-08-07 08:11:39','2017-08-07 08:11:39','MultiSafepay','MultiSafepay',1,1,10000,0,NULL,0,0),(11,'2017-08-07 08:11:39','2017-08-07 08:11:39','Netaxept','Netaxept',1,1,10000,0,NULL,0,0),(12,'2017-08-07 08:11:39','2017-08-07 08:11:39','NetBanx','NetBanx',1,1,10000,0,NULL,0,0),(13,'2017-08-07 08:11:39','2017-08-07 08:11:39','PayFast','PayFast',1,1,10000,0,NULL,1,0),(14,'2017-08-07 08:11:39','2017-08-07 08:11:39','Payflow Pro','Payflow_Pro',1,1,10000,0,NULL,0,0),(15,'2017-08-07 08:11:39','2017-08-07 08:11:39','PaymentExpress PxPay','PaymentExpress_PxPay',1,1,10000,0,NULL,0,0),(16,'2017-08-07 08:11:39','2017-08-07 08:11:39','PaymentExpress PxPost','PaymentExpress_PxPost',1,1,10000,0,NULL,0,0),(17,'2017-08-07 08:11:39','2017-08-07 08:11:39','PayPal Express','PayPal_Express',1,1,3,0,NULL,1,0),(18,'2017-08-07 08:11:39','2017-08-07 08:11:39','PayPal Pro','PayPal_Pro',1,1,10000,0,NULL,0,0),(19,'2017-08-07 08:11:39','2017-08-07 08:11:39','Pin','Pin',1,1,10000,0,NULL,0,0),(20,'2017-08-07 08:11:39','2017-08-07 08:11:39','SagePay Direct','SagePay_Direct',1,1,10000,0,NULL,0,0),(21,'2017-08-07 08:11:39','2017-08-07 08:11:39','SagePay Server','SagePay_Server',1,1,10000,0,NULL,0,0),(22,'2017-08-07 08:11:39','2017-08-07 08:11:39','SecurePay DirectPost','SecurePay_DirectPost',1,1,10000,0,NULL,0,0),(23,'2017-08-07 08:11:39','2017-08-07 08:11:39','Stripe','Stripe',1,1,1,0,NULL,0,0),(24,'2017-08-07 08:11:39','2017-08-07 08:11:39','TargetPay Direct eBanking','TargetPay_Directebanking',1,1,10000,0,NULL,0,0),(25,'2017-08-07 08:11:39','2017-08-07 08:11:39','TargetPay Ideal','TargetPay_Ideal',1,1,10000,0,NULL,0,0),(26,'2017-08-07 08:11:39','2017-08-07 08:11:39','TargetPay Mr Cash','TargetPay_Mrcash',1,1,10000,0,NULL,0,0),(27,'2017-08-07 08:11:39','2017-08-07 08:11:39','TwoCheckout','TwoCheckout',1,1,10000,0,NULL,1,0),(28,'2017-08-07 08:11:39','2017-08-07 08:11:39','WorldPay','WorldPay',1,1,10000,0,NULL,0,0),(29,'2017-08-07 08:11:39','2017-08-07 08:11:39','BeanStream','BeanStream',1,2,10000,0,NULL,0,0),(30,'2017-08-07 08:11:39','2017-08-07 08:11:39','Psigate','Psigate',1,2,10000,0,NULL,0,0),(31,'2017-08-07 08:11:39','2017-08-07 08:11:39','moolah','AuthorizeNet_AIM',1,1,10000,0,NULL,0,0),(32,'2017-08-07 08:11:39','2017-08-07 08:11:39','Alipay','Alipay_Express',1,1,10000,0,NULL,0,0),(33,'2017-08-07 08:11:39','2017-08-07 08:11:39','Buckaroo','Buckaroo_CreditCard',1,1,10000,0,NULL,0,0),(34,'2017-08-07 08:11:39','2017-08-07 08:11:39','Coinbase','Coinbase',1,1,10000,0,NULL,0,0),(35,'2017-08-07 08:11:39','2017-08-07 08:11:39','DataCash','DataCash',1,1,10000,0,NULL,0,0),(36,'2017-08-07 08:11:39','2017-08-07 08:11:39','Neteller','Neteller',1,2,10000,0,NULL,0,0),(37,'2017-08-07 08:11:39','2017-08-07 08:11:39','Pacnet','Pacnet',1,1,10000,0,NULL,0,0),(38,'2017-08-07 08:11:39','2017-08-07 08:11:39','PaymentSense','PaymentSense',1,2,10000,0,NULL,0,0),(39,'2017-08-07 08:11:39','2017-08-07 08:11:39','Realex','Realex_Remote',1,1,10000,0,NULL,0,0),(40,'2017-08-07 08:11:39','2017-08-07 08:11:39','Sisow','Sisow',1,1,10000,0,NULL,0,0),(41,'2017-08-07 08:11:39','2017-08-07 08:11:39','Skrill','Skrill',1,1,10000,0,NULL,1,0),(42,'2017-08-07 08:11:39','2017-08-07 08:11:39','BitPay','BitPay',1,1,6,0,NULL,1,0),(43,'2017-08-07 08:11:39','2017-08-07 08:11:39','Dwolla','Dwolla',1,1,5,0,NULL,1,0),(44,'2017-08-07 08:11:39','2017-08-07 08:11:39','AGMS','Agms',1,1,10000,0,NULL,0,0),(45,'2017-08-07 08:11:39','2017-08-07 08:11:39','Barclays','BarclaysEpdq\\Essential',1,1,10000,0,NULL,0,0),(46,'2017-08-07 08:11:39','2017-08-07 08:11:39','Cardgate','Cardgate',1,1,10000,0,NULL,0,0),(47,'2017-08-07 08:11:39','2017-08-07 08:11:39','Checkout.com','CheckoutCom',1,1,10000,0,NULL,0,0),(48,'2017-08-07 08:11:39','2017-08-07 08:11:39','Creditcall','Creditcall',1,1,10000,0,NULL,0,0),(49,'2017-08-07 08:11:39','2017-08-07 08:11:39','Cybersource','Cybersource',1,1,10000,0,NULL,0,0),(50,'2017-08-07 08:11:39','2017-08-07 08:11:39','ecoPayz','Ecopayz',1,1,10000,0,NULL,0,0),(51,'2017-08-07 08:11:39','2017-08-07 08:11:39','Fasapay','Fasapay',1,1,10000,0,NULL,0,0),(52,'2017-08-07 08:11:39','2017-08-07 08:11:39','Komoju','Komoju',1,1,10000,0,NULL,0,0),(53,'2017-08-07 08:11:39','2017-08-07 08:11:39','Multicards','Multicards',1,1,10000,0,NULL,0,0),(54,'2017-08-07 08:11:39','2017-08-07 08:11:39','Pagar.Me','Pagarme',1,2,10000,0,NULL,0,0),(55,'2017-08-07 08:11:39','2017-08-07 08:11:39','Paysafecard','Paysafecard',1,1,10000,0,NULL,0,0),(56,'2017-08-07 08:11:39','2017-08-07 08:11:39','Paytrace','Paytrace_CreditCard',1,1,10000,0,NULL,0,0),(57,'2017-08-07 08:11:39','2017-08-07 08:11:39','Secure Trading','SecureTrading',1,1,10000,0,NULL,0,0),(58,'2017-08-07 08:11:39','2017-08-07 08:11:39','SecPay','SecPay',1,1,10000,0,NULL,0,0),(59,'2017-08-07 08:11:39','2017-08-07 08:11:39','WeChat Express','WeChat_Express',1,2,10000,0,NULL,0,0),(60,'2017-08-07 08:11:39','2017-08-07 08:11:39','WePay','WePay',1,1,10000,0,NULL,0,0),(61,'2017-08-07 08:11:39','2017-08-07 08:11:39','Braintree','Braintree',1,1,2,0,NULL,0,0),(62,'2017-08-07 08:11:39','2017-08-07 08:11:39','Custom','Custom',1,1,8,0,NULL,1,0),(63,'2017-08-07 08:11:39','2017-08-07 08:11:39','FirstData Payeezy','FirstData_Payeezy',1,1,10000,0,NULL,0,0); +INSERT INTO `gateways` VALUES (1,'2017-09-10 03:46:49','2017-09-10 03:46:49','Authorize.Net AIM','AuthorizeNet_AIM',1,1,4,0,NULL,0,0),(2,'2017-09-10 03:46:49','2017-09-10 03:46:49','Authorize.Net SIM','AuthorizeNet_SIM',1,2,10000,0,NULL,0,0),(3,'2017-09-10 03:46:49','2017-09-10 03:46:49','CardSave','CardSave',1,1,10000,0,NULL,0,0),(4,'2017-09-10 03:46:49','2017-09-10 03:46:49','Eway Rapid','Eway_RapidShared',1,1,10000,0,NULL,1,0),(5,'2017-09-10 03:46:49','2017-09-10 03:46:49','FirstData Connect','FirstData_Connect',1,1,10000,0,NULL,0,0),(6,'2017-09-10 03:46:49','2017-09-10 03:46:49','GoCardless','GoCardless',1,2,10000,0,NULL,1,0),(7,'2017-09-10 03:46:49','2017-09-10 03:46:49','Migs ThreeParty','Migs_ThreeParty',1,1,10000,0,NULL,0,0),(8,'2017-09-10 03:46:49','2017-09-10 03:46:49','Migs TwoParty','Migs_TwoParty',1,1,10000,0,NULL,0,0),(9,'2017-09-10 03:46:49','2017-09-10 03:46:49','Mollie','Mollie',1,1,7,0,NULL,1,0),(10,'2017-09-10 03:46:49','2017-09-10 03:46:49','MultiSafepay','MultiSafepay',1,1,10000,0,NULL,0,0),(11,'2017-09-10 03:46:49','2017-09-10 03:46:49','Netaxept','Netaxept',1,1,10000,0,NULL,0,0),(12,'2017-09-10 03:46:49','2017-09-10 03:46:49','NetBanx','NetBanx',1,1,10000,0,NULL,0,0),(13,'2017-09-10 03:46:49','2017-09-10 03:46:49','PayFast','PayFast',1,1,10000,0,NULL,1,0),(14,'2017-09-10 03:46:49','2017-09-10 03:46:49','Payflow Pro','Payflow_Pro',1,1,10000,0,NULL,0,0),(15,'2017-09-10 03:46:49','2017-09-10 03:46:49','PaymentExpress PxPay','PaymentExpress_PxPay',1,1,10000,0,NULL,0,0),(16,'2017-09-10 03:46:49','2017-09-10 03:46:49','PaymentExpress PxPost','PaymentExpress_PxPost',1,1,10000,0,NULL,0,0),(17,'2017-09-10 03:46:49','2017-09-10 03:46:49','PayPal Express','PayPal_Express',1,1,3,0,NULL,1,0),(18,'2017-09-10 03:46:49','2017-09-10 03:46:49','PayPal Pro','PayPal_Pro',1,1,10000,0,NULL,0,0),(19,'2017-09-10 03:46:49','2017-09-10 03:46:49','Pin','Pin',1,1,10000,0,NULL,0,0),(20,'2017-09-10 03:46:49','2017-09-10 03:46:49','SagePay Direct','SagePay_Direct',1,1,10000,0,NULL,0,0),(21,'2017-09-10 03:46:49','2017-09-10 03:46:49','SagePay Server','SagePay_Server',1,1,10000,0,NULL,0,0),(22,'2017-09-10 03:46:49','2017-09-10 03:46:49','SecurePay DirectPost','SecurePay_DirectPost',1,1,10000,0,NULL,0,0),(23,'2017-09-10 03:46:50','2017-09-10 03:46:50','Stripe','Stripe',1,1,1,0,NULL,0,0),(24,'2017-09-10 03:46:50','2017-09-10 03:46:50','TargetPay Direct eBanking','TargetPay_Directebanking',1,1,10000,0,NULL,0,0),(25,'2017-09-10 03:46:50','2017-09-10 03:46:50','TargetPay Ideal','TargetPay_Ideal',1,1,10000,0,NULL,0,0),(26,'2017-09-10 03:46:50','2017-09-10 03:46:50','TargetPay Mr Cash','TargetPay_Mrcash',1,1,10000,0,NULL,0,0),(27,'2017-09-10 03:46:50','2017-09-10 03:46:50','TwoCheckout','TwoCheckout',1,1,10000,0,NULL,1,0),(28,'2017-09-10 03:46:50','2017-09-10 03:46:50','WorldPay','WorldPay',1,1,10000,0,NULL,0,0),(29,'2017-09-10 03:46:50','2017-09-10 03:46:50','BeanStream','BeanStream',1,2,10000,0,NULL,0,0),(30,'2017-09-10 03:46:50','2017-09-10 03:46:50','Psigate','Psigate',1,2,10000,0,NULL,0,0),(31,'2017-09-10 03:46:50','2017-09-10 03:46:50','moolah','AuthorizeNet_AIM',1,1,10000,0,NULL,0,0),(32,'2017-09-10 03:46:50','2017-09-10 03:46:50','Alipay','Alipay_Express',1,1,10000,0,NULL,0,0),(33,'2017-09-10 03:46:50','2017-09-10 03:46:50','Buckaroo','Buckaroo_CreditCard',1,1,10000,0,NULL,0,0),(34,'2017-09-10 03:46:50','2017-09-10 03:46:50','Coinbase','Coinbase',1,1,10000,0,NULL,0,0),(35,'2017-09-10 03:46:50','2017-09-10 03:46:50','DataCash','DataCash',1,1,10000,0,NULL,0,0),(36,'2017-09-10 03:46:50','2017-09-10 03:46:50','Neteller','Neteller',1,2,10000,0,NULL,0,0),(37,'2017-09-10 03:46:50','2017-09-10 03:46:50','Pacnet','Pacnet',1,1,10000,0,NULL,0,0),(38,'2017-09-10 03:46:50','2017-09-10 03:46:50','PaymentSense','PaymentSense',1,2,10000,0,NULL,0,0),(39,'2017-09-10 03:46:50','2017-09-10 03:46:50','Realex','Realex_Remote',1,1,10000,0,NULL,0,0),(40,'2017-09-10 03:46:50','2017-09-10 03:46:50','Sisow','Sisow',1,1,10000,0,NULL,0,0),(41,'2017-09-10 03:46:50','2017-09-10 03:46:50','Skrill','Skrill',1,1,10000,0,NULL,1,0),(42,'2017-09-10 03:46:50','2017-09-10 03:46:50','BitPay','BitPay',1,1,6,0,NULL,1,0),(43,'2017-09-10 03:46:50','2017-09-10 03:46:50','Dwolla','Dwolla',1,1,5,0,NULL,1,0),(44,'2017-09-10 03:46:50','2017-09-10 03:46:50','AGMS','Agms',1,1,10000,0,NULL,0,0),(45,'2017-09-10 03:46:50','2017-09-10 03:46:50','Barclays','BarclaysEpdq\\Essential',1,1,10000,0,NULL,0,0),(46,'2017-09-10 03:46:50','2017-09-10 03:46:50','Cardgate','Cardgate',1,1,10000,0,NULL,0,0),(47,'2017-09-10 03:46:50','2017-09-10 03:46:50','Checkout.com','CheckoutCom',1,1,10000,0,NULL,0,0),(48,'2017-09-10 03:46:50','2017-09-10 03:46:50','Creditcall','Creditcall',1,1,10000,0,NULL,0,0),(49,'2017-09-10 03:46:50','2017-09-10 03:46:50','Cybersource','Cybersource',1,1,10000,0,NULL,0,0),(50,'2017-09-10 03:46:50','2017-09-10 03:46:50','ecoPayz','Ecopayz',1,1,10000,0,NULL,0,0),(51,'2017-09-10 03:46:50','2017-09-10 03:46:50','Fasapay','Fasapay',1,1,10000,0,NULL,0,0),(52,'2017-09-10 03:46:50','2017-09-10 03:46:50','Komoju','Komoju',1,1,10000,0,NULL,0,0),(53,'2017-09-10 03:46:50','2017-09-10 03:46:50','Multicards','Multicards',1,1,10000,0,NULL,0,0),(54,'2017-09-10 03:46:50','2017-09-10 03:46:50','Pagar.Me','Pagarme',1,2,10000,0,NULL,0,0),(55,'2017-09-10 03:46:50','2017-09-10 03:46:50','Paysafecard','Paysafecard',1,1,10000,0,NULL,0,0),(56,'2017-09-10 03:46:50','2017-09-10 03:46:50','Paytrace','Paytrace_CreditCard',1,1,10000,0,NULL,0,0),(57,'2017-09-10 03:46:50','2017-09-10 03:46:50','Secure Trading','SecureTrading',1,1,10000,0,NULL,0,0),(58,'2017-09-10 03:46:50','2017-09-10 03:46:50','SecPay','SecPay',1,1,10000,0,NULL,0,0),(59,'2017-09-10 03:46:50','2017-09-10 03:46:50','WeChat Express','WeChat_Express',1,2,10000,0,NULL,0,0),(60,'2017-09-10 03:46:50','2017-09-10 03:46:50','WePay','WePay',1,1,10000,0,NULL,0,0),(61,'2017-09-10 03:46:50','2017-09-10 03:46:50','Braintree','Braintree',1,1,2,0,NULL,0,0),(62,'2017-09-10 03:46:50','2017-09-10 03:46:50','Custom','Custom',1,1,9,0,NULL,1,0),(63,'2017-09-10 03:46:50','2017-09-10 03:46:50','FirstData Payeezy','FirstData_Payeezy',1,1,10000,0,NULL,0,0),(64,'2017-09-10 03:46:50','2017-09-10 03:46:50','GoCardless','GoCardlessV2\\Redirect',1,1,8,0,NULL,1,0); /*!40000 ALTER TABLE `gateways` ENABLE KEYS */; UNLOCK TABLES; @@ -1329,7 +1330,7 @@ CREATE TABLE `invoice_designs` ( LOCK TABLES `invoice_designs` WRITE; /*!40000 ALTER TABLE `invoice_designs` DISABLE KEYS */; -INSERT INTO `invoice_designs` VALUES (1,'Clean','var GlobalY=0;//Y position of line at current page\n\n var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id;\n\n layout.headerRight = 550;\n layout.rowHeight = 15;\n\n doc.setFontSize(9);\n\n if (invoice.image)\n {\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', layout.marginLeft, 30);\n }\n \n if (!invoice.is_pro && logoImages.imageLogo1)\n {\n pageHeight=820;\n y=pageHeight-logoImages.imageLogoHeight1;\n doc.addImage(logoImages.imageLogo1, \'JPEG\', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1);\n }\n\n doc.setFontSize(9);\n SetPdfColor(\'LightBlue\', doc, \'primary\');\n displayAccount(doc, invoice, 220, layout.accountTop, layout);\n\n SetPdfColor(\'LightBlue\', doc, \'primary\');\n doc.setFontSize(\'11\');\n doc.text(50, layout.headerTop, (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase());\n\n\n SetPdfColor(\'Black\',doc); //set black color\n doc.setFontSize(9);\n\n var invoiceHeight = displayInvoice(doc, invoice, 50, 170, layout);\n var clientHeight = displayClient(doc, invoice, 220, 170, layout);\n var detailsHeight = Math.max(invoiceHeight, clientHeight);\n layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (3 * layout.rowHeight));\n \n doc.setLineWidth(0.3); \n doc.setDrawColor(200,200,200);\n doc.line(layout.marginLeft - layout.tablePadding, layout.headerTop + 6, layout.marginRight + layout.tablePadding, layout.headerTop + 6);\n doc.line(layout.marginLeft - layout.tablePadding, layout.headerTop + detailsHeight + 14, layout.marginRight + layout.tablePadding, layout.headerTop + detailsHeight + 14);\n\n doc.setFontSize(10);\n doc.setFontType(\'bold\');\n displayInvoiceHeader(doc, invoice, layout);\n var y = displayInvoiceItems(doc, invoice, layout);\n\n doc.setFontSize(9);\n doc.setFontType(\'bold\');\n\n GlobalY=GlobalY+25;\n\n\n doc.setLineWidth(0.3);\n doc.setDrawColor(241,241,241);\n doc.setFillColor(241,241,241);\n var x1 = layout.marginLeft - 12;\n var y1 = GlobalY-layout.tablePadding;\n\n var w2 = 510 + 24;\n var h2 = doc.internal.getFontSize()*3+layout.tablePadding*2;\n\n if (invoice.discount) {\n h2 += doc.internal.getFontSize()*2;\n }\n if (invoice.tax_amount) {\n h2 += doc.internal.getFontSize()*2;\n }\n\n //doc.rect(x1, y1, w2, h2, \'FD\');\n\n doc.setFontSize(9);\n displayNotesAndTerms(doc, layout, invoice, y);\n y += displaySubtotals(doc, layout, invoice, y, layout.unitCostRight);\n\n\n doc.setFontSize(10);\n Msg = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due;\n var TmpMsgX = layout.unitCostRight-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize());\n \n doc.text(TmpMsgX, y, Msg);\n\n SetPdfColor(\'LightBlue\', doc, \'primary\');\n AmountText = formatMoney(invoice.balance_amount, currencyId);\n headerLeft=layout.headerRight+400;\n var AmountX = layout.lineTotalRight - (doc.getStringUnitWidth(AmountText) * doc.internal.getFontSize());\n doc.text(AmountX, y, AmountText);','{\n \"content\": [{\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\n \"stack\": \"$accountDetails\",\n \"margin\": [7, 0, 0, 0]\n },\n {\n \"stack\": \"$accountAddress\"\n }\n ]\n },\n {\n \"text\": \"$entityTypeUC\",\n \"margin\": [8, 30, 8, 5],\n \"style\": \"entityTypeLabel\"\n \n },\n {\n \"table\": {\n \"headerRows\": 1,\n \"widths\": [\"auto\", \"auto\", \"*\"],\n \"body\": [\n [\n {\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"margin\": [0, 0, 12, 0],\n \"layout\": \"noBorders\"\n }, \n {\n \"stack\": \"$clientDetails\"\n },\n {\n \"text\": \"\"\n }\n ]\n ]\n },\n \"layout\": {\n \"hLineWidth\": \"$firstAndLast:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#D8D8D8\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:6\", \n \"paddingBottom\": \"$amount:6\"\n }\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#D8D8D8\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:14\", \n \"paddingBottom\": \"$amount:14\" \n }\n },\n {\n \"columns\": [ \n \"$notesAndTerms\",\n {\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"styles\": {\n \"entityTypeLabel\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#37a3c6\"\n },\n \"primaryColor\":{\n \"color\": \"$primaryColor:#37a3c6\"\n },\n \"accountName\": {\n \"color\": \"$primaryColor:#37a3c6\",\n \"bold\": true\n },\n \"invoiceDetails\": {\n \"margin\": [0, 0, 8, 0]\n }, \n \"accountDetails\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"notesAndTerms\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"odd\": {\n \"fillColor\": \"#fbfbfb\"\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#37a3c6\",\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLarger\",\n \"color\": \"$primaryColor:#37a3c6\"\n }, \n \"invoiceNumber\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"invoiceLineItemsTable\": {\n \"margin\": [0, 16, 0, 16]\n },\n \"clientName\": {\n \"bold\": true\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"termsLabel\": {\n \"bold\": true\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [7, 0, 7, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [40, 40, 40, 60]\n}\n'),(2,'Bold',' var GlobalY=0;//Y position of line at current page\n\n var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id;\n\n layout.headerRight = 150;\n layout.rowHeight = 15;\n layout.headerTop = 125;\n layout.tableTop = 300;\n\n doc.setLineWidth(0.5);\n\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setFillColor(46,43,43);\n } \n\n var x1 =0;\n var y1 = 0;\n var w2 = 595;\n var h2 = 100;\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n if (invoice.image)\n {\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', layout.marginLeft, 30);\n }\n\n doc.setLineWidth(0.5);\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setFillColor(46,43,43);\n doc.setDrawColor(46,43,43);\n } \n\n // return doc.setTextColor(240,240,240);//select color Custom Report GRAY Colour\n var x1 = 0;//tableLeft-tablePadding ;\n var y1 = 750;\n var w2 = 596;\n var h2 = 94;//doc.internal.getFontSize()*length+length*1.1;//+h;//+tablePadding;\n\n doc.rect(x1, y1, w2, h2, \'FD\');\n if (!invoice.is_pro && logoImages.imageLogo2)\n {\n pageHeight=820;\n var left = 250;//headerRight ;\n y=pageHeight-logoImages.imageLogoHeight2;\n var headerRight=370;\n\n var left = headerRight - logoImages.imageLogoWidth2;\n doc.addImage(logoImages.imageLogo2, \'JPEG\', left, y, logoImages.imageLogoWidth2, logoImages.imageLogoHeight2);\n }\n\n doc.setFontSize(7);\n doc.setFontType(\'bold\');\n SetPdfColor(\'White\',doc);\n\n displayAccount(doc, invoice, 300, layout.accountTop, layout);\n\n\n var y = layout.accountTop;\n var left = layout.marginLeft;\n var headerY = layout.headerTop;\n\n SetPdfColor(\'GrayLogo\',doc); //set black color\n doc.setFontSize(7);\n\n //show left column\n SetPdfColor(\'Black\',doc); //set black color\n doc.setFontType(\'normal\');\n\n //publish filled box\n doc.setDrawColor(200,200,200);\n\n if (NINJA.secondaryColor) {\n setDocHexFill(doc, NINJA.secondaryColor);\n } else {\n doc.setFillColor(54,164,152); \n } \n\n GlobalY=190;\n doc.setLineWidth(0.5);\n\n var BlockLenght=220;\n var x1 =595-BlockLenght;\n var y1 = GlobalY-12;\n var w2 = BlockLenght;\n var h2 = getInvoiceDetailsHeight(invoice, layout) + layout.tablePadding + 2;\n\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n SetPdfColor(\'SomeGreen\', doc, \'secondary\');\n doc.setFontSize(\'14\');\n doc.setFontType(\'bold\');\n doc.text(50, GlobalY, (invoice.is_quote ? invoiceLabels.your_quote : invoiceLabels.your_invoice).toUpperCase());\n\n\n var z=GlobalY;\n z=z+30;\n\n doc.setFontSize(\'8\'); \n SetPdfColor(\'Black\',doc); \n var clientHeight = displayClient(doc, invoice, layout.marginLeft, z, layout);\n layout.tableTop += Math.max(0, clientHeight - 75);\n marginLeft2=395;\n\n //publish left side information\n SetPdfColor(\'White\',doc);\n doc.setFontSize(\'8\');\n var detailsHeight = displayInvoice(doc, invoice, marginLeft2, z-25, layout) + 75;\n layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (2 * layout.tablePadding));\n\n y=z+60;\n x = GlobalY + 100;\n doc.setFontType(\'bold\');\n\n doc.setFontSize(12);\n doc.setFontType(\'bold\');\n SetPdfColor(\'Black\',doc);\n displayInvoiceHeader(doc, invoice, layout);\n\n var y = displayInvoiceItems(doc, invoice, layout);\n doc.setLineWidth(0.3);\n displayNotesAndTerms(doc, layout, invoice, y);\n y += displaySubtotals(doc, layout, invoice, y, layout.unitCostRight);\n\n doc.setFontType(\'bold\');\n\n doc.setFontSize(12);\n x += doc.internal.getFontSize()*4;\n Msg = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due;\n var TmpMsgX = layout.unitCostRight-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize());\n\n doc.text(TmpMsgX, y, Msg);\n\n //SetPdfColor(\'LightBlue\',doc);\n AmountText = formatMoney(invoice.balance_amount , currencyId);\n headerLeft=layout.headerRight+400;\n var AmountX = headerLeft - (doc.getStringUnitWidth(AmountText) * doc.internal.getFontSize());\n SetPdfColor(\'SomeGreen\', doc, \'secondary\');\n doc.text(AmountX, y, AmountText);','{\n \"content\": [\n {\n \"columns\": [\n {\n \"width\": 380,\n \"stack\": [\n {\"text\":\"$yourInvoiceLabelUC\", \"style\": \"yourInvoice\"},\n \"$clientDetails\"\n ],\n \"margin\": [60, 100, 0, 10]\n },\n {\n \"canvas\": [\n { \n \"type\": \"rect\", \n \"x\": 0, \n \"y\": 0, \n \"w\": 225, \n \"h\": \"$invoiceDetailsHeight\",\n \"r\":0, \n \"lineWidth\": 1,\n \"color\": \"$primaryColor:#36a498\"\n }\n ],\n \"width\":10,\n \"margin\":[-10,100,0,10]\n },\n { \n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [0, 110, 0, 0]\n }\n ]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": [\"22%\", \"*\", \"14%\", \"$quantityWidth\", \"$taxWidth\", \"22%\"],\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:14\", \n \"paddingBottom\": \"$amount:14\"\n }\n },\n {\n \"columns\": [\n {\n \"width\": 46,\n \"text\": \" \"\n },\n \"$notesAndTerms\",\n {\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\":\n [\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 600, \"y2\": 0,\"lineWidth\": 100,\"lineColor\":\"$secondaryColor:#292526\"}]},\n {\n \"columns\":\n [\n {\n \"text\": \"$invoiceFooter\",\n \"margin\": [40, -40, 40, 0],\n \"alignment\": \"left\",\n \"color\": \"#FFFFFF\"\n }\n ]\n }\n ],\n \"header\": [\n {\n \"canvas\": [\n {\n \"type\": \"line\",\n \"x1\": 0,\n \"y1\": 0,\n \"x2\": 600,\n \"y2\": 0,\n \"lineWidth\": 200,\n \"lineColor\": \"$secondaryColor:#292526\"\n }\n ],\n \"width\": 10\n },\n {\n \"columns\": [\n { \n \"image\": \"$accountLogo\",\n \"fit\": [120, 60],\n \"margin\": [30, 16, 0, 0]\n },\n {\n \"stack\": \"$accountDetails\",\n \"margin\": [\n 0,\n 16,\n 0,\n 0\n ],\n \"width\": 140\n },\n {\n \"stack\": \"$accountAddress\",\n \"margin\": [\n 20,\n 16,\n 0,\n 0\n ]\n }\n ]\n }\n ],\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#36a498\"\n },\n \"accountName\": {\n \"bold\": true,\n \"margin\": [4, 2, 4, 1],\n \"color\": \"$primaryColor:#36a498\"\n },\n \"accountDetails\": {\n \"margin\": [4, 2, 4, 1],\n \"color\": \"#FFFFFF\"\n },\n \"accountAddress\": {\n \"margin\": [4, 2, 4, 1],\n \"color\": \"#FFFFFF\"\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"odd\": {\n \"fillColor\": \"#ebebeb\",\n \"margin\": [0,0,0,0]\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#36a498\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#36a498\",\n \"bold\": true\n },\n \"invoiceDetails\": {\n \"color\": \"#ffffff\"\n },\n \"invoiceNumber\": {\n \"bold\": true\n },\n \"itemTableHeader\": {\n \"margin\": [40,0,0,0]\n },\n \"totalTableHeader\": {\n \"margin\": [0,0,40,0]\n },\n \"tableHeader\": {\n \"fontSize\": 12,\n \"bold\": true\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\",\n \"margin\": [0, 0, 40, 0]\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#36a498\",\n \"margin\": [40,0,0,0],\n \"bold\": true\n },\n \"yourInvoice\": {\n \"font\": \"$headerFont\",\n \"bold\": true, \n \"fontSize\": 14, \n \"color\": \"$primaryColor:#36a498\",\n \"margin\": [0,0,0,8]\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 26, 0, 16]\n },\n \"clientName\": {\n \"bold\": true\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\",\n \"margin\": [0, 0, 40, 0]\n },\n \"subtotals\": {\n \"alignment\": \"right\",\n \"margin\": [0,0,40,0]\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [47, 0, 47, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [0, 80, 0, 40]\n }'),(3,'Modern',' var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id;\n\n layout.headerRight = 400;\n layout.rowHeight = 15;\n\n\n doc.setFontSize(7);\n\n // add header\n doc.setLineWidth(0.5);\n\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setDrawColor(242,101,34);\n doc.setFillColor(242,101,34);\n } \n\n var x1 =0;\n var y1 = 0;\n var w2 = 595;\n var h2 = Math.max(110, getInvoiceDetailsHeight(invoice, layout) + 30);\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n SetPdfColor(\'White\',doc);\n\n //second column\n doc.setFontType(\'bold\');\n var name = invoice.account.name; \n if (name) {\n doc.setFontSize(\'30\');\n doc.setFontType(\'bold\');\n doc.text(40, 50, name);\n }\n\n if (invoice.image)\n {\n y=130;\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', layout.marginLeft, y);\n }\n\n // add footer \n doc.setLineWidth(0.5);\n\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setDrawColor(242,101,34);\n doc.setFillColor(242,101,34);\n } \n\n var x1 = 0;//tableLeft-tablePadding ;\n var y1 = 750;\n var w2 = 596;\n var h2 = 94;//doc.internal.getFontSize()*length+length*1.1;//+h;//+tablePadding;\n\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n if (!invoice.is_pro && logoImages.imageLogo3)\n {\n pageHeight=820;\n // var left = 25;//250;//headerRight ;\n y=pageHeight-logoImages.imageLogoHeight3;\n //var headerRight=370;\n\n //var left = headerRight - invoice.imageLogoWidth3;\n doc.addImage(logoImages.imageLogo3, \'JPEG\', 40, y, logoImages.imageLogoWidth3, logoImages.imageLogoHeight3);\n }\n\n doc.setFontSize(10); \n var marginLeft = 340;\n displayAccount(doc, invoice, marginLeft, 780, layout);\n\n\n SetPdfColor(\'White\',doc); \n doc.setFontSize(\'8\');\n var detailsHeight = displayInvoice(doc, invoice, layout.headerRight, layout.accountTop-10, layout);\n layout.headerTop = Math.max(layout.headerTop, detailsHeight + 50);\n layout.tableTop = Math.max(layout.tableTop, detailsHeight + 150);\n\n SetPdfColor(\'Black\',doc); //set black color\n doc.setFontSize(7);\n doc.setFontType(\'normal\');\n displayClient(doc, invoice, layout.headerRight, layout.headerTop, layout);\n\n\n \n SetPdfColor(\'White\',doc); \n doc.setFontType(\'bold\');\n\n doc.setLineWidth(0.3);\n if (NINJA.secondaryColor) {\n setDocHexFill(doc, NINJA.secondaryColor);\n setDocHexDraw(doc, NINJA.secondaryColor);\n } else {\n doc.setDrawColor(63,60,60);\n doc.setFillColor(63,60,60);\n } \n\n var left = layout.marginLeft - layout.tablePadding;\n var top = layout.tableTop - layout.tablePadding;\n var width = layout.marginRight - (2 * layout.tablePadding);\n var height = 20;\n doc.rect(left, top, width, height, \'FD\');\n \n\n displayInvoiceHeader(doc, invoice, layout);\n SetPdfColor(\'Black\',doc);\n var y = displayInvoiceItems(doc, invoice, layout);\n\n\n var height1 = displayNotesAndTerms(doc, layout, invoice, y);\n var height2 = displaySubtotals(doc, layout, invoice, y, layout.unitCostRight);\n y += Math.max(height1, height2);\n\n\n var left = layout.marginLeft - layout.tablePadding;\n var top = y - layout.tablePadding;\n var width = layout.marginRight - (2 * layout.tablePadding);\n var height = 20;\n if (NINJA.secondaryColor) {\n setDocHexFill(doc, NINJA.secondaryColor);\n setDocHexDraw(doc, NINJA.secondaryColor);\n } else {\n doc.setDrawColor(63,60,60);\n doc.setFillColor(63,60,60);\n } \n doc.rect(left, top, width, height, \'FD\');\n \n doc.setFontType(\'bold\');\n SetPdfColor(\'White\', doc);\n doc.setFontSize(12);\n \n var label = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due;\n var labelX = layout.unitCostRight-(doc.getStringUnitWidth(label) * doc.internal.getFontSize());\n doc.text(labelX, y+2, label);\n\n\n doc.setFontType(\'normal\');\n var amount = formatMoney(invoice.balance_amount , currencyId);\n headerLeft=layout.headerRight+400;\n var amountX = layout.lineTotalRight - (doc.getStringUnitWidth(amount) * doc.internal.getFontSize());\n doc.text(amountX, y+2, amount);','{\n \"content\": [\n {\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80],\n \"margin\": [0, 60, 0, 30]\n },\n {\n \"stack\": \"$clientDetails\",\n \"margin\": [0, 60, 0, 0]\n }\n ]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$notFirstAndLastColumn:.5\",\n \"hLineColor\": \"#888888\",\n \"vLineColor\": \"#FFFFFF\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:8\",\n \"paddingBottom\": \"$amount:8\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n },\n {\n \"columns\": [\n {\n \"canvas\": [\n {\n \"type\": \"rect\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 515,\n \"h\": 26,\n \"r\": 0,\n \"lineWidth\": 1,\n \"color\": \"$secondaryColor:#403d3d\"\n }\n ],\n \"width\": 10,\n \"margin\": [\n 0,\n 10,\n 0,\n 0\n ]\n },\n {\n \"text\": \"$balanceDueLabel\",\n \"style\": \"subtotalsBalanceDueLabel\",\n \"margin\": [0, 16, 0, 0],\n \"width\": 370\n },\n {\n \"text\": \"$balanceDue\",\n \"style\": \"subtotalsBalanceDue\",\n \"margin\": [0, 16, 8, 0]\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": [\n {\n \"canvas\": [\n {\n \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 600, \"y2\": 0,\"lineWidth\": 100,\"lineColor\":\"$primaryColor:#f26621\"\n }]\n ,\"width\":10\n },\n {\n \"columns\": [\n {\n \"width\": 350,\n \"stack\": [\n {\n \"text\": \"$invoiceFooter\",\n \"margin\": [40, -40, 40, 0],\n \"alignment\": \"left\",\n \"color\": \"#FFFFFF\"\n\n }\n ]\n },\n {\n \"stack\": \"$accountDetails\",\n \"margin\": [0, -40, 0, 0],\n \"width\": \"*\"\n },\n {\n \"stack\": \"$accountAddress\",\n \"margin\": [0, -40, 0, 0],\n \"width\": \"*\"\n }\n ]\n }\n ],\n \"header\": [\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 600, \"y2\": 0,\"lineWidth\": 200,\"lineColor\":\"$primaryColor:#f26621\"}],\"width\":10\n },\n {\n \"columns\": [\n {\n \"text\": \"$accountName\", \"bold\": true,\"font\":\"$headerFont\",\"fontSize\":30,\"color\":\"#ffffff\",\"margin\":[40,20,0,0],\"width\":350\n }\n ]\n },\n {\n \"width\": 300,\n \"table\": {\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [400, -40, 0, 0]\n }\n ],\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountName\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountDetails\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"#FFFFFF\"\n },\n \"accountAddress\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"#FFFFFF\"\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 4, 2]\n },\n \"invoiceDetails\": {\n \"color\": \"#FFFFFF\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 0, 0, 16]\n },\n \"productKey\": {\n \"bold\": true\n },\n \"clientName\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"color\": \"#FFFFFF\",\n \"fontSize\": \"$fontSizeLargest\",\n \"fillColor\": \"$secondaryColor:#403d3d\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\":\"#FFFFFF\",\n \"alignment\":\"right\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\":\"#FFFFFF\",\n \"bold\": true,\n \"alignment\":\"right\"\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"invoiceNumberLabel\": {\n \"bold\": true\n },\n \"invoiceNumber\": {\n \"bold\": true\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [7, 0, 7, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [40, 120, 40, 50]\n}\n'),(4,'Plain',' var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id; \n \n layout.accountTop += 25;\n layout.headerTop += 25;\n layout.tableTop += 25;\n\n if (invoice.image)\n {\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', left, 50);\n } \n \n /* table header */\n doc.setDrawColor(200,200,200);\n doc.setFillColor(230,230,230);\n \n var detailsHeight = getInvoiceDetailsHeight(invoice, layout);\n var left = layout.headerLeft - layout.tablePadding;\n var top = layout.headerTop + detailsHeight - layout.rowHeight - layout.tablePadding;\n var width = layout.headerRight - layout.headerLeft + (2 * layout.tablePadding);\n var height = layout.rowHeight + 1;\n doc.rect(left, top, width, height, \'FD\'); \n\n doc.setFontSize(10);\n doc.setFontType(\'normal\');\n\n displayAccount(doc, invoice, layout.marginLeft, layout.accountTop, layout);\n displayClient(doc, invoice, layout.marginLeft, layout.headerTop, layout);\n\n displayInvoice(doc, invoice, layout.headerLeft, layout.headerTop, layout, layout.headerRight);\n layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (2 * layout.tablePadding));\n\n var headerY = layout.headerTop;\n var total = 0;\n\n doc.setDrawColor(200,200,200);\n doc.setFillColor(230,230,230);\n var left = layout.marginLeft - layout.tablePadding;\n var top = layout.tableTop - layout.tablePadding;\n var width = layout.headerRight - layout.marginLeft + (2 * layout.tablePadding);\n var height = layout.rowHeight + 2;\n doc.rect(left, top, width, height, \'FD\'); \n\n displayInvoiceHeader(doc, invoice, layout);\n var y = displayInvoiceItems(doc, invoice, layout);\n\n doc.setFontSize(10);\n\n displayNotesAndTerms(doc, layout, invoice, y+20);\n\n y += displaySubtotals(doc, layout, invoice, y+20, 480) + 20;\n\n doc.setDrawColor(200,200,200);\n doc.setFillColor(230,230,230);\n \n var left = layout.footerLeft - layout.tablePadding;\n var top = y - layout.tablePadding;\n var width = layout.headerRight - layout.footerLeft + (2 * layout.tablePadding);\n var height = layout.rowHeight + 2;\n doc.rect(left, top, width, height, \'FD\'); \n \n doc.setFontType(\'bold\');\n doc.text(layout.footerLeft, y, invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due);\n\n total = formatMoney(invoice.balance_amount, currencyId);\n var totalX = layout.headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());\n doc.text(totalX, y, total); \n\n if (!invoice.is_pro) {\n doc.setFontType(\'normal\');\n doc.text(layout.marginLeft, 790, \'Created by InvoiceNinja.com\');\n }','{\n \"content\": [\n {\n \"columns\": [\n {\n \"stack\": \"$accountDetails\"\n },\n {\n \"stack\": \"$accountAddress\"\n },\n [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n }\n ] \n ]},\n {\n \"columns\": [\n {\n \"width\": 340,\n \"stack\": \"$clientDetails\",\n \"margin\": [0,40,0,0]\n },\n {\n \"width\":200,\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#E6E6E6\",\n \"paddingLeft\": \"$amount:10\", \n \"paddingRight\": \"$amount:10\"\n }\n }\n ]\n }, \n {\n \"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 515, \"h\": 25,\"r\":0, \"lineWidth\": 1,\"color\":\"#e6e6e6\"}],\"width\":10,\"margin\":[0,30,0,-43]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:1\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#e6e6e6\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:8\", \n \"paddingBottom\": \"$amount:8\" \n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"width\": 160,\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [60, 60],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:10\", \n \"paddingRight\": \"$amount:10\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }\n ]\n }, \n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\",\n \"margin\": [0, 0, 0, 12]\n\n }\n ],\n \"margin\": [40, -20, 40, 40]\n },\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"tableHeader\": {\n \"bold\": true\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"invoiceLineItemsTable\": {\n \"margin\": [0, 16, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"terms\": {\n \"margin\": [0, 0, 20, 0]\n },\n \"invoiceDetailBalanceDueLabel\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"invoiceDetailBalanceDue\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"subtotalsBalanceDue\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [7, 0, 7, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [40, 40, 40, 60]\n}\n'),(5,'Business',NULL,'{\n \"content\": [\n {\n \"columns\":\n [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\n \"width\": 300,\n \"stack\": \"$accountDetails\",\n \"margin\": [140, 0, 0, 0]\n },\n {\n \"width\": 150,\n \"stack\": \"$accountAddress\"\n }\n ]\n },\n {\n \"columns\": [\n {\n \"width\": 120,\n \"stack\": [\n {\"text\": \"$invoiceIssuedToLabel\", \"style\":\"issuedTo\"},\n \"$clientDetails\"\n ],\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"canvas\": [{ \"type\": \"rect\", \"x\": 20, \"y\": 0, \"w\": 174, \"h\": \"$invoiceDetailsHeight\",\"r\":10, \"lineWidth\": 1,\"color\":\"$primaryColor:#eb792d\"}],\n \"width\":30,\n \"margin\":[200,25,0,0]\n },\n {\n \"table\": {\n \"widths\": [70, 76],\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [200, 34, 0, 0]\n }\n ]\n },\n {\"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 515, \"h\": 32,\"r\":8, \"lineWidth\": 1,\"color\":\"$secondaryColor:#374e6b\"}],\"width\":10,\"margin\":[0,20,0,-45]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:1\",\n \"vLineWidth\": \"$notFirst:.5\",\n \"hLineColor\": \"#FFFFFF\",\n \"vLineColor\": \"#FFFFFF\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:12\",\n \"paddingBottom\": \"$amount:12\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"stack\": [\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n },\n {\n \"canvas\": [\n {\n \"type\": \"rect\",\n \"x\": 76,\n \"y\": 20,\n \"w\": 182,\n \"h\": 30,\n \"r\": 7,\n \"lineWidth\": 1,\n \"color\": \"$secondaryColor:#374e6b\"\n }\n ]\n },\n {\n \"style\": \"subtotalsBalance\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountName\": {\n \"bold\": true\n },\n \"accountDetails\": {\n \"color\": \"#AAA9A9\",\n \"margin\": [0,2,0,1]\n },\n \"accountAddress\": {\n \"color\": \"#AAA9A9\",\n \"margin\": [0,2,0,1]\n },\n \"even\": {\n \"fillColor\":\"#E8E8E8\"\n },\n \"odd\": {\n \"fillColor\":\"#F7F7F7\"\n },\n \"productKey\": {\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"#ffffff\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true,\n \"color\":\"#ffffff\",\n \"alignment\":\"right\"\n },\n \"invoiceDetails\": {\n \"color\": \"#ffffff\"\n },\n \"tableHeader\": {\n \"color\": \"#ffffff\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"secondTableHeader\": {\n \"color\": \"$secondaryColor:#374e6b\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"issuedTo\": {\n \"margin\": [0,2,0,1],\n \"bold\": true,\n \"color\": \"#374e6b\"\n },\n \"clientDetails\": {\n \"margin\": [0,2,0,1]\n },\n \"clientName\": {\n \"color\": \"$primaryColor:#eb792d\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 10, 0, 10]\n },\n \"invoiceDetailsValue\": {\n \"alignment\": \"right\"\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"subtotalsBalance\": {\n \"alignment\": \"right\",\n \"margin\": [0, -25, 0, 0]\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(6,'Creative',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"stack\": \"$clientDetails\"\n },\n {\n \"stack\": \"$accountDetails\"\n },\n {\n \"stack\": \"$accountAddress\"\n },\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80],\n \"alignment\": \"right\"\n }\n ],\n \"margin\": [0, 0, 0, 20]\n },\n {\n \"columns\": [\n {\"text\":\n [\n {\"text\": \"$entityTypeUC\", \"style\": \"header1\"},\n {\"text\": \"#\", \"style\": \"header2\"},\n {\"text\": \"$invoiceNumber\", \"style\":\"header2\"}\n ],\n \"width\": \"*\"\n },\n {\n \"width\":200,\n \"table\": {\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [16, 4, 0, 0]\n }\n ],\n \"margin\": [0, 0, 0, 20]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 5, \"x2\": 515, \"y2\": 5, \"lineWidth\": 3,\"lineColor\":\"$primaryColor:#AE1E54\"}]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"$primaryColor:#E8E8E8\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:8\",\n \"paddingBottom\": \"$amount:8\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n },\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 20, \"x2\": 515, \"y2\": 20, \"lineWidth\": 3,\"lineColor\":\"$primaryColor:#AE1E54\"}],\n \"margin\": [0, -8, 0, -8]\n },\n {\n \"text\": \"$balanceDueLabel\",\n \"style\": \"subtotalsBalanceDueLabel\"\n },\n {\n \"text\": \"$balanceDue\",\n \"style\": \"subtotalsBalanceDue\"\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#AE1E54\"\n },\n \"accountName\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"$primaryColor:#AE1E54\",\n \"bold\": true\n },\n \"accountDetails\": {\n \"margin\": [4, 2, 4, 2]\n },\n \"accountAddress\": {\n \"margin\": [4, 2, 4, 2]\n },\n \"odd\": {\n \"fillColor\":\"#F4F4F4\"\n },\n \"productKey\": {\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"margin\": [320,20,0,0]\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#AE1E54\",\n \"bold\": true,\n \"margin\":[0,-10,10,0],\n \"alignment\": \"right\"\n },\n \"invoiceDetailBalanceDue\": {\n \"bold\": true,\n \"color\": \"$primaryColor:#AE1E54\"\n },\n \"invoiceDetailBalanceDueLabel\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"color\": \"$primaryColor:#AE1E54\",\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"clientName\": {\n \"bold\": true\n },\n \"clientDetails\": {\n \"margin\": [0,2,0,1]\n },\n \"header1\": {\n \"bold\": true,\n \"margin\": [0, 30, 0, 16],\n \"fontSize\": 46\n },\n \"header2\": {\n \"margin\": [0, 30, 0, 16],\n \"fontSize\": 46,\n \"italics\": true,\n \"color\": \"$primaryColor:#AE1E54\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 4, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(7,'Elegant',NULL,'{\n \"content\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80],\n \"alignment\": \"center\",\n \"margin\": [0, 0, 0, 30]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 5, \"x2\": 515, \"y2\": 5, \"lineWidth\": 2}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 3, \"x2\": 515, \"y2\": 3, \"lineWidth\": 1}]},\n {\n \"columns\": [\n {\n \"width\": 120,\n \"stack\": [\n {\"text\": \"$invoiceToLabel\", \"style\": \"header\", \"margin\": [0, 0, 0, 6]},\n \"$clientDetails\"\n ]\n },\n {\n \"width\": 10,\n \"canvas\": [{ \"type\": \"line\", \"x1\": -2, \"y1\": 18, \"x2\": -2, \"y2\": 80, \"lineWidth\": 1,\"dash\": { \"length\": 2 }}]\n },\n {\n \"width\": 120,\n \"stack\": \"$accountDetails\",\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"width\": 110,\n \"stack\": \"$accountAddress\",\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"stack\": [\n {\"text\": \"$detailsLabel\", \"style\": \"header\", \"margin\": [0, 0, 0, 6]},\n {\n \"width\":180,\n \"table\": {\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\"\n }\n ]\n }],\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:12\",\n \"paddingBottom\": \"$amount:12\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n },\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 270, \"y1\": 20, \"x2\": 515, \"y2\": 20, \"lineWidth\": 1,\"dash\": { \"length\": 2 }}]\n },\n {\n \"text\": \"$balanceDueLabel\",\n \"style\": \"subtotalsBalanceDueLabel\"\n },\n {\n \"text\": \"$balanceDue\",\n \"style\": \"subtotalsBalanceDue\"\n },\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 270, \"y1\": 20, \"x2\": 515, \"y2\": 20, \"lineWidth\": 1,\"dash\": { \"length\": 2 }}]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }],\n \"footer\": [\n {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 35, \"y1\": 5, \"x2\": 555, \"y2\": 5, \"lineWidth\": 2,\"margin\": [30,0,0,0]}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 35, \"y1\": 3, \"x2\": 555, \"y2\": 3, \"lineWidth\": 1,\"margin\": [30,0,0,0]}]}\n ],\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientName\": {\n \"bold\": true\n },\n \"accountName\": {\n \"bold\": true\n },\n \"odd\": {\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#5a7b61\",\n \"margin\": [320,20,0,0]\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#5a7b61\",\n \"style\": true,\n \"margin\":[0,-14,8,0],\n \"alignment\":\"right\"\n },\n \"invoiceDetailBalanceDue\": {\n \"color\": \"$primaryColor:#5a7b61\",\n \"bold\": true\n },\n \"header\": {\n \"fontSize\": 14,\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"color\": \"$primaryColor:#5a7b61\",\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 40, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(8,'Hipster',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"width\":10,\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 0, \"y2\": 75, \"lineWidth\": 0.5}]\n },\n {\n \"width\":120,\n \"stack\": [\n {\"text\": \"$fromLabelUC\", \"style\": \"fromLabel\"}, \n \"$accountDetails\" \n ]\n },\n {\n \"width\":120,\n \"stack\": [\n {\"text\": \" \"},\n \"$accountAddress\"\n ],\n \"margin\": [10, 0, 0, 16]\n },\n {\n \"width\":10,\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 0, \"y2\": 75, \"lineWidth\": 0.5}]\n },\n {\n \"stack\": [\n {\"text\": \"$toLabelUC\", \"style\": \"toLabel\"}, \n \"$clientDetails\"\n ]\n },\n [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n }\n ]\n ]\n },\n {\n \"text\": \"$entityTypeUC\",\n \"margin\": [0, 4, 0, 8],\n \"bold\": \"true\",\n \"fontSize\": 42\n },\n {\n \"columnGap\": 16,\n \"columns\": [\n {\n \"width\":\"auto\",\n \"text\": [\"$invoiceNoLabel\",\" \",\"$invoiceNumberValue\"],\n \"bold\": true,\n \"color\":\"$primaryColor:#bc9f2b\",\n \"fontSize\":10\n },\n {\n \"width\":\"auto\",\n \"text\": [\"$invoiceDateLabel\",\" \",\"$invoiceDateValue\"],\n \"fontSize\":10\n },\n {\n \"width\":\"auto\",\n \"text\": [\"$dueDateLabel?\",\" \",\"$dueDateValue\"],\n \"fontSize\":10\n },\n {\n \"width\":\"*\",\n \"text\": [\"$balanceDueLabel\",\" \",{\"text\":\"$balanceDue\", \"bold\":true, \"color\":\"$primaryColor:#bc9f2b\"}],\n \"fontSize\":10\n }\n ]\n },\n {\n \"margin\": [0, 26, 0, 0],\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$amount:.5\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:8\", \n \"paddingBottom\": \"$amount:8\" \n }\n },\n {\n \"columns\": [\n {\n \"stack\": \"$notesAndTerms\",\n \"width\": \"*\",\n \"margin\": [0, 12, 0, 0]\n },\n {\n \"width\": 200,\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"36%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$notFirst:.5\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:12\", \n \"paddingBottom\": \"$amount:4\" \n }\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"accountName\": {\n \"bold\": true\n },\n \"clientName\": {\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#bc9f2b\",\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"fromLabel\": {\n \"color\": \"$primaryColor:#bc9f2b\",\n \"bold\": true \n },\n \"toLabel\": {\n \"color\": \"$primaryColor:#bc9f2b\",\n \"bold\": true \n },\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 16, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(9,'Playful',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 190, \"h\": \"$invoiceDetailsHeight\",\"r\":5, \"lineWidth\": 1,\"color\":\"$primaryColor:#009d91\"}],\"width\":10,\"margin\":[200,0,0,0]},\n {\n \"width\":400,\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [210, 10, 10, 0]\n }\n ] \n },\n {\n \"margin\": [0, 18, 0, 0],\n \"columnGap\": 50,\n \"columns\": [\n {\n \"width\": 212,\n \"stack\": [\n {\"text\": \"$invoiceToLabel:\", \"style\": \"toLabel\"},\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 4, \"x2\": 150, \"y2\": 4, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}],\n \"margin\": [0, 0, 0, 4]\n },\n \"$clientDetails\",\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 9, \"x2\": 150, \"y2\": 9, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}]}\n ]\n },\n {\n \"width\": \"*\",\n \"stack\": [\n {\"text\": \"$fromLabel:\", \"style\": \"fromLabel\"},\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 4, \"x2\": 250, \"y2\": 4, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}],\n \"margin\": [0, 0, 0, 4]\n },\n {\"columns\":[\n \"$accountDetails\",\n \"$accountAddress\" \n ], \"columnGap\": 4}, \n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 9, \"x2\": 250, \"y2\": 9, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}]}\n ]\n }\n ]\n },\n {\"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 515, \"h\": 35,\"r\":6, \"lineWidth\": 1,\"color\":\"$primaryColor:#009d91\"}],\"width\":10,\"margin\":[0,30,0,-30]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"$primaryColor:#009d91\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:8\", \n \"paddingBottom\": \"$amount:8\"\n }\n }, \n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"stack\": [\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n },\n {\n \"canvas\": [\n {\n \"type\": \"rect\",\n \"x\": 76,\n \"y\": 20,\n \"w\": 182,\n \"h\": 30,\n \"r\": 4,\n \"lineWidth\": 1,\n \"color\": \"$primaryColor:#009d91\"\n }\n ]\n },\n {\n \"style\": \"subtotalsBalance\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n }\n ]\n }, \n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n], \n \"footer\": [\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 38, \"x2\": 68, \"y2\": 38, \"lineWidth\": 6,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 68, \"y1\": 0, \"x2\": 135, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#1d766f\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 135, \"y1\": 0, \"x2\": 201, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 201, \"y1\": 0, \"x2\": 267, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#bf9730\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 267, \"y1\": 0, \"x2\": 333, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ac2b50\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 333, \"y1\": 0, \"x2\": 399, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#e60042\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 399, \"y1\": 0, \"x2\": 465, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 465, \"y1\": 0, \"x2\": 532, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 532, \"y1\": 0, \"x2\": 600, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ac2b50\"}]},\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\",\n \"margin\": [40, -60, 40, 0]\n }\n ],\n \"header\": [\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 68, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 68, \"y1\": 0, \"x2\": 135, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#1d766f\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 135, \"y1\": 0, \"x2\": 201, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 201, \"y1\": 0, \"x2\": 267, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#bf9730\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 267, \"y1\": 0, \"x2\": 333, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ac2b50\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 333, \"y1\": 0, \"x2\": 399, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#e60042\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 399, \"y1\": 0, \"x2\": 465, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 465, \"y1\": 0, \"x2\": 532, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 532, \"y1\": 0, \"x2\": 600, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ac2b50\"}]}\n ],\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"accountName\": {\n \"color\": \"$secondaryColor:#bb3328\"\n },\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientName\": {\n \"color\": \"$secondaryColor:#bb3328\"\n },\n \"even\": {\n \"fillColor\":\"#E8E8E8\"\n },\n \"odd\": {\n \"fillColor\":\"#F7F7F7\"\n },\n \"productKey\": {\n \"color\": \"$secondaryColor:#bb3328\"\n },\n \"lineTotal\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"#FFFFFF\"\n },\n \"secondTableHeader\": {\n \"color\": \"$primaryColor:#009d91\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\":\"#FFFFFF\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true,\n \"color\":\"#FFFFFF\",\n \"alignment\":\"right\"\n },\n \"invoiceDetails\": {\n \"color\": \"#FFFFFF\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 0, 0, 16]\n },\n \"invoiceDetailBalanceDueLabel\": {\n \"bold\": true\n },\n \"invoiceDetailBalanceDue\": {\n \"bold\": true\n },\n \"fromLabel\": {\n \"color\": \"$primaryColor:#009d91\"\n },\n \"toLabel\": {\n \"color\": \"$primaryColor:#009d91\"\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"subtotalsBalance\": {\n \"alignment\": \"right\",\n \"margin\": [0, -25, 0, 0]\n }, \n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(10,'Photo',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\n \"text\": \"\",\n \"width\": \"*\"\n },\n {\n \"width\":180,\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\"\n }]\n },\n {\n \"image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDA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UAGeQBScEZHI96Q/wCu/AVIv8X0oAavz8AY+tTWcv2e6ikZRIqtnDd6hj/4+Pw/oasCgDpfHWvL4p1x78WkOno0UaiG3QKi7VA6DvxXLwSlJY5AcFDnPpWzqH3pfqaw4/vH/d/woA7DxX44i8S+H7G0ltib62AHnsckgVxgwA3XpUz/AH3+pqB/utQA4Z7dugpSdx6A/WiP7zf71NX/AFRoAVBxjdjNBAXnrnj6Ui9D9aaPvPQBICe/b8BSEgEUkP8Aqm+n+NK33Y/92gA6ZBwTU0UZJxkHnAJqKTr/AMCP8qsfwxUAV5TukLYzRjpnIB5pF7fj/OkXt9aAHA8E9R3NNbOBhvwpZP8AGkfr+VAChRjII4PSjbk5J59qdH99Poak7r9KAIQCM59PWgjBHPFKP9bSS/w/73+FAAM5PqfT2pV9DwfY0qfeP+e1MX7rfUUAOLYIPB9c0NkdecUR/wAX1pF+6n0/pQAp7dCaQ4PUjPapE/1R+n+FQDqfoKAJQFyc+mc0Ke2CSfWkbt9KkH3V+tAERIz19hThg4PUUxfut9TUif6pP896AEHfnt2pyg99uT396IfvP9f8Klj/AIv9+gCuMhvQZqRSMcd+oph6r/u/1p9v/q2+tAEsibogxIHHJFV0J3A8881ZH/Hoah/5aH8aAOy8PzxtbhWxv96vahZbmVh0B/Wue8Nf6411d32/36APU/hTdCPSriHJwBkD07196/CW6W68MWbfeIjHJ+lfn98Kf9VP/uj+tfePwS/5FK2/3F/kK5avRm0D0URbucgfjRUbfeNFcxrc/9k=\",\n \"margin\": [-40, 16, 0, 0],\n \"width\": 595\n },\n {\n \"margin\": [-20, -150, 0, 0],\n \"columnGap\": 8,\n \"columns\": [\n {\n \"width\": \"auto\",\n \"text\": \"$toLabel:\",\n \"style\": \"bold\",\n \"color\":\"#cd5138\"\n },\n {\n \"width\": \"*\",\n \"stack\": \"$clientDetails\",\n \"margin\": [4, 0, 0, 0]\n }\n ]\n },\n {\n \"margin\": [-20, 10, 0, 140],\n \"columnGap\": 8,\n \"columns\": [\n {\n \"width\": \"auto\",\n \"text\": \"$fromLabel:\",\n \"style\": \"bold\",\n \"color\":\"#cd5138\"\n },\n {\n \"width\": \"*\",\n \"stack\": [\n {\n \"width\": 150,\n \"stack\": \"$accountDetails\"\n },\n {\n \"width\": 150,\n \"stack\": \"$accountAddress\"\n }\n ]\n }\n ]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 5, \"x2\": 515, \"y2\": 5, \"lineWidth\": 1.5}],\"margin\":[0,0,0,-30]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#000000\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:10\", \n \"paddingBottom\": \"$amount:10\" \n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"alignment\": \"right\",\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"styles\": {\n \"accountDetails\": {\n \"margin\": [0, 0, 0, 3]\n },\n \"accountAddress\": {\n \"margin\": [0, 0, 0, 3]\n },\n \"clientDetails\": {\n \"margin\": [0, 0, 0, 3]\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#cd5138\"\n },\n \"lineTotal\": {\n \"color\": \"$primaryColor:#cd5138\"\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#cd5138\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 0, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 30, 40, 30]\n}\n'),(11,'Custom1',NULL,NULL),(12,'Custom2',NULL,NULL),(13,'Custom3',NULL,NULL); +INSERT INTO `invoice_designs` VALUES (1,'Clean','var GlobalY=0;//Y position of line at current page\n\n var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id;\n\n layout.headerRight = 550;\n layout.rowHeight = 15;\n\n doc.setFontSize(9);\n\n if (invoice.image)\n {\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', layout.marginLeft, 30);\n }\n \n if (!invoice.is_pro && logoImages.imageLogo1)\n {\n pageHeight=820;\n y=pageHeight-logoImages.imageLogoHeight1;\n doc.addImage(logoImages.imageLogo1, \'JPEG\', layout.marginLeft, y, logoImages.imageLogoWidth1, logoImages.imageLogoHeight1);\n }\n\n doc.setFontSize(9);\n SetPdfColor(\'LightBlue\', doc, \'primary\');\n displayAccount(doc, invoice, 220, layout.accountTop, layout);\n\n SetPdfColor(\'LightBlue\', doc, \'primary\');\n doc.setFontSize(\'11\');\n doc.text(50, layout.headerTop, (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase());\n\n\n SetPdfColor(\'Black\',doc); //set black color\n doc.setFontSize(9);\n\n var invoiceHeight = displayInvoice(doc, invoice, 50, 170, layout);\n var clientHeight = displayClient(doc, invoice, 220, 170, layout);\n var detailsHeight = Math.max(invoiceHeight, clientHeight);\n layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (3 * layout.rowHeight));\n \n doc.setLineWidth(0.3); \n doc.setDrawColor(200,200,200);\n doc.line(layout.marginLeft - layout.tablePadding, layout.headerTop + 6, layout.marginRight + layout.tablePadding, layout.headerTop + 6);\n doc.line(layout.marginLeft - layout.tablePadding, layout.headerTop + detailsHeight + 14, layout.marginRight + layout.tablePadding, layout.headerTop + detailsHeight + 14);\n\n doc.setFontSize(10);\n doc.setFontType(\'bold\');\n displayInvoiceHeader(doc, invoice, layout);\n var y = displayInvoiceItems(doc, invoice, layout);\n\n doc.setFontSize(9);\n doc.setFontType(\'bold\');\n\n GlobalY=GlobalY+25;\n\n\n doc.setLineWidth(0.3);\n doc.setDrawColor(241,241,241);\n doc.setFillColor(241,241,241);\n var x1 = layout.marginLeft - 12;\n var y1 = GlobalY-layout.tablePadding;\n\n var w2 = 510 + 24;\n var h2 = doc.internal.getFontSize()*3+layout.tablePadding*2;\n\n if (invoice.discount) {\n h2 += doc.internal.getFontSize()*2;\n }\n if (invoice.tax_amount) {\n h2 += doc.internal.getFontSize()*2;\n }\n\n //doc.rect(x1, y1, w2, h2, \'FD\');\n\n doc.setFontSize(9);\n displayNotesAndTerms(doc, layout, invoice, y);\n y += displaySubtotals(doc, layout, invoice, y, layout.unitCostRight);\n\n\n doc.setFontSize(10);\n Msg = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due;\n var TmpMsgX = layout.unitCostRight-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize());\n \n doc.text(TmpMsgX, y, Msg);\n\n SetPdfColor(\'LightBlue\', doc, \'primary\');\n AmountText = formatMoney(invoice.balance_amount, currencyId);\n headerLeft=layout.headerRight+400;\n var AmountX = layout.lineTotalRight - (doc.getStringUnitWidth(AmountText) * doc.internal.getFontSize());\n doc.text(AmountX, y, AmountText);','{\n \"content\": [{\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\n \"stack\": \"$accountDetails\",\n \"margin\": [7, 0, 0, 0]\n },\n {\n \"stack\": \"$accountAddress\"\n }\n ]\n },\n {\n \"text\": \"$entityTypeUC\",\n \"margin\": [8, 30, 8, 5],\n \"style\": \"entityTypeLabel\"\n \n },\n {\n \"table\": {\n \"headerRows\": 1,\n \"widths\": [\"auto\", \"auto\", \"*\"],\n \"body\": [\n [\n {\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"margin\": [0, 0, 12, 0],\n \"layout\": \"noBorders\"\n }, \n {\n \"stack\": \"$clientDetails\"\n },\n {\n \"text\": \"\"\n }\n ]\n ]\n },\n \"layout\": {\n \"hLineWidth\": \"$firstAndLast:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#D8D8D8\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:6\", \n \"paddingBottom\": \"$amount:6\"\n }\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#D8D8D8\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:14\", \n \"paddingBottom\": \"$amount:14\" \n }\n },\n {\n \"columns\": [ \n \"$notesAndTerms\",\n {\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"styles\": {\n \"entityTypeLabel\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#37a3c6\"\n },\n \"primaryColor\":{\n \"color\": \"$primaryColor:#37a3c6\"\n },\n \"accountName\": {\n \"color\": \"$primaryColor:#37a3c6\",\n \"bold\": true\n },\n \"invoiceDetails\": {\n \"margin\": [0, 0, 8, 0]\n }, \n \"accountDetails\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"notesAndTerms\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 2]\n },\n \"odd\": {\n \"fillColor\": \"#fbfbfb\"\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#37a3c6\",\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLarger\",\n \"color\": \"$primaryColor:#37a3c6\"\n }, \n \"invoiceNumber\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"invoiceLineItemsTable\": {\n \"margin\": [0, 16, 0, 16]\n },\n \"clientName\": {\n \"bold\": true\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"termsLabel\": {\n \"bold\": true\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [7, 0, 7, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [40, 40, 40, 60]\n}\n'),(2,'Bold',' var GlobalY=0;//Y position of line at current page\n\n var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id;\n\n layout.headerRight = 150;\n layout.rowHeight = 15;\n layout.headerTop = 125;\n layout.tableTop = 300;\n\n doc.setLineWidth(0.5);\n\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setFillColor(46,43,43);\n } \n\n var x1 =0;\n var y1 = 0;\n var w2 = 595;\n var h2 = 100;\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n if (invoice.image)\n {\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', layout.marginLeft, 30);\n }\n\n doc.setLineWidth(0.5);\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setFillColor(46,43,43);\n doc.setDrawColor(46,43,43);\n } \n\n // return doc.setTextColor(240,240,240);//select color Custom Report GRAY Colour\n var x1 = 0;//tableLeft-tablePadding ;\n var y1 = 750;\n var w2 = 596;\n var h2 = 94;//doc.internal.getFontSize()*length+length*1.1;//+h;//+tablePadding;\n\n doc.rect(x1, y1, w2, h2, \'FD\');\n if (!invoice.is_pro && logoImages.imageLogo2)\n {\n pageHeight=820;\n var left = 250;//headerRight ;\n y=pageHeight-logoImages.imageLogoHeight2;\n var headerRight=370;\n\n var left = headerRight - logoImages.imageLogoWidth2;\n doc.addImage(logoImages.imageLogo2, \'JPEG\', left, y, logoImages.imageLogoWidth2, logoImages.imageLogoHeight2);\n }\n\n doc.setFontSize(7);\n doc.setFontType(\'bold\');\n SetPdfColor(\'White\',doc);\n\n displayAccount(doc, invoice, 300, layout.accountTop, layout);\n\n\n var y = layout.accountTop;\n var left = layout.marginLeft;\n var headerY = layout.headerTop;\n\n SetPdfColor(\'GrayLogo\',doc); //set black color\n doc.setFontSize(7);\n\n //show left column\n SetPdfColor(\'Black\',doc); //set black color\n doc.setFontType(\'normal\');\n\n //publish filled box\n doc.setDrawColor(200,200,200);\n\n if (NINJA.secondaryColor) {\n setDocHexFill(doc, NINJA.secondaryColor);\n } else {\n doc.setFillColor(54,164,152); \n } \n\n GlobalY=190;\n doc.setLineWidth(0.5);\n\n var BlockLenght=220;\n var x1 =595-BlockLenght;\n var y1 = GlobalY-12;\n var w2 = BlockLenght;\n var h2 = getInvoiceDetailsHeight(invoice, layout) + layout.tablePadding + 2;\n\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n SetPdfColor(\'SomeGreen\', doc, \'secondary\');\n doc.setFontSize(\'14\');\n doc.setFontType(\'bold\');\n doc.text(50, GlobalY, (invoice.is_quote ? invoiceLabels.your_quote : invoiceLabels.your_invoice).toUpperCase());\n\n\n var z=GlobalY;\n z=z+30;\n\n doc.setFontSize(\'8\'); \n SetPdfColor(\'Black\',doc); \n var clientHeight = displayClient(doc, invoice, layout.marginLeft, z, layout);\n layout.tableTop += Math.max(0, clientHeight - 75);\n marginLeft2=395;\n\n //publish left side information\n SetPdfColor(\'White\',doc);\n doc.setFontSize(\'8\');\n var detailsHeight = displayInvoice(doc, invoice, marginLeft2, z-25, layout) + 75;\n layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (2 * layout.tablePadding));\n\n y=z+60;\n x = GlobalY + 100;\n doc.setFontType(\'bold\');\n\n doc.setFontSize(12);\n doc.setFontType(\'bold\');\n SetPdfColor(\'Black\',doc);\n displayInvoiceHeader(doc, invoice, layout);\n\n var y = displayInvoiceItems(doc, invoice, layout);\n doc.setLineWidth(0.3);\n displayNotesAndTerms(doc, layout, invoice, y);\n y += displaySubtotals(doc, layout, invoice, y, layout.unitCostRight);\n\n doc.setFontType(\'bold\');\n\n doc.setFontSize(12);\n x += doc.internal.getFontSize()*4;\n Msg = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due;\n var TmpMsgX = layout.unitCostRight-(doc.getStringUnitWidth(Msg) * doc.internal.getFontSize());\n\n doc.text(TmpMsgX, y, Msg);\n\n //SetPdfColor(\'LightBlue\',doc);\n AmountText = formatMoney(invoice.balance_amount , currencyId);\n headerLeft=layout.headerRight+400;\n var AmountX = headerLeft - (doc.getStringUnitWidth(AmountText) * doc.internal.getFontSize());\n SetPdfColor(\'SomeGreen\', doc, \'secondary\');\n doc.text(AmountX, y, AmountText);','{\n \"content\": [\n {\n \"columns\": [\n {\n \"width\": 380,\n \"stack\": [\n {\"text\":\"$yourInvoiceLabelUC\", \"style\": \"yourInvoice\"},\n \"$clientDetails\"\n ],\n \"margin\": [60, 100, 0, 10]\n },\n {\n \"canvas\": [\n { \n \"type\": \"rect\", \n \"x\": 0, \n \"y\": 0, \n \"w\": 225, \n \"h\": \"$invoiceDetailsHeight\",\n \"r\":0, \n \"lineWidth\": 1,\n \"color\": \"$primaryColor:#36a498\"\n }\n ],\n \"width\":10,\n \"margin\":[-10,100,0,10]\n },\n { \n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [0, 110, 0, 0]\n }\n ]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": [\"22%\", \"*\", \"14%\", \"$quantityWidth\", \"$taxWidth\", \"22%\"],\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:14\", \n \"paddingBottom\": \"$amount:14\"\n }\n },\n {\n \"columns\": [\n {\n \"width\": 46,\n \"text\": \" \"\n },\n \"$notesAndTerms\",\n {\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\":\n [\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 600, \"y2\": 0,\"lineWidth\": 100,\"lineColor\":\"$secondaryColor:#292526\"}]},\n {\n \"columns\":\n [\n {\n \"text\": \"$invoiceFooter\",\n \"margin\": [40, -40, 40, 0],\n \"alignment\": \"left\",\n \"color\": \"#FFFFFF\"\n }\n ]\n }\n ],\n \"header\": [\n {\n \"canvas\": [\n {\n \"type\": \"line\",\n \"x1\": 0,\n \"y1\": 0,\n \"x2\": 600,\n \"y2\": 0,\n \"lineWidth\": 200,\n \"lineColor\": \"$secondaryColor:#292526\"\n }\n ],\n \"width\": 10\n },\n {\n \"columns\": [\n { \n \"image\": \"$accountLogo\",\n \"fit\": [120, 60],\n \"margin\": [30, 16, 0, 0]\n },\n {\n \"stack\": \"$accountDetails\",\n \"margin\": [\n 0,\n 16,\n 0,\n 0\n ],\n \"width\": 140\n },\n {\n \"stack\": \"$accountAddress\",\n \"margin\": [\n 20,\n 16,\n 0,\n 0\n ]\n }\n ]\n }\n ],\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#36a498\"\n },\n \"accountName\": {\n \"bold\": true,\n \"margin\": [4, 2, 4, 1],\n \"color\": \"$primaryColor:#36a498\"\n },\n \"accountDetails\": {\n \"margin\": [4, 2, 4, 1],\n \"color\": \"#FFFFFF\"\n },\n \"accountAddress\": {\n \"margin\": [4, 2, 4, 1],\n \"color\": \"#FFFFFF\"\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"odd\": {\n \"fillColor\": \"#ebebeb\",\n \"margin\": [0,0,0,0]\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#36a498\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#36a498\",\n \"bold\": true\n },\n \"invoiceDetails\": {\n \"color\": \"#ffffff\"\n },\n \"invoiceNumber\": {\n \"bold\": true\n },\n \"itemTableHeader\": {\n \"margin\": [40,0,0,0]\n },\n \"totalTableHeader\": {\n \"margin\": [0,0,40,0]\n },\n \"tableHeader\": {\n \"fontSize\": 12,\n \"bold\": true\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\",\n \"margin\": [0, 0, 40, 0]\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#36a498\",\n \"margin\": [40,0,0,0],\n \"bold\": true\n },\n \"yourInvoice\": {\n \"font\": \"$headerFont\",\n \"bold\": true, \n \"fontSize\": 14, \n \"color\": \"$primaryColor:#36a498\",\n \"margin\": [0,0,0,8]\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 26, 0, 16]\n },\n \"clientName\": {\n \"bold\": true\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\",\n \"margin\": [0, 0, 40, 0]\n },\n \"subtotals\": {\n \"alignment\": \"right\",\n \"margin\": [0,0,40,0]\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [47, 0, 47, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [0, 80, 0, 40]\n }'),(3,'Modern',' var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id;\n\n layout.headerRight = 400;\n layout.rowHeight = 15;\n\n\n doc.setFontSize(7);\n\n // add header\n doc.setLineWidth(0.5);\n\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setDrawColor(242,101,34);\n doc.setFillColor(242,101,34);\n } \n\n var x1 =0;\n var y1 = 0;\n var w2 = 595;\n var h2 = Math.max(110, getInvoiceDetailsHeight(invoice, layout) + 30);\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n SetPdfColor(\'White\',doc);\n\n //second column\n doc.setFontType(\'bold\');\n var name = invoice.account.name; \n if (name) {\n doc.setFontSize(\'30\');\n doc.setFontType(\'bold\');\n doc.text(40, 50, name);\n }\n\n if (invoice.image)\n {\n y=130;\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', layout.marginLeft, y);\n }\n\n // add footer \n doc.setLineWidth(0.5);\n\n if (NINJA.primaryColor) {\n setDocHexFill(doc, NINJA.primaryColor);\n setDocHexDraw(doc, NINJA.primaryColor);\n } else {\n doc.setDrawColor(242,101,34);\n doc.setFillColor(242,101,34);\n } \n\n var x1 = 0;//tableLeft-tablePadding ;\n var y1 = 750;\n var w2 = 596;\n var h2 = 94;//doc.internal.getFontSize()*length+length*1.1;//+h;//+tablePadding;\n\n doc.rect(x1, y1, w2, h2, \'FD\');\n\n if (!invoice.is_pro && logoImages.imageLogo3)\n {\n pageHeight=820;\n // var left = 25;//250;//headerRight ;\n y=pageHeight-logoImages.imageLogoHeight3;\n //var headerRight=370;\n\n //var left = headerRight - invoice.imageLogoWidth3;\n doc.addImage(logoImages.imageLogo3, \'JPEG\', 40, y, logoImages.imageLogoWidth3, logoImages.imageLogoHeight3);\n }\n\n doc.setFontSize(10); \n var marginLeft = 340;\n displayAccount(doc, invoice, marginLeft, 780, layout);\n\n\n SetPdfColor(\'White\',doc); \n doc.setFontSize(\'8\');\n var detailsHeight = displayInvoice(doc, invoice, layout.headerRight, layout.accountTop-10, layout);\n layout.headerTop = Math.max(layout.headerTop, detailsHeight + 50);\n layout.tableTop = Math.max(layout.tableTop, detailsHeight + 150);\n\n SetPdfColor(\'Black\',doc); //set black color\n doc.setFontSize(7);\n doc.setFontType(\'normal\');\n displayClient(doc, invoice, layout.headerRight, layout.headerTop, layout);\n\n\n \n SetPdfColor(\'White\',doc); \n doc.setFontType(\'bold\');\n\n doc.setLineWidth(0.3);\n if (NINJA.secondaryColor) {\n setDocHexFill(doc, NINJA.secondaryColor);\n setDocHexDraw(doc, NINJA.secondaryColor);\n } else {\n doc.setDrawColor(63,60,60);\n doc.setFillColor(63,60,60);\n } \n\n var left = layout.marginLeft - layout.tablePadding;\n var top = layout.tableTop - layout.tablePadding;\n var width = layout.marginRight - (2 * layout.tablePadding);\n var height = 20;\n doc.rect(left, top, width, height, \'FD\');\n \n\n displayInvoiceHeader(doc, invoice, layout);\n SetPdfColor(\'Black\',doc);\n var y = displayInvoiceItems(doc, invoice, layout);\n\n\n var height1 = displayNotesAndTerms(doc, layout, invoice, y);\n var height2 = displaySubtotals(doc, layout, invoice, y, layout.unitCostRight);\n y += Math.max(height1, height2);\n\n\n var left = layout.marginLeft - layout.tablePadding;\n var top = y - layout.tablePadding;\n var width = layout.marginRight - (2 * layout.tablePadding);\n var height = 20;\n if (NINJA.secondaryColor) {\n setDocHexFill(doc, NINJA.secondaryColor);\n setDocHexDraw(doc, NINJA.secondaryColor);\n } else {\n doc.setDrawColor(63,60,60);\n doc.setFillColor(63,60,60);\n } \n doc.rect(left, top, width, height, \'FD\');\n \n doc.setFontType(\'bold\');\n SetPdfColor(\'White\', doc);\n doc.setFontSize(12);\n \n var label = invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due;\n var labelX = layout.unitCostRight-(doc.getStringUnitWidth(label) * doc.internal.getFontSize());\n doc.text(labelX, y+2, label);\n\n\n doc.setFontType(\'normal\');\n var amount = formatMoney(invoice.balance_amount , currencyId);\n headerLeft=layout.headerRight+400;\n var amountX = layout.lineTotalRight - (doc.getStringUnitWidth(amount) * doc.internal.getFontSize());\n doc.text(amountX, y+2, amount);','{\n \"content\": [\n {\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80],\n \"margin\": [0, 60, 0, 30]\n },\n {\n \"stack\": \"$clientDetails\",\n \"margin\": [0, 60, 0, 0]\n }\n ]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$notFirstAndLastColumn:.5\",\n \"hLineColor\": \"#888888\",\n \"vLineColor\": \"#FFFFFF\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:8\",\n \"paddingBottom\": \"$amount:8\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n },\n {\n \"columns\": [\n {\n \"canvas\": [\n {\n \"type\": \"rect\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 515,\n \"h\": 26,\n \"r\": 0,\n \"lineWidth\": 1,\n \"color\": \"$secondaryColor:#403d3d\"\n }\n ],\n \"width\": 10,\n \"margin\": [\n 0,\n 10,\n 0,\n 0\n ]\n },\n {\n \"text\": \"$balanceDueLabel\",\n \"style\": \"subtotalsBalanceDueLabel\",\n \"margin\": [0, 16, 0, 0],\n \"width\": 370\n },\n {\n \"text\": \"$balanceDue\",\n \"style\": \"subtotalsBalanceDue\",\n \"margin\": [0, 16, 8, 0]\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": [\n {\n \"canvas\": [\n {\n \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 600, \"y2\": 0,\"lineWidth\": 100,\"lineColor\":\"$primaryColor:#f26621\"\n }]\n ,\"width\":10\n },\n {\n \"columns\": [\n {\n \"width\": 350,\n \"stack\": [\n {\n \"text\": \"$invoiceFooter\",\n \"margin\": [40, -40, 40, 0],\n \"alignment\": \"left\",\n \"color\": \"#FFFFFF\"\n\n }\n ]\n },\n {\n \"stack\": \"$accountDetails\",\n \"margin\": [0, -40, 0, 0],\n \"width\": \"*\"\n },\n {\n \"stack\": \"$accountAddress\",\n \"margin\": [0, -40, 0, 0],\n \"width\": \"*\"\n }\n ]\n }\n ],\n \"header\": [\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 600, \"y2\": 0,\"lineWidth\": 200,\"lineColor\":\"$primaryColor:#f26621\"}],\"width\":10\n },\n {\n \"columns\": [\n {\n \"text\": \"$accountName\", \"bold\": true,\"font\":\"$headerFont\",\"fontSize\":30,\"color\":\"#ffffff\",\"margin\":[40,20,0,0],\"width\":350\n }\n ]\n },\n {\n \"width\": 300,\n \"table\": {\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [400, -40, 0, 0]\n }\n ],\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountName\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountDetails\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"#FFFFFF\"\n },\n \"accountAddress\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"#FFFFFF\"\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 4, 2]\n },\n \"invoiceDetails\": {\n \"color\": \"#FFFFFF\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 0, 0, 16]\n },\n \"productKey\": {\n \"bold\": true\n },\n \"clientName\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"color\": \"#FFFFFF\",\n \"fontSize\": \"$fontSizeLargest\",\n \"fillColor\": \"$secondaryColor:#403d3d\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\":\"#FFFFFF\",\n \"alignment\":\"right\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\":\"#FFFFFF\",\n \"bold\": true,\n \"alignment\":\"right\"\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"invoiceNumberLabel\": {\n \"bold\": true\n },\n \"invoiceNumber\": {\n \"bold\": true\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [7, 0, 7, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [40, 120, 40, 50]\n}\n'),(4,'Plain',' var client = invoice.client;\n var account = invoice.account;\n var currencyId = client.currency_id; \n \n layout.accountTop += 25;\n layout.headerTop += 25;\n layout.tableTop += 25;\n\n if (invoice.image)\n {\n var left = layout.headerRight - invoice.imageWidth;\n doc.addImage(invoice.image, \'JPEG\', left, 50);\n } \n \n /* table header */\n doc.setDrawColor(200,200,200);\n doc.setFillColor(230,230,230);\n \n var detailsHeight = getInvoiceDetailsHeight(invoice, layout);\n var left = layout.headerLeft - layout.tablePadding;\n var top = layout.headerTop + detailsHeight - layout.rowHeight - layout.tablePadding;\n var width = layout.headerRight - layout.headerLeft + (2 * layout.tablePadding);\n var height = layout.rowHeight + 1;\n doc.rect(left, top, width, height, \'FD\'); \n\n doc.setFontSize(10);\n doc.setFontType(\'normal\');\n\n displayAccount(doc, invoice, layout.marginLeft, layout.accountTop, layout);\n displayClient(doc, invoice, layout.marginLeft, layout.headerTop, layout);\n\n displayInvoice(doc, invoice, layout.headerLeft, layout.headerTop, layout, layout.headerRight);\n layout.tableTop = Math.max(layout.tableTop, layout.headerTop + detailsHeight + (2 * layout.tablePadding));\n\n var headerY = layout.headerTop;\n var total = 0;\n\n doc.setDrawColor(200,200,200);\n doc.setFillColor(230,230,230);\n var left = layout.marginLeft - layout.tablePadding;\n var top = layout.tableTop - layout.tablePadding;\n var width = layout.headerRight - layout.marginLeft + (2 * layout.tablePadding);\n var height = layout.rowHeight + 2;\n doc.rect(left, top, width, height, \'FD\'); \n\n displayInvoiceHeader(doc, invoice, layout);\n var y = displayInvoiceItems(doc, invoice, layout);\n\n doc.setFontSize(10);\n\n displayNotesAndTerms(doc, layout, invoice, y+20);\n\n y += displaySubtotals(doc, layout, invoice, y+20, 480) + 20;\n\n doc.setDrawColor(200,200,200);\n doc.setFillColor(230,230,230);\n \n var left = layout.footerLeft - layout.tablePadding;\n var top = y - layout.tablePadding;\n var width = layout.headerRight - layout.footerLeft + (2 * layout.tablePadding);\n var height = layout.rowHeight + 2;\n doc.rect(left, top, width, height, \'FD\'); \n \n doc.setFontType(\'bold\');\n doc.text(layout.footerLeft, y, invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due);\n\n total = formatMoney(invoice.balance_amount, currencyId);\n var totalX = layout.headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());\n doc.text(totalX, y, total); \n\n if (!invoice.is_pro) {\n doc.setFontType(\'normal\');\n doc.text(layout.marginLeft, 790, \'Created by InvoiceNinja.com\');\n }','{\n \"content\": [\n {\n \"columns\": [\n {\n \"stack\": \"$accountDetails\"\n },\n {\n \"stack\": \"$accountAddress\"\n },\n [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n }\n ] \n ]},\n {\n \"columns\": [\n {\n \"width\": 340,\n \"stack\": \"$clientDetails\",\n \"margin\": [0,40,0,0]\n },\n {\n \"width\":200,\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#E6E6E6\",\n \"paddingLeft\": \"$amount:10\", \n \"paddingRight\": \"$amount:10\"\n }\n }\n ]\n }, \n {\n \"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 515, \"h\": 25,\"r\":0, \"lineWidth\": 1,\"color\":\"#e6e6e6\"}],\"width\":10,\"margin\":[0,30,0,-43]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:1\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#e6e6e6\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:8\", \n \"paddingBottom\": \"$amount:8\" \n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"width\": 160,\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [60, 60],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:10\", \n \"paddingRight\": \"$amount:10\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }\n ]\n }, \n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\",\n \"margin\": [0, 0, 0, 12]\n\n }\n ],\n \"margin\": [40, -20, 40, 40]\n },\n \"defaultStyle\": {\n \"font\": \"$bodyFont\",\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"tableHeader\": {\n \"bold\": true\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"invoiceLineItemsTable\": {\n \"margin\": [0, 16, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"terms\": {\n \"margin\": [0, 0, 20, 0]\n },\n \"invoiceDetailBalanceDueLabel\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"invoiceDetailBalanceDue\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"subtotalsBalanceDue\": {\n \"fillColor\": \"#e6e6e6\"\n },\n \"header\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"font\": \"$headerFont\",\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n },\n \"invoiceDocuments\": {\n \"margin\": [7, 0, 7, 0]\n },\n \"invoiceDocument\": {\n \"margin\": [0, 10, 0, 10]\n }\n },\n \"pageMargins\": [40, 40, 40, 60]\n}\n'),(5,'Business',NULL,'{\n \"content\": [\n {\n \"columns\":\n [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\n \"width\": 300,\n \"stack\": \"$accountDetails\",\n \"margin\": [140, 0, 0, 0]\n },\n {\n \"width\": 150,\n \"stack\": \"$accountAddress\"\n }\n ]\n },\n {\n \"columns\": [\n {\n \"width\": 120,\n \"stack\": [\n {\"text\": \"$invoiceIssuedToLabel\", \"style\":\"issuedTo\"},\n \"$clientDetails\"\n ],\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"canvas\": [{ \"type\": \"rect\", \"x\": 20, \"y\": 0, \"w\": 174, \"h\": \"$invoiceDetailsHeight\",\"r\":10, \"lineWidth\": 1,\"color\":\"$primaryColor:#eb792d\"}],\n \"width\":30,\n \"margin\":[200,25,0,0]\n },\n {\n \"table\": {\n \"widths\": [70, 76],\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [200, 34, 0, 0]\n }\n ]\n },\n {\"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 515, \"h\": 32,\"r\":8, \"lineWidth\": 1,\"color\":\"$secondaryColor:#374e6b\"}],\"width\":10,\"margin\":[0,20,0,-45]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:1\",\n \"vLineWidth\": \"$notFirst:.5\",\n \"hLineColor\": \"#FFFFFF\",\n \"vLineColor\": \"#FFFFFF\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:12\",\n \"paddingBottom\": \"$amount:12\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"stack\": [\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n },\n {\n \"canvas\": [\n {\n \"type\": \"rect\",\n \"x\": 60,\n \"y\": 20,\n \"w\": 198,\n \"h\": 30,\n \"r\": 7,\n \"lineWidth\": 1,\n \"color\": \"$secondaryColor:#374e6b\"\n }\n ]\n },\n {\n \"style\": \"subtotalsBalance\",\n \"table\": {\n \"widths\": [\"*\", \"45%\"],\n \"body\": \"$subtotalsBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#299CC2\"\n },\n \"accountName\": {\n \"bold\": true\n },\n \"accountDetails\": {\n \"color\": \"#AAA9A9\",\n \"margin\": [0,2,0,1]\n },\n \"accountAddress\": {\n \"color\": \"#AAA9A9\",\n \"margin\": [0,2,0,1]\n },\n \"even\": {\n \"fillColor\":\"#E8E8E8\"\n },\n \"odd\": {\n \"fillColor\":\"#F7F7F7\"\n },\n \"productKey\": {\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"#ffffff\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true,\n \"color\":\"#ffffff\",\n \"alignment\":\"right\",\n \"noWrap\":true\n },\n \"invoiceDetails\": {\n \"color\": \"#ffffff\"\n },\n \"tableHeader\": {\n \"color\": \"#ffffff\",\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"secondTableHeader\": {\n \"color\": \"$secondaryColor:#374e6b\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"issuedTo\": {\n \"margin\": [0,2,0,1],\n \"bold\": true,\n \"color\": \"#374e6b\"\n },\n \"clientDetails\": {\n \"margin\": [0,2,0,1]\n },\n \"clientName\": {\n \"color\": \"$primaryColor:#eb792d\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 10, 0, 10]\n },\n \"invoiceDetailsValue\": {\n \"alignment\": \"right\"\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"subtotalsBalance\": {\n \"alignment\": \"right\",\n \"margin\": [0, -25, 0, 0]\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(6,'Creative',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"stack\": \"$clientDetails\"\n },\n {\n \"stack\": \"$accountDetails\"\n },\n {\n \"stack\": \"$accountAddress\"\n },\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80],\n \"alignment\": \"right\"\n }\n ],\n \"margin\": [0, 0, 0, 20]\n },\n {\n \"columns\": [\n {\"text\":\n [\n {\"text\": \"$entityTypeUC\", \"style\": \"header1\"},\n {\"text\": \" #\", \"style\": \"header2\"},\n {\"text\": \"$invoiceNumber\", \"style\":\"header2\"}\n ],\n \"width\": \"*\"\n },\n {\n \"width\":200,\n \"table\": {\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [16, 4, 0, 0]\n }\n ],\n \"margin\": [0, 0, 0, 20]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 5, \"x2\": 515, \"y2\": 5, \"lineWidth\": 3,\"lineColor\":\"$primaryColor:#AE1E54\"}]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"$primaryColor:#E8E8E8\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:8\",\n \"paddingBottom\": \"$amount:8\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n },\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 20, \"x2\": 515, \"y2\": 20, \"lineWidth\": 3,\"lineColor\":\"$primaryColor:#AE1E54\"}],\n \"margin\": [0, -8, 0, -8]\n },\n {\n \"text\": \"$balanceDueLabel\",\n \"style\": \"subtotalsBalanceDueLabel\"\n },\n {\n \"text\": \"$balanceDue\",\n \"style\": \"subtotalsBalanceDue\"\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"primaryColor\":{\n \"color\": \"$primaryColor:#AE1E54\"\n },\n \"accountName\": {\n \"margin\": [4, 2, 4, 2],\n \"color\": \"$primaryColor:#AE1E54\",\n \"bold\": true\n },\n \"accountDetails\": {\n \"margin\": [4, 2, 4, 2]\n },\n \"accountAddress\": {\n \"margin\": [4, 2, 4, 2]\n },\n \"odd\": {\n \"fillColor\":\"#F4F4F4\"\n },\n \"productKey\": {\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"margin\": [320,20,0,0]\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#AE1E54\",\n \"bold\": true,\n \"margin\":[0,-10,10,0],\n \"alignment\": \"right\"\n },\n \"invoiceDetailBalanceDue\": {\n \"bold\": true,\n \"color\": \"$primaryColor:#AE1E54\"\n },\n \"invoiceDetailBalanceDueLabel\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"color\": \"$primaryColor:#AE1E54\",\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"clientName\": {\n \"bold\": true\n },\n \"clientDetails\": {\n \"margin\": [0,2,0,1]\n },\n \"header1\": {\n \"bold\": true,\n \"margin\": [0, 30, 0, 16],\n \"fontSize\": 42\n },\n \"header2\": {\n \"margin\": [0, 30, 0, 16],\n \"fontSize\": 42,\n \"italics\": true,\n \"color\": \"$primaryColor:#AE1E54\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 4, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(7,'Elegant',NULL,'{\n \"content\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80],\n \"alignment\": \"center\",\n \"margin\": [0, 0, 0, 30]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 5, \"x2\": 515, \"y2\": 5, \"lineWidth\": 2}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 3, \"x2\": 515, \"y2\": 3, \"lineWidth\": 1}]},\n {\n \"columns\": [\n {\n \"width\": 120,\n \"stack\": [\n {\"text\": \"$invoiceToLabel\", \"style\": \"header\", \"margin\": [0, 0, 0, 6]},\n \"$clientDetails\"\n ]\n },\n {\n \"width\": 10,\n \"canvas\": [{ \"type\": \"line\", \"x1\": -2, \"y1\": 18, \"x2\": -2, \"y2\": 80, \"lineWidth\": 1,\"dash\": { \"length\": 2 }}]\n },\n {\n \"width\": 120,\n \"stack\": \"$accountDetails\",\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"width\": 110,\n \"stack\": \"$accountAddress\",\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"stack\": [\n {\"text\": \"$detailsLabel\", \"style\": \"header\", \"margin\": [0, 0, 0, 6]},\n {\n \"width\":180,\n \"table\": {\n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\"\n }\n ]\n }],\n \"margin\": [0, 20, 0, 0]\n },\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:8\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:12\",\n \"paddingBottom\": \"$amount:12\"\n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n },\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 270, \"y1\": 20, \"x2\": 515, \"y2\": 20, \"lineWidth\": 1,\"dash\": { \"length\": 2 }}]\n },\n {\n \"text\": \"$balanceDueLabel\",\n \"style\": \"subtotalsBalanceDueLabel\"\n },\n {\n \"text\": \"$balanceDue\",\n \"style\": \"subtotalsBalanceDue\"\n },\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 270, \"y1\": 20, \"x2\": 515, \"y2\": 20, \"lineWidth\": 1,\"dash\": { \"length\": 2 }}]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }],\n \"footer\": [\n {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 35, \"y1\": 5, \"x2\": 555, \"y2\": 5, \"lineWidth\": 2,\"margin\": [30,0,0,0]}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 35, \"y1\": 3, \"x2\": 555, \"y2\": 3, \"lineWidth\": 1,\"margin\": [30,0,0,0]}]}\n ],\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientName\": {\n \"bold\": true\n },\n \"accountName\": {\n \"bold\": true\n },\n \"odd\": {\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#5a7b61\",\n \"margin\": [320,20,0,0]\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#5a7b61\",\n \"style\": true,\n \"margin\":[0,-14,8,0],\n \"alignment\":\"right\"\n },\n \"invoiceDetailBalanceDue\": {\n \"color\": \"$primaryColor:#5a7b61\",\n \"bold\": true\n },\n \"header\": {\n \"fontSize\": 14,\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"color\": \"$primaryColor:#5a7b61\",\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 40, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(8,'Hipster',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"width\":10,\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 0, \"y2\": 75, \"lineWidth\": 0.5}]\n },\n {\n \"width\":120,\n \"stack\": [\n {\"text\": \"$fromLabelUC\", \"style\": \"fromLabel\"}, \n \"$accountDetails\" \n ]\n },\n {\n \"width\":120,\n \"stack\": [\n {\"text\": \" \"},\n \"$accountAddress\"\n ],\n \"margin\": [10, 0, 0, 16]\n },\n {\n \"width\":10,\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 0, \"y2\": 75, \"lineWidth\": 0.5}]\n },\n {\n \"stack\": [\n {\"text\": \"$toLabelUC\", \"style\": \"toLabel\"}, \n \"$clientDetails\"\n ]\n },\n [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n }\n ]\n ]\n },\n {\n \"text\": \"$entityTypeUC\",\n \"margin\": [0, 4, 0, 8],\n \"bold\": \"true\",\n \"fontSize\": 42\n },\n {\n \"columnGap\": 16,\n \"columns\": [\n {\n \"width\":\"auto\",\n \"text\": [\"$invoiceNoLabel\",\" \",\"$invoiceNumberValue\"],\n \"bold\": true,\n \"color\":\"$primaryColor:#bc9f2b\",\n \"fontSize\":10\n },\n {\n \"width\":\"auto\",\n \"text\": [\"$invoiceDateLabel\",\" \",\"$invoiceDateValue\"],\n \"fontSize\":10\n },\n {\n \"width\":\"auto\",\n \"text\": [\"$dueDateLabel?\",\" \",\"$dueDateValue\"],\n \"fontSize\":10\n },\n {\n \"width\":\"*\",\n \"text\": [\"$balanceDueLabel\",\" \",{\"text\":\"$balanceDue\", \"bold\":true, \"color\":\"$primaryColor:#bc9f2b\"}],\n \"fontSize\":10\n }\n ]\n },\n {\n \"margin\": [0, 26, 0, 0],\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$amount:.5\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:8\", \n \"paddingBottom\": \"$amount:8\" \n }\n },\n {\n \"columns\": [\n {\n \"stack\": \"$notesAndTerms\",\n \"width\": \"*\",\n \"margin\": [0, 12, 0, 0]\n },\n {\n \"width\": 200,\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"36%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$notFirst:.5\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:12\", \n \"paddingBottom\": \"$amount:4\" \n }\n }\n ]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"accountName\": {\n \"bold\": true\n },\n \"clientName\": {\n \"bold\": true\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#bc9f2b\",\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"taxTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"fromLabel\": {\n \"color\": \"$primaryColor:#bc9f2b\",\n \"bold\": true \n },\n \"toLabel\": {\n \"color\": \"$primaryColor:#bc9f2b\",\n \"bold\": true \n },\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 16, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(9,'Playful',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 190, \"h\": \"$invoiceDetailsHeight\",\"r\":5, \"lineWidth\": 1,\"color\":\"$primaryColor:#009d91\"}],\"width\":10,\"margin\":[200,0,0,0]},\n {\n \"width\":400,\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\",\n \"margin\": [210, 10, 10, 0]\n }\n ] \n },\n {\n \"margin\": [0, 18, 0, 0],\n \"columnGap\": 50,\n \"columns\": [\n {\n \"width\": 212,\n \"stack\": [\n {\"text\": \"$invoiceToLabel:\", \"style\": \"toLabel\"},\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 4, \"x2\": 150, \"y2\": 4, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}],\n \"margin\": [0, 0, 0, 4]\n },\n \"$clientDetails\",\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 9, \"x2\": 150, \"y2\": 9, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}]}\n ]\n },\n {\n \"width\": \"*\",\n \"stack\": [\n {\"text\": \"$fromLabel:\", \"style\": \"fromLabel\"},\n {\n \"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 4, \"x2\": 250, \"y2\": 4, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}],\n \"margin\": [0, 0, 0, 4]\n },\n {\"columns\":[\n \"$accountDetails\",\n \"$accountAddress\" \n ], \"columnGap\": 4}, \n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 9, \"x2\": 250, \"y2\": 9, \"lineWidth\": 1,\"dash\": { \"length\": 3 },\"lineColor\":\"$primaryColor:#009d91\"}]}\n ]\n }\n ]\n },\n {\"canvas\": [{ \"type\": \"rect\", \"x\": 0, \"y\": 0, \"w\": 515, \"h\": 35,\"r\":6, \"lineWidth\": 1,\"color\":\"$primaryColor:#009d91\"}],\"width\":10,\"margin\":[0,30,0,-30]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"$primaryColor:#009d91\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:8\", \n \"paddingBottom\": \"$amount:8\"\n }\n }, \n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"stack\": [\n {\n \"style\": \"subtotals\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsWithoutBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n },\n {\n \"canvas\": [\n {\n \"type\": \"rect\",\n \"x\": 76,\n \"y\": 20,\n \"w\": 182,\n \"h\": 30,\n \"r\": 4,\n \"lineWidth\": 1,\n \"color\": \"$primaryColor:#009d91\"\n }\n ]\n },\n {\n \"style\": \"subtotalsBalance\",\n \"table\": {\n \"widths\": [\"*\", \"35%\"],\n \"body\": \"$subtotalsBalance\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\",\n \"paddingRight\": \"$amount:8\",\n \"paddingTop\": \"$amount:4\",\n \"paddingBottom\": \"$amount:4\"\n }\n }\n ]\n }\n ]\n }, \n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n], \n \"footer\": [\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 38, \"x2\": 68, \"y2\": 38, \"lineWidth\": 6,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 68, \"y1\": 0, \"x2\": 135, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#1d766f\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 135, \"y1\": 0, \"x2\": 201, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 201, \"y1\": 0, \"x2\": 267, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#bf9730\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 267, \"y1\": 0, \"x2\": 333, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ac2b50\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 333, \"y1\": 0, \"x2\": 399, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#e60042\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 399, \"y1\": 0, \"x2\": 465, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 465, \"y1\": 0, \"x2\": 532, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 532, \"y1\": 0, \"x2\": 600, \"y2\": 0, \"lineWidth\": 6,\"lineColor\":\"#ac2b50\"}]},\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\",\n \"margin\": [40, -60, 40, 0]\n }\n ],\n \"header\": [\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 0, \"x2\": 68, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 68, \"y1\": 0, \"x2\": 135, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#1d766f\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 135, \"y1\": 0, \"x2\": 201, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 201, \"y1\": 0, \"x2\": 267, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#bf9730\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 267, \"y1\": 0, \"x2\": 333, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ac2b50\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 333, \"y1\": 0, \"x2\": 399, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#e60042\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 399, \"y1\": 0, \"x2\": 465, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ffb800\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 465, \"y1\": 0, \"x2\": 532, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#009d91\"}]},\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 532, \"y1\": 0, \"x2\": 600, \"y2\": 0, \"lineWidth\": 9,\"lineColor\":\"#ac2b50\"}]}\n ],\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"styles\": {\n \"accountName\": {\n \"color\": \"$secondaryColor:#bb3328\"\n },\n \"accountDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"accountAddress\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientDetails\": {\n \"margin\": [0, 2, 0, 1]\n },\n \"clientName\": {\n \"color\": \"$secondaryColor:#bb3328\"\n },\n \"even\": {\n \"fillColor\":\"#E8E8E8\"\n },\n \"odd\": {\n \"fillColor\":\"#F7F7F7\"\n },\n \"productKey\": {\n \"color\": \"$secondaryColor:#bb3328\"\n },\n \"lineTotal\": {\n \"bold\": true\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"#FFFFFF\"\n },\n \"secondTableHeader\": {\n \"color\": \"$primaryColor:#009d91\"\n },\n \"costTableHeader\": {\n \"alignment\": \"right\"\n },\n \"qtyTableHeader\": {\n \"alignment\": \"right\"\n },\n \"lineTotalTableHeader\": {\n \"alignment\": \"right\"\n }, \n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\":\"#FFFFFF\",\n \"bold\": true\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true,\n \"color\":\"#FFFFFF\",\n \"alignment\":\"right\"\n },\n \"invoiceDetails\": {\n \"color\": \"#FFFFFF\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 0, 0, 16]\n },\n \"invoiceDetailBalanceDueLabel\": {\n \"bold\": true\n },\n \"invoiceDetailBalanceDue\": {\n \"bold\": true\n },\n \"fromLabel\": {\n \"color\": \"$primaryColor:#009d91\"\n },\n \"toLabel\": {\n \"color\": \"$primaryColor:#009d91\"\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"subtotals\": {\n \"alignment\": \"right\"\n }, \n \"subtotalsBalance\": {\n \"alignment\": \"right\",\n \"margin\": [0, -25, 0, 0]\n }, \n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"subheader\": {\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 40, 40, 40]\n}\n'),(10,'Photo',NULL,'{\n \"content\": [\n {\n \"columns\": [\n {\n \"image\": \"$accountLogo\",\n \"fit\": [120, 80]\n },\n {\n \"text\": \"\",\n \"width\": \"*\"\n },\n {\n \"width\":180,\n \"table\": { \n \"body\": \"$invoiceDetails\"\n },\n \"layout\": \"noBorders\"\n }]\n },\n {\n \"image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAEZA4QDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6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68MWbfeIjHJ+lfn98Kf9VP/uj+tfePwS/5FK2/3F/kK5avRm0D0URbucgfjRUbfeNFcxrc/9k=\",\n \"margin\": [-40, 16, 0, 0],\n \"width\": 595\n },\n {\n \"margin\": [-20, -150, 0, 0],\n \"columnGap\": 8,\n \"columns\": [\n {\n \"width\": \"auto\",\n \"text\": \"$toLabel:\",\n \"style\": \"bold\",\n \"color\":\"#cd5138\"\n },\n {\n \"width\": \"*\",\n \"stack\": \"$clientDetails\",\n \"margin\": [4, 0, 0, 0]\n }\n ]\n },\n {\n \"margin\": [-20, 10, 0, 140],\n \"columnGap\": 8,\n \"columns\": [\n {\n \"width\": \"auto\",\n \"text\": \"$fromLabel:\",\n \"style\": \"bold\",\n \"color\":\"#cd5138\"\n },\n {\n \"width\": \"*\",\n \"stack\": [\n {\n \"width\": 150,\n \"stack\": \"$accountDetails\"\n },\n {\n \"width\": 150,\n \"stack\": \"$accountAddress\"\n }\n ]\n }\n ]\n },\n {\"canvas\": [{ \"type\": \"line\", \"x1\": 0, \"y1\": 5, \"x2\": 515, \"y2\": 5, \"lineWidth\": 1.5}],\"margin\":[0,0,0,-30]},\n {\n \"style\": \"invoiceLineItemsTable\",\n \"table\": {\n \"headerRows\": 1,\n \"widths\": \"$invoiceLineItemColumns\",\n \"body\": \"$invoiceLineItems\"\n },\n \"layout\": {\n \"hLineWidth\": \"$notFirst:.5\",\n \"vLineWidth\": \"$none\",\n \"hLineColor\": \"#000000\",\n \"paddingLeft\": \"$amount:8\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:10\", \n \"paddingBottom\": \"$amount:10\" \n }\n },\n {\n \"columns\": [\n \"$notesAndTerms\",\n {\n \"alignment\": \"right\",\n \"table\": {\n \"widths\": [\"*\", \"40%\"],\n \"body\": \"$subtotals\"\n },\n \"layout\": {\n \"hLineWidth\": \"$none\",\n \"vLineWidth\": \"$none\",\n \"paddingLeft\": \"$amount:34\", \n \"paddingRight\": \"$amount:8\", \n \"paddingTop\": \"$amount:4\", \n \"paddingBottom\": \"$amount:4\" \n }\n }]\n },\n {\n \"stack\": [\n \"$invoiceDocuments\"\n ],\n \"style\": \"invoiceDocuments\"\n }\n ],\n \"defaultStyle\": {\n \"fontSize\": \"$fontSize\",\n \"margin\": [8, 4, 8, 4]\n },\n \"footer\": {\n \"columns\": [\n {\n \"text\": \"$invoiceFooter\",\n \"alignment\": \"left\"\n }\n ],\n \"margin\": [40, -20, 40, 0]\n },\n \"styles\": {\n \"accountDetails\": {\n \"margin\": [0, 0, 0, 3]\n },\n \"accountAddress\": {\n \"margin\": [0, 0, 0, 3]\n },\n \"clientDetails\": {\n \"margin\": [0, 0, 0, 3]\n },\n \"productKey\": {\n \"color\": \"$primaryColor:#cd5138\"\n },\n \"lineTotal\": {\n \"color\": \"$primaryColor:#cd5138\"\n },\n \"tableHeader\": {\n \"bold\": true,\n \"fontSize\": \"$fontSizeLarger\"\n },\n \"subtotalsBalanceDueLabel\": {\n \"fontSize\": \"$fontSizeLargest\"\n },\n \"subtotalsBalanceDue\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"color\": \"$primaryColor:#cd5138\"\n },\n \"invoiceLineItemsTable\": {\n \"margin\": [0, 0, 0, 16]\n },\n \"cost\": {\n \"alignment\": \"right\"\n },\n \"quantity\": {\n \"alignment\": \"right\"\n },\n \"tax\": {\n \"alignment\": \"right\"\n },\n \"lineTotal\": {\n \"alignment\": \"right\"\n },\n \"termsLabel\": {\n \"bold\": true,\n \"margin\": [0, 0, 0, 4]\n },\n \"header\": {\n \"fontSize\": \"$fontSizeLargest\",\n \"bold\": true\n },\n \"help\": {\n \"fontSize\": \"$fontSizeSmaller\",\n \"color\": \"#737373\"\n }\n },\n \"pageMargins\": [40, 30, 40, 30]\n}\n'),(11,'Custom1',NULL,NULL),(12,'Custom2',NULL,NULL),(13,'Custom3',NULL,NULL); /*!40000 ALTER TABLE `invoice_designs` ENABLE KEYS */; UNLOCK TABLES; @@ -1351,8 +1352,8 @@ CREATE TABLE `invoice_items` ( `deleted_at` timestamp NULL DEFAULT NULL, `product_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `notes` text COLLATE utf8_unicode_ci NOT NULL, - `cost` decimal(13,2) NOT NULL, - `qty` decimal(13,2) DEFAULT NULL, + `cost` decimal(15,4) NOT NULL, + `qty` decimal(15,4) DEFAULT NULL, `tax_name1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tax_rate1` decimal(13,3) DEFAULT NULL, `public_id` int(10) unsigned NOT NULL, @@ -1531,7 +1532,7 @@ CREATE TABLE `languages` ( `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1540,7 +1541,7 @@ CREATE TABLE `languages` ( LOCK TABLES `languages` WRITE; /*!40000 ALTER TABLE `languages` DISABLE KEYS */; -INSERT INTO `languages` VALUES (1,'English','en'),(2,'Italian','it'),(3,'German','de'),(4,'French','fr'),(5,'Portuguese - Brazilian','pt_BR'),(6,'Dutch','nl'),(7,'Spanish','es'),(8,'Norwegian','nb_NO'),(9,'Danish','da'),(10,'Japanese','ja'),(11,'Swedish','sv'),(12,'Spanish - Spain','es_ES'),(13,'French - Canada','fr_CA'),(14,'Lithuanian','lt'),(15,'Polish','pl'),(16,'Czech','cs'),(17,'Croatian','hr'),(18,'Albanian','sq'),(19,'Greek','el'),(20,'English - United Kingdom','en_UK'),(21,'Portuguese - Portugal','pt_PT'),(22,'Slovenian','sl'),(23,'Finnish','fi'),(24,'Romanian','ro'),(25,'Turkish - Turkey','tr_TR'); +INSERT INTO `languages` VALUES (1,'English','en'),(2,'Italian','it'),(3,'German','de'),(4,'French','fr'),(5,'Portuguese - Brazilian','pt_BR'),(6,'Dutch','nl'),(7,'Spanish','es'),(8,'Norwegian','nb_NO'),(9,'Danish','da'),(10,'Japanese','ja'),(11,'Swedish','sv'),(12,'Spanish - Spain','es_ES'),(13,'French - Canada','fr_CA'),(14,'Lithuanian','lt'),(15,'Polish','pl'),(16,'Czech','cs'),(17,'Croatian','hr'),(18,'Albanian','sq'),(19,'Greek','el'),(20,'English - United Kingdom','en_UK'),(21,'Portuguese - Portugal','pt_PT'),(22,'Slovenian','sl'),(23,'Finnish','fi'),(24,'Romanian','ro'),(25,'Turkish - Turkey','tr_TR'),(26,'Thai','th'); /*!40000 ALTER TABLE `languages` ENABLE KEYS */; UNLOCK TABLES; @@ -1772,7 +1773,7 @@ CREATE TABLE `migrations` ( LOCK TABLES `migrations` WRITE; /*!40000 ALTER TABLE `migrations` DISABLE KEYS */; -INSERT INTO `migrations` VALUES ('2013_11_05_180133_confide_setup_users_table',1),('2013_11_28_195703_setup_countries_table',1),('2014_02_13_151500_add_cascase_drops',1),('2014_02_19_151817_add_support_for_invoice_designs',1),('2014_03_03_155556_add_phone_to_account',1),('2014_03_19_201454_add_language_support',1),('2014_03_20_200300_create_payment_libraries',1),('2014_03_23_051736_enable_forcing_jspdf',1),('2014_03_25_102200_add_sort_and_recommended_to_gateways',1),('2014_04_03_191105_add_pro_plan',1),('2014_04_17_100523_add_remember_token',1),('2014_04_17_145108_add_custom_fields',1),('2014_04_23_170909_add_products_settings',1),('2014_04_29_174315_add_advanced_settings',1),('2014_05_17_175626_add_quotes',1),('2014_06_17_131940_add_accepted_credit_cards_to_account_gateways',1),('2014_07_13_142654_one_click_install',1),('2014_07_17_205900_support_hiding_quantity',1),('2014_07_24_171214_add_zapier_support',1),('2014_10_01_141248_add_company_vat_number',1),('2014_10_05_141856_track_last_seen_message',1),('2014_10_06_103529_add_timesheets',1),('2014_10_06_195330_add_invoice_design_table',1),('2014_10_13_054100_add_invoice_number_settings',1),('2014_10_14_225227_add_danish_translation',1),('2014_10_22_174452_add_affiliate_price',1),('2014_10_30_184126_add_company_id_number',1),('2014_11_04_200406_allow_null_client_currency',1),('2014_12_03_154119_add_discount_type',1),('2015_02_12_102940_add_email_templates',1),('2015_02_17_131714_support_token_billing',1),('2015_02_27_081836_add_invoice_footer',1),('2015_03_03_140259_add_tokens',1),('2015_03_09_151011_add_ip_to_activity',1),('2015_03_15_174122_add_pdf_email_attachment_option',1),('2015_03_30_100000_create_password_resets_table',1),('2015_04_12_093447_add_sv_language',1),('2015_04_13_100333_add_notify_approved',1),('2015_04_16_122647_add_partial_amount_to_invoices',1),('2015_05_21_184104_add_font_size',1),('2015_05_27_121828_add_tasks',1),('2015_05_27_170808_add_custom_invoice_labels',1),('2015_06_09_134208_add_has_tasks_to_invoices',1),('2015_06_14_093410_enable_resuming_tasks',1),('2015_06_14_173025_multi_company_support',1),('2015_07_07_160257_support_locking_account',1),('2015_07_08_114333_simplify_tasks',1),('2015_07_19_081332_add_custom_design',1),('2015_07_27_183830_add_pdfmake_support',1),('2015_08_13_084041_add_formats_to_datetime_formats_table',1),('2015_09_04_080604_add_swap_postal_code',1),('2015_09_07_135935_add_account_domain',1),('2015_09_10_185135_add_reminder_emails',1),('2015_10_07_135651_add_social_login',1),('2015_10_21_075058_add_default_tax_rates',1),('2015_10_21_185724_add_invoice_number_pattern',1),('2015_10_27_180214_add_is_system_to_activities',1),('2015_10_29_133747_add_default_quote_terms',1),('2015_11_01_080417_encrypt_tokens',1),('2015_11_03_181318_improve_currency_localization',1),('2015_11_30_133206_add_email_designs',1),('2015_12_27_154513_add_reminder_settings',1),('2015_12_30_042035_add_client_view_css',1),('2016_01_04_175228_create_vendors_table',1),('2016_01_06_153144_add_invoice_font_support',1),('2016_01_17_155725_add_quote_to_invoice_option',1),('2016_01_18_195351_add_bank_accounts',1),('2016_01_24_112646_add_bank_subaccounts',1),('2016_01_27_173015_add_header_footer_option',1),('2016_02_01_135956_add_source_currency_to_expenses',1),('2016_02_25_152948_add_client_password',1),('2016_02_28_081424_add_custom_invoice_fields',1),('2016_03_14_066181_add_user_permissions',1),('2016_03_14_214710_add_support_three_decimal_taxes',1),('2016_03_22_168362_add_documents',1),('2016_03_23_215049_support_multiple_tax_rates',1),('2016_04_16_103943_enterprise_plan',1),('2016_04_18_174135_add_page_size',1),('2016_04_23_182223_payments_changes',1),('2016_05_16_102925_add_swap_currency_symbol_to_currency',1),('2016_05_18_085739_add_invoice_type_support',1),('2016_05_24_164847_wepay_ach',1),('2016_07_08_083802_support_new_pricing',1),('2016_07_13_083821_add_buy_now_buttons',1),('2016_08_10_184027_add_support_for_bots',1),('2016_09_05_150625_create_gateway_types',1),('2016_10_20_191150_add_expense_to_activities',1),('2016_11_03_113316_add_invoice_signature',1),('2016_11_03_161149_add_bluevine_fields',1),('2016_11_28_092904_add_task_projects',1),('2016_12_13_113955_add_pro_plan_discount',1),('2017_01_01_214241_add_inclusive_taxes',1),('2017_02_23_095934_add_custom_product_fields',1),('2017_03_16_085702_add_gateway_fee_location',1),('2017_04_16_101744_add_custom_contact_fields',1),('2017_04_30_174702_add_multiple_database_support',1),('2017_05_10_144928_add_oauth_to_lookups',1),('2017_05_16_101715_add_default_note_to_client',1),('2017_06_19_111515_update_dark_mode',1),('2017_07_18_124150_add_late_fees',1); +INSERT INTO `migrations` VALUES ('2013_11_05_180133_confide_setup_users_table',1),('2013_11_28_195703_setup_countries_table',1),('2014_02_13_151500_add_cascase_drops',1),('2014_02_19_151817_add_support_for_invoice_designs',1),('2014_03_03_155556_add_phone_to_account',1),('2014_03_19_201454_add_language_support',1),('2014_03_20_200300_create_payment_libraries',1),('2014_03_23_051736_enable_forcing_jspdf',1),('2014_03_25_102200_add_sort_and_recommended_to_gateways',1),('2014_04_03_191105_add_pro_plan',1),('2014_04_17_100523_add_remember_token',1),('2014_04_17_145108_add_custom_fields',1),('2014_04_23_170909_add_products_settings',1),('2014_04_29_174315_add_advanced_settings',1),('2014_05_17_175626_add_quotes',1),('2014_06_17_131940_add_accepted_credit_cards_to_account_gateways',1),('2014_07_13_142654_one_click_install',1),('2014_07_17_205900_support_hiding_quantity',1),('2014_07_24_171214_add_zapier_support',1),('2014_10_01_141248_add_company_vat_number',1),('2014_10_05_141856_track_last_seen_message',1),('2014_10_06_103529_add_timesheets',1),('2014_10_06_195330_add_invoice_design_table',1),('2014_10_13_054100_add_invoice_number_settings',1),('2014_10_14_225227_add_danish_translation',1),('2014_10_22_174452_add_affiliate_price',1),('2014_10_30_184126_add_company_id_number',1),('2014_11_04_200406_allow_null_client_currency',1),('2014_12_03_154119_add_discount_type',1),('2015_02_12_102940_add_email_templates',1),('2015_02_17_131714_support_token_billing',1),('2015_02_27_081836_add_invoice_footer',1),('2015_03_03_140259_add_tokens',1),('2015_03_09_151011_add_ip_to_activity',1),('2015_03_15_174122_add_pdf_email_attachment_option',1),('2015_03_30_100000_create_password_resets_table',1),('2015_04_12_093447_add_sv_language',1),('2015_04_13_100333_add_notify_approved',1),('2015_04_16_122647_add_partial_amount_to_invoices',1),('2015_05_21_184104_add_font_size',1),('2015_05_27_121828_add_tasks',1),('2015_05_27_170808_add_custom_invoice_labels',1),('2015_06_09_134208_add_has_tasks_to_invoices',1),('2015_06_14_093410_enable_resuming_tasks',1),('2015_06_14_173025_multi_company_support',1),('2015_07_07_160257_support_locking_account',1),('2015_07_08_114333_simplify_tasks',1),('2015_07_19_081332_add_custom_design',1),('2015_07_27_183830_add_pdfmake_support',1),('2015_08_13_084041_add_formats_to_datetime_formats_table',1),('2015_09_04_080604_add_swap_postal_code',1),('2015_09_07_135935_add_account_domain',1),('2015_09_10_185135_add_reminder_emails',1),('2015_10_07_135651_add_social_login',1),('2015_10_21_075058_add_default_tax_rates',1),('2015_10_21_185724_add_invoice_number_pattern',1),('2015_10_27_180214_add_is_system_to_activities',1),('2015_10_29_133747_add_default_quote_terms',1),('2015_11_01_080417_encrypt_tokens',1),('2015_11_03_181318_improve_currency_localization',1),('2015_11_30_133206_add_email_designs',1),('2015_12_27_154513_add_reminder_settings',1),('2015_12_30_042035_add_client_view_css',1),('2016_01_04_175228_create_vendors_table',1),('2016_01_06_153144_add_invoice_font_support',1),('2016_01_17_155725_add_quote_to_invoice_option',1),('2016_01_18_195351_add_bank_accounts',1),('2016_01_24_112646_add_bank_subaccounts',1),('2016_01_27_173015_add_header_footer_option',1),('2016_02_01_135956_add_source_currency_to_expenses',1),('2016_02_25_152948_add_client_password',1),('2016_02_28_081424_add_custom_invoice_fields',1),('2016_03_14_066181_add_user_permissions',1),('2016_03_14_214710_add_support_three_decimal_taxes',1),('2016_03_22_168362_add_documents',1),('2016_03_23_215049_support_multiple_tax_rates',1),('2016_04_16_103943_enterprise_plan',1),('2016_04_18_174135_add_page_size',1),('2016_04_23_182223_payments_changes',1),('2016_05_16_102925_add_swap_currency_symbol_to_currency',1),('2016_05_18_085739_add_invoice_type_support',1),('2016_05_24_164847_wepay_ach',1),('2016_07_08_083802_support_new_pricing',1),('2016_07_13_083821_add_buy_now_buttons',1),('2016_08_10_184027_add_support_for_bots',1),('2016_09_05_150625_create_gateway_types',1),('2016_10_20_191150_add_expense_to_activities',1),('2016_11_03_113316_add_invoice_signature',1),('2016_11_03_161149_add_bluevine_fields',1),('2016_11_28_092904_add_task_projects',1),('2016_12_13_113955_add_pro_plan_discount',1),('2017_01_01_214241_add_inclusive_taxes',1),('2017_02_23_095934_add_custom_product_fields',1),('2017_03_16_085702_add_gateway_fee_location',1),('2017_04_16_101744_add_custom_contact_fields',1),('2017_04_30_174702_add_multiple_database_support',1),('2017_05_10_144928_add_oauth_to_lookups',1),('2017_05_16_101715_add_default_note_to_client',1),('2017_06_19_111515_update_dark_mode',1),('2017_07_18_124150_add_late_fees',1),('2017_08_14_085334_increase_precision',1); /*!40000 ALTER TABLE `migrations` ENABLE KEYS */; UNLOCK TABLES; @@ -1823,7 +1824,7 @@ CREATE TABLE `payment_libraries` ( LOCK TABLES `payment_libraries` WRITE; /*!40000 ALTER TABLE `payment_libraries` DISABLE KEYS */; -INSERT INTO `payment_libraries` VALUES (1,'2017-08-07 08:11:37','2017-08-07 08:11:37','Omnipay',1),(2,'2017-08-07 08:11:37','2017-08-07 08:11:37','PHP-Payments [Deprecated]',1); +INSERT INTO `payment_libraries` VALUES (1,'2017-09-10 03:46:48','2017-09-10 03:46:48','Omnipay',1),(2,'2017-09-10 03:46:48','2017-09-10 03:46:48','PHP-Payments [Deprecated]',1); /*!40000 ALTER TABLE `payment_libraries` ENABLE KEYS */; UNLOCK TABLES; @@ -1933,7 +1934,7 @@ CREATE TABLE `payment_terms` ( LOCK TABLES `payment_terms` WRITE; /*!40000 ALTER TABLE `payment_terms` DISABLE KEYS */; -INSERT INTO `payment_terms` VALUES (1,7,'Net 7','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,1),(2,10,'Net 10','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,2),(3,14,'Net 14','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,3),(4,15,'Net 15','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,4),(5,30,'Net 30','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,5),(6,60,'Net 60','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,6),(7,90,'Net 90','2017-08-07 08:11:37','2017-08-07 08:11:37',NULL,0,0,7),(8,-1,'Net 0','2017-08-07 08:11:41','2017-08-07 08:11:41',NULL,0,0,0); +INSERT INTO `payment_terms` VALUES (1,7,'Net 7','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,1),(2,10,'Net 10','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,2),(3,14,'Net 14','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,3),(4,15,'Net 15','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,4),(5,30,'Net 30','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,5),(6,60,'Net 60','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,6),(7,90,'Net 90','2017-09-10 03:46:48','2017-09-10 03:46:48',NULL,0,0,7),(8,-1,'Net 0','2017-09-10 03:46:51','2017-09-10 03:46:51',NULL,0,0,0); /*!40000 ALTER TABLE `payment_terms` ENABLE KEYS */; UNLOCK TABLES; @@ -1951,7 +1952,7 @@ CREATE TABLE `payment_types` ( PRIMARY KEY (`id`), KEY `payment_types_gateway_type_id_foreign` (`gateway_type_id`), CONSTRAINT `payment_types_gateway_type_id_foreign` FOREIGN KEY (`gateway_type_id`) REFERENCES `gateway_types` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1960,7 +1961,7 @@ CREATE TABLE `payment_types` ( LOCK TABLES `payment_types` WRITE; /*!40000 ALTER TABLE `payment_types` DISABLE KEYS */; -INSERT INTO `payment_types` VALUES (1,'Apply Credit',NULL),(2,'Bank Transfer',2),(3,'Cash',NULL),(4,'Debit',1),(5,'ACH',2),(6,'Visa Card',1),(7,'MasterCard',1),(8,'American Express',1),(9,'Discover Card',1),(10,'Diners Card',1),(11,'EuroCard',1),(12,'Nova',1),(13,'Credit Card Other',1),(14,'PayPal',3),(15,'Google Wallet',NULL),(16,'Check',NULL),(17,'Carte Blanche',1),(18,'UnionPay',1),(19,'JCB',1),(20,'Laser',1),(21,'Maestro',1),(22,'Solo',1),(23,'Switch',1),(24,'iZettle',1),(25,'Swish',2),(26,'Venmo',NULL),(27,'Money Order',NULL); +INSERT INTO `payment_types` VALUES (1,'Apply Credit',NULL),(2,'Bank Transfer',2),(3,'Cash',NULL),(4,'Debit',1),(5,'ACH',2),(6,'Visa Card',1),(7,'MasterCard',1),(8,'American Express',1),(9,'Discover Card',1),(10,'Diners Card',1),(11,'EuroCard',1),(12,'Nova',1),(13,'Credit Card Other',1),(14,'PayPal',3),(15,'Google Wallet',NULL),(16,'Check',NULL),(17,'Carte Blanche',1),(18,'UnionPay',1),(19,'JCB',1),(20,'Laser',1),(21,'Maestro',1),(22,'Solo',1),(23,'Switch',1),(24,'iZettle',1),(25,'Swish',2),(26,'Venmo',NULL),(27,'Money Order',NULL),(28,'Alipay',7),(29,'Sofort',8); /*!40000 ALTER TABLE `payment_types` ENABLE KEYS */; UNLOCK TABLES; @@ -2051,8 +2052,8 @@ CREATE TABLE `products` ( `deleted_at` timestamp NULL DEFAULT NULL, `product_key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `notes` text COLLATE utf8_unicode_ci NOT NULL, - `cost` decimal(13,2) NOT NULL, - `qty` decimal(13,2) DEFAULT NULL, + `cost` decimal(15,4) NOT NULL, + `qty` decimal(15,4) DEFAULT NULL, `public_id` int(10) unsigned NOT NULL, `is_deleted` tinyint(1) NOT NULL DEFAULT '0', `custom_value1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -2591,4 +2592,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2017-08-07 14:11:41 +-- Dump completed on 2017-09-10 9:46:52 diff --git a/docs/api.rst b/docs/api.rst index 3a74705057fa..95b8dfdcae99 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,9 +1,9 @@ API === -Invoice Ninja provides a REST based API, `click here `_ to see the full list of methods available. +Invoice Ninja provides a RESTful API, `click here `_ to see the full list of methods available. -To access the API you first need to create a token using the "Tokens” page under "Advanced Settings”. +To access the API you first need to create a token using the "API Tokens” page under "Advanced Settings”. - **Zapier** [hosted or self-host]: https://zapier.com/zapbook/invoice-ninja/ - **Integromat**: https://www.integromat.com/en/integrations/invoiceninja @@ -93,6 +93,7 @@ Options The following options are available when creating an invoice. - ``email_invoice``: Email the invoice to the client. +- ``email_type``: Set to reminder1, reminder2 or reminder3 to use the reminder template. - ``auto_bill``: Attempt to auto-bill the invoice using stored payment methods or credits. - ``paid``: Create a payment for the defined amount. diff --git a/docs/clients.rst b/docs/clients.rst index 7123dd1abcb1..0b29c87acf63 100644 --- a/docs/clients.rst +++ b/docs/clients.rst @@ -8,9 +8,9 @@ Your clients are the core of your freelance business, and your Clients page is t List Clients """""""""""" -The Clients page is a list page that presents a summary of all your clients in a user-friendly table. Think of your Clients page as the “central station” of your invoicing activity. Most of your day-to-day invoicing actions can be taken from the various links and buttons that appear on the Clients list page. Now, we’ll take a closer look at the setup of the Clients page, and the range of actions available to you on the Clients page. +The Clients page is a list page that presents a summary of all your clients in a user-friendly table. Think of your Clients page as the “central station” of your client activity. Most of your day-to-day invoicing actions can be taken from the various links and buttons that appear on the Clients list page. And you can use the Clients list page as your starting point to explore more in-depth client information, edit client information, view current client statements, and more. Now, we’ll take a closer look at the setup of the Clients page, and the range of actions available to you on the Clients page. -To view your client list page, go to the main taskbar and click the Clients tab. +To view your client list page, go to the main sidebar and click the Clients tab. Overview ^^^^^^^^ @@ -20,8 +20,8 @@ The Clients page presents a list summary of all your current clients in a table - **Client:** The name of the client - **Contact:** The name of the primary contact person - **Email:** The client email address -- **Date Created:** The date the client was created in the system -- **Last Login:** The date an action was last taken for this client +- **Date Created:** The date the client was created +- **Last Login:** The date the client last logged in to the system - **Balance:** The client’s payment balance - **Action:** A range of actions you can take to manage activity relating to the selected client @@ -38,13 +38,10 @@ When you click on an action, you will be automatically redirected to the relevan - **New Quote** Enter a new quote on the Quotes / Create page - **Enter Payment** Enter a new payment on the Payments / Create page - **Enter Credit** Enter a new credit on the Credits / Create page -- **Archive client** Click to archive the client -- **Delete client** Click to delete the client +- **Enter Expense** Enter a new expense on the Expenses / Create page +- **Archive Client** Click to archive the client +- **Delete Client** Click to delete the client -Credits -^^^^^^^ - -You can manage your credits by visiting the Credits page directly from the Clients page. To open the Credits page, click on the gray Credits button that appears at the top right side of the page, to the left of the New Client + button. Sorting & Filtering Clients The sort and filter functions make it easy for you to manage and view your client information. @@ -53,21 +50,27 @@ Sort the clients table via any of the following data columns: Client, Contact, E Filter the clients list by completing the Filter field, situated at the top right of the page, to the left of the gray Credits button. Clients can be filtered according to the client name, contact person name, or elements of the client name or contact person name. Here’s an example: Let’s filter the table for a client named “Joe Smith” of “Best Ninja” company. You can type “best ninja”, or “best” or “ninja”, or even “bes”, or “nin”, or “ja”, or “Joe”, “Smith”, “Jo” “oe”, “th” or any other grouping of letters in the client name or contact person name. The filter function will automatically locate and present all the relevant entries. This function makes it easy to find clients with even minimal input of information. -.. Tip:: Need to search for a specific client in your Clients list? Start typing the first letters of the client's name and the filter will automatically present the relevant listings. +.. Tip: Need to search for a specific client in your Clients list? Start typing the first letters of the client's name and the filter will automatically present the relevant listings. + Archiving/Deleting ^^^^^^^^^^^^^^^^^^ -To archive or delete a specific client, hover over the client entry row, and open the Action drop-down list. Select Archive client or Delete client from the list. The Clients table will automatically refresh. Archived clients will appear in the table with a lighter gray font color, while deleted clients are hidden from view. +To archive or delete a specific client, hover over the client entry row, and open the Action drop-down list. Select Archive client or Delete client from the list. The Clients table will automatically refresh. + +- **Deleted clients** are displayed with a strike through and a red Deleted label in the Action column. +- **Archived clients** are displayed with an orange Archived label in the Action column. + Note: You can also archive or delete one or more clients via the gray Archive button that appears at the top left side of the Clients table. To archive or delete clients, check the relevant clients in the check boxes that appear in the far left column next to the client name. Then click on the Archive button, open the drop-down list and select the desired action. -Want to view archived or deleted clients? Check the box marked Show archived/deleted clients, situated to the right of the Archive button. The table will automatically refresh, and will now feature the full list of clients, including current, archived and deleted clients. +Want to view archived or deleted clients? +Click on the tag field located on the left top side of the screen, to the right of the gray Archive button. When you click on the field, a drop down menu will open, displaying all the filter tags: Active, Archived and Deleted. Select the tags you want, and the table will update automatically to display the filtered client list. -- **Deleted clients** are displayed with a strike through. -- **Archived clients** are displayed with a lighter gray font color. You can choose to restore or delete the archived client. To restore an archived client, hover with your mouse over the Action area for the relevant archived client. A gray Select button will appear. Click on the Select arrow, and choose Restore client from the drop-down list. To delete an archived client, select Delete client from the drop-down list of the Select button. +To restore a deleted client, hover with your mouse over the Action area for the relevant deleted client. A gray Select button will appear. Click on the Select arrow, and choose Restore client from the drop-down list. + Create Client """"""""""""" @@ -75,43 +78,139 @@ So, you’ve taken on a new client? Congratulations! Your Clients list is at the heart of your invoicing activity, so it's really important to maintain current information on all your clients. When you start working with a new client, the first thing you’ll need to do is to add the new client by entering their contact information and business details. -When creating and saving a new client to your Clients list, make sure to have the relevant, up-to-date information at hand. You are only required to enter the information one time. Invoice Ninja automatically tracks all invoicing activity for each client. Need to create an invoice, schedule a task or update a payment status? Simply select the client’s name from the Client list. +When creating and saving a new client to your Clients list, make sure to have the relevant, up-to-date information at hand. You are only required to enter the information one time. Invoice Ninja automatically tracks all invoicing activity for each client. -There are two ways to enter a new client: - -1. Via the Create Client page. -2. Or, while creating a new invoice. - -Here, we’re going to focus on entering a new client via the Create Client page. **Let’s Begin** -To enter a new client, go to the Clients tab, open the drop-down menu, and click on New Client. This will open the Create Client page. +To enter a new client, go to the Clients tab on the main sidebar, and click the + sign on the tab. This will open the Create Client page. Or, you can go to the Clients list page and click the blue New Client button at the top right side of the page. The Create Client page is divided into four sections. Enter the information in the relevant fields. -.. Note:: You don’t have to complete every field. Enter the information that is important or necessary for your needs. +.. Note: You don’t have to complete every field. Enter the information that is important or necessary for your needs. Let’s take a closer look at each section: - **Organization**: Enter details about your client’s business/company/organization, including the company name, ID number, VAT number, website address and telephone number. - **Contacts**: Enter the name, email address and phone number of your contact person for this client. You can enter as many contact people as you like. To add more contact people, click +Add Contact. - **Address**: Enter the street address of your client. This will be of particular importance if you need to send hard-copy invoices or payment receipts. -- **Additional Info**: Enter the payment currency, language, payment due date, company size (no. of employees), the relevant industry sector, and any other private notes or reminders you wish to add (don’t worry - no one can see them but you.) +- **Additional Info**: Enter the payment currency, language, payment terms, company size (no. of employees), the relevant industry sector, public notes (these will appear on the invoice by default) and private notes (don’t worry - no one can see them but you.) + +TIP: Understanding the Payment terms field – You may have different payment terms and agreements for various clients. Here, you can select the default due date for the specific client via the drop-down menu of the Payment terms field. The default due date is calculated according to the date on the invoice. For example, Net 0 means the payment is due on the date of the invoice; Net 7 means the payment is due 7 days after the date of the invoice, and so on. Note: Even if you choose default payment terms, you can always manually adjust an invoice payment due date for a specific invoice, via the Edit Invoice page. Once you have filled in the page, click Save to save the new client information. From now on, when you click the Client field, the client’s name will appear in the drop down menu. Simply select the client you need and let the invoicing begin! +Client Overview Page +"""""""""""""""""""" + +Each client has its own Client Overview page. The overview page provides a complete summary of all your client details and activity in one page. From here, you can access everything you need about the specific client, including the client's general contact information, total standing payments and balance, and a detailed list of the client Activity, Invoices, Payments and Credits. You can also Edit, Archive or Delete the client, view the Client Statement and view the Client Portal, all directly from the Client Overview page. Let's explore: + +How to view the Client Overview page +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To view the Client Overview page of a specific client, click on the client name in the Clients list page. + +Understanding the Client Overview page +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The top section of the Client Overview page displays general business and contact information that you entered when creating the client, including contact name, street address, payment terms, email address, as well as standing payment and balance data. You can also view the client portal from here, by clicking on the View client portal link that appears below the client's email address. + +.. TIP:: If you entered the client's street address, a Google map appears below the information box displaying the client's location. + +Client Data Table +^^^^^^^^^^^^^^^^^ + +Just below the client information box or Google map, you'll find the client's data table. The table displays a summary of your client's activity, invoices, payments and credits, in a simple accessible table format. It provides a fast summary of the data for the specific client only. + +To access the various data tables, choose from the menu bar: Activity, Invoices, Payments or Credits. + +Activity Table +************** + +The Activity table shows all the past activity with the client, in chronological order, with the most recent actions at the top. The table has 4 columns: + +- **Date**: The date the action was taken +- **Message**: The action that occurred +- **Balance**: The client's current balance +- **Adjustment**: The adjusted amount + +Invoices Table +************** + +The Invoices table shows a list of all the client's invoices and accompanying information. The table has 5 columns: + +- **Invoice**: The invoice number +- **Date**: The date the invoice was created +- **Amount**: The invoice amount +- **Balance**: The invoice balance +- **Due Date**: The date the payment is due +- **Status**: The status of the invoice (Draft, Sent, Viewed, Paid, Overdue) + +.. TIP:: You can also create a new invoice for this client via the blue New Invoice button that appears at the top right of the Invoices table. + +Payments Table +************** + +The Payments table shows a list of all the client's payments and accompanying information. The table has 7 columns: + +- **Invoice**: The invoice number +- **Transaction reference**: The reference number of the transaction +- **Method**: The payment method (ie. Paypal, manual entry, Amex, etc) +- **Source**: The source of the payment +- **Amount**: The payment amount +- **Date**: The date the payment was made +- **Status**: The status of the payment (ie. Pending, Completed, etc) + +.. TIP:: You can also enter a payment for this client via the blue Enter Payment button that appears at the top right of the Payments table. + +Credits Table +************* + +The Credits table shows a list of all the client's credits and accompanying information. The table has 5 columns: + +- **Amount**: The credit amount +- **Balance**: The current balance +- **Credit Date**: The date the credit was issued +- **Public Notes**: Comments entered by you (these will appear on the invoice) +- **Private Notes**: Notes added by you (for your eyes only; the client cannot see these notes) + +.. TIP:: You can also enter a credit for this client via the blue Enter Credit button that appears at the top right of the Credits table. + +Clickable Links on the Client Overview Page +******************************************* + +The Client Overview page is rich in clickable links to the client's invoices, payments, credits and any other data pages relating to the client. So you can quickly look up any information with a simple click of an IP link. Take for example the Activity table: if you recently updated the client's invoice, an entry will appear on the Activity table, with a Message of: "You Updated Invoice 53". "Invoice 53" will appear as a clickable link that takes you directly to the invoice. So you have fast access to every relevant invoice, quote, task, expense and more, directly from every listing on the Activity table. This also applies to the Invoices, Payments and Credit tables. TIP: Any invoicing action you need to take for the client can be done from the Client Overview page. + +Note: All the tables on the Client Overview page have Sort and Filter functions. You can filter by entering text into the filter field that appears above and to the right of the table. Also, each column can be sorted highest to lowest, or lowest to highest. Simply click on the small arrow that appears when you hover in the column heading field. + +Client Statement +^^^^^^^^^^^^^^^^ + +The client statement is a downloadable PDF document that provides a full and current statement of your client's balance. + +**View Statement**: To view the client statement, click the blue View Statement button that appears at the top right side of the Client Overview page. This will automatically generate the PDF statement. + +**Download Statement**: To download the PDF statement, click on the gray Download PDF button at the top right of the statement screen. + +**Return to Client Overview**: To return to the client overview page, click the blue View Client button at the top right of the statement screen. + +Actions on the View Statement Button +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can do all invoicing actions for the specific client with a click of the mouse, directly from the Client Overview page. Simply click on the arrow at the right hand side of the View Statement button. A drop-down menu will open, giving you quick access to all the actions: New Invoice, New Task, New Quote, New Recurring Invoice, Enter Payment, Enter Credit, Enter Expense. + How to Edit Client Information +****************************** -The information you enter on the Create Client page acts as your default settings for this client. You can change these settings at any time. How? There are two methods: -Via the Clients list +The information you enter on the Create Client page acts as your default settings for this client. You can change these settings at any time. How? By clicking on the gray Edit Client button on the Client Overview page. -1. Select the Clients tab to view your client list. -2. Select the relevant client from the list. The summary page of the client will open. -3. Click on the gray Edit Client button, at the top right corner of the page. You will now be taken to the Clients/Edit page, where you can edit any of the fields. +Edit Client +*********** -During the invoicing process +Click on the gray Edit Client button, at the top right corner of the page. You will now be taken to the Clients/Edit page, where you can edit any of the fields. -1. Open the New Invoice page. -2. Click on the arrow at the right end of the Client field, and select the client name from the drop down menu. -3. Click Edit Client, which appears below the Client field. This will open the Client window. You can now edit the client’s information. +Archiving or Deleting the Client +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can also archive or delete the specific client directly from their Client Overview page. +Click on the arrow at the right hand side of the Edit Client button. A drop-down menu will open, giving you the option to Archive Client or Delete Client. diff --git a/docs/conf.py b/docs/conf.py index a9fdb5c2cfc8..74a90d2c02fc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,9 +57,9 @@ author = u'Invoice Ninja' # built documents. # # The short X.Y version. -version = u'3.6' +version = u'3.7' # The full version, including alpha/beta/rc tags. -release = u'3.6.1' +release = u'3.7.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/introduction.rst b/docs/introduction.rst index 293120e2edbf..4c4c4acdbc7b 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -5,7 +5,7 @@ Let’s get acquainted with a basic overview of the structure of the Invoice Nin The Invoice Ninja system is based on two main pillars: -- **List pages** are summary pages of the various activities in your account. These include the Clients list page, Tasks list page, Invoices list page and Payments list page. List pages are located in the main taskbar of the Invoice Ninja site. Simply click on Clients, Tasks, Invoices or Payments to open the list page you need. The list pages provide a centralized overview and management station for the particular component of your account. For example, the Clients list page is a list of all your clients, with accompanying information and handy links, so you can manage all your clients on one page. +- **List pages** are summary pages of the various activities in your account. These include the Clients list page, Tasks list page, Invoices list page, Payments list page and more. List pages are located in the main sidebar of the Invoice Ninja site. The list pages provide a centralized overview and management station for the particular component of your account. For example, the Clients list page is a list of all your clients, with accompanying information and handy links, so you can manage all your clients on one page. - **Action pages** are pages dedicated to a specific action you can take in your Invoice Ninja account. Examples include Create New Client, Enter Credit, Create New Invoice, Create Recurring Invoice, Enter Credit, Enter Payment and Create New Task. All actions you take will be recorded in the List pages, updated in real time to reflect your invoicing activity from minute to minute. @@ -20,9 +20,24 @@ Welcome to the Dashboard page of your Invoice Ninja account. This is the first p So let’s jump right in and take a look at the different elements that make up your invoicing dashboard. -When you login to your Invoice Ninja account, you’ll automatically arrive on the Dashboard page. To go to the Dashboard page from anywhere in the site, click the Dashboard tab on the main taskbar. +When you login to your Invoice Ninja account, you’ll automatically arrive on the Dashboard page. To go to the Dashboard page from anywhere in the site, click the Dashboard tab on the main sidebar at the left of your screen. -The first thing you’ll notice about the Dashboard page is the three large data boxes at the top of the screen. These are designed to offer a simple yet powerful overview of your total business accounts: +Sidebar – Navigating Your Invoice Ninja Account +""""""""""""""""""""""""""""""""""""""""""""""" + +The Sidebar, at the left of your screen, is always visible, no matter where you are in your Invoice Ninja account. Use the sidebar to get where you want to go, quickly and easily. +When you click on a specific tab, you'll go to the list page. So, if you click on Invoices, you'll navigate to the Invoices list page. Same for Quotes, Payments, Products, Recurring, Credits and many others. + +Want to create a new invoice, quote, task, list, payment, or any other new item? Hover on the relevant tab, and click the blue plus sign that appears on the right hand side of the tab. You'll be automatically redirected to the "Create New…" page. + +The last two tabs on the list are Reports and Settings. Click on Reports to navigate to the reporting page of your account. Here you can create all types of reports about your invoicing. + +To manage any of your account settings, click on the Settings tab. Then you can work on the full range of account settings via the taskbar of the Settings page. + +Data Boxes – Your Instant Invoicing Overview +"""""""""""""""""""""""""""""""""""""""""""" + +One of the first things you’ll notice about the Dashboard page is the three large data boxes at the top of the screen. These are designed to offer a simple yet powerful overview of your total business accounts: - **Total Revenue**: The total amount that your business has brought in to date. - **Average Invoice**: The amount of the current average invoice. Note this will change over time, depending upon your income. @@ -30,14 +45,28 @@ The first thing you’ll notice about the Dashboard page is the three large data .. TIP:: If you are being paid in a range of currencies, the three data boxes on your dashboard will display the relevant amounts in all currencies. -Below the three main data boxes, there are four ‘windows’ summarizing different aspects of your invoicing activity. +Chart +Below the three main data boxes, you'll see a chart presenting your invoicing data in an easy-to-understand graphical format. The data presented in the chart will be based upon the filters you select. Let's check out how the filters work. -Window 1: Notifications +Filter +"""""" + +The Dashboard page gives you a summary overview of your invoicing activity – and the filter option enables you to control exactly what data you are seeing. There are three filter options: + +1. Currency: If you are working in various currencies, you can filter according to each currency to view your invoicing activity in only that currency. +2. Day/Week/Month: For an overview of the past day, week or month, select the time period you prefer. +3. Custom dates: Select any time period you want by filtering according to dates. Click on the custom date field, and you'll see a drop down menu with a range of pre-set options, such as "Last month", "This year", etc. To create a custom time frame, select "Custom range", choose your dates and click Apply. + +When you apply the filter, the data presented in the boxes and chart will update automatically. + +Below the chart, there are four ‘windows’ summarizing different aspects of your invoicing activity. + +Window 1: Activity """"""""""""""""""""""" -The Notifications list is incredibly useful as it presents an up-to-date, action-packed summary of what is happening across your entire invoicing account. Every action taken, whether by you or by one of your clients, is listed in chronological order, together with the date the action occurred. The list is updated in real time, with more recent actions showing first, so you get a minute-to-minute understanding of your invoicing activity. +The Activity list is incredibly useful as it presents an up-to-date, action-packed summary of what is happening across your entire invoicing account. Every action taken, whether by you or by one of your clients, is listed in chronological order, together with the date the action occurred. The list is updated in real time, with more recent actions showing first, so you get a minute-to-minute understanding of your invoicing activity. -The Notifications list includes all possible actions occurring within your Invoice Ninja account, including: +The Activity list includes all possible actions occurring within your Invoice Ninja account, including: - Creating an invoice - Sending an invoice @@ -48,7 +77,7 @@ The Notifications list includes all possible actions occurring within your Invoi - Your client sending a payment - And many, many more -.. TIP:: You can view a real-time tally of the number of invoices sent, displayed at the top right side of the blue Notifications header bar. +.. TIP:: You can view a real-time tally of the number of invoices sent, displayed at the top right side of the blue Activity header bar. Window 2: Recent Payments """"""""""""""""""""""""" @@ -81,7 +110,7 @@ The Invoices Past Due list provides a summary of all unpaid invoices. The Invoic - **Invoice #**: The invoice reference number - **Client**: The client’s name - **Due Date**: The original due date of the overdue payment -- **Balance**: Due The amount overdue +- **Balance Due**: The amount overdue .. NOTE:: Archived invoices, payments and quotes will appear on the dashboard, and their amounts will be included in the account totals at the top of the page. Deleted invoices, payments and quotes will not appear, nor will their amounts be included on the Dashboard page. @@ -109,3 +138,25 @@ The Expired Quotes list provides a summary of all quotes that have already passe - **Balance Due**: The amount of the quote .. TIP:: In addition to displaying a helpful overview of your invoicing activity, the Dashboard page is rich in clickable links, providing you with a shortcut to relevant pages you may wish to view. For example, all invoice numbers are clickable, taking you directly to the specific invoice page, and all client names are clickable, taking you directly to the specific client summary page. + +History Sidebar +""""""""""""""" + +At the right hand side of your Dashboard screen you'll find the History sidebar, which displays all your recent invoices in a chronological list according to invoice number, together with the name of the client. + +.. TIP:: You can create a new invoice for a particular client by hovering on the right hand side of the tab featuring the client's name. It's just another way to create a new invoice, fast. + +Hide/Show History Sidebar +************************* + +You can choose to hide or show the history sidebar at any time by clicking on the Toggle History button, located at the top right corner of the screen. The Toggle History button appears as three horizontal lines in the shape of a button. Click once to close the history sidebar; click again to open. + +Need Help? Feel like Sharing? Introducing Quick Links +""""""""""""""""""""""""""""""""""""""""""""""""""""" + +At the bottom left of the sidebar menu, you'll find a few quick links to make your Invoice Ninja experience even better. + +- **Email**: Click on the email icon to contact us. +- **Support**: Click on the support icon to visit our Support Forum. +- **Help**: Click on the question mark icon to view Keyboard Shortcuts and Voice Demand libraries. +- **Social media**: Click on the social media links to visit our Facebook, Twitter and Github pages. diff --git a/docs/mobile_apps.rst b/docs/mobile_apps.rst index f5d2269ed8c6..37b4dbe509fc 100644 --- a/docs/mobile_apps.rst +++ b/docs/mobile_apps.rst @@ -30,7 +30,7 @@ The second field is the API_SECRET, enter in the API_SECRET you used in your .en Click SAVE. -You should now be able to login! +You should now be able to login with your username and password! FAQ: diff --git a/docs/update.rst b/docs/update.rst index 067700b8daf2..abe29b6e3a9a 100644 --- a/docs/update.rst +++ b/docs/update.rst @@ -5,6 +5,8 @@ Update To update the app you just need to copy over the latest code. The app tracks the current version in a file called version.txt, if it notices a change it loads ``/update`` to run the database migrations. +https://download.invoiceninja.com + .. TIP:: You can use this `shell script `_ to automate the update process, consider running it as a daily cron to automatically keep your app up to date. If you're moving servers make sure to copy over the .env file. diff --git a/public/.htaccess b/public/.htaccess index 9d7726d979ef..357e5af7f549 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -21,3 +21,8 @@ # you have to enable the following line: # RewriteBase / + + + # Blocks Search Engine Indexing + Header set X-Robots-Tag "noindex, nofollow" + diff --git a/public/built.js b/public/built.js index 8849fdffcad7..68cb485cdd24 100644 --- a/public/built.js +++ b/public/built.js @@ -1,27 +1,27 @@ -function generatePDF(t,e,n,i){if(t&&e){if(!n)return refreshTimer&&clearTimeout(refreshTimer),void(refreshTimer=setTimeout(function(){generatePDF(t,e,!0,i)},500));refreshTimer=null,t=calculateAmounts(t);var o=GetPdfMake(t,e,i);return i&&o.getDataUrl(i),o}}function copyObject(t){return!!t&&JSON.parse(JSON.stringify(t))}function processVariables(t){if(!t)return"";for(var e=["MONTH","QUARTER","YEAR"],n=0;n1?c=r.split("+")[1]:r.split("-").length>1&&(c=parseInt(r.split("-")[1])*-1),t=t.replace(r,getDatePart(i,c))}}return t}function getDatePart(t,e){return e=parseInt(e),e||(e=0),"MONTH"==t?getMonth(e):"QUARTER"==t?getQuarter(e):"YEAR"==t?getYear(e):void 0}function getMonth(t){var e=new Date,n=["January","February","March","April","May","June","July","August","September","October","November","December"],i=e.getMonth();return i=parseInt(i)+t,i%=12,i<0&&(i+=12),n[i]}function getYear(t){var e=new Date,n=e.getFullYear();return parseInt(n)+t}function getQuarter(t){var e=new Date,n=Math.floor((e.getMonth()+3)/3);return n+=t,n%=4,0==n&&(n=4),"Q"+n}function isStorageSupported(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}}function isValidEmailAddress(t){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return e.test(t)}function enableHoverClick(t,e,n){}function setAsLink(t,e){e?(t.css("text-decoration","underline"),t.css("cursor","pointer")):(t.css("text-decoration","none"),t.css("cursor","text"))}function setComboboxValue(t,e,n){t.find("input").val(e),t.find("input.form-control").val(n),e&&n?(t.find("select").combobox("setSelected"),t.find(".combobox-container").addClass("combobox-selected")):t.find(".combobox-container").removeClass("combobox-selected")}function convertDataURIToBinary(t){var e=t.indexOf(BASE64_MARKER)+BASE64_MARKER.length,n=t.substring(e);return base64DecToArr(n)}function comboboxHighlighter(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=t.replace(new RegExp("
","g"),"\n");return n=stripHtmlTags(n),n=n.replace(new RegExp("("+e+")","ig"),function(t,n){return n?""+n+"":e}),n.replace(new RegExp("\n","g"),"
")}function comboboxMatcher(t){return~stripHtmlTags(t).toLowerCase().indexOf(this.query.toLowerCase())}function stripHtmlTags(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""}function getContactDisplayName(t){return t.first_name||t.last_name?$.trim((t.first_name||"")+" "+(t.last_name||"")):t.email}function getContactDisplayNameWithEmail(t){var e="";return(t.first_name||t.last_name)&&(e+=$.trim((t.first_name||"")+" "+(t.last_name||""))),t.email&&(e&&(e+=" - "),e+=t.email),$.trim(e)}function getClientDisplayName(t){var e=!!t.contacts&&t.contacts[0];return t.name?t.name:e?getContactDisplayName(e):""}function populateInvoiceComboboxes(t,e){for(var n={},i={},o={},a=$("select#client"),s=0;s1?t+=", ":n64&&t<91?t-65:t>96&&t<123?t-71:t>47&&t<58?t+4:43===t?62:47===t?63:0}function base64DecToArr(t,e){for(var n,i,o=t.replace(/[^A-Za-z0-9\+\/]/g,""),a=o.length,s=e?Math.ceil((3*a+1>>2)/e)*e:3*a+1>>2,r=new Uint8Array(s),c=0,l=0,u=0;u>>(16>>>n&24)&255;c=0}return r}function uint6ToB64(t){return t<26?t+65:t<52?t+71:t<62?t-4:62===t?43:63===t?47:65}function base64EncArr(t){for(var e=2,n="",i=t.length,o=0,a=0;a0&&4*a/3%76===0&&(n+="\r\n"),o|=t[a]<<(16>>>e&24),2!==e&&t.length-a!==1||(n+=String.fromCharCode(uint6ToB64(o>>>18&63),uint6ToB64(o>>>12&63),uint6ToB64(o>>>6&63),uint6ToB64(63&o)),o=0);return n.substr(0,n.length-2+e)+(2===e?"":1===e?"=":"==")}function UTF8ArrToStr(t){for(var e,n="",i=t.length,o=0;o251&&e<254&&o+5247&&e<252&&o+4239&&e<248&&o+3223&&e<240&&o+2191&&e<224&&o+1>>6),e[s++]=128+(63&n)):n<65536?(e[s++]=224+(n>>>12),e[s++]=128+(n>>>6&63),e[s++]=128+(63&n)):n<2097152?(e[s++]=240+(n>>>18),e[s++]=128+(n>>>12&63),e[s++]=128+(n>>>6&63),e[s++]=128+(63&n)):n<67108864?(e[s++]=248+(n>>>24),e[s++]=128+(n>>>18&63),e[s++]=128+(n>>>12&63),e[s++]=128+(n>>>6&63),e[s++]=128+(63&n)):(e[s++]=252+n/1073741824,e[s++]=128+(n>>>24&63),e[s++]=128+(n>>>18&63),e[s++]=128+(n>>>12&63),e[s++]=128+(n>>>6&63),e[s++]=128+(63&n));return e}function hexToR(t){return parseInt(cutHex(t).substring(0,2),16)}function hexToG(t){return parseInt(cutHex(t).substring(2,4),16)}function hexToB(t){return parseInt(cutHex(t).substring(4,6),16)}function cutHex(t){return"#"==t.charAt(0)?t.substring(1,7):t}function setDocHexColor(t,e){var n=hexToR(e),i=hexToG(e),o=hexToB(e);return t.setTextColor(n,i,o)}function setDocHexFill(t,e){var n=hexToR(e),i=hexToG(e),o=hexToB(e);return t.setFillColor(n,i,o)}function setDocHexDraw(t,e){var n=hexToR(e),i=hexToG(e),o=hexToB(e);return t.setDrawColor(n,i,o)}function toggleDatePicker(t){$("#"+t).datepicker("show")}function roundToTwo(t,e){var n=+(Math.round(t+"e+2")+"e-2");return e?n.toFixed(2):n||0}function roundToFour(t,e){var n=+(Math.round(t+"e+4")+"e-4");return e?n.toFixed(4):n||0}function truncate(t,e){return t&&t.length>e?t.substr(0,e-1)+"...":t}function endsWith(t,e){return t.indexOf(e,t.length-e.length)!==-1}function secondsToTime(t){t=Math.round(t);var e=Math.floor(t/3600),n=t%3600,i=Math.floor(n/60),o=n%60,a=Math.ceil(o),s={h:e,m:i,s:a};return s}function twoDigits(t){return t<10?"0"+t:t}function toSnakeCase(t){return t?t.replace(/([A-Z])/g,function(t){return"_"+t.toLowerCase()}):""}function snakeToCamel(t){return t.replace(/_([a-z])/g,function(t){return t[1].toUpperCase()})}function getDescendantProp(t,e){for(var n=e.split(".");n.length&&(t=t[n.shift()]););return t}function doubleDollarSign(t){return t?t.replace?t.replace(/\$/g,"$$$"):t:""}function truncate(t,e){return t.length>e?t.substring(0,e)+"...":t}function actionListHandler(){$("tbody tr .tr-action").closest("tr").mouseover(function(){$(this).closest("tr").find(".tr-action").show(),$(this).closest("tr").find(".tr-status").hide()}).mouseout(function(){$dropdown=$(this).closest("tr").find(".tr-action"),$dropdown.hasClass("open")||($dropdown.hide(),$(this).closest("tr").find(".tr-status").show())})}function loadImages(t){$(t+" img").each(function(t,e){var n=$(e).attr("data-src");$(e).attr("src",n),$(e).attr("data-src",n)})}function prettyJson(t){return"string"!=typeof t&&(t=JSON.stringify(t,void 0,2)),t=t.replace(/&/g,"&").replace(//g,">"),t.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,function(t){var e="number";return/^"/.test(t)?e=/:$/.test(t)?"key":"string":/true|false/.test(t)?e="boolean":/null/.test(t)&&(e="null"),t=snakeToCamel(t),''+t+""})}function searchData(t,e,n){return function(i,o){var a;if(n){var s={keys:[e]},r=new Fuse(t,s);a=r.search(i)}else a=[],substrRegex=new RegExp(escapeRegExp(i),"i"),$.each(t,function(t,n){substrRegex.test(n[e])&&a.push(n)});o(a)}}function escapeRegExp(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function firstJSONError(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];for(var i in n)if(n.hasOwnProperty(i))return n[i]}return!1}function pad(t,e,n){return n=n||"0",t+="",t.length>=e?t:new Array(e-t.length+1).join(n)+t}function GetPdfMake(t,e,n){function i(e,n){if("string"==typeof n){if(0===n.indexOf("$firstAndLast")){var i=n.split(":");return function(t,e){return 0===t||t===e.table.body.length?parseFloat(i[1]):0}}if(0===n.indexOf("$none"))return function(t,e){return 0};if(0===n.indexOf("$notFirstAndLastColumn")){var i=n.split(":");return function(t,e){return 0===t||t===e.table.widths.length?0:parseFloat(i[1])}}if(0===n.indexOf("$notFirst")){var i=n.split(":");return function(t,e){return 0===t?0:parseFloat(i[1])}}if(0===n.indexOf("$amount")){var i=n.split(":");return function(t,e){return parseFloat(i[1])}}if(0===n.indexOf("$primaryColor")){var i=n.split(":");return NINJA.primaryColor||i[1]}if(0===n.indexOf("$secondaryColor")){var i=n.split(":");return NINJA.secondaryColor||i[1]}}if(t.features.customize_invoice_design){if("header"===e)return function(e,i){return 1===e||"1"==t.account.all_pages_header?t.features.remove_created_by?NINJA.updatePageCount(JSON.parse(JSON.stringify(n)),e,i):n:""};if("footer"===e)return function(e,i){return e===i||"1"==t.account.all_pages_footer?t.features.remove_created_by?NINJA.updatePageCount(JSON.parse(JSON.stringify(n)),e,i):n:""}}return"text"===e&&(n=NINJA.parseMarkdownText(n,!0)),n}function o(t){window.ninjaFontVfs[t.folder]&&(folder="fonts/"+t.folder,pdfMake.fonts[t.name]={normal:folder+"/"+t.normal,italics:folder+"/"+t.italics,bold:folder+"/"+t.bold,bolditalics:folder+"/"+t.bolditalics})}var a=!1;if(t.hasSecondTable){for(var s=JSON.parse(e),r=0;r0&&e-1 in t))}function i(t,e,n){if(ot.isFunction(e))return ot.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return ot.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(dt.test(e))return ot.filter(e,t,n);e=ot.filter(e,t)}return ot.grep(t,function(t){return ot.inArray(t,e)>=0!==n})}function o(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function a(t){var e=yt[t]={};return ot.each(t.match(Mt)||[],function(t,n){e[n]=!0}),e}function s(){ft.addEventListener?(ft.removeEventListener("DOMContentLoaded",r,!1),t.removeEventListener("load",r,!1)):(ft.detachEvent("onreadystatechange",r),t.detachEvent("onload",r))}function r(){(ft.addEventListener||"load"===event.type||"complete"===ft.readyState)&&(s(),ot.ready())}function c(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(wt,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Tt.test(n)?ot.parseJSON(n):n)}catch(o){}ot.data(t,e,n)}else n=void 0}return n}function l(t){var e;for(e in t)if(("data"!==e||!ot.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function u(t,e,n,i){if(ot.acceptData(t)){var o,a,s=ot.expando,r=t.nodeType,c=r?ot.cache:t,l=r?t[s]:t[s]&&s;if(l&&c[l]&&(i||c[l].data)||void 0!==n||"string"!=typeof e)return l||(l=r?t[s]=Y.pop()||ot.guid++:s),c[l]||(c[l]=r?{}:{toJSON:ot.noop}),"object"!=typeof e&&"function"!=typeof e||(i?c[l]=ot.extend(c[l],e):c[l].data=ot.extend(c[l].data,e)),a=c[l],i||(a.data||(a.data={}),a=a.data),void 0!==n&&(a[ot.camelCase(e)]=n),"string"==typeof e?(o=a[e],null==o&&(o=a[ot.camelCase(e)])):o=a,o}}function h(t,e,n){if(ot.acceptData(t)){var i,o,a=t.nodeType,s=a?ot.cache:t,r=a?t[ot.expando]:ot.expando;if(s[r]){if(e&&(i=n?s[r]:s[r].data)){ot.isArray(e)?e=e.concat(ot.map(e,ot.camelCase)):e in i?e=[e]:(e=ot.camelCase(e),e=e in i?[e]:e.split(" ")),o=e.length;for(;o--;)delete i[e[o]];if(n?!l(i):!ot.isEmptyObject(i))return}(n||(delete s[r].data,l(s[r])))&&(a?ot.cleanData([t],!0):nt.deleteExpando||s!=s.window?delete s[r]:s[r]=null)}}}function d(){return!0}function p(){return!1}function f(){try{return ft.activeElement}catch(t){}}function m(t){var e=Et.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function g(t,e){var n,i,o=0,a=typeof t.getElementsByTagName!==zt?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==zt?t.querySelectorAll(e||"*"):void 0;if(!a)for(a=[],n=t.childNodes||t;null!=(i=n[o]);o++)!e||ot.nodeName(i,e)?a.push(i):ot.merge(a,g(i,e));return void 0===e||e&&ot.nodeName(t,e)?ot.merge([t],a):a}function b(t){xt.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e){return ot.nodeName(t,"table")&&ot.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function M(t){return t.type=(null!==ot.find.attr(t,"type"))+"/"+t.type,t}function y(t){var e=Vt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function A(t,e){for(var n,i=0;null!=(n=t[i]);i++)ot._data(n,"globalEval",!e||ot._data(e[i],"globalEval"))}function _(t,e){if(1===e.nodeType&&ot.hasData(t)){var n,i,o,a=ot._data(t),s=ot._data(e,a),r=a.events;if(r){delete s.handle,s.events={};for(n in r)for(i=0,o=r[n].length;i")).appendTo(e.documentElement),e=(Qt[0].contentWindow||Qt[0].contentDocument).document,e.write(),e.close(),n=T(t,e),Qt.detach()),Zt[t]=n),n}function C(t,e){return{get:function(){var n=t();if(null!=n)return n?void delete this.get:(this.get=e).apply(this,arguments)}}}function O(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),i=e,o=de.length;o--;)if(e=de[o]+n,e in t)return e;return i}function N(t,e){for(var n,i,o,a=[],s=0,r=t.length;s=0&&n=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==ot.type(t)||t.nodeType||ot.isWindow(t))return!1;try{if(t.constructor&&!et.call(t,"constructor")&&!et.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(nt.ownLast)for(e in t)return et.call(t,e);for(e in t);return void 0===e||et.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?Z[tt.call(t)]||"object":typeof t},globalEval:function(e){e&&ot.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(st,"ms-").replace(rt,ct)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var o,a=0,s=t.length,r=n(t);if(i){if(r)for(;a_.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[P]=!0,t}function o(t){var e=D.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function a(t,e){for(var n=t.split("|"),i=t.length;i--;)_.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function r(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function c(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var o,a=t([],n.length,e),s=a.length;s--;)n[o=a[s]]&&(n[o]=!(i[o]=n[o]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function m(t,n,i){for(var o=0,a=n.length;o-1&&(i[l]=!(s[l]=h))}}else M=g(M===s?M.splice(f,M.length):M),a?a(null,s,M,c):Q.apply(s,M)})}function v(t){for(var e,n,i,o=t.length,a=_.relative[t[0].type],s=a||_.relative[" "],r=a?1:0,c=p(function(t){return t===e},s,!0),l=p(function(t){return tt(e,t)>-1},s,!0),u=[function(t,n,i){var o=!a&&(i||n!==N)||((e=n).nodeType?c(t,n,i):l(t,n,i));return e=null,o}];r1&&f(u),r>1&&d(t.slice(0,r-1).concat({value:" "===t[r-2].type?"*":""})).replace(ct,"$1"),n,r0,a=t.length>0,s=function(i,s,r,c,l){var u,h,d,p=0,f="0",m=i&&[],b=[],v=N,M=i||a&&_.find.TAG("*",l),y=R+=null==v?1:Math.random()||.1,A=M.length;for(l&&(N=s!==D&&s);f!==A&&null!=(u=M[f]);f++){if(a&&u){for(h=0;d=t[h++];)if(d(u,s,r)){c.push(u);break}l&&(R=y)}o&&((u=!d&&u)&&p--,i&&m.push(u))}if(p+=f,o&&f!==p){for(h=0;d=n[h++];)d(m,b,s,r);if(i){if(p>0)for(;f--;)m[f]||b[f]||(b[f]=K.call(c));b=g(b)}Q.apply(c,b),l&&!i&&b.length>0&&p+n.length>1&&e.uniqueSort(c)}return l&&(R=y,N=v),m};return o?i(s):s}var y,A,_,z,T,w,C,O,N,S,x,L,D,k,q,W,E,B,I,P="sizzle"+1*new Date,X=t.document,R=0,F=0,H=n(),j=n(),U=n(),$=function(t,e){return t===e&&(x=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],K=J.pop,G=J.push,Q=J.push,Z=J.slice,tt=function(t,e){for(var n=0,i=t.length;n+~]|"+nt+")"+nt+"*"),ht=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(st),pt=new RegExp("^"+ot+"$"),ft={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},mt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,bt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Mt=/[+~]/,yt=/'|\\/g,At=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),_t=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},zt=function(){L()};try{Q.apply(J=Z.call(X.childNodes),X.childNodes),J[X.childNodes.length].nodeType}catch(Tt){Q={apply:J.length?function(t,e){G.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}A=e.support={},T=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},L=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:X;return i!==D&&9===i.nodeType&&i.documentElement?(D=i,k=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",zt,!1):n.attachEvent&&n.attachEvent("onunload",zt)),q=!T(i),A.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),A.getElementsByTagName=o(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),A.getElementsByClassName=bt.test(i.getElementsByClassName),A.getById=o(function(t){return k.appendChild(t).id=P,!i.getElementsByName||!i.getElementsByName(P).length}),A.getById?(_.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&q){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(t){var e=t.replace(At,_t);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var e=t.replace(At,_t);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),_.find.TAG=A.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):A.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,a=e.getElementsByTagName(t);if("*"===t){for(;n=a[o++];)1===n.nodeType&&i.push(n);return i}return a},_.find.CLASS=A.getElementsByClassName&&function(t,e){if(q)return e.getElementsByClassName(t)},E=[],W=[],(A.qsa=bt.test(i.querySelectorAll))&&(o(function(t){k.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&W.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||W.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+P+"-]").length||W.push("~="),t.querySelectorAll(":checked").length||W.push(":checked"),t.querySelectorAll("a#"+P+"+*").length||W.push(".#.+[+~]")}),o(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&W.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||W.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),W.push(",.*:")})),(A.matchesSelector=bt.test(B=k.matches||k.webkitMatchesSelector||k.mozMatchesSelector||k.oMatchesSelector||k.msMatchesSelector))&&o(function(t){A.disconnectedMatch=B.call(t,"div"),B.call(t,"[s!='']:x"),E.push("!=",st)}),W=W.length&&new RegExp(W.join("|")),E=E.length&&new RegExp(E.join("|")),e=bt.test(k.compareDocumentPosition),I=e||bt.test(k.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},$=e?function(t,e){if(t===e)return x=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!A.sortDetached&&e.compareDocumentPosition(t)===n?t===i||t.ownerDocument===X&&I(X,t)?-1:e===i||e.ownerDocument===X&&I(X,e)?1:S?tt(S,t)-tt(S,e):0:4&n?-1:1)}:function(t,e){if(t===e)return x=!0,0;var n,o=0,a=t.parentNode,r=e.parentNode,c=[t],l=[e];if(!a||!r)return t===i?-1:e===i?1:a?-1:r?1:S?tt(S,t)-tt(S,e):0;if(a===r)return s(t,e);for(n=t;n=n.parentNode;)c.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;c[o]===l[o];)o++;return o?s(c[o],l[o]):c[o]===X?-1:l[o]===X?1:0},i):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&L(t),n=n.replace(ht,"='$1']"),A.matchesSelector&&q&&(!E||!E.test(n))&&(!W||!W.test(n)))try{var i=B.call(t,n);if(i||A.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(o){}return e(n,D,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==D&&L(t),I(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==D&&L(t);var n=_.attrHandle[e.toLowerCase()],i=n&&Y.call(_.attrHandle,e.toLowerCase())?n(t,e,!q):void 0;return void 0!==i?i:A.attributes||!q?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(x=!A.detectDuplicates,S=!A.sortStable&&t.slice(0),t.sort($),x){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return S=null,t},z=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=z(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=z(e);return n},_=e.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(At,_t),t[3]=(t[3]||t[4]||t[5]||"").replace(At,_t),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&dt.test(n)&&(e=w(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(At,_t).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=H[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&H(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var a=e.attr(o,t);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var a="nth"!==t.slice(0,3),s="last"!==t.slice(-4),r="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,c){var l,u,h,d,p,f,m=a!==s?"nextSibling":"previousSibling",g=e.parentNode,b=r&&e.nodeName.toLowerCase(),v=!c&&!r;if(g){if(a){for(;m;){for(h=e;h=h[m];)if(r?h.nodeName.toLowerCase()===b:1===h.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&v){for(u=g[P]||(g[P]={}),l=u[t]||[],p=l[0]===R&&l[1],d=l[0]===R&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(d=p=0)||f.pop();)if(1===h.nodeType&&++d&&h===e){u[t]=[R,p,d];break}}else if(v&&(l=(e[P]||(e[P]={}))[t])&&l[0]===R)d=l[1];else for(;(h=++p&&h&&h[m]||(d=p=0)||f.pop())&&((r?h.nodeName.toLowerCase()!==b:1!==h.nodeType)||!++d||(v&&((h[P]||(h[P]={}))[t]=[R,d]),h!==e)););return d-=o,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(t,n){var o,a=_.pseudos[t]||_.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return a[P]?a(n):a.length>1?(o=[t,t,"",n],_.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=a(t,n),s=o.length;s--;)i=tt(t,o[s]),t[i]=!(e[i]=o[s])}):function(t){return a(t,0,o)}):a}},pseudos:{not:i(function(t){var e=[],n=[],o=C(t.replace(ct,"$1"));return o[P]?i(function(t,e,n,i){for(var a,s=o(t,null,i,[]),r=t.length;r--;)(a=s[r])&&(t[r]=!(e[r]=a))}):function(t,i,a){return e[0]=t,o(e,null,a,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(At,_t),function(e){return(e.textContent||e.innerText||z(e)).indexOf(t)>-1}}),lang:i(function(t){return pt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(At,_t).toLowerCase(),function(e){var n;do if(n=q?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===k},focus:function(t){return t===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return mt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,n){return[n<0?n+e:n]}),even:l(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:l(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(s=a[0]).type&&A.getById&&9===e.nodeType&&q&&_.relative[a[1].type]){if(e=(_.find.ID(s.matches[0].replace(At,_t),e)||[])[0],!e)return n;l&&(e=e.parentNode),t=t.slice(a.shift().value.length)}for(o=ft.needsContext.test(t)?0:a.length;o--&&(s=a[o],!_.relative[r=s.type]);)if((c=_.find[r])&&(i=c(s.matches[0].replace(At,_t),Mt.test(a[0].type)&&u(e.parentNode)||e))){if(a.splice(o,1),t=i.length&&d(a),!t)return Q.apply(n,i),n;break}}return(l||C(t,h))(i,e,!q,n,Mt.test(t)&&u(e.parentNode)||e),n},A.sortStable=P.split("").sort($).join("")===P,A.detectDuplicates=!!x,L(),A.sortDetached=o(function(t){return 1&t.compareDocumentPosition(D.createElement("div"))}),o(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||a("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),A.attributes&&o(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||a("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||a(et,function(t,e,n){var i;if(!n)return t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);ot.find=lt,ot.expr=lt.selectors,ot.expr[":"]=ot.expr.pseudos,ot.unique=lt.uniqueSort,ot.text=lt.getText,ot.isXMLDoc=lt.isXML,ot.contains=lt.contains;var ut=ot.expr.match.needsContext,ht=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^.[^:#\[\.,]*$/;ot.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?ot.find.matchesSelector(i,t)?[i]:[]:ot.find.matches(t,ot.grep(e,function(t){return 1===t.nodeType}))},ot.fn.extend({find:function(t){var e,n=[],i=this,o=i.length;if("string"!=typeof t)return this.pushStack(ot(t).filter(function(){for(e=0;e1?ot.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&ut.test(t)?ot(t):t||[],!1).length}});var pt,ft=t.document,mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,gt=ot.fn.init=function(t,e){var n,i;if(!t)return this;if("string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:mt.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||pt).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof ot?e[0]:e,ot.merge(this,ot.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:ft,!0)),ht.test(n[1])&&ot.isPlainObject(e))for(n in e)ot.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(i=ft.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return pt.find(t);this.length=1,this[0]=i}return this.context=ft,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ot.isFunction(t)?"undefined"!=typeof pt.ready?pt.ready(t):t(ot):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ot.makeArray(t,this))};gt.prototype=ot.fn,pt=ot(ft);var bt=/^(?:parents|prev(?:Until|All))/,vt={children:!0,contents:!0,next:!0,prev:!0};ot.extend({dir:function(t,e,n){for(var i=[],o=t[e];o&&9!==o.nodeType&&(void 0===n||1!==o.nodeType||!ot(o).is(n));)1===o.nodeType&&i.push(o),o=o[e];return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),ot.fn.extend({has:function(t){var e,n=ot(t,this),i=n.length;return this.filter(function(){for(e=0;e-1:1===n.nodeType&&ot.find.matchesSelector(n,t))){a.push(n);break}return this.pushStack(a.length>1?ot.unique(a):a)},index:function(t){return t?"string"==typeof t?ot.inArray(this[0],ot(t)):ot.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ot.unique(ot.merge(this.get(),ot(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ot.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ot.dir(t,"parentNode")},parentsUntil:function(t,e,n){return ot.dir(t,"parentNode",n)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return ot.dir(t,"nextSibling")},prevAll:function(t){return ot.dir(t,"previousSibling")},nextUntil:function(t,e,n){return ot.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return ot.dir(t,"previousSibling",n)},siblings:function(t){return ot.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return ot.sibling(t.firstChild)},contents:function(t){return ot.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:ot.merge([],t.childNodes)}},function(t,e){ot.fn[t]=function(n,i){var o=ot.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=ot.filter(i,o)),this.length>1&&(vt[t]||(o=ot.unique(o)),bt.test(t)&&(o=o.reverse())),this.pushStack(o)}});var Mt=/\S+/g,yt={};ot.Callbacks=function(t){t="string"==typeof t?yt[t]||a(t):ot.extend({},t);var e,n,i,o,s,r,c=[],l=!t.once&&[],u=function(a){for(n=t.memory&&a,i=!0,s=r||0,r=0,o=c.length,e=!0;c&&s-1;)c.splice(i,1),e&&(i<=o&&o--,i<=s&&s--)}),this},has:function(t){return t?ot.inArray(t,c)>-1:!(!c||!c.length)},empty:function(){return c=[],o=0,this},disable:function(){return c=l=n=void 0,this},disabled:function(){return!c},lock:function(){return l=void 0,n||h.disable(),this},locked:function(){return!l},fireWith:function(t,n){return!c||i&&!l||(n=n||[],n=[t,n.slice?n.slice():n],e?l.push(n):u(n)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},ot.extend({Deferred:function(t){var e=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ot.Deferred(function(n){ot.each(e,function(e,a){var s=ot.isFunction(t[e])&&t[e];o[a[1]](function(){var t=s&&s.apply(this,arguments);t&&ot.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a[0]+"With"](this===i?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ot.extend(t,i):i}},o={};return i.pipe=i.then,ot.each(e,function(t,a){var s=a[2],r=a[3];i[a[1]]=s.add,r&&s.add(function(){n=r},e[1^t][2].disable,e[2][2].lock),o[a[0]]=function(){return o[a[0]+"With"](this===o?i:this,arguments),this},o[a[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,i,o=0,a=J.call(arguments),s=a.length,r=1!==s||t&&ot.isFunction(t.promise)?s:0,c=1===r?t:ot.Deferred(),l=function(t,n,i){return function(o){n[t]=this,i[t]=arguments.length>1?J.call(arguments):o,i===e?c.notifyWith(n,i):--r||c.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);o0||(At.resolveWith(ft,[ot]),ot.fn.triggerHandler&&(ot(ft).triggerHandler("ready"),ot(ft).off("ready")))}}}),ot.ready.promise=function(e){if(!At)if(At=ot.Deferred(),"complete"===ft.readyState)setTimeout(ot.ready);else if(ft.addEventListener)ft.addEventListener("DOMContentLoaded",r,!1),t.addEventListener("load",r,!1);else{ft.attachEvent("onreadystatechange",r),t.attachEvent("onload",r);var n=!1;try{n=null==t.frameElement&&ft.documentElement}catch(i){}n&&n.doScroll&&!function o(){if(!ot.isReady){try{n.doScroll("left")}catch(t){return setTimeout(o,50)}s(),ot.ready()}}()}return At.promise(e)};var _t,zt="undefined";for(_t in ot(nt))break;nt.ownLast="0"!==_t,nt.inlineBlockNeedsLayout=!1,ot(function(){var t,e,n,i;n=ft.getElementsByTagName("body")[0],n&&n.style&&(e=ft.createElement("div"),i=ft.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==zt&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",nt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=ft.createElement("div");if(null==nt.deleteExpando){nt.deleteExpando=!0;try{delete t.test}catch(e){nt.deleteExpando=!1}}t=null}(),ot.acceptData=function(t){var e=ot.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||e!==!0&&t.getAttribute("classid")===e)};var Tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,wt=/([A-Z])/g;ot.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?ot.cache[t[ot.expando]]:t[ot.expando],!!t&&!l(t)},data:function(t,e,n){return u(t,e,n)},removeData:function(t,e){return h(t,e)},_data:function(t,e,n){return u(t,e,n,!0)},_removeData:function(t,e){return h(t,e,!0)}}),ot.fn.extend({data:function(t,e){var n,i,o,a=this[0],s=a&&a.attributes;if(void 0===t){if(this.length&&(o=ot.data(a),1===a.nodeType&&!ot._data(a,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=ot.camelCase(i.slice(5)),c(a,i,o[i])));ot._data(a,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){ot.data(this,t)}):arguments.length>1?this.each(function(){ot.data(this,t,e)}):a?c(a,t,ot.data(a,t)):void 0},removeData:function(t){return this.each(function(){ot.removeData(this,t)})}}),ot.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=ot._data(t,e),n&&(!i||ot.isArray(n)?i=ot._data(t,e,ot.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=ot.queue(t,e),i=n.length,o=n.shift(),a=ot._queueHooks(t,e),s=function(){ot.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete a.stop,o.call(t,s,a)),!i&&a&&a.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ot._data(t,n)||ot._data(t,n,{empty:ot.Callbacks("once memory").add(function(){ot._removeData(t,e+"queue"),ot._removeData(t,n)})})}}),ot.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",nt.leadingWhitespace=3===e.firstChild.nodeType,nt.tbody=!e.getElementsByTagName("tbody").length,nt.htmlSerialize=!!e.getElementsByTagName("link").length,nt.html5Clone="<:nav>"!==ft.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),nt.appendChecked=t.checked,e.innerHTML="",nt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="",nt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,nt.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){nt.noCloneEvent=!1}),e.cloneNode(!0).click()),null==nt.deleteExpando){nt.deleteExpando=!0;try{delete e.test}catch(i){nt.deleteExpando=!1}}}(),function(){var e,n,i=ft.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})n="on"+e,(nt[e+"Bubbles"]=n in t)||(i.setAttribute(n,"t"),nt[e+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var Lt=/^(?:input|select|textarea)$/i,Dt=/^key/,kt=/^(?:mouse|pointer|contextmenu)|click/,qt=/^(?:focusinfocus|focusoutblur)$/,Wt=/^([^.]*)(?:\.(.+)|)$/;ot.event={global:{},add:function(t,e,n,i,o){var a,s,r,c,l,u,h,d,p,f,m,g=ot._data(t);if(g){for(n.handler&&(c=n,n=c.handler,o=c.selector),n.guid||(n.guid=ot.guid++),(s=g.events)||(s=g.events={}),(u=g.handle)||(u=g.handle=function(t){return typeof ot===zt||t&&ot.event.triggered===t.type?void 0:ot.event.dispatch.apply(u.elem,arguments)},u.elem=t),e=(e||"").match(Mt)||[""],r=e.length;r--;)a=Wt.exec(e[r])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p&&(l=ot.event.special[p]||{},p=(o?l.delegateType:l.bindType)||p,l=ot.event.special[p]||{},h=ot.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&ot.expr.match.needsContext.test(o),namespace:f.join(".")},c),(d=s[p])||(d=s[p]=[],d.delegateCount=0,l.setup&&l.setup.call(t,i,f,u)!==!1||(t.addEventListener?t.addEventListener(p,u,!1):t.attachEvent&&t.attachEvent("on"+p,u))),l.add&&(l.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,h):d.push(h),ot.event.global[p]=!0);t=null}},remove:function(t,e,n,i,o){var a,s,r,c,l,u,h,d,p,f,m,g=ot.hasData(t)&&ot._data(t);if(g&&(u=g.events)){for(e=(e||"").match(Mt)||[""],l=e.length;l--;)if(r=Wt.exec(e[l])||[],p=m=r[1],f=(r[2]||"").split(".").sort(),p){for(h=ot.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,d=u[p]||[],r=r[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),c=a=d.length;a--;)s=d[a],!o&&m!==s.origType||n&&n.guid!==s.guid||r&&!r.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(d.splice(a,1), -s.selector&&d.delegateCount--,h.remove&&h.remove.call(t,s));c&&!d.length&&(h.teardown&&h.teardown.call(t,f,g.handle)!==!1||ot.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)ot.event.remove(t,p+e[l],n,i,!0);ot.isEmptyObject(u)&&(delete g.handle,ot._removeData(t,"events"))}},trigger:function(e,n,i,o){var a,s,r,c,l,u,h,d=[i||ft],p=et.call(e,"type")?e.type:e,f=et.call(e,"namespace")?e.namespace.split("."):[];if(r=u=i=i||ft,3!==i.nodeType&&8!==i.nodeType&&!qt.test(p+ot.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,e=e[ot.expando]?e:new ot.Event(p,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=f.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:ot.makeArray(n,[e]),l=ot.event.special[p]||{},o||!l.trigger||l.trigger.apply(i,n)!==!1)){if(!o&&!l.noBubble&&!ot.isWindow(i)){for(c=l.delegateType||p,qt.test(c+p)||(r=r.parentNode);r;r=r.parentNode)d.push(r),u=r;u===(i.ownerDocument||ft)&&d.push(u.defaultView||u.parentWindow||t)}for(h=0;(r=d[h++])&&!e.isPropagationStopped();)e.type=h>1?c:l.bindType||p,a=(ot._data(r,"events")||{})[e.type]&&ot._data(r,"handle"),a&&a.apply(r,n),a=s&&r[s],a&&a.apply&&ot.acceptData(r)&&(e.result=a.apply(r,n),e.result===!1&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&ot.acceptData(i)&&s&&i[p]&&!ot.isWindow(i)){u=i[s],u&&(i[s]=null),ot.event.triggered=p;try{i[p]()}catch(m){}ot.event.triggered=void 0,u&&(i[s]=u)}return e.result}},dispatch:function(t){t=ot.event.fix(t);var e,n,i,o,a,s=[],r=J.call(arguments),c=(ot._data(this,"events")||{})[t.type]||[],l=ot.event.special[t.type]||{};if(r[0]=t,t.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,t)!==!1){for(s=ot.event.handlers.call(this,t,c),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(i.namespace)||(t.handleObj=i,t.data=i.data,n=((ot.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,r),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,a,s=[],r=e.delegateCount,c=t.target;if(r&&c.nodeType&&(!t.button||"click"!==t.type))for(;c!=this;c=c.parentNode||this)if(1===c.nodeType&&(c.disabled!==!0||"click"!==t.type)){for(o=[],a=0;a=0:ot.find(n,this,null,[c]).length),o[n]&&o.push(i);o.length&&s.push({elem:c,handlers:o})}return r]","i"),Pt=/^\s+/,Xt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Rt=/<([\w:]+)/,Ft=/\s*$/g,Jt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:nt.htmlSerialize?[0,"",""]:[1,"X
","
"]},Kt=m(ft),Gt=Kt.appendChild(ft.createElement("div"));Jt.optgroup=Jt.option,Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td,ot.extend({clone:function(t,e,n){var i,o,a,s,r,c=ot.contains(t.ownerDocument,t);if(nt.html5Clone||ot.isXMLDoc(t)||!It.test("<"+t.nodeName+">")?a=t.cloneNode(!0):(Gt.innerHTML=t.outerHTML,Gt.removeChild(a=Gt.firstChild)),!(nt.noCloneEvent&&nt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ot.isXMLDoc(t)))for(i=g(a),r=g(t),s=0;null!=(o=r[s]);++s)i[s]&&z(o,i[s]);if(e)if(n)for(r=r||g(t),i=i||g(a),s=0;null!=(o=r[s]);s++)_(o,i[s]);else _(t,a);return i=g(a,"script"),i.length>0&&A(i,!c&&g(t,"script")),i=r=o=null,a},buildFragment:function(t,e,n,i){for(var o,a,s,r,c,l,u,h=t.length,d=m(e),p=[],f=0;f")+u[2],o=u[0];o--;)r=r.lastChild;if(!nt.leadingWhitespace&&Pt.test(a)&&p.push(e.createTextNode(Pt.exec(a)[0])),!nt.tbody)for(a="table"!==c||Ft.test(a)?""!==u[1]||Ft.test(a)?0:r:r.firstChild,o=a&&a.childNodes.length;o--;)ot.nodeName(l=a.childNodes[o],"tbody")&&!l.childNodes.length&&a.removeChild(l);for(ot.merge(p,r.childNodes),r.textContent="";r.firstChild;)r.removeChild(r.firstChild);r=d.lastChild}else p.push(e.createTextNode(a));for(r&&d.removeChild(r),nt.appendChecked||ot.grep(g(p,"input"),b),f=0;a=p[f++];)if((!i||ot.inArray(a,i)===-1)&&(s=ot.contains(a.ownerDocument,a),r=g(d.appendChild(a),"script"),s&&A(r),n))for(o=0;a=r[o++];)$t.test(a.type||"")&&n.push(a);return r=null,d},cleanData:function(t,e){for(var n,i,o,a,s=0,r=ot.expando,c=ot.cache,l=nt.deleteExpando,u=ot.event.special;null!=(n=t[s]);s++)if((e||ot.acceptData(n))&&(o=n[r],a=o&&c[o])){if(a.events)for(i in a.events)u[i]?ot.event.remove(n,i):ot.removeEvent(n,i,a.handle);c[o]&&(delete c[o],l?delete n[r]:typeof n.removeAttribute!==zt?n.removeAttribute(r):n[r]=null,Y.push(o))}}}),ot.fn.extend({text:function(t){return St(this,function(t){return void 0===t?ot.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ft).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?ot.filter(t,this):this,o=0;null!=(n=i[o]);o++)e||1!==n.nodeType||ot.cleanData(g(n)),n.parentNode&&(e&&ot.contains(n.ownerDocument,n)&&A(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&ot.cleanData(g(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&ot.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return ot.clone(this,t,e)})},html:function(t){return St(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Bt,""):void 0;if("string"==typeof t&&!jt.test(t)&&(nt.htmlSerialize||!It.test(t))&&(nt.leadingWhitespace||!Pt.test(t))&&!Jt[(Rt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(Xt,"<$1>");try{for(;n1&&"string"==typeof d&&!nt.checkClone&&Ut.test(d))return this.each(function(n){var i=u.eq(n);p&&(t[0]=d.call(this,n,i.html())),i.domManip(t,e)});if(l&&(r=ot.buildFragment(t,this[0].ownerDocument,!1,this),n=r.firstChild,1===r.childNodes.length&&(r=n),n)){for(a=ot.map(g(r,"script"),M),o=a.length;c
t
",o=e.getElementsByTagName("td"),o[0].style.cssText="margin:0;border:0;padding:0;display:none",r=0===o[0].offsetHeight,r&&(o[0].style.display="",o[1].style.display="none",r=0===o[0].offsetHeight),n.removeChild(i))}var n,i,o,a,s,r,c;n=ft.createElement("div"),n.innerHTML="
a",o=n.getElementsByTagName("a")[0],i=o&&o.style,i&&(i.cssText="float:left;opacity:.5",nt.opacity="0.5"===i.opacity,nt.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",nt.clearCloneStyle="content-box"===n.style.backgroundClip,nt.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,ot.extend(nt,{reliableHiddenOffsets:function(){return null==r&&e(),r},boxSizingReliable:function(){return null==s&&e(),s},pixelPosition:function(){return null==a&&e(),a},reliableMarginRight:function(){return null==c&&e(),c}}))}(),ot.swap=function(t,e,n,i){var o,a,s={};for(a in e)s[a]=t.style[a],t.style[a]=e[a];o=n.apply(t,i||[]);for(a in e)t.style[a]=s[a];return o};var ae=/alpha\([^)]*\)/i,se=/opacity\s*=\s*([^)]*)/,re=/^(none|table(?!-c[ea]).+)/,ce=new RegExp("^("+Ct+")(.*)$","i"),le=new RegExp("^([+-])=("+Ct+")","i"),ue={position:"absolute",visibility:"hidden",display:"block"},he={letterSpacing:"0",fontWeight:"400"},de=["Webkit","O","Moz","ms"];ot.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=ee(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":nt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,a,s,r=ot.camelCase(e),c=t.style;if(e=ot.cssProps[r]||(ot.cssProps[r]=O(c,r)),s=ot.cssHooks[e]||ot.cssHooks[r],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:c[e];if(a=typeof n,"string"===a&&(o=le.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(ot.css(t,e)),a="number"),null!=n&&n===n&&("number"!==a||ot.cssNumber[r]||(n+="px"),nt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),!(s&&"set"in s&&void 0===(n=s.set(t,n,i)))))try{c[e]=n}catch(l){}}},css:function(t,e,n,i){var o,a,s,r=ot.camelCase(e);return e=ot.cssProps[r]||(ot.cssProps[r]=O(t.style,r)),s=ot.cssHooks[e]||ot.cssHooks[r],s&&"get"in s&&(a=s.get(t,!0,n)),void 0===a&&(a=ee(t,e,i)),"normal"===a&&e in he&&(a=he[e]),""===n||n?(o=parseFloat(a),n===!0||ot.isNumeric(o)?o||0:a):a}}),ot.each(["height","width"],function(t,e){ot.cssHooks[e]={get:function(t,n,i){if(n)return re.test(ot.css(t,"display"))&&0===t.offsetWidth?ot.swap(t,ue,function(){return L(t,e,i)}):L(t,e,i)},set:function(t,n,i){var o=i&&te(t);return S(t,n,i?x(t,e,i,nt.boxSizing&&"border-box"===ot.css(t,"boxSizing",!1,o),o):0)}}}),nt.opacity||(ot.cssHooks.opacity={get:function(t,e){return se.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,o=ot.isNumeric(e)?"alpha(opacity="+100*e+")":"",a=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===ot.trim(a.replace(ae,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=ae.test(a)?a.replace(ae,o):a+" "+o)}}),ot.cssHooks.marginRight=C(nt.reliableMarginRight,function(t,e){if(e)return ot.swap(t,{display:"inline-block"},ee,[t,"marginRight"])}),ot.each({margin:"",padding:"",border:"Width"},function(t,e){ot.cssHooks[t+e]={expand:function(n){for(var i=0,o={},a="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+Ot[i]+e]=a[i]||a[i-2]||a[0];return o}},ne.test(t)||(ot.cssHooks[t+e].set=S)}),ot.fn.extend({css:function(t,e){return St(this,function(t,e,n){var i,o,a={},s=0;if(ot.isArray(e)){for(i=te(t),o=e.length;s1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Nt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=D,D.prototype={constructor:D,init:function(t,e,n,i,o,a){this.elem=t,this.prop=n,this.easing=o||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=a||(ot.cssNumber[n]?"":"px")},cur:function(){var t=D.propHooks[this.prop];return t&&t.get?t.get(this):D.propHooks._default.get(this)},run:function(t){var e,n=D.propHooks[this.prop];return this.options.duration?this.pos=e=ot.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=ot.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){ot.fx.step[t.prop]?ot.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[ot.cssProps[t.prop]]||ot.cssHooks[t.prop])?ot.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ot.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},ot.fx=D.prototype.init,ot.fx.step={};var pe,fe,me=/^(?:toggle|show|hide)$/,ge=new RegExp("^(?:([+-])=|)("+Ct+")([a-z%]*)$","i"),be=/queueHooks$/,ve=[E],Me={"*":[function(t,e){var n=this.createTween(t,e),i=n.cur(),o=ge.exec(e),a=o&&o[3]||(ot.cssNumber[t]?"":"px"),s=(ot.cssNumber[t]||"px"!==a&&+i)&&ge.exec(ot.css(n.elem,t)),r=1,c=20;if(s&&s[3]!==a){a=a||s[3],o=o||[],s=+i||1;do r=r||".5",s/=r,ot.style(n.elem,t,s+a);while(r!==(r=n.cur()/i)&&1!==r&&--c)}return o&&(s=n.start=+s||+i||0,n.unit=a,n.end=o[1]?s+(o[1]+1)*o[2]:+o[2]),n}]};ot.Animation=ot.extend(I,{tweener:function(t,e){ot.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,i=0,o=t.length;i
a",i=e.getElementsByTagName("a")[0],n=ft.createElement("select"),o=n.appendChild(ft.createElement("option")),t=e.getElementsByTagName("input")[0],i.style.cssText="top:1px",nt.getSetAttribute="t"!==e.className,nt.style=/top/.test(i.getAttribute("style")),nt.hrefNormalized="/a"===i.getAttribute("href"),nt.checkOn=!!t.value,nt.optSelected=o.selected,nt.enctype=!!ft.createElement("form").enctype,n.disabled=!0,nt.optDisabled=!o.disabled,t=ft.createElement("input"),t.setAttribute("value",""),nt.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),nt.radioValue="t"===t.value}();var ye=/\r/g;ot.fn.extend({val:function(t){var e,n,i,o=this[0];{if(arguments.length)return i=ot.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(o=i?t.call(this,n,ot(this).val()):t,null==o?o="":"number"==typeof o?o+="":ot.isArray(o)&&(o=ot.map(o,function(t){return null==t?"":t+""})),e=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return e=ot.valHooks[o.type]||ot.valHooks[o.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(ye,""):null==n?"":n)}}}),ot.extend({valHooks:{option:{get:function(t){var e=ot.find.attr(t,"value");return null!=e?e:ot.trim(ot.text(t))}},select:{get:function(t){for(var e,n,i=t.options,o=t.selectedIndex,a="select-one"===t.type||o<0,s=a?null:[],r=a?o+1:i.length,c=o<0?r:a?o:0;c=0)try{i.selected=n=!0}catch(r){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),o}}}}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(t,e){if(ot.isArray(e))return t.checked=ot.inArray(ot(t).val(),e)>=0}},nt.checkOn||(ot.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ae,_e,ze=ot.expr.attrHandle,Te=/^(?:checked|selected)$/i,we=nt.getSetAttribute,Ce=nt.input;ot.fn.extend({attr:function(t,e){return St(this,ot.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ot.removeAttr(this,t)})}}),ot.extend({attr:function(t,e,n){var i,o,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return typeof t.getAttribute===zt?ot.prop(t,e,n):(1===a&&ot.isXMLDoc(t)||(e=e.toLowerCase(),i=ot.attrHooks[e]||(ot.expr.match.bool.test(e)?_e:Ae)),void 0===n?i&&"get"in i&&null!==(o=i.get(t,e))?o:(o=ot.find.attr(t,e),null==o?void 0:o):null!==n?i&&"set"in i&&void 0!==(o=i.set(t,n,e))?o:(t.setAttribute(e,n+""),n):void ot.removeAttr(t,e))},removeAttr:function(t,e){var n,i,o=0,a=e&&e.match(Mt);if(a&&1===t.nodeType)for(;n=a[o++];)i=ot.propFix[n]||n,ot.expr.match.bool.test(n)?Ce&&we||!Te.test(n)?t[i]=!1:t[ot.camelCase("default-"+n)]=t[i]=!1:ot.attr(t,n,""),t.removeAttribute(we?n:i)},attrHooks:{type:{set:function(t,e){if(!nt.radioValue&&"radio"===e&&ot.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),_e={set:function(t,e,n){return e===!1?ot.removeAttr(t,n):Ce&&we||!Te.test(n)?t.setAttribute(!we&&ot.propFix[n]||n,n):t[ot.camelCase("default-"+n)]=t[n]=!0,n}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ze[e]||ot.find.attr;ze[e]=Ce&&we||!Te.test(e)?function(t,e,i){var o,a;return i||(a=ze[e],ze[e]=o,o=null!=n(t,e,i)?e.toLowerCase():null,ze[e]=a),o}:function(t,e,n){if(!n)return t[ot.camelCase("default-"+e)]?e.toLowerCase():null}}),Ce&&we||(ot.attrHooks.value={set:function(t,e,n){return ot.nodeName(t,"input")?void(t.defaultValue=e):Ae&&Ae.set(t,e,n)}}),we||(Ae={set:function(t,e,n){var i=t.getAttributeNode(n);if(i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n))return e}},ze.id=ze.name=ze.coords=function(t,e,n){var i;if(!n)return(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},ot.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:Ae.set},ot.attrHooks.contenteditable={set:function(t,e,n){Ae.set(t,""!==e&&e,n)}},ot.each(["width","height"],function(t,e){ot.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),nt.style||(ot.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Oe=/^(?:input|select|textarea|button|object)$/i,Ne=/^(?:a|area)$/i;ot.fn.extend({prop:function(t,e){return St(this,ot.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ot.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),ot.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,o,a,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return a=1!==s||!ot.isXMLDoc(t),a&&(e=ot.propFix[e]||e,o=ot.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):Oe.test(t.nodeName)||Ne.test(t.nodeName)&&t.href?0:-1; -}}}}),nt.hrefNormalized||ot.each(["href","src"],function(t,e){ot.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),nt.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this}),nt.enctype||(ot.propFix.enctype="encoding");var Se=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,n,i,o,a,s,r=0,c=this.length,l="string"==typeof t&&t;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(Mt)||[];r=0;)i=i.replace(" "+o+" "," ");s=t?ot.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(n){ot(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,i=0,o=ot(this),a=t.match(Mt)||[];e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else n!==zt&&"boolean"!==n||(this.className&&ot._data(this,"__className__",this.className),this.className=this.className||t===!1?"":ot._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;n=0)return!0;return!1}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var xe=ot.now(),Le=/\?/,De=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ot.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,o=ot.trim(e+"");return o&&!ot.trim(o.replace(De,function(t,e,o,a){return n&&e&&(i=0),0===i?t:(n=o||e,i+=!a-!o,"")}))?Function("return "+o)():ot.error("Invalid JSON: "+e)},ot.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new DOMParser,n=i.parseFromString(e,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(o){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e),n};var ke,qe,We=/#.*$/,Ee=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ie=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Pe=/^(?:GET|HEAD)$/,Xe=/^\/\//,Re=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Fe={},He={},je="*/".concat("*");try{qe=location.href}catch(Ue){qe=ft.createElement("a"),qe.href="",qe=qe.href}ke=Re.exec(qe.toLowerCase())||[],ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qe,type:"GET",isLocal:Ie.test(ke[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":je,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?R(R(t,ot.ajaxSettings),e):R(ot.ajaxSettings,t)},ajaxPrefilter:P(Fe),ajaxTransport:P(He),ajax:function(t,e){function n(t,e,n,i){var o,u,b,v,y,_=e;2!==M&&(M=2,r&&clearTimeout(r),l=void 0,s=i||"",A.readyState=t>0?4:0,o=t>=200&&t<300||304===t,n&&(v=F(h,A,n)),v=H(h,v,A,o),o?(h.ifModified&&(y=A.getResponseHeader("Last-Modified"),y&&(ot.lastModified[a]=y),y=A.getResponseHeader("etag"),y&&(ot.etag[a]=y)),204===t||"HEAD"===h.type?_="nocontent":304===t?_="notmodified":(_=v.state,u=v.data,b=v.error,o=!b)):(b=_,!t&&_||(_="error",t<0&&(t=0))),A.status=t,A.statusText=(e||_)+"",o?f.resolveWith(d,[u,_,A]):f.rejectWith(d,[A,_,b]),A.statusCode(g),g=void 0,c&&p.trigger(o?"ajaxSuccess":"ajaxError",[A,h,o?u:b]),m.fireWith(d,[A,_]),c&&(p.trigger("ajaxComplete",[A,h]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,a,s,r,c,l,u,h=ot.ajaxSetup({},e),d=h.context||h,p=h.context&&(d.nodeType||d.jquery)?ot(d):ot.event,f=ot.Deferred(),m=ot.Callbacks("once memory"),g=h.statusCode||{},b={},v={},M=0,y="canceled",A={readyState:0,getResponseHeader:function(t){var e;if(2===M){if(!u)for(u={};e=Be.exec(s);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===M?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return M||(t=v[n]=v[n]||t,b[t]=e),this},overrideMimeType:function(t){return M||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(M<2)for(e in t)g[e]=[g[e],t[e]];else A.always(t[A.status]);return this},abort:function(t){var e=t||y;return l&&l.abort(e),n(0,e),this}};if(f.promise(A).complete=m.add,A.success=A.done,A.error=A.fail,h.url=((t||h.url||qe)+"").replace(We,"").replace(Xe,ke[1]+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=ot.trim(h.dataType||"*").toLowerCase().match(Mt)||[""],null==h.crossDomain&&(i=Re.exec(h.url.toLowerCase()),h.crossDomain=!(!i||i[1]===ke[1]&&i[2]===ke[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(ke[3]||("http:"===ke[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ot.param(h.data,h.traditional)),X(Fe,h,e,A),2===M)return A;c=ot.event&&h.global,c&&0===ot.active++&&ot.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Pe.test(h.type),a=h.url,h.hasContent||(h.data&&(a=h.url+=(Le.test(a)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=Ee.test(a)?a.replace(Ee,"$1_="+xe++):a+(Le.test(a)?"&":"?")+"_="+xe++)),h.ifModified&&(ot.lastModified[a]&&A.setRequestHeader("If-Modified-Since",ot.lastModified[a]),ot.etag[a]&&A.setRequestHeader("If-None-Match",ot.etag[a])),(h.data&&h.hasContent&&h.contentType!==!1||e.contentType)&&A.setRequestHeader("Content-Type",h.contentType),A.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+je+"; q=0.01":""):h.accepts["*"]);for(o in h.headers)A.setRequestHeader(o,h.headers[o]);if(h.beforeSend&&(h.beforeSend.call(d,A,h)===!1||2===M))return A.abort();y="abort";for(o in{success:1,error:1,complete:1})A[o](h[o]);if(l=X(He,h,e,A)){A.readyState=1,c&&p.trigger("ajaxSend",[A,h]),h.async&&h.timeout>0&&(r=setTimeout(function(){A.abort("timeout")},h.timeout));try{M=1,l.send(b,n)}catch(_){if(!(M<2))throw _;n(-1,_)}}else n(-1,"No Transport");return A},getJSON:function(t,e,n){return ot.get(t,e,n,"json")},getScript:function(t,e){return ot.get(t,void 0,e,"script")}}),ot.each(["get","post"],function(t,e){ot[e]=function(t,n,i,o){return ot.isFunction(n)&&(o=o||i,i=n,n=void 0),ot.ajax({url:t,type:e,dataType:o,data:n,success:i})}}),ot._evalUrl=function(t){return ot.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ot.fn.extend({wrapAll:function(t){if(ot.isFunction(t))return this.each(function(e){ot(this).wrapAll(t.call(this,e))});if(this[0]){var e=ot(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return ot.isFunction(t)?this.each(function(e){ot(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ot(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=ot.isFunction(t);return this.each(function(n){ot(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}}),ot.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!nt.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||ot.css(t,"display"))},ot.expr.filters.visible=function(t){return!ot.expr.filters.hidden(t)};var $e=/%20/g,Ve=/\[\]$/,Ye=/\r?\n/g,Je=/^(?:submit|button|image|reset|file)$/i,Ke=/^(?:input|select|textarea|keygen)/i;ot.param=function(t,e){var n,i=[],o=function(t,e){e=ot.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(t)||t.jquery&&!ot.isPlainObject(t))ot.each(t,function(){o(this.name,this.value)});else for(n in t)j(n,t[n],e,o);return i.join("&").replace($e,"+")},ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ot.prop(this,"elements");return t?ot.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ot(this).is(":disabled")&&Ke.test(this.nodeName)&&!Je.test(t)&&(this.checked||!xt.test(t))}).map(function(t,e){var n=ot(this).val();return null==n?null:ot.isArray(n)?ot.map(n,function(t){return{name:e.name,value:t.replace(Ye,"\r\n")}}):{name:e.name,value:n.replace(Ye,"\r\n")}}).get()}}),ot.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&U()||$()}:U;var Ge=0,Qe={},Ze=ot.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in Qe)Qe[t](void 0,!0)}),nt.cors=!!Ze&&"withCredentials"in Ze,Ze=nt.ajax=!!Ze,Ze&&ot.ajaxTransport(function(t){if(!t.crossDomain||nt.cors){var e;return{send:function(n,i){var o,a=t.xhr(),s=++Ge;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&a.setRequestHeader(o,n[o]+"");a.send(t.hasContent&&t.data||null),e=function(n,o){var r,c,l;if(e&&(o||4===a.readyState))if(delete Qe[s],e=void 0,a.onreadystatechange=ot.noop,o)4!==a.readyState&&a.abort();else{l={},r=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{c=a.statusText}catch(u){c=""}r||!t.isLocal||t.crossDomain?1223===r&&(r=204):r=l.text?200:404}l&&i(r,c,l,a.getAllResponseHeaders())},t.async?4===a.readyState?setTimeout(e):a.onreadystatechange=Qe[s]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return ot.globalEval(t),t}}}),ot.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),ot.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=ft.head||ot("head")[0]||ft.documentElement;return{send:function(i,o){e=ft.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||o(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var tn=[],en=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=tn.pop()||ot.expando+"_"+xe++;return this[t]=!0,t}}),ot.ajaxPrefilter("json jsonp",function(e,n,i){var o,a,s,r=e.jsonp!==!1&&(en.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&en.test(e.data)&&"data");if(r||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(en,"$1"+o):e.jsonp!==!1&&(e.url+=(Le.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||ot.error(o+" was not called"),s[0]},e.dataTypes[0]="json",a=t[o],t[o]=function(){s=arguments},i.always(function(){t[o]=a,e[o]&&(e.jsonpCallback=n.jsonpCallback,tn.push(o)),s&&ot.isFunction(a)&&a(s[0]),s=a=void 0}),"script"}),ot.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||ft;var i=ht.exec(t),o=!n&&[];return i?[e.createElement(i[1])]:(i=ot.buildFragment([t],e,o),o&&o.length&&ot(o).remove(),ot.merge([],i.childNodes))};var nn=ot.fn.load;ot.fn.load=function(t,e,n){if("string"!=typeof t&&nn)return nn.apply(this,arguments);var i,o,a,s=this,r=t.indexOf(" ");return r>=0&&(i=ot.trim(t.slice(r,t.length)),t=t.slice(0,r)),ot.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(a="POST"),s.length>0&&ot.ajax({url:t,type:a,dataType:"html",data:e}).done(function(t){o=arguments,s.html(i?ot("
").append(ot.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){s.each(n,o||[t.responseText,e,t])}),this},ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ot.fn[e]=function(t){return this.on(e,t)}}),ot.expr.filters.animated=function(t){return ot.grep(ot.timers,function(e){return t===e.elem}).length};var on=t.document.documentElement;ot.offset={setOffset:function(t,e,n){var i,o,a,s,r,c,l,u=ot.css(t,"position"),h=ot(t),d={};"static"===u&&(t.style.position="relative"),r=h.offset(),a=ot.css(t,"top"),c=ot.css(t,"left"),l=("absolute"===u||"fixed"===u)&&ot.inArray("auto",[a,c])>-1,l?(i=h.position(),s=i.top,o=i.left):(s=parseFloat(a)||0,o=parseFloat(c)||0),ot.isFunction(e)&&(e=e.call(t,n,r)),null!=e.top&&(d.top=e.top-r.top+s),null!=e.left&&(d.left=e.left-r.left+o),"using"in e?e.using.call(t,d):h.css(d)}},ot.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ot.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return e=a.documentElement,ot.contains(e,o)?(typeof o.getBoundingClientRect!==zt&&(i=o.getBoundingClientRect()),n=V(a),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===ot.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ot.nodeName(t[0],"html")||(n=t.offset()),n.top+=ot.css(t[0],"borderTopWidth",!0),n.left+=ot.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-ot.css(i,"marginTop",!0),left:e.left-n.left-ot.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||on;t&&!ot.nodeName(t,"html")&&"static"===ot.css(t,"position");)t=t.offsetParent;return t||on})}}),ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);ot.fn[t]=function(i){return St(this,function(t,i,o){var a=V(t);return void 0===o?a?e in a?a[e]:a.document.documentElement[i]:t[i]:void(a?a.scrollTo(n?ot(a).scrollLeft():o,n?o:ot(a).scrollTop()):t[i]=o)},t,i,arguments.length,null)}}),ot.each(["top","left"],function(t,e){ot.cssHooks[e]=C(nt.pixelPosition,function(t,n){if(n)return n=ee(t,e),ie.test(n)?ot(t).position()[e]+"px":n})}),ot.each({Height:"height",Width:"width"},function(t,e){ot.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){ot.fn[i]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||o===!0?"margin":"border");return St(this,function(e,n,i){var o;return ot.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?ot.css(e,n,s):ot.style(e,n,i,s)},e,a?i:void 0,a,null)}})}),ot.fn.size=function(){return this.length},ot.fn.andSelf=ot.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ot});var an=t.jQuery,sn=t.$;return ot.noConflict=function(e){return t.$===ot&&(t.$=sn),e&&t.jQuery===ot&&(t.jQuery=an),ot},typeof e===zt&&(t.jQuery=t.$=ot),ot}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,i){var o,a,s,r=e.nodeName.toLowerCase();return"area"===r?(o=e.parentNode,a=o.name,!(!e.href||!a||"map"!==o.nodeName.toLowerCase())&&(s=t("img[usemap='#"+a+"']")[0],!!s&&n(s))):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}function i(t){for(var e,n;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function o(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=a(t("
"))}function a(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(n,"mouseout",function(){t(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(n,"mouseover",s)}function s(){t.datepicker._isDisabledDatepicker(b.inline?b.dpDiv.parent()[0]:b.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).addClass("ui-datepicker-next-hover"))}function r(e,n){t.extend(e,n);for(var i in n)null==n[i]&&(e[i]=n[i]);return e}function c(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var n=this.css("position"),i="absolute"===n,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var e=t(this);return(!i||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&a.length?a:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(n){return e(n,!isNaN(t.attr(n,"tabindex")))},tabbable:function(n){var i=t.attr(n,"tabindex"),o=isNaN(i);return(o||i>=0)&&e(n,!o)}}),t("").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){function i(e,n,i,a){return t.each(o,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),a&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var o="Width"===n?["Left","Right"]:["Top","Bottom"],a=n.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?s["inner"+n].call(this):this.each(function(){t(this).css(a,i(this,e)+"px")})},t.fn["outer"+n]=function(e,o){return"number"!=typeof e?s["outer"+n].call(this,e):this.each(function(){t(this).css(a,i(this,e,!0,o)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var n,i,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(o.css("zIndex"),10),!isNaN(i)&&0!==i))return i;o=o.parent()}return 0}}),t.ui.plugin={add:function(e,n,i){var o,a=t.ui[e].prototype;for(o in i)a.plugins[o]=a.plugins[o]||[],a.plugins[o].push([n,i[o]])},call:function(t,e,n,i){var o,a=t.plugins[e];if(a&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,o,a,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},i=e.split("."),e=i.shift(),i.length){for(o=s[e]=t.widget.extend({},this.options[e]),a=0;a=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){function e(t,e,n){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a,s=Math.max,r=Math.abs,c=Math.round,l=/left|center|right/,u=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,n,i=t("
"),a=i.children()[0];return t("body").append(i),e=a.offsetWidth,i.css("overflow","scroll"),n=a.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),o=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===n||"auto"===n&&e.width0?"right":"center",vertical:a<0?"top":i>0?"bottom":"middle"};ms(r(i),r(a))?c.important="horizontal":c.important="vertical",o.using.call(this,t,c)}),u.offset(t.extend(O,{using:l}))})},t.ui.position={fit:{left:function(t,e){var n,i=e.within,o=i.isWindow?i.scrollLeft:i.offset.left,a=i.width,r=t.left-e.collisionPosition.marginLeft,c=o-r,l=r+e.collisionWidth-a-o;e.collisionWidth>a?c>0&&l<=0?(n=t.left+c+e.collisionWidth-a-o,t.left+=c-n):l>0&&c<=0?t.left=o:c>l?t.left=o+a-e.collisionWidth:t.left=o:c>0?t.left+=c:l>0?t.left-=l:t.left=s(t.left-r,t.left)},top:function(t,e){var n,i=e.within,o=i.isWindow?i.scrollTop:i.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,c=o-r,l=r+e.collisionHeight-a-o;e.collisionHeight>a?c>0&&l<=0?(n=t.top+c+e.collisionHeight-a-o,t.top+=c-n):l>0&&c<=0?t.top=o:c>l?t.top=o+a-e.collisionHeight:t.top=o:c>0?t.top+=c:l>0?t.top-=l:t.top=s(t.top-r,t.top)}},flip:{left:function(t,e){var n,i,o=e.within,a=o.offset.left+o.scrollLeft,s=o.width,c=o.isWindow?o.scrollLeft:o.offset.left,l=t.left-e.collisionPosition.marginLeft,u=l-c,h=l+e.collisionWidth-s-c,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];u<0?(n=t.left+d+p+f+e.collisionWidth-s-a,(n<0||n0&&(i=t.left-e.collisionPosition.marginLeft+d+p+f-c,(i>0||r(i)u&&(i<0||i0&&(n=t.top-e.collisionPosition.marginTop+p+f+m-c,t.top+p+f+m>h&&(n>0||r(n)10&&o<11,e.innerHTML="",n.removeChild(e)}()}();t.ui.position,t.widget("ui.accordion",{version:"1.11.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var n=t.ui.keyCode,i=this.headers.length,o=this.headers.index(e.target),a=!1;switch(e.keyCode){case n.RIGHT:case n.DOWN:a=this.headers[(o+1)%i];break;case n.LEFT:case n.UP:a=this.headers[(o-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(e);break;case n.HOME:a=this.headers[0];break;case n.END:a=this.headers[i-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,n=this.options,i=n.heightStyle,o=this.element.parent();this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=t(this),n=e.uniqueId().attr("id"),i=e.next(),o=i.uniqueId().attr("id");e.attr("aria-controls",o),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(e=o.height(),this.element.siblings(":visible").each(function(){var n=t(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(e-=n.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===i&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var n=this._findActive(e)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var n=this.options,i=this.active,o=t(e.currentTarget),a=o[0]===i[0],s=a&&n.collapsible,r=s?t():o.next(),c=i.next(),l={oldHeader:i,oldPanel:c,newHeader:s?t():o,newPanel:r};e.preventDefault(),a&&!n.collapsible||this._trigger("beforeActivate",e,l)===!1||(n.active=!s&&this.headers.index(o),this.active=a?t():o,this._toggle(l),i.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),a||(o.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&o.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),o.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var n=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,e):(i.hide(),n.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr("aria-selected","false"),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(t,e,n){var i,o,a,s=this,r=0,c=t.length&&(!e.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.currentTarget);n.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,n)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var n,i,o,a,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,i=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===i?a=!0:o=i+o,n=this._filterMenuItems(o),n=a&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(e.keyCode),n=this._filterMenuItems(o)),n.length?(this.focus(e,n),this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,n,i=this,o=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.parent(),i=t("").addClass("ui-menu-icon ui-icon "+o).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),e=a.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),n.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var n,i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=e.children(".ui-menu"),n.length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,i,o,a,s,r;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,o=e.offset().top-this.activeMenu.offset().top-n-i,a=this.activeMenu.scrollTop(),s=this.activeMenu.height(),r=e.outerHeight(),o<0?this.activeMenu.scrollTop(a+o):o+r>s&&this.activeMenu.scrollTop(a+o-s+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(e),this.activeMenu=i},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(e){var n,i,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i-o<0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var n,i,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i+o>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,i,o=this.element[0].nodeName.toLowerCase(),a="textarea"===o,s="input"===o;this.isMultiLine=!!a||!s&&this.element.prop("isContentEditable"),this.valueMethod=this.element[a||s?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return e=!0,i=!0,void(n=!0);e=!1,i=!1,n=!1;var a=t.ui.keyCode;switch(o.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",o);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",o);break;case a.UP:e=!0,this._keyEvent("previous",o);break;case a.DOWN:e=!0,this._keyEvent("next",o);break;case a.ENTER:this.menu.active&&(e=!0,o.preventDefault(),this.menu.select(o));break;case a.TAB:this.menu.active&&this.menu.select(o);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(o),o.preventDefault());break;default:n=!0,this._searchTimeout(o)}},keypress:function(i){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var o=t.ui.keyCode;switch(i.keyCode){case o.PAGE_UP:this._move("previousPage",i);break;case o.PAGE_DOWN:this._move("nextPage",i);break;case o.UP:this._keyEvent("previous",i);break;case o.DOWN:this._keyEvent("next",i)}}},input:function(t){return i?(i=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("
");var r=t("a",n),c=r[0],l=r[1],u=r[2],h=r[3];e.oApi._fnBindAction(c,{action:"first"},s),e.oApi._fnBindAction(l,{action:"previous"},s),e.oApi._fnBindAction(u,{action:"next"},s),e.oApi._fnBindAction(h,{action:"last"},s),e.aanFeatures.p||(n.id=e.sTableId+"_paginate",c.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",u.id=e.sTableId+"_next",h.id=e.sTableId+"_last")},fnUpdate:function(e,n){if(e.aanFeatures.p){var i,o,a,s,r,c=e.oInstance.fnPagingInfo(),l=t.fn.dataTableExt.oPagination.iFullNumbersShowPages,u=Math.floor(l/2),h=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),d=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,p="",f=(e.oClasses,e.aanFeatures.p);for(e._iDisplayLength===-1?(i=1,o=1,d=1):h=h-u?(i=h-l+1,o=h):(i=d-Math.ceil(l/2)+1,o=i+l-1),a=i;a<=o;a++)p+=d!==a?'
  • '+e.fnFormatNumber(a)+"
  • ":'
  • '+e.fnFormatNumber(a)+"
  • ";for(a=0,s=f.length;a",o[0];);return 4h.a.l(e,t[n])&&e.push(t[n]);return e},ya:function(t,e){t=t||[];for(var n=[],i=0,o=t.length;ii?n&&t.push(e):n||t.splice(i,1)},na:l,extend:r,ra:c,sa:l?c:r,A:s,Oa:function(t,e){if(!t)return t;var n,i={};for(n in t)t.hasOwnProperty(n)&&(i[n]=e(t[n],n,t));return i},Fa:function(t){for(;t.firstChild;)h.removeNode(t.firstChild)},ec:function(t){t=h.a.R(t);for(var e=n.createElement("div"),i=0,o=t.length;if?t.setAttribute("selected",e):t.selected=e},ta:function(e){return null===e||e===t?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},oc:function(t,e){for(var n=[],i=(t||"").split(e),o=0,a=i.length;ot.length)&&t.substring(0,e.length)===e},Sb:function(t,e){if(t===e)return!0;if(11===t.nodeType)return!1;if(e.contains)return e.contains(3===t.nodeType?t.parentNode:t);if(e.compareDocumentPosition)return 16==(16&e.compareDocumentPosition(t));for(;t&&t!=e;)t=t.parentNode;return!!t},Ea:function(t){return h.a.Sb(t,t.ownerDocument.documentElement)},eb:function(t){return!!h.a.hb(t,h.a.Ea)},B:function(t){return t&&t.tagName&&t.tagName.toLowerCase()},q:function(t,e,n){var i=f&&p[e];if(!i&&o)o(t).bind(e,n);else if(i||"function"!=typeof t.addEventListener){if("undefined"==typeof t.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var a=function(e){n.call(t,e)},s="on"+e;t.attachEvent(s,a),h.a.u.ja(t,function(){t.detachEvent(s,a)})}else t.addEventListener(e,n,!1)},ha:function(t,i){if(!t||!t.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var a;if("input"===h.a.B(t)&&t.type&&"click"==i.toLowerCase()?(a=t.type,a="checkbox"==a||"radio"==a):a=!1,o&&!a)o(t).trigger(i);else if("function"==typeof n.createEvent){if("function"!=typeof t.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");a=n.createEvent(d[i]||"HTMLEvents"),a.initEvent(i,!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,t),t.dispatchEvent(a)}else if(a&&t.click)t.click();else{if("undefined"==typeof t.fireEvent)throw Error("Browser doesn't support triggering events");t.fireEvent("on"+i)}},c:function(t){return h.v(t)?t():t},Sa:function(t){return h.v(t)?t.o():t},ua:function(t,e,n){if(e){var i=/\S+/g,o=t.className.match(i)||[];h.a.r(e.match(i),function(t){h.a.Y(o,t,n)}),t.className=o.join(" ")}},Xa:function(e,n){var i=h.a.c(n);null!==i&&i!==t||(i="");var o=h.e.firstChild(e);!o||3!=o.nodeType||h.e.nextSibling(o)?h.e.U(e,[e.ownerDocument.createTextNode(i)]):o.data=i,h.a.Vb(e)},Cb:function(t,e){if(t.name=e,7>=f)try{t.mergeAttributes(n.createElement(""),!1)}catch(i){}},Vb:function(t){9<=f&&(t=1==t.nodeType?t:t.parentNode,t.style&&(t.style.zoom=t.style.zoom))},Tb:function(t){if(f){var e=t.style.width;t.style.width=0,t.style.width=e}},ic:function(t,e){t=h.a.c(t),e=h.a.c(e);for(var n=[],i=t;i<=e;i++)n.push(i);return n},R:function(t){for(var e=[],n=0,i=t.length;n",""]||!a.indexOf("",""]||(!a.indexOf("",""]||[0,"",""],t="ignored
    "+a[1]+t+a[2]+"
    ","function"==typeof e.innerShiv?i.appendChild(e.innerShiv(t)):i.innerHTML=t;a[0]--;)i=i.lastChild;i=h.a.R(i.lastChild.childNodes)}return i},h.a.Va=function(e,n){if(h.a.Fa(e),n=h.a.c(n),null!==n&&n!==t)if("string"!=typeof n&&(n=n.toString()),o)o(e).html(n);else for(var i=h.a.Qa(n),a=0;a"},Hb:function(e,i){var o=n[e];if(o===t)throw Error("Couldn't find any memo with ID "+e+". Perhaps it's already been unmemoized.");try{return o.apply(null,i||[]),!0}finally{delete n[e]}},Ib:function(t,n){var i=[];e(t,i);for(var o=0,a=i.length;oa[0]?c+a[0]:a[0]),c);for(var c=1===l?c:Math.min(e+(a[1]||0),c),l=e+l-2,u=Math.max(c,l),d=[],p=[],f=2;ee;e++)t=t();return t})},h.toJSON=function(t,e,n){return t=h.Gb(t),h.a.Ya(t,e,n)},i.prototype={save:function(t,e){var n=h.a.l(this.keys,t);0<=n?this.ab[n]=e:(this.keys.push(t),this.ab.push(e))},get:function(e){return e=h.a.l(this.keys,e),0<=e?this.ab[e]:t}}}(),h.b("toJS",h.Gb),h.b("toJSON",h.toJSON),function(){h.i={p:function(e){switch(h.a.B(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?h.a.f.get(e,h.d.options.Pa):7>=h.a.oa?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return 0<=e.selectedIndex?h.i.p(e.options[e.selectedIndex]):t;default:return e.value}},X:function(e,n,i){switch(h.a.B(e)){case"option":switch(typeof n){case"string":h.a.f.set(e,h.d.options.Pa,t),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=n;break;default:h.a.f.set(e,h.d.options.Pa,n),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof n?n:""}break;case"select":""!==n&&null!==n||(n=t);for(var o,a=-1,s=0,r=e.options.length;s=c){e&&s.push(n?{key:e,value:n.join("")}:{unknown:e}),e=n=c=0;continue}}else if(58===d){if(!n)continue}else if(47===d&&u&&1"===n.createComment("test").text,s=a?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,r=a?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,c={ul:!0,ol:!0};h.e={Q:{},childNodes:function(e){return t(e)?i(e):e.childNodes},da:function(e){if(t(e)){e=h.e.childNodes(e);for(var n=0,i=e.length;n=h.a.oa&&n in g?(n=g[n],o?e.removeAttribute(n):e[n]=i):o||e.setAttribute(n,i.toString()),"name"===n&&h.a.Cb(e,o?"":i.toString())})}},function(){h.d.checked={after:["value","attr"],init:function(e,n,i){function o(){return i.has("checkedValue")?h.a.c(i.get("checkedValue")):e.value}function a(){var t=e.checked,a=d?o():t;if(!h.ca.pa()&&(!c||t)){var s=h.k.t(n);l?u!==a?(t&&(h.a.Y(s,a,!0),h.a.Y(s,u,!1)),u=a):h.a.Y(s,a,t):h.g.va(s,i,"checked",a,!0)}}function s(){var t=h.a.c(n());e.checked=l?0<=h.a.l(t,o()):r?t:o()===t}var r="checkbox"==e.type,c="radio"==e.type;if(r||c){var l=r&&h.a.c(n())instanceof Array,u=l?o():t,d=c||l;c&&!e.name&&h.d.uniqueName.init(e,function(){return!0}),h.ba(a,null,{G:e}),h.a.q(e,"click",a),h.ba(s,null,{G:e})}}},h.g.W.checked=!0,h.d.checkedValue={update:function(t,e){t.value=h.a.c(e())}}}(),h.d.css={update:function(t,e){var n=h.a.c(e());"object"==typeof n?h.a.A(n,function(e,n){n=h.a.c(n),h.a.ua(t,e,n)}):(n=String(n||""),h.a.ua(t,t.__ko__cssValue,!1),t.__ko__cssValue=n,h.a.ua(t,n,!0))}},h.d.enable={update:function(t,e){var n=h.a.c(e());n&&t.disabled?t.removeAttribute("disabled"):n||t.disabled||(t.disabled=!0)}},h.d.disable={update:function(t,e){h.d.enable.update(t,function(){return!h.a.c(e())})}},h.d.event={init:function(t,e,n,i,o){var a=e()||{};h.a.A(a,function(a){"string"==typeof a&&h.a.q(t,a,function(t){var s,r=e()[a];if(r){try{var c=h.a.R(arguments);i=o.$data,c.unshift(i),s=r.apply(i,c)}finally{!0!==s&&(t.preventDefault?t.preventDefault():t.returnValue=!1)}!1===n.get(a+"Bubble")&&(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation())}})})}},h.d.foreach={vb:function(t){return function(){var e=t(),n=h.a.Sa(e);return n&&"number"!=typeof n.length?(h.a.c(e),{foreach:n.data,as:n.as,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:h.K.Ja}):{foreach:e,templateEngine:h.K.Ja}}},init:function(t,e){return h.d.template.init(t,h.d.foreach.vb(e))},update:function(t,e,n,i,o){return h.d.template.update(t,h.d.foreach.vb(e),n,i,o)}},h.g.aa.foreach=!1,h.e.Q.foreach=!0,h.d.hasfocus={init:function(t,e,n){function i(i){t.__ko_hasfocusUpdating=!0;var o=t.ownerDocument;if("activeElement"in o){var a;try{a=o.activeElement}catch(s){a=o.body}i=a===t}o=e(),h.g.va(o,n,"hasfocus",i,!0),t.__ko_hasfocusLastValue=i,t.__ko_hasfocusUpdating=!1}var o=i.bind(null,!0),a=i.bind(null,!1);h.a.q(t,"focus",o),h.a.q(t,"focusin",o),h.a.q(t,"blur",a),h.a.q(t,"focusout",a)},update:function(t,e){var n=!!h.a.c(e());t.__ko_hasfocusUpdating||t.__ko_hasfocusLastValue===n||(n?t.focus():t.blur(),h.k.t(h.a.ha,null,[t,n?"focusin":"focusout"]))}},h.g.W.hasfocus=!0,h.d.hasFocus=h.d.hasfocus,h.g.W.hasFocus=!0,h.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){h.a.Va(t,e())}},u("if"),u("ifnot",!1,!0),u("with",!0,!1,function(t,e){return t.createChildContext(e)});var b={};h.d.options={init:function(t){if("select"!==h.a.B(t))throw Error("options binding applies only to SELECT elements");for(;0","#comment",o)})},Mb:function(t,e){return h.w.Na(function(n,i){var o=n.nextSibling;o&&o.nodeName.toLowerCase()===e&&h.xa(o,t,i)})}}}(),h.b("__tr_ambtns",h.Za.Mb),function(){h.n={},h.n.j=function(t){this.j=t},h.n.j.prototype.text=function(){var t=h.a.B(this.j),t="script"===t?"text":"textarea"===t?"value":"innerHTML";if(0==arguments.length)return this.j[t];var e=arguments[0];"innerHTML"===t?h.a.Va(this.j,e):this.j[t]=e};var e=h.a.f.L()+"_";h.n.j.prototype.data=function(t){return 1===arguments.length?h.a.f.get(this.j,e+t):void h.a.f.set(this.j,e+t,arguments[1])};var n=h.a.f.L();h.n.Z=function(t){this.j=t},h.n.Z.prototype=new h.n.j,h.n.Z.prototype.text=function(){if(0==arguments.length){var e=h.a.f.get(this.j,n)||{};return e.$a===t&&e.Ba&&(e.$a=e.Ba.innerHTML),e.$a}h.a.f.set(this.j,n,{$a:arguments[0]})},h.n.j.prototype.nodes=function(){return 0==arguments.length?(h.a.f.get(this.j,n)||{}).Ba:void h.a.f.set(this.j,n,{Ba:arguments[0]})},h.b("templateSources",h.n),h.b("templateSources.domElement",h.n.j),h.b("templateSources.anonymousTemplate",h.n.Z)}(),function(){function e(t,e,n){var i;for(e=h.e.nextSibling(e);t&&(i=t)!==e;)t=h.e.nextSibling(i),n(i,t)}function n(t,n){if(t.length){var i=t[0],o=t[t.length-1],a=i.parentNode,s=h.J.instance,r=s.preprocessNode;if(r){if(e(i,o,function(t,e){var n=t.previousSibling,a=r.call(s,t);a&&(t===i&&(i=a[0]||e),t===o&&(o=a[a.length-1]||n))}),t.length=0,!i)return;i===o?t.push(i):(t.push(i,o),h.a.ea(t,a))}e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||h.fb(n,t)}),e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||h.w.Ib(t,[n])}),h.a.ea(t,a)}}function i(t){return t.nodeType?t:0h.a.oa?0:t.nodes)?t.nodes():null;return e?h.a.R(e.cloneNode(!0).childNodes):(t=t.text(),h.a.Qa(t))},h.K.Ja=new h.K,h.Wa(h.K.Ja),h.b("nativeTemplateEngine",h.K),function(){h.La=function(){var t=this.ac=function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(t){}return 1}();this.renderTemplateSource=function(e,i,a){if(a=a||{},2>t)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=e.data("precompiled");return s||(s=e.text()||"",s=o.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),e.data("precompiled",s)),e=[i.$data],i=o.extend({koBindingContext:i},a.templateOptions),i=o.tmpl(s,e,i),i.appendTo(n.createElement("div")),o.fragments={},i},this.createJavaScriptEvaluatorBlock=function(t){return"{{ko_code ((function() { return "+t+" })()) }}"},this.addTemplate=function(t,e){n.write("")},0=0&&(u&&(u.splice(m,1),t.processAllDeferredBindingUpdates&&t.processAllDeferredBindingUpdates()),p.splice(g,0,A)),l(v,n,null),t.processAllDeferredBindingUpdates&&t.processAllDeferredBindingUpdates(),T.afterMove&&T.afterMove.call(this,b,s,r)}y&&y.apply(this,arguments)},connectWith:!!T.connectClass&&"."+T.connectClass})),void 0!==T.isEnabled&&t.computed({read:function(){A.sortable(r(T.isEnabled)?"enable":"disable")},disposeWhenNodeIsRemoved:u})},0);return t.utils.domNodeDisposal.addDisposeCallback(u,function(){(A.data("ui-sortable")||A.data("sortable"))&&A.sortable("destroy"),clearTimeout(w)}),{controlsDescendantBindings:!0}},update:function(e,n,i,a,s){var r=p(n,"foreach");l(e,o,r.foreach),t.bindingHandlers.template.update(e,function(){return r},i,a,s)},connectClass:"ko_container",allowDrop:!0,afterMove:null,beforeMove:null,options:{}},t.bindingHandlers.draggable={init:function(n,i,o,a,c){var u=r(i())||{},h=u.options||{},d=t.utils.extend({},t.bindingHandlers.draggable.options),f=p(i,"data"),m=u.connectClass||t.bindingHandlers.draggable.connectClass,g=void 0!==u.isEnabled?u.isEnabled:t.bindingHandlers.draggable.isEnabled;return u="data"in u?u.data:u,l(n,s,u),t.utils.extend(d,h),d.connectToSortable=!!m&&"."+m,e(n).draggable(d),void 0!==g&&t.computed({read:function(){e(n).draggable(r(g)?"enable":"disable")},disposeWhenNodeIsRemoved:n}),t.bindingHandlers.template.init(n,function(){return f},o,a,c)},update:function(e,n,i,o,a){var s=p(n,"data");return t.bindingHandlers.template.update(e,function(){return s},i,o,a)},connectClass:t.bindingHandlers.sortable.connectClass,options:{helper:"clone"}}}),function(){var t=this,e=t._,n=Array.prototype,i=Object.prototype,o=Function.prototype,a=n.push,s=n.slice,r=n.concat,c=i.toString,l=i.hasOwnProperty,u=Array.isArray,h=Object.keys,d=o.bind,p=function(t){return t instanceof p?t:this instanceof p?void(this._wrapped=t):new p(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=p),exports._=p):t._=p,p.VERSION="1.7.0";var f=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)};case 4:return function(n,i,o,a){return t.call(e,n,i,o,a)}}return function(){return t.apply(e,arguments)}};p.iteratee=function(t,e,n){return null==t?p.identity:p.isFunction(t)?f(t,e,n):p.isObject(t)?p.matches(t):p.property(t)},p.each=p.forEach=function(t,e,n){if(null==t)return t;e=f(e,n);var i,o=t.length;if(o===+o)for(i=0;i=0)},p.invoke=function(t,e){var n=s.call(arguments,2),i=p.isFunction(e);return p.map(t,function(t){return(i?e:t[e]).apply(t,n)})},p.pluck=function(t,e){return p.map(t,p.property(e))},p.where=function(t,e){return p.filter(t,p.matches(e))},p.findWhere=function(t,e){return p.find(t,p.matches(e))},p.max=function(t,e,n){var i,o,a=-(1/0),s=-(1/0);if(null==e&&null!=t){t=t.length===+t.length?t:p.values(t);for(var r=0,c=t.length;ra&&(a=i)}else e=p.iteratee(e,n),p.each(t,function(t,n,i){o=e(t,n,i),(o>s||o===-(1/0)&&a===-(1/0))&&(a=t,s=o)});return a},p.min=function(t,e,n){var i,o,a=1/0,s=1/0;if(null==e&&null!=t){t=t.length===+t.length?t:p.values(t);for(var r=0,c=t.length;ri||void 0===n)return 1;if(n>>1;n(t[r])=0;)if(t[i]===e)return i;return-1},p.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=n||1;for(var i=Math.max(Math.ceil((e-t)/n),0),o=Array(i),a=0;ae?(clearTimeout(s),s=null,r=l,a=t.apply(i,o),s||(i=o=null)):s||n.trailing===!1||(s=setTimeout(c,u)),a}},p.debounce=function(t,e,n){var i,o,a,s,r,c=function(){var l=p.now()-s;l0?i=setTimeout(c,e-l):(i=null,n||(r=t.apply(a,o),i||(a=o=null)))};return function(){a=this,o=arguments,s=p.now();var l=n&&!i;return i||(i=setTimeout(c,e)),l&&(r=t.apply(a,o),a=o=null),r}},p.wrap=function(t,e){return p.partial(e,t)},p.negate=function(t){return function(){return!t.apply(this,arguments)}},p.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},p.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},p.before=function(t,e){var n;return function(){return--t>0?n=e.apply(this,arguments):e=null,n}},p.once=p.partial(p.before,2),p.keys=function(t){if(!p.isObject(t))return[];if(h)return h(t);var e=[];for(var n in t)p.has(t,n)&&e.push(n);return e},p.values=function(t){for(var e=p.keys(t),n=e.length,i=Array(n),o=0;o":">",'"':""","'":"'","`":"`"},A=p.invert(y),_=function(t){var e=function(e){return t[e]},n="(?:"+p.keys(t).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(o,e):t}};p.escape=_(y),p.unescape=_(A),p.result=function(t,e){if(null!=t){var n=t[e];return p.isFunction(n)?t[e]():n}};var z=0;p.uniqueId=function(t){var e=++z+"";return t?t+e:e},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,w={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},C=/\\|'|\r|\n|\u2028|\u2029/g,O=function(t){return"\\"+w[t]};p.template=function(t,e,n){!e&&n&&(e=n),e=p.defaults({},e,p.templateSettings);var i=RegExp([(e.escape||T).source,(e.interpolate||T).source,(e.evaluate||T).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,function(e,n,i,s,r){return a+=t.slice(o,r).replace(C,O),o=r+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?a+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(a+="';\n"+s+"\n__p+='"),e}),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var s=new Function(e.variable||"obj","_",a)}catch(r){throw r.source=a,r}var c=function(t){return s.call(this,t,p)},l=e.variable||"obj";return c.source="function("+l+"){\n"+a+"}",c},p.chain=function(t){var e=p(t);return e._chain=!0,e};var N=function(t){return this._chain?p(t).chain():t};p.mixin=function(t){p.each(p.functions(t),function(e){var n=p[e]=t[e];p.prototype[e]=function(){var t=[this._wrapped];return a.apply(t,arguments),N.call(this,n.apply(p,t))}})},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=n[t];p.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],N.call(this,n)}}),p.each(["concat","join","slice"],function(t){var e=n[t];p.prototype[t]=function(){return N.call(this,e.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}.call(this),function(t,e){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var t=new Date;return n(t.getFullYear(),t.getMonth(),t.getDate())}function o(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function a(t){return function(){return this[t].apply(this,arguments)}}function s(e,n){function i(t,e){return e.toLowerCase()}var o,a=t(e).data(),s={},r=new RegExp("^"+n.toLowerCase()+"([A-Z])");n=new RegExp("^"+n.toLowerCase());for(var c in a)n.test(c)&&(o=c.replace(r,i),s[o]=a[c]);return s}function r(e){var n={};if(m[e]||(e=e.split("-")[0],m[e])){var i=m[e];return t.each(f,function(t,e){e in i&&(n[e]=i[e])}),n}}var c=function(){var e={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),n=0,i=this.length;no?(this.picker.addClass("datepicker-orient-right"),p=u.left+d-e):this.picker.addClass("datepicker-orient-left");var m,g,b=this.o.orientation.y;if("auto"===b&&(m=-s+f-n,g=s+a-(f+h+n),b=Math.max(m,g)===g?"top":"bottom"),this.picker.addClass("datepicker-orient-"+b),"top"===b?f+=h:f-=n+parseInt(this.picker.css("padding-top")),this.o.rtl){var v=o-(p+d);this.picker.css({top:f,right:v,zIndex:l})}else this.picker.css({top:f,left:p,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),n=[],i=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),n.push(e)},this)),i=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n=n&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=t.map(n,t.proxy(function(t){return g.parseDate(t,this.o.format,this.o.language)},this)),n=t.grep(n,t.proxy(function(t){return tthis.o.endDate||!t},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate&&(this.viewDate=new Date(this.o.endDate)),i?this.setValue():n.length&&String(e)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&e.length&&this._trigger("clearDate"),this.fill(),this},fillDow:function(){var t=this.o.weekStart,e="";if(this.o.calendarWeeks){this.picker.find(".datepicker-days thead tr:first-child .datepicker-switch").attr("colspan",function(t,e){return parseInt(e)+1});var n=' ';e+=n}for(;t'+m[this.o.language].daysMin[t++%7]+"";e+="",this.picker.find(".datepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+=''+m[this.o.language].monthsShort[e++]+"";this.picker.find(".datepicker-months td").html(t)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var n=[],i=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),s=new Date;return e.getUTCFullYear()i||e.getUTCFullYear()===i&&e.getUTCMonth()>a)&&n.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&e.getUTCFullYear()===s.getFullYear()&&e.getUTCMonth()===s.getMonth()&&e.getUTCDate()===s.getDate()&&n.push("today"),this.dates.contains(e)!==-1&&n.push("active"),(e.valueOf()this.o.endDate||t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("disabled"),this.o.datesDisabled.length>0&&t.grep(this.o.datesDisabled,function(t){return o(e,t)}).length>0&&n.push("disabled","disabled-date"),this.range&&(e>this.range[0]&&e"),this.o.calendarWeeks)){var y=new Date(+p+(this.o.weekStart-p.getUTCDay()-7)%7*864e5),A=new Date(Number(y)+(11-y.getUTCDay())%7*864e5),_=new Date(Number(_=n(A.getUTCFullYear(),0,1))+(11-_.getUTCDay())%7*864e5),z=(A-_)/864e5/7+1;M.push(''+z+"")}if(v=this.getClassNames(p),v.push("day"),this.o.beforeShowDay!==t.noop){var T=this.o.beforeShowDay(this._utc_to_local(p));T===e?T={}:"boolean"==typeof T?T={enabled:T}:"string"==typeof T&&(T={classes:T}),T.enabled===!1&&v.push("disabled"),T.classes&&(v=v.concat(T.classes.split(/\s+/))),T.tooltip&&(i=T.tooltip)}v=t.unique(v),M.push('"+p.getUTCDate()+""),i=null,p.getUTCDay()===this.o.weekEnd&&M.push(""),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(M.join(""));var w=this.picker.find(".datepicker-months").find("th:eq(1)").text(a).end().find("span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===a&&w.eq(e.getUTCMonth()).addClass("active")}),(al)&&w.addClass("disabled"),a===r&&w.slice(0,c).addClass("disabled"),a===l&&w.slice(u+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var C=this;t.each(w,function(e,n){if(!t(n).hasClass("disabled")){var i=new Date(a,e,1),o=C.o.beforeShowMonth(i);o===!1&&t(n).addClass("disabled")}})}M="",a=10*parseInt(a/10,10);var O=this.picker.find(".datepicker-years").find("th:eq(1)").text(a+"-"+(a+9)).end().find("td");a-=1;for(var N,S=t.map(this.dates,function(t){return t.getUTCFullYear()}),x=-1;x<11;x++)N=["year"],x===-1?N.push("old"):10===x&&N.push("new"),t.inArray(a,S)!==-1&&N.push("active"),(al)&&N.push("disabled"),M+=''+a+"",a+=1;O.html(M)}},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),n=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-(1/0)&&e<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-(1/0)&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(e){e.preventDefault();var i,o,a,s=t(e.target).closest("span, td, th");if(1===s.length)switch(s[0].nodeName.toLowerCase()){case"th":switch(s[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var r=g.modes[this.viewMode].navStep*("prev"===s[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,r),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,r),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var c=new Date;c=n(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0),this.showMode(-2);var l="linked"===this.o.todayBtn?null:"view";this._setDate(c,l);break;case"clear":this.clearDates()}break;case"span":s.hasClass("disabled")||(this.viewDate.setUTCDate(1),s.hasClass("month")?(a=1,o=s.parent().find("span").index(s),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(o),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(n(i,o,a))):(a=1,o=0,i=parseInt(s.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(n(i,o,a))),this.showMode(-1),this.fill());break;case"td":s.hasClass("day")&&!s.hasClass("disabled")&&(a=parseInt(s.text(),10)||1,i=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),s.hasClass("old")?0===o?(o=11,i-=1):o-=1:s.hasClass("new")&&(11===o?(o=0,i+=1):o+=1),this._setDate(n(i,o,a)))}this.picker.is(":visible")&&this._focused_from&&t(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),e!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):this.o.multidate===!1?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),e&&"view"!==e||(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),!this.o.autoclose||e&&"date"!==e||this.hide()},moveMonth:function(t,n){if(!t)return e;if(!n)return t;var i,o,a=new Date(t.valueOf()),s=a.getUTCDate(),r=a.getUTCMonth(),c=Math.abs(n);if(n=n>0?1:-1,1===c)o=n===-1?function(){return a.getUTCMonth()===r}:function(){return a.getUTCMonth()!==i},i=r+n,a.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var l=0;l=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(!this.picker.is(":visible"))return void(27===t.keyCode&&this.show());var e,n,o,a=!1,s=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;e=37===t.keyCode?-1:1,t.ctrlKey?(n=this.moveYear(this.dates.get(-1)||i(),e),o=this.moveYear(s,e),this._trigger("changeYear",this.viewDate)):t.shiftKey?(n=this.moveMonth(this.dates.get(-1)||i(),e),o=this.moveMonth(s,e),this._trigger("changeMonth",this.viewDate)):(n=new Date(this.dates.get(-1)||i()),n.setUTCDate(n.getUTCDate()+e),o=new Date(s),o.setUTCDate(s.getUTCDate()+e)),this.dateWithinRange(o)&&(this.focusDate=this.viewDate=o,this.setValue(),this.fill(),t.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;e=38===t.keyCode?-1:1,t.ctrlKey?(n=this.moveYear(this.dates.get(-1)||i(),e),o=this.moveYear(s,e),this._trigger("changeYear",this.viewDate)):t.shiftKey?(n=this.moveMonth(this.dates.get(-1)||i(),e),o=this.moveMonth(s,e),this._trigger("changeMonth",this.viewDate)):(n=new Date(this.dates.get(-1)||i()),n.setUTCDate(n.getUTCDate()+7*e),o=new Date(s),o.setUTCDate(s.getUTCDate()+7*e)),this.dateWithinRange(o)&&(this.focusDate=this.viewDate=o,this.setValue(),this.fill(),t.preventDefault());break;case 32:break;case 13:s=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(s),a=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),"function"==typeof t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(a){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var r;this.isInput?r=this.element:this.component&&(r=this.element.find("input")),r&&r.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.children("div").hide().filter(".datepicker-"+g.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var u=function(e,n){this.element=t(e),this.inputs=t.map(n.inputs,function(t){return t.jquery?t[0]:t}),delete n.inputs,d.call(t(this.inputs),n).bind("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t(e).data("datepicker")}),this.updateDates()};u.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,n){n.setRange(e)})},dateUpdated:function(e){if(!this.updating){this.updating=!0;var n=t(e.target).data("datepicker"),i=n.getUTCDate(),o=t.inArray(e.target,this.inputs),a=o-1,s=o+1,r=this.inputs.length;if(o!==-1){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e.setUTCDate(i)}),i=0&&ithis.dates[s])for(;sthis.dates[s];)this.pickers[s++].setUTCDate(i);this.updateDates(),delete this.updating}}},remove:function(){t.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var h=t.fn.datepicker,d=function(n){var i=Array.apply(null,arguments);i.shift();var o;return this.each(function(){var a=t(this),c=a.data("datepicker"),h="object"==typeof n&&n;if(!c){var d=s(this,"date"),f=t.extend({},p,d,h),m=r(f.language),g=t.extend({},p,m,d,h);if(a.hasClass("input-daterange")||g.inputs){var b={inputs:g.inputs||a.find("input").toArray()};a.data("datepicker",c=new u(this,t.extend(g,b)))}else a.data("datepicker",c=new l(this,g))}if("string"==typeof n&&"function"==typeof c[n]&&(o=c[n].apply(c,i),o!==e))return!1}),o!==e?o:this};t.fn.datepicker=d;var p=t.fn.datepicker.defaults={autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,container:"body"},f=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=l;var m=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},g={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},getDaysInMonth:function(t,e){return[31,g.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),n=t.match(this.validParts);if(!e||!e.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:e,parts:n}},parseDate:function(i,o,a){function s(){var t=this.slice(0,d[u].length),e=d[u].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;"string"==typeof o&&(o=g.parseFormat(o));var r,c,u,h=/([\-+]\d+)([dmwy])/,d=i.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(i)){ -for(i=new Date,u=0;u«»',contTemplate:'',footTemplate:''};g.template='
    '+g.headTemplate+""+g.footTemplate+'
    '+g.headTemplate+g.contTemplate+g.footTemplate+'
    '+g.headTemplate+g.contTemplate+g.footTemplate+"
    ",t.fn.datepicker.DPGlobal=g,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=h,this},t.fn.datepicker.version="1.4.0",t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var n=t(this);n.data("datepicker")||(e.preventDefault(),d.call(n,"show"))}),t(function(){d.call(t('[data-provide="datepicker-inline"]'))})}(window.jQuery),!function(t){t.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}(jQuery),!function(t){t.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}(jQuery),!function(t){t.fn.datepicker.dates.nl={days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag","zondag"],daysShort:["zo","ma","di","wo","do","vr","za","zo"],daysMin:["zo","ma","di","wo","do","vr","za","zo"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthsShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],today:"Vandaag",clear:"Wissen",weekStart:1,format:"dd-mm-yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.fr={days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],daysShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam.","dim."],daysMin:["d","l","ma","me","j","v","s","d"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthsShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}(jQuery),!function(t){t.fn.datepicker.dates.no={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I dag",clear:"Nullstill",weekStart:1,format:"dd.mm.yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy",clear:"Borrar",weekStart:1,format:"dd/mm/yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Idag",format:"yyyy-mm-dd",weekStart:1,clear:"Rensa"}}(jQuery),function(){var t,e,n,i,o,a,s,r,c=[].slice,l={}.hasOwnProperty,u=function(t,e){function n(){this.constructor=t}for(var i in e)l.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};s=function(){},e=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,n,i,o,a;if(i=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],this._callbacks=this._callbacks||{},n=this._callbacks[i])for(o=0,a=n.length;o
    '),this.element.appendChild(e)),i=e.getElementsByTagName("span")[0],i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t){var e,n,i;return e={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},n=t.width/t.height,e.optWidth=this.options.thumbnailWidth,e.optHeight=this.options.thumbnailHeight,null==e.optWidth&&null==e.optHeight?(e.optWidth=e.srcWidth,e.optHeight=e.srcHeight):null==e.optWidth?e.optWidth=n*e.optHeight:null==e.optHeight&&(e.optHeight=1/n*e.optWidth),i=e.optWidth/e.optHeight,t.heighti?(e.srcHeight=t.height,e.srcWidth=e.srcHeight*i):(e.srcWidth=t.width,e.srcHeight=e.srcWidth/i),e.srcX=(t.width-e.srcWidth)/2,e.srcY=(t.height-e.srcHeight)/2,e},drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:s,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e,i,o,a,s,r,c,l,u,h,d,p,f;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=n.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),h=t.previewElement.querySelectorAll("[data-dz-name]"),a=0,c=h.length;a'+this.options.dictRemoveFile+""),t.previewElement.appendChild(t._removeLink)),i=function(e){return function(i){return i.preventDefault(),i.stopPropagation(),t.status===n.UPLOADING?n.confirm(e.options.dictCancelUploadConfirmation,function(){return e.removeFile(t)}):e.options.dictRemoveFileConfirmation?n.confirm(e.options.dictRemoveFileConfirmation,function(){return e.removeFile(t)}):e.removeFile(t)}}(this),p=t.previewElement.querySelectorAll("[data-dz-remove]"),f=[],r=0,u=p.length;r\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n Check\n \n \n \n \n \n
    \n
    \n \n Error\n \n \n \n \n \n \n \n
    \n'},i=function(){var t,e,n,i,o,a,s;for(i=arguments[0],n=2<=arguments.length?c.call(arguments,1):[],a=0,s=n.length;a'+this.options.dictDefaultMessage+"")),this.clickableElements.length&&(i=function(t){return function(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null==t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!=t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!=t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e,n,o,a;if(n=t.hiddenFileInput.files,n.length)for(o=0,a=n.length;o',this.options.dictFallbackText&&(i+="

    "+this.options.dictFallbackText+"

    "),i+='',e=n.createElement(i),"FORM"!==this.element.tagName?(o=n.createElement('
    '),o.appendChild(e)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=o?o:e)},n.prototype.getExistingFallback=function(){var t,e,n,i,o,a;for(e=function(t){var e,n,i;for(n=0,i=t.length;n0){for(s=["TB","GB","MB","KB","b"],n=r=0,c=s.length;r=e){i=t/Math.pow(this.options.filesizeBase,4-n),o=a;break}i=Math.round(10*i)/10}return""+i+" "+o},n.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},n.prototype.drop=function(t){var e,n;t.dataTransfer&&(this.emit("drop",t),e=t.dataTransfer.files,this.emit("addedfiles",e),e.length&&(n=t.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(e)))},n.prototype.paste=function(t){var e,n;if(null!=(null!=t&&null!=(n=t.clipboardData)?n.items:void 0))return this.emit("paste",t),e=t.clipboardData.items,e.length?this._addFilesFromItems(e):void 0},n.prototype.handleFiles=function(t){var e,n,i,o;for(o=[],n=0,i=t.length;n0){for(a=0,s=n.length;a1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)},n.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=n.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return function(n){return n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}}(this))},n.prototype.enqueueFiles=function(t){var e,n,i;for(n=0,i=t.length;n=e)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,e-n));for(;t=B;u=0<=B?++L:--L)a.append(this._getParamName(u),t[u],this._renameFilename(t[u].name));return this.submitRequest(_,a,t)},n.prototype.submitRequest=function(t,e,n){return t.send(e)},n.prototype._finished=function(t,e,i){var o,a,s;for(a=0,s=t.length;au;)e=o[4*(c-1)+3],0===e?a=c:u=c,c=a+u>>1;return l=c/s,0===l?1:l},a=function(t,e,n,i,a,s,r,c,l,u){var h;return h=o(e),t.drawImage(e,n,i,a,s,r,c,l,u/h)},i=function(t,e){var n,i,o,a,s,r,c,l,u;if(o=!1,u=!0,i=t.document,l=i.documentElement,n=i.addEventListener?"addEventListener":"attachEvent",c=i.addEventListener?"removeEventListener":"detachEvent",r=i.addEventListener?"":"on",a=function(n){if("readystatechange"!==n.type||"complete"===i.readyState)return("load"===n.type?t:i)[c](r+n.type,a,!1),!o&&(o=!0)?e.call(t,n.type||n):void 0},s=function(){var t;try{l.doScroll("left")}catch(e){return t=e,void setTimeout(s,50)}return a("poll")},"complete"!==i.readyState){if(i.createEventObject&&l.doScroll){try{u=!t.frameElement}catch(h){}u&&s()}return i[n](r+"DOMContentLoaded",a,!1),i[n](r+"readystatechange",a,!1),t[n](r+"load",a,!1)}},t._autoDiscoverFunction=function(){if(t.autoDiscover)return t.discover()},i(window,t._autoDiscoverFunction)}.call(this),function(t,e){"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(this,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return"undefined"==typeof t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,n){function i(t,e){return n(e,t)}t.each(e,i)},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,o){if(!(i=n.call(null,o,t,e)))return!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,o){if(i=n.call(null,o,t,e))return!1}),!!i):i},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){function n(){return String(e)}return t.isFunction(e)?e:n},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,o;return function(){var a,s,r=this,c=arguments;return a=function(){i=null,n||(o=t.apply(r,c))},s=n&&!i,clearTimeout(i),i=setTimeout(a,e),s&&(o=t.apply(r,c)),o}},throttle:function(t,e){var n,i,o,a,s,r;return s=0,r=function(){s=new Date,o=null,a=t.apply(n,i)},function(){var c=new Date,l=e-(c-s);return n=this,i=arguments,l<=0?(clearTimeout(o),o=null,s=c,a=t.apply(n,i)):o||(o=setTimeout(r,l)),a}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n=function(){"use strict";function t(t){var s,r;return r=e.mixin({},a,t),s={css:o(),classes:r,html:n(r),selectors:i(r)},{css:s.css,html:s.html,classes:s.classes,selectors:s.selectors,mixin:function(t){e.mixin(t,s)}}}function n(t){return{wrapper:'',menu:'
    '}}function i(t){var n={};return e.each(t,function(t,e){n[e]="."+t}),n}function o(){var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t}var a={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return t}(),i=function(){"use strict";function n(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}var i,o;return i="typeahead:",o={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(n.prototype,{_trigger:function(e,n){var o;return o=t.Event(i+e),(n=n||[]).unshift(o),this.$el.trigger.apply(this.$el,n),o},before:function(t){var e,n;return e=[].slice.call(arguments,1),n=this._trigger("before"+t,e),n.isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=o[t])&&this._trigger(e,[].slice.call(arguments,1))}}),n}(),o=function(){"use strict";function t(t,e,n,i){var o;if(!n)return this;for(e=e.split(c),n=i?r(n,i):n,this._callbacks=this._callbacks||{};o=e.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][t].push(n);return this}function e(e,n,i){return t.call(this,"async",e,n,i)}function n(e,n,i){return t.call(this,"sync",e,n,i)}function i(t){var e;if(!this._callbacks)return this;for(t=t.split(c);e=t.shift();)delete this._callbacks[e];return this}function o(t){var e,n,i,o,s;if(!this._callbacks)return this;for(t=t.split(c),i=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)o=a(n.sync,this,[e].concat(i)),s=a(n.async,this,[e].concat(i)),o()&&l(s);return this}function a(t,e,n){function i(){for(var i,o=0,a=t.length;!i&&o