Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Razi KAntorp 2014-02-21 14:03:47 +01:00
commit 676e277cdf
10 changed files with 714 additions and 389 deletions

View File

@ -1,7 +1,7 @@
# Invoice Ninja # Invoice Ninja
## Simple, Intuitive Invoicing ## Simple, Intuitive Invoicing
### [https://www.invoiceninja.com/rocksteady](https://www.invoiceninja.com/rocksteady) ### [https://www.invoiceninja.com](https://www.invoiceninja.com)
### Introduction ### Introduction
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 this 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 this codebase will serve as a sample site for Laravel as well as other JavaScript technologies.
@ -15,9 +15,10 @@ Most online invoicing sites are expensive. They shouldn't be. The aim of this pr
### Steps to setup ### Steps to setup
Fork the Github project If you plan on submitting changes it's best to fork the repo (https://help.github.com/articles/fork-a-repo), otherwise you can just checkout the code.
https://help.github.com/articles/fork-a-repo git clone git@github.com:hillelcoren/invoice-ninja.git ninja
cd ninja
Install Laravel packages using Composer Install Laravel packages using Composer

View File

@ -388,7 +388,8 @@ class InvoiceController extends \BaseController {
$invoice = Invoice::with('invoice_items')->scope($publicId)->firstOrFail(); $invoice = Invoice::with('invoice_items')->scope($publicId)->firstOrFail();
$clone = Invoice::createNew(); $clone = Invoice::createNew();
foreach (['client_id', 'discount', 'invoice_date', 'due_date', 'is_recurring', 'frequency_id', 'start_date', 'end_date', 'terms'] as $field) $clone->balance = $invoice->amount;
foreach (['client_id', 'discount', 'invoice_date', 'due_date', 'is_recurring', 'frequency_id', 'start_date', 'end_date', 'terms', 'public_notes', 'invoice_design_id', 'tax_name', 'tax_rate', 'amount'] as $field)
{ {
$clone->$field = $invoice->$field; $clone->$field = $invoice->$field;
} }

View File

@ -11,9 +11,9 @@ abstract class Mailer {
'emails.'.$view.'_text' 'emails.'.$view.'_text'
]; ];
$view = 'emails.' . $view; //$view = 'emails.' . $view;
Mail::queue($view, $data, function($message) use ($toEmail, $fromEmail, $subject) Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $subject)
{ {
$message->to($toEmail)->replyTo($fromEmail)->subject($subject); $message->to($toEmail)->replyTo($fromEmail)->subject($subject);
}); });

View File

@ -54,10 +54,7 @@ Route::get('/send_emails', function() {
}); });
*/ */
Route::get('/', function() { Route::get('/', 'HomeController@showWelcome');
return Redirect::to('http://signup.invoiceninja.com');
});
Route::get('/rocksteady', 'HomeController@showWelcome'); Route::get('/rocksteady', 'HomeController@showWelcome');
Route::get('log_error', 'HomeController@logError'); Route::get('log_error', 'HomeController@logError');
@ -163,6 +160,14 @@ HTML::macro('image_data', function($imagePath) {
HTML::macro('breadcrumbs', function() { HTML::macro('breadcrumbs', function() {
$str = '<ol class="breadcrumb">'; $str = '<ol class="breadcrumb">';
$crumbs = explode('/', $_SERVER['REQUEST_URI']); $crumbs = explode('/', $_SERVER['REQUEST_URI']);
foreach ($crumbs as $key => $val)
{
if (is_numeric($val))
{
unset($crumbs[$key]);
}
}
for ($i=0; $i<count($crumbs); $i++) { for ($i=0; $i<count($crumbs); $i++) {
$crumb = trim($crumbs[$i]); $crumb = trim($crumbs[$i]);
if (!$crumb) continue; if (!$crumb) continue;
@ -207,7 +212,7 @@ define('DEFAULT_INVOICE_NUMBER', '0001');
define('RECENTLY_VIEWED_LIMIT', 8); define('RECENTLY_VIEWED_LIMIT', 8);
define('LOGGED_ERROR_LIMIT', 100); define('LOGGED_ERROR_LIMIT', 100);
define('RANDOM_KEY_LENGTH', 32); define('RANDOM_KEY_LENGTH', 32);
define('MAX_NUM_CLIENTS', 2000); define('MAX_NUM_CLIENTS', 1000);
define('INVOICE_STATUS_DRAFT', 1); define('INVOICE_STATUS_DRAFT', 1);
define('INVOICE_STATUS_SENT', 2); define('INVOICE_STATUS_SENT', 2);

View File

@ -438,7 +438,7 @@
*/ */
@endif @endif
@if (Session::has('message')) @if (false && Session::has('message'))
setTimeout(function() { setTimeout(function() {
$('.alert-info').fadeOut(); $('.alert-info').fadeOut();
}, 3000); }, 3000);

View File

@ -207,10 +207,10 @@
</div> </div>
<div style="display:none">
{{ Former::select('invoice_design_id')->label('Design')->style('display:inline;width:120px')->raw() {{ Former::select('invoice_design_id')->label('Design')->style('display:inline;width:120px')->raw()
->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }} ->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }}
</div>
{{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }} {{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }}
@ -558,6 +558,15 @@
invoice.imageWidth = {{ $account->getLogoWidth() }}; invoice.imageWidth = {{ $account->getLogoWidth() }};
invoice.imageHeight = {{ $account->getLogoHeight() }}; invoice.imageHeight = {{ $account->getLogoHeight() }};
@endif @endif
//define logo images
invoice.imageLogo1 = "{{ HTML::image_data('images/report_logo1.jpg') }}";
invoice.imageLogoWidth1 =120;
invoice.imageLogoHeight1 = 40
return invoice; return invoice;
} }

View File

@ -19,7 +19,7 @@
&nbsp;<label for="trashed" style="font-weight:normal; margin-left: 10px;"> &nbsp;<label for="trashed" style="font-weight:normal; margin-left: 10px;">
<input id="trashed" type="checkbox" onclick="setTrashVisible()" <input id="trashed" type="checkbox" onclick="setTrashVisible()"
{{ Session::get('show_trash') ? 'checked' : ''}}/> Show archived/deleted {{ Session::get('show_trash') ? 'checked' : ''}}/> Show archived/deleted {{ $entityType }}s
</label> </label>
<div id="top_right_buttons" class="pull-right"> <div id="top_right_buttons" class="pull-right">

View File

@ -53,7 +53,7 @@
<div class="container"> <div class="container">
{{ Former::open('forgot_password')->addClass('form-signin') }} {{ Former::open('forgot_password')->addClass('form-signin') }}
<h2 class="form-signin-heading">Passord Recovery</h2> <h2 class="form-signin-heading">Password Recovery</h2>
<p> <p>
{{ Form::text('email', Input::old('email'), array('placeholder' => 'Email address')) }} {{ Form::text('email', Input::old('email'), array('placeholder' => 'Email address')) }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

1047
public/js/script.js Executable file → Normal file

File diff suppressed because it is too large Load Diff