fix conflicts

This commit is contained in:
David Bomba 2015-11-03 08:47:32 +11:00
commit d577a34675
16 changed files with 7484 additions and 188 deletions

View File

@ -7,7 +7,7 @@ use Input;
use App\Models\Client;
use App\Models\Account;
use App\Ninja\Repositories\AccountRepository;
use Illuminate\Http\Request;
use League\Fractal;
use League\Fractal\Resource\Item;
use League\Fractal\Manager;
@ -23,6 +23,19 @@ class AccountApiController extends Controller
$this->accountRepo = $accountRepo;
}
public function login(Request $request)
{
if ( ! env(API_SECRET) || $request->api_secret !== env(API_SECRET)) {
return 'Invalid secret';
}
if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
return $this->accountRepo->createToken($request->token_name);
} else {
return 'Invalid credentials';
}
}
public function index()
{
$manager = new Manager();

View File

@ -75,11 +75,6 @@ class AuthController extends Controller {
public function postLoginWrapper(Request $request)
{
/** If request is from API*/
if($request->api_secret)
{
return $this->postLoginWrapperAPI($request);
}
$userId = Auth::check() ? Auth::user()->id : null;
$user = User::where('email', '=', $request->input('email'))->first();
@ -105,7 +100,6 @@ class AuthController extends Controller {
}
Session::put(SESSION_USER_ACCOUNTS, $users);
} elseif ($user) {
$user->failed_logins = $user->failed_logins + 1;
$user->save();
@ -114,25 +108,6 @@ class AuthController extends Controller {
return $response;
}
private function postLoginWrapperAPI(Request $request)
{
/**Auth check*/
/**Success*/
/* send back user object along with account token if it exists,
create token only if it does not exist*/
/**Failure*/
/* return json with failure message */
if ($request->create_token) {
if ( ! env(API_SECRET) || $request->api_secret !== env(API_SECRET)) {
return 'Invalid secret';
}
return $this->accountRepo->createToken($request->token_name);
}
}
public function getLogoutWrapper()
{

View File

@ -109,6 +109,7 @@ class DashboardController extends BaseController
->leftJoin('contacts', 'contacts.client_id', '=', 'clients.id')
->leftJoin('invoices', 'invoices.id', '=', 'payments.invoice_id')
->where('payments.account_id', '=', Auth::user()->account_id)
->where('payments.deleted_at', '=', null)
->where('clients.deleted_at', '=', null)
->where('contacts.deleted_at', '=', null)
->where('contacts.is_primary', '=', true)

View File

@ -182,7 +182,9 @@ class PaymentController extends BaseController
// Handle offsite payments
if ($useToken || $paymentType != PAYMENT_TYPE_CREDIT_CARD
|| $gateway->id == GATEWAY_EWAY || $gateway->id == GATEWAY_TWO_CHECKOUT) {
|| $gateway->id == GATEWAY_EWAY
|| $gateway->id == GATEWAY_TWO_CHECKOUT
|| $gateway->id == GATEWAY_PAYFAST) {
if (Session::has('error')) {
Session::reflash();
return Redirect::to('view/'.$invitationKey);
@ -449,6 +451,8 @@ class PaymentController extends BaseController
$ref = $response->getData()['AccessCode'];
} elseif ($accountGateway->gateway_id == GATEWAY_TWO_CHECKOUT) {
$ref = $response->getData()['cart_order_id'];
} elseif ($accountGateway->gateway_id == GATEWAY_PAYFAST) {
$ref = $response->getData()['m_payment_id'];
} else {
$ref = $response->getTransactionReference();
}
@ -524,7 +528,7 @@ class PaymentController extends BaseController
if (method_exists($gateway, 'completePurchase') && !$accountGateway->isGateway(GATEWAY_TWO_CHECKOUT)) {
$details = $this->paymentService->getPaymentDetails($invitation, $accountGateway);
$response = $gateway->completePurchase($details)->send();
$ref = $response->getTransactionReference();
$ref = $response->getTransactionReference() ?: $token;
if ($response->isSuccessful()) {
$payment = $this->paymentService->createPayment($invitation, $ref, $payerId);

View File

@ -157,7 +157,7 @@ class QuoteController extends BaseController
$invoice = $invitation->invoice;
$invitationKey = $this->invoiceService->approveQuote($invoice, $invitation);
Session::flash('message', trans('texts.converted_to_invoice'));
Session::flash('message', trans('texts.quote_is_approved'));
return Redirect::to("view/{$invitationKey}");
}

View File

@ -21,8 +21,12 @@ class ApiCheck {
*/
public function handle($request, Closure $next)
{
$loggingIn = $request->is('api/v1/login');
$headers = Utils::getApiHeaders();
if ($loggingIn) {
// do nothing
} else {
// check for a valid token
$token = AccountToken::where('token', '=', Request::header('X-Ninja-Token'))->first(['id', 'user_id']);
@ -33,21 +37,22 @@ class ApiCheck {
sleep(3);
return Response::make('Invalid token', 403, $headers);
}
}
if (!Utils::isNinja()) {
if (!Utils::isNinja() && !$loggingIn) {
return $next($request);
}
if (!Utils::isPro()) {
if (!Utils::isPro() && !$loggingIn) {
return Response::make('API requires pro plan', 403, $headers);
} else {
$accountId = Auth::user()->account->id;
$key = Auth::check() ? Auth::user()->account->id : $request->getClientIp();
// http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users
$hour = 60 * 60;
$hour_limit = 100; # users are limited to 100 requests/hour
$hour_throttle = Cache::get("hour_throttle:{$accountId}", null);
$last_api_request = Cache::get("last_api_request:{$accountId}", 0);
$hour_throttle = Cache::get("hour_throttle:{$key}", null);
$last_api_request = Cache::get("last_api_request:{$key}", 0);
$last_api_diff = time() - $last_api_request;
if (is_null($hour_throttle)) {
@ -66,11 +71,10 @@ class ApiCheck {
return Response::make("Please wait {$wait} second(s)", 403, $headers);
}
Cache::put("hour_throttle:{$accountId}", $new_hour_throttle, 10);
Cache::put("last_api_request:{$accountId}", time(), 10);
Cache::put("hour_throttle:{$key}", $new_hour_throttle, 10);
Cache::put("last_api_request:{$key}", time(), 10);
}
return $next($request);
}

View File

@ -7,6 +7,7 @@ class VerifyCsrfToken extends BaseVerifier {
private $openRoutes = [
'signup/register',
'api/v1/login',
'api/v1/clients',
'api/v1/invoices',
'api/v1/quotes',
@ -34,12 +35,6 @@ class VerifyCsrfToken extends BaseVerifier {
}
}
if ($request->is('login')) {
if (env(API_SECRET) && $request->api_secret === env(API_SECRET)) {
return $next($request);
}
}
return parent::handle($request, $next);
}

View File

@ -186,10 +186,11 @@ Route::group(['middleware' => 'auth'], function() {
get('/resend_confirmation', 'AccountController@resendConfirmation');
});
// Route group for API
// Route groups for API
Route::group(['middleware' => 'api', 'prefix' => 'api/v1'], function()
{
Route::resource('ping', 'ClientApiController@ping');
Route::post('login', 'AccountApiController@login');
Route::get('accounts', 'AccountApiController@index');
Route::resource('clients', 'ClientApiController');
Route::get('quotes/{client_id?}', 'QuoteApiController@index');
@ -382,6 +383,7 @@ if (!defined('CONTACT_EMAIL')) {
define('GATEWAY_AUTHORIZE_NET', 1);
define('GATEWAY_EWAY', 4);
define('GATEWAY_AUTHORIZE_NET_SIM', 2);
define('GATEWAY_PAYFAST', 13);
define('GATEWAY_PAYPAL_EXPRESS', 17);
define('GATEWAY_PAYPAL_PRO', 18);
define('GATEWAY_STRIPE', 23);
@ -405,7 +407,7 @@ if (!defined('CONTACT_EMAIL')) {
define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG');
define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://app.invoiceninja.com');
define('NINJA_VERSION', '2.4.4');
define('NINJA_VERSION', '2.4.5');
define('NINJA_DATE', '2000-01-01');
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');

View File

@ -106,11 +106,13 @@ class ActivityListener
public function deletedInvoice(InvoiceWasDeleted $event)
{
$invoice = $event->invoice;
$this->activityRepo->create(
$event->invoice,
$invoice,
ACTIVITY_TYPE_DELETE_INVOICE,
$event->invoice->balance * -1,
$event->invoice->getAmountPaid() * -1
$invoice->affectsBalance() ? $invoice->balance * -1 : 0,
$invoice->affectsBalance() ? $invoice->getAmountPaid() * -1 : 0
);
}
@ -128,11 +130,13 @@ class ActivityListener
public function restoredInvoice(InvoiceWasRestored $event)
{
$invoice = $event->invoice;
$this->activityRepo->create(
$event->invoice,
$invoice,
ACTIVITY_TYPE_RESTORE_INVOICE,
$event->fromDeleted ? $event->invoice->balance : 0,
$event->fromDeleted ? $event->invoice->getAmountPaid() : 0
$invoice->affectsBalance() && $event->fromDeleted ? $invoice->balance : 0,
$invoice->affectsBalance() && $event->fromDeleted ? $invoice->getAmountPaid() : 0
);
}

View File

@ -46,9 +46,14 @@ class Invoice extends EntityModel implements BalanceAffecting
return $this->is_recurring ? trans('texts.recurring') : $this->invoice_number;
}
public function affectsBalance()
{
return !$this->is_quote && !$this->is_recurring;
}
public function getAdjustment()
{
if ($this->is_quote || $this->is_recurring) {
if (!$this->affectsBalance()) {
return 0;
}

View File

@ -459,8 +459,14 @@ class AccountRepository
public function createToken($name)
{
$name = trim($name) ?: 'TOKEN';
if ($token = AccountToken::scope()->whereName($name)->first()) {
return $token->token;
}
$token = AccountToken::createNew();
$token->name = trim($name) ?: 'TOKEN';
$token->name = $name;
$token->token = str_random(RANDOM_KEY_LENGTH);
$token->save();

View File

@ -19,7 +19,7 @@
"anahkiasen/former": "4.0.*@dev",
"barryvdh/laravel-debugbar": "~2.0.2",
"chumper/datatable": "dev-develop#7fa47cb",
"omnipay/omnipay": "2.3.x",
"omnipay/omnipay": "~2.3.0",
"intervention/image": "dev-master",
"webpatser/laravel-countries": "dev-master",
"barryvdh/laravel-ide-helper": "2.0.x",

7275
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -39,15 +39,15 @@ If you'd like to use our code to sell your own invoicing app email us for detail
* [Support Forum](https://www.invoiceninja.com/forums/forum/support/)
* [Feature Roadmap](https://trello.com/b/63BbiVVe/)
### Recommended Providers
* [Stripe](https://stripe.com/)
* [Postmark](https://postmarkapp.com/)
### Contributors
* [Troels Liebe Bentsen](https://github.com/tlbdk)
* [Jeramy Simpson](https://github.com/JeramyMywork) - [MyWork](https://www.mywork.com.au)
* [Sigitas Limontas](https://lt.linkedin.com/in/sigitaslimontas)
### Recommended Providers
* [Stripe](https://stripe.com/)
* [Postmark](https://postmarkapp.com/)
### Frameworks/Libraries
* [laravel/laravel](https://github.com/laravel/laravel) - A PHP Framework For Web Artisans
* [twbs/bootstrap](https://github.com/twbs/bootstrap) - Sleek, intuitive, and powerful front-end framework for faster and easier web development.

View File

@ -891,4 +891,5 @@ return array(
'quote_footer' => 'Quote Footer',
'free' => 'Free',
'quote_is_approved' => 'This quote is approved',
);

View File

@ -17,7 +17,7 @@ return array(
'first_name' => 'Primeiro Nome',
'last_name' => 'Último Nome',
'phone' => 'Telefone',
'email' => 'Email',
'email' => 'E-mail',
'additional_info' => 'Informações Adicionais',
'payment_terms' => 'Condições de Pagamento',
'currency_id' => 'Moeda',
@ -32,7 +32,7 @@ return array(
'due_date' => 'Data de Vencimento',
'invoice_number' => 'Número da Fatura',
'invoice_number_short' => 'Fatura #',
'po_number' => 'Núm. Ordem de Compra',
'po_number' => 'Núm. Ordem de Serviço',
'po_number_short' => 'OS #',
'frequency_id' => 'Frequência',
'discount' => 'Desconto',
@ -45,7 +45,7 @@ return array(
'line_total' => 'Total',
'subtotal' => 'Subtotal',
'paid_to_date' => 'Pagamento até a data',
'balance_due' => 'Saldo Devedor',
'balance_due' => 'Valor',
'invoice_design_id' => 'Modelo',
'terms' => 'Condições',
'your_invoice' => 'Sua Fatura',
@ -175,7 +175,7 @@ return array(
'amount' => 'Quantidade',
// account/company pages
'work_email' => 'Email',
'work_email' => 'E-mail',
'language_id' => 'Idioma',
'timezone_id' => 'Fuso Horário',
'date_format_id' => 'Formato da Data',
@ -186,14 +186,14 @@ return array(
'logo_help' => 'Suportados: JPEG, GIF and PNG',
'payment_gateway' => 'Provedor de Pagamento',
'gateway_id' => 'Provedor',
'email_notifications' => 'Notificações por Email',
'email_sent' => 'Me avise por email quando a fatura for <b>enviada</b>',
'email_viewed' => 'Me avise por email quando a fatura for <b>visualizada</b>',
'email_paid' => 'Me avise por email quando a fatura for <b>paga</b>',
'email_notifications' => 'Notificações por E-mail',
'email_sent' => 'Me avise por e-mail quando a fatura for <b>enviada</b>',
'email_viewed' => 'Me avise por e-mail quando a fatura for <b>visualizada</b>',
'email_paid' => 'Me avise por e-mail quando a fatura for <b>paga</b>',
'site_updates' => 'Atualizações',
'custom_messages' => 'Mensagens Customizadas',
'default_invoice_terms' => 'Definir condiçoes padrões da fatura',
'default_email_footer' => 'Definir assinatura de email padrão',
'default_invoice_terms' => 'Definir condições padrões da fatura',
'default_email_footer' => 'Definir assinatura de e-mail padrão',
'import_clients' => 'Importar Dados do Cliente',
'csv_file' => 'Selecionar arquivo CSV',
'export_clients' => 'Exportar Dados do Cliente',
@ -204,8 +204,8 @@ return array(
'import_to' => 'Importar para',
'client_will_create' => 'cliente será criado',
'clients_will_create' => 'clientes serão criados',
'email_settings' => 'Configurações de Email',
'pdf_email_attachment' => 'Anexar PDF aos Emails',
'email_settings' => 'Configurações de E-mail',
'pdf_email_attachment' => 'Anexar PDF aos e-mails',
// application messages
'created_client' => 'Cliente criado com sucesso',
@ -216,8 +216,8 @@ return array(
'invoice_error' => 'Verifique se você selecionou algum cliente e que não há nenhum outro erro',
'limit_clients' => 'Desculpe, isto irá exceder o limite de :count clientes',
'payment_error' => 'Ocorreu um erro ao processar o pagamento. Por favor tente novamente mais tarde.',
'registration_required' => 'Favor logar-se para enviar uma fatura por email',
'confirmation_required' => 'Favor confirmar o seu endereço de email',
'registration_required' => 'Favor logar-se para enviar uma fatura por e-mail',
'confirmation_required' => 'Favor confirmar o seu endereço de e-mail',
'updated_client' => 'Cliente atualizado com sucesso',
'created_client' => 'Cliente criado com sucesso',
@ -229,7 +229,7 @@ return array(
'updated_invoice' => 'Fatura atualizado com sucesso',
'created_invoice' => 'Fatura criada com sucesso',
'cloned_invoice' => 'Fatura clonada com sucesso',
'emailed_invoice' => 'Fatura enviada por email com sucesso',
'emailed_invoice' => 'Fatura enviada por e-mail com sucesso',
'and_created_client' => 'e o cliente foi criado',
'archived_invoice' => 'Fatura arquivado com sucesso',
'archived_invoices' => ':count faturas arquivados com sucesso',
@ -258,16 +258,16 @@ return array(
'email_salutation' => 'Caro :name,',
'email_signature' => 'Atenciosamente,',
'email_from' => 'Equipe InvoiceNinja',
'user_email_footer' => 'Para ajustar suas configurações de notificações de email acesse '.SITE_URL.'/settings/notifications',
'user_email_footer' => 'Para ajustar suas configurações de notificações de e-mail acesse '.SITE_URL.'/settings/notifications',
'invoice_link_message' => 'Para visualizar a fatura do seu cliente clique no link abaixo:',
'notification_invoice_paid_subject' => 'Fatura :invoice foi pago por :client',
'notification_invoice_sent_subject' => 'Fatura :invoice foi enviado por :client',
'notification_invoice_viewed_subject' => 'Fatura :invoice foi visualizada por :client',
'notification_invoice_paid' => 'Um pagamento de :amount foi realizado pelo cliente :client através da fatura :invoice.',
'notification_invoice_sent' => 'O cliente :client foi notificado por email referente à fatura :invoice de :amount.',
'notification_invoice_sent' => 'O cliente :client foi notificado por e-mail referente à fatura :invoice de :amount.',
'notification_invoice_viewed' => 'O cliente :client visualizou a fatura :invoice de :amount.',
'reset_password' => 'Você pode redefinir a sua senha clicando no seguinte link:',
'reset_password_footer' => 'Se você não solicitou a redefinição de sua senha por favor envie um email para o nosso suporte: ' . CONTACT_EMAIL,
'reset_password_footer' => 'Se você não solicitou a redefinição de sua senha por favor envie um e-mail para o nosso suporte: ' . CONTACT_EMAIL,
// Payment page
'secure_payment' => 'Pagamento Seguro',
@ -280,7 +280,7 @@ return array(
// Security alerts
'security' => [
'too_many_attempts' => 'Muitas tentativas. Tente novamente em alguns minutos.',
'wrong_credentials' => 'Email ou senha incorretos.',
'wrong_credentials' => 'E-mail ou senha incorretos.',
'confirmation' => 'Sua conta foi confirmada!',
'wrong_confirmation' => 'Código de confirmação incorreto.',
'password_forgot' => 'As informações para redefinição de senha foi enviada para seu e-mail.',
@ -345,7 +345,7 @@ return array(
'specify_colors_label' => 'Selecione as cores para sua fatura',
'chart_builder' => 'Contrutor de Gráficos',
'ninja_email_footer' => 'Use :site gerenciar os orçamentos e faturas de seus clientes!',
'ninja_email_footer' => 'Use :site para gerenciar os orçamentos e faturas de seus clientes!',
'go_pro' => 'Adquira o Plano Pro',
// Quotes
@ -365,9 +365,9 @@ return array(
'archive_quote' => 'Arquivar Orçamento',
'delete_quote' => 'Deletar Orçamento',
'save_quote' => 'Salvar Oçamento',
'email_quote' => 'Envair Orçamento',
'email_quote' => 'Enviar Orçamento',
'clone_quote' => 'Clonar Orçamento',
'convert_to_invoice' => 'Faturado',
'convert_to_invoice' => 'Faturar Orçamento',
'view_invoice' => 'Visualizar Fatura',
'view_quote' => 'Visualizar Orçamento',
'view_client' => 'Visualizar Cliente',
@ -500,10 +500,10 @@ return array(
'restore_user' => 'Restaurar Usuário',
'restored_user' => 'Usuário restaurado',
'show_deleted_users' => 'Exibir usuários deletados',
'email_templates' => 'Modelo de Email',
'invoice_email' => 'Email de Faturas',
'payment_email' => 'Email de Pagamentos',
'quote_email' => 'Email de Orçamentos',
'email_templates' => 'Modelo de E-mail',
'invoice_email' => 'E-mail de Faturas',
'payment_email' => 'E-mail de Pagamentos',
'quote_email' => 'E-mail de Orçamentos',
'reset_all' => 'Resetar Todos',
'approve' => 'Aprovar',
@ -567,18 +567,18 @@ return array(
'account_login' => 'Login',
'recover_password' => 'Recuperar senha',
'forgot_password' => 'Esqueceu sua senha?',
'email_address' => 'Email',
'email_address' => 'E-mail',
'lets_go' => 'Vamos!',
'password_recovery' => 'Recuperar Senha',
'send_email' => 'Enviar email',
'send_email' => 'Enviar e-mail',
'set_password' => 'Definir Password',
'converted' => 'Faturado',
'email_approved' => 'Notificar-me por email quando um orçamento for <b>approvedo</b>',
'email_approved' => 'Notificar-me por e-mail quando um orçamento for <b>approvedo</b>',
'notification_quote_approved_subject' => 'Orçamento :invoice foi aprovado por :client',
'notification_quote_approved' => 'O cliente :client aprovou Orçamento :invoice de :amount.',
'resend_confirmation' => 'Reenviar email de confirmação',
'confirmation_resent' => 'Email de confirmação reenviado',
'resend_confirmation' => 'Reenviar e-mail de confirmação',
'confirmation_resent' => 'E-mail de confirmação reenviado',
'gateway_help_42' => ':link acessar BitPay.<br/>Aviso: use a "Legacy API Key", não "API token".',
'payment_type_credit_card' => 'Cartão de Crédito',
@ -603,7 +603,7 @@ return array(
'www' => 'www',
'logo' => 'Logo',
'subdomain' => 'Subdomínio',
'provide_name_or_email' => 'Informe nome e email para contato',
'provide_name_or_email' => 'Informe nome e e-mail para contato',
'charts_and_reports' => 'Gráficos & Relatórios',
'chart' => 'Gráfico',
'report' => 'Relatório',
@ -616,7 +616,7 @@ return array(
'export' => 'Exportar',
'documentation' => 'Documentação',
'zapier' => 'Zapier',
'recurring' => 'Recurrente',
'recurring' => 'Recorrente',
'last_invoice_sent' => 'Última cobrança enviada em :date',
'processed_updates' => 'Atualização completa',
@ -661,7 +661,7 @@ return array(
'create_task' => 'Criar Tarefa',
'stopped_task' => 'Tarefa interrompida',
'invoice_task' => 'Faturar Tarefa',
'invoice_labels' => 'Etiquedas das Faturas',
'invoice_labels' => 'Etiquetas das Faturas',
'prefix' => 'Prefixo',
'counter' => 'Contador',
@ -679,7 +679,7 @@ return array(
'pro_plan_feature5' => 'Múltiplos usuários & Histórico de Atividades',
'pro_plan_feature6' => 'Orçamentos & Pedidos',
'pro_plan_feature7' => 'Campos personalizados',
'pro_plan_feature8' => 'Opção para anexar PDFs aos emails',
'pro_plan_feature8' => 'Opção para anexar PDFs aos e-mails',
'resume' => 'Retormar',
'break_duration' => 'Interromper',
@ -688,8 +688,8 @@ return array(
'timezone_unset' => 'Por favor :link defina sua timezone',
'click_here' => 'clique aqui',
'email_receipt' => 'Email para envio do recibo de pagamento',
'created_payment_emailed_client' => 'Pagamento informado e notificado ao cliente por email',
'email_receipt' => 'E-mail para envio do recibo de pagamento',
'created_payment_emailed_client' => 'Pagamento informado e notificado ao cliente por e-mail',
'add_company' => 'Adicionar Empresa',
'untitled' => 'Sem Título',
'new_company' => 'Nova Empresa',
@ -698,8 +698,8 @@ return array(
'login' => 'Login',
'or' => 'ou',
'email_error' => 'Houve um problema ao enviar o email',
'confirm_recurring_timing' => 'Aviso: emails são enviados na hora de início.',
'email_error' => 'Houve um problema ao enviar o e-mail',
'confirm_recurring_timing' => 'Aviso: e-mails são enviados na hora de início.',
'old_browser' => 'Utilize um <a href="'.OUTDATE_BROWSER_URL.'" target="_blank">navegador atualizado</a>',
'payment_terms_help' => 'Defina a data de vencimento padrão',
'unlink_account' => 'Desvincular Conta',
@ -722,7 +722,7 @@ return array(
'secondary_color' => 'Cor Secundaria',
'customize_design' => 'Personalizar Modelo',
'content' => 'Contaúdo',
'content' => 'Conteúdo',
'styles' => 'Estilos',
'defaults' => 'Padrões',
'margins' => 'Margens',
@ -741,7 +741,7 @@ return array(
'recurring_invoice' => 'Fatura Recorrente',
'recurring_too_soon' => 'Fora do prazo para nova fatura recorrente, agendamento para :date',
'created_by_invoice' => 'Criada a partir da Fatura :invoice',
'primary_user' => 'Usuário',
'primary_user' => 'Usuário Principal',
'help' => 'Ajuda',
'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p>
<p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p>
@ -769,7 +769,7 @@ return array(
'military_time' => '24h',
'last_sent' => 'Último Envio',
'reminder_emails' => 'Emails de Lembrete',
'reminder_emails' => 'E-mails de Lembrete',
'templates_and_reminders' => 'Modelos & Lembretes',
'subject' => 'Assunto',
'body' => 'Conteúdo',
@ -799,9 +799,9 @@ return array(
'invoice_charges' => 'Encargos da Fatura',
'invitation_status' => [
'sent' => 'Email Enviado',
'opened' => 'Email Aberto',
'viewed' => 'Invoice Visualizado',
'sent' => 'E-mail Enviado',
'opened' => 'E-mail Aberto',
'viewed' => 'E-mail Visualizado',
],
'notification_invoice_bounced' => 'Não foi possível entregar a Fatura :invoice para :contact.',
'notification_invoice_bounced_subject' => 'Fatura :invoice não foi entregue',
@ -811,7 +811,7 @@ return array(
'custom_invoice_link' => 'Link de Fauturas Personalizado',
'total_invoiced' => 'Faturas',
'open_balance' => 'Em Aberto',
'verify_email' => 'Um email de verificação foi enviado para sua caixa de entrada..',
'verify_email' => 'Um e-mail de verificação foi enviado para sua caixa de entrada..',
'basic_settings' => 'Configurações Básicas',
'pro' => 'Pro',
'gateways' => 'Provedores de Pagamento',
@ -820,61 +820,72 @@ return array(
'no_longer_running' => 'Esta fatura não está agendada',
'general_settings' => 'Configurações Gerais',
'customize' => 'Personalizar',
'oneclick_login_help' => 'Connect an account to login without a password',
'referral_code_help' => 'Earn money by sharing our app online',
'enable_with_stripe' => 'Enable | Requires Stripe',
'tax_settings' => 'Tax Settings',
'create_tax_rate' => 'Add Tax Rate',
'updated_tax_rate' => 'Successfully updated tax rate',
'created_tax_rate' => 'Successfully created tax rate',
'edit_tax_rate' => 'Edit tax rate',
'archive_tax_rate' => 'Archive tax rate',
'archived_tax_rate' => 'Successfully archived the tax rate',
'default_tax_rate_id' => 'Default Tax Rate',
'tax_rate' => 'Tax Rate',
'recurring_hour' => 'Recurring Hour',
'pattern' => 'Pattern',
'pattern_help_title' => 'Pattern Help',
'pattern_help_1' => 'Create custom invoice and quote numbers by specifying a pattern',
'pattern_help_2' => 'Available variables:',
'pattern_help_3' => 'For example, :example would be converted to :value',
'see_options' => 'See options',
'invoice_counter' => 'Invoice Counter',
'quote_counter' => 'Quote Counter',
'type' => 'Type',
'oneclick_login_help' => 'Vincule uma conta para acesar sem senha.',
'referral_code_help' => 'Recomende nosso sistema.',
'activity_1' => ':user created client :client',
'activity_2' => ':user archived client :client',
'activity_3' => ':user deleted client :client',
'activity_4' => ':user created invoice :invoice',
'activity_5' => ':user updated invoice :invoice',
'activity_6' => ':user emailed invoice :invoice to :contact',
'activity_7' => ':contact viewed invoice :invoice',
'activity_8' => ':user archived invoice :invoice',
'activity_9' => ':user deleted invoice :invoice',
'activity_10' => ':contact entered payment :payment for :invoice',
'activity_11' => ':user updated payment :payment',
'activity_12' => ':user archived payment :payment',
'activity_13' => ':user deleted payment :payment',
'activity_14' => ':user entered :credit credit',
'activity_15' => ':user updated :credit credit',
'activity_16' => ':user archived :credit credit',
'activity_17' => ':user deleted :credit credit',
'activity_18' => ':user created quote :quote',
'activity_19' => ':user updated quote :quote',
'activity_20' => ':user emailed quote :quote to :contact',
'activity_21' => ':contact viewed quote :quote',
'activity_22' => ':user archived quote :quote',
'activity_23' => ':user deleted quote :quote',
'activity_24' => ':user restored quote :quote',
'activity_25' => ':user restored invoice :invoice',
'activity_26' => ':user restored client :client',
'activity_27' => ':user restored payment :payment',
'activity_28' => ':user restored :credit credit',
'activity_29' => ':contact approved quote :quote',
'enable_with_stripe' => 'Habilite | Requer Stripe',
'tax_settings' => 'Configurações de Taxas',
'create_tax_rate' => 'Adicionar Taxa',
'updated_tax_rate' => 'Taxa Atualizada',
'created_tax_rate' => 'Taxa Adicionada',
'edit_tax_rate' => 'Editar Taxa',
'archive_tax_rate' => 'Arquivar Taxa',
'archived_tax_rate' => 'Taxa Arquivada',
'default_tax_rate_id' => 'Taxa Padrao',
'tax_rate' => 'Taxa',
'recurring_hour' => 'Hora Recorrente',
'pattern' => 'Padrão',
'pattern_help_title' => 'Ajuda para Padrões',
'pattern_help_1' => 'Crie numeração personalizada para faturas e orçamentos utilzando padrões.',
'pattern_help_2' => 'Variáveis disponíveis:',
'pattern_help_3' => 'Exemplo, :example seria convertido para :value',
'see_options' => 'Veja as Opções',
'invoice_counter' => 'Contador de Faturas',
'quote_counter' => 'Contador de Orçamentos',
'type' => 'Tipo',
'payment' => 'Payment',
'system' => 'System',
'activity_1' => ':user cadastrou o cliente :client',
'activity_2' => ':user arquivo o cliente :client',
'activity_3' => ':user removeu o cliente :client',
'activity_4' => ':user criou a fatura :invoice',
'activity_5' => ':user atualizou a fatura :invoice',
'activity_6' => ':user enviou a fatura :invoice para :contact',
'activity_7' => ':contact visualizou a fatura :invoice',
'activity_8' => ':user arquivou a fatura :invoice',
'activity_9' => ':user removeu a fatura :invoice',
'activity_10' => ':contact efetuou o pagamento de :payment para a fatura :invoice',
'activity_11' => ':user atualizou o pagamento :payment',
'activity_12' => ':user arquivou o pagamento :payment',
'activity_13' => ':user removeu o pagamento :payment',
'activity_14' => ':user adicionou crédito :credit',
'activity_15' => ':user atualizou crédito :credit',
'activity_16' => ':user arquivou crédito :credit',
'activity_17' => ':user removeu crédito :credit',
'activity_18' => ':user adicionou o orçamento :quote',
'activity_19' => ':user atualizou o orçamento :quote',
'activity_20' => ':user enviou o orçamento :quote para :contact',
'activity_21' => ':contact visualizou o orçamento :quote',
'activity_22' => ':user arquivou o orçamento :quote',
'activity_23' => ':user removeu o orçamento :quote',
'activity_24' => ':user restaurou o orçamento :quote',
'activity_25' => ':user restaurou a fatura :invoice',
'activity_26' => ':user restaurou o cliente :client',
'activity_27' => ':user restaurou o pagamento :payment',
'activity_28' => ':user restaurou o crédito :credit',
'activity_29' => ':contact aprovou o orçamento :quote',
'payment' => 'Pagamento',
'system' => 'Sistema',
'signature' => 'Assinatura do E-mail',
'default_messages' => 'Mensagens Padrões',
'quote_terms' => 'Condições do Orçamento',
'default_quote_terms' => 'Condições Padrões dos Orçamentos',
'default_invoice_terms' => 'Condições Padrões das Faturas',
'default_invoice_footer' => 'Rodapé Padrão das Faturas',
'quote_footer' => 'Rodapé do Orçamento',
'free' => 'Grátis',
'quote_is_approved' => 'Orçamento aprovado.',
);