diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 91c39b60c431..316a6c66ffd6 100755
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -64,6 +64,22 @@ class AccountController extends \BaseController {
return Redirect::to('/');
}
*/
+
+ public function demo()
+ {
+ $demoAccountId = Utils::getDemoAccountId();
+
+ if (!$demoAccountId) {
+ return Redirect::to('/');
+ }
+
+ $account = Account::find($demoAccountId);
+ $user = $account->users()->first();
+
+ Auth::login($user, true);
+
+ return Redirect::to('invoices/create');
+ }
public function getStarted()
{
diff --git a/app/controllers/ClientApiController.php b/app/controllers/ClientApiController.php
index 7ed6c9fce926..3a1abc6fd135 100644
--- a/app/controllers/ClientApiController.php
+++ b/app/controllers/ClientApiController.php
@@ -1,7 +1,6 @@
confirmed)
+ if (Auth::user()->confirmed && !Auth::user()->isDemo())
{
$message = trans("texts.emailed_{$entityType}");
$this->mailer->sendInvoice($invoice);
diff --git a/app/controllers/PaymentApiController.php b/app/controllers/PaymentApiController.php
index 9e49974dee4e..04a982dc27d4 100644
--- a/app/controllers/PaymentApiController.php
+++ b/app/controllers/PaymentApiController.php
@@ -1,7 +1,6 @@
decimal('custom_value1', 13, 2);
- $table->decimal('custom_value2', 13, 2);
+ $table->decimal('custom_value1', 13, 2)->default(0);
+ $table->decimal('custom_value2', 13, 2)->default(0);
- $table->boolean('custom_taxes1');
- $table->boolean('custom_taxes2');
+ $table->boolean('custom_taxes1')->default(0);
+ $table->boolean('custom_taxes2')->default(0);
});
}
diff --git a/app/database/seeds/PaymentLibrariesSeeder.php b/app/database/seeds/PaymentLibrariesSeeder.php
index b9dbf578be9d..e540e7390ea6 100644
--- a/app/database/seeds/PaymentLibrariesSeeder.php
+++ b/app/database/seeds/PaymentLibrariesSeeder.php
@@ -20,14 +20,14 @@ class PaymentLibrariesSeeder extends Seeder
// check that moolah exists
if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) {
DB::table('gateways')->update(['recommended' => 0]);
- DB::table('gateways')->insert([
+ Gateway::create(array(
'name' => 'moolah',
'provider' => 'AuthorizeNet_AIM',
'sort_order' => 1,
'recommended' => 1,
'site_url' => 'https://invoiceninja.mymoolah.com/',
'payment_library_id' => 1
- ]);
+ ));
}
/*
@@ -50,4 +50,4 @@ class PaymentLibrariesSeeder extends Seeder
*/
}
-}
\ No newline at end of file
+}
diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php
index 0b87b7cd9f52..876457dc22bb 100644
--- a/app/lang/en/texts.php
+++ b/app/lang/en/texts.php
@@ -443,6 +443,10 @@ return array(
'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix',
'mark_sent' => 'Mark sent',
-
+ '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.',
);
\ No newline at end of file
diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php
index 961b7bd1f6bc..2c1e9eea5711 100644
--- a/app/lang/es/texts.php
+++ b/app/lang/es/texts.php
@@ -1,437 +1,418 @@
'Organización',
- 'name' => 'Nombre',
- 'website' => 'Página Web',
- 'work_phone' => 'Teléfono',
- 'address' => 'Dirección',
- 'address1' => 'Calle',
- 'address2' => 'Bloq/Pta',
- 'city' => 'Ciudad',
- 'state' => 'Región/Provincia',
- 'postal_code' => 'Código Postal',
- 'country_id' => 'País',
- 'contacts' => 'Contactos',
- 'first_name' => 'Nombre',
- 'last_name' => 'Apellidos',
- 'phone' => 'Teléfono',
- 'email' => 'Email',
- 'additional_info' => 'Información extra',
- 'payment_terms' => 'Términos de pago',
- 'currency_id' => 'Divisa',
- 'size_id' => 'Tamaño',
- 'industry_id' => 'Industria',
- 'private_notes' => 'Notas Privadas',
- // invoice
- 'invoice' => 'Factura',
- 'client' => 'Clienta',
- 'invoice_date' => 'Fecha de factura',
- 'due_date' => 'Fecha de pago',
- 'invoice_number' => 'Número de Factura',
- 'invoice_number_short' => 'Nº de Factura',
- 'po_number' => 'Apartado de correos',
- 'po_number_short' => 'Apdo.',
- 'frequency_id' => 'Fracuencia',
- 'discount' => 'Descuento',
- 'taxes' => 'Impuestos',
- 'tax' => 'Impuesto',
- 'item' => 'Elemento',
- 'description' => 'Descripción',
- 'unit_cost' => 'Coste unitario',
- 'quantity' => 'Cantidad',
- 'line_total' => 'Total línea',
- 'subtotal' => 'Subtotal',
- 'paid_to_date' => 'Pagado',
- 'balance_due' => 'Pendiente',
- 'invoice_design_id' => 'Diseño',
- 'terms' => 'Términos',
- 'your_invoice' => 'Tu factura',
+ // 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',
- 'remove_contact' => 'Remove contact',
- 'add_contact' => 'Add contact',
- 'create_new_client' => 'Create new client',
- 'edit_client_details' => 'Edit client details',
- 'enable' => 'Enable',
- 'learn_more' => 'Learn more',
- 'manage_rates' => 'Manage rates',
- 'note_to_client' => 'Note to client',
- 'invoice_terms' => 'Invoice terms',
- 'save_as_default_terms' => 'Save as default terms',
- 'download_pdf' => 'Download PDF',
- 'pay_now' => 'Pay Now',
- 'save_invoice' => 'Save Invoice',
- 'clone_invoice' => 'Clone Invoice',
- 'archive_invoice' => 'Archive Invoice',
- 'delete_invoice' => 'Delete Invoice',
- 'email_invoice' => 'Email Invoice',
- 'enter_payment' => 'Enter Payment',
- 'tax_rates' => 'Tax Rates',
- 'rate' => 'Rate',
- 'settings' => 'Settings',
- 'enable_invoice_tax' => 'Enable specifying an invoice tax',
- 'enable_line_item_tax' => 'Enable specifying line item taxes',
+ // 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 para la factura',
+ 'enable_line_item_tax' => 'Activar impuesto por concepto',
- // navigation
- 'dashboard' => 'Dashboard',
- 'clients' => 'Clients',
- 'invoices' => 'Invoices',
- 'payments' => 'Payments',
- 'credits' => 'Credits',
- 'history' => 'History',
- 'search' => 'Search',
- 'sign_up' => 'Sign Up',
- 'guest' => 'Guest',
- 'company_details' => 'Company Details',
- 'online_payments' => 'Online Payments',
- 'notifications' => 'Notifications',
- 'import_export' => 'Import/Export',
- 'done' => 'Done',
- 'save' => 'Save',
- 'create' => 'Create',
- 'upload' => 'Upload',
- 'import' => 'Import',
- 'download' => 'Download',
- 'cancel' => 'Cancel',
- 'close' => 'Close',
- 'provide_email' => 'Please provide a valid email address',
- 'powered_by' => 'Powered by',
- 'no_items' => 'No items',
+ // 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' => 'Recurring Invoices',
- 'recurring_help' => '
Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.
- Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.
- Examples of dynamic invoice variables:
-
- - "Gym membership for the month of :MONTH" => "Gym membership for the month of July"
- - ":YEAR+1 yearly subscription" => "2015 Yearly Subscription"
- - "Retainer payment for :QUARTER+1" => "Retainer payment for Q2"
-
',
+ // recurring invoices
+ 'recurring_invoices' => 'Facturas recurrentes',
+ 'recurring_help' => 'Enviar facturas automáticamente a clientes semanalmente, bi-mensualmente, mensualmente, trimestral o anualmente.
+ Uso :MONTH, :QUARTER or :YEAR para fechas dinámicas. Matemáticas básicas también funcionan bien. Por ejemplo: :MONTH-1.
+ Ejemplos de variables dinámicas de factura:
+
+ - "Afiliación de gimnasio para el mes de:MONTH" => Afiliación de gimnasio para el mes de julio"
+ - ":YEAR+1 suscripción anual" => "2015 suscripción anual"
+ - "Retainer payment for :QUARTER+1" => "Pago anticipo de pagos para T2"
+
',
- // dashboard
- 'in_total_revenue' => 'in total revenue',
- 'billed_client' => 'billed client',
- 'billed_clients' => 'billed clients',
- 'active_client' => 'active client',
- 'active_clients' => 'active clients',
- 'invoices_past_due' => 'Invoices Past Due',
- 'upcoming_invoices' => 'Upcoming invoices',
- 'average_invoice' => 'Average invoice',
+ // 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',
+
+ // 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',
+
+ // 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 se envía',
+ 'email_viewed' => 'Avísame por email cuando una factura se visualiza',
+ 'email_paid' => 'Avísame por email cuando una factura se paga',
+ '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,
+
+ // 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',
+ ),
+
+ // 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í',
+ ],
+ 'logout' => 'Cerrar sesión',
+ 'sign_up_to_save' => 'Registrate para guardar tu trabajo',
+ 'agree_to_terms' =>'Estoy de acuerdo con los términos de Invoice Ninja :terms',
+ 'terms_of_service' => 'Términos de servicio',
+ 'email_taken' => 'Esta dirección de correo electrónico ya se ha registrado',
+ 'working' => 'Procesando',
+ 'success' => 'Éxito',
+ 'success_message' => 'Te has registrado con éxito. Por favor, haz clic en el enlace de el correo de confirmación para verificar tu dirección de correo electrónico.',
+ 'erase_data' => 'Esta acción eliminará todos tus datos de forma permanente.',
+ 'password' => 'Contraseña',
- // list pages
- 'archive' => 'Archive',
- 'delete' => 'Delete',
- 'archive_client' => 'Archive client',
- 'delete_client' => 'Delete client',
- 'archive_payment' => 'Archive payment',
- 'delete_payment' => 'Delete payment',
- 'archive_credit' => 'Archive credit',
- 'delete_credit' => 'Delete credit',
- 'show_archived_deleted' => 'Show archived/deleted',
- 'filter' => 'Filter',
- 'new_client' => 'New Client',
- 'new_invoice' => 'New Invoice',
- 'new_payment' => 'New Payment',
- 'new_credit' => 'New Credit',
- 'contact' => 'Contact',
- 'date_created' => 'Date Created',
- 'last_login' => 'Last Login',
- 'balance' => 'Balance',
- 'action' => 'Action',
- 'status' => 'Status',
- 'invoice_total' => 'Invoice Total',
- 'frequency' => 'Frequency',
- 'start_date' => 'Start Date',
- 'end_date' => 'End Date',
- 'transaction_reference' => 'Transaction Reference',
- 'method' => 'Method',
- 'payment_amount' => 'Payment Amount',
- 'payment_date' => 'Payment Date',
- 'credit_amount' => 'Credit Amount',
- 'credit_balance' => 'Credit Balance',
- 'credit_date' => 'Credit Date',
- 'empty_table' => 'No data available in table',
- 'select' => 'Select',
- 'edit_client' => 'Edit Client',
- 'edit_invoice' => 'Edit Invoice',
+ 'pro_plan_product' => 'Plan Pro',
+ 'pro_plan_description' => 'Un año de inscripción en el Plan Pro de Invoice Ninja.',
+ 'pro_plan_success' => '¡Gracias por unirte a Invoice Ninja! Al realizar el pago de tu factura, se iniciara tu PLAN PRO.',
+ 'unsaved_changes' => 'Tienes cambios no guardados',
+ 'custom_fields' => 'Campos a medida',
+ 'company_fields' => 'Campos de la empresa',
+ 'client_fields' => 'Campos del cliente',
+ 'field_label' => 'Etiqueta del campo',
+ 'field_value' => 'Valor del campo',
+ 'edit' => 'Editar',
+ 'view_as_recipient' => 'Ver como destinitario',
- // client view page
- 'create_invoice' => 'Create Invoice',
- 'enter_credit' => 'Enter Credit',
- 'last_logged_in' => 'Last logged in',
- 'details' => 'Details',
- 'standing' => 'Standing',
- 'credit' => 'Credit',
- 'activity' => 'Activity',
- 'date' => 'Date',
- 'message' => 'Message',
- 'adjustment' => 'Adjustment',
- 'are_you_sure' => 'Are you sure?',
+ // product management
+ 'product_library' => 'Inventario de productos',
+ 'product' => 'Producto',
+ 'products' => 'Productos',
+ 'fill_products' => 'Auto-rellenar productos',
+ 'fill_products_help' => 'Seleccionar un producto automáticamente configurará la descripción y coste',
+ 'update_products' => 'Auto-actualizar productos',
+ 'update_products_help' => 'Actualizar una factura automáticamente actualizará los productos',
+ 'create_product' => 'Crear Producto',
+ 'edit_product' => 'Editar Producto',
+ 'archive_product' => 'Archivar Producto',
+ 'updated_product' => 'Producto actualizado con éxito',
+ 'created_product' => 'Producto creado con éxito',
+ 'archived_product' => 'Producto archivado con éxito',
+ 'pro_plan_custom_fields' => ':link haz click para para activar campos a medida',
+ 'advanced_settings' => 'Configuración Avanzada',
+ 'pro_plan_advanced_settings' => ':link haz click para para activar la configuración avanzada',
+ 'invoice_design' => 'Diseño de factura',
+ 'specify_colors' => 'Especificar colores',
+ 'specify_colors_label' => 'Seleccionar los colores para usar en las facturas',
+ 'chart_builder' => 'Constructor de graficos',
+ 'ninja_email_footer' => 'Usa :site para facturar a tus clientes y recibir pagos de forma gratuita!',
+ 'go_pro' => 'Hazte Pro',
- // payment pages
- 'payment_type_id' => 'Payment type',
- 'amount' => 'Amount',
+ // Quotes
+ 'quote' => 'Cotización',
+ 'quotes' => 'Cotizaciones',
+ 'quote_number' => 'Numero de cotización',
+ 'quote_number_short' => 'Cotización #',
+ 'quote_date' => 'Fecha cotización',
+ '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',
- // account/company pages
- 'work_email' => 'Email',
- 'language_id' => 'Language',
- 'timezone_id' => 'Timezone',
- 'date_format_id' => 'Date format',
- 'datetime_format_id' => 'Date/Time Format',
- 'users' => 'Users',
- 'localization' => 'Localization',
- 'remove_logo' => 'Remove logo',
- 'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended height: 120px',
- 'payment_gateway' => 'Payment Gateway',
- 'gateway_id' => 'Provider',
- 'email_notifications' => 'Email Notifications',
- 'email_sent' => 'Email me when an invoice is sent',
- 'email_viewed' => 'Email me when an invoice is viewed',
- 'email_paid' => 'Email me when an invoice is paid',
- 'site_updates' => 'Site Updates',
- 'custom_messages' => 'Custom Messages',
- 'default_invoice_terms' => 'Set default invoice terms',
- 'default_email_footer' => 'Set default email signature',
- 'import_clients' => 'Import Client Data',
- 'csv_file' => 'Select CSV file',
- 'export_clients' => 'Export Client Data',
- 'select_file' => 'Please select a file',
- 'first_row_headers' => 'Use first row as headers',
- 'column' => 'Column',
- 'sample' => 'Sample',
- 'import_to' => 'Import to',
- 'client_will_create' => 'client will be created',
- 'clients_will_create' => 'clients will be created',
-
- // application messages
- 'created_client' => 'Successfully created client',
- 'created_clients' => 'Successfully created :count clients',
- 'updated_settings' => 'Successfully updated settings',
- 'removed_logo' => 'Successfully removed logo',
- 'sent_message' => 'Successfully sent message',
- 'invoice_error' => 'Please make sure to select a client and correct any errors',
- 'limit_clients' => 'Sorry, this will exceed the limit of :count clients',
- 'payment_error' => 'There was an error processing your payment. Please try again later.',
- 'registration_required' => 'Please sign up to email an invoice',
- 'confirmation_required' => 'Please confirm your email address',
-
- 'updated_client' => 'Successfully updated client',
- 'created_client' => 'Successfully created client',
- 'archived_client' => 'Successfully archived client',
- 'archived_clients' => 'Successfully archived :count clients',
- 'deleted_client' => 'Successfully deleted client',
- 'deleted_clients' => 'Successfully deleted :count clients',
-
- 'updated_invoice' => 'Successfully updated invoice',
- 'created_invoice' => 'Successfully created invoice',
- 'cloned_invoice' => 'Successfully cloned invoice',
- 'emailed_invoice' => 'Successfully emailed invoice',
- 'and_created_client' => 'and created client',
- 'archived_invoice' => 'Successfully archived invoice',
- 'archived_invoices' => 'Successfully archived :count invoices',
- 'deleted_invoice' => 'Successfully deleted invoice',
- 'deleted_invoices' => 'Successfully deleted :count invoices',
-
- 'created_payment' => 'Successfully created payment',
- 'archived_payment' => 'Successfully archived payment',
- 'archived_payments' => 'Successfully archived :count payments',
- 'deleted_payment' => 'Successfully deleted payment',
- 'deleted_payments' => 'Successfully deleted :count payments',
- 'applied_payment' => 'Successfully applied payment',
-
- 'created_credit' => 'Successfully created credit',
- 'archived_credit' => 'Successfully archived credit',
- 'archived_credits' => 'Successfully archived :count credits',
- 'deleted_credit' => 'Successfully deleted credit',
- 'deleted_credits' => 'Successfully deleted :count credits',
-
- // Emails
- 'confirmation_subject' => 'Invoice Ninja Account Confirmation',
- 'confirmation_header' => 'Account Confirmation',
- 'confirmation_message' => 'Please access the link below to confirm your account.',
- 'invoice_subject' => 'New invoice from :account',
- 'invoice_message' => 'To view your invoice for :amount, click the link below.',
- 'payment_subject' => 'Payment Received',
- 'payment_message' => 'Thank you for your payment of :amount.',
- 'email_salutation' => 'Dear :name,',
- 'email_signature' => 'Regards,',
- 'email_from' => 'The InvoiceNinja Team',
- 'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/company/notifications',
- 'invoice_link_message' => 'To view your client invoice click the link below:',
- 'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client',
- 'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client',
- 'notification_invoice_viewed_subject' => 'Invoice :invoice was viewed by :client',
- 'notification_invoice_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.',
- 'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.',
- 'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.',
- 'reset_password' => 'You can reset your account password by clicking the following link:',
- 'reset_password_footer' => 'If you did not request this password reset please email our support: ' . CONTACT_EMAIL,
-
- // Payment page
- 'secure_payment' => 'Secure Payment',
- 'card_number' => 'Card number',
- 'expiration_month' => 'Expiration month',
- 'expiration_year' => 'Expiration year',
- 'cvv' => 'CVV',
-
- // Security alerts
- 'confide' => array(
- 'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
- 'wrong_credentials' => 'Incorrect email or password.',
- 'confirmation' => 'Your account has been confirmed!',
- 'wrong_confirmation' => 'Wrong confirmation code.',
- 'password_forgot' => 'The information regarding password reset was sent to your email.',
- 'password_reset' => 'Your password has been changed successfully.',
- 'wrong_password_reset' => 'Invalid password. Try again',
- ),
-
- // Pro Plan
- 'pro_plan' => [
- 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
- 'remove_logo_link' => 'Click here',
- ],
-
- 'logout' => 'Log Out',
- 'sign_up_to_save' => 'Sign up to save your work',
- 'agree_to_terms' =>'I agree to the Invoice Ninja :terms',
- 'terms_of_service' => 'Terms of Service',
- 'email_taken' => 'The email address is already regiestered',
- 'working' => 'Working',
- 'success' => 'Success',
- 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.',
- 'erase_data' => 'This will permanently erase your data.',
- 'password' => 'Password',
-
- 'pro_plan_product' => 'Pro Plan',
- 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.',
- 'pro_plan_success' => 'Thanks for joining! Once the invoice is paid your Pro Plan membership will begin.',
-
- 'unsaved_changes' => 'You have unsaved changes',
- 'custom_fields' => 'Custom fields',
- 'company_fields' => 'Company Fields',
- 'client_fields' => 'Client Fields',
- 'field_label' => 'Field Label',
- 'field_value' => 'Field Value',
- 'edit' => 'Edit',
- 'view_as_recipient' => 'View as recipient',
-
- // product management
- 'product_library' => 'Product Library',
- 'product' => 'Product',
- 'products' => 'Products',
- 'fill_products' => 'Auto-fill products',
- 'fill_products_help' => 'Selecting a product will automatically set the description and cost',
- 'update_products' => 'Auto-update products',
- 'update_products_help' => 'Updating an invoice will automatically update the products',
- 'create_product' => 'Create Product',
- 'edit_product' => 'Edit Product',
- 'archive_product' => 'Archive Product',
- 'updated_product' => 'Successfully updated product',
- 'created_product' => 'Successfully created product',
- 'archived_product' => 'Successfully archived product',
- 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan',
-
- 'advanced_settings' => 'Advanced Settings',
- 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan',
- 'invoice_design' => 'Invoice Design',
- 'specify_colors' => 'Specify colors',
- 'specify_colors_label' => 'Select the colors used in the invoice',
-
- 'chart_builder' => 'Chart Builder',
- 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!',
- 'go_pro' => 'Go Pro',
- // Quotes
- 'quote' => 'Quote',
- 'quotes' => 'Quotes',
- 'quote_number' => 'Quote Number',
- 'quote_number_short' => 'Quote #',
- 'quote_date' => 'Quote Date',
- 'quote_total' => 'Quote Total',
- 'your_quote' => 'Your Quote',
- 'total' => 'Total',
- 'clone' => 'Clone',
-
- 'new_quote' => 'New Quote',
- 'create_quote' => 'Create Quote',
- 'edit_quote' => 'Edit Quote',
- 'archive_quote' => 'Archive Quote',
- 'delete_quote' => 'Delete Quote',
- 'save_quote' => 'Save Quote',
- 'email_quote' => 'Email Quote',
- 'clone_quote' => 'Clone Quote',
- 'convert_to_invoice' => 'Convert to Invoice',
- 'view_invoice' => 'View Invoice',
- 'view_quote' => 'View Quote',
- 'view_client' => 'View Client',
-
- 'updated_quote' => 'Successfully updated quote',
- 'created_quote' => 'Successfully created quote',
- 'cloned_quote' => 'Successfully cloned quote',
- 'emailed_quote' => 'Successfully emailed quote',
- 'archived_quote' => 'Successfully archived quote',
- 'archived_quotes' => 'Successfully archived :count quotes',
- 'deleted_quote' => 'Successfully deleted quote',
- 'deleted_quotes' => 'Successfully deleted :count quotes',
- 'converted_to_invoice' => 'Successfully converted quote to invoice',
-
- 'quote_subject' => 'New quote from :account',
- 'quote_message' => 'To view your quote for :amount, click the link below.',
- 'quote_link_message' => 'To view your client quote click the link below:',
- 'notification_quote_sent_subject' => 'Quote :invoice was sent to :client',
- 'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client',
- 'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.',
- 'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.',
-
- 'session_expired' => 'Your session has expired.',
-
- 'invoice_fields' => 'Invoice Fields',
- 'invoice_options' => 'Invoice Options',
- 'hide_quantity' => 'Hide quantity',
- 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.',
- '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',
- 'user_management' => 'User Management',
- 'add_user' => 'Add User',
- 'send_invite' => 'Send invitation',
- 'sent_invite' => 'Successfully sent invitation',
- 'updated_user' => 'Successfully updated user',
- 'invitation_message' => 'You\'ve been invited by :invitor. ',
- 'register_to_add_user' => 'Please sign up to add a user',
- 'user_state' => 'State',
- 'edit_user' => 'Edit User',
- 'delete_user' => 'Delete User',
- 'active' => 'Active',
- 'pending' => 'Pending',
- 'deleted_user' => 'Successfully deleted user',
- 'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users',
-
- '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?',
-
- 'cancel_account' => 'Cancel Account',
- 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.',
- 'go_back' => 'Go Back',
-
- 'data_visualizations' => 'Data Visualizations',
- 'sample_data' => 'Sample data shown',
- 'hide' => 'Hide',
- 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version',
-
- 'invoice_settings' => 'Invoice Settings',
- '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',
- 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix',
- 'mark_sent' => 'Mark sent',
-
-
);
diff --git a/app/libraries/utils.php b/app/libraries/utils.php
index 493a9168b7f1..ee9318c4d7b1 100755
--- a/app/libraries/utils.php
+++ b/app/libraries/utils.php
@@ -31,7 +31,7 @@ class Utils
{
return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV'];
}
-
+
public static function isPro()
{
return Auth::check() && Auth::user()->isPro();
@@ -46,6 +46,16 @@ class Utils
}
}
+ public static function getDemoAccountId()
+ {
+ return isset($_ENV[DEMO_ACCOUNT_ID]) ? $_ENV[DEMO_ACCOUNT_ID] : false;
+ }
+
+ public static function isDemo()
+ {
+ return Auth::check() && Auth::user()->isDemo();
+ }
+
public static function getNewsFeedResponse($userType = false)
{
if (!$userType) {
diff --git a/app/models/Gateway.php b/app/models/Gateway.php
index 7d84a7db32ec..5589255841a3 100755
--- a/app/models/Gateway.php
+++ b/app/models/Gateway.php
@@ -2,7 +2,7 @@
class Gateway extends Eloquent
{
- public $timestamps = false;
+ public $timestamps = true;
protected $softDelete = false;
public function paymentlibrary()
@@ -14,6 +14,23 @@ class Gateway extends Eloquent
{
return '/images/gateways/logo_'.$this->provider.'.png';
}
+
+ public function getHelp()
+ {
+ $link = '';
+
+ if ($this->id == GATEWAY_AUTHORIZE_NET || $this->id == GATEWAY_AUTHORIZE_NET_SIM) {
+ $link = 'http://reseller.authorize.net/application/?id=5560364';
+ } else if ($this->id == GATEWAY_PAYPAL_EXPRESS) {
+ $link = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run';
+ } else if ($this->id == GATEWAY_TWO_CHECKOUT) {
+ $link = 'https://www.2checkout.com/referral?r=2c37ac2298';
+ }
+
+ $key = 'texts.gateway_help_' . $this->id;
+ $str = trans($key, ['link' => "Click here"]);
+ return $key != $str ? $str : '';
+ }
public function getFields()
{
@@ -36,4 +53,4 @@ class Gateway extends Eloquent
return $fields;
}
-}
\ No newline at end of file
+}
diff --git a/app/models/User.php b/app/models/User.php
index 130fc139c05c..60e7500c9dcd 100755
--- a/app/models/User.php
+++ b/app/models/User.php
@@ -80,6 +80,11 @@ class User extends ConfideUser implements UserInterface, RemindableInterface
return $this->account->isPro();
}
+ public function isDemo()
+ {
+ return $this->account->id == Utils::getDemoAccountId();
+ }
+
public function getDisplayName()
{
if ($this->getFullName())
diff --git a/app/ninja/repositories/InvoiceRepository.php b/app/ninja/repositories/InvoiceRepository.php
index c4b3638dabc7..2b0f96262ed1 100755
--- a/app/ninja/repositories/InvoiceRepository.php
+++ b/app/ninja/repositories/InvoiceRepository.php
@@ -207,7 +207,7 @@ class InvoiceRepository
$invoice->client_id = $data['client_id'];
$invoice->discount = Utils::parseFloat($data['discount']);
$invoice->invoice_number = trim($data['invoice_number']);
- $invoice->is_recurring = $data['is_recurring'] ? true : false;
+ $invoice->is_recurring = $data['is_recurring'] && !Utils::isDemo() ? true : false;
$invoice->invoice_date = Utils::toSqlDate($data['invoice_date']);
if ($invoice->is_recurring)
@@ -336,8 +336,8 @@ class InvoiceRepository
$invoiceItem = InvoiceItem::createNew();
$invoiceItem->product_id = isset($product) ? $product->id : null;
- $invoiceItem->product_key = trim($item->product_key);
- $invoiceItem->notes = trim($item->notes);
+ $invoiceItem->product_key = trim($invoice->is_recurring ? $item->product_key : Utils::processVariables($item->product_key));
+ $invoiceItem->notes = trim($invoice->is_recurring ? $item->notes : Utils::processVariables($item->notes));
$invoiceItem->cost = Utils::parseFloat($item->cost);
$invoiceItem->qty = Utils::parseFloat($item->qty);
$invoiceItem->tax_rate = 0;
@@ -367,7 +367,7 @@ class InvoiceRepository
$clone = Invoice::createNew($invoice);
$clone->balance = $invoice->amount;
- $clone->invoice_number = $invoice->account->getNextInvoiceNumber($invoice->is_quote);
+ $clone->invoice_number = $invoice->account->getNextInvoiceNumber();
foreach ([
'client_id',
diff --git a/app/ninja/repositories/PaymentRepository.php b/app/ninja/repositories/PaymentRepository.php
index f19b2ffb5830..31126b13c868 100755
--- a/app/ninja/repositories/PaymentRepository.php
+++ b/app/ninja/repositories/PaymentRepository.php
@@ -76,11 +76,13 @@ class PaymentRepository
}
$paymentTypeId = $input['payment_type_id'] ? $input['payment_type_id'] : null;
+ $clientId = Client::getPrivateId($input['client']);
$amount = Utils::parseFloat($input['amount']);
if ($paymentTypeId == PAYMENT_TYPE_CREDIT)
{
- $credits = Credit::scope()->where('balance', '>', 0)->orderBy('created_at')->get();
+ $credits = Credit::scope()->where('client_id', '=', $clientId)
+ ->where('balance', '>', 0)->orderBy('created_at')->get();
$applied = 0;
foreach ($credits as $credit)
@@ -94,7 +96,7 @@ class PaymentRepository
}
}
- $payment->client_id = Client::getPrivateId($input['client']);
+ $payment->client_id = $clientId;
$payment->invoice_id = isset($input['invoice']) && $input['invoice'] != "-1" ? Invoice::getPrivateId($input['invoice']) : null;
$payment->payment_type_id = $paymentTypeId;
$payment->payment_date = Utils::toSqlDate($input['payment_date']);
diff --git a/app/routes.php b/app/routes.php
index 84874dfcc920..f41f95a68728 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -67,6 +67,7 @@ Route::get('logout', 'UserController@logout');
if (Utils::isNinja()) {
Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed');
+ Route::get('/demo', 'AccountController@demo');
}
Route::group(array('before' => 'auth'), function()
@@ -225,7 +226,10 @@ define('PAYMENT_LIBRARY_OMNIPAY', 1);
define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2);
define('GATEWAY_AUTHORIZE_NET', 1);
+define('GATEWAY_AUTHORIZE_NET_SIM', 2);
define('GATEWAY_PAYPAL_EXPRESS', 17);
+define('GATEWAY_STRIPE', 23);
+define('GATEWAY_TWO_CHECKOUT', 27);
define('GATEWAY_BEANSTREAM', 29);
define('GATEWAY_PSIGATE', 30);
define('GATEWAY_MOOLAH', 31);
@@ -236,6 +240,7 @@ define('EVENT_CREATE_QUOTE', 3);
define('EVENT_CREATE_PAYMENT', 4);
define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN');
+define('DEMO_ACCOUNT_ID', 'DEMO_ACCOUNT_ID');
define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
diff --git a/app/views/accounts/payments.blade.php b/app/views/accounts/payments.blade.php
index 73684db59234..dab8c7044285 100755
--- a/app/views/accounts/payments.blade.php
+++ b/app/views/accounts/payments.blade.php
@@ -57,6 +57,15 @@
@endif
@endforeach
+
+ @if($gateway->getHelp())
+
+ @endif
@endforeach
diff --git a/app/views/header.blade.php b/app/views/header.blade.php
index 343a803aa5fc..04ddb6b0c84f 100755
--- a/app/views/header.blade.php
+++ b/app/views/header.blade.php
@@ -15,7 +15,7 @@
/* Fix for header covering stuff when the screen is narrower */
@media screen and (min-width: 1200px) {
body {
- padding-top: 50px;
+ padding-top: 56px;
}
}
diff --git a/app/views/invoices/pdf.blade.php b/app/views/invoices/pdf.blade.php
index 6369d0ca376c..d5f863582833 100644
--- a/app/views/invoices/pdf.blade.php
+++ b/app/views/invoices/pdf.blade.php
@@ -17,9 +17,11 @@
logoImages.imageLogoHeight3 = 81/2;
@if (file_exists($account->getLogoPath()))
+ if (window.invoice) {
invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}";
invoice.imageWidth = {{ $account->getLogoWidth() }};
invoice.imageHeight = {{ $account->getLogoHeight() }};
+ }
@endif
var NINJA = NINJA || {};
diff --git a/app/views/master.blade.php b/app/views/master.blade.php
index e80fd0295d88..b3a1c0673b05 100755
--- a/app/views/master.blade.php
+++ b/app/views/master.blade.php
@@ -1,8 +1,8 @@
- Invoice Ninja | {{ isset($title) ? $title : ' Free Online Invoice Templates & Generator' }}
-
+ Invoice Ninja | {{ isset($title) ? $title : ' Free Open-Source Online Invoice Software' }}
+
diff --git a/app/views/public/faq.blade.php b/app/views/public/faq.blade.php
index 912449426bc3..e075ea1786ff 100644
--- a/app/views/public/faq.blade.php
+++ b/app/views/public/faq.blade.php
@@ -162,6 +162,15 @@
+ @if (Utils::getDemoAccountId())
+
+ @endif
I hear that there's a version of Invoice Ninja
that I can install myself on my own servers? Where can I learn more about this?
diff --git a/public/built.js b/public/built.js
index 104b3b811ae7..22ef0d0f61e5 100644
--- a/public/built.js
+++ b/public/built.js
@@ -31741,7 +31741,6 @@ function concatStrings() {
return data.length ? concatStr : false;
}
-//function displayGrid(doc, invoice, data, x, y, layout, hasheader, rightAlignX, rightAlignTitleX) {
function displayGrid(doc, invoice, data, x, y, layout, options) {
var numLines = 0;
var origY = y;
@@ -31792,6 +31791,8 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
if (key.substring(0, 6) === 'custom') {
key = invoice.account[key];
+ } else if (key === 'tax' && invoice.tax_rate) {
+ key = invoiceLabels[key] + ' ' + (invoice.tax_rate*1).toString() + '%';
} else {
key = invoiceLabels[key];
}
@@ -31986,10 +31987,8 @@ function displayInvoiceItems(doc, invoice, layout) {
shownItem = true;
// process date variables
- if (invoice.is_recurring) {
- notes = processVariables(notes);
- productKey = processVariables(productKey);
- }
+ notes = processVariables(notes);
+ productKey = processVariables(productKey);
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) {
diff --git a/public/js/script.js b/public/js/script.js
index 6eb12228cfff..723719949794 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -782,7 +782,6 @@ function concatStrings() {
return data.length ? concatStr : false;
}
-//function displayGrid(doc, invoice, data, x, y, layout, hasheader, rightAlignX, rightAlignTitleX) {
function displayGrid(doc, invoice, data, x, y, layout, options) {
var numLines = 0;
var origY = y;
@@ -833,6 +832,8 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
if (key.substring(0, 6) === 'custom') {
key = invoice.account[key];
+ } else if (key === 'tax' && invoice.tax_rate) {
+ key = invoiceLabels[key] + ' ' + (invoice.tax_rate*1).toString() + '%';
} else {
key = invoiceLabels[key];
}
@@ -1027,10 +1028,8 @@ function displayInvoiceItems(doc, invoice, layout) {
shownItem = true;
// process date variables
- if (invoice.is_recurring) {
- notes = processVariables(notes);
- productKey = processVariables(productKey);
- }
+ notes = processVariables(notes);
+ productKey = processVariables(productKey);
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) {