mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Bug fixes
This commit is contained in:
parent
c38577e0a8
commit
06be7afedf
@ -49,8 +49,7 @@ class Handler extends ExceptionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// In production, except for maintenance mode, we'll show a custom error screen
|
// In production, except for maintenance mode, we'll show a custom error screen
|
||||||
//if (Utils::isNinjaProd() && $e->getStatusCode() != 503) {
|
if (Utils::isNinjaProd() && !Utils::isDownForMaintenance()) {
|
||||||
if (Utils::isNinjaProd()) {
|
|
||||||
$data = [
|
$data = [
|
||||||
'error' => get_class($e),
|
'error' => get_class($e),
|
||||||
'hideHeader' => true,
|
'hideHeader' => true,
|
||||||
|
@ -586,7 +586,7 @@ class InvoiceController extends BaseController
|
|||||||
{
|
{
|
||||||
Session::reflash();
|
Session::reflash();
|
||||||
|
|
||||||
return Redirect::to('invoices/'.$publicId.'/edit');
|
return Redirect::to("invoices/{$publicId}/edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -119,6 +119,13 @@ class TaskController extends BaseController
|
|||||||
return $this->save();
|
return $this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function show($publicId)
|
||||||
|
{
|
||||||
|
Session::reflash();
|
||||||
|
|
||||||
|
return Redirect::to("tasks/{$publicId}/edit");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the form for creating a new resource.
|
* Show the form for creating a new resource.
|
||||||
*
|
*
|
||||||
|
@ -40,6 +40,11 @@ class Utils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function isDownForMaintenance()
|
||||||
|
{
|
||||||
|
return file_exists(storage_path() . '/framework/down');
|
||||||
|
}
|
||||||
|
|
||||||
public static function isProd()
|
public static function isProd()
|
||||||
{
|
{
|
||||||
return App::environment() == ENV_PRODUCTION;
|
return App::environment() == ENV_PRODUCTION;
|
||||||
|
@ -62,8 +62,12 @@
|
|||||||
@section('body')
|
@section('body')
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
@include('partials.warn_session', ['redirectTo' => '/login'])
|
||||||
|
|
||||||
{!! Former::open('login')->rules(['email' => 'required|email', 'password' => 'required'])->addClass('form-signin') !!}
|
|
||||||
|
{!! Former::open('login')
|
||||||
|
->rules(['email' => 'required|email', 'password' => 'required'])
|
||||||
|
->addClass('form-signin warn-on-exit') !!}
|
||||||
{{ Former::populateField('remember', 'true') }}
|
{{ Former::populateField('remember', 'true') }}
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -700,12 +700,8 @@
|
|||||||
var product = products[i];
|
var product = products[i];
|
||||||
if (product.product_key == key) {
|
if (product.product_key == key) {
|
||||||
var model = ko.dataFor(this);
|
var model = ko.dataFor(this);
|
||||||
if (!model.notes()) {
|
model.notes(product.notes);
|
||||||
model.notes(product.notes);
|
model.cost(accounting.toFixed(product.cost,2));
|
||||||
}
|
|
||||||
if (!model.cost()) {
|
|
||||||
model.cost(accounting.toFixed(product.cost,2));
|
|
||||||
}
|
|
||||||
if (!model.qty()) {
|
if (!model.qty()) {
|
||||||
model.qty(1);
|
model.qty(1);
|
||||||
}
|
}
|
||||||
@ -1741,23 +1737,22 @@
|
|||||||
} else {
|
} else {
|
||||||
return total ? formatMoney(total, 1) : '';
|
return total ? formatMoney(total, 1) : '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.hideActions = function() {
|
this.hideActions = function() {
|
||||||
this.actionsVisible(false);
|
this.actionsVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.showActions = function() {
|
this.showActions = function() {
|
||||||
this.actionsVisible(true);
|
this.actionsVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isEmpty = function() {
|
this.isEmpty = function() {
|
||||||
return !self.product_key() && !self.notes() && !self.cost() && (!self.qty() || {{ $account->hide_quantity ? 'true' : 'false' }});
|
return !self.product_key() && !self.notes() && !self.cost() && (!self.qty() || {{ $account->hide_quantity ? 'true' : 'false' }});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onSelect = function(){
|
this.onSelect = function() {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function onItemChange()
|
function onItemChange()
|
||||||
{
|
{
|
||||||
@ -1772,12 +1767,6 @@
|
|||||||
if (!hasEmpty) {
|
if (!hasEmpty) {
|
||||||
model.invoice().addItem();
|
model.invoice().addItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
$('.word-wrap').each(function(index, input) {
|
|
||||||
$(input).height($(input).val().split('\n').length * 20);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTaxRateChange()
|
function onTaxRateChange()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user