mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
8739a1b46b
commit
9341ea0c87
@ -115,7 +115,7 @@ class DashboardController extends BaseController
|
|||||||
->where('contacts.deleted_at', '=', null)
|
->where('contacts.deleted_at', '=', null)
|
||||||
->where('contacts.is_primary', '=', true)
|
->where('contacts.is_primary', '=', true)
|
||||||
->select(['payments.payment_date', 'payments.amount', 'invoices.public_id', 'invoices.invoice_number', 'clients.name as client_name', 'contacts.email', 'contacts.first_name', 'contacts.last_name', 'clients.currency_id', 'clients.public_id as client_public_id'])
|
->select(['payments.payment_date', 'payments.amount', 'invoices.public_id', 'invoices.invoice_number', 'clients.name as client_name', 'contacts.email', 'contacts.first_name', 'contacts.last_name', 'clients.currency_id', 'clients.public_id as client_public_id'])
|
||||||
->orderBy('payments.id', 'desc')
|
->orderBy('payments.payment_date', 'desc')
|
||||||
->take(50)
|
->take(50)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'invoice_date_sql' => isset($data->invoice_date) ? $data->invoice_date : null,
|
'invoice_date_sql' => isset($data->invoice_date) ? $data->invoice_date : null,
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => isset($data->notes) ? $data->notes : null,
|
'notes' => isset($data->notes) ? $data->notes : null,
|
||||||
'cost' => isset($data->amount) ? (float) $data->amount : null,
|
'cost' => isset($data->amount) ? (float) $data->amount : null,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -26,6 +26,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'invoice_date_sql' => $data->create_date,
|
'invoice_date_sql' => $data->create_date,
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->notes,
|
'notes' => $data->notes,
|
||||||
'cost' => (float) $data->amount,
|
'cost' => (float) $data->amount,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -24,6 +24,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'invoice_date_sql' => $this->getDate($data->issue_date, 'm/d/Y'),
|
'invoice_date_sql' => $this->getDate($data->issue_date, 'm/d/Y'),
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->subject,
|
'notes' => $data->subject,
|
||||||
'cost' => (float) $data->invoice_amount,
|
'cost' => (float) $data->invoice_amount,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -24,6 +24,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'due_date_sql' => $this->getDate($data->due_date),
|
'due_date_sql' => $this->getDate($data->due_date),
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->summary,
|
'notes' => $data->summary,
|
||||||
'cost' => (float) $data->billed_total,
|
'cost' => (float) $data->billed_total,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -26,6 +26,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'paid' => (float) $data->paid,
|
'paid' => (float) $data->paid,
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->description,
|
'notes' => $data->description,
|
||||||
'cost' => (float) $data->total,
|
'cost' => (float) $data->total,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -27,6 +27,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'due_date_sql' => $this->getDate($data->due_date),
|
'due_date_sql' => $this->getDate($data->due_date),
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->description,
|
'notes' => $data->description,
|
||||||
'cost' => (float) $data->total,
|
'cost' => (float) $data->total,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -25,6 +25,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'due_date_sql' => $data->date_due,
|
'due_date_sql' => $data->date_due,
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->line_item,
|
'notes' => $data->line_item,
|
||||||
'cost' => (float) $data->total,
|
'cost' => (float) $data->total,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -25,6 +25,7 @@ class InvoiceTransformer extends BaseTransformer
|
|||||||
'invoice_date_sql' => $data->invoice_date,
|
'invoice_date_sql' => $data->invoice_date,
|
||||||
'invoice_items' => [
|
'invoice_items' => [
|
||||||
[
|
[
|
||||||
|
'product_key' => '',
|
||||||
'notes' => $data->item_desc,
|
'notes' => $data->item_desc,
|
||||||
'cost' => (float) $data->total,
|
'cost' => (float) $data->total,
|
||||||
'qty' => 1,
|
'qty' => 1,
|
||||||
|
@ -387,7 +387,7 @@ class InvoiceRepository extends BaseRepository
|
|||||||
$task->save();
|
$task->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($item['product_key']) && $item['product_key']) {
|
if ($item['product_key']) {
|
||||||
if (!\Auth::user()->account->update_products) {
|
if (!\Auth::user()->account->update_products) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ class AuthService
|
|||||||
|
|
||||||
if ($result === true) {
|
if ($result === true) {
|
||||||
if (!$isRegistered) {
|
if (!$isRegistered) {
|
||||||
event(new UserSignedUp());
|
|
||||||
Session::flash('warning', trans('texts.success_message'));
|
Session::flash('warning', trans('texts.success_message'));
|
||||||
Session::flash('onReady', 'handleSignedUp();');
|
Session::flash('onReady', 'handleSignedUp();');
|
||||||
} else {
|
} else {
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
{
|
{
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
customDesign[editorSection] = editor.get();
|
customDesign[editorSection] = editor.get();
|
||||||
|
clearError();
|
||||||
refreshPDF();
|
refreshPDF();
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
@ -89,16 +90,34 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadEditor(editorSection);
|
loadEditor(editorSection);
|
||||||
|
clearError();
|
||||||
refreshPDF(true);
|
refreshPDF(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitForm()
|
function submitForm()
|
||||||
{
|
{
|
||||||
|
if (!NINJA.isPDFValid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#custom_design').val(JSON.stringify(customDesign));
|
$('#custom_design').val(JSON.stringify(customDesign));
|
||||||
$('form.warn-on-exit').submit();
|
$('form.warn-on-exit').submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.onerror = function(e) {
|
||||||
|
$('#pdf-error').html(e.message ? e.message : e).show();
|
||||||
|
$('button.save-button').prop('disabled', true);
|
||||||
|
NINJA.isPDFValid = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearError() {
|
||||||
|
NINJA.isPDFValid = true;
|
||||||
|
$('#pdf-error').hide();
|
||||||
|
$('button.save-button').prop('disabled', false);
|
||||||
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
clearError();
|
||||||
refreshPDF(true);
|
refreshPDF(true);
|
||||||
|
|
||||||
var container = document.getElementById("jsoneditor");
|
var container = document.getElementById("jsoneditor");
|
||||||
@ -195,6 +214,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
<div id="pdf-error" class="alert alert-danger" style="display:none"></div>
|
||||||
|
|
||||||
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
|
@include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800])
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<tr>
|
<tr style="font-size:1.05em">
|
||||||
<td class="hide-border" colspan="3"/>
|
<td class="hide-border" colspan="3"/>
|
||||||
<td class="hide-border" style="display:none" data-bind="visible: $root.invoice_item_taxes.show"/>
|
<td class="hide-border" style="display:none" data-bind="visible: $root.invoice_item_taxes.show"/>
|
||||||
<td class="hide-border" colspan="{{ $account->hide_quantity ? 1 : 2 }}"><b>{{ trans($entityType == ENTITY_INVOICE ? 'texts.balance_due' : 'texts.total') }}</b></td>
|
<td class="hide-border" colspan="{{ $account->hide_quantity ? 1 : 2 }}"><b>{{ trans($entityType == ENTITY_INVOICE ? 'texts.balance_due' : 'texts.total') }}</b></td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user