1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Bug fixes

This commit is contained in:
Hillel Coren 2014-06-29 20:23:10 +03:00
parent 7d41fcd7ac
commit ada7246b2b
12 changed files with 565 additions and 26 deletions

View File

@ -8,9 +8,9 @@ Most online invoicing sites are expensive. They shouldn't be. The aim of this pr
[This guide](http://hillelcoren.com/invoice-ninja/self-hosting/) is the simplest way to setup the site. The high level instructions for setting up the site using Git are below but there's also a more detailed [setup guide](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/).
To connect follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files. To make changes locally you'll need to run `bowser install` to download the JavaScript dependencies and then `grunt` to build the JS and CSS files.
If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files.
To connect follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)

View File

@ -126,7 +126,7 @@ class InvoiceController extends \BaseController {
$invoice->is_pro = $client->account->isPro();
$data = array(
'hideHeader' => true,
'hideHeader' => $client->account->isPro() && Utils::isNinjaProd(),
'showBreadcrumbs' => false,
'invoice' => $invoice->hidePrivateFields(),
'invitation' => $invitation,

View File

@ -258,7 +258,7 @@ class PaymentController extends \BaseController
$data = [
'showBreadcrumbs' => false,
'hideHeader' => true,
'hideHeader' => $client->account->isPro() && Utils::isNinjaProd(),
'invitationKey' => $invitationKey,
'invoice' => $invoice,
'client' => $client,

20
app/lang/lt/pagination.php Executable file
View File

@ -0,0 +1,20 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
);

24
app/lang/lt/reminders.php Executable file
View File

@ -0,0 +1,24 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Password Reminder Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
"password" => "Passwords must be at least six characters and match the confirmation.",
"user" => "We can't find a user with that e-mail address.",
"token" => "This password reset token is invalid.",
"sent" => "Password reminder sent!",
);

402
app/lang/lt/texts.php Normal file
View File

@ -0,0 +1,402 @@
<?php
return array(
// client
'organization' => 'Įmonė',
'name' => 'Vardas',
'website' => 'Internetinis puslapis',
'work_phone' => 'Telefonas',
'address' => 'Adresas',
'address1' => 'Gatvė',
'address2' => 'Kabinetas',
'city' => 'Miestas',
'state' => 'Valstija',
'postal_code' => 'Pašto kodas',
'country_id' => 'Šalis',
'contacts' => 'Kontaktinė infromacija',
'first_name' => 'Vardas',
'last_name' => 'Pavardė',
'phone' => 'Telefonas',
'email' => 'El. paštas',
'additional_info' => 'Papidoma Info',
'payment_terms' => 'Apmokėjimo sąlygos',
'currency_id' => 'Valiuta',
'size_id' => 'Dydis',
'industry_id' => 'Veiklos sritis',
'private_notes' => 'Privatūs užrašai',
// invoice
'invoice' => 'Sąkaita faktūra',
'client' => 'Klientas',
'invoice_date' => 'Išrašymo data',
'due_date' => 'Apmokėjimo Data',
'invoice_number' => 'Serija ir Nr.',
'invoice_number_short' => 'Nr.',
'po_number' => 'PO Numeris',
'po_number_short' => 'PO Nr.',
'frequency_id' => 'Kaip dažnai',
'discount' => 'Nuolaida',
'taxes' => 'Mokesčiai',
'tax' => 'PVM',
'item' => 'Prekė',
'description' => 'Aprašymas',
'unit_cost' => 'Vnt. kaina',
'quantity' => 'Kiekis',
'line_total' => 'Suma',
'subtotal' => 'Suma viso',
'paid_to_date' => 'Apmokėta',
'balance_due' => 'Apmokėti',
'invoice_design_id' => 'Dizainas',
'terms' => 'Sąlygos',
'your_invoice' => 'Tavo sąskaitos',
'remove_contact' => 'Pašalinti kontaktą',
'add_contact' => 'Pridėti kontaktą',
'create_new_client' => 'Sukurti naują klientą',
'edit_client_details' => 'Redaguoti kliento informaciją',
'enable' => 'Įgalinti',
'learn_more' => 'Plačiau',
'manage_rates' => 'Redaguoti įkainius',
'note_to_client' => 'Pastaba klientui',
'invoice_terms' => 'Sąskaitos sąlygos',
'save_as_default_terms' => 'Išsaugoti sąlygas kaip standratrines',
'download_pdf' => 'Atsisiųsti PDF',
'pay_now' => 'Apmokėti dabar',
'save_invoice' => 'Išsaugoti sąskaitą',
'clone_invoice' => 'Kopijuoti sąskaitą',
'archive_invoice' => 'Archyvuoti sąskaitą',
'delete_invoice' => 'Ištrinti sąskaitą',
'email_invoice' => 'Išsiųsti el. paštu sąskaitą',
'enter_payment' => 'Įvesti apmokėjimą',
'tax_rates' => 'Mokesčių įkainiai',
'rate' => 'Įkainis',
'settings' => 'Nustatymai',
'enable_invoice_tax' => 'Įjungti <b>PVM mokesčius</b>',
'enable_line_item_tax' => 'Įjungti <b>PVM mokesčius sumai</b>',
// navigation
'dashboard' => 'Darbastalis',
'clients' => 'Klientai',
'invoices' => 'Sąskaitos',
'payments' => 'Mokėjimai',
'credits' => 'Kreditai',
'history' => 'Istorija',
'search' => 'Paieška',
'sign_up' => 'Prisijunk',
'guest' => 'Svečias',
'company_details' => 'Imonės informacija',
'online_payments' => 'Online mokėjimai',
'notifications' => 'Priminimai',
'import_export' => 'Importas/Eksportas',
'done' => 'Baigta',
'save' => 'Saugoti',
'create' => 'Kurti',
'upload' => 'Įkelti',
'import' => 'Importuoti',
'download' => 'Atsiųsti',
'cancel' => 'Atšaukti',
'close' => 'Uždaryti',
'provide_email' => 'Prašome pateikti galiojantį el. pašto adresą',
'powered_by' => 'Energija teikia',
'no_items' => 'Įrašų nėra',
// recurring invoices
'recurring_invoices' => 'Recurring Invoices',
'recurring_help' => '<p>Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually. </p>
<p>Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.</p>
<p>Examples of dynamic invoice variables:</p>
<ul>
<li>"Gym membership for the month of :MONTH" => "Gym membership for the month of July"</li>
<li>":YEAR+1 yearly subscription" => "2015 Yearly Subscription"</li>
<li>"Retainer payment for :QUARTER+1" => "Retainer payment for Q2"</li>
</ul>',
// dashboard
'in_total_revenue' => 'in total revenue',
'billed_client' => 'billed client',
'billed_clients' => 'billed clients',
'active_client' => 'active client',
'active_clients' => 'active clients',
'invoices_past_due' => 'Invoices Past Due',
'upcoming_invoices' => 'Upcoming invoices',
'average_invoice' => 'Average invoice',
// list pages
'archive' => 'Archive',
'delete' => 'Delete',
'archive_client' => 'Archive client',
'delete_client' => 'Delete client',
'archive_payment' => 'Archive payment',
'delete_payment' => 'Delete payment',
'archive_credit' => 'Archive credit',
'delete_credit' => 'Delete credit',
'show_archived_deleted' => 'Show archived/deleted',
'filter' => 'Filter',
'new_client' => 'New Client',
'new_invoice' => 'New Invoice',
'new_payment' => 'New Payment',
'new_credit' => 'New Credit',
'contact' => 'Contact',
'date_created' => 'Date Created',
'last_login' => 'Last Login',
'balance' => 'Balance',
'action' => 'Action',
'status' => 'Status',
'invoice_total' => 'Invoice Total',
'frequency' => 'Frequency',
'start_date' => 'Start Date',
'end_date' => 'End Date',
'transaction_reference' => 'Transaction Reference',
'method' => 'Method',
'payment_amount' => 'Payment Amount',
'payment_date' => 'Payment Date',
'credit_amount' => 'Credit Amount',
'credit_balance' => 'Credit Balance',
'credit_date' => 'Credit Date',
'empty_table' => 'No data available in table',
'select' => 'Select',
'edit_client' => 'Edit Client',
'edit_invoice' => 'Edit Invoice',
// client view page
'create_invoice' => 'Create Invoice',
'enter_credit' => 'Enter Credit',
'last_logged_in' => 'Last logged in',
'details' => 'Details',
'standing' => 'Standing',
'credit' => 'Credit',
'activity' => 'Activity',
'date' => 'Date',
'message' => 'Message',
'adjustment' => 'Adjustment',
'are_you_sure' => 'Are you sure?',
// payment pages
'payment_type_id' => 'Payment type',
'amount' => 'Amount',
// account/company pages
'work_email' => 'Email',
'language_id' => 'Language',
'timezone_id' => 'Timezone',
'date_format_id' => 'Date format',
'datetime_format_id' => 'Date/Time Format',
'users' => 'Users',
'localization' => 'Localization',
'remove_logo' => 'Remove logo',
'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended size: 200px width by 120px height',
'payment_gateway' => 'Payment Gateway',
'gateway_id' => 'Provider',
'email_notifications' => 'Email Notifications',
'email_sent' => 'Email me when an invoice is <b>sent</b>',
'email_viewed' => 'Email me when an invoice is <b>viewed</b>',
'email_paid' => 'Email me when an invoice is <b>paid</b>',
'site_updates' => 'Site Updates',
'custom_messages' => 'Custom Messages',
'default_invoice_terms' => 'Set default invoice terms',
'default_email_footer' => 'Set default email signature',
'import_clients' => 'Import Client Data',
'csv_file' => 'Select CSV file',
'export_clients' => 'Export Client Data',
'select_file' => 'Please select a file',
'first_row_headers' => 'Use first row as headers',
'column' => 'Column',
'sample' => 'Sample',
'import_to' => 'Import to',
'client_will_create' => 'client will be created',
'clients_will_create' => 'clients will be created',
// application messages
'created_client' => 'Successfully created client',
'created_clients' => 'Successfully created :count clients',
'updated_settings' => 'Successfully updated settings',
'removed_logo' => 'Successfully removed logo',
'sent_message' => 'Successfully sent message',
'invoice_error' => 'Please make sure to select a client and correct any errors',
'limit_clients' => 'Sorry, this will exceed the limit of :count clients',
'payment_error' => 'There was an error processing your payment. Please try again later.',
'registration_required' => 'Please sign up to email an invoice',
'confirmation_required' => 'Please confirm your email address',
'updated_client' => 'Successfully updated client',
'created_client' => 'Successfully created client',
'archived_client' => 'Successfully archived client',
'archived_clients' => 'Successfully archived :count clients',
'deleted_client' => 'Successfully deleted client',
'deleted_clients' => 'Successfully deleted :count clients',
'updated_invoice' => 'Successfully updated invoice',
'created_invoice' => 'Successfully created invoice',
'cloned_invoice' => 'Successfully cloned invoice',
'emailed_invoice' => 'Successfully emailed invoice',
'and_created_client' => 'and created client',
'archived_invoice' => 'Successfully archived invoice',
'archived_invoices' => 'Successfully archived :count invoices',
'deleted_invoice' => 'Successfully deleted invoice',
'deleted_invoices' => 'Successfully deleted :count invoices',
'created_payment' => 'Successfully created payment',
'archived_payment' => 'Successfully archived payment',
'archived_payments' => 'Successfully archived :count payments',
'deleted_payment' => 'Successfully deleted payment',
'deleted_payments' => 'Successfully deleted :count payments',
'applied_payment' => 'Successfully applied payment',
'created_credit' => 'Successfully created credit',
'archived_credit' => 'Successfully archived credit',
'archived_credits' => 'Successfully archived :count credits',
'deleted_credit' => 'Successfully deleted credit',
'deleted_credits' => 'Successfully deleted :count credits',
// Emails
'confirmation_subject' => 'Invoice Ninja Account Confirmation',
'confirmation_header' => 'Account Confirmation',
'confirmation_message' => 'Please access the link below to confirm your account.',
'invoice_subject' => 'New invoice from :account',
'invoice_message' => 'To view your invoice for :amount, click the link below.',
'payment_subject' => 'Payment Received',
'payment_message' => 'Thank you for your payment of :amount.',
'email_salutation' => 'Dear :name,',
'email_signature' => 'Regards,',
'email_from' => 'The InvoiceNinja Team',
'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:',
'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client',
'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client',
'notification_invoice_viewed_subject' => 'Invoice :invoice was viewed by :client',
'notification_invoice_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',
'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.',
'reset_password' => 'You can reset your account password by clicking the following link:',
'reset_password_footer' => 'If you did not request this password reset please email our support: ' . CONTACT_EMAIL,
// Payment page
'secure_payment' => 'Secure Payment',
'card_number' => 'Card number',
'expiration_month' => 'Expiration month',
'expiration_year' => 'Expiration year',
'cvv' => 'CVV',
// Security alerts
'confide' => [
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
'wrong_credentials' => 'Incorrect email or password.',
'confirmation' => 'Your account has been confirmed!',
'wrong_confirmation' => 'Wrong confirmation code.',
'password_forgot' => 'The information regarding password reset was sent to your email.',
'password_reset' => 'Your password has been changed successfully.',
'wrong_password_reset' => 'Invalid password. Try again',
],
// Pro Plan
'pro_plan' => [
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan',
'remove_logo_link' => 'Click here',
],
'logout' => 'Log Out',
'sign_up_to_save' => 'Sign up to save your work',
'agree_to_terms' =>'I agree to the Invoice Ninja :terms',
'terms_of_service' => 'Terms of Service',
'email_taken' => 'The email address is already registered',
'working' => 'Working',
'success' => 'Success',
'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.',
'password' => 'Password',
'pro_plan_product' => 'Pro Plan',
'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.',
'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!<p/>&nbsp;<br/>
<b>Next Steps</b><p/>A payable invoice has been sent to the email
address associated with your account. To unlock all of the awesome
Pro features, please follow the instructions on the invoice to pay
for a year of Pro-level invoicing.<p/>
Can\'t find the invoice? Need further assistance? We\'re happy to help
-- email us at contact@invoiceninja.com',
'unsaved_changes' => 'You have unsaved changes',
'custom_fields' => 'Custom fields',
'company_fields' => 'Company Fields',
'client_fields' => 'Client Fields',
'field_label' => 'Field Label',
'field_value' => 'Field Value',
'edit' => 'Edit',
'set_name' => 'Set your company name',
'view_as_recipient' => 'View as recipient',
// product management
'product_library' => 'Product Library',
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>fill in the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the product library</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan',
'advanced_settings' => 'Advanced Settings',
'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan',
'invoice_design' => 'Invoice Design',
'specify_colors' => 'Specify colors',
'specify_colors_label' => 'Select the colors used in the invoice',
'chart_builder' => 'Chart Builder',
'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!',
'go_pro' => 'Go Pro',
// Quotes
'quote' => 'Quote',
'quotes' => 'Quotes',
'quote_number' => 'Quote Number',
'quote_number_short' => 'Quote #',
'quote_date' => 'Quote Date',
'quote_total' => 'Quote Total',
'your_quote' => 'Your Quote',
'total' => 'Total',
'clone' => 'Clone',
'new_quote' => 'New Quote',
'create_quote' => 'Create Quote',
'edit_quote' => 'Edit Quote',
'archive_quote' => 'Archive Quote',
'delete_quote' => 'Delete Quote',
'save_quote' => 'Save Quote',
'email_quote' => 'Email Quote',
'clone_quote' => 'Clone Quote',
'convert_to_invoice' => 'Convert to Invoice',
'view_invoice' => 'View Invoice',
'view_client' => 'View Client',
'view_quote' => 'View Quote',
'updated_quote' => 'Successfully updated quote',
'created_quote' => 'Successfully created quote',
'cloned_quote' => 'Successfully cloned quote',
'emailed_quote' => 'Successfully emailed quote',
'archived_quote' => 'Successfully archived quote',
'archived_quotes' => 'Successfully archived :count quotes',
'deleted_quote' => 'Successfully deleted quote',
'deleted_quotes' => 'Successfully deleted :count quotes',
'converted_to_invoice' => 'Successfully converted quote to invoice',
'quote_subject' => 'New quote from :account',
'quote_message' => 'To view your quote for :amount, click the link below.',
'quote_link_message' => 'To view your client quote click the link below:',
'notification_quote_sent_subject' => 'Quote :invoice was sent to :client',
'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client',
'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.',
'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.',
'session_expired' => 'Your session has expired.',
);

102
app/lang/lt/validation.php Executable file
View File

@ -0,0 +1,102 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| such as the size rules. Feel free to tweak each of these messages.
|
*/
"accepted" => "The :attribute must be accepted.",
"active_url" => "The :attribute is not a valid URL.",
"after" => "The :attribute must be a date after :date.",
"alpha" => "The :attribute may only contain letters.",
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
"alpha_num" => "The :attribute may only contain letters and numbers.",
"array" => "The :attribute must be an array.",
"before" => "The :attribute must be a date before :date.",
"between" => array(
"numeric" => "The :attribute must be between :min - :max.",
"file" => "The :attribute must be between :min - :max kilobytes.",
"string" => "The :attribute must be between :min - :max characters.",
"array" => "The :attribute must have between :min - :max items.",
),
"confirmed" => "The :attribute confirmation does not match.",
"date" => "The :attribute is not a valid date.",
"date_format" => "The :attribute does not match the format :format.",
"different" => "The :attribute and :other must be different.",
"digits" => "The :attribute must be :digits digits.",
"digits_between" => "The :attribute must be between :min and :max digits.",
"email" => "The :attribute format is invalid.",
"exists" => "The selected :attribute is invalid.",
"image" => "The :attribute must be an image.",
"in" => "The selected :attribute is invalid.",
"integer" => "The :attribute must be an integer.",
"ip" => "The :attribute must be a valid IP address.",
"max" => array(
"numeric" => "The :attribute may not be greater than :max.",
"file" => "The :attribute may not be greater than :max kilobytes.",
"string" => "The :attribute may not be greater than :max characters.",
"array" => "The :attribute may not have more than :max items.",
),
"mimes" => "The :attribute must be a file of type: :values.",
"min" => array(
"numeric" => "The :attribute must be at least :min.",
"file" => "The :attribute must be at least :min kilobytes.",
"string" => "The :attribute must be at least :min characters.",
"array" => "The :attribute must have at least :min items.",
),
"not_in" => "The selected :attribute is invalid.",
"numeric" => "The :attribute must be a number.",
"regex" => "The :attribute format is invalid.",
"required" => "The :attribute field is required.",
"required_if" => "The :attribute field is required when :other is :value.",
"required_with" => "The :attribute field is required when :values is present.",
"required_without" => "The :attribute field is required when :values is not present.",
"same" => "The :attribute and :other must match.",
"size" => array(
"numeric" => "The :attribute must be :size.",
"file" => "The :attribute must be :size kilobytes.",
"string" => "The :attribute must be :size characters.",
"array" => "The :attribute must contain :size items.",
),
"unique" => "The :attribute has already been taken.",
"url" => "The :attribute format is invalid.",
"positive" => "The :attribute must be greater than zero.",
"has_credit" => "The client does not have enough credit.",
"notmasked" => "The values are masked",
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => array(),
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => array(),
);

