1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00

Merge fixes

This commit is contained in:
Hillel Coren 2016-10-02 10:59:15 +03:00
parent 2bf3e524db
commit d6afc03c3b
10 changed files with 21 additions and 10 deletions

View File

@ -23,8 +23,8 @@ class CreatePaymentAPIRequest extends PaymentRequest
{
if ( ! $this->invoice_id || ! $this->amount) {
return [
'invoice_id' => 'required',
'amount' => 'required',
'invoice_id' => 'required|numeric|min:1',
'amount' => 'required|numeric|min:0.01',
];
}

View File

@ -184,6 +184,7 @@ trait PresentsInvoice
'quote_to',
'details',
'invoice_no',
'quote_no',
'valid_until',
'client_name',
'address1',

View File

@ -606,8 +606,9 @@ class BasePaymentDriver
$term = strtolower($matches[2]);
$price = $invoice_item->cost;
if ($plan == PLAN_ENTERPRISE) {
if (count($matches)) {
$numUsers = $matches[1];
preg_match('/###[\d] [\w]* (\d*)/', $invoice_item->notes, $numUserMatches);
if (count($numUserMatches)) {
$numUsers = $numUserMatches[1];
} else {
$numUsers = 5;
}

View File

@ -15,6 +15,7 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
$data = parent::paymentDetails();
$data['ButtonSource'] = 'InvoiceNinja_SP';
$data['solutionType'] = 'Sole'; // show 'Pay with credit card' option
return $data;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -210,7 +210,11 @@ NINJA.decodeJavascript = function(invoice, javascript)
if (invoice.partial > 0 && field == 'balance_due') {
field = 'partial_due';
} else if (invoice.is_quote) {
field = field.replace('invoice', 'quote');
if (field == 'due_date') {
field = 'valid_until';
} else {
field = field.replace('invoice', 'quote');
}
}
var label = invoiceLabels[field];
if (match.indexOf('UC') >= 0) {

View File

@ -643,6 +643,7 @@ $LANG = array(
'custom' => 'Custom',
'invoice_to' => 'Invoice to',
'invoice_no' => 'Invoice No.',
'quote_no' => 'Quote No.',
'recent_payments' => 'Recent Payments',
'outstanding' => 'Outstanding',
'manage_companies' => 'Manage Companies',
@ -2069,7 +2070,7 @@ $LANG = array(
'bot_emailed_notify_paid' => 'I\'ll email you when it\'s paid.',
'add_product_to_invoice' => 'Add 1 :product',
'not_authorized' => 'Your are not authorized',
'bot_get_email' => 'Hi! (wave)<br/>Thanks for trying the Invoice Ninja Bot.<br/>Send me your account email to get started.',
'bot_get_email' => 'Hi! (wave)<br/>Thanks for trying the Invoice Ninja Bot.<br/>You need to create a free account on <a href="https://www.invoiceninja.com">invoiceninja.com</a> to use this bot.<br/>Send me your account email address to get started.',
'bot_get_code' => 'Thanks! I\'ve sent a you an email with your security code.',
'bot_welcome' => 'That\'s it, your account is verified.<br/>',
'email_not_found' => 'I wasn\'t able to find an available account for :email',

View File

@ -23,7 +23,6 @@
->autocomplete('on')
->rules([
'name' => 'required',
'website' => 'url',
]) !!}
{{ Former::populate($account) }}

View File

@ -200,8 +200,11 @@
}
window.loadedSearchData = false;
function onSearchBlur() {
$('#search').typeahead('val', '');
}
function onSearchFocus() {
$('#search').typeahead('val', '');
$('#search-form').show();
if (!window.loadedSearchData) {
@ -320,6 +323,7 @@
// Focus the search input if the user clicks forward slash
$('#search').focusin(onSearchFocus);
$('#search').blur(onSearchBlur);
$('body').keypress(function(event) {
if (event.which == 47 && !$('*:focus').length) {