This commit is contained in:
Troels Liebe Bentsen 2014-10-20 19:10:04 +02:00
commit 68a53db5bb
23 changed files with 517 additions and 463 deletions

View File

@ -65,6 +65,22 @@ class AccountController extends \BaseController {
} }
*/ */
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() public function getStarted()
{ {
if (Auth::check()) if (Auth::check())

View File

@ -1,7 +1,6 @@
<?php <?php
use ninja\repositories\ClientRepository; use ninja\repositories\ClientRepository;
use Client;
class ClientApiController extends Controller { class ClientApiController extends Controller {

View File

@ -1,7 +1,6 @@
<?php <?php
use ninja\repositories\InvoiceRepository; use ninja\repositories\InvoiceRepository;
use Invoice;
class InvoiceApiController extends Controller { class InvoiceApiController extends Controller {

View File

@ -357,7 +357,7 @@ class InvoiceController extends \BaseController {
} }
else if ($action == 'email') else if ($action == 'email')
{ {
if (Auth::user()->confirmed) if (Auth::user()->confirmed && !Auth::user()->isDemo())
{ {
$message = trans("texts.emailed_{$entityType}"); $message = trans("texts.emailed_{$entityType}");
$this->mailer->sendInvoice($invoice); $this->mailer->sendInvoice($invoice);

View File

@ -1,7 +1,6 @@
<?php <?php
use ninja\repositories\PaymentRepository; use ninja\repositories\PaymentRepository;
use Payment;
class PaymentApiController extends Controller { class PaymentApiController extends Controller {

View File

@ -1,7 +1,6 @@
<?php <?php
use ninja\repositories\InvoiceRepository; use ninja\repositories\InvoiceRepository;
use Invoice;
class QuoteApiController extends Controller { class QuoteApiController extends Controller {

View File

@ -26,11 +26,11 @@ class SupportHidingQuantity extends Migration {
Schema::table('invoices', function($table) Schema::table('invoices', function($table)
{ {
$table->decimal('custom_value1', 13, 2); $table->decimal('custom_value1', 13, 2)->default(0);
$table->decimal('custom_value2', 13, 2); $table->decimal('custom_value2', 13, 2)->default(0);
$table->boolean('custom_taxes1'); $table->boolean('custom_taxes1')->default(0);
$table->boolean('custom_taxes2'); $table->boolean('custom_taxes2')->default(0);
}); });
} }

View File

@ -20,14 +20,14 @@ class PaymentLibrariesSeeder extends Seeder
// check that moolah exists // check that moolah exists
if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) { if (!DB::table('gateways')->where('name', '=', 'moolah')->get()) {
DB::table('gateways')->update(['recommended' => 0]); DB::table('gateways')->update(['recommended' => 0]);
DB::table('gateways')->insert([ Gateway::create(array(
'name' => 'moolah', 'name' => 'moolah',
'provider' => 'AuthorizeNet_AIM', 'provider' => 'AuthorizeNet_AIM',
'sort_order' => 1, 'sort_order' => 1,
'recommended' => 1, 'recommended' => 1,
'site_url' => 'https://invoiceninja.mymoolah.com/', 'site_url' => 'https://invoiceninja.mymoolah.com/',
'payment_library_id' => 1 'payment_library_id' => 1
]); ));
} }
/* /*

View File

@ -443,6 +443,10 @@ return array(
'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix',
'mark_sent' => 'Mark sent', '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.',
); );

View File

@ -1,437 +1,418 @@
<?php <?php
return array( return array(
// client // client
'organization' => 'Organización', 'organization' => 'Empresa',
'name' => 'Nombre', 'name' => 'Nombre', //Razon social-Colombia,
'website' => 'Página Web', 'website' => 'Sitio Web',
'work_phone' => 'Teléfono', 'work_phone' => 'Teléfono',
'address' => 'Dirección', 'address' => 'Dirección',
'address1' => 'Calle', 'address1' => 'Calle',
'address2' => 'Bloq/Pta', 'address2' => 'Bloq/Pta',
'city' => 'Ciudad', 'city' => 'Ciudad',
'state' => 'Región/Provincia', 'state' => 'Región/Provincia', //Departamento-Colombia, Comarca-Panama
'postal_code' => 'Código Postal', 'postal_code' => 'Código Postal',
'country_id' => 'País', 'country_id' => 'País',
'contacts' => 'Contactos', 'contacts' => 'Contactos',
'first_name' => 'Nombre', 'first_name' => 'Nombres',
'last_name' => 'Apellidos', 'last_name' => 'Apellidos',
'phone' => 'Teléfono', 'phone' => 'Teléfono',
'email' => 'Email', 'email' => 'Email',
'additional_info' => 'Información extra', 'additional_info' => 'Información adicional',
'payment_terms' => 'Términos de pago', 'payment_terms' => 'Plazos de pago', //
'currency_id' => 'Divisa', 'currency_id' => 'Divisa',
'size_id' => 'Tamaño', 'size_id' => 'Tamaño',
'industry_id' => 'Industria', 'industry_id' => 'Industria',
'private_notes' => 'Notas Privadas', 'private_notes' => 'Notas Privadas',
// invoice // invoice
'invoice' => 'Factura', 'invoice' => 'Factura de venta', //Factura de Venta-Colombia
'client' => 'Clienta', 'client' => 'Cliente',
'invoice_date' => 'Fecha de factura', 'invoice_date' => 'Fecha de factura',
'due_date' => 'Fecha de pago', 'due_date' => 'Fecha de pago',
'invoice_number' => 'Número de Factura', 'invoice_number' => 'Número de Factura',
'invoice_number_short' => 'Nº de Factura', 'invoice_number_short' => 'Factura #',
'po_number' => 'Apartado de correos', 'po_number' => 'Apartado de correo',
'po_number_short' => 'Apdo.', 'po_number_short' => 'Apdo.',
'frequency_id' => 'Fracuencia', 'frequency_id' => 'Frecuencia',
'discount' => 'Descuento', 'discount' => 'Descuento',
'taxes' => 'Impuestos', 'taxes' => 'Impuestos',
'tax' => 'Impuesto', 'tax' => 'Impuesto', //IVA for almost all latinamerica, ISV-Honduras, ITBMS-Panama, IV-Costa Rica, ITBIS- Republica Dominicana, IVU-Puerto Rico
'item' => 'Elemento', 'item' => 'Concepto',
'description' => 'Descripción', 'description' => 'Descripción',
'unit_cost' => 'Coste unitario', 'unit_cost' => 'Coste unitario',
'quantity' => 'Cantidad', 'quantity' => 'Cantidad',
'line_total' => 'Total línea', 'line_total' => 'Total',
'subtotal' => 'Subtotal', 'subtotal' => 'Subtotal',
'paid_to_date' => 'Pagado', 'paid_to_date' => 'Pagado',
'balance_due' => 'Pendiente', 'balance_due' => 'Pendiente',
'invoice_design_id' => 'Diseño', 'invoice_design_id' => 'Diseño',
'terms' => 'Términos', 'terms' => 'Términos',
'your_invoice' => 'Tu factura', 'your_invoice' => 'Tu factura',
'remove_contact' => 'Eliminar contacto',
'remove_contact' => 'Remove contact', 'add_contact' => 'Añadir contacto',
'add_contact' => 'Add contact', 'create_new_client' => 'Crear nuevo cliente',
'create_new_client' => 'Create new client', 'edit_client_details' => 'Editar detalles del cliente',
'edit_client_details' => 'Edit client details', 'enable' => 'Activar',
'enable' => 'Enable', 'learn_more' => 'Aprender más',
'learn_more' => 'Learn more', 'manage_rates' => 'Gestionar tarifas',
'manage_rates' => 'Manage rates', 'note_to_client' => 'Nota para el cliente',
'note_to_client' => 'Note to client', 'invoice_terms' => 'Términos de facturación',
'invoice_terms' => 'Invoice terms', 'save_as_default_terms' => 'Guardar como términos por defecto',
'save_as_default_terms' => 'Save as default terms', 'download_pdf' => 'Descargar PDF',
'download_pdf' => 'Download PDF', 'pay_now' => 'Pagar ahora',
'pay_now' => 'Pay Now', 'save_invoice' => 'Guardar factura',
'save_invoice' => 'Save Invoice', 'clone_invoice' => 'Clonar factura',
'clone_invoice' => 'Clone Invoice', 'archive_invoice' => 'Archivar factura',
'archive_invoice' => 'Archive Invoice', 'delete_invoice' => 'Eliminar factura',
'delete_invoice' => 'Delete Invoice', 'email_invoice' => 'Enviar factura por correo',
'email_invoice' => 'Email Invoice', 'enter_payment' => 'Agregar pago',
'enter_payment' => 'Enter Payment', 'tax_rates' => 'Tasas de impuesto',
'tax_rates' => 'Tax Rates', 'rate' => 'Tasas',
'rate' => 'Rate', 'settings' => 'Configuración',
'settings' => 'Settings', 'enable_invoice_tax' => 'Activar impuesto <b>para la factura</b>',
'enable_invoice_tax' => 'Enable specifying an <b>invoice tax</b>', 'enable_line_item_tax' => 'Activar impuesto <b>por concepto</b>',
'enable_line_item_tax' => 'Enable specifying <b>line item taxes</b>',
// navigation // navigation
'dashboard' => 'Dashboard', 'dashboard' => 'Inicio',
'clients' => 'Clients', 'clients' => 'Clientes',
'invoices' => 'Invoices', 'invoices' => 'Facturas',
'payments' => 'Payments', 'payments' => 'Pagos',
'credits' => 'Credits', 'credits' => 'Créditos',
'history' => 'History', 'history' => 'Historial',
'search' => 'Search', 'search' => 'Búsqueda',
'sign_up' => 'Sign Up', 'sign_up' => 'registrate',
'guest' => 'Guest', 'guest' => 'invitado',
'company_details' => 'Company Details', 'company_details' => 'Detalles de la empresa',
'online_payments' => 'Online Payments', 'online_payments' => 'Pagos en linea',
'notifications' => 'Notifications', 'notifications' => 'Notificaciones',
'import_export' => 'Import/Export', 'import_export' => 'Importar/Exportar',
'done' => 'Done', 'done' => 'Hecho',
'save' => 'Save', 'save' => 'Guardar',
'create' => 'Create', 'create' => 'Crear',
'upload' => 'Upload', 'upload' => 'Subir',
'import' => 'Import', 'import' => 'Importar',
'download' => 'Download', 'download' => 'Descargar',
'cancel' => 'Cancel', 'cancel' => 'Cancelar',
'close' => 'Close', 'close' => 'Cerrar',
'provide_email' => 'Please provide a valid email address', 'provide_email' => 'Por favor facilita una dirección de correo válida.',
'powered_by' => 'Powered by', 'powered_by' => 'Plataforma por ',
'no_items' => 'No items', 'no_items' => 'No hay data',
// recurring invoices // recurring invoices
'recurring_invoices' => 'Recurring Invoices', 'recurring_invoices' => 'Facturas recurrentes',
'recurring_help' => '<p>Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually. </p> 'recurring_help' => '<p>Enviar facturas automáticamente a clientes semanalmente, bi-mensualmente, mensualmente, trimestral o anualmente. </p>
<p>Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.</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>Examples of dynamic invoice variables:</p> <p>Ejemplos de variables dinámicas de factura:</p>
<ul> <ul>
<li>"Gym membership for the month of :MONTH" => "Gym membership for the month of July"</li> <li>"Afiliación de gimnasio para el mes de:MONTH" => Afiliación de gimnasio para el mes de julio"</li>
<li>":YEAR+1 yearly subscription" => "2015 Yearly Subscription"</li> <li>":YEAR+1 suscripción anual" => "2015 suscripción anual"</li>
<li>"Retainer payment for :QUARTER+1" => "Retainer payment for Q2"</li> <li>"Retainer payment for :QUARTER+1" => "Pago anticipo de pagos para T2"</li>
</ul>', </ul>',
// dashboard // dashboard
'in_total_revenue' => 'in total revenue', 'in_total_revenue' => 'ingreso total',
'billed_client' => 'billed client', 'billed_client' => 'cliente facturado',
'billed_clients' => 'billed clients', 'billed_clients' => 'clientes facturados',
'active_client' => 'active client', 'active_client' => 'cliente activo',
'active_clients' => 'active clients', 'active_clients' => 'clientes activos',
'invoices_past_due' => 'Invoices Past Due', 'invoices_past_due' => 'Facturas vencidas',
'upcoming_invoices' => 'Upcoming invoices', 'upcoming_invoices' => 'Próximas facturas',
'average_invoice' => 'Average invoice', 'average_invoice' => 'Promedio de facturación',
// list pages // list pages
'archive' => 'Archive', 'archive' => 'Archivar',
'delete' => 'Delete', 'delete' => 'Eliminar',
'archive_client' => 'Archive client', 'archive_client' => 'Archivar cliente',
'delete_client' => 'Delete client', 'delete_client' => 'Eliminar cliente',
'archive_payment' => 'Archive payment', 'archive_payment' => 'Archivar pago',
'delete_payment' => 'Delete payment', 'delete_payment' => 'Eliminar pago',
'archive_credit' => 'Archive credit', 'archive_credit' => 'Archivar crédito',
'delete_credit' => 'Delete credit', 'delete_credit' => 'Eliminar crédito',
'show_archived_deleted' => 'Show archived/deleted', 'show_archived_deleted' => 'Mostrar archivados/eliminados',
'filter' => 'Filter', 'filter' => 'Filtrar',
'new_client' => 'New Client', 'new_client' => 'Nuevo cliente',
'new_invoice' => 'New Invoice', 'new_invoice' => 'Nueva factura',
'new_payment' => 'New Payment', 'new_payment' => 'Nuevo pago',
'new_credit' => 'New Credit', 'new_credit' => 'Nuevo crédito',
'contact' => 'Contact', 'contact' => 'Contacto',
'date_created' => 'Date Created', 'date_created' => 'Fecha de creación',
'last_login' => 'Last Login', 'last_login' => 'Último acceso',
'balance' => 'Balance', 'balance' => 'Balance',
'action' => 'Action', 'action' => 'Acción',
'status' => 'Status', 'status' => 'Estado',
'invoice_total' => 'Invoice Total', 'invoice_total' => 'Total facturado',
'frequency' => 'Frequency', 'frequency' => 'Frequencia',
'start_date' => 'Start Date', 'start_date' => 'Fecha de inicio',
'end_date' => 'End Date', 'end_date' => 'Fecha de finalización',
'transaction_reference' => 'Transaction Reference', 'transaction_reference' => 'Referencia de transacción',
'method' => 'Method', 'method' => 'Método',
'payment_amount' => 'Payment Amount', 'payment_amount' => 'Valor del pago',
'payment_date' => 'Payment Date', 'payment_date' => 'Fecha de Pago',
'credit_amount' => 'Credit Amount', 'credit_amount' => 'Cantidad de Crédito',
'credit_balance' => 'Credit Balance', 'credit_balance' => 'Balance de Crédito',
'credit_date' => 'Credit Date', 'credit_date' => 'Fecha de Crédito',
'empty_table' => 'No data available in table', 'empty_table' => 'Tabla vacía',
'select' => 'Select', 'select' => 'Seleccionar',
'edit_client' => 'Edit Client', 'edit_client' => 'Editar Cliente',
'edit_invoice' => 'Edit Invoice', 'edit_invoice' => 'Editar Factura',
// client view page // client view page
'create_invoice' => 'Create Invoice', 'create_invoice' => 'Crear Factura',
'enter_credit' => 'Enter Credit', 'enter_credit' => 'Agregar Crédito',
'last_logged_in' => 'Last logged in', 'last_logged_in' => 'Último inicio de sesión',
'details' => 'Details', 'details' => 'Detalles',
'standing' => 'Standing', 'standing' => 'Standing', //What is this for, context of it's use
'credit' => 'Credit', 'credit' => 'Crédito',
'activity' => 'Activity', 'activity' => 'Actividad',
'date' => 'Date', 'date' => 'Fecha',
'message' => 'Message', 'message' => 'Mensaje',
'adjustment' => 'Adjustment', 'adjustment' => 'Ajustes',
'are_you_sure' => 'Are you sure?', 'are_you_sure' => '¿Estás seguro?',
// payment pages // payment pages
'payment_type_id' => 'Payment type', 'payment_type_id' => 'Tipo de pago',
'amount' => 'Amount', 'amount' => 'Cantidad',
// account/company pages // account/company pages
'work_email' => 'Email', 'work_email' => 'Correo electrónico de la empresa',
'language_id' => 'Language', 'language_id' => 'Idioma',
'timezone_id' => 'Timezone', 'timezone_id' => 'Zona horaria',
'date_format_id' => 'Date format', 'date_format_id' => 'Formato de fecha',
'datetime_format_id' => 'Date/Time Format', 'datetime_format_id' => 'Format de fecha/hora',
'users' => 'Users', 'users' => 'Usuarios',
'localization' => 'Localization', 'localization' => 'Localización',
'remove_logo' => 'Remove logo', 'remove_logo' => 'Eliminar logo',
'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended height: 120px', 'logo_help' => 'Formatos aceptados: JPEG, GIF y PNG. Altura recomendada: 120px',
'payment_gateway' => 'Payment Gateway', 'payment_gateway' => 'Pasarela de pago',
'gateway_id' => 'Provider', 'gateway_id' => 'Proveedor',
'email_notifications' => 'Email Notifications', 'email_notifications' => 'Notificaciones de email',
'email_sent' => 'Email me when an invoice is <b>sent</b>', 'email_sent' => 'Avísame por email cuando una factura <b>se envía</b>',
'email_viewed' => 'Email me when an invoice is <b>viewed</b>', 'email_viewed' => 'Avísame por email cuando una factura <b>se visualiza</b>',
'email_paid' => 'Email me when an invoice is <b>paid</b>', 'email_paid' => 'Avísame por email cuando una factura <b>se paga</b>',
'site_updates' => 'Site Updates', 'site_updates' => 'Actualizaciones del sitio',
'custom_messages' => 'Custom Messages', 'custom_messages' => 'Mensajes a medida',
'default_invoice_terms' => 'Set default invoice terms', 'default_invoice_terms' => 'Configurar términos de factura por defecto',
'default_email_footer' => 'Set default email signature', 'default_email_footer' => 'Configurar firma de email por defecto',
'import_clients' => 'Import Client Data', 'import_clients' => 'Importar datos del cliente',
'csv_file' => 'Select CSV file', 'csv_file' => 'Seleccionar archivo CSV',
'export_clients' => 'Export Client Data', 'export_clients' => 'Exportar datos del cliente',
'select_file' => 'Please select a file', 'select_file' => 'Seleccionar archivo',
'first_row_headers' => 'Use first row as headers', 'first_row_headers' => 'Usar la primera fila como encabezados',
'column' => 'Column', 'column' => 'Columna',
'sample' => 'Sample', 'sample' => 'Ejemplo',
'import_to' => 'Import to', 'import_to' => 'Importar a',
'client_will_create' => 'client will be created', 'client_will_create' => 'cliente se creará', //What is this for, context of it's use
'clients_will_create' => 'clients will be created', 'clients_will_create' => 'clientes se crearan', //What is this for, context of it's use
// application messages // application messages
'created_client' => 'Successfully created client', 'created_client' => 'cliente creado con éxito',
'created_clients' => 'Successfully created :count clients', 'created_clients' => ':count clientes creados con éxito',
'updated_settings' => 'Successfully updated settings', 'updated_settings' => 'Configuración actualizada con éxito',
'removed_logo' => 'Successfully removed logo', 'removed_logo' => 'Logo eliminado con éxito',
'sent_message' => 'Successfully sent message', 'sent_message' => 'Mensaje enviado con éxito',
'invoice_error' => 'Please make sure to select a client and correct any errors', 'invoice_error' => 'Seleccionar cliente y corregir errores.',
'limit_clients' => 'Sorry, this will exceed the limit of :count clients', 'limit_clients' => 'Lo sentimos, se ha pasado del límite de :count clientes',
'payment_error' => 'There was an error processing your payment. Please try again later.', 'payment_error' => 'Ha habido un error en el proceso de tu pago. Inténtalo de nuevo más tarde.',
'registration_required' => 'Please sign up to email an invoice', 'registration_required' => 'Inscríbete para enviar una factura',
'confirmation_required' => 'Please confirm your email address', 'confirmation_required' => 'Por favor confirma tu dirección de correo electrónico',
'updated_client' => 'Cliente actualizado con éxito',
'updated_client' => 'Successfully updated client', 'created_client' => 'Cliente creado con éxito',
'created_client' => 'Successfully created client', 'archived_client' => 'Cliente archivado con éxito',
'archived_client' => 'Successfully archived client', 'archived_clients' => ':count clientes archivados con éxito',
'archived_clients' => 'Successfully archived :count clients', 'deleted_client' => 'Cliente eliminado con éxito',
'deleted_client' => 'Successfully deleted client', 'deleted_clients' => ':count clientes eliminados con éxito',
'deleted_clients' => 'Successfully deleted :count clients', 'updated_invoice' => 'Factura actualizada con éxito',
'created_invoice' => 'Factura creada con éxito',
'updated_invoice' => 'Successfully updated invoice', 'cloned_invoice' => 'Factura clonada con éxito',
'created_invoice' => 'Successfully created invoice', 'emailed_invoice' => 'Factura enviada con éxito',
'cloned_invoice' => 'Successfully cloned invoice', 'and_created_client' => 'y cliente creado ',
'emailed_invoice' => 'Successfully emailed invoice', 'archived_invoice' => 'Factura archivada con éxito',
'and_created_client' => 'and created client', 'archived_invoices' => ':count facturas archivados con éxito',
'archived_invoice' => 'Successfully archived invoice', 'deleted_invoice' => 'Factura eliminada con éxito',
'archived_invoices' => 'Successfully archived :count invoices', 'deleted_invoices' => ':count facturas eliminadas con éxito',
'deleted_invoice' => 'Successfully deleted invoice', 'created_payment' => 'Pago creado con éxito',
'deleted_invoices' => 'Successfully deleted :count invoices', 'archived_payment' => 'Pago archivado con éxito',
'archived_payments' => ':count pagos archivados con éxito',
'created_payment' => 'Successfully created payment', 'deleted_payment' => 'Pago eliminado con éxito',
'archived_payment' => 'Successfully archived payment', 'deleted_payments' => ':count pagos eliminados con éxito',
'archived_payments' => 'Successfully archived :count payments', 'applied_payment' => 'Pago aplicado con éxito',
'deleted_payment' => 'Successfully deleted payment', 'created_credit' => 'Crédito creado con éxito',
'deleted_payments' => 'Successfully deleted :count payments', 'archived_credit' => 'Crédito archivado con éxito',
'applied_payment' => 'Successfully applied payment', 'archived_credits' => ':count creditos archivados con éxito',
'deleted_credit' => 'Créditos eliminados con éxito',
'created_credit' => 'Successfully created credit', 'deleted_credits' => ':count creditos eliminados con éxito',
'archived_credit' => 'Successfully archived credit',
'archived_credits' => 'Successfully archived :count credits',
'deleted_credit' => 'Successfully deleted credit',
'deleted_credits' => 'Successfully deleted :count credits',
// Emails // Emails
'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_subject' => 'Corfimación de tu cuenta en Invoice Ninja',
'confirmation_header' => 'Account Confirmation', 'confirmation_header' => 'Confirmación de Cuenta',
'confirmation_message' => 'Please access the link below to confirm your account.', 'confirmation_message' => 'Por favor, haz clic en el enlace abajo para confirmar tu cuenta.',
'invoice_subject' => 'New invoice from :account', 'invoice_subject' => 'Nueva factura de :account',
'invoice_message' => 'To view your invoice for :amount, click the link below.', 'invoice_message' => 'Para visualizar tu factura por el valor de :amount, haz click en el enlace abajo.',
'payment_subject' => 'Payment Received', 'payment_subject' => 'Pago recibido',
'payment_message' => 'Thank you for your payment of :amount.', 'payment_message' => 'Gracias por tu pago por valor de :amount.',
'email_salutation' => 'Dear :name,', 'email_salutation' => 'Estimado :name,',
'email_signature' => 'Regards,', 'email_signature' => 'Un saludo cordial,',
'email_from' => 'The InvoiceNinja Team', 'email_from' => 'El equipo de Invoice Ninja ',
'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/company/notifications', 'user_email_footer' => 'Para ajustar la configuración de las notificaciones de tu email, visita '.SITE_URL.'/company/notifications',
'invoice_link_message' => 'To view your client invoice click the link below:', 'invoice_link_message' => 'Para visualizar la factura de cliente, haz clic en el enlace abajo:',
'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client', 'notification_invoice_paid_subject' => 'La factura :invoice ha sido pagada por el cliente :client',
'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client', 'notification_invoice_sent_subject' => 'La factura :invoice ha sido enviada a el cliente :client',
'notification_invoice_viewed_subject' => 'Invoice :invoice was viewed by :client', 'notification_invoice_viewed_subject' => 'La factura :invoice ha sido visualizado por el cliente:client',
'notification_invoice_paid' => 'A payment of :amount was made by client :client towards Invoice :invoice.', 'notification_invoice_paid' => 'Un pago por valor de :amount se ha realizado por el cliente :client a la factura :invoice.',
'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.', 'notification_invoice_sent' => 'La factura :invoice por valor de :amount fue enviada al cliente :cliente.',
'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.', 'notification_invoice_viewed' => 'La factura :invoice por valor de :amount fue visualizada por el cliente :client.',
'reset_password' => 'You can reset your account password by clicking the following link:', 'reset_password' => 'Puedes reconfigurar la contraseña de tu cuenta haciendo clic en el siguiente enlace:',
'reset_password_footer' => 'If you did not request this password reset please email our support: ' . CONTACT_EMAIL, 'reset_password_footer' => 'Si no has solicitado un cambio de contraseña, por favor contactate con nosostros: ' . CONTACT_EMAIL,
// Payment page // Payment page
'secure_payment' => 'Secure Payment', 'secure_payment' => 'Pago seguro',
'card_number' => 'Card number', 'card_number' => 'Número de tarjeta',
'expiration_month' => 'Expiration month', 'expiration_month' => 'Mes de caducidad',
'expiration_year' => 'Expiration year', 'expiration_year' => 'Año de caducidad',
'cvv' => 'CVV', 'cvv' => 'CVV',
// Security alerts // Security alerts
'confide' => array( 'confide' => array(
'too_many_attempts' => 'Too many attempts. Try again in few minutes.', 'too_many_attempts' => 'Demasiados intentos fallidos. Inténtalo de nuevo en un par de minutos.',
'wrong_credentials' => 'Incorrect email or password.', 'wrong_credentials' => 'Contraseña o email incorrecto.',
'confirmation' => 'Your account has been confirmed!', 'confirmation' => '¡Tu cuenta se ha confirmado!',
'wrong_confirmation' => 'Wrong confirmation code.', 'wrong_confirmation' => 'Código de confirmación incorrecto.',
'password_forgot' => 'The information regarding password reset was sent to your email.', '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' => 'Your password has been changed successfully.', 'password_reset' => 'Tu contraseña se ha cambiado con éxito.',
'wrong_password_reset' => 'Invalid password. Try again', 'wrong_password_reset' => 'Contraseña no válida. Inténtalo de nuevo',
), ),
// Pro Plan // Pro Plan
'pro_plan' => [ 'pro_plan' => [
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo' => ':link haz click para eliminar el logo de Invoice Ninja', //Maybe incorrect for the context
'remove_logo_link' => 'Click here', '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',
'logout' => 'Log Out', 'pro_plan_product' => 'Plan Pro',
'sign_up_to_save' => 'Sign up to save your work', 'pro_plan_description' => 'Un año de inscripción en el Plan Pro de Invoice Ninja.',
'agree_to_terms' =>'I agree to the Invoice Ninja :terms', 'pro_plan_success' => '¡Gracias por unirte a Invoice Ninja! Al realizar el pago de tu factura, se iniciara tu PLAN PRO.',
'terms_of_service' => 'Terms of Service', 'unsaved_changes' => 'Tienes cambios no guardados',
'email_taken' => 'The email address is already regiestered', 'custom_fields' => 'Campos a medida',
'working' => 'Working', 'company_fields' => 'Campos de la empresa',
'success' => 'Success', 'client_fields' => 'Campos del cliente',
'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', 'field_label' => 'Etiqueta del campo',
'erase_data' => 'This will permanently erase your data.', 'field_value' => 'Valor del campo',
'password' => 'Password', 'edit' => 'Editar',
'view_as_recipient' => 'Ver como destinitario',
'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 management
'product_library' => 'Product Library', 'product_library' => 'Inventario de productos',
'product' => 'Product', 'product' => 'Producto',
'products' => 'Products', 'products' => 'Productos',
'fill_products' => 'Auto-fill products', 'fill_products' => 'Auto-rellenar productos',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>', 'fill_products_help' => 'Seleccionar un producto automáticamente <b>configurará la descripción y coste</b>',
'update_products' => 'Auto-update products', 'update_products' => 'Auto-actualizar productos',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>', 'update_products_help' => 'Actualizar una factura automáticamente <b>actualizará los productos</b>',
'create_product' => 'Create Product', 'create_product' => 'Crear Producto',
'edit_product' => 'Edit Product', 'edit_product' => 'Editar Producto',
'archive_product' => 'Archive Product', 'archive_product' => 'Archivar Producto',
'updated_product' => 'Successfully updated product', 'updated_product' => 'Producto actualizado con éxito',
'created_product' => 'Successfully created product', 'created_product' => 'Producto creado con éxito',
'archived_product' => 'Successfully archived product', 'archived_product' => 'Producto archivado con éxito',
'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', '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',
'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 // Quotes
'quote' => 'Quote', 'quote' => 'Cotización',
'quotes' => 'Quotes', 'quotes' => 'Cotizaciones',
'quote_number' => 'Quote Number', 'quote_number' => 'Numero de cotización',
'quote_number_short' => 'Quote #', 'quote_number_short' => 'Cotización #',
'quote_date' => 'Quote Date', 'quote_date' => 'Fecha cotización',
'quote_total' => 'Quote Total', 'quote_total' => 'Total cotizado',
'your_quote' => 'Your Quote', 'your_quote' => 'Tu cotización',
'total' => 'Total', 'total' => 'Total',
'clone' => 'Clone', 'clone' => 'Clon', //Whats the context for this one
'new_quote' => 'Nueva cotización',
'new_quote' => 'New Quote', 'create_quote' => 'Crear Cotización',
'create_quote' => 'Create Quote', 'edit_quote' => 'Editar Cotización',
'edit_quote' => 'Edit Quote', 'archive_quote' => 'Archivar Cotización',
'archive_quote' => 'Archive Quote', 'delete_quote' => 'Eliminar Cotización',
'delete_quote' => 'Delete Quote', 'save_quote' => 'Guardar Cotización',
'save_quote' => 'Save Quote', 'email_quote' => 'Enviar Cotización',
'email_quote' => 'Email Quote', 'clone_quote' => 'Clonar Cotización',
'clone_quote' => 'Clone Quote', 'convert_to_invoice' => 'Convertir a Factura',
'convert_to_invoice' => 'Convert to Invoice', 'view_invoice' => 'Ver Factura',
'view_invoice' => 'View Invoice', 'view_quote' => 'Ver Cotización',
'view_quote' => 'View Quote', 'view_client' => 'Ver Cliente',
'view_client' => 'View Client', 'updated_quote' => 'Cotización actualizada con éxito',
'created_quote' => 'Cotización creada con éxito',
'updated_quote' => 'Successfully updated quote', 'cloned_quote' => 'Cotización clonada con éxito',
'created_quote' => 'Successfully created quote', 'emailed_quote' => 'Cotización enviada con éxito',
'cloned_quote' => 'Successfully cloned quote', 'archived_quote' => 'Cotización archivada con éxito',
'emailed_quote' => 'Successfully emailed quote', 'archived_quotes' => ':count cotizaciones archivadas con exito',
'archived_quote' => 'Successfully archived quote', 'deleted_quote' => 'Cotizaciónes eliminadas con éxito',
'archived_quotes' => 'Successfully archived :count quotes', 'deleted_quotes' => ':count cotizaciones eliminadas con exito',
'deleted_quote' => 'Successfully deleted quote', 'converted_to_invoice' => 'Cotización convertida a factura con éxito',
'deleted_quotes' => 'Successfully deleted :count quotes', 'quote_subject' => 'Nueva cotización de :account',
'converted_to_invoice' => 'Successfully converted quote to invoice', '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:',
'quote_subject' => 'New quote from :account', 'notification_quote_sent_subject' => 'Cotización :invoice enviada a el cliente :client',
'quote_message' => 'To view your quote for :amount, click the link below.', 'notification_quote_viewed_subject' => 'Cotización :invoice visualizada por el cliente :client',
'quote_link_message' => 'To view your client quote click the link below:', 'notification_quote_sent' => 'La cotización :invoice por un valor de :amount, ha sido enviada al cliente :client.',
'notification_quote_sent_subject' => 'Quote :invoice was sent to :client', 'notification_quote_viewed' => 'La cotizacion :invoice por un valor de :amount ha sido visualizada por el cliente :client.',
'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client', 'session_expired' => 'Tu sesión ha caducado.',
'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.', 'invoice_fields' => 'Campos de factura',
'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.', 'invoice_options' => 'Opciones de factura',
'hide_quantity' => 'Ocultar cantidad',
'session_expired' => 'Your session has expired.', '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',
'invoice_fields' => 'Invoice Fields', 'hide_paid_to_date_help' => 'Solo mostrar la opción “Pagado a la fecha” en tus facturas en cuanto se ha recibido un pago.',
'invoice_options' => 'Invoice Options', 'charge_taxes' => 'Cargar impuestos',
'hide_quantity' => 'Hide quantity', 'user_management' => 'Gestión de usario',
'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', 'add_user' => 'Añadir usario',
'hide_paid_to_date' => 'Hide paid to date', 'send_invite' => 'Enviar invitación', //Context for its use
'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', 'sent_invite' => 'Invitación enviada con éxito',
'updated_user' => 'Usario actualizado con éxito',
'charge_taxes' => 'Charge taxes', 'invitation_message' => ':invitor te ha invitado a unirte a su cuenta en Invoice Ninja.',
'user_management' => 'User Management', 'register_to_add_user' => 'Regístrate para añadir usarios',
'add_user' => 'Add User', 'user_state' => 'Estado',
'send_invite' => 'Send invitation', 'edit_user' => 'Editar Usario',
'sent_invite' => 'Successfully sent invitation', 'delete_user' => 'Eliminar Usario',
'updated_user' => 'Successfully updated user', 'active' => 'Activar',
'invitation_message' => 'You\'ve been invited by :invitor. ', 'pending' => 'Pendiente',
'register_to_add_user' => 'Please sign up to add a user', 'deleted_user' => 'Usario eliminado con éxito',
'user_state' => 'State', 'limit_users' => 'Lo sentimos, esta acción excederá el límite de ' . MAX_NUM_USERS . ' usarios',
'edit_user' => 'Edit User', 'confirm_email_invoice' => '¿Estás seguro que quieres enviar esta factura?',
'delete_user' => 'Delete User', 'confirm_email_quote' => '¿Estás seguro que quieres enviar esta cotización?',
'active' => 'Active', 'confirm_recurring_email_invoice' => 'Se ha marcado esta factura como recurrente, estás seguro que quieres enviar esta factura?',
'pending' => 'Pending', 'cancel_account' => 'Cancelar Cuenta',
'deleted_user' => 'Successfully deleted user', 'cancel_account_message' => 'AVISO: Esta acción eliminará todos tus datos de forma permanente.',
'limit_users' => 'Sorry, this will exceed the limit of ' . MAX_NUM_USERS . ' users', 'go_back' => 'Atrás',
'data_visualizations' => 'Visualización de datos',
'confirm_email_invoice' => 'Are you sure you want to email this invoice?', 'sample_data' => 'Datos de ejemplo',
'confirm_email_quote' => 'Are you sure you want to email this quote?', 'hide' => 'Ocultar',
'confirm_recurring_email_invoice' => 'Recurring is enabled, are you sure you want this invoice emailed?', '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',
'cancel_account' => 'Cancel Account', 'invoice_number_prefix' => 'Prefijo de facturación',
'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', 'invoice_number_counter' => 'Numeración de facturación',
'go_back' => 'Go Back', 'quote_number_prefix' => 'Prejijo de cotizaciones',
'quote_number_counter' => 'Numeración de cotizaciones',
'data_visualizations' => 'Data Visualizations', 'share_invoice_counter' => 'Compartir la numeración para cotización y facturación',
'sample_data' => 'Sample data shown', 'invoice_issued_to' => 'Factura emitida a',
'hide' => 'Hide', 'invalid_counter' => 'Para evitar posibles conflictos, por favor crea un prefijo de facturación y de cotización.',
'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', 'mark_sent' => 'Marcar como enviado',
'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',
); );

View File

@ -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) public static function getNewsFeedResponse($userType = false)
{ {
if (!$userType) { if (!$userType) {

View File

@ -2,7 +2,7 @@
class Gateway extends Eloquent class Gateway extends Eloquent
{ {
public $timestamps = false; public $timestamps = true;
protected $softDelete = false; protected $softDelete = false;
public function paymentlibrary() public function paymentlibrary()
@ -15,6 +15,23 @@ class Gateway extends Eloquent
return '/images/gateways/logo_'.$this->provider.'.png'; 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' => "<a href='$link' target='_blank'>Click here</a>"]);
return $key != $str ? $str : '';
}
public function getFields() public function getFields()
{ {
$paymentLibrary = $this->paymentlibrary; $paymentLibrary = $this->paymentlibrary;

View File

@ -80,6 +80,11 @@ class User extends ConfideUser implements UserInterface, RemindableInterface
return $this->account->isPro(); return $this->account->isPro();
} }
public function isDemo()
{
return $this->account->id == Utils::getDemoAccountId();
}
public function getDisplayName() public function getDisplayName()
{ {
if ($this->getFullName()) if ($this->getFullName())

View File

@ -207,7 +207,7 @@ class InvoiceRepository
$invoice->client_id = $data['client_id']; $invoice->client_id = $data['client_id'];
$invoice->discount = Utils::parseFloat($data['discount']); $invoice->discount = Utils::parseFloat($data['discount']);
$invoice->invoice_number = trim($data['invoice_number']); $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']); $invoice->invoice_date = Utils::toSqlDate($data['invoice_date']);
if ($invoice->is_recurring) if ($invoice->is_recurring)
@ -336,8 +336,8 @@ class InvoiceRepository
$invoiceItem = InvoiceItem::createNew(); $invoiceItem = InvoiceItem::createNew();
$invoiceItem->product_id = isset($product) ? $product->id : null; $invoiceItem->product_id = isset($product) ? $product->id : null;
$invoiceItem->product_key = trim($item->product_key); $invoiceItem->product_key = trim($invoice->is_recurring ? $item->product_key : Utils::processVariables($item->product_key));
$invoiceItem->notes = trim($item->notes); $invoiceItem->notes = trim($invoice->is_recurring ? $item->notes : Utils::processVariables($item->notes));
$invoiceItem->cost = Utils::parseFloat($item->cost); $invoiceItem->cost = Utils::parseFloat($item->cost);
$invoiceItem->qty = Utils::parseFloat($item->qty); $invoiceItem->qty = Utils::parseFloat($item->qty);
$invoiceItem->tax_rate = 0; $invoiceItem->tax_rate = 0;
@ -367,7 +367,7 @@ class InvoiceRepository
$clone = Invoice::createNew($invoice); $clone = Invoice::createNew($invoice);
$clone->balance = $invoice->amount; $clone->balance = $invoice->amount;
$clone->invoice_number = $invoice->account->getNextInvoiceNumber($invoice->is_quote); $clone->invoice_number = $invoice->account->getNextInvoiceNumber();
foreach ([ foreach ([
'client_id', 'client_id',

View File

@ -76,11 +76,13 @@ class PaymentRepository
} }
$paymentTypeId = $input['payment_type_id'] ? $input['payment_type_id'] : null; $paymentTypeId = $input['payment_type_id'] ? $input['payment_type_id'] : null;
$clientId = Client::getPrivateId($input['client']);
$amount = Utils::parseFloat($input['amount']); $amount = Utils::parseFloat($input['amount']);
if ($paymentTypeId == PAYMENT_TYPE_CREDIT) 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; $applied = 0;
foreach ($credits as $credit) 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->invoice_id = isset($input['invoice']) && $input['invoice'] != "-1" ? Invoice::getPrivateId($input['invoice']) : null;
$payment->payment_type_id = $paymentTypeId; $payment->payment_type_id = $paymentTypeId;
$payment->payment_date = Utils::toSqlDate($input['payment_date']); $payment->payment_date = Utils::toSqlDate($input['payment_date']);

View File

@ -67,6 +67,7 @@ Route::get('logout', 'UserController@logout');
if (Utils::isNinja()) { if (Utils::isNinja()) {
Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed'); Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed');
Route::get('/demo', 'AccountController@demo');
} }
Route::group(array('before' => 'auth'), function() Route::group(array('before' => 'auth'), function()
@ -225,7 +226,10 @@ define('PAYMENT_LIBRARY_OMNIPAY', 1);
define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2); define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2);
define('GATEWAY_AUTHORIZE_NET', 1); define('GATEWAY_AUTHORIZE_NET', 1);
define('GATEWAY_AUTHORIZE_NET_SIM', 2);
define('GATEWAY_PAYPAL_EXPRESS', 17); define('GATEWAY_PAYPAL_EXPRESS', 17);
define('GATEWAY_STRIPE', 23);
define('GATEWAY_TWO_CHECKOUT', 27);
define('GATEWAY_BEANSTREAM', 29); define('GATEWAY_BEANSTREAM', 29);
define('GATEWAY_PSIGATE', 30); define('GATEWAY_PSIGATE', 30);
define('GATEWAY_MOOLAH', 31); define('GATEWAY_MOOLAH', 31);
@ -236,6 +240,7 @@ define('EVENT_CREATE_QUOTE', 3);
define('EVENT_CREATE_PAYMENT', 4); define('EVENT_CREATE_PAYMENT', 4);
define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN'); define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN');
define('DEMO_ACCOUNT_ID', 'DEMO_ACCOUNT_ID');
define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET); define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}'); define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');

View File

@ -57,6 +57,15 @@
@endif @endif
@endforeach @endforeach
@if($gateway->getHelp())
<div class="form-group">
<label class="control-label col-lg-4 col-sm-4"></label>
<div class="col-lg-8 col-sm-8">
{{ $gateway->getHelp() }}
</div>
</div>
@endif
</div> </div>
@endforeach @endforeach

View File

@ -15,7 +15,7 @@
/* Fix for header covering stuff when the screen is narrower */ /* Fix for header covering stuff when the screen is narrower */
@media screen and (min-width: 1200px) { @media screen and (min-width: 1200px) {
body { body {
padding-top: 50px; padding-top: 56px;
} }
} }

View File

@ -17,9 +17,11 @@
logoImages.imageLogoHeight3 = 81/2; logoImages.imageLogoHeight3 = 81/2;
@if (file_exists($account->getLogoPath())) @if (file_exists($account->getLogoPath()))
if (window.invoice) {
invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}"; invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}";
invoice.imageWidth = {{ $account->getLogoWidth() }}; invoice.imageWidth = {{ $account->getLogoWidth() }};
invoice.imageHeight = {{ $account->getLogoHeight() }}; invoice.imageHeight = {{ $account->getLogoHeight() }};
}
@endif @endif
var NINJA = NINJA || {}; var NINJA = NINJA || {};

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>Invoice Ninja | {{ isset($title) ? $title : ' Free Online Invoice Templates & Generator' }}</title> <title>Invoice Ninja | {{ isset($title) ? $title : ' Free Open-Source Online Invoice Software' }}</title>
<meta name="description" content="{{ isset($description) ? $description : 'Create and generate custom invoices online for free using Invoice Ninja. Use our templates or customize your own today.' }}"></meta> <meta name="description" content="{{ isset($description) ? $description : 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.' }}"></meta>
<!-- Source: https://github.com/hillelcoren/invoice-ninja --> <!-- Source: https://github.com/hillelcoren/invoice-ninja -->
<!-- Version: {{ NINJA_VERSION }} --> <!-- Version: {{ NINJA_VERSION }} -->

View File

@ -162,6 +162,15 @@
</p> </p>
</div> </div>
</div> </div>
@if (Utils::getDemoAccountId())
<div class="question">
<a class="expander" href="#">Can I see what the application looks like with sample data?</a>
<div class="content">
<p>Sure, <a href="https://www.invoiceninja.com/demo">click here</a> to try out our demo account.
</p>
</div>
</div>
@endif
<div class="question"> <div class="question">
<a class="expander" href="#">I hear that there's a version of Invoice Ninja <a class="expander" href="#">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? that I can install myself on my own servers? Where can I learn more about this?

View File

@ -31741,7 +31741,6 @@ function concatStrings() {
return data.length ? concatStr : false; 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) { function displayGrid(doc, invoice, data, x, y, layout, options) {
var numLines = 0; var numLines = 0;
var origY = y; var origY = y;
@ -31792,6 +31791,8 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
if (key.substring(0, 6) === 'custom') { if (key.substring(0, 6) === 'custom') {
key = invoice.account[key]; key = invoice.account[key];
} else if (key === 'tax' && invoice.tax_rate) {
key = invoiceLabels[key] + ' ' + (invoice.tax_rate*1).toString() + '%';
} else { } else {
key = invoiceLabels[key]; key = invoiceLabels[key];
} }
@ -31986,10 +31987,8 @@ function displayInvoiceItems(doc, invoice, layout) {
shownItem = true; shownItem = true;
// process date variables // process date variables
if (invoice.is_recurring) {
notes = processVariables(notes); notes = processVariables(notes);
productKey = processVariables(productKey); productKey = processVariables(productKey);
}
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty); var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) { if (tax) {

View File

@ -782,7 +782,6 @@ function concatStrings() {
return data.length ? concatStr : false; 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) { function displayGrid(doc, invoice, data, x, y, layout, options) {
var numLines = 0; var numLines = 0;
var origY = y; var origY = y;
@ -833,6 +832,8 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
if (key.substring(0, 6) === 'custom') { if (key.substring(0, 6) === 'custom') {
key = invoice.account[key]; key = invoice.account[key];
} else if (key === 'tax' && invoice.tax_rate) {
key = invoiceLabels[key] + ' ' + (invoice.tax_rate*1).toString() + '%';
} else { } else {
key = invoiceLabels[key]; key = invoiceLabels[key];
} }
@ -1027,10 +1028,8 @@ function displayInvoiceItems(doc, invoice, layout) {
shownItem = true; shownItem = true;
// process date variables // process date variables
if (invoice.is_recurring) {
notes = processVariables(notes); notes = processVariables(notes);
productKey = processVariables(productKey); productKey = processVariables(productKey);
}
var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty); var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
if (tax) { if (tax) {