1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Merge pull request #1 from hillelcoren/master

merge from master
This commit is contained in:
mindnervestech 2014-11-10 21:49:46 +05:30
commit 8f24b84762
43 changed files with 1264 additions and 912 deletions

View File

@ -6,36 +6,34 @@ module.exports = function(grunt) {
options: {
process: function(src, filepath) {
var basepath = filepath.substring(7, filepath.lastIndexOf('/') + 1);
console.log(filepath);
// Fix relative paths for css files
if(filepath.indexOf('.css', filepath.length - 4) !== -1) {
return src.replace(/(url\s*[\("']+)\s*([^'"\)]+)(['"\)]+;?)/gi, function(match, start, url, end, offset, string) {
if(url.indexOf('data:') === 0) {
// Skip data urls
return match;
} else if(url.indexOf('/') === 0) {
// Skip absolute urls
return match;
} else {
return start + basepath + url + end;
}
});
// Fix source maps locations
} else if(filepath.indexOf('.js', filepath.length - 4) !== -1) {
return src.replace(/(\/[*\/][#@]\s*sourceMappingURL=)([^\s]+)/gi, function(match, start, url, offset, string) {
if(url.indexOf('/') === 0) {
// Skip absolute urls
return match;
} else {
return start + basepath + url;
}
});
// Don't do anything for unknown file types
} else {
return src;

View File

@ -3,7 +3,7 @@
### [https://www.invoiceninja.com](https://www.invoiceninja.com)
If you'd like to use our code to sell your own invoicing app we offer a white-label affiliate program. We ask for 20% of revenue earned with a $100 sign up fee. Get in touch for more details.
If you'd like to use our code to sell your own invoicing app we offer a white-label affiliate program. We ask for 20% of revenue with a $100 sign up fee. Get in touch for more details.
### Introduction

View File

@ -13,7 +13,7 @@ return array(
|
*/
'debug' => true,
'debug' => false,
/*
|--------------------------------------------------------------------------

View File

@ -818,7 +818,8 @@ class AccountController extends \BaseController {
{
$account = Auth::user()->account;
$account->name = trim(Input::get('name'));
$account->vat_number = trim(Input::get('vat_number'));
$account->id_number = trim(Input::get('id_number'));
$account->vat_number = trim(Input::get('vat_number'));
$account->work_email = trim(Input::get('work_email'));
$account->work_phone = trim(Input::get('work_phone'));
$account->address1 = trim(Input::get('address1'));

View File

@ -199,7 +199,8 @@ class ClientController extends \BaseController {
}
$client->name = trim(Input::get('name'));
$client->vat_number = trim(Input::get('vat_number'));
$client->id_number = trim(Input::get('id_number'));
$client->vat_number = trim(Input::get('vat_number'));
$client->work_phone = trim(Input::get('work_phone'));
$client->custom_value1 = trim(Input::get('custom_value1'));
$client->custom_value2 = trim(Input::get('custom_value2'));
@ -212,7 +213,7 @@ class ClientController extends \BaseController {
$client->private_notes = trim(Input::get('private_notes'));
$client->size_id = Input::get('size_id') ? : null;
$client->industry_id = Input::get('industry_id') ? : null;
$client->currency_id = Input::get('currency_id') ? : 1;
$client->currency_id = Input::get('currency_id') ? : null;
$client->payment_terms = Input::get('payment_terms') ? : 0;
$client->website = trim(Input::get('website'));

View File

@ -19,7 +19,7 @@ class DashboardController extends \BaseController {
->groupBy('accounts.id')
->first();
$select = DB::raw('SUM(clients.paid_to_date) value');
$select = DB::raw('SUM(clients.paid_to_date) as value');
$totalIncome = DB::table('accounts')
->select($select)
@ -62,4 +62,4 @@ class DashboardController extends \BaseController {
return View::make('dashboard', $data);
}
}
}

View File

@ -153,6 +153,7 @@ class InvoiceController extends \BaseController {
$invoice->id = null;
$invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber($invoice->is_quote);
$invoice->balance = $invoice->amount;
$invoice->invoice_date = date_create()->format('Y-m-d');
$method = 'POST';
$url = "{$entityType}s";
}

View File

@ -35,11 +35,13 @@ class QuoteController extends \BaseController {
'columns'=>Utils::trans(['checkbox', 'quote_number', 'client', 'quote_date', 'quote_total', 'due_date', 'status', 'action'])
];
/*
if (Invoice::scope()->where('is_recurring', '=', true)->count() > 0)
{
$data['secEntityType'] = ENTITY_RECURRING_INVOICE;
$data['secColumns'] = Utils::trans(['checkbox', 'frequency', 'client', 'start_date', 'end_date', 'quote_total', 'action']);
}
*/
return View::make('list', $data);
}
@ -104,12 +106,14 @@ class QuoteController extends \BaseController {
public function bulk()
{
$action = Input::get('action');
$statusId = Input::get('statusId');
$ids = Input::get('id') ? Input::get('id') : Input::get('ids');
$count = $this->invoiceRepo->bulk($ids, $action);
$count = $this->invoiceRepo->bulk($ids, $action, $statusId);
if ($count > 0)
{
$message = Utils::pluralize("{$action}d_quote", $count);
$key = $action == 'mark' ? "updated_quote" : "{$action}d_quote";
$message = Utils::pluralize($key, $count);
Session::flash('message', $message);
}

View File

@ -279,7 +279,7 @@ class ConfideSetupUsersTable extends Migration {
$t->string('last_name')->nullable();
$t->string('email')->nullable();
$t->string('phone')->nullable();
$t->timestamp('last_login');
$t->timestamp('last_login')->nullable();
$t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');;

View File

@ -17,7 +17,7 @@ class AddCompanyVatNumber extends Migration {
$table->string('vat_number')->nullable();
});
Schema::table('clients', function($table)
Schema::table('clients', function($table)
{
$table->string('vat_number')->nullable();
});
@ -34,7 +34,7 @@ class AddCompanyVatNumber extends Migration {
{
$table->dropColumn('vat_number');
});
Schema::table('clients', function($table)
Schema::table('clients', function($table)
{
$table->dropColumn('vat_number');
});

View File

@ -422,10 +422,14 @@ class AddInvoiceDesignTable extends Migration {
var account = invoice.account;
var currencyId = client.currency_id;
layout.accountTop += 25;
layout.headerTop += 25;
layout.tableTop += 25;
if (invoice.image)
{
var left = layout.headerRight - invoice.imageWidth;
doc.addImage(invoice.image, 'JPEG', left, 30);
doc.addImage(invoice.image, 'JPEG', left, 50);
}
/* table header */

View File

@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddCompanyIdNumber extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('accounts', function($table)
{
$table->string('id_number')->nullable();
});
Schema::table('clients', function($table)
{
$table->string('id_number')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('accounts', function($table)
{
$table->dropColumn('id_number');
});
Schema::table('clients', function($table)
{
$table->dropColumn('id_number');
});
}
}

View File

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AllowNullClientCurrency extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('clients', function($table)
{
DB::statement('ALTER TABLE `clients` MODIFY `currency_id` INTEGER UNSIGNED NULL;');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}

View File

@ -5,7 +5,8 @@ return array(
// client
'organization' => 'Organisation',
'name' => 'Navn',
'vat_number' => 'CVR nummer',
'id_number' => 'SE/CVR nummer',
'vat_number' => 'SE/CVR nummer',
'website' => 'Webside',
'work_phone' => 'Telefon',
'address' => 'Adresse',
@ -444,4 +445,29 @@ return array(
'invoice_issued_to' => 'Faktura udstedt til',
'invalid_counter' => 'For at undgå mulige overlap, sæt venligst et faktura eller tilbuds nummer præfiks',
'mark_sent' => 'Markering sendt',
'gateway_help_1' => ':link to sign up for Authorize.net.',
'gateway_help_2' => ':link to sign up for Authorize.net.',
'gateway_help_17' => ':link to get your PayPal API signature.',
'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.',
'gateway_help_27' => ':link to sign up for TwoCheckout.',
'more_designs' => 'More designs',
'more_designs_title' => 'Additional Invoice Designs',
'more_designs_cloud_header' => 'Go Pro for more invoice designs',
'more_designs_cloud_text' => '',
'more_designs_self_host_header' => 'Get 6 more invoice designs for just $20',
'more_designs_self_host_text' => '',
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
);

View File

@ -450,5 +450,16 @@ return array(
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -462,7 +462,17 @@ return array(
'more_designs_self_host_text' => '',
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'id_number' => 'ID Number',
'vat_number' => 'VAT Number',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -2,289 +2,289 @@
return array(
// client
'organization' => 'Empresa',
'name' => 'Nombre', //Razon social-Colombia,
'website' => 'Sitio Web',
'work_phone' => 'Teléfono',
'address' => 'Dirección',
'address1' => 'Calle',
'address2' => 'Bloq/Pta',
'city' => 'Ciudad',
'state' => 'Región/Provincia', //Departamento-Colombia, Comarca-Panama
'postal_code' => 'Código Postal',
'country_id' => 'País',
'contacts' => 'Contactos',
'first_name' => 'Nombres',
'last_name' => 'Apellidos',
'phone' => 'Teléfono',
'email' => 'Email',
'additional_info' => 'Información adicional',
'payment_terms' => 'Plazos de pago', //
'currency_id' => 'Divisa',
'size_id' => 'Tamaño',
'industry_id' => 'Industria',
'private_notes' => 'Notas Privadas',
// client
'organization' => 'Empresa',
'name' => 'Nombre', //Razon social-Colombia,
'website' => 'Sitio Web',
'work_phone' => 'Teléfono',
'address' => 'Dirección',
'address1' => 'Calle',
'address2' => 'Bloq/Pta',
'city' => 'Ciudad',
'state' => 'Región/Provincia', //Departamento-Colombia, Comarca-Panama
'postal_code' => 'Código Postal',
'country_id' => 'País',
'contacts' => 'Contactos',
'first_name' => 'Nombres',
'last_name' => 'Apellidos',
'phone' => 'Teléfono',
'email' => 'Email',
'additional_info' => 'Información adicional',
'payment_terms' => 'Plazos de pago', //
'currency_id' => 'Divisa',
'size_id' => 'Tamaño',
'industry_id' => 'Industria',
'private_notes' => 'Notas Privadas',
// invoice
'invoice' => 'Factura de venta', //Factura de Venta-Colombia
'client' => 'Cliente',
'invoice_date' => 'Fecha de factura',
'due_date' => 'Fecha de pago',
'invoice_number' => 'Número de Factura',
'invoice_number_short' => 'Factura #',
'po_number' => 'Apartado de correo',
'po_number_short' => 'Apdo.',
'frequency_id' => 'Frecuencia',
'discount' => 'Descuento',
'taxes' => 'Impuestos',
'tax' => 'Impuesto', //IVA for almost all latinamerica, ISV-Honduras, ITBMS-Panama, IV-Costa Rica, ITBIS- Republica Dominicana, IVU-Puerto Rico
'item' => 'Concepto',
'description' => 'Descripción',
'unit_cost' => 'Coste unitario',
'quantity' => 'Cantidad',
'line_total' => 'Total',
'subtotal' => 'Subtotal',
'paid_to_date' => 'Pagado',
'balance_due' => 'Pendiente',
'invoice_design_id' => 'Diseño',
'terms' => 'Términos',
'your_invoice' => 'Tu factura',
'remove_contact' => 'Eliminar contacto',
'add_contact' => 'Añadir contacto',
'create_new_client' => 'Crear nuevo cliente',
'edit_client_details' => 'Editar detalles del cliente',
'enable' => 'Activar',
'learn_more' => 'Aprender más',
'manage_rates' => 'Gestionar tarifas',
'note_to_client' => 'Nota para el cliente',
'invoice_terms' => 'Términos de facturación',
'save_as_default_terms' => 'Guardar como términos por defecto',
'download_pdf' => 'Descargar PDF',
'pay_now' => 'Pagar ahora',
'save_invoice' => 'Guardar factura',
'clone_invoice' => 'Clonar factura',
'archive_invoice' => 'Archivar factura',
'delete_invoice' => 'Eliminar factura',
'email_invoice' => 'Enviar factura por correo',
'enter_payment' => 'Agregar pago',
'tax_rates' => 'Tasas de impuesto',
'rate' => 'Tasas',
'settings' => 'Configuración',
'enable_invoice_tax' => 'Activar impuesto <b>para la factura</b>',
'enable_line_item_tax' => 'Activar impuesto <b>por concepto</b>',
// invoice
'invoice' => 'Factura de venta', //Factura de Venta-Colombia
'client' => 'Cliente',
'invoice_date' => 'Fecha de factura',
'due_date' => 'Fecha de pago',
'invoice_number' => 'Número de Factura',
'invoice_number_short' => 'Factura #',
'po_number' => 'Apartado de correo',
'po_number_short' => 'Apdo.',
'frequency_id' => 'Frecuencia',
'discount' => 'Descuento',
'taxes' => 'Impuestos',
'tax' => 'Impuesto', //IVA for almost all latinamerica, ISV-Honduras, ITBMS-Panama, IV-Costa Rica, ITBIS- Republica Dominicana, IVU-Puerto Rico
'item' => 'Concepto',
'description' => 'Descripción',
'unit_cost' => 'Coste unitario',
'quantity' => 'Cantidad',
'line_total' => 'Total',
'subtotal' => 'Subtotal',
'paid_to_date' => 'Pagado',
'balance_due' => 'Pendiente',
'invoice_design_id' => 'Diseño',
'terms' => 'Términos',
'your_invoice' => 'Tu factura',
'remove_contact' => 'Eliminar contacto',
'add_contact' => 'Añadir contacto',
'create_new_client' => 'Crear nuevo cliente',
'edit_client_details' => 'Editar detalles del cliente',
'enable' => 'Activar',
'learn_more' => 'Aprender más',
'manage_rates' => 'Gestionar tarifas',
'note_to_client' => 'Nota para el cliente',
'invoice_terms' => 'Términos de facturación',
'save_as_default_terms' => 'Guardar como términos por defecto',
'download_pdf' => 'Descargar PDF',
'pay_now' => 'Pagar ahora',
'save_invoice' => 'Guardar factura',
'clone_invoice' => 'Clonar factura',
'archive_invoice' => 'Archivar factura',
'delete_invoice' => 'Eliminar factura',
'email_invoice' => 'Enviar factura por correo',
'enter_payment' => 'Agregar pago',
'tax_rates' => 'Tasas de impuesto',
'rate' => 'Tasas',
'settings' => 'Configuración',
'enable_invoice_tax' => 'Activar impuesto <b>para la factura</b>',
'enable_line_item_tax' => 'Activar impuesto <b>por concepto</b>',
// navigation
'dashboard' => 'Inicio',
'clients' => 'Clientes',
'invoices' => 'Facturas',
'payments' => 'Pagos',
'credits' => 'Créditos',
'history' => 'Historial',
'search' => 'Búsqueda',
'sign_up' => 'registrate',
'guest' => 'invitado',
'company_details' => 'Detalles de la empresa',
'online_payments' => 'Pagos en linea',
'notifications' => 'Notificaciones',
'import_export' => 'Importar/Exportar',
'done' => 'Hecho',
'save' => 'Guardar',
'create' => 'Crear',
'upload' => 'Subir',
'import' => 'Importar',
'download' => 'Descargar',
'cancel' => 'Cancelar',
'close' => 'Cerrar',
'provide_email' => 'Por favor facilita una dirección de correo válida.',
'powered_by' => 'Plataforma por ',
'no_items' => 'No hay data',
// navigation
'dashboard' => 'Inicio',
'clients' => 'Clientes',
'invoices' => 'Facturas',
'payments' => 'Pagos',
'credits' => 'Créditos',
'history' => 'Historial',
'search' => 'Búsqueda',
'sign_up' => 'registrate',
'guest' => 'invitado',
'company_details' => 'Detalles de la empresa',
'online_payments' => 'Pagos en linea',
'notifications' => 'Notificaciones',
'import_export' => 'Importar/Exportar',
'done' => 'Hecho',
'save' => 'Guardar',
'create' => 'Crear',
'upload' => 'Subir',
'import' => 'Importar',
'download' => 'Descargar',
'cancel' => 'Cancelar',
'close' => 'Cerrar',
'provide_email' => 'Por favor facilita una dirección de correo válida.',
'powered_by' => 'Plataforma por ',
'no_items' => 'No hay data',
// recurring invoices
'recurring_invoices' => 'Facturas recurrentes',
'recurring_help' => '<p>Enviar facturas automáticamente a clientes semanalmente, bi-mensualmente, mensualmente, trimestral o anualmente. </p>
<p>Uso :MONTH, :QUARTER or :YEAR para fechas dinámicas. Matemáticas básicas también funcionan bien. Por ejemplo: :MONTH-1.</p>
<p>Ejemplos de variables dinámicas de factura:</p>
<ul>
<li>"Afiliación de gimnasio para el mes de:MONTH" => Afiliación de gimnasio para el mes de julio"</li>
<li>":YEAR+1 suscripción anual" => "2015 suscripción anual"</li>
<li>"Retainer payment for :QUARTER+1" => "Pago anticipo de pagos para T2"</li>
</ul>',
// recurring invoices
'recurring_invoices' => 'Facturas recurrentes',
'recurring_help' => '<p>Enviar facturas automáticamente a clientes semanalmente, bi-mensualmente, mensualmente, trimestral o anualmente. </p>
<p>Uso :MONTH, :QUARTER or :YEAR para fechas dinámicas. Matemáticas básicas también funcionan bien. Por ejemplo: :MONTH-1.</p>
<p>Ejemplos de variables dinámicas de factura:</p>
<ul>
<li>"Afiliación de gimnasio para el mes de:MONTH" => Afiliación de gimnasio para el mes de julio"</li>
<li>":YEAR+1 suscripción anual" => "2015 suscripción anual"</li>
<li>"Retainer payment for :QUARTER+1" => "Pago anticipo de pagos para T2"</li>
</ul>',
// dashboard
'in_total_revenue' => 'ingreso total',
'billed_client' => 'cliente facturado',
'billed_clients' => 'clientes facturados',
'active_client' => 'cliente activo',
'active_clients' => 'clientes activos',
'invoices_past_due' => 'Facturas vencidas',
'upcoming_invoices' => 'Próximas facturas',
'average_invoice' => 'Promedio de facturación',
// dashboard
'in_total_revenue' => 'ingreso total',
'billed_client' => 'cliente facturado',
'billed_clients' => 'clientes facturados',
'active_client' => 'cliente activo',
'active_clients' => 'clientes activos',
'invoices_past_due' => 'Facturas vencidas',
'upcoming_invoices' => 'Próximas facturas',
'average_invoice' => 'Promedio de facturación',
// list pages
'archive' => 'Archivar',
'delete' => 'Eliminar',
'archive_client' => 'Archivar cliente',
'delete_client' => 'Eliminar cliente',
'archive_payment' => 'Archivar pago',
'delete_payment' => 'Eliminar pago',
'archive_credit' => 'Archivar crédito',
'delete_credit' => 'Eliminar crédito',
'show_archived_deleted' => 'Mostrar archivados/eliminados',
'filter' => 'Filtrar',
'new_client' => 'Nuevo cliente',
'new_invoice' => 'Nueva factura',
'new_payment' => 'Nuevo pago',
'new_credit' => 'Nuevo crédito',
'contact' => 'Contacto',
'date_created' => 'Fecha de creación',
'last_login' => 'Último acceso',
'balance' => 'Balance',
'action' => 'Acción',
'status' => 'Estado',
'invoice_total' => 'Total facturado',
'frequency' => 'Frequencia',
'start_date' => 'Fecha de inicio',
'end_date' => 'Fecha de finalización',
'transaction_reference' => 'Referencia de transacción',
'method' => 'Método',
'payment_amount' => 'Valor del pago',
'payment_date' => 'Fecha de Pago',
'credit_amount' => 'Cantidad de Crédito',
'credit_balance' => 'Balance de Crédito',
'credit_date' => 'Fecha de Crédito',
'empty_table' => 'Tabla vacía',
'select' => 'Seleccionar',
'edit_client' => 'Editar Cliente',
'edit_invoice' => 'Editar Factura',
// list pages
'archive' => 'Archivar',
'delete' => 'Eliminar',
'archive_client' => 'Archivar cliente',
'delete_client' => 'Eliminar cliente',
'archive_payment' => 'Archivar pago',
'delete_payment' => 'Eliminar pago',
'archive_credit' => 'Archivar crédito',
'delete_credit' => 'Eliminar crédito',
'show_archived_deleted' => 'Mostrar archivados/eliminados',
'filter' => 'Filtrar',
'new_client' => 'Nuevo cliente',
'new_invoice' => 'Nueva factura',
'new_payment' => 'Nuevo pago',
'new_credit' => 'Nuevo crédito',
'contact' => 'Contacto',
'date_created' => 'Fecha de creación',
'last_login' => 'Último acceso',
'balance' => 'Balance',
'action' => 'Acción',
'status' => 'Estado',
'invoice_total' => 'Total facturado',
'frequency' => 'Frequencia',
'start_date' => 'Fecha de inicio',
'end_date' => 'Fecha de finalización',
'transaction_reference' => 'Referencia de transacción',
'method' => 'Método',
'payment_amount' => 'Valor del pago',
'payment_date' => 'Fecha de Pago',
'credit_amount' => 'Cantidad de Crédito',
'credit_balance' => 'Balance de Crédito',
'credit_date' => 'Fecha de Crédito',
'empty_table' => 'Tabla vacía',
'select' => 'Seleccionar',
'edit_client' => 'Editar Cliente',
'edit_invoice' => 'Editar Factura',
// client view page
'create_invoice' => 'Crear Factura',
'enter_credit' => 'Agregar Crédito',
'last_logged_in' => 'Último inicio de sesión',
'details' => 'Detalles',
'standing' => 'Standing', //What is this for, context of it's use
'credit' => 'Crédito',
'activity' => 'Actividad',
'date' => 'Fecha',
'message' => 'Mensaje',
'adjustment' => 'Ajustes',
'are_you_sure' => '¿Estás seguro?',
// client view page
'create_invoice' => 'Crear Factura',
'enter_credit' => 'Agregar Crédito',
'last_logged_in' => 'Último inicio de sesión',
'details' => 'Detalles',
'standing' => 'Standing', //What is this for, context of it's use
'credit' => 'Crédito',
'activity' => 'Actividad',
'date' => 'Fecha',
'message' => 'Mensaje',
'adjustment' => 'Ajustes',
'are_you_sure' => '¿Estás seguro?',
// payment pages
'payment_type_id' => 'Tipo de pago',
'amount' => 'Cantidad',
// payment pages
'payment_type_id' => 'Tipo de pago',
'amount' => 'Cantidad',
// account/company pages
'work_email' => 'Correo electrónico de la empresa',
'language_id' => 'Idioma',
'timezone_id' => 'Zona horaria',
'date_format_id' => 'Formato de fecha',
'datetime_format_id' => 'Format de fecha/hora',
'users' => 'Usuarios',
'localization' => 'Localización',
'remove_logo' => 'Eliminar logo',
'logo_help' => 'Formatos aceptados: JPEG, GIF y PNG. Altura recomendada: 120px',
'payment_gateway' => 'Pasarela de pago',
'gateway_id' => 'Proveedor',
'email_notifications' => 'Notificaciones de email',
'email_sent' => 'Avísame por email cuando una factura <b>se envía</b>',
'email_viewed' => 'Avísame por email cuando una factura <b>se visualiza</b>',
'email_paid' => 'Avísame por email cuando una factura <b>se paga</b>',
'site_updates' => 'Actualizaciones del sitio',
'custom_messages' => 'Mensajes a medida',
'default_invoice_terms' => 'Configurar términos de factura por defecto',
'default_email_footer' => 'Configurar firma de email por defecto',
'import_clients' => 'Importar datos del cliente',
'csv_file' => 'Seleccionar archivo CSV',
'export_clients' => 'Exportar datos del cliente',
'select_file' => 'Seleccionar archivo',
'first_row_headers' => 'Usar la primera fila como encabezados',
'column' => 'Columna',
'sample' => 'Ejemplo',
'import_to' => 'Importar a',
'client_will_create' => 'cliente se creará', //What is this for, context of it's use
'clients_will_create' => 'clientes se crearan', //What is this for, context of it's use
// account/company pages
'work_email' => 'Correo electrónico de la empresa',
'language_id' => 'Idioma',
'timezone_id' => 'Zona horaria',
'date_format_id' => 'Formato de fecha',
'datetime_format_id' => 'Format de fecha/hora',
'users' => 'Usuarios',
'localization' => 'Localización',
'remove_logo' => 'Eliminar logo',
'logo_help' => 'Formatos aceptados: JPEG, GIF y PNG. Altura recomendada: 120px',
'payment_gateway' => 'Pasarela de pago',
'gateway_id' => 'Proveedor',
'email_notifications' => 'Notificaciones de email',
'email_sent' => 'Avísame por email cuando una factura <b>se envía</b>',
'email_viewed' => 'Avísame por email cuando una factura <b>se visualiza</b>',
'email_paid' => 'Avísame por email cuando una factura <b>se paga</b>',
'site_updates' => 'Actualizaciones del sitio',
'custom_messages' => 'Mensajes a medida',
'default_invoice_terms' => 'Configurar términos de factura por defecto',
'default_email_footer' => 'Configurar firma de email por defecto',
'import_clients' => 'Importar datos del cliente',
'csv_file' => 'Seleccionar archivo CSV',
'export_clients' => 'Exportar datos del cliente',
'select_file' => 'Seleccionar archivo',
'first_row_headers' => 'Usar la primera fila como encabezados',
'column' => 'Columna',
'sample' => 'Ejemplo',
'import_to' => 'Importar a',
'client_will_create' => 'cliente se creará', //What is this for, context of it's use
'clients_will_create' => 'clientes se crearan', //What is this for, context of it's use
// application messages
'created_client' => 'cliente creado con éxito',
'created_clients' => ':count clientes creados con éxito',
'updated_settings' => 'Configuración actualizada con éxito',
'removed_logo' => 'Logo eliminado con éxito',
'sent_message' => 'Mensaje enviado con éxito',
'invoice_error' => 'Seleccionar cliente y corregir errores.',
'limit_clients' => 'Lo sentimos, se ha pasado del límite de :count clientes',
'payment_error' => 'Ha habido un error en el proceso de tu pago. Inténtalo de nuevo más tarde.',
'registration_required' => 'Inscríbete para enviar una factura',
'confirmation_required' => 'Por favor confirma tu dirección de correo electrónico',
'updated_client' => 'Cliente actualizado con éxito',
'created_client' => 'Cliente creado con éxito',
'archived_client' => 'Cliente archivado con éxito',
'archived_clients' => ':count clientes archivados con éxito',
'deleted_client' => 'Cliente eliminado con éxito',
'deleted_clients' => ':count clientes eliminados con éxito',
'updated_invoice' => 'Factura actualizada con éxito',
'created_invoice' => 'Factura creada con éxito',
'cloned_invoice' => 'Factura clonada con éxito',
'emailed_invoice' => 'Factura enviada con éxito',
'and_created_client' => 'y cliente creado ',
'archived_invoice' => 'Factura archivada con éxito',
'archived_invoices' => ':count facturas archivados con éxito',
'deleted_invoice' => 'Factura eliminada con éxito',
'deleted_invoices' => ':count facturas eliminadas con éxito',
'created_payment' => 'Pago creado con éxito',
'archived_payment' => 'Pago archivado con éxito',
'archived_payments' => ':count pagos archivados con éxito',
'deleted_payment' => 'Pago eliminado con éxito',
'deleted_payments' => ':count pagos eliminados con éxito',
'applied_payment' => 'Pago aplicado con éxito',
'created_credit' => 'Crédito creado con éxito',
'archived_credit' => 'Crédito archivado con éxito',
'archived_credits' => ':count creditos archivados con éxito',
'deleted_credit' => 'Créditos eliminados con éxito',
'deleted_credits' => ':count creditos eliminados con éxito',
// Emails
'confirmation_subject' => 'Corfimación de tu cuenta en Invoice Ninja',
'confirmation_header' => 'Confirmación de Cuenta',
'confirmation_message' => 'Por favor, haz clic en el enlace abajo para confirmar tu cuenta.',
'invoice_subject' => 'Nueva factura de :account',
'invoice_message' => 'Para visualizar tu factura por el valor de :amount, haz click en el enlace abajo.',
'payment_subject' => 'Pago recibido',
'payment_message' => 'Gracias por tu pago por valor de :amount.',
'email_salutation' => 'Estimado :name,',
'email_signature' => 'Un saludo cordial,',
'email_from' => 'El equipo de Invoice Ninja ',
'user_email_footer' => 'Para ajustar la configuración de las notificaciones de tu email, visita '.SITE_URL.'/company/notifications',
'invoice_link_message' => 'Para visualizar la factura de cliente, haz clic en el enlace abajo:',
'notification_invoice_paid_subject' => 'La factura :invoice ha sido pagada por el cliente :client',
'notification_invoice_sent_subject' => 'La factura :invoice ha sido enviada a el cliente :client',
'notification_invoice_viewed_subject' => 'La factura :invoice ha sido visualizado por el cliente:client',
'notification_invoice_paid' => 'Un pago por valor de :amount se ha realizado por el cliente :client a la factura :invoice.',
'notification_invoice_sent' => 'La factura :invoice por valor de :amount fue enviada al cliente :cliente.',
'notification_invoice_viewed' => 'La factura :invoice por valor de :amount fue visualizada por el cliente :client.',
'reset_password' => 'Puedes reconfigurar la contraseña de tu cuenta haciendo clic en el siguiente enlace:',
'reset_password_footer' => 'Si no has solicitado un cambio de contraseña, por favor contactate con nosostros: ' . CONTACT_EMAIL,
// application messages
'created_client' => 'cliente creado con éxito',
'created_clients' => ':count clientes creados con éxito',
'updated_settings' => 'Configuración actualizada con éxito',
'removed_logo' => 'Logo eliminado con éxito',
'sent_message' => 'Mensaje enviado con éxito',
'invoice_error' => 'Seleccionar cliente y corregir errores.',
'limit_clients' => 'Lo sentimos, se ha pasado del límite de :count clientes',
'payment_error' => 'Ha habido un error en el proceso de tu pago. Inténtalo de nuevo más tarde.',
'registration_required' => 'Inscríbete para enviar una factura',
'confirmation_required' => 'Por favor confirma tu dirección de correo electrónico',
'updated_client' => 'Cliente actualizado con éxito',
'created_client' => 'Cliente creado con éxito',
'archived_client' => 'Cliente archivado con éxito',
'archived_clients' => ':count clientes archivados con éxito',
'deleted_client' => 'Cliente eliminado con éxito',
'deleted_clients' => ':count clientes eliminados con éxito',
'updated_invoice' => 'Factura actualizada con éxito',
'created_invoice' => 'Factura creada con éxito',
'cloned_invoice' => 'Factura clonada con éxito',
'emailed_invoice' => 'Factura enviada con éxito',
'and_created_client' => 'y cliente creado ',
'archived_invoice' => 'Factura archivada con éxito',
'archived_invoices' => ':count facturas archivados con éxito',
'deleted_invoice' => 'Factura eliminada con éxito',
'deleted_invoices' => ':count facturas eliminadas con éxito',
'created_payment' => 'Pago creado con éxito',
'archived_payment' => 'Pago archivado con éxito',
'archived_payments' => ':count pagos archivados con éxito',
'deleted_payment' => 'Pago eliminado con éxito',
'deleted_payments' => ':count pagos eliminados con éxito',
'applied_payment' => 'Pago aplicado con éxito',
'created_credit' => 'Crédito creado con éxito',
'archived_credit' => 'Crédito archivado con éxito',
'archived_credits' => ':count creditos archivados con éxito',
'deleted_credit' => 'Créditos eliminados con éxito',
'deleted_credits' => ':count creditos eliminados con éxito',
// Emails
'confirmation_subject' => 'Corfimación de tu cuenta en Invoice Ninja',
'confirmation_header' => 'Confirmación de Cuenta',
'confirmation_message' => 'Por favor, haz clic en el enlace abajo para confirmar tu cuenta.',
'invoice_subject' => 'Nueva factura de :account',
'invoice_message' => 'Para visualizar tu factura por el valor de :amount, haz click en el enlace abajo.',
'payment_subject' => 'Pago recibido',
'payment_message' => 'Gracias por tu pago por valor de :amount.',
'email_salutation' => 'Estimado :name,',
'email_signature' => 'Un saludo cordial,',
'email_from' => 'El equipo de Invoice Ninja ',
'user_email_footer' => 'Para ajustar la configuración de las notificaciones de tu email, visita '.SITE_URL.'/company/notifications',
'invoice_link_message' => 'Para visualizar la factura de cliente, haz clic en el enlace abajo:',
'notification_invoice_paid_subject' => 'La factura :invoice ha sido pagada por el cliente :client',
'notification_invoice_sent_subject' => 'La factura :invoice ha sido enviada a el cliente :client',
'notification_invoice_viewed_subject' => 'La factura :invoice ha sido visualizado por el cliente:client',
'notification_invoice_paid' => 'Un pago por valor de :amount se ha realizado por el cliente :client a la factura :invoice.',
'notification_invoice_sent' => 'La factura :invoice por valor de :amount fue enviada al cliente :cliente.',
'notification_invoice_viewed' => 'La factura :invoice por valor de :amount fue visualizada por el cliente :client.',
'reset_password' => 'Puedes reconfigurar la contraseña de tu cuenta haciendo clic en el siguiente enlace:',
'reset_password_footer' => 'Si no has solicitado un cambio de contraseña, por favor contactate con nosostros: ' . CONTACT_EMAIL,
// Payment page
'secure_payment' => 'Pago seguro',
'card_number' => 'Número de tarjeta',
'expiration_month' => 'Mes de caducidad',
'expiration_year' => 'Año de caducidad',
'cvv' => 'CVV',
// Payment page
'secure_payment' => 'Pago seguro',
'card_number' => 'Número de tarjeta',
'expiration_month' => 'Mes de caducidad',
'expiration_year' => 'Año de caducidad',
'cvv' => 'CVV',
// Security alerts
'confide' => array(
'too_many_attempts' => 'Demasiados intentos fallidos. Inténtalo de nuevo en un par de minutos.',
'wrong_credentials' => 'Contraseña o email incorrecto.',
'confirmation' => '¡Tu cuenta se ha confirmado!',
'wrong_confirmation' => 'Código de confirmación incorrecto.',
'password_forgot' => 'La información sobre el cambio de tu contraseña se ha enviado a tu dirección de correo electrónico.',
'password_reset' => 'Tu contraseña se ha cambiado con éxito.',
'wrong_password_reset' => 'Contraseña no válida. Inténtalo de nuevo',
),
// Security alerts
'confide' => array(
'too_many_attempts' => 'Demasiados intentos fallidos. Inténtalo de nuevo en un par de minutos.',
'wrong_credentials' => 'Contraseña o email incorrecto.',
'confirmation' => '¡Tu cuenta se ha confirmado!',
'wrong_confirmation' => 'Código de confirmación incorrecto.',
'password_forgot' => 'La información sobre el cambio de tu contraseña se ha enviado a tu dirección de correo electrónico.',
'password_reset' => 'Tu contraseña se ha cambiado con éxito.',
'wrong_password_reset' => 'Contraseña no válida. Inténtalo de nuevo',
),
// Pro Plan
'pro_plan' => [
// Pro Plan
'pro_plan' => [
'remove_logo' => ':link haz click para eliminar el logo de Invoice Ninja', //Maybe incorrect for the context
'remove_logo_link' => 'Haz clic aquí',
],
@ -311,7 +311,7 @@ return array(
'edit' => 'Editar',
'view_as_recipient' => 'Ver como destinitario',
// product management
// product management
'product_library' => 'Inventario de productos',
'product' => 'Producto',
'products' => 'Productos',
@ -335,7 +335,7 @@ return array(
'ninja_email_footer' => 'Usa :site para facturar a tus clientes y recibir pagos de forma gratuita!',
'go_pro' => 'Hazte Pro',
// Quotes
// Quotes
'quote' => 'Cotización',
'quotes' => 'Cotizaciones',
'quote_number' => 'Numero de cotización',
@ -344,90 +344,101 @@ return array(
'quote_total' => 'Total cotizado',
'your_quote' => 'Tu cotización',
'total' => 'Total',
'clone' => 'Clon', //Whats the context for this one
'new_quote' => 'Nueva cotización',
'create_quote' => 'Crear Cotización',
'edit_quote' => 'Editar Cotización',
'archive_quote' => 'Archivar Cotización',
'delete_quote' => 'Eliminar Cotización',
'save_quote' => 'Guardar Cotización',
'email_quote' => 'Enviar Cotización',
'clone_quote' => 'Clonar Cotización',
'convert_to_invoice' => 'Convertir a Factura',
'view_invoice' => 'Ver Factura',
'view_quote' => 'Ver Cotización',
'view_client' => 'Ver Cliente',
'updated_quote' => 'Cotización actualizada con éxito',
'created_quote' => 'Cotización creada con éxito',
'cloned_quote' => 'Cotización clonada con éxito',
'emailed_quote' => 'Cotización enviada con éxito',
'archived_quote' => 'Cotización archivada con éxito',
'archived_quotes' => ':count cotizaciones archivadas con exito',
'deleted_quote' => 'Cotizaciónes eliminadas con éxito',
'deleted_quotes' => ':count cotizaciones eliminadas con exito',
'converted_to_invoice' => 'Cotización convertida a factura con éxito',
'quote_subject' => 'Nueva cotización de :account',
'quote_message' => 'Para visualizar la cotización por valor de :amount, haz click en el enlace abajo.',
'quote_link_message' => 'Para visualizar tu cotización haz click en el enlace abajo:',
'notification_quote_sent_subject' => 'Cotización :invoice enviada a el cliente :client',
'notification_quote_viewed_subject' => 'Cotización :invoice visualizada por el cliente :client',
'notification_quote_sent' => 'La cotización :invoice por un valor de :amount, ha sido enviada al cliente :client.',
'notification_quote_viewed' => 'La cotizacion :invoice por un valor de :amount ha sido visualizada por el cliente :client.',
'session_expired' => 'Tu sesión ha caducado.',
'invoice_fields' => 'Campos de factura',
'invoice_options' => 'Opciones de factura',
'hide_quantity' => 'Ocultar cantidad',
'hide_quantity_help' => 'Si las cantidades de tus partidas siempre son 1, entonces puedes organizar tus facturas mejor al no mostrar este campo.',
'hide_paid_to_date' => 'Ocultar valor pagado a la fecha',
'hide_paid_to_date_help' => 'Solo mostrar la opción “Pagado a la fecha” en tus facturas en cuanto se ha recibido un pago.',
'charge_taxes' => 'Cargar impuestos',
'user_management' => 'Gestión de usario',
'add_user' => 'Añadir usario',
'send_invite' => 'Enviar invitación', //Context for its use
'sent_invite' => 'Invitación enviada con éxito',
'updated_user' => 'Usario actualizado con éxito',
'invitation_message' => ':invitor te ha invitado a unirte a su cuenta en Invoice Ninja.',
'register_to_add_user' => 'Regístrate para añadir usarios',
'user_state' => 'Estado',
'edit_user' => 'Editar Usario',
'delete_user' => 'Eliminar Usario',
'active' => 'Activar',
'pending' => 'Pendiente',
'deleted_user' => 'Usario eliminado con éxito',
'limit_users' => 'Lo sentimos, esta acción excederá el límite de ' . MAX_NUM_USERS . ' usarios',
'confirm_email_invoice' => '¿Estás seguro que quieres enviar esta factura?',
'confirm_email_quote' => '¿Estás seguro que quieres enviar esta cotización?',
'confirm_recurring_email_invoice' => 'Se ha marcado esta factura como recurrente, estás seguro que quieres enviar esta factura?',
'cancel_account' => 'Cancelar Cuenta',
'cancel_account_message' => 'AVISO: Esta acción eliminará todos tus datos de forma permanente.',
'go_back' => 'Atrás',
'data_visualizations' => 'Visualización de datos',
'sample_data' => 'Datos de ejemplo',
'hide' => 'Ocultar',
'new_version_available' => 'Una nueva versión de :releases_link disponible. Estás utilizando versión :user_version, la última versión es :latest_version',
'invoice_settings' => 'Configuración de facturas',
'invoice_number_prefix' => 'Prefijo de facturación',
'invoice_number_counter' => 'Numeración de facturación',
'quote_number_prefix' => 'Prejijo de cotizaciones',
'quote_number_counter' => 'Numeración de cotizaciones',
'share_invoice_counter' => 'Compartir la numeración para cotización y facturación',
'invoice_issued_to' => 'Factura emitida a',
'invalid_counter' => 'Para evitar posibles conflictos, por favor crea un prefijo de facturación y de cotización.',
'mark_sent' => 'Marcar como enviado',
'clone' => 'Clon', //Whats the context for this one
'new_quote' => 'Nueva cotización',
'create_quote' => 'Crear Cotización',
'edit_quote' => 'Editar Cotización',
'archive_quote' => 'Archivar Cotización',
'delete_quote' => 'Eliminar Cotización',
'save_quote' => 'Guardar Cotización',
'email_quote' => 'Enviar Cotización',
'clone_quote' => 'Clonar Cotización',
'convert_to_invoice' => 'Convertir a Factura',
'view_invoice' => 'Ver Factura',
'view_quote' => 'Ver Cotización',
'view_client' => 'Ver Cliente',
'updated_quote' => 'Cotización actualizada con éxito',
'created_quote' => 'Cotización creada con éxito',
'cloned_quote' => 'Cotización clonada con éxito',
'emailed_quote' => 'Cotización enviada con éxito',
'archived_quote' => 'Cotización archivada con éxito',
'archived_quotes' => ':count cotizaciones archivadas con exito',
'deleted_quote' => 'Cotizaciónes eliminadas con éxito',
'deleted_quotes' => ':count cotizaciones eliminadas con exito',
'converted_to_invoice' => 'Cotización convertida a factura con éxito',
'quote_subject' => 'Nueva cotización de :account',
'quote_message' => 'Para visualizar la cotización por valor de :amount, haz click en el enlace abajo.',
'quote_link_message' => 'Para visualizar tu cotización haz click en el enlace abajo:',
'notification_quote_sent_subject' => 'Cotización :invoice enviada a el cliente :client',
'notification_quote_viewed_subject' => 'Cotización :invoice visualizada por el cliente :client',
'notification_quote_sent' => 'La cotización :invoice por un valor de :amount, ha sido enviada al cliente :client.',
'notification_quote_viewed' => 'La cotizacion :invoice por un valor de :amount ha sido visualizada por el cliente :client.',
'session_expired' => 'Tu sesión ha caducado.',
'invoice_fields' => 'Campos de factura',
'invoice_options' => 'Opciones de factura',
'hide_quantity' => 'Ocultar cantidad',
'hide_quantity_help' => 'Si las cantidades de tus partidas siempre son 1, entonces puedes organizar tus facturas mejor al no mostrar este campo.',
'hide_paid_to_date' => 'Ocultar valor pagado a la fecha',
'hide_paid_to_date_help' => 'Solo mostrar la opción “Pagado a la fecha” en tus facturas en cuanto se ha recibido un pago.',
'charge_taxes' => 'Cargar impuestos',
'user_management' => 'Gestión de usario',
'add_user' => 'Añadir usario',
'send_invite' => 'Enviar invitación', //Context for its use
'sent_invite' => 'Invitación enviada con éxito',
'updated_user' => 'Usario actualizado con éxito',
'invitation_message' => ':invitor te ha invitado a unirte a su cuenta en Invoice Ninja.',
'register_to_add_user' => 'Regístrate para añadir usarios',
'user_state' => 'Estado',
'edit_user' => 'Editar Usario',
'delete_user' => 'Eliminar Usario',
'active' => 'Activar',
'pending' => 'Pendiente',
'deleted_user' => 'Usario eliminado con éxito',
'limit_users' => 'Lo sentimos, esta acción excederá el límite de ' . MAX_NUM_USERS . ' usarios',
'confirm_email_invoice' => '¿Estás seguro que quieres enviar esta factura?',
'confirm_email_quote' => '¿Estás seguro que quieres enviar esta cotización?',
'confirm_recurring_email_invoice' => 'Se ha marcado esta factura como recurrente, estás seguro que quieres enviar esta factura?',
'cancel_account' => 'Cancelar Cuenta',
'cancel_account_message' => 'AVISO: Esta acción eliminará todos tus datos de forma permanente.',
'go_back' => 'Atrás',
'data_visualizations' => 'Visualización de datos',
'sample_data' => 'Datos de ejemplo',
'hide' => 'Ocultar',
'new_version_available' => 'Una nueva versión de :releases_link disponible. Estás utilizando versión :user_version, la última versión es :latest_version',
'invoice_settings' => 'Configuración de facturas',
'invoice_number_prefix' => 'Prefijo de facturación',
'invoice_number_counter' => 'Numeración de facturación',
'quote_number_prefix' => 'Prejijo de cotizaciones',
'quote_number_counter' => 'Numeración de cotizaciones',
'share_invoice_counter' => 'Compartir la numeración para cotización y facturación',
'invoice_issued_to' => 'Factura emitida a',
'invalid_counter' => 'Para evitar posibles conflictos, por favor crea un prefijo de facturación y de cotización.',
'mark_sent' => 'Marcar como enviado',
'gateway_help_1' => ':link to sign up for Authorize.net.',
'gateway_help_2' => ':link to sign up for Authorize.net.',
'gateway_help_17' => ':link to get your PayPal API signature.',
'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.',
'gateway_help_27' => ':link to sign up for TwoCheckout.',
'gateway_help_1' => ':link to sign up for Authorize.net.',
'gateway_help_2' => ':link to sign up for Authorize.net.',
'gateway_help_17' => ':link to get your PayPal API signature.',
'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.',
'gateway_help_27' => ':link to sign up for TwoCheckout.',
'more_designs' => 'More designs',
'more_designs_title' => 'Additional Invoice Designs',
'more_designs_cloud_header' => 'Go Pro for more invoice designs',
'more_designs_cloud_text' => '',
'more_designs_self_host_header' => 'Get 6 more invoice designs for just $20',
'more_designs_self_host_text' => '',
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'more_designs' => 'More designs',
'more_designs_title' => 'Additional Invoice Designs',
'more_designs_cloud_header' => 'Go Pro for more invoice designs',
'more_designs_cloud_text' => '',
'more_designs_self_host_header' => 'Get 6 more invoice designs for just $20',
'more_designs_self_host_text' => '',
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
);
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -9,7 +9,7 @@ return array(
'work_phone' => 'Téléphone',
'address' => 'Adresse',
'address1' => 'Rue',
'address2' => 'Appt/Batiment',
'address2' => 'Appt/Bâtiment',
'city' => 'Ville',
'state' => 'Région/Département',
'postal_code' => 'Code Postal',
@ -18,7 +18,7 @@ return array(
'first_name' => 'Prénom',
'last_name' => 'Nom',
'phone' => 'Téléphone',
'email' => 'Email',
'email' => 'Courriel',
'additional_info' => 'Informations complémentaires',
'payment_terms' => 'Conditions de paiement',
'currency_id' => 'Devise',
@ -35,13 +35,13 @@ return array(
'invoice_number_short' => 'Facture #',
'po_number' => 'Numéro du bon de commande',
'po_number_short' => 'Bon de commande #',
'frequency_id' => 'Fréquence', //litteral translation : Combien de fois
'discount' => 'Remise', //can be "rabais" or "réduction"
'frequency_id' => 'Fréquence',
'discount' => 'Remise',
'taxes' => 'Taxes',
'tax' => 'Taxe',
'item' => 'Ligne', //I'm not sure, I need the context : screenshot ?
'item' => 'Article',
'description' => 'Description',
'unit_cost' => 'Coût à l\'unité',
'unit_cost' => 'Coût unitaire',
'quantity' => 'Quantité',
'line_total' => 'Total',
'subtotal' => 'Total',
@ -67,7 +67,7 @@ return array(
'clone_invoice' => 'Dupliquer la facture',
'archive_invoice' => 'Archiver la facture',
'delete_invoice' => 'Supprimer la facture',
'email_invoice' => 'Envoir la facture par email',
'email_invoice' => 'Envoyer la facture par courriel',
'enter_payment' => 'Saisissez un paiement',
'tax_rates' => 'Taux de taxe',
'rate' => 'Taux',
@ -88,16 +88,16 @@ return array(
'company_details' => 'Informations sur l\'entreprise',
'online_payments' => 'Paiements en ligne',
'notifications' => 'Notifications',
'import_export' => 'Import/Export',
'import_export' => 'Importer/Exporter',
'done' => 'Valider',
'save' => 'Sauvegarder',
'create' => 'Créer',
'upload' => 'Envoyer',
'import' => 'Import',
'import' => 'Importer',
'download' => 'Télécharger',
'cancel' => 'Annuler',
'close' => 'Fermer',
'provide_email' => 'Veuillez renseigner une adresse email valide',
'provide_email' => 'Veuillez renseigner une adresse courriel valide',
'powered_by' => 'Propulsé par',
'no_items' => 'Aucun élément',
@ -156,8 +156,8 @@ return array(
'credit_date' => 'Date de crédit',
'empty_table' => 'Aucune donnée disponible dans la table',
'select' => 'Sélectionner',
'edit_client' => 'Editer le Client',
'edit_invoice' => 'Editer la Facture',
'edit_client' => 'Éditer le Client',
'edit_invoice' => 'Éditer la Facture',
// client view page
'create_invoice' => 'Créer une facture',
@ -177,7 +177,7 @@ return array(
'amount' => 'Montant',
// account/company pages
'work_email' => 'Email',
'work_email' => 'Courriel',
'language_id' => 'Langage',
'timezone_id' => 'Fuseau horaire',
'date_format_id' => 'Format de la date',
@ -188,14 +188,14 @@ return array(
'logo_help' => 'Formats supportés: JPEG, GIF et PNG. Hauteur recommandé: 120px',
'payment_gateway' => 'Passerelle de paiement',
'gateway_id' => 'Fournisseur',
'email_notifications' => 'Notifications par email',
'email_sent' => 'm\'envoyer un email quand une facture est <b>envoyée</b>',
'email_viewed' => 'm\'envoyer un email quand une facture est <b>vue</b>',
'email_paid' => 'm\'envoyer un email quand une facture est <b>payée</b>',
'email_notifications' => 'Notifications par courriel',
'email_sent' => 'm\'envoyer un courriel quand une facture est <b>envoyée</b>',
'email_viewed' => 'm\'envoyer un courriel quand une facture est <b>vue</b>',
'email_paid' => 'm\'envoyer un courriel quand une facture est <b>payée</b>',
'site_updates' => 'Mises à jour du site',
'custom_messages' => 'Messages personnalisés',
'default_invoice_terms' => 'Définir comme les conditions par défaut',
'default_email_footer' => 'Définir comme la signature d\'email par défaut',
'default_email_footer' => 'Définir comme la signature de courriel par défaut',
'import_clients' => 'Importer des données clients',
'csv_file' => 'Sélectionner un fichier CSV',
'export_clients' => 'Exporter des données clients',
@ -216,8 +216,8 @@ return array(
'invoice_error' => 'Veuillez vous assurer de sélectionner un client et de corriger les erreurs',
'limit_clients' => 'Désolé, cela dépasse la limite de :count clients',
'payment_error' => 'Il y a eu une erreur lors du traitement de votre paiement. Veuillez réessayer ultérieurement',
'registration_required' => 'Veuillez vous enregistrer pour envoyer une facture par email',
'confirmation_required' => 'Veuillez confirmer votre adresse email',
'registration_required' => 'Veuillez vous enregistrer pour envoyer une facture par courriel',
'confirmation_required' => 'Veuillez confirmer votre adresse courriel',
'updated_client' => 'Client modifié avec succès',
'created_client' => 'Client créé avec succès',
@ -229,7 +229,7 @@ return array(
'updated_invoice' => 'Facture modifiée avec succès',
'created_invoice' => 'Facture créée avec succès',
'cloned_invoice' => 'Facture dupliquée avec succès',
'emailed_invoice' => 'Facture envoyée par email avec succès',
'emailed_invoice' => 'Facture envoyée par courriel avec succès',
'and_created_client' => 'et client créé',
'archived_invoice' => 'Facture archivée avec succès',
'archived_invoices' => ':count factures archivées avec succès',
@ -260,13 +260,13 @@ return array(
'email_salutation' => 'Cher :name,',
'email_signature' => 'Cordialement,',
'email_from' => 'L\'équipe InvoiceNinja',
'user_email_footer' => 'Pour modifier vos paramètres de notification par email, veuillez visiter '.SITE_URL.'/company/notifications',
'user_email_footer' => 'Pour modifier vos paramètres de notification par courriel, veuillez visiter '.SITE_URL.'/company/notifications',
'invoice_link_message' => 'Pour voir la facture de votre client cliquez sur le lien ci-après :',
'notification_invoice_paid_subject' => 'La facture :invoice a été payée par le client :client',
'notification_invoice_sent_subject' => 'La facture :invoice a été envoyée au client :client',
'notification_invoice_viewed_subject' => 'La facture :invoice a été vue par le client :client',
'notification_invoice_paid' => 'Un paiement de :amount a été effectué par le client :client concernant la facture :invoice.',
'notification_invoice_sent' => 'Le client suivant :client a reçu par email la facture :invoice d\'un montant de :amount',
'notification_invoice_sent' => 'Le client suivant :client a reçu par courriel la facture :invoice d\'un montant de :amount',
'notification_invoice_viewed' => 'Le client suivant :client a vu la facture :invoice d\'un montant de :amount',
'reset_password' => 'Vous pouvez réinitialiser votre mot de passe en cliquant sur le lien suivant :',
'reset_password_footer' => 'Si vous n\'avez pas effectué de demande de réinitalisation de mot de passe veuillez contacter notre support :' . CONTACT_EMAIL,
@ -281,10 +281,10 @@ return array(
// Security alerts
'confide' => array(
'too_many_attempts' => 'Trop de tentatives. Essayez à nouveau dans quelques minutes.',
'wrong_credentials' => 'Email ou mot de passe incorrect',
'wrong_credentials' => 'Courriel ou mot de passe incorrect',
'confirmation' => 'Votre compte a été validé !',
'wrong_confirmation' => 'Code de confirmation incorrect.',
'password_forgot' => 'Les informations de réinitialisation de votre mot de passe vous ont été envoyées par email.',
'password_forgot' => 'Les informations de réinitialisation de votre mot de passe vous ont été envoyées par courriel.',
'password_reset' => 'Votre mot de passe a été modifié avec succès.',
'wrong_password_reset' => 'Mot de passe incorrect. Veuillez réessayer',
),
@ -299,10 +299,10 @@ return array(
'sign_up_to_save' => 'Connectez vous pour sauvegarder votre travail',
'agree_to_terms' =>'J\'accepte les conditions d\'utilisation d\'Invoice ninja :terms',
'terms_of_service' => 'Conditions d\'utilisation',
'email_taken' => 'L\'adresse email est déjà existante',
'email_taken' => 'L\'adresse courriel existe déjà',
'working' => 'En cours',
'success' => 'Succès',
'success_message' => 'Inscription réussie avec succès. Veuillez cliquer sur le lien dans l\'email de confirmation de compte pour vérifier votre adresse email.',
'success_message' => 'Inscription réussie avec succès. Veuillez cliquer sur le lien dans le courriel de confirmation de compte pour vérifier votre adresse courriel.',
'erase_data' => 'Cela supprimera vos données de façon permanente.',
'password' => 'Mot de passe',
@ -316,7 +316,7 @@ return array(
'client_fields' => 'Champs client',
'field_label' => 'Nom du champ',
'field_value' => 'Valeur du champ',
'edit' => 'Editer',
'edit' => 'Éditer',
'view_as_recipient' => 'Voir en tant que destinataire',
// product management
@ -328,7 +328,7 @@ return array(
'update_products' => 'Mise à jour auto des produits',
'update_products_help' => 'La mise à jour d\'une facture entraîne la <b>mise à jour des produits</b>',
'create_product' => 'Nouveau produit',
'edit_product' => 'Editer Produit',
'edit_product' => 'Éditer Produit',
'archive_product' => 'Archiver Produit',
'updated_product' => 'Produit mis à jour',
'created_product' => 'Produit créé',
@ -341,51 +341,51 @@ return array(
'specify_colors' => 'Spécifiez les couleurs',
'specify_colors_label' => 'Sélectionnez les couleurs utilisés dans les factures',
'chart_builder' => 'Chart Builder',
'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!',
'go_pro' => 'Go Pro',
'chart_builder' => 'Concepteur de graphiques',
'ninja_email_footer' => 'Utilisez :site pour facturer vos clients et être payés en ligne gratuitement!',
'go_pro' => 'Passez au Plan Pro',
// Quotes
'quote' => 'Devis',
'quotes' => 'Devis',
'quote_number' => 'Devis numéro',
'quote_number_short' => 'Devis N°',
'quote_date' => 'Date du devis',
'quote_total' => 'Montant du devis',
'your_quote' => 'Votre Devis',
'quote' => 'Soumission',
'quotes' => 'Soumissions',
'quote_number' => 'Soumission numéro',
'quote_number_short' => 'Soumission #',
'quote_date' => 'Date de soumission',
'quote_total' => 'Montant de la soumis',
'your_quote' => 'Votre Soumission',
'total' => 'Total',
'clone' => 'Dupliquer',
'new_quote' => 'Nouveau devis',
'create_quote' => 'Créer un devis',
'edit_quote' => 'Editer le devis',
'archive_quote' => 'Archiver le devis',
'delete_quote' => 'Supprimer le devis',
'save_quote' => 'Enregistrer le devis',
'email_quote' => 'Envoyer le devis par mail',
'clone_quote' => 'Dupliquer le devis',
'new_quote' => 'Nouvelle soumission',
'create_quote' => 'Créer une soumission',
'edit_quote' => 'Éditer la soumission',
'archive_quote' => 'Archiver la soumission',
'delete_quote' => 'Supprimer la soumission',
'save_quote' => 'Enregistrer la soumission',
'email_quote' => 'Envoyer la soumission par courriel',
'clone_quote' => 'Dupliquer la soumission',
'convert_to_invoice' => 'Convertir en facture',
'view_invoice' => 'Nouvelle facture',
'view_quote' => 'Voir le devis',
'view_quote' => 'Voir la soumission',
'view_client' => 'Voir le client',
'updated_quote' => 'Devis mis à jour',
'created_quote' => 'Devis créé',
'cloned_quote' => 'Devis dupliqué avec succès',
'emailed_quote' => 'Devis envoyé par email',
'archived_quote' => 'Devis archivé',
'archived_quotes' => ':count devis ont bien été archivé',
'deleted_quote' => 'Devis supprimé',
'deleted_quotes' => ':count devis ont bien été supprimés',
'converted_to_invoice' => 'Le devis a bien été converti en facture',
'updated_quote' => 'Soumission mise à jour',
'created_quote' => 'Soumission créée',
'cloned_quote' => 'Soumission dupliquée avec succès',
'emailed_quote' => 'Soumission envoyée par courriel',
'archived_quote' => 'Soumission archivée',
'archived_quotes' => ':count soumissions ont bien été archivés',
'deleted_quote' => 'Soumission supprimée',
'deleted_quotes' => ':count soumissions ont bien été supprimés',
'converted_to_invoice' => 'La soumission a bien été convertie en facture',
'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.',
'quote_subject' => 'Nouvelle soumission de :account',
'quote_message' => 'Pour visionner votre soumission de :amount, cliquez le lien ci-dessous.',
'quote_link_message' => 'Pour visionner votre soumission, cliquez le lien ci-dessous:',
'notification_quote_sent_subject' => 'La soumission :invoice a été envoyée à :client',
'notification_quote_viewed_subject' => 'La soumission :invoice a été visionnée par :client',
'notification_quote_sent' => 'La facture :invoice de :amount a été envoyée au client :client.',
'notification_quote_viewed' => 'La facture :invoice de :amount a été visionée par le client :client.',
'session_expired' => 'Votre session a expiré.',
@ -396,45 +396,45 @@ return array(
'hide_paid_to_date' => 'Hide paid to date',
'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.',
'charge_taxes' => 'Charge taxes',
'charge_taxes' => 'Factures des taxes',
'user_management' => 'Gestion des utilisateurs',
'add_user' => 'Ajouter utilisateur',
'send_invite' => 'Envoyer invitation',
'sent_invite' => 'Invitation envoyés',
'updated_user' => 'Utilisateur mis à jour',
'invitation_message' => 'Vous avez été invité par :invitor. ',
'register_to_add_user' => 'Please sign up to add a user',
'user_state' => 'Etat',
'edit_user' => 'Editer l\'utilisateur',
'register_to_add_user' => 'Veuillez vous enregistrer pour ajouter un utilisateur',
'user_state' => 'État',
'edit_user' => 'Éditer l\'utilisateur',
'delete_user' => 'Supprimer l\'utilisateur',
'active' => 'Actif',
'pending' => 'En attente',
'deleted_user' => 'Utilisateur supprimé',
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
'limit_users' => 'Désolé, ceci excédera la limite de ' . MAX_NUM_USERS . ' utilisateurs',
'confirm_email_invoice' => 'Are you sure you want to email this invoice?',
'confirm_email_quote' => 'Are you sure you want to email this quote?',
'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?',
'confirm_email_invoice' => 'Voulez-vous vraiment envoyer cette facture par courriel?',
'confirm_email_quote' => 'Voulez-vous vraiment envoyer cette soumission par courriel?',
'confirm_recurring_email_invoice' => 'Les factures récurrentes sont activées, voulez-vous vraiment envoyer cette facture par courriel?',
'cancel_account' => 'Supprimé le compte',
'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.',
'cancel_account' => 'Supprimer le compte',
'cancel_account_message' => 'Attention: Ceci supprimera de façon permanente toutes vos données; cette action est irréversible.',
'go_back' => 'Retour',
'data_visualizations' => 'Data Visualizations',
'sample_data' => 'Sample data shown',
'data_visualizations' => 'Visualisation des données',
'sample_data' => 'Données fictives présentées',
'hide' => 'Cacher',
'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version',
'new_version_available' => 'Une nouvelle version de :releases_link est disponible. Vous utilisez v:user_version, la plus récente est v:latest_version',
'invoice_settings' => 'Paramètre des factures',
'invoice_number_prefix' => 'Invoice Number Prefix',
'invoice_number_counter' => 'Invoice Number Counter',
'quote_number_prefix' => 'Quote Number Prefix',
'quote_number_counter' => 'Quote Number Counter',
'share_invoice_counter' => 'Share invoice counter',
'invoice_issued_to' => 'Invoice issued to',
'invoice_settings' => 'Paramètres des factures',
'invoice_number_prefix' => 'Préfixe du numéro de facture',
'invoice_number_counter' => 'Compteur du numéro de facture',
'quote_number_prefix' => 'Préfixe du numéro de soumission',
'quote_number_counter' => 'Compteur du numéro de soumission',
'share_invoice_counter' => 'Partager le compteur de facture',
'invoice_issued_to' => 'Facture destinée à',
'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix',
'mark_sent' => 'Maquer comme envoyé',
'mark_sent' => 'Marquer comme envoyé',
'gateway_help_1' => ':link to sign up for Authorize.net.',
'gateway_help_2' => ':link to sign up for Authorize.net.',
@ -442,14 +442,22 @@ return array(
'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.',
'gateway_help_27' => ':link to sign up for TwoCheckout.',
'more_designs' => 'More designs',
'more_designs_title' => 'Additional Invoice Designs',
'more_designs_cloud_header' => 'Go Pro for more invoice designs',
'more_designs' => 'Plus de modèles',
'more_designs_title' => 'Modèles de factures additionnels',
'more_designs_cloud_header' => 'Passez au Plan Pro pour plus de modèles',
'more_designs_cloud_text' => '',
'more_designs_self_host_header' => 'Get 6 more invoice designs for just $20',
'more_designs_self_host_header' => 'Obtenez 6 modèles de factures additionnels pour seulement 20$',
'more_designs_self_host_text' => '',
'buy' => 'Acheter',
'bought_designs' => 'Successfully added additional invoice designs',
'bought_designs' => 'Les nouveaux modèles ont été ajoutés avec succès',
);
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -451,6 +451,17 @@ return array(
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -459,6 +459,18 @@ return array(
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -458,6 +458,17 @@ return array(
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -451,6 +451,18 @@ return array(
'more_designs_self_host_text' => '',
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -439,6 +439,19 @@ return array(
'buy' => 'Buy',
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'sent',
'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number onthe back of your card',
'payment_footer1' => '*Billing address must match address accociated with credit card.',
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number',
);

View File

@ -131,11 +131,23 @@ class Client extends EntityModel
return $str;
}
public function getVatNumber()
public function getIdNumber()
{
$str = '';
if ($this->work_phone)
if ($this->id_number)
{
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
}
return $str;
}
public function getVatNumber()
{
$str = '';
if ($this->vat_number)
{
$str .= '<i class="fa fa-vat-number" style="width: 20px"></i>' . $this->vat_number;
}

View File

@ -95,7 +95,8 @@ class Invoice extends EntityModel
$this->client->setVisible([
'name',
'vat_number',
'id_number',
'vat_number',
'address1',
'address2',
'city',
@ -111,7 +112,8 @@ class Invoice extends EntityModel
$this->account->setVisible([
'name',
'vat_number',
'id_number',
'vat_number',
'address1',
'address2',
'city',

View File

@ -15,16 +15,9 @@ class Mailer {
Mail::send($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject)
{
$replyEmail = $fromEmail;
$fromEmail = NINJA_FROM_EMAIL;
// We're unable to set the true fromEmail for emails sent from Yahoo or AOL accounts
// http://blog.mandrill.com/yahoos-recent-dmarc-changes-and-how-that-impacts-senders.html
if (strpos($fromEmail, '@yahoo.') !== false || strpos($fromEmail, '@aol.') !== FALSE)
{
$fromEmail = CONTACT_EMAIL;
}
$message->to($toEmail)->from($fromEmail, $fromName)->sender($fromEmail, $fromName)
->replyTo($replyEmail, $fromName)->subject($subject);
$message->to($toEmail)->from($fromEmail, $fromName)->replyTo($replyEmail, $fromName)->subject($subject);
});
}
}

View File

@ -45,7 +45,7 @@ class AccountRepository
public function getSearchData()
{
$clients = \DB::table('clients')
$clients = \DB::table('clients')
->where('clients.deleted_at', '=', null)
->where('clients.account_id', '=', \Auth::user()->account_id)
->whereRaw("clients.name <> ''")

View File

@ -62,7 +62,10 @@ class ClientRepository
if (isset($data['name'])) {
$client->name = trim($data['name']);
}
if (isset($data['vat_number'])) {
if (isset($data['id_number'])) {
$client->id_number = trim($data['id_number']);
}
if (isset($data['vat_number'])) {
$client->vat_number = trim($data['vat_number']);
}
if (isset($data['work_phone'])) {
@ -102,7 +105,7 @@ class ClientRepository
$client->industry_id = $data['industry_id'] ? $data['industry_id'] : null;
}
if (isset($data['currency_id'])) {
$client->currency_id = $data['currency_id'] ? $data['currency_id'] : 1;
$client->currency_id = $data['currency_id'] ? $data['currency_id'] : null;
}
if (isset($data['payment_terms'])) {
$client->payment_terms = $data['payment_terms'];

View File

@ -9,7 +9,7 @@ use TaxRate;
class InvoiceRepository
{
public function getInvoices($accountId, $clientPublicId = false, $filter = false)
public function getInvoices($accountId, $clientPublicId = false, $entityType = ENTITY_INVOICE, $filter = false)
{
$query = \DB::table('invoices')
->join('clients', 'clients.id', '=','invoices.client_id')
@ -22,7 +22,7 @@ class InvoiceRepository
->where('contacts.is_primary', '=', true)
->select('clients.public_id as client_public_id', 'invoice_number', 'invoice_status_id', 'clients.name as client_name', 'invoices.public_id', 'amount', 'invoices.balance', 'invoice_date', 'due_date', 'invoice_statuses.name as invoice_status_name', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'quote_id', 'quote_invoice_id');
if (!\Session::get('show_trash:invoice'))
if (!\Session::get('show_trash:' . $entityType))
{
$query->where('invoices.deleted_at', '=', null);
}
@ -85,7 +85,7 @@ class InvoiceRepository
public function getDatatable($accountId, $clientPublicId = null, $entityType, $search)
{
$query = $this->getInvoices($accountId, $clientPublicId, $search)
$query = $this->getInvoices($accountId, $clientPublicId, $entityType, $search)
->where('invoices.is_quote', '=', $entityType == ENTITY_QUOTE ? true : false);
$table = \Datatable::query($query);

View File

@ -247,6 +247,7 @@ define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_URL', 'https://www.invoiceninja.com');
define('NINJA_VERSION', '1.5.1');
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');
define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/');
define('COUNT_FREE_DESIGNS', 4);

View File

@ -29,7 +29,8 @@
{{ Former::legend('details') }}
{{ Former::text('name') }}
{{ Former::text('vat_number') }}
{{ Former::text('id_number') }}
{{ Former::text('vat_number') }}
{{ Former::text('work_email') }}
{{ Former::text('work_phone') }}
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) }}

View File

@ -4,7 +4,8 @@
{{ Former::legend('Organization') }}
{{ Former::text('name') }}
{{ Former::text('vat_number') }}
{{ Former::text('id_number') }}
{{ Former::text('vat_number') }}
{{ Former::text('work_phone')->label('Phone') }}
{{ Former::textarea('notes') }}

View File

@ -23,8 +23,9 @@
{{ Former::legend('organization') }}
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
{{ Former::text('vat_number') }}
{{ Former::text('website') }}
{{ Former::text('id_number') }}
{{ Former::text('vat_number') }}
{{ Former::text('website') }}
{{ Former::text('work_phone') }}
@if (Auth::user()->isPro())

View File

@ -39,8 +39,9 @@
<div class="col-md-3">
<h3>{{ trans('texts.details') }}</h3>
<p>{{ $client->getIdNumber() }}</p>
<p>{{ $client->getVatNumber() }}</p>
<p>{{ $client->getAddress() }}</p>
<p>{{ $client->getAddress() }}</p>
<p>{{ $client->getCustomFields() }}</p>
<p>{{ $client->getPhone() }}</p>
<p>{{ $client->getNotes() }}</p>

View File

@ -341,7 +341,8 @@
{{ Former::legend('organization') }}
{{ Former::text('name')->data_bind("value: name, valueUpdate: 'afterkeydown', attr { placeholder: name.placeholder }") }}
{{ Former::text('vat_number')->data_bind("value: vat_number, valueUpdate: 'afterkeydown'") }}
{{ Former::text('id_number')->data_bind("value: id_number, valueUpdate: 'afterkeydown'") }}
{{ Former::text('vat_number')->data_bind("value: vat_number, valueUpdate: 'afterkeydown'") }}
{{ Former::text('website')->data_bind("value: website, valueUpdate: 'afterkeydown'") }}
{{ Former::text('work_phone')->data_bind("value: work_phone, valueUpdate: 'afterkeydown'") }}
@ -1222,7 +1223,8 @@
var self = this;
self.public_id = ko.observable(0);
self.name = ko.observable('');
self.vat_number = ko.observable('');
self.id_number = ko.observable('');
self.vat_number = ko.observable('');
self.work_phone = ko.observable('');
self.custom_value1 = ko.observable('');
self.custom_value2 = ko.observable('');

View File

@ -66,7 +66,7 @@
<div class="col-md-7 info">
<div class="col-md-12 alignCenterText" >
Enter Your Billing Address and Credit Card information
{{ trans('texts.payment_title') }}
</div>
<div class="row">
@ -113,10 +113,10 @@
<div class="row">
<h5 class="col-md-12 boldText" >
*Billing address must match address accociated with credit card.
{{ trans('texts.payment_footer1') }}
</h5>
<h5 class="col-md-12 boldText">
*Please click "PAY NOW" only once - transaction may take up to 1 minute to process
{{ trans('texts.payment_footer2') }}
</h5>
</div>
@ -141,7 +141,7 @@
<div class="col-md-5">
<div class="col-md-12 alignCenterText" >
Balance Due $
{{ trans('texts.balance_due') . ' ' . Utils::formatMoney($amount, $currencyId) }}
</div>
<div class="col-md-12">
<div class="card">
@ -189,7 +189,7 @@
{{ Former::text('cvv') }}
</div>
<div>
<h5 class="boldText" style="margin-top: 8%;margin-left: 5%;"> *This is the 3-4 digit number onthe back of your card</h5>
<h5 class="boldText" style="margin-top: 8%;margin-left: 5%;">{{ trans('texts.payment_cvv') }}</h5>
</div>
<div class="col-md-6">
<!-- <p><span class="glyphicon glyphicon-credit-card" style="margin-right: 10px;"></span><a href="#">Where Do I find CVV?</a></p> -->

View File

@ -117,7 +117,7 @@
</div>
<div class="customMenuDiv" >
<span class="img-wrap shiftLeft" ><img src="{{ asset('images/BestInClassSecurity.png') }}"></span>
<span class="customSubMenu shiftLeft"> Best-in-class data security </span>
<span class="customSubMenu shiftLeft"> Best-in-class security </span>
</div>
<div class="customMenuDiv" >

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -254,7 +254,7 @@ a .cta:hover span {
.hero1.background {
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
/*background-attachment: fixed;*/
background-size: cover;
min-height: 500px;
}

View File

@ -707,6 +707,11 @@ box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
.plans-table a .cta h2 span {background: #1e84a5;}
.checkbox-inline input[type="checkbox"] {
margin-left: 0px !important;
}
#designThumbs img {
border: 1px solid #CCCCCC;
}

View File

@ -9,7 +9,7 @@ var isIE = /*@cc_on!@*/false || !!document.documentMode; // At least IE6
var invoiceOld;
function generatePDF(invoice, javascript, force) {
invoice = calculateAmounts(invoice);
invoice = calculateAmounts(invoice);
var a = copyInvoice(invoice);
var b = copyInvoice(invoiceOld);
if (!force && _.isEqual(a, b)) {
@ -54,7 +54,7 @@ function GetPdf(invoice, javascript){
layout.descriptionLeft -= 20;
layout.unitCostRight -= 40;
layout.qtyRight -= 40;
}
}
/*
@param orientation One of "portrait" or "landscape" (or shortcuts "p" (Default), "l")
@ -142,24 +142,24 @@ function processVariables(str) {
if (!str) return '';
var variables = ['MONTH','QUARTER','YEAR'];
for (var i=0; i<variables.length; i++) {
var variable = variables[i];
var variable = variables[i];
var regexp = new RegExp(':' + variable + '[+-]?[\\d]*', 'g');
var matches = str.match(regexp);
var matches = str.match(regexp);
if (!matches) {
continue;
continue;
}
for (var j=0; j<matches.length; j++) {
var match = matches[j];
var offset = 0;
var offset = 0;
if (match.split('+').length > 1) {
offset = match.split('+')[1];
} else if (match.split('-').length > 1) {
offset = parseInt(match.split('-')[1]) * -1;
}
str = str.replace(match, getDatePart(variable, offset));
str = str.replace(match, getDatePart(variable, offset));
}
}
}
return str;
}
@ -182,7 +182,7 @@ function getMonth(offset) {
var months = [ "January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December" ];
var month = today.getMonth();
month = parseInt(month) + offset;
month = parseInt(month) + offset;
month = month % 12;
if (month < 0) {
month += 12;
@ -202,7 +202,7 @@ function getQuarter(offset) {
quarter += offset;
quarter = quarter % 4;
if (quarter == 0) {
quarter = 4;
quarter = 4;
}
return 'Q' + quarter;
}
@ -391,7 +391,7 @@ function enableHoverClick($combobox, $entityId, url) {
setAsLink($combobox, false);
}).on('click', function() {
var clientId = $entityId.val();
if ($(combobox).closest('.combobox-container').hasClass('combobox-selected')) {
if ($(combobox).closest('.combobox-container').hasClass('combobox-selected')) {
if (parseInt(clientId) > 0) {
window.open(url + '/' + clientId, '_blank');
} else {
@ -405,10 +405,10 @@ function enableHoverClick($combobox, $entityId, url) {
function setAsLink($input, enable) {
if (enable) {
$input.css('text-decoration','underline');
$input.css('cursor','pointer');
$input.css('cursor','pointer');
} else {
$input.css('text-decoration','none');
$input.css('cursor','text');
$input.css('cursor','text');
}
}
@ -439,45 +439,45 @@ if (window.ko) {
var id = (value && value.public_id) ? value.public_id() : (value && value.id) ? value.id() : value ? value : false;
if (id) $(element).val(id);
//console.log("combo-init: %s", id);
$(element).combobox(options);
$(element).combobox(options);
/*
ko.utils.registerEventHandler(element, "change", function () {
console.log("change: %s", $(element).val());
//var
console.log("change: %s", $(element).val());
//var
valueAccessor($(element).val());
//$(element).combobox('refresh');
});
*/
},
update: function (element, valueAccessor) {
update: function (element, valueAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor());
var id = (value && value.public_id) ? value.public_id() : (value && value.id) ? value.id() : value ? value : false;
//console.log("combo-update: %s", id);
if (id) {
$(element).val(id);
if (id) {
$(element).val(id);
$(element).combobox('refresh');
} else {
$(element).combobox('clearTarget');
$(element).combobox('clearElement');
}
}
$(element).combobox('clearTarget');
$(element).combobox('clearElement');
}
}
};
ko.bindingHandlers.datePicker = {
init: function (element, valueAccessor, allBindingsAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor());
var value = ko.utils.unwrapObservable(valueAccessor());
if (value) $(element).datepicker('update', value);
$(element).change(function() {
$(element).change(function() {
var value = valueAccessor();
value($(element).val());
})
},
update: function (element, valueAccessor) {
update: function (element, valueAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor());
if (value) $(element).datepicker('update', value);
}
}
};
}
@ -495,11 +495,11 @@ function wordWrapText(value, width)
while (j++ < lines[i].length) {
if (lines[i].charAt(j) === ' ') space = j;
}
if (space == lines[i].length) space = width/6;
if (space == lines[i].length) space = width/6;
lines[i + 1] = lines[i].substring(space + 1) + ' ' + (lines[i + 1] || '');
lines[i] = lines[i].substring(0, space);
}
var newValue = (lines.join("\n")).trim();
if (value == newValue) {
@ -528,14 +528,14 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
var clientMap = {};
var invoiceMap = {};
var invoicesForClientMap = {};
var $clientSelect = $('select#client');
var $clientSelect = $('select#client');
for (var i=0; i<invoices.length; i++) {
var invoice = invoices[i];
var client = invoice.client;
var client = invoice.client;
if (!invoicesForClientMap.hasOwnProperty(client.public_id)) {
invoicesForClientMap[client.public_id] = [];
invoicesForClientMap[client.public_id] = [];
}
invoicesForClientMap[client.public_id].push(invoice);
@ -547,28 +547,28 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
clientMap[client.public_id] = client;
}
$clientSelect.append(new Option('', ''));
$clientSelect.append(new Option('', ''));
for (var i=0; i<clients.length; i++) {
var client = clients[i];
$clientSelect.append(new Option(getClientDisplayName(client), client.public_id));
}
}
if (clientId) {
$clientSelect.val(clientId);
}
$clientSelect.combobox();
$clientSelect.on('change', function(e) {
$clientSelect.on('change', function(e) {
var clientId = $('input[name=client]').val();
var invoiceId = $('input[name=invoice]').val();
var invoiceId = $('input[name=invoice]').val();
var invoice = invoiceMap[invoiceId];
if (invoice && invoice.client.public_id == clientId) {
e.preventDefault();
return;
}
setComboboxValue($('.invoice-select'), '', '');
setComboboxValue($('.invoice-select'), '', '');
$invoiceCombobox = $('select#invoice');
$invoiceCombobox.find('option').remove().end().combobox('refresh');
$invoiceCombobox.find('option').remove().end().combobox('refresh');
$invoiceCombobox.append(new Option('', ''));
var list = clientId ? (invoicesForClientMap.hasOwnProperty(clientId) ? invoicesForClientMap[clientId] : []) : invoices;
for (var i=0; i<list.length; i++) {
@ -576,17 +576,17 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
var client = clientMap[invoice.client.public_id];
if (!client) continue; // client is deleted/archived
$invoiceCombobox.append(new Option(invoice.invoice_number + ' - ' + invoice.invoice_status.name + ' - ' +
getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, invoice.currency_id) + ' | ' +
formatMoney(invoice.balance, invoice.currency_id), invoice.public_id));
getClientDisplayName(client) + ' - ' + formatMoney(invoice.amount, client.currency_id) + ' | ' +
formatMoney(invoice.balance, client.currency_id), invoice.public_id));
}
$('select#invoice').combobox('refresh');
});
var $invoiceSelect = $('select#invoice').on('change', function(e) {
var $invoiceSelect = $('select#invoice').on('change', function(e) {
$clientCombobox = $('select#client');
var invoiceId = $('input[name=invoice]').val();
var invoiceId = $('input[name=invoice]').val();
if (invoiceId) {
var invoice = invoiceMap[invoiceId];
var invoice = invoiceMap[invoiceId];
var client = clientMap[invoice.client.public_id];
setComboboxValue($('.client-select'), client.public_id, getClientDisplayName(client));
if (!parseFloat($('#amount').val())) {
@ -595,14 +595,14 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
}
});
$invoiceSelect.combobox();
$invoiceSelect.combobox();
if (invoiceId) {
var invoice = invoiceMap[invoiceId];
var client = clientMap[invoice.client.public_id];
setComboboxValue($('.invoice-select'), invoice.public_id, (invoice.invoice_number + ' - ' +
invoice.invoice_status.name + ' - ' + getClientDisplayName(client) + ' - ' +
formatMoney(invoice.amount, invoice.currency_id) + ' | ' + formatMoney(invoice.balance, invoice.currency_id)));
formatMoney(invoice.amount, client.currency_id) + ' | ' + formatMoney(invoice.balance, client.currency_id)));
$invoiceSelect.trigger('change');
} else if (clientId) {
var client = clientMap[clientId];
@ -610,7 +610,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
$clientSelect.trigger('change');
} else {
$clientSelect.trigger('change');
}
}
}
@ -637,6 +637,7 @@ function displayAccount(doc, invoice, x, y, layout) {
var data1 = [
account.name,
account.id_number,
account.vat_number,
account.work_email,
account.work_phone
@ -644,10 +645,10 @@ function displayAccount(doc, invoice, x, y, layout) {
var data2 = [
concatStrings(account.address1, account.address2),
concatStrings(account.city, account.state, account.postal_code),
concatStrings(account.city, account.state, account.postal_code),
account.country ? account.country.name : false,
invoice.account.custom_value1 ? invoice.account['custom_label1'] + ' ' + invoice.account.custom_value1 : false,
invoice.account.custom_value2 ? invoice.account['custom_label2'] + ' ' + invoice.account.custom_value2 : false,
invoice.account.custom_value1 ? invoice.account['custom_label1'] + ' ' + invoice.account.custom_value1 : false,
invoice.account.custom_value2 ? invoice.account['custom_label2'] + ' ' + invoice.account.custom_value2 : false,
];
if (layout.singleColumn) {
@ -663,7 +664,7 @@ function displayAccount(doc, invoice, x, y, layout) {
width = Math.max(emailWidth, nameWidth, 120);
x += width;
displayGrid(doc, invoice, data2, x, y, layout);
displayGrid(doc, invoice, data2, x, y, layout);
}
}
@ -672,16 +673,17 @@ function displayClient(doc, invoice, x, y, layout) {
var client = invoice.client;
if (!client) {
return;
}
}
var data = [
getClientDisplayName(client),
client.id_number,
client.vat_number,
concatStrings(client.address1, client.address2),
concatStrings(client.city, client.state, client.postal_code),
client.country ? client.country.name : false,
client.contacts && getClientDisplayName(client) != client.contacts[0].email ? client.contacts[0].email : false,
invoice.client.custom_value1 ? invoice.account['custom_client_label1'] + ' ' + invoice.client.custom_value1 : false,
invoice.client.custom_value2 ? invoice.account['custom_client_label2'] + ' ' + invoice.client.custom_value2 : false,
invoice.client.custom_value1 ? invoice.account['custom_client_label1'] + ' ' + invoice.client.custom_value1 : false,
invoice.client.custom_value2 ? invoice.account['custom_client_label2'] + ' ' + invoice.client.custom_value2 : false,
];
return displayGrid(doc, invoice, data, x, y, layout, {hasheader:true});
}
@ -707,7 +709,7 @@ function getInvoiceDetails(invoice) {
{'invoice_date': invoice.invoice_date},
{'due_date': invoice.due_date},
{'balance_due': formatMoney(invoice.balance_amount, invoice.client.currency_id)},
];
];
}
function getInvoiceDetailsHeight(invoice, layout) {
@ -741,20 +743,20 @@ function displaySubtotals(doc, layout, invoice, y, rightAlignTitleX)
{'discount': invoice.discount_amount > 0 ? formatMoney(invoice.discount_amount, invoice.client.currency_id) : false}
];
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 == '1') {
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 == '1') {
data.push({'custom_invoice_label1': formatMoney(invoice.custom_value1, invoice.client.currency_id) })
}
if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 == '1') {
data.push({'custom_invoice_label2': formatMoney(invoice.custom_value2, invoice.client.currency_id) })
data.push({'custom_invoice_label2': formatMoney(invoice.custom_value2, invoice.client.currency_id) })
}
data.push({'tax': invoice.tax_amount > 0 ? formatMoney(invoice.tax_amount, invoice.client.currency_id) : false});
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') {
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') {
data.push({'custom_invoice_label1': formatMoney(invoice.custom_value1, invoice.client.currency_id) })
}
if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 != '1') {
data.push({'custom_invoice_label2': formatMoney(invoice.custom_value2, invoice.client.currency_id) })
data.push({'custom_invoice_label2': formatMoney(invoice.custom_value2, invoice.client.currency_id) })
}
var paid = invoice.amount - invoice.balance;
@ -765,7 +767,7 @@ function displaySubtotals(doc, layout, invoice, y, rightAlignTitleX)
var options = {
hasheader: true,
rightAlignX: 550,
rightAlignTitleX: rightAlignTitleX
rightAlignTitleX: rightAlignTitleX
};
return displayGrid(doc, invoice, data, 300, y, layout, options) + 10;
@ -796,7 +798,7 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
var origY = y;
for (var i=0; i<data.length; i++) {
doc.setFontType('normal');
if (invoice.invoice_design_id == 1 && i > 0 && origY === layout.accountTop) {
SetPdfColor('GrayText',doc);
}
@ -810,7 +812,7 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
doc.setFontType('bold');
}
if (typeof row === 'object') {
if (typeof row === 'object') {
for (var key in row) {
if (row.hasOwnProperty(key)) {
var value = row[key] ? row[key] + '' : false;
@ -818,16 +820,16 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
}
if (!value) {
continue;
}
}
var marginLeft;
if (options.rightAlignX) {
marginLeft = options.rightAlignX - (doc.getStringUnitWidth(value) * doc.internal.getFontSize());
marginLeft = options.rightAlignX - (doc.getStringUnitWidth(value) * doc.internal.getFontSize());
} else {
marginLeft = x + 80;
}
doc.text(marginLeft, y, value);
doc.text(marginLeft, y, value);
doc.setFontType('normal');
if (invoice.is_quote) {
if (key == 'invoice_number') {
@ -853,7 +855,7 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
marginLeft = x;
}
doc.text(marginLeft, y, key);
doc.text(marginLeft, y, key);
} else {
doc.text(x, y, row);
}
@ -872,16 +874,16 @@ function displayNotesAndTerms(doc, layout, invoice, y)
if (invoice.public_notes) {
doc.text(layout.marginLeft, y, invoice.public_notes);
y += 16 + (doc.splitTextToSize(invoice.public_notes, 300).length * doc.internal.getFontSize());
y += 16 + (doc.splitTextToSize(invoice.public_notes, 300).length * doc.internal.getFontSize());
}
if (invoice.terms) {
doc.setFontType("bold");
doc.text(layout.marginLeft, y, invoiceLabels.terms);
y += 16;
doc.setFontType("normal");
doc.text(layout.marginLeft, y, invoice.terms);
y += 16 + (doc.splitTextToSize(invoice.terms, 300).length * doc.internal.getFontSize());
y += 16 + (doc.splitTextToSize(invoice.terms, 300).length * doc.internal.getFontSize());
}
return y - origY;
@ -898,7 +900,7 @@ function calculateAmounts(invoice) {
tax = parseFloat(item.tax.rate);
} else if (item.tax_rate && parseFloat(item.tax_rate)) {
tax = parseFloat(item.tax_rate);
}
}
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) {
@ -921,11 +923,11 @@ function calculateAmounts(invoice) {
}
// custom fields with taxes
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 == '1') {
total += roundToTwo(invoice.custom_value1);
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 == '1') {
total += roundToTwo(invoice.custom_value1);
}
if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 == '1') {
total += roundToTwo(invoice.custom_value2);
total += roundToTwo(invoice.custom_value2);
}
var tax = 0;
@ -941,11 +943,11 @@ function calculateAmounts(invoice) {
}
// custom fields w/o with taxes
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') {
total += roundToTwo(invoice.custom_value1);
if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') {
total += roundToTwo(invoice.custom_value1);
}
if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 != '1') {
total += roundToTwo(invoice.custom_value2);
total += roundToTwo(invoice.custom_value2);
}
invoice.balance_amount = roundToTwo(total) - (roundToTwo(invoice.amount) - roundToTwo(invoice.balance));
@ -962,7 +964,7 @@ function getInvoiceTaxRate(invoice) {
tax = parseFloat(invoice.tax.rate);
} else if (invoice.tax_rate && parseFloat(invoice.tax_rate)) {
tax = parseFloat(invoice.tax_rate);
}
}
return tax;
}
@ -1003,9 +1005,9 @@ function displayInvoiceItems(doc, invoice, layout) {
var line = 1;
var total = 0;
var shownItem = false;
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
var currencyId = invoice && invoice.client ? invoice.client.currency_id : 1;
var tableTop = layout.tableTop;
var hideQuantity = invoice.account.hide_quantity == '1';
var hideQuantity = invoice.account.hide_quantity == '1';
doc.setFontSize(8);
for (var i=0; i<invoice.invoice_items.length; i++) {
@ -1019,12 +1021,12 @@ function displayInvoiceItems(doc, invoice, layout) {
tax = parseFloat(item.tax.rate);
} else if (item.tax_rate && parseFloat(item.tax_rate)) {
tax = parseFloat(item.tax_rate);
}
}
// show at most one blank line
if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) {
continue;
}
}
shownItem = true;
var numLines = doc.splitTextToSize(item.notes, 200).length + 2;
@ -1072,18 +1074,18 @@ function displayInvoiceItems(doc, invoice, layout) {
if (invoice.invoice_design_id == 1) {
if (i%2 == 0) {
if (i%2 == 0) {
doc.setDrawColor(255,255,255);
doc.setFillColor(246,246,246);
doc.rect(left, top, width-left, newTop-top, 'FD');
doc.setLineWidth(0.3);
doc.setLineWidth(0.3);
doc.setDrawColor(200,200,200);
doc.line(left, top, width, top);
doc.line(left, newTop, width, newTop);
doc.line(left, newTop, width, newTop);
}
} else if (invoice.invoice_design_id == 2) {
if (i%2 == 0) {
if (i%2 == 0) {
left = 0;
width = 1000;
@ -1093,17 +1095,17 @@ function displayInvoiceItems(doc, invoice, layout) {
}
} else if (invoice.invoice_design_id == 5) {
if (i%2 == 0) {
if (i%2 == 0) {
doc.setDrawColor(255,255,255);
doc.setFillColor(247,247,247);
doc.rect(left, top, width-left+17, newTop-top, 'FD');
doc.rect(left, top, width-left+17, newTop-top, 'FD');
} else {
doc.setDrawColor(255,255,255);
doc.setFillColor(232,232,232);
doc.rect(left, top, width-left+17, newTop-top, 'FD');
doc.rect(left, top, width-left+17, newTop-top, 'FD');
}
} else if (invoice.invoice_design_id == 6) {
if (i%2 == 0) {
if (i%2 == 0) {
doc.setDrawColor(232,232,232);
doc.setFillColor(232,232,232);
doc.rect(left, top, width-left, newTop-top, 'FD');
@ -1177,7 +1179,7 @@ function displayInvoiceItems(doc, invoice, layout) {
doc.line(qtyX-45, y-16,qtyX-45, y+55);
if (invoice.has_taxes) {
if (invoice.has_taxes) {
doc.line(taxX-15, y-16,taxX-15, y+55);
}
@ -1229,7 +1231,7 @@ function displayInvoiceItems(doc, invoice, layout) {
if (tax) {
doc.text(taxX, y+2, tax+'%');
}
}
}
y = tableTop + (line * layout.tableRowHeight) + (3 * layout.tablePadding);
@ -1503,6 +1505,6 @@ function roundToTwo(num, toString) {
return toString ? val.toFixed(2) : val;
}
function truncate(str, length) {
function truncate(str, length) {
return (str && str.length > length) ? (str.substr(0, length-1) + '...') : str;
}