mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Merge Master Changes
Had to manually resolve conflict issues
This commit is contained in:
commit
c6d8b6f8e1
@ -400,9 +400,9 @@ class InvoiceController extends BaseController
|
||||
Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT, $url);
|
||||
}
|
||||
|
||||
/*if (!empty(Input::get('pdfupload')) && strpos(Input::get('pdfupload'), 'data:application/pdf;base64,') === 0) {
|
||||
$this->storePDF(Input::get('pdfupload'), $input->invoice->public_id);
|
||||
}*/
|
||||
if (!empty(Input::get('pdfupload')) && strpos(Input::get('pdfupload'), 'data:application/pdf;base64,') === 0) {
|
||||
$this->storePDF(Input::get('pdfupload'), $invoice->id);
|
||||
}
|
||||
|
||||
if ($action == 'clone') {
|
||||
return $this->cloneInvoice($publicId);
|
||||
@ -547,11 +547,11 @@ class InvoiceController extends BaseController
|
||||
return View::make('invoices.history', $data);
|
||||
}
|
||||
|
||||
private function storePDF($encodedString, $public_id)
|
||||
private function storePDF($encodedString, $invoiceId)
|
||||
{
|
||||
$uploadsDir = storage_path().'/pdfcache/';
|
||||
$encodedString = str_replace('data:application/pdf;base64,', '', $encodedString);
|
||||
$name = 'cache-'.$public_id.'.pdf';
|
||||
$name = 'cache-'.$invoiceId.'.pdf';
|
||||
|
||||
if (file_put_contents($uploadsDir.$name, base64_decode($encodedString)) !== false) {
|
||||
$finfo = new finfo(FILEINFO_MIME);
|
||||
|
@ -328,7 +328,9 @@ class PaymentController extends \BaseController
|
||||
} else {
|
||||
return self::do_payment($invitationKey, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Session::put('payment_type', PAYMENT_TYPE_ANY);
|
||||
}
|
||||
|
||||
$invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail();
|
||||
$invoice = $invitation->invoice;
|
||||
|
@ -25,7 +25,7 @@ class Mailer
|
||||
$invoice = Invoice::find($data['id']);
|
||||
$invoice->load('account');
|
||||
$accountAttributes = $invoice->account()->getParent()->getRelations()['account']->getAttributes();
|
||||
$pdfPath = storage_path().'/pdfcache/cache-'.$invoice->getAttributes()['public_id'].'.pdf';
|
||||
$pdfPath = storage_path().'/pdfcache/cache-'.$invoice->id.'.pdf';
|
||||
|
||||
if($accountAttributes['pdf_email_attachment'] === 1 && file_exists($pdfPath)) {
|
||||
$message->attach(
|
||||
|
@ -154,7 +154,7 @@ class ConstantsSeeder extends Seeder
|
||||
Currency::create(array('name' => 'New Zealand Dollar', 'code' => 'NZD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
Currency::create(array('name' => 'Vietnamese Dong', 'code' => 'VND', 'symbol' => 'VND ', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
Currency::create(array('name' => 'Swiss Franc', 'code' => 'CHF', 'symbol' => 'CHF ', 'precision' => '2', 'thousand_separator' => '\'', 'decimal_separator' => '.'));
|
||||
|
||||
Currency::create(array('name' => 'Guatemalan Quetzal', 'code' => 'GTQ', 'symbol' => 'Q', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
|
||||
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
||||
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
||||
|
@ -31609,6 +31609,7 @@ function GetPdf(invoice, javascript){
|
||||
doc.setFontSize('8');
|
||||
SetPdfColor(invoice.invoice_design_id == 2 || invoice.invoice_design_id == 3 ? 'White' : 'Black',doc);
|
||||
var top = doc.internal.pageSize.height - layout.marginLeft;
|
||||
if (!invoice.is_pro) top -= 25;
|
||||
var numLines = invoice.invoice_footer.split("\n").length - 1;
|
||||
doc.text(layout.marginLeft, top - (numLines * 8), invoice.invoice_footer);
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ function GetPdf(invoice, javascript){
|
||||
doc.setFontSize('8');
|
||||
SetPdfColor(invoice.invoice_design_id == 2 || invoice.invoice_design_id == 3 ? 'White' : 'Black',doc);
|
||||
var top = doc.internal.pageSize.height - layout.marginLeft;
|
||||
if (!invoice.is_pro) top -= 25;
|
||||
var numLines = invoice.invoice_footer.split("\n").length - 1;
|
||||
doc.text(layout.marginLeft, top - (numLines * 8), invoice.invoice_footer);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user