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
8018bcad6c
commit
c0571b0b2e
@ -10,6 +10,7 @@ use Redirect;
|
||||
use DB;
|
||||
use Event;
|
||||
use URL;
|
||||
use Datatable;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Invitation;
|
||||
|
@ -292,6 +292,7 @@ class Activity extends Eloquent
|
||||
$invoice = $payment->invoice;
|
||||
$invoice->balance = $invoice->balance - $payment->amount;
|
||||
$invoice->invoice_status_id = ($invoice->balance > 0) ? INVOICE_STATUS_PARTIAL : INVOICE_STATUS_PAID;
|
||||
$invoice->partial = 0;
|
||||
$invoice->save();
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,10 @@ class Invoice extends EntityModel
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $casts = [
|
||||
'is_recurring' => 'boolean',
|
||||
];
|
||||
|
||||
public function account()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Account');
|
||||
|
4
public/css/built.css
vendored
4
public/css/built.css
vendored
@ -2408,13 +2408,13 @@ div.checkbox > label {
|
||||
.container input[type=email],
|
||||
.container textarea,
|
||||
.container select {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
/*font-family: 'Roboto', sans-serif;*/
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
width: 100%;
|
||||
color: #000 !important;
|
||||
background: #f9f9f9 !important;
|
||||
border: 1px solid #ebe7e7;
|
||||
/*border: 1px solid #ebe7e7;*/
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
|
3
public/css/style.css
vendored
3
public/css/style.css
vendored
@ -811,13 +811,12 @@ div.checkbox > label {
|
||||
.container input[type=email],
|
||||
.container textarea,
|
||||
.container select {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
width: 100%;
|
||||
color: #000 !important;
|
||||
background: #f9f9f9 !important;
|
||||
border: 1px solid #ebe7e7;
|
||||
/*border: 1px solid #ebe7e7;*/
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
|
@ -33118,14 +33118,17 @@ function truncate(str, length) {
|
||||
function GetPdfMake(invoice, javascript, callback) {
|
||||
var account = invoice.account;
|
||||
eval(javascript);
|
||||
|
||||
/*
|
||||
var fonts = {
|
||||
Roboto: {
|
||||
normal: 'Roboto-Regular.ttf',
|
||||
bold: 'Roboto-Medium.ttf',
|
||||
italics: 'Roboto-Italic.ttf',
|
||||
bolditalics: 'Roboto-Italic.ttf'
|
||||
}
|
||||
},
|
||||
};
|
||||
*/
|
||||
|
||||
doc = pdfMake.createPdf(dd);
|
||||
doc.save = function(fileName) {
|
||||
|
@ -1,14 +1,17 @@
|
||||
function GetPdfMake(invoice, javascript, callback) {
|
||||
var account = invoice.account;
|
||||
eval(javascript);
|
||||
|
||||
/*
|
||||
var fonts = {
|
||||
Roboto: {
|
||||
normal: 'Roboto-Regular.ttf',
|
||||
bold: 'Roboto-Medium.ttf',
|
||||
italics: 'Roboto-Italic.ttf',
|
||||
bolditalics: 'Roboto-Italic.ttf'
|
||||
}
|
||||
},
|
||||
};
|
||||
*/
|
||||
|
||||
doc = pdfMake.createPdf(dd);
|
||||
doc.save = function(fileName) {
|
||||
|
@ -40,6 +40,7 @@ If you'd like to use our code to sell your own invoicing app we have an affiliat
|
||||
* [knockout/knockout](https://github.com/knockout/knockout) - Knockout makes it easier to create rich, responsive UIs with JavaScript
|
||||
* [rniemeyer/knockout-sortable](https://github.com/rniemeyer/knockout-sortable) - A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
|
||||
* [MrRio/jsPDF](https://github.com/MrRio/jsPDF) - Generate PDF files in JavaScript. HTML5 FTW.
|
||||
* [bpampuch/pdfmake](https://github.com/bpampuch/pdfmake) - Client/server side PDF printing in pure JavaScript
|
||||
* [FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome) - The iconic font designed for Bootstrap that works with twitter bootstrap
|
||||
* [Anahkiasen/former](https://github.com/Anahkiasen/former) - A powerful form builder, for Laravel and other frameworks (stand-alone too)
|
||||
* [barryvdh/laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) - Laravel debugbar
|
||||
|
@ -43,6 +43,8 @@
|
||||
</small></h3>
|
||||
@endif
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
@ -139,8 +141,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
{!! HTML::tab_link('#activity', trans('texts.activity'), true) !!}
|
||||
|
@ -113,7 +113,7 @@
|
||||
|
||||
<form class="navbar-form navbar-right" role="search">
|
||||
<div class="form-group">
|
||||
<input type="text" id="search" style="width: 160px"
|
||||
<input type="text" id="search" style="width: 140px"
|
||||
class="form-control" placeholder="{{ trans('texts.search') }}">
|
||||
</div>
|
||||
</form>
|
||||
|
@ -719,6 +719,8 @@
|
||||
var design = getDesignJavascript();
|
||||
if (!design) return;
|
||||
doc = generatePDF(invoice, design, false);
|
||||
if (!doc) return;
|
||||
//return doc.output('datauristring');
|
||||
doc.getDataUrl(cb);
|
||||
}
|
||||
|
||||
@ -878,7 +880,9 @@
|
||||
|
||||
self.loadClient = function(client) {
|
||||
ko.mapping.fromJS(client, model.invoice().client().mapping, model.invoice().client);
|
||||
@if (!$invoice)
|
||||
self.setDueDate();
|
||||
@endif
|
||||
}
|
||||
|
||||
self.showMoreFields = function() {
|
||||
@ -886,6 +890,7 @@
|
||||
}
|
||||
|
||||
self.setDueDate = function() {
|
||||
@if ($entityType == ENTITY_INVOICE)
|
||||
var paymentTerms = parseInt(self.invoice().client().payment_terms());
|
||||
if (paymentTerms && !self.invoice().due_date())
|
||||
{
|
||||
@ -895,6 +900,7 @@
|
||||
// We're using the datepicker to handle the date formatting
|
||||
self.invoice().due_date($('#due_date').val());
|
||||
}
|
||||
@endif
|
||||
}
|
||||
|
||||
self.invoice_taxes = ko.observable({{ Auth::user()->account->invoice_taxes ? 'true' : 'false' }});
|
||||
@ -1148,7 +1154,6 @@
|
||||
|
||||
if (data) {
|
||||
ko.mapping.fromJS(data, self.mapping, self);
|
||||
self.is_recurring(parseInt(data.is_recurring));
|
||||
} else {
|
||||
self.addItem();
|
||||
}
|
||||
@ -1360,7 +1365,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
self.showContact = function(elem) { if (elem.nodeType === 1) $(elem).hide().slideDown() }
|
||||
self.hideContact = function(elem) { if (elem.nodeType === 1) $(elem).slideUp(function() { $(elem).remove(); }) }
|
||||
|
||||
@ -1686,9 +1690,6 @@
|
||||
@if ($invoice)
|
||||
var invoice = {!! $invoice !!};
|
||||
ko.mapping.fromJS(invoice, model.invoice().mapping, model.invoice);
|
||||
if (model.invoice().is_recurring() === '0') {
|
||||
model.invoice().is_recurring(false);
|
||||
}
|
||||
if (NINJA.parseFloat(model.invoice().partial())) {
|
||||
model.invoice().is_partial(true);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
</label>
|
||||
|
||||
<div id="top_right_buttons" class="pull-right">
|
||||
<input id="tableFilter" type="text" style="width:140px;margin-right:17px" 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')) !!}
|
||||
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user