mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-13 13:54:42 -04:00
Fix for #661
This commit is contained in:
parent
680b8edefd
commit
89622f86e2
@ -280,9 +280,7 @@ class AppController extends BaseController
|
||||
return '';
|
||||
}
|
||||
|
||||
if (Utils::getResllerType() == RESELLER_LIMITED_USERS) {
|
||||
return User::count();
|
||||
} else {
|
||||
if (Utils::getResllerType() == RESELLER_REVENUE_SHARE) {
|
||||
$payments = DB::table('accounts')
|
||||
->leftJoin('payments', 'payments.account_id', '=', 'accounts.id')
|
||||
->leftJoin('clients', 'clients.id', '=', 'payments.client_id')
|
||||
@ -294,7 +292,16 @@ class AppController extends BaseController
|
||||
'payments.payment_date',
|
||||
'payments.amount'
|
||||
]);
|
||||
return json_encode($payments);
|
||||
} else {
|
||||
$payments = DB::table('accounts')
|
||||
->leftJoin('payments', 'payments.account_id', '=', 'accounts.id')
|
||||
->leftJoin('clients', 'clients.id', '=', 'payments.client_id')
|
||||
->where('accounts.account_key', '=', NINJA_ACCOUNT_KEY)
|
||||
->where('payments.is_deleted', '=', false)
|
||||
->groupBy('clients.id')
|
||||
->count();
|
||||
}
|
||||
|
||||
return json_encode($payments);
|
||||
}
|
||||
}
|
||||
}
|
@ -60,7 +60,7 @@ class ExpenseController extends BaseController
|
||||
|
||||
public function getDatatable($expensePublicId = null)
|
||||
{
|
||||
return $this->expenseService->getDatatable($expensePublicId, Input::get('sSearch'));
|
||||
return $this->expenseService->getDatatable(Input::get('sSearch'));
|
||||
}
|
||||
|
||||
public function getDatatableVendor($vendorPublicId = null)
|
||||
|
@ -24,10 +24,6 @@ class AccountRepository
|
||||
{
|
||||
public function create($firstName = '', $lastName = '', $email = '', $password = '')
|
||||
{
|
||||
if (Utils::getResllerType() == RESELLER_LIMITED_USERS && User::count() >= 1000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$account = new Account();
|
||||
$account->ip = Request::getClientIp();
|
||||
$account->account_key = str_random(RANDOM_KEY_LENGTH);
|
||||
|
@ -61,7 +61,7 @@ class ExpenseRepository extends BaseRepository
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->where(function ($query) {
|
||||
$query->where('contacts.is_primary', '=', true)
|
||||
->orWhere('contacts.is_primary', '=', null);
|
||||
->orWhere('contacts.is_primary', '=', null);
|
||||
})
|
||||
->select(
|
||||
'expenses.account_id',
|
||||
@ -99,7 +99,9 @@ class ExpenseRepository extends BaseRepository
|
||||
|
||||
if ($filter) {
|
||||
$query->where(function ($query) use ($filter) {
|
||||
$query->where('expenses.public_notes', 'like', '%'.$filter.'%');
|
||||
$query->where('expenses.public_notes', 'like', '%'.$filter.'%')
|
||||
->orWhere('clients.name', 'like', '%'.$filter.'%')
|
||||
->orWhere('vendors.name', 'like', '%'.$filter.'%');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ class ExpenseService extends BaseService
|
||||
[
|
||||
'expense_date',
|
||||
function ($model) {
|
||||
return $model->expense_date;
|
||||
return Utils::dateToString($model->expense_date);
|
||||
}
|
||||
],
|
||||
[
|
||||
|
5
public/css/built.css
vendored
5
public/css/built.css
vendored
@ -3385,9 +3385,4 @@ ul.user-accounts a:hover div.remove {
|
||||
|
||||
div.panel-body div.panel-body {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.vcenter {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
@ -31238,9 +31238,6 @@ NINJA.invoiceLines = function(invoice) {
|
||||
}
|
||||
|
||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
||||
if (showItemTaxes && tax) {
|
||||
lineTotal += lineTotal * tax / 100;
|
||||
}
|
||||
lineTotal = formatMoneyInvoice(lineTotal, invoice);
|
||||
|
||||
rowStyle = (i % 2 == 0) ? 'odd' : 'even';
|
||||
|
@ -334,9 +334,6 @@ NINJA.invoiceLines = function(invoice) {
|
||||
}
|
||||
|
||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
||||
if (showItemTaxes && tax) {
|
||||
lineTotal += lineTotal * tax / 100;
|
||||
}
|
||||
lineTotal = formatMoneyInvoice(lineTotal, invoice);
|
||||
|
||||
rowStyle = (i % 2 == 0) ? 'odd' : 'even';
|
||||
|
@ -278,12 +278,11 @@
|
||||
|
||||
<p> <br/> </p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
{!! Button::success(strtoupper(trans('texts.pay_now') . ' - ' . $account->formatMoney($amount, $client, true) ))->submit()->block()->large() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<center>
|
||||
{!! Button::success(strtoupper(trans('texts.pay_now') . ' - ' . $account->formatMoney($amount, $client, true) ))
|
||||
->submit()
|
||||
->large() !!}
|
||||
</center>
|
||||
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user