diff --git a/app/Ninja/Repositories/CreditRepository.php b/app/Ninja/Repositories/CreditRepository.php
index 1ac543c5b2..4fdace91ed 100644
--- a/app/Ninja/Repositories/CreditRepository.php
+++ b/app/Ninja/Repositories/CreditRepository.php
@@ -19,6 +19,7 @@ class CreditRepository extends BaseRepository
->join('contacts', 'contacts.client_id', '=', 'clients.id')
->where('clients.account_id', '=', \Auth::user()->account_id)
->where('clients.deleted_at', '=', null)
+ ->where('contacts.deleted_at', '=', null)
->where('contacts.is_primary', '=', true)
->select('credits.public_id', 'clients.name as client_name', 'clients.public_id as client_public_id', 'credits.amount', 'credits.balance', 'credits.credit_date', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'credits.private_notes', 'credits.deleted_at', 'credits.is_deleted');
diff --git a/app/Services/DatatableService.php b/app/Services/DatatableService.php
index 32d5909800..67636ebc96 100644
--- a/app/Services/DatatableService.php
+++ b/app/Services/DatatableService.php
@@ -12,7 +12,8 @@ class DatatableService
if ($actions && $showCheckbox) {
$table->addColumn('checkbox', function ($model) {
- return '';
+ return '';
});
}
@@ -81,14 +82,17 @@ class DatatableService
}
if ($entityType != ENTITY_USER || $model->public_id) {
- $str .= "
public_id})\">" . trans("texts.archive_{$entityType}") . "";
+ $str .= "public_id})\">"
+ . trans("texts.archive_{$entityType}") . "";
}
} else {
- $str .= "public_id})\">" . trans("texts.restore_{$entityType}") . "";
+ $str .= "public_id})\">"
+ . trans("texts.restore_{$entityType}") . "";
}
if (property_exists($model, 'is_deleted') && !$model->is_deleted) {
- $str .= "public_id})\">" . trans("texts.delete_{$entityType}") . "";
+ $str .= "public_id})\">"
+ . trans("texts.delete_{$entityType}") . "";
}
return $str.'';
diff --git a/public/favicon-v2.png b/public/favicon-v2.png
new file mode 100644
index 0000000000..9fdfcb9aae
Binary files /dev/null and b/public/favicon-v2.png differ
diff --git a/resources/views/clients/show.blade.php b/resources/views/clients/show.blade.php
index d8918f9d63..b83bbb51f7 100644
--- a/resources/views/clients/show.blade.php
+++ b/resources/views/clients/show.blade.php
@@ -186,6 +186,7 @@
trans('texts.balance'),
trans('texts.adjustment'))
->setUrl(url('api/activities/'. $client->public_id))
+ ->setCustomValues('entityType', 'activity')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
@@ -203,6 +204,7 @@
trans('texts.description'),
trans('texts.status'))
->setUrl(url('api/tasks/'. $client->public_id))
+ ->setCustomValues('entityType', 'tasks')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
@@ -223,6 +225,7 @@
trans('texts.valid_until'),
trans('texts.status'))
->setUrl(url('api/quotes/'. $client->public_id))
+ ->setCustomValues('entityType', 'quotes')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
@@ -241,6 +244,7 @@
trans('texts.end_date'),
trans('texts.invoice_total'))
->setUrl(url('api/recurring_invoices/' . $client->public_id))
+ ->setCustomValues('entityType', 'recurring_invoices')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'asc']])
@@ -256,6 +260,7 @@
trans('texts.due_date'),
trans('texts.status'))
->setUrl(url('api/invoices/' . $client->public_id))
+ ->setCustomValues('entityType', 'invoices')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
@@ -272,6 +277,7 @@
trans('texts.payment_amount'),
trans('texts.payment_date'))
->setUrl(url('api/payments/' . $client->public_id))
+ ->setCustomValues('entityType', 'payments')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'desc']])
@@ -287,6 +293,7 @@
trans('texts.credit_date'),
trans('texts.private_notes'))
->setUrl(url('api/credits/' . $client->public_id))
+ ->setCustomValues('entityType', 'credits')
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('aaSorting', [['0', 'asc']])
@@ -297,6 +304,8 @@
\ No newline at end of file
diff --git a/resources/views/invoices/knockout.blade.php b/resources/views/invoices/knockout.blade.php
index a66c2fcfe1..8308230634 100644
--- a/resources/views/invoices/knockout.blade.php
+++ b/resources/views/invoices/knockout.blade.php
@@ -354,7 +354,7 @@ function InvoiceModel(data) {
self.totals.subtotal = ko.computed(function() {
var total = self.totals.rawSubtotal();
- return total > 0 ? formatMoney(total, self.client().currency_id()) : '';
+ return formatMoney(total, self.client().currency_id());
});
self.totals.rawDiscounted = ko.computed(function() {
diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php
index a5238a437f..ad13a7759d 100644
--- a/resources/views/master.blade.php
+++ b/resources/views/master.blade.php
@@ -6,7 +6,7 @@
@else
{{ isset($title) ? ($title . ' | Invoice Ninja') : ('Invoice Ninja | ' . trans('texts.app_title')) }}
-
+
@endif