1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-05-25 16:40:09 +03:00
parent 18bd38f5b6
commit f515d57669
11 changed files with 44 additions and 22 deletions

View File

@ -410,6 +410,18 @@ class PaymentController extends \BaseController
$invoice = $invitation->invoice;
$accountGateway = $invoice->client->account->account_gateways[0];
if ($invoice->account->account_key == NINJA_ACCOUNT_KEY)
{
$account = Account::find($invoice->client->public_id);
$account->pro_plan_paid = date_create()->format('Y-m-d');
$account->save();
}
if ($invoice->is_quote)
{
$invoice = $this->invoiceRepo->cloneInvoice($invoice, $invoice->id);
}
$payment = Payment::createNew($invitation);
$payment->invitation_id = $invitation->id;
$payment->account_gateway_id = $accountGateway->id;
@ -427,13 +439,6 @@ class PaymentController extends \BaseController
$payment->save();
if ($invoice->account->account_key == NINJA_ACCOUNT_KEY)
{
$account = Account::find($invoice->client->public_id);
$account->pro_plan_paid = date_create()->format('Y-m-d');
$account->save();
}
return $payment;
}

View File

@ -220,7 +220,7 @@ class Account extends Eloquent
public function isPro()
{
if (Utils::isNinjaDev())
if (!Utils::isNinjaProd())
{
return true;
}

View File

@ -36,7 +36,8 @@ class ContactMailer extends Mailer {
'accountName' => $invoice->account->getDisplayName(),
'contactName' => $invitation->contact->getDisplayName(),
'invoiceAmount' => Utils::formatMoney($invoice->amount, $invoice->client->currency_id),
'emailFooter' => $invoice->account->email_footer
'emailFooter' => $invoice->account->email_footer,
'showNinjaFooter' => !$invoice->account->isPro() || !Utils::isNinjaProd()
];
$fromEmail = $invitation->user->email;
@ -65,7 +66,8 @@ class ContactMailer extends Mailer {
'accountName' => $payment->account->getDisplayName(),
'clientName' => $payment->client->getDisplayName(),
'emailFooter' => $payment->account->email_footer,
'paymentAmount' => Utils::formatMoney($payment->amount, $payment->client->currency_id)
'paymentAmount' => Utils::formatMoney($payment->amount, $payment->client->currency_id),
'showNinjaFooter' => !$invoice->account->isPro() || !Utils::isNinjaProd()
];
$user = $payment->invitation->user;

View File

@ -17,8 +17,10 @@
{{ $accountName }}
@endif
@if ($showNinjaFooter)
<p/>
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com">Invoice Ninja</a>']) }}
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com/?utm_source=email_footer">Invoice Ninja</a>']) }}
@endif
</body>
</html>

View File

@ -10,5 +10,7 @@
{{ $accountName }}
@endif
@if ($showNinjaFooter)
{{ trans('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }}
https://www.invoiceninja.com
@endif

View File

@ -16,8 +16,10 @@
{{ $accountName }}
@endif
@if ($showNinjaFooter)
<p/>
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com">Invoice Ninja</a>']) }}
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com/?utm_source=email_footer">Invoice Ninja</a>']) }}
@endif
</body>
</html>

View File

@ -9,5 +9,7 @@
{{ $accountName }}
@endif
@if ($showNinjaFooter)
{{ trans('texts.ninja_email_footer', ['site' => 'Invoice Ninja']) }}
https://www.invoiceninja.com
@endif

View File

@ -391,7 +391,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
@endif
@if (!Utils::isNinjaProd() && !Utils::isNinjaDev())
<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/?utm_source=powered_by" target="_blank">InvoiceNinja.com</a></div>
@endif
<p>&nbsp;</p>

View File

@ -23,7 +23,7 @@
<p>&nbsp;</p>
@if ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_quote && !$invoice->is_recurring)
@if ($invoice->client->account->isGatewayConfigured() && !$invoice->isPaid() && !$invoice->is_recurring)
<div class="pull-right" style="width:270px">
{{ Button::normal(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()', 'class' => 'btn-lg')) }}
{{ Button::success_link(URL::to('payment/' . $invitation->invitation_key), trans('texts.pay_now'), array('class' => 'btn-lg pull-right')) }}

View File

@ -237,6 +237,7 @@
<script type="text/javascript">
/*
(function() {
var form = document.getElementById('mad_mimi_signup_form'),
submit = document.getElementById('webform_submit_button'),
@ -417,6 +418,7 @@
}
}
})();
*/
</script>
</div>

View File

@ -19,7 +19,7 @@
<p>It's just that easy. Stop spending time on
complicated and expensive invoicing.<br>
No fuss, just get started and <span style=
"color:#2299c0">get paid.</span></p>
"xcolor:#2299c0">get paid.</span></p>
</div>
</div>
</div>
@ -48,7 +48,8 @@
<div class="box">
<div class="icon free"><span class="img-wrap"><img src="{{ asset('images/icon-free.png') }}"></span></div>
<h2>Free, Always</h2>
<p>Invoicing with no monthly fee, because you have enough bills already! Free, now and forever! Quality invoicing to build your business and get paid.</p>
<!--<p>Invoicing with no monthly fee, because you have enough bills already! Free, now and forever! Quality invoicing to build your business and get paid.</p>-->
<p>Send unlimited invoices to 500 clients per month and never pay a dime. You are welcome to unlock still more awesome features with our Pro Plan, but our free app is a top-notch product that will do everything you need it to do, without any subscription or fees.</p>
</div>
</div>
@ -56,7 +57,8 @@
<div class="box">
<div class="icon open"><span class="img-wrap"><img src="{{ asset('images/icon-opensource.png') }}"></span></div>
<h2>Open-Source</h2>
<p>Cloud-based, super secure, and user-developed. Open source platforms are a better way to do business (and save the world). Need we say more?</p>
<!--<p>Cloud-based, super secure, and user-developed. Open source platforms are a better way to do business (and save the world). Need we say more?</p>-->
<p>No mysterious corporate silos here! Just full <a href="https://github.com/hillelcoren/invoice-ninja" target="_blank">source code</a> transparency and a devotion to working with anyone interested to build a better electronic invoicing platform. We even offer a handy <a href="http://hillelcoren.com/invoice-ninja/self-hosting/" target="_blank">zip download</a> for a self-hosted version of Invoice Ninja.</p>
</div>
</div>
@ -64,7 +66,8 @@
<div class="box">
<div class="icon pdf"><span class="img-wrap"><img src="{{ asset('images/icon-pdf.png') }}"></span></div>
<h2>Live .PDF View</h2>
<p>Create beautiful email-ready .PDF invoices created instantly as you type. Our Save & send feature saves you time and impresses clients.</p>
<!--<p>Create beautiful email-ready .PDF invoices created instantly as you type. Our Save & send feature saves you time and impresses clients.</p>-->
<p>See how your edited invoice will look as a print-friendly pdf while you make the changes. Our pdf generator works in real time while you do, on the same screen. You can even preview four beautiful preset designs. Just create, save, send, and youre done!</p>
</div>
</div>
@ -72,7 +75,9 @@
<div class="box">
<div class="icon pay"><span class="img-wrap"><img src="{{ asset('images/icon-payment.png') }}"></span></div>
<h2>Online Payments</h2>
<p>PayPal? Authorize.Net? Stripe? We support many payment technologies and if you need help or advice well lend a hand (were pretty friendly).</p>
<p>Invoices sent with our app integrate seamlessly with the gateway credit card processor of your choice, to make it super easy for your clients to send you money with just a few clicks. We play nicely with Authorize.Net, Stripe, PayPal and loads more - 23 in all!</p>
<!--<p>PayPal? Authorize.Net? Stripe? We support many payment technologies and if you need help or advice well lend a hand (were pretty friendly).</p>-->
<p></p>
</div>
</div>
</div>