mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge branch 'master' of github.com:paralin/invoice-ninja
This commit is contained in:
commit
ed283b9bad
@ -1,5 +1,6 @@
|
|||||||
<?php namespace App\Http\Controllers;
|
<?php namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Request;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Auth;
|
use Auth;
|
||||||
use View;
|
use View;
|
||||||
@ -8,6 +9,7 @@ use Session;
|
|||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
use App\Libraries\Utils;
|
use App\Libraries\Utils;
|
||||||
use App\Ninja\Mailers\Mailer;
|
use App\Ninja\Mailers\Mailer;
|
||||||
|
use Symfony\Component\Security\Core\Util\StringUtils;
|
||||||
|
|
||||||
class HomeController extends BaseController
|
class HomeController extends BaseController
|
||||||
{
|
{
|
||||||
@ -76,4 +78,9 @@ class HomeController extends BaseController
|
|||||||
{
|
{
|
||||||
return Utils::logError(Input::get('error'), 'JavaScript');
|
return Utils::logError(Input::get('error'), 'JavaScript');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function keepAlive()
|
||||||
|
{
|
||||||
|
return RESULT_SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -483,7 +483,7 @@ class PaymentController extends BaseController
|
|||||||
$license->save();
|
$license->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $productId == PRODUCT_INVOICE_DESIGNS ? $_ENV['INVOICE_DESIGNS'] : 'valid';
|
return $productId == PRODUCT_INVOICE_DESIGNS ? file_get_contents(storage_path() . '/invoice_designs.txt') : 'valid';
|
||||||
} else {
|
} else {
|
||||||
return 'invalid';
|
return 'invalid';
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,14 @@ class ReportController extends BaseController
|
|||||||
public function d3()
|
public function d3()
|
||||||
{
|
{
|
||||||
$message = '';
|
$message = '';
|
||||||
|
$fileName = storage_path() . '/dataviz_sample.txt';
|
||||||
|
|
||||||
if (Auth::user()->account->isPro()) {
|
if (Auth::user()->account->isPro()) {
|
||||||
$account = Account::where('id', '=', Auth::user()->account->id)->with(['clients.invoices.invoice_items', 'clients.contacts'])->first();
|
$account = Account::where('id', '=', Auth::user()->account->id)->with(['clients.invoices.invoice_items', 'clients.contacts'])->first();
|
||||||
$account = $account->hideFieldsForViz();
|
$account = $account->hideFieldsForViz();
|
||||||
$clients = $account->clients->toJson();
|
$clients = $account->clients->toJson();
|
||||||
} elseif (isset($_ENV['DATA_VIZ_SAMPLE'])) {
|
} elseif (file_exists($fileName)) {
|
||||||
$clients = $_ENV['DATA_VIZ_SAMPLE'];
|
$clients = file_get_contents($fileName);
|
||||||
$message = trans('texts.sample_data');
|
$message = trans('texts.sample_data');
|
||||||
} else {
|
} else {
|
||||||
$clients = '[]';
|
$clients = '[]';
|
||||||
|
@ -138,10 +138,6 @@ class StartupCheck
|
|||||||
$design->save();
|
$design->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Utils::isNinjaProd()) {
|
|
||||||
Cache::forget('invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId());
|
|
||||||
}
|
|
||||||
|
|
||||||
Session::flash('message', trans('texts.bought_designs'));
|
Session::flash('message', trans('texts.bought_designs'));
|
||||||
}
|
}
|
||||||
} elseif ($productId == PRODUCT_WHITE_LABEL) {
|
} elseif ($productId == PRODUCT_WHITE_LABEL) {
|
||||||
|
@ -85,6 +85,7 @@ Route::group(['middleware' => 'auth'], function() {
|
|||||||
Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible');
|
Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible');
|
||||||
Route::get('hide_message', 'HomeController@hideMessage');
|
Route::get('hide_message', 'HomeController@hideMessage');
|
||||||
Route::get('force_inline_pdf', 'UserController@forcePDFJS');
|
Route::get('force_inline_pdf', 'UserController@forcePDFJS');
|
||||||
|
Route::get('keep_alive', 'HomeController@keepAlive');
|
||||||
|
|
||||||
Route::get('api/users', array('as'=>'api.users', 'uses'=>'UserController@getDatatable'));
|
Route::get('api/users', array('as'=>'api.users', 'uses'=>'UserController@getDatatable'));
|
||||||
Route::resource('users', 'UserController');
|
Route::resource('users', 'UserController');
|
||||||
|
@ -31,9 +31,12 @@ class Invitation extends EntityModel
|
|||||||
{
|
{
|
||||||
$this->load('account');
|
$this->load('account');
|
||||||
$url = SITE_URL;
|
$url = SITE_URL;
|
||||||
|
|
||||||
if ($this->account->subdomain) {
|
if ($this->account->subdomain) {
|
||||||
$url = str_replace('://www.', "://{$this->account->subdomain}.", $url);
|
$parsedUrl = parse_url($url);
|
||||||
|
$host = explode('.', $parsedUrl['host']);
|
||||||
|
$subdomain = $host[0];
|
||||||
|
$url = str_replace("://{$subdomain}.", "://{$this->account->subdomain}.", $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "{$url}/view/{$this->invitation_key}";
|
return "{$url}/view/{$this->invitation_key}";
|
||||||
|
@ -29,7 +29,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'lifetime' => 360,
|
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||||
|
|
||||||
'expire_on_close' => false,
|
'expire_on_close' => false,
|
||||||
|
|
||||||
|
@ -33070,24 +33070,28 @@ function truncate(str, length) {
|
|||||||
}
|
}
|
||||||
function GetPdfMake(invoice, javascript, callback) {
|
function GetPdfMake(invoice, javascript, callback) {
|
||||||
var account = invoice.account;
|
var account = invoice.account;
|
||||||
|
var baseDD = {
|
||||||
|
pageMargins: [40, 40, 40, 40]
|
||||||
|
};
|
||||||
eval(javascript);
|
eval(javascript);
|
||||||
|
dd = _.extend(dd, baseDD);
|
||||||
|
|
||||||
|
/*
|
||||||
|
var fonts = {
|
||||||
|
Roboto: {
|
||||||
|
normal: 'Roboto-Regular.ttf',
|
||||||
|
bold: 'Roboto-Medium.ttf',
|
||||||
|
italics: 'Roboto-Italic.ttf',
|
||||||
|
bolditalics: 'Roboto-Italic.ttf'
|
||||||
|
},
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
doc = pdfMake.createPdf(dd);
|
||||||
var fonts = {
|
doc.save = function(fileName) {
|
||||||
Roboto: {
|
this.download(fileName);
|
||||||
normal: 'Roboto-Regular.ttf',
|
};
|
||||||
bold: 'Roboto-Medium.ttf',
|
return doc;
|
||||||
italics: 'Roboto-Italic.ttf',
|
|
||||||
bolditalics: 'Roboto-Italic.ttf'
|
|
||||||
},
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
doc = pdfMake.createPdf(dd);
|
|
||||||
doc.save = function(fileName) {
|
|
||||||
this.download(fileName);
|
|
||||||
};
|
|
||||||
return doc;
|
|
||||||
}
|
}
|
||||||
function notesAndTerms(invoice)
|
function notesAndTerms(invoice)
|
||||||
{
|
{
|
||||||
@ -33105,13 +33109,17 @@ function notesAndTerms(invoice)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function invoiceLines(invoice) {
|
function invoiceLines(invoice) {
|
||||||
var grid =
|
var grid = [
|
||||||
[[{text: invoiceLabels.item, style: 'tableHeader'},
|
[
|
||||||
{text: invoiceLabels.description, style: 'tableHeader'},
|
{text: invoiceLabels.item, style: 'tableHeader'},
|
||||||
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
|
{text: invoiceLabels.description, style: 'tableHeader'},
|
||||||
{text: invoiceLabels.quantity, style: 'tableHeader'},
|
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
|
||||||
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
|
{text: invoiceLabels.quantity, style: 'tableHeader'},
|
||||||
{text: invoiceLabels.line_total, style: 'tableHeader'}]];
|
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
|
||||||
|
{text: invoiceLabels.line_total, style: 'tableHeader'}
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
var total = 0;
|
var total = 0;
|
||||||
var shownItem = false;
|
var shownItem = false;
|
||||||
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
|
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
|
||||||
@ -33131,37 +33139,37 @@ function invoiceLines(invoice) {
|
|||||||
tax = parseFloat(item.tax_rate);
|
tax = parseFloat(item.tax_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// show at most one blank line
|
// show at most one blank line
|
||||||
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
|
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
shownItem = true;
|
shownItem = true;
|
||||||
|
|
||||||
// process date variables
|
// process date variables
|
||||||
if (invoice.is_recurring) {
|
if (invoice.is_recurring) {
|
||||||
notes = processVariables(notes);
|
notes = processVariables(notes);
|
||||||
productKey = processVariables(productKey);
|
productKey = processVariables(productKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
||||||
if (tax) {
|
if (tax) {
|
||||||
lineTotal += lineTotal * tax / 100;
|
lineTotal += lineTotal * tax / 100;
|
||||||
}
|
}
|
||||||
if (lineTotal) {
|
if (lineTotal) {
|
||||||
total += lineTotal;
|
total += lineTotal;
|
||||||
}
|
}
|
||||||
lineTotal = formatMoney(lineTotal, currencyId);
|
lineTotal = formatMoney(lineTotal, currencyId);
|
||||||
|
|
||||||
rowStyle = i%2===0?'odd':'even';
|
rowStyle = i%2===0?'odd':'even';
|
||||||
|
|
||||||
row[0] = {style:["productKey", rowStyle], text:productKey};
|
row[0] = {style:["productKey", rowStyle], text:productKey};
|
||||||
row[1] = {style:["notes", rowStyle], text:notes};
|
row[1] = {style:["notes", rowStyle], text:notes};
|
||||||
row[2] = {style:["cost", rowStyle], text:cost};
|
row[2] = {style:["cost", rowStyle], text:cost};
|
||||||
row[3] = {style:["quantity", rowStyle], text:qty};
|
row[3] = {style:["quantity", rowStyle], text:qty};
|
||||||
row[4] = {style:["tax", rowStyle], text:""+tax};
|
row[4] = {style:["tax", rowStyle], text:""+tax};
|
||||||
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
|
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
|
||||||
|
|
||||||
grid.push(row);
|
grid.push(row);
|
||||||
}
|
}
|
||||||
return grid;
|
return grid;
|
||||||
}
|
}
|
||||||
@ -33173,8 +33181,9 @@ function subtotals(invoice)
|
|||||||
}
|
}
|
||||||
|
|
||||||
var data = [
|
var data = [
|
||||||
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
|
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
|
||||||
];
|
];
|
||||||
|
|
||||||
if(invoice.discount_amount != 0) {
|
if(invoice.discount_amount != 0) {
|
||||||
data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]);
|
data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]);
|
||||||
}
|
}
|
||||||
@ -33254,6 +33263,7 @@ function clientDetails(invoice) {
|
|||||||
if (!client) {
|
if (!client) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var fields = [
|
var fields = [
|
||||||
getClientDisplayName(client),
|
getClientDisplayName(client),
|
||||||
client.id_number,
|
client.id_number,
|
||||||
|
@ -1,23 +1,27 @@
|
|||||||
function GetPdfMake(invoice, javascript, callback) {
|
function GetPdfMake(invoice, javascript, callback) {
|
||||||
var account = invoice.account;
|
var account = invoice.account;
|
||||||
|
var baseDD = {
|
||||||
|
pageMargins: [40, 40, 40, 40]
|
||||||
|
};
|
||||||
eval(javascript);
|
eval(javascript);
|
||||||
|
dd = _.extend(dd, baseDD);
|
||||||
|
|
||||||
|
/*
|
||||||
|
var fonts = {
|
||||||
|
Roboto: {
|
||||||
|
normal: 'Roboto-Regular.ttf',
|
||||||
|
bold: 'Roboto-Medium.ttf',
|
||||||
|
italics: 'Roboto-Italic.ttf',
|
||||||
|
bolditalics: 'Roboto-Italic.ttf'
|
||||||
|
},
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
doc = pdfMake.createPdf(dd);
|
||||||
var fonts = {
|
doc.save = function(fileName) {
|
||||||
Roboto: {
|
this.download(fileName);
|
||||||
normal: 'Roboto-Regular.ttf',
|
};
|
||||||
bold: 'Roboto-Medium.ttf',
|
return doc;
|
||||||
italics: 'Roboto-Italic.ttf',
|
|
||||||
bolditalics: 'Roboto-Italic.ttf'
|
|
||||||
},
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
doc = pdfMake.createPdf(dd);
|
|
||||||
doc.save = function(fileName) {
|
|
||||||
this.download(fileName);
|
|
||||||
};
|
|
||||||
return doc;
|
|
||||||
}
|
}
|
||||||
function notesAndTerms(invoice)
|
function notesAndTerms(invoice)
|
||||||
{
|
{
|
||||||
@ -35,13 +39,17 @@ function notesAndTerms(invoice)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function invoiceLines(invoice) {
|
function invoiceLines(invoice) {
|
||||||
var grid =
|
var grid = [
|
||||||
[[{text: invoiceLabels.item, style: 'tableHeader'},
|
[
|
||||||
{text: invoiceLabels.description, style: 'tableHeader'},
|
{text: invoiceLabels.item, style: 'tableHeader'},
|
||||||
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
|
{text: invoiceLabels.description, style: 'tableHeader'},
|
||||||
{text: invoiceLabels.quantity, style: 'tableHeader'},
|
{text: invoiceLabels.unit_cost, style: 'tableHeader'},
|
||||||
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
|
{text: invoiceLabels.quantity, style: 'tableHeader'},
|
||||||
{text: invoiceLabels.line_total, style: 'tableHeader'}]];
|
{text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'},
|
||||||
|
{text: invoiceLabels.line_total, style: 'tableHeader'}
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
var total = 0;
|
var total = 0;
|
||||||
var shownItem = false;
|
var shownItem = false;
|
||||||
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
|
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
|
||||||
@ -61,37 +69,37 @@ function invoiceLines(invoice) {
|
|||||||
tax = parseFloat(item.tax_rate);
|
tax = parseFloat(item.tax_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// show at most one blank line
|
// show at most one blank line
|
||||||
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
|
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
shownItem = true;
|
shownItem = true;
|
||||||
|
|
||||||
// process date variables
|
// process date variables
|
||||||
if (invoice.is_recurring) {
|
if (invoice.is_recurring) {
|
||||||
notes = processVariables(notes);
|
notes = processVariables(notes);
|
||||||
productKey = processVariables(productKey);
|
productKey = processVariables(productKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
||||||
if (tax) {
|
if (tax) {
|
||||||
lineTotal += lineTotal * tax / 100;
|
lineTotal += lineTotal * tax / 100;
|
||||||
}
|
}
|
||||||
if (lineTotal) {
|
if (lineTotal) {
|
||||||
total += lineTotal;
|
total += lineTotal;
|
||||||
}
|
}
|
||||||
lineTotal = formatMoney(lineTotal, currencyId);
|
lineTotal = formatMoney(lineTotal, currencyId);
|
||||||
|
|
||||||
rowStyle = i%2===0?'odd':'even';
|
rowStyle = i%2===0?'odd':'even';
|
||||||
|
|
||||||
row[0] = {style:["productKey", rowStyle], text:productKey};
|
row[0] = {style:["productKey", rowStyle], text:productKey};
|
||||||
row[1] = {style:["notes", rowStyle], text:notes};
|
row[1] = {style:["notes", rowStyle], text:notes};
|
||||||
row[2] = {style:["cost", rowStyle], text:cost};
|
row[2] = {style:["cost", rowStyle], text:cost};
|
||||||
row[3] = {style:["quantity", rowStyle], text:qty};
|
row[3] = {style:["quantity", rowStyle], text:qty};
|
||||||
row[4] = {style:["tax", rowStyle], text:""+tax};
|
row[4] = {style:["tax", rowStyle], text:""+tax};
|
||||||
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
|
row[5] = {style:["lineTotal", rowStyle], text:lineTotal};
|
||||||
|
|
||||||
grid.push(row);
|
grid.push(row);
|
||||||
}
|
}
|
||||||
return grid;
|
return grid;
|
||||||
}
|
}
|
||||||
@ -103,8 +111,9 @@ function subtotals(invoice)
|
|||||||
}
|
}
|
||||||
|
|
||||||
var data = [
|
var data = [
|
||||||
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
|
[invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)],
|
||||||
];
|
];
|
||||||
|
|
||||||
if(invoice.discount_amount != 0) {
|
if(invoice.discount_amount != 0) {
|
||||||
data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]);
|
data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]);
|
||||||
}
|
}
|
||||||
@ -184,6 +193,7 @@ function clientDetails(invoice) {
|
|||||||
if (!client) {
|
if (!client) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var fields = [
|
var fields = [
|
||||||
getClientDisplayName(client),
|
getClientDisplayName(client),
|
||||||
client.id_number,
|
client.id_number,
|
||||||
|
12
public/js/pdfmake.min.js
vendored
Normal file
12
public/js/pdfmake.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/js/pdfmake.min.js.map
Normal file
1
public/js/pdfmake.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -25,7 +25,6 @@ var dd = {
|
|||||||
fontSize: 11
|
fontSize: 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
style: 'tableExample',
|
|
||||||
table: {
|
table: {
|
||||||
headerRows: 1,
|
headerRows: 1,
|
||||||
widths: ['auto', 'auto', '*'],
|
widths: ['auto', 'auto', '*'],
|
||||||
@ -45,14 +44,11 @@ var dd = {
|
|||||||
return (i === 0 || i === node.table.body.length) ? .5 : 0;
|
return (i === 0 || i === node.table.body.length) ? .5 : 0;
|
||||||
},
|
},
|
||||||
vLineWidth: function (i, node) {
|
vLineWidth: function (i, node) {
|
||||||
return 0;//(i === 0 || i === node.table.widths.length) ? 2 : 1;
|
return 0;
|
||||||
},
|
},
|
||||||
hLineColor: function (i, node) {
|
hLineColor: function (i, node) {
|
||||||
return '#D8D8D8';//(i === 0 || i === node.table.body.length) ? 'black' : 'gray';
|
return '#D8D8D8';
|
||||||
},
|
},
|
||||||
/*vLineColor: function (i, node) {
|
|
||||||
return (i === 0 || i === node.table.widths.length) ? 'black' : 'gray';
|
|
||||||
},*/
|
|
||||||
paddingLeft: function(i, node) { return 8; },
|
paddingLeft: function(i, node) { return 8; },
|
||||||
paddingRight: function(i, node) { return 8; },
|
paddingRight: function(i, node) { return 8; },
|
||||||
paddingTop: function(i, node) { return 4; },
|
paddingTop: function(i, node) { return 4; },
|
||||||
@ -187,6 +183,5 @@ var dd = {
|
|||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
margin: [0, 10, 0, 4]
|
margin: [0, 10, 0, 4]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
pageMargins: [40, 40, 40, 40]
|
|
||||||
};
|
};
|
@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
||||||
$countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/payments')->appendIcon(Icon::create('remove-circle')) : false) !!}
|
$countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/payments'))->appendIcon(Icon::create('remove-circle')) : false) !!}
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
@if (Auth::user()->confirmed)
|
@if (Auth::user()->confirmed)
|
||||||
{!! Former::actions( Button::primary(trans('texts.change_password'))->small()->withAttributes(['onclick'=>'showChangePassword()'])) !!}
|
{!! Former::actions( Button::primary(trans('texts.change_password'))->small()->withAttributes(['onclick'=>'showChangePassword()'])) !!}
|
||||||
@elseif (Auth::user()->registered)
|
@elseif (Auth::user()->registered)
|
||||||
{!! Former::actions( Button::primary(trans('texts.resend_confirmation'))->asLinkTo('/resend_confirmation')->small() ) !!}
|
{!! Former::actions( Button::primary(trans('texts.resend_confirmation'))->asLinkTo(URL::to('/resend_confirmation'))->small() ) !!}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::success(trans('texts.import'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
Button::success(trans('texts.import'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
||||||
Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/import_export')->appendIcon(Icon::create('remove-circle'))) !!}
|
Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/import_export'))->appendIcon(Icon::create('remove-circle'))) !!}
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<script src="{!! asset('js/compatibility.js') !!}" type="text/javascript"></script>
|
<script src="{!! asset('js/compatibility.js') !!}" type="text/javascript"></script>
|
||||||
|
|
||||||
@if (Auth::user()->account->utf8_invoices)
|
@if (Auth::user()->account->utf8_invoices)
|
||||||
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
@if ($showAdd)
|
@if ($showAdd)
|
||||||
{!! Button::primary(trans('texts.add_gateway'))
|
{!! Button::primary(trans('texts.add_gateway'))
|
||||||
->asLinkTo('/gateways/create')
|
->asLinkTo(URL::to('/gateways/create'))
|
||||||
->withAttributes(['class' => 'pull-right'])
|
->withAttributes(['class' => 'pull-right'])
|
||||||
->appendIcon(Icon::create('plus-sign')) !!}
|
->appendIcon(Icon::create('plus-sign')) !!}
|
||||||
@endif
|
@endif
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
||||||
Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/products')->appendIcon(Icon::create('remove-circle'))
|
Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/products'))->appendIcon(Icon::create('remove-circle'))
|
||||||
) !!}
|
) !!}
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!! Button::primary(trans('texts.create_product'))
|
{!! Button::primary(trans('texts.create_product'))
|
||||||
->asLinkTo('/products/create')
|
->asLinkTo(URL::to('/products/create'))
|
||||||
->withAttributes(['class' => 'pull-right'])
|
->withAttributes(['class' => 'pull-right'])
|
||||||
->appendIcon(Icon::create('plus-sign')) !!}
|
->appendIcon(Icon::create('plus-sign')) !!}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
||||||
Button::normal(trans('texts.cancel'))->asLinkTo('/company/advanced_settings/token_management')->appendIcon(Icon::create('remove-circle'))->large()
|
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/token_management'))->appendIcon(Icon::create('remove-circle'))->large()
|
||||||
) !!}
|
) !!}
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
{!! Button::normal(trans('texts.zapier'))->asLinkTo(ZAPIER_URL)->withAttributes(['target' => '_blank']) !!}
|
{!! Button::normal(trans('texts.zapier'))->asLinkTo(ZAPIER_URL)->withAttributes(['target' => '_blank']) !!}
|
||||||
@endif
|
@endif
|
||||||
@if (Utils::isPro())
|
@if (Utils::isPro())
|
||||||
{!! Button::primary(trans('texts.add_token'))->asLinkTo('/tokens/create')->appendIcon(Icon::create('plus-sign')) !!}
|
{!! Button::primary(trans('texts.add_token'))->asLinkTo(URL::to('/tokens/create'))->appendIcon(Icon::create('plus-sign')) !!}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{!! Button::normal(trans('texts.api_tokens'))->asLinkTo('/company/advanced_settings/token_management')->appendIcon(Icon::create('cloud')) !!}
|
{!! Button::normal(trans('texts.api_tokens'))->asLinkTo(URL::to('/company/advanced_settings/token_management'))->appendIcon(Icon::create('cloud')) !!}
|
||||||
@if (Utils::isPro())
|
@if (Utils::isPro())
|
||||||
{!! Button::primary(trans('texts.add_user'))->asLinkTo('/users/create')->appendIcon(Icon::create('plus-sign')) !!}
|
{!! Button::primary(trans('texts.add_user'))->asLinkTo(URL::to('/users/create'))->appendIcon(Icon::create('plus-sign')) !!}
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
|
|
||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||||
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo('/clients/' . ($client ? $client->public_id : ''))->appendIcon(Icon::create('remove-circle')) !!}
|
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/clients/' . ($client ? $client->public_id : '')))->appendIcon(Icon::create('remove-circle')) !!}
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||||
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo('/credits')->appendIcon(Icon::create('remove-circle')) !!}
|
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/credits'))->appendIcon(Icon::create('remove-circle')) !!}
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
@ -211,7 +211,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
// keep the token cookie valid to prevent token mismatch errors
|
||||||
|
function keepAlive() {
|
||||||
|
window.setTimeout(function() {
|
||||||
|
$.get('{{ URL::to('/keep_alive') }}', function(data) {
|
||||||
|
keepAlive();
|
||||||
|
})
|
||||||
|
}, 1000 * 60 * 60);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
keepAlive();
|
||||||
|
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
$(".alert-hide").fadeOut(500);
|
$(".alert-hide").fadeOut(500);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
|
||||||
|
|
||||||
@if (Auth::user()->account->utf8_invoices)
|
@if (Auth::user()->account->utf8_invoices)
|
||||||
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
|
||||||
|
|
||||||
@if (Auth::user()->account->utf8_invoices)
|
@if (Auth::user()->account->utf8_invoices)
|
||||||
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
{!! Former::open()->addClass('form-inline')->onchange('refreshPDF()') !!}
|
{!! Former::open()->addClass('form-inline')->onchange('refreshPDF()') !!}
|
||||||
{!! Former::select('version')->options($versionsSelect)->label(trans('select_version'))->style('background-color: white !important') !!}
|
{!! Former::select('version')->options($versionsSelect)->label(trans('select_version'))->style('background-color: white !important') !!}
|
||||||
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit')->withAttributes(array('class' => 'pull-right')) !!}
|
{!! Button::primary(trans('texts.edit_' . $invoice->getEntityType()))->asLinkTo(URL::to('/' . $invoice->getEntityType() . 's/' . $invoice->public_id . '/edit'))->withAttributes(array('class' => 'pull-right')) !!}
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
<br/> <br/>
|
<br/> <br/>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/compatibility.js') }}" type="text/javascript"></script>
|
||||||
|
|
||||||
@if ($invoice->client->account->utf8_invoices)
|
@if ($invoice->client->account->utf8_invoices)
|
||||||
<script src="{{ asset('vendor/pdfmake/build/pdfmake.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/pdfmake.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/vfs_fonts.js') }}" type="text/javascript"></script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@ -29,14 +29,14 @@
|
|||||||
@if ($invoice->is_quote)
|
@if ($invoice->is_quote)
|
||||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||||
@if (!$isConverted)
|
@if (!$isConverted)
|
||||||
{!! Button::success(trans('texts.approve'))->asLinkTo('/approve/' . $invitation->invitation_key)->large() !!}
|
{!! Button::success(trans('texts.approve'))->asLinkTo(URL::to('/approve/' . $invitation->invitation_key))->large() !!}
|
||||||
@endif
|
@endif
|
||||||
@elseif ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring)
|
@elseif ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring)
|
||||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||||
@if (count($paymentTypes) > 1)
|
@if (count($paymentTypes) > 1)
|
||||||
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
|
{!! DropdownButton::success(trans('texts.pay_now'))->withContents($paymentTypes)->large() !!}
|
||||||
@else
|
@else
|
||||||
{!! Button::success(trans('texts.pay_now'))->asLinkTo('/payment/' . $invitation->invitation_key)->large() !!}
|
{!! Button::success(trans('texts.pay_now'))->asLinkTo(URL::to('/payment/' . $invitation->invitation_key))->large() !!}
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
{!! Button::normal('Download PDF')->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
{!! Button::normal('Download PDF')->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<div id="top_right_buttons" class="pull-right">
|
<div id="top_right_buttons" class="pull-right">
|
||||||
<input id="tableFilter" type="text" style="width:140px;margin-right:17px;background-color: white !important" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/>
|
<input id="tableFilter" type="text" style="width:140px;margin-right:17px;background-color: white !important" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/>
|
||||||
{!! Button::primary(trans("texts.new_$entityType"))->asLinkTo("/{$entityType}s/create")->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!}
|
{!! Button::primary(trans("texts.new_$entityType"))->asLinkTo(URL::to("/{$entityType}s/create"))->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
|
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
|
||||||
{!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo('/payments')->large() !!}
|
{!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo(URL::to('/payments'))->large() !!}
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{!! Button::primary(trans('texts.data_visualizations'))
|
{!! Button::primary(trans('texts.data_visualizations'))
|
||||||
->asLinkTo('/company/advanced_settings/data_visualizations')
|
->asLinkTo(URL::to('/company/advanced_settings/data_visualizations'))
|
||||||
->withAttributes(['class' => 'pull-right'])
|
->withAttributes(['class' => 'pull-right'])
|
||||||
->appendIcon(Icon::create('globe')) !!}
|
->appendIcon(Icon::create('globe')) !!}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
{!! Former::actions(
|
{!! Former::actions(
|
||||||
Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send')),
|
Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send')),
|
||||||
Button::normal(trans('texts.cancel'))->asLinkTo('/company/advanced_settings/user_management')->appendIcon(Icon::create('remove-circle'))->large()
|
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/user_management'))->appendIcon(Icon::create('remove-circle'))->large()
|
||||||
)!!}
|
)!!}
|
||||||
|
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user