View File

@ -217,7 +217,7 @@ class Account extends Eloquent
return $data;
}
public function isPro()
{
if (!Utils::isNinjaProd())

View File

@ -140,21 +140,12 @@ class Activity extends Eloquent
if (!$invoice->is_deleted)
{
if (!$invoice->is_quote)
{
$client = $invoice->client;
$client->balance = $client->balance - $invoice->balance;
$client->paid_to_date = $client->paid_to_date - ($invoice->amount - $invoice->balance);
$client->save();
}
$activity = Activity::getBlank();
$activity->invoice_id = $invoice->id;
$activity->client_id = $invoice->client_id;
$activity->activity_type_id = $invoice->is_quote ? ACTIVITY_TYPE_ARCHIVE_QUOTE : ACTIVITY_TYPE_ARCHIVE_INVOICE;
$activity->message = Utils::encodeActivity(Auth::user(), 'archived', $invoice);
$activity->balance = $invoice->client->balance;
$activity->adjustment = $invoice->is_quote ? 0 : $invoice->balance;
$activity->save();
}
@ -359,13 +350,7 @@ class Activity extends Eloquent
}
$client = $payment->client;
$client->balance = $client->balance + $payment->amount;
$client->paid_to_date = $client->paid_to_date - $payment->amount;
$client->save();
$invoice = $payment->invoice;
$invoice->balance = $invoice->balance + $payment->amount;
$invoice->save();
$activity = Activity::getBlank();
$activity->payment_id = $payment->id;
@ -374,7 +359,7 @@ class Activity extends Eloquent
$activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_PAYMENT;
$activity->message = Utils::encodeActivity(Auth::user(), 'archived payment');
$activity->balance = $client->balance;
$activity->adjustment = $payment->amount;
$activity->adjustment = 0;
$activity->save();
}

