1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-04-06 13:18:34 +03:00
parent c3b7902e6b
commit cb0444f339
12 changed files with 30 additions and 15 deletions

View File

@ -356,6 +356,8 @@ class InvoiceController extends \BaseController {
*/ */
public function show($publicId) public function show($publicId)
{ {
Session::reflash();
return Redirect::to('invoices/'.$publicId.'/edit'); return Redirect::to('invoices/'.$publicId.'/edit');
} }

View File

@ -24,6 +24,8 @@ class AddLanguageSupport extends Migration {
DB::table('languages')->insert(['name' => 'German', 'locale' => 'de']); DB::table('languages')->insert(['name' => 'German', 'locale' => 'de']);
DB::table('languages')->insert(['name' => 'French', 'locale' => 'fr']); DB::table('languages')->insert(['name' => 'French', 'locale' => 'fr']);
DB::table('languages')->insert(['name' => 'Brazilian Portuguese', 'locale' => 'pt_BR']); DB::table('languages')->insert(['name' => 'Brazilian Portuguese', 'locale' => 'pt_BR']);
DB::table('languages')->insert(['name' => 'Dutch', 'locale' => 'nl']);
DB::table('languages')->insert(['name' => 'Spanish', 'locale' => 'es']);
Schema::table('accounts', function($table) Schema::table('accounts', function($table)
{ {

View File

@ -253,7 +253,7 @@ return array(
'confirmation_header' => 'Konto Bestätigung', 'confirmation_header' => 'Konto Bestätigung',
'confirmation_message' => 'Bitte klicke auf den folgenden Link um dein Konto zu bestätigen.', 'confirmation_message' => 'Bitte klicke auf den folgenden Link um dein Konto zu bestätigen.',
'invoice_message' => 'Um Ihre Rechnung über :amount einzusehen, klicken Sie bitte auf den folgenden Link.', 'invoice_message' => 'Um Ihre Rechnung über :amount einzusehen, klicken Sie bitte auf den folgenden Link.',
'payment_subject' => 'Zahlungseingang :invoice', 'payment_subject' => 'Zahlungseingang',
'payment_message' => 'Vielen Dank für Ihre Zahlung von :amount.', 'payment_message' => 'Vielen Dank für Ihre Zahlung von :amount.',
'email_salutation' => 'Sehr geehrte/r :name,', 'email_salutation' => 'Sehr geehrte/r :name,',
'email_signature' => 'Freundliche Grüße,', 'email_signature' => 'Freundliche Grüße,',
@ -304,6 +304,6 @@ return array(
'erase_data' => 'This will permanently erase your data.', 'erase_data' => 'This will permanently erase your data.',
'password' => 'Password', 'password' => 'Password',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'close' => 'Close',
); );

View File

@ -96,6 +96,7 @@ return array(
'import' => 'Import', 'import' => 'Import',
'download' => 'Download', 'download' => 'Download',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'close' => 'Close',
'provide_email' => 'Please provide a valid email address', 'provide_email' => 'Please provide a valid email address',
'powered_by' => 'Powered by', 'powered_by' => 'Powered by',
'no_items' => 'No items', 'no_items' => 'No items',
@ -254,7 +255,7 @@ return array(
'confirmation_message' => 'Please access the link below to confirm your account.', 'confirmation_message' => 'Please access the link below to confirm your account.',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'invoice_message' => 'To view your invoice for :amount, click the link below.', 'invoice_message' => 'To view your invoice for :amount, click the link below.',
'payment_subject' => 'Payment Received :invoice', 'payment_subject' => 'Payment Received',
'payment_message' => 'Thank you for your payment of :amount.', 'payment_message' => 'Thank you for your payment of :amount.',
'email_salutation' => 'Dear :name,', 'email_salutation' => 'Dear :name,',
'email_signature' => 'Regards,', 'email_signature' => 'Regards,',

View File

@ -95,6 +95,7 @@ return array(
'import' => 'Import', 'import' => 'Import',
'download' => 'Download', 'download' => 'Download',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'close' => 'Close',
'provide_email' => 'Please provide a valid email address', 'provide_email' => 'Please provide a valid email address',
'powered_by' => 'Powered by', 'powered_by' => 'Powered by',
'no_items' => 'No items', 'no_items' => 'No items',
@ -253,7 +254,7 @@ return array(
'confirmation_message' => 'Please access the link below to confirm your account.', 'confirmation_message' => 'Please access the link below to confirm your account.',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'invoice_message' => 'To view your invoice for :amount, click the link below.', 'invoice_message' => 'To view your invoice for :amount, click the link below.',
'payment_subject' => 'Payment Received :invoice', 'payment_subject' => 'Payment Received',
'payment_message' => 'Thank you for your payment of :amount.', 'payment_message' => 'Thank you for your payment of :amount.',
'email_salutation' => 'Dear :name,', 'email_salutation' => 'Dear :name,',
'email_signature' => 'Regards,', 'email_signature' => 'Regards,',

View File

@ -96,6 +96,7 @@ return array(
'import' => 'Import', 'import' => 'Import',
'download' => 'Download', 'download' => 'Download',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'close' => 'Close',
'provide_email' => 'Please provide a valid email address', 'provide_email' => 'Please provide a valid email address',
'powered_by' => 'Powered by', 'powered_by' => 'Powered by',
'no_items' => 'No items', 'no_items' => 'No items',
@ -254,7 +255,7 @@ return array(
'confirmation_message' => 'Please access the link below to confirm your account.', 'confirmation_message' => 'Please access the link below to confirm your account.',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'invoice_message' => 'To view your invoice for :amount, click the link below.', 'invoice_message' => 'To view your invoice for :amount, click the link below.',
'payment_subject' => 'Payment Received :invoice', 'payment_subject' => 'Payment Received',
'payment_message' => 'Thank you for your payment of :amount.', 'payment_message' => 'Thank you for your payment of :amount.',
'email_salutation' => 'Dear :name,', 'email_salutation' => 'Dear :name,',
'email_signature' => 'Regards,', 'email_signature' => 'Regards,',

View File

@ -96,6 +96,7 @@ return array(
'import' => 'Import', 'import' => 'Import',
'download' => 'Download', 'download' => 'Download',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'close' => 'Close',
'provide_email' => 'Please provide a valid email address', 'provide_email' => 'Please provide a valid email address',
'powered_by' => 'Powered by', 'powered_by' => 'Powered by',
'no_items' => 'No items', 'no_items' => 'No items',
@ -254,7 +255,7 @@ return array(
'confirmation_message' => 'Please access the link below to confirm your account.', 'confirmation_message' => 'Please access the link below to confirm your account.',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'invoice_message' => 'To view your invoice for :amount, click the link below.', 'invoice_message' => 'To view your invoice for :amount, click the link below.',
'payment_subject' => 'Payment Received :invoice', 'payment_subject' => 'Payment Received',
'payment_message' => 'Thank you for your payment of :amount.', 'payment_message' => 'Thank you for your payment of :amount.',
'email_salutation' => 'Dear :name,', 'email_salutation' => 'Dear :name,',
'email_signature' => 'Regards,', 'email_signature' => 'Regards,',

View File

@ -253,7 +253,7 @@ return array(
'confirmation_header' => 'Bevestiging Account', 'confirmation_header' => 'Bevestiging Account',
'confirmation_message' => 'Ga alstublieft naar onderstaande link om je account te bevestiging.', 'confirmation_message' => 'Ga alstublieft naar onderstaande link om je account te bevestiging.',
'invoice_message' => 'Om je factuur voor :amount te bekijken, klik op onderstaande link.', 'invoice_message' => 'Om je factuur voor :amount te bekijken, klik op onderstaande link.',
'payment_subject' => 'Betaling ontvangen :invoice', 'payment_subject' => 'Betaling ontvangen',
'payment_message' => 'Bedankt voor je betaling van :amount.', 'payment_message' => 'Bedankt voor je betaling van :amount.',
'email_salutation' => 'Beste :name,', 'email_salutation' => 'Beste :name,',
'email_signature' => 'Met vriendelijke groeten,', 'email_signature' => 'Met vriendelijke groeten,',
@ -304,5 +304,6 @@ return array(
'erase_data' => 'This will permanently erase your data.', 'erase_data' => 'This will permanently erase your data.',
'password' => 'Password', 'password' => 'Password',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'close' => 'Close',
); );

View File

@ -252,7 +252,6 @@ return array(
'confirmation_header' => 'Confirmação de Conta', 'confirmation_header' => 'Confirmação de Conta',
'confirmation_message' => 'Favor acessar o link abaixo para confirmar a sua conta.', 'confirmation_message' => 'Favor acessar o link abaixo para confirmar a sua conta.',
'invoice_message' => 'Para visualizar a sua fatura de :amount, clique no link abaixo.', 'invoice_message' => 'Para visualizar a sua fatura de :amount, clique no link abaixo.',
'payment_subject' => 'Recebido Pagamento de :invoice',
'payment_message' => 'Obrigado pelo seu pagamento de :amount.', 'payment_message' => 'Obrigado pelo seu pagamento de :amount.',
'email_salutation' => 'Caro :name,', 'email_salutation' => 'Caro :name,',
'email_signature' => 'Até mais,', 'email_signature' => 'Até mais,',
@ -291,6 +290,8 @@ return array(
'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.',
'erase_data' => 'This will permanently erase your data.', 'erase_data' => 'This will permanently erase your data.',
'password' => 'Password', 'password' => 'Password',
'close' => 'Close',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'New invoice from :account',
'payment_subject' => 'Recebido Pagamento de', // I remove the invoice number, is it still correct? Thanks!
); );

View File

@ -52,6 +52,13 @@ class Invoice extends EntityModel
return $this->invoice_status_id >= INVOICE_STATUS_VIEWED; return $this->invoice_status_id >= INVOICE_STATUS_VIEWED;
} }
public function isPaid()
{
return $this->invoice_status_id >= INVOICE_STATUS_PAID;
}
public function hidePrivateFields() public function hidePrivateFields()
{ {
$this->setVisible(['invoice_number', 'discount', 'po_number', 'invoice_date', 'due_date', 'terms', 'public_notes', 'amount', 'balance', 'invoice_items', 'client', 'tax_name', 'tax_rate', 'account', 'invoice_design_id']); $this->setVisible(['invoice_number', 'discount', 'po_number', 'invoice_date', 'due_date', 'terms', 'public_notes', 'amount', 'balance', 'invoice_items', 'client', 'tax_name', 'tax_rate', 'account', 'invoice_design_id']);

View File

@ -261,15 +261,13 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
{{ Former::text('new_last_name')->label(trans('texts.last_name')) }} {{ Former::text('new_last_name')->label(trans('texts.last_name')) }}
{{ Former::text('new_email')->label(trans('texts.email')) }} {{ Former::text('new_email')->label(trans('texts.email')) }}
{{ Former::password('new_password')->label(trans('texts.password')) }} {{ Former::password('new_password')->label(trans('texts.password')) }}
{{ Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms').' <a href="'.URL::to('terms').'" target="_blank">'.trans('texts.terms_of_service').'</a>') }} {{ Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.URL::to('terms').'" target="_blank">'.trans('texts.terms_of_service').'</a>'])) }}
{{ Former::close() }} {{ Former::close() }}
<center><div id="errorTaken" style="display:none">&nbsp;<br/>{{ trans('texts.email_taken') }}</div></center> <center><div id="errorTaken" style="display:none">&nbsp;<br/>{{ trans('texts.email_taken') }}</div></center>
<br/> <br/>
</div> </div>
<div style="padding-left:40px;padding-right:40px;display:none;min-height:130px" id="working"> <div style="padding-left:40px;padding-right:40px;display:none;min-height:130px" id="working">
@ -287,7 +285,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
<div class="modal-footer" id="signUpFooter" style="margin-top: 0px"> <div class="modal-footer" id="signUpFooter" style="margin-top: 0px">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }} <i class="glyphicon glyphicon-remove-circle"></i></button> <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.close') }} <i class="glyphicon glyphicon-remove-circle"></i></button>
<button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()" disabled>{{ trans('texts.save') }} <i class="glyphicon glyphicon-floppy-disk"></i></button> <button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()" disabled>{{ trans('texts.save') }} <i class="glyphicon glyphicon-floppy-disk"></i></button>
</div> </div>
</div> </div>

View File

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