mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Merge branch 'master' of github.com:ascariandrea/invoice-ninja
This commit is contained in:
commit
b57bb90ccb
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
For updates follow [@invoiceninja](https://twitter.com/invoiceninja) and [@hillelcoren](https://twitter.com/hillelcoren)
|
For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja)
|
||||||
|
|
||||||
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ class AccountController extends \BaseController {
|
|||||||
{
|
{
|
||||||
$path = Input::file('logo')->getRealPath();
|
$path = Input::file('logo')->getRealPath();
|
||||||
File::delete('logo/' . $account->account_key . '.jpg');
|
File::delete('logo/' . $account->account_key . '.jpg');
|
||||||
Image::make($path)->resize(120, 80, true, false)->save('logo/' . $account->account_key . '.jpg');
|
Image::make($path)->resize(null, 120, true, false)->save('logo/' . $account->account_key . '.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::fire('user.refresh');
|
Event::fire('user.refresh');
|
||||||
|
@ -206,6 +206,12 @@ class InvoiceController extends \BaseController {
|
|||||||
|
|
||||||
public static function getViewModel()
|
public static function getViewModel()
|
||||||
{
|
{
|
||||||
|
// Temporary fix to let users know to re-upload their logos for higher res
|
||||||
|
if (Auth::user()->account->getLogoHeight() == 80)
|
||||||
|
{
|
||||||
|
Session::flash('warning', "We've increased the logo resolution in the PDF. Please re-upload your logo to take advantage of it.");
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'account' => Auth::user()->account,
|
'account' => Auth::user()->account,
|
||||||
'products' => Product::scope()->orderBy('id')->get(array('product_key','notes','cost','qty')),
|
'products' => Product::scope()->orderBy('id')->get(array('product_key','notes','cost','qty')),
|
||||||
|
@ -166,7 +166,13 @@ HTML::macro('breadcrumbs', function() {
|
|||||||
$str = '<ol class="breadcrumb">';
|
$str = '<ol class="breadcrumb">';
|
||||||
|
|
||||||
// Get the breadcrumbs by exploding the current path.
|
// Get the breadcrumbs by exploding the current path.
|
||||||
$crumbs = explode('/', str_replace(Utils::basePath(), '', $_SERVER['REQUEST_URI']));
|
$basePath = Utils::basePath();
|
||||||
|
$path = $_SERVER['REQUEST_URI'];
|
||||||
|
if ($basePath != '/')
|
||||||
|
{
|
||||||
|
$path = str_replace($basePath, '', $path);
|
||||||
|
}
|
||||||
|
$crumbs = explode('/', $path);
|
||||||
|
|
||||||
foreach ($crumbs as $key => $val)
|
foreach ($crumbs as $key => $val)
|
||||||
{
|
{
|
||||||
@ -175,6 +181,7 @@ HTML::macro('breadcrumbs', function() {
|
|||||||
unset($crumbs[$key]);
|
unset($crumbs[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs = array_values($crumbs);
|
$crumbs = array_values($crumbs);
|
||||||
for ($i=0; $i<count($crumbs); $i++) {
|
for ($i=0; $i<count($crumbs); $i++) {
|
||||||
$crumb = trim($crumbs[$i]);
|
$crumb = trim($crumbs[$i]);
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
{{ Former::text('name') }}
|
{{ Former::text('name') }}
|
||||||
{{ Former::text('work_email')->label('Email') }}
|
{{ Former::text('work_email')->label('Email') }}
|
||||||
{{ Former::text('work_phone')->label('Phone') }}
|
{{ Former::text('work_phone')->label('Phone') }}
|
||||||
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommended size: 120px width, 80px height') }}
|
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommended height: 120px') }}
|
||||||
|
|
||||||
@if (file_exists($account->getLogoPath()))
|
@if (file_exists($account->getLogoPath()))
|
||||||
<center>
|
<center>
|
||||||
|
@ -164,6 +164,10 @@
|
|||||||
{{ HTML::breadcrumbs() }}
|
{{ HTML::breadcrumbs() }}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (Session::has('warning'))
|
||||||
|
<div class="alert alert-warning">{{ Session::get('warning') }}</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (Session::has('message'))
|
@if (Session::has('message'))
|
||||||
<div class="alert alert-info">{{ Session::get('message') }}</div>
|
<div class="alert alert-info">{{ Session::get('message') }}</div>
|
||||||
@endif
|
@endif
|
||||||
|
@ -578,8 +578,8 @@
|
|||||||
|
|
||||||
@if (file_exists($account->getLogoPath()))
|
@if (file_exists($account->getLogoPath()))
|
||||||
invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}";
|
invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}";
|
||||||
invoice.imageWidth = {{ $account->getLogoWidth() }};
|
invoice.imageWidth = {{ $account->getLogoWidth() * (72/96) }};
|
||||||
invoice.imageHeight = {{ $account->getLogoHeight() }};
|
invoice.imageHeight = {{ $account->getLogoHeight() * (72/96) }};
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ function GetReportTemplate4(doc, invoice, layout, checkMath) {
|
|||||||
if (invoice.image)
|
if (invoice.image)
|
||||||
{
|
{
|
||||||
var left = layout.headerRight - invoice.imageWidth;
|
var left = layout.headerRight - invoice.imageWidth;
|
||||||
doc.addImage(invoice.image, 'JPEG', left, 30, invoice.imageWidth, invoice.imageHeight);
|
doc.addImage(invoice.image, 'JPEG', left, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* table header */
|
/* table header */
|
||||||
@ -700,7 +700,7 @@ function GetReportTemplate1(doc, invoice, layout, checkMath)
|
|||||||
if (invoice.image)
|
if (invoice.image)
|
||||||
{
|
{
|
||||||
var left = layout.headerRight - invoice.imageWidth;
|
var left = layout.headerRight - invoice.imageWidth;
|
||||||
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, layout.accountTop, invoice.imageWidth, invoice.imageHeight);
|
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invoice.imageLogo1)
|
if (invoice.imageLogo1)
|
||||||
@ -822,7 +822,7 @@ function GetReportTemplate2(doc, invoice, layout, checkMath)
|
|||||||
if (invoice.image)
|
if (invoice.image)
|
||||||
{
|
{
|
||||||
var left = layout.headerRight - invoice.imageWidth;
|
var left = layout.headerRight - invoice.imageWidth;
|
||||||
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30, invoice.imageWidth, invoice.imageHeight);
|
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
Report2AddFooter (invoice,doc);
|
Report2AddFooter (invoice,doc);
|
||||||
@ -1140,7 +1140,7 @@ function GetReportTemplate3(doc, invoice, layout, checkMath)
|
|||||||
{
|
{
|
||||||
y=130;
|
y=130;
|
||||||
var left = layout.headerRight - invoice.imageWidth;
|
var left = layout.headerRight - invoice.imageWidth;
|
||||||
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, y, invoice.imageWidth, invoice.imageHeight);
|
doc.addImage(invoice.image, 'JPEG', layout.marginLeft, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
Report3AddFooter (invoice, account, doc, layout);
|
Report3AddFooter (invoice, account, doc, layout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user