View File

@ -271,7 +271,7 @@ HTML::macro('menu_link', function($type) {
});
HTML::macro('image_data', function($imagePath) {
return 'data:image/jpeg;base64,' . base64_encode(file_get_contents($imagePath));
return 'data:image/jpeg;base64,' . base64_encode(file_get_contents(public_path().'/'.$imagePath));
});

View File

@ -84,7 +84,6 @@
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
@if (Auth::check() && !isset($hideHeader))
<ul class="nav navbar-nav" style="font-weight: bold">
{{ HTML::nav_link('dashboard', 'dashboard') }}
{{ HTML::menu_link('client') }}
@ -175,9 +174,6 @@
</ul>
</li>
</ul>
@else
<div style="height:60px"/>
@endif
</div><!-- /.navbar-collapse -->

View File

@ -96,6 +96,7 @@
return false;
}
</script>
@if (!isset($hideHeader) || !$hideHeader)
<div class="navbar-top navbar hidden-phone" style="margin-bottom:0px">
<div class="container">
<div class="navbar-inner">
@ -139,6 +140,15 @@
</div>
</div>
</div>
@else
<div class="navbar" style="margin-bottom:0px">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="https://www.invoiceninja.com/"><img src="{{ asset('images/invoiceninja-logo.png') }}"></a>
</div>
</div>
</div>
@endif
<div style="background-color:#211f1f; width:100%">
<div class="container">