mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
4f67ec12a9
commit
9e6b25bcc4
@ -40,7 +40,6 @@ use App\Ninja\Repositories\AccountRepository;
|
|||||||
use App\Ninja\Mailers\UserMailer;
|
use App\Ninja\Mailers\UserMailer;
|
||||||
use App\Ninja\Mailers\ContactMailer;
|
use App\Ninja\Mailers\ContactMailer;
|
||||||
use App\Events\UserLoggedIn;
|
use App\Events\UserLoggedIn;
|
||||||
use App\Events\UserSettingsChanged;
|
|
||||||
|
|
||||||
class AccountController extends BaseController
|
class AccountController extends BaseController
|
||||||
{
|
{
|
||||||
@ -686,7 +685,7 @@ class AccountController extends BaseController
|
|||||||
$user->username = trim(Input::get('email'));
|
$user->username = trim(Input::get('email'));
|
||||||
$user->email = trim(strtolower(Input::get('email')));
|
$user->email = trim(strtolower(Input::get('email')));
|
||||||
$user->phone = trim(Input::get('phone'));
|
$user->phone = trim(Input::get('phone'));
|
||||||
if (Utils::isNinja()) {
|
if (Utils::isNinjaDev()) {
|
||||||
$user->dark_mode = Input::get('dark_mode') ? true : false;
|
$user->dark_mode = Input::get('dark_mode') ? true : false;
|
||||||
}
|
}
|
||||||
$user->save();
|
$user->save();
|
||||||
@ -698,7 +697,6 @@ class AccountController extends BaseController
|
|||||||
File::delete('logo/'.$account->account_key.'.jpg');
|
File::delete('logo/'.$account->account_key.'.jpg');
|
||||||
File::delete('logo/'.$account->account_key.'.png');
|
File::delete('logo/'.$account->account_key.'.png');
|
||||||
|
|
||||||
$image = Image::make($path);
|
|
||||||
$mimeType = $file->getMimeType();
|
$mimeType = $file->getMimeType();
|
||||||
|
|
||||||
if ($mimeType == 'image/jpeg') {
|
if ($mimeType == 'image/jpeg') {
|
||||||
@ -706,15 +704,19 @@ class AccountController extends BaseController
|
|||||||
} else if ($mimeType == 'image/png') {
|
} else if ($mimeType == 'image/png') {
|
||||||
$file->move('logo/', $account->account_key . '.png');
|
$file->move('logo/', $account->account_key . '.png');
|
||||||
} else {
|
} else {
|
||||||
|
if (extension_loaded('fileinfo')) {
|
||||||
|
$image = Image::make($path);
|
||||||
$image->resize(200, 120, function ($constraint) {
|
$image->resize(200, 120, function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
});
|
});
|
||||||
Image::canvas($image->width(), $image->height(), '#FFFFFF')
|
Image::canvas($image->width(), $image->height(), '#FFFFFF')
|
||||||
->insert($image)->save('logo/'.$account->account_key.'.jpg');
|
->insert($image)->save('logo/'.$account->account_key.'.jpg');
|
||||||
|
} else {
|
||||||
|
Session::flash('warning', 'Warning: To support gifs the fileinfo PHP extension needs to be enabled.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::fire(new UserSettingsChanged());
|
|
||||||
Session::flash('message', trans('texts.updated_settings'));
|
Session::flash('message', trans('texts.updated_settings'));
|
||||||
|
|
||||||
return Redirect::to('company/details');
|
return Redirect::to('company/details');
|
||||||
@ -766,7 +768,7 @@ class AccountController extends BaseController
|
|||||||
$user->registered = true;
|
$user->registered = true;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
if (Utils::isNinja()) {
|
if (Utils::isNinjaProd()) {
|
||||||
$this->userMailer->sendConfirmation($user);
|
$this->userMailer->sendConfirmation($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class AppController extends BaseController
|
|||||||
|
|
||||||
public function showSetup()
|
public function showSetup()
|
||||||
{
|
{
|
||||||
if (Utils::isNinja() || (Utils::isDatabaseSetup() && Account::count() > 0)) {
|
if (Utils::isNinjaProd() || (Utils::isDatabaseSetup() && Account::count() > 0)) {
|
||||||
return Redirect::to('/');
|
return Redirect::to('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class AppController extends BaseController
|
|||||||
|
|
||||||
public function doSetup()
|
public function doSetup()
|
||||||
{
|
{
|
||||||
if (Utils::isNinja() || (Utils::isDatabaseSetup() && Account::count() > 0)) {
|
if (Utils::isNinjaProd() || (Utils::isDatabaseSetup() && Account::count() > 0)) {
|
||||||
return Redirect::to('/');
|
return Redirect::to('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ class AppController extends BaseController
|
|||||||
|
|
||||||
public function install()
|
public function install()
|
||||||
{
|
{
|
||||||
if (!Utils::isNinja() && !Utils::isDatabaseSetup()) {
|
if (!Utils::isNinjaProd() && !Utils::isDatabaseSetup()) {
|
||||||
try {
|
try {
|
||||||
Artisan::call('migrate', array('--force' => true));
|
Artisan::call('migrate', array('--force' => true));
|
||||||
if (Industry::count() == 0) {
|
if (Industry::count() == 0) {
|
||||||
@ -176,7 +176,7 @@ class AppController extends BaseController
|
|||||||
|
|
||||||
public function update()
|
public function update()
|
||||||
{
|
{
|
||||||
if (!Utils::isNinja()) {
|
if (!Utils::isNinjaProd()) {
|
||||||
try {
|
try {
|
||||||
Artisan::call('migrate', array('--force' => true));
|
Artisan::call('migrate', array('--force' => true));
|
||||||
Artisan::call('db:seed', array('--force' => true, '--class' => 'PaymentLibrariesSeeder'));
|
Artisan::call('db:seed', array('--force' => true, '--class' => 'PaymentLibrariesSeeder'));
|
||||||
|
@ -268,7 +268,7 @@ class ClientController extends BaseController
|
|||||||
$record = Contact::createNew();
|
$record = Contact::createNew();
|
||||||
}
|
}
|
||||||
|
|
||||||
$record->email = trim(strtolower($contact->email));
|
$record->email = trim($contact->email);
|
||||||
$record->first_name = trim($contact->first_name);
|
$record->first_name = trim($contact->first_name);
|
||||||
$record->last_name = trim($contact->last_name);
|
$record->last_name = trim($contact->last_name);
|
||||||
$record->phone = trim($contact->phone);
|
$record->phone = trim($contact->phone);
|
||||||
|
@ -289,7 +289,7 @@ class TaskController extends BaseController
|
|||||||
private function checkTimezone()
|
private function checkTimezone()
|
||||||
{
|
{
|
||||||
if (!Auth::user()->account->timezone) {
|
if (!Auth::user()->account->timezone) {
|
||||||
$link = link_to('/company/details', trans('texts.click_here'), ['target' => '_blank']);
|
$link = link_to('/company/details?focus=timezone_id', trans('texts.click_here'), ['target' => '_blank']);
|
||||||
Session::flash('warning', trans('texts.timezone_unset', ['link' => $link]));
|
Session::flash('warning', trans('texts.timezone_unset', ['link' => $link]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ class StartupCheck
|
|||||||
$licenseKey = Input::get('license_key');
|
$licenseKey = Input::get('license_key');
|
||||||
$productId = Input::get('product_id');
|
$productId = Input::get('product_id');
|
||||||
|
|
||||||
$data = trim(file_get_contents((Utils::isNinjaDev() ? 'http://www.ninja.dev' : NINJA_APP_URL)."/claim_license?license_key={$licenseKey}&product_id={$productId}"));
|
$data = trim(file_get_contents((Utils::isNinjaDev() ? SITE_URL : NINJA_APP_URL)."/claim_license?license_key={$licenseKey}&product_id={$productId}"));
|
||||||
|
|
||||||
if ($productId == PRODUCT_INVOICE_DESIGNS) {
|
if ($productId == PRODUCT_INVOICE_DESIGNS) {
|
||||||
if ($data = json_decode($data)) {
|
if ($data = json_decode($data)) {
|
||||||
|
@ -4,7 +4,9 @@ use Eloquent;
|
|||||||
use Utils;
|
use Utils;
|
||||||
use Session;
|
use Session;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use Event;
|
||||||
use App;
|
use App;
|
||||||
|
use App\Events\UserSettingsChanged;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
class Account extends Eloquent
|
class Account extends Eloquent
|
||||||
@ -324,7 +326,7 @@ class Account extends Eloquent
|
|||||||
|
|
||||||
public function isWhiteLabel()
|
public function isWhiteLabel()
|
||||||
{
|
{
|
||||||
if (Utils::isNinja()) {
|
if (Utils::isNinjaProd()) {
|
||||||
return self::isPro() && $this->pro_plan_paid != NINJA_DATE;
|
return self::isPro() && $this->pro_plan_paid != NINJA_DATE;
|
||||||
} else {
|
} else {
|
||||||
return $this->pro_plan_paid == NINJA_DATE;
|
return $this->pro_plan_paid == NINJA_DATE;
|
||||||
@ -430,3 +432,7 @@ class Account extends Eloquent
|
|||||||
return $this->token_billing_type_id == TOKEN_BILLING_OPT_OUT;
|
return $this->token_billing_type_id == TOKEN_BILLING_OPT_OUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Account::updated(function ($account) {
|
||||||
|
Event::fire(new UserSettingsChanged());
|
||||||
|
});
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
use Session;
|
use Session;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Event;
|
||||||
use App\Libraries\Utils;
|
use App\Libraries\Utils;
|
||||||
|
use App\Events\UserSettingsChanged;
|
||||||
use Illuminate\Auth\Authenticatable;
|
use Illuminate\Auth\Authenticatable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||||
@ -213,3 +215,8 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
User::updating(function ($user) {
|
User::updating(function ($user) {
|
||||||
User::updateUser($user);
|
User::updateUser($user);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
User::updated(function ($user) {
|
||||||
|
Event::fire(new UserSettingsChanged());
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -17,10 +17,11 @@ class Mailer
|
|||||||
try {
|
try {
|
||||||
Mail::send($views, $data, function ($message) use ($toEmail, $fromEmail, $fromName, $subject, $data) {
|
Mail::send($views, $data, function ($message) use ($toEmail, $fromEmail, $fromName, $subject, $data) {
|
||||||
|
|
||||||
|
$toEmail = strtolower($toEmail);
|
||||||
$replyEmail = $fromEmail;
|
$replyEmail = $fromEmail;
|
||||||
$fromEmail = CONTACT_EMAIL;
|
$fromEmail = CONTACT_EMAIL;
|
||||||
|
|
||||||
if(isset($data['invoice_id'])) {
|
if (isset($data['invoice_id'])) {
|
||||||
$invoice = Invoice::with('account')->where('id', '=', $data['invoice_id'])->get()->first();
|
$invoice = Invoice::with('account')->where('id', '=', $data['invoice_id'])->get()->first();
|
||||||
if($invoice->account->pdf_email_attachment && file_exists($invoice->getPDFPath())) {
|
if($invoice->account->pdf_email_attachment && file_exists($invoice->getPDFPath())) {
|
||||||
$message->attach(
|
$message->attach(
|
||||||
|
@ -272,7 +272,6 @@ class AccountRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function prepareUsersData($record) {
|
public function prepareUsersData($record) {
|
||||||
|
|
||||||
if (!$record) {
|
if (!$record) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -381,7 +380,6 @@ class AccountRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function unlinkUser($userAccountId, $userId) {
|
public function unlinkUser($userAccountId, $userId) {
|
||||||
|
|
||||||
$userAccount = UserAccount::whereId($userAccountId)->first();
|
$userAccount = UserAccount::whereId($userAccountId)->first();
|
||||||
if ($userAccount->hasUserId($userId)) {
|
if ($userAccount->hasUserId($userId)) {
|
||||||
$userAccount->removeUserId($userId);
|
$userAccount->removeUserId($userId);
|
||||||
|
@ -120,7 +120,7 @@ class ClientRepository
|
|||||||
if (isset($data['contact'])) {
|
if (isset($data['contact'])) {
|
||||||
$info = $data['contact'];
|
$info = $data['contact'];
|
||||||
if (isset($info['email'])) {
|
if (isset($info['email'])) {
|
||||||
$contact->email = trim(strtolower($info['email']));
|
$contact->email = trim($info['email']);
|
||||||
}
|
}
|
||||||
if (isset($info['first_name'])) {
|
if (isset($info['first_name'])) {
|
||||||
$contact->first_name = trim($info['first_name']);
|
$contact->first_name = trim($info['first_name']);
|
||||||
@ -145,7 +145,7 @@ class ClientRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($record['email'])) {
|
if (isset($record['email'])) {
|
||||||
$contact->email = trim(strtolower($record['email']));
|
$contact->email = trim($record['email']);
|
||||||
}
|
}
|
||||||
if (isset($record['first_name'])) {
|
if (isset($record['first_name'])) {
|
||||||
$contact->first_name = trim($record['first_name']);
|
$contact->first_name = trim($record['first_name']);
|
||||||
|
@ -37,8 +37,11 @@ class AppServiceProvider extends ServiceProvider {
|
|||||||
|
|
||||||
$str = '<li class="dropdown '.$class.'">
|
$str = '<li class="dropdown '.$class.'">
|
||||||
<a href="'.URL::to($types).'" class="dropdown-toggle">'.trans("texts.$types").'</a>
|
<a href="'.URL::to($types).'" class="dropdown-toggle">'.trans("texts.$types").'</a>
|
||||||
<ul class="dropdown-menu" id="menu1">
|
<ul class="dropdown-menu" id="menu1">';
|
||||||
<li><a href="'.URL::to($types.'/create').'">'.trans("texts.new_$type").'</a></li>';
|
|
||||||
|
if ($type != ENTITY_TASK || Auth::user()->account->timezone_id) {
|
||||||
|
$str .= '<li><a href="'.URL::to($types.'/create').'">'.trans("texts.new_$type").'</a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($type == ENTITY_INVOICE) {
|
if ($type == ENTITY_INVOICE) {
|
||||||
$str .= '<li><a href="'.URL::to('recurring_invoices/create').'">'.trans("texts.new_recurring_invoice").'</a></li>';
|
$str .= '<li><a href="'.URL::to('recurring_invoices/create').'">'.trans("texts.new_recurring_invoice").'</a></li>';
|
||||||
|
@ -29947,12 +29947,14 @@ function GetPdf(invoice, javascript){
|
|||||||
lineTotalRight: 550
|
lineTotalRight: 550
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
if (invoice.has_taxes)
|
if (invoice.has_taxes)
|
||||||
{
|
{
|
||||||
layout.descriptionLeft -= 20;
|
layout.descriptionLeft -= 20;
|
||||||
layout.unitCostRight -= 40;
|
layout.unitCostRight -= 40;
|
||||||
layout.qtyRight -= 40;
|
layout.qtyRight -= 40;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@param orientation One of "portrait" or "landscape" (or shortcuts "p" (Default), "l")
|
@param orientation One of "portrait" or "landscape" (or shortcuts "p" (Default), "l")
|
||||||
@ -30899,7 +30901,6 @@ function calculateAmounts(invoice) {
|
|||||||
invoice.discount_amount = discount;
|
invoice.discount_amount = discount;
|
||||||
invoice.tax_amount = tax;
|
invoice.tax_amount = tax;
|
||||||
invoice.item_taxes = taxes;
|
invoice.item_taxes = taxes;
|
||||||
invoice.has_taxes = hasTaxes;
|
|
||||||
|
|
||||||
if (NINJA.parseFloat(invoice.partial)) {
|
if (NINJA.parseFloat(invoice.partial)) {
|
||||||
invoice.balance_amount = roundToTwo(invoice.partial);
|
invoice.balance_amount = roundToTwo(invoice.partial);
|
||||||
@ -30944,11 +30945,12 @@ function displayInvoiceHeader(doc, invoice, layout) {
|
|||||||
}
|
}
|
||||||
doc.text(totalX, layout.tableTop, invoiceLabels.line_total);
|
doc.text(totalX, layout.tableTop, invoiceLabels.line_total);
|
||||||
|
|
||||||
|
/*
|
||||||
if (invoice.has_taxes)
|
if (invoice.has_taxes)
|
||||||
{
|
{
|
||||||
doc.text(taxX, layout.tableTop, invoiceLabels.tax);
|
doc.text(taxX, layout.tableTop, invoiceLabels.tax);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayInvoiceItems(doc, invoice, layout) {
|
function displayInvoiceItems(doc, invoice, layout) {
|
||||||
@ -31131,10 +31133,11 @@ function displayInvoiceItems(doc, invoice, layout) {
|
|||||||
|
|
||||||
doc.line(qtyX-45, y-16,qtyX-45, y+55);
|
doc.line(qtyX-45, y-16,qtyX-45, y+55);
|
||||||
|
|
||||||
|
/*
|
||||||
if (invoice.has_taxes) {
|
if (invoice.has_taxes) {
|
||||||
doc.line(taxX-15, y-16,taxX-15, y+55);
|
doc.line(taxX-15, y-16,taxX-15, y+55);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
doc.line(totalX-27, y-16,totalX-27, y+55);
|
doc.line(totalX-27, y-16,totalX-27, y+55);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -31197,9 +31200,11 @@ function displayInvoiceItems(doc, invoice, layout) {
|
|||||||
doc.line(layout.descriptionLeft-8, topX,layout.descriptionLeft-8, y);
|
doc.line(layout.descriptionLeft-8, topX,layout.descriptionLeft-8, y);
|
||||||
doc.line(layout.unitCostRight-55, topX,layout.unitCostRight-55, y);
|
doc.line(layout.unitCostRight-55, topX,layout.unitCostRight-55, y);
|
||||||
doc.line(layout.qtyRight-50, topX,layout.qtyRight-50, y);
|
doc.line(layout.qtyRight-50, topX,layout.qtyRight-50, y);
|
||||||
|
/*
|
||||||
if (invoice.has_taxes) {
|
if (invoice.has_taxes) {
|
||||||
doc.line(layout.taxRight-28, topX,layout.taxRight-28, y);
|
doc.line(layout.taxRight-28, topX,layout.taxRight-28, y);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
doc.line(totalX-25, topX,totalX-25, y+90);
|
doc.line(totalX-25, topX,totalX-25, y+90);
|
||||||
doc.line(totalX+45, topX,totalX+45, y+90);
|
doc.line(totalX+45, topX,totalX+45, y+90);
|
||||||
}
|
}
|
||||||
@ -31605,7 +31610,7 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
'subtotalsHeight': NINJA.subtotals(invoice).length * 22,
|
'subtotalsHeight': NINJA.subtotals(invoice).length * 22,
|
||||||
'subtotalsWithoutBalance': NINJA.subtotals(invoice, true),
|
'subtotalsWithoutBalance': NINJA.subtotals(invoice, true),
|
||||||
'balanceDue': formatMoney(invoice.balance_amount, invoice.client.currency_id),
|
'balanceDue': formatMoney(invoice.balance_amount, invoice.client.currency_id),
|
||||||
'invoiceFooter': account.invoice_footer || ' ',
|
'invoiceFooter': invoice.invoice_footer || ' ',
|
||||||
'invoiceNumber': invoice.invoice_number || ' ',
|
'invoiceNumber': invoice.invoice_number || ' ',
|
||||||
'entityType': invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice,
|
'entityType': invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice,
|
||||||
'entityTypeUC': (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase(),
|
'entityTypeUC': (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase(),
|
||||||
|
@ -97,7 +97,7 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
'subtotalsHeight': NINJA.subtotals(invoice).length * 22,
|
'subtotalsHeight': NINJA.subtotals(invoice).length * 22,
|
||||||
'subtotalsWithoutBalance': NINJA.subtotals(invoice, true),
|
'subtotalsWithoutBalance': NINJA.subtotals(invoice, true),
|
||||||
'balanceDue': formatMoney(invoice.balance_amount, invoice.client.currency_id),
|
'balanceDue': formatMoney(invoice.balance_amount, invoice.client.currency_id),
|
||||||
'invoiceFooter': account.invoice_footer || ' ',
|
'invoiceFooter': invoice.invoice_footer || ' ',
|
||||||
'invoiceNumber': invoice.invoice_number || ' ',
|
'invoiceNumber': invoice.invoice_number || ' ',
|
||||||
'entityType': invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice,
|
'entityType': invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice,
|
||||||
'entityTypeUC': (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase(),
|
'entityTypeUC': (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase(),
|
||||||
|
@ -746,6 +746,7 @@ return array(
|
|||||||
'recurring_invoice' => 'Recurring Invoice',
|
'recurring_invoice' => 'Recurring Invoice',
|
||||||
'recurring_too_soon' => 'It\'s too soon to create the next recurring invoice',
|
'recurring_too_soon' => 'It\'s too soon to create the next recurring invoice',
|
||||||
'created_by_invoice' => 'Created by :invoice',
|
'created_by_invoice' => 'Created by :invoice',
|
||||||
|
'primary_user' => 'Primary User',
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
{{ Former::populateField('last_name', $primaryUser->last_name) }}
|
{{ Former::populateField('last_name', $primaryUser->last_name) }}
|
||||||
{{ Former::populateField('email', $primaryUser->email) }}
|
{{ Former::populateField('email', $primaryUser->email) }}
|
||||||
{{ Former::populateField('phone', $primaryUser->phone) }}
|
{{ Former::populateField('phone', $primaryUser->phone) }}
|
||||||
@if (Utils::isNinja())
|
@if (Utils::isNinjaDev())
|
||||||
{{ Former::populateField('dark_mode', intval($primaryUser->dark_mode)) }}
|
{{ Former::populateField('dark_mode', intval($primaryUser->dark_mode)) }}
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@ -84,14 +84,14 @@
|
|||||||
@if ($showUser)
|
@if ($showUser)
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">{!! trans('texts.users') !!}</h3>
|
<h3 class="panel-title">{!! trans('texts.primary_user') !!}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{!! Former::text('first_name') !!}
|
{!! Former::text('first_name') !!}
|
||||||
{!! Former::text('last_name') !!}
|
{!! Former::text('last_name') !!}
|
||||||
{!! Former::text('email') !!}
|
{!! Former::text('email') !!}
|
||||||
{!! Former::text('phone') !!}
|
{!! Former::text('phone') !!}
|
||||||
@if (Utils::isNinja())
|
@if (Utils::isNinjaDev())
|
||||||
{!! Former::checkbox('dark_mode')->text(trans('texts.dark_mode_help')) !!}
|
{!! Former::checkbox('dark_mode')->text(trans('texts.dark_mode_help')) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -324,6 +324,10 @@
|
|||||||
|
|
||||||
@yield('onReady')
|
@yield('onReady')
|
||||||
|
|
||||||
|
@if (Input::has('focus'))
|
||||||
|
$('#{{ Input::get('focus') }}').focus();
|
||||||
|
@endif
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -630,7 +634,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
{{-- Per our license, please do not remove or modify this section. --}}
|
{{-- Per our license, please do not remove or modify this section. --}}
|
||||||
@if (!Utils::isNinja())
|
@if (!Utils::isNinjaProd())
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/?utm_source=powered_by" target="_blank">InvoiceNinja.com</a> |
|
{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/?utm_source=powered_by" target="_blank">InvoiceNinja.com</a> |
|
||||||
@if (Auth::user()->account->isWhiteLabel())
|
@if (Auth::user()->account->isWhiteLabel())
|
||||||
|
@ -112,9 +112,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" id="col_2">
|
<div class="col-md-4" id="col_2">
|
||||||
@if (!$isRecurring)
|
<span data-bind="visible: !is_recurring()">
|
||||||
{!! Former::text('invoice_number')->label(trans("texts.{$entityType}_number_short"))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") !!}
|
{!! Former::text('invoice_number')->label(trans("texts.{$entityType}_number_short"))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") !!}
|
||||||
@endif
|
</span>
|
||||||
{!! Former::text('po_number')->label(trans('texts.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") !!}
|
{!! Former::text('po_number')->label(trans('texts.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") !!}
|
||||||
{!! Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")
|
{!! Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")
|
||||||
->addGroupClass('discount-group')->type('number')->min('0')->step('any')->append(
|
->addGroupClass('discount-group')->type('number')->min('0')->step('any')->append(
|
||||||
@ -151,7 +151,9 @@
|
|||||||
<tbody data-bind="sortable: { data: invoice_items, afterMove: onDragged }">
|
<tbody data-bind="sortable: { data: invoice_items, afterMove: onDragged }">
|
||||||
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
|
<tr data-bind="event: { mouseover: showActions, mouseout: hideActions }" class="sortable-row">
|
||||||
<td class="hide-border td-icon">
|
<td class="hide-border td-icon">
|
||||||
<i style="display:none" data-bind="visible: actionsVisible() && $parent.invoice_items().length > 1" class="fa fa-sort"></i>
|
<i style="display:none" data-bind="visible: actionsVisible() &&
|
||||||
|
$index() < ($parent.invoice_items().length - 1) &&
|
||||||
|
$parent.invoice_items().length > 1" class="fa fa-sort"></i>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{!! Former::text('product_key')->useDatalist($products->toArray(), 'product_key')->onkeyup('onItemChange()')
|
{!! Former::text('product_key')->useDatalist($products->toArray(), 'product_key')->onkeyup('onItemChange()')
|
||||||
@ -172,8 +174,10 @@
|
|||||||
<td style="text-align:right;padding-top:9px !important">
|
<td style="text-align:right;padding-top:9px !important">
|
||||||
<div class="line-total" data-bind="text: totals.total"></div>
|
<div class="line-total" data-bind="text: totals.total"></div>
|
||||||
</td>
|
</td>
|
||||||
<td style="cursor:pointer" class="hide-border td-icon">
|
<td style="cursor:pointer" class="hide-border td-icon">
|
||||||
<i style="display:none" data-bind="click: $parent.removeItem, visible: actionsVisible() && $parent.invoice_items().length > 1" class="fa fa-minus-circle redlink" title="Remove item"/>
|
<i style="display:none" data-bind="click: $parent.removeItem, visible: actionsVisible() &&
|
||||||
|
$index() < ($parent.invoice_items().length - 1) &&
|
||||||
|
$parent.invoice_items().length > 1" class="fa fa-minus-circle redlink" title="Remove item"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<script src="{{ asset('js/built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
<script src="{{ asset('js/built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||||
<link href="{{ asset('css/built.public.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/built.public.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||||
<link href="{{ asset('css/built.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/built.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="{{ asset('favicon.png?test') }}" rel="shortcut icon">
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
@ -28,8 +29,8 @@
|
|||||||
@if (version_compare(phpversion(), '5.4.0', '<'))
|
@if (version_compare(phpversion(), '5.4.0', '<'))
|
||||||
<div class="alert alert-warning">Warning: The application requires PHP >= 5.4.0</div>
|
<div class="alert alert-warning">Warning: The application requires PHP >= 5.4.0</div>
|
||||||
@endif
|
@endif
|
||||||
@if (!extension_loaded('fileinfo'))
|
@if (!function_exists('proc_open'))
|
||||||
<div class="alert alert-warning">Warning: The <a href="http://php.net/manual/en/book.fileinfo.php" target="_blank">fileinfo</a> extension needs to be installed and enabled.</div>
|
<div class="alert alert-warning">Warning: <a href="http://php.net/manual/en/function.proc-open.php" target="_blank">proc_open</a> must be enabled.</div>
|
||||||
@endif
|
@endif
|
||||||
@if (!@fopen(base_path()."/.env", 'a'))
|
@if (!@fopen(base_path()."/.env", 'a'))
|
||||||
<div class="alert alert-warning">Warning: Permission denied to write config file
|
<div class="alert alert-warning">Warning: Permission denied to write config file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user