mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 10:54:30 -04:00
Bug fixes
This commit is contained in:
parent
4c1b33f601
commit
3d6530e83f
@ -6,11 +6,9 @@
|
|||||||
|
|
||||||
Most online invoicing sites are expensive. They shouldn't be. The aim of this project is to provide a free, open-source alternative. Additionally, the hope is the codebase will serve as a sample site for Laravel as well as other JavaScript technologies.
|
Most online invoicing sites are expensive. They shouldn't be. The aim of this project is to provide a free, open-source alternative. Additionally, the hope is the codebase will serve as a sample site for Laravel as well as other JavaScript technologies.
|
||||||
|
|
||||||
The high level instructions for setting up the site are below but there's also a [setup guide](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
|
The high level instructions for setting up the site are below but there's also a [setup guide](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/). If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files.
|
||||||
|
|
||||||
For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja).
|
For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
|
||||||
|
|
||||||
If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files.
|
|
||||||
|
|
||||||
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
||||||
|
|
||||||
|
@ -176,8 +176,16 @@ class InvoiceRepository
|
|||||||
|
|
||||||
$total += $total * $invoice->tax_rate / 100;
|
$total += $total * $invoice->tax_rate / 100;
|
||||||
|
|
||||||
$invoice->amount = $total;
|
if ($publicId)
|
||||||
|
{
|
||||||
|
$invoice->balance = $total - ($invoice->amount - $invoice->balance);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$invoice->balance = $total;
|
$invoice->balance = $total;
|
||||||
|
}
|
||||||
|
|
||||||
|
$invoice->amount = $total;
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
|
|
||||||
$invoice->invoice_items()->forceDelete();
|
$invoice->invoice_items()->forceDelete();
|
||||||
|
@ -3,44 +3,44 @@
|
|||||||
|
|
||||||
|
|
||||||
@section('head')
|
@section('head')
|
||||||
<meta name="csrf-token" content="<?= csrf_token() ?>">
|
<meta name="csrf-token" content="<?= csrf_token() ?>">
|
||||||
|
|
||||||
<script src="{{ asset('vendor/jquery-ui/ui/minified/jquery-ui.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/jquery-ui/ui/minified/jquery-ui.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/bootstrap/dist/js/bootstrap.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/bootstrap/dist/js/bootstrap.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/datatables/media/js/jquery.dataTables.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/datatables/media/js/jquery.dataTables.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/datatables-bootstrap3/BS3/assets/js/datatables.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/datatables-bootstrap3/BS3/assets/js/datatables.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/knockout.js/knockout.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/knockout.js/knockout.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/knockout-mapping/build/output/knockout.mapping-latest.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/knockout-mapping/build/output/knockout.mapping-latest.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/knockout-sortable/build/knockout-sortable.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/knockout-sortable/build/knockout-sortable.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/underscore/underscore-min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/underscore/underscore-min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/bootstrap-datepicker/js/bootstrap-datepicker.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/bootstrap-datepicker/js/bootstrap-datepicker.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/typeahead.js/dist/typeahead.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/typeahead.js/dist/typeahead.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('vendor/accounting/accounting.min.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('vendor/accounting/accounting.min.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/bootstrap-combobox.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/bootstrap-combobox.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/jspdf.source.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/jspdf.source.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/jspdf.plugin.split_text_to_size.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/jspdf.plugin.split_text_to_size.js') }}" type="text/javascript"></script>
|
||||||
<script src="{{ asset('js/script.js') }}" type="text/javascript"></script>
|
<script src="{{ asset('js/script.js') }}" type="text/javascript"></script>
|
||||||
|
|
||||||
<link href="{{ asset('vendor/bootstrap/dist/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('vendor/bootstrap/dist/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
<link href="{{ asset('vendor/datatables/media/css/jquery.dataTables.css') }}" rel="stylesheet" type="text/css">
|
<link href="{{ asset('vendor/datatables/media/css/jquery.dataTables.css') }}" rel="stylesheet" type="text/css">
|
||||||
<link href="{{ asset('vendor/datatables-bootstrap3/BS3/assets/css/datatables.css') }}" rel="stylesheet" type="text/css">
|
<link href="{{ asset('vendor/datatables-bootstrap3/BS3/assets/css/datatables.css') }}" rel="stylesheet" type="text/css">
|
||||||
<link href="{{ asset('vendor/font-awesome/css/font-awesome.min.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('vendor/font-awesome/css/font-awesome.min.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
<link href="{{ asset('vendor/bootstrap-datepicker/css/datepicker.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('vendor/bootstrap-datepicker/css/datepicker.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
<link href="{{ asset('css/bootstrap-combobox.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/bootstrap-combobox.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
<link href="{{ asset('css/typeahead.js-bootstrap.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/typeahead.js-bootstrap.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
<link href="{{ asset('css/style.css') }}" rel="stylesheet" type="text/css"/>
|
<link href="{{ asset('css/style.css') }}" rel="stylesheet" type="text/css"/>
|
||||||
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* background-color: #F6F6F6; */
|
/* background-color: #F6F6F6; */
|
||||||
background-color: #EEEEEE;
|
background-color: #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var currencies = {{ Currency::remember(120)->get(); }};
|
var currencies = {{ Currency::remember(120)->get(); }};
|
||||||
var currencyMap = {};
|
var currencyMap = {};
|
||||||
@ -73,14 +73,14 @@
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
|
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
@ -95,6 +95,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if (Auth::check())
|
||||||
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
<div class="collapse navbar-collapse" id="navbar-collapse-1">
|
||||||
<ul class="nav navbar-nav" style="font-weight: bold">
|
<ul class="nav navbar-nav" style="font-weight: bold">
|
||||||
{{ HTML::nav_link('dashboard', 'dashboard') }}
|
{{ HTML::nav_link('dashboard', 'dashboard') }}
|
||||||
@ -104,7 +105,8 @@
|
|||||||
{{ HTML::menu_link('credit') }}
|
{{ HTML::menu_link('credit') }}
|
||||||
{{-- HTML::nav_link('reports', 'Reports') --}}
|
{{-- HTML::nav_link('reports', 'Reports') --}}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="navbar-form navbar-right">
|
|
||||||
|
<div class="navbar-form navbar-right">
|
||||||
@if (Auth::check() && !Auth::user()->registered)
|
@if (Auth::check() && !Auth::user()->registered)
|
||||||
{{ Button::sm_success_primary('Sign up', array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }}
|
{{ Button::sm_success_primary('Sign up', array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }}
|
||||||
|
|
||||||
@ -125,11 +127,10 @@
|
|||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (Auth::check())
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
|
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
|
||||||
<span id="myAccountButton">
|
<span id="myAccountButton">
|
||||||
@if (Auth::check() && Auth::user()->registered)
|
@if (Auth::user()->registered)
|
||||||
{{ Auth::user()->getFullName() }}
|
{{ Auth::user()->getFullName() }}
|
||||||
@else
|
@else
|
||||||
Guest
|
Guest
|
||||||
@ -147,7 +148,6 @@
|
|||||||
<li>{{ link_to('#', 'Logout', array('onclick'=>'logout()')) }}</li>
|
<li>{{ link_to('#', 'Logout', array('onclick'=>'logout()')) }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -171,15 +171,18 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div><!-- /.navbar-collapse -->
|
</div><!-- /.navbar-collapse -->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
@if (!isset($showBreadcrumbs) || $showBreadcrumbs)
|
@if (!isset($showBreadcrumbs) || $showBreadcrumbs)
|
||||||
{{ HTML::breadcrumbs() }}
|
{{ HTML::breadcrumbs() }}
|
||||||
@ -199,8 +202,8 @@
|
|||||||
|
|
||||||
@yield('content')
|
@yield('content')
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="footer" style="padding-top: 32px">
|
<div class="footer" style="padding-top: 32px">
|
||||||
@if (false)
|
@if (false)
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@ -224,17 +227,17 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice-ninja', 'open source', array('target'=>'_blank')) }}, email us at {{ link_to('mailto:contact@invoiceninja.com', 'contact@invoiceninja.com') }}.
|
Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice-ninja', 'open source', array('target'=>'_blank')) }}, email us at {{ link_to('mailto:contact@invoiceninja.com', 'contact@invoiceninja.com') }}.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@if (!Auth::check() || !Auth::user()->registered)
|
@if (!Auth::check() || !Auth::user()->registered)
|
||||||
<div class="modal fade" id="signUpModal" tabindex="-1" role="dialog" aria-labelledby="signUpModalLabel" aria-hidden="true">
|
<div class="modal fade" id="signUpModal" tabindex="-1" role="dialog" aria-labelledby="signUpModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -290,10 +293,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="logoutModalLabel" aria-hidden="true">
|
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="logoutModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@ -312,19 +315,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($_SERVER['SERVER_NAME'] != 'www.invoiceninja.com')
|
@if ($_SERVER['SERVER_NAME'] != 'www.invoiceninja.com')
|
||||||
<div class="container">{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/" target="_blank">InvoiceNinja.com</a></div>
|
<div class="container">{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/" target="_blank">InvoiceNinja.com</a></div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<p> </p>
|
<p> </p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function setTheme(id)
|
function setTheme(id)
|
||||||
{
|
{
|
||||||
@ -477,25 +480,25 @@
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$(window).on('beforeunload', function() {
|
$(window).on('beforeunload', function() {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
$('form').submit(function() { $(window).off('beforeunload') });
|
$('form').submit(function() { $(window).off('beforeunload') });
|
||||||
$('a[rel!=ext]').click(function() { $(window).off('beforeunload') });
|
$('a[rel!=ext]').click(function() { $(window).off('beforeunload') });
|
||||||
*/
|
*/
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (false && Session::has('message'))
|
@if (false && Session::has('message'))
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.alert-info').fadeOut();
|
$('.alert-info').fadeOut();
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@yield('onReady')
|
@yield('onReady')
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
@ -93,7 +93,7 @@ function GetReportTemplate4(doc, invoice, layout, checkMath) {
|
|||||||
doc.setFontType("bold");
|
doc.setFontType("bold");
|
||||||
doc.text(layout.footerLeft, y, 'Balance Due');
|
doc.text(layout.footerLeft, y, 'Balance Due');
|
||||||
|
|
||||||
total = formatMoney(invoice.balance_amount, currencyId)
|
total = formatMoney(invoice.balance_amount, currencyId);
|
||||||
var totalX = layout.headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());
|
var totalX = layout.headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());
|
||||||
doc.text(totalX, y, total);
|
doc.text(totalX, y, total);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user