diff --git a/app/Models/Account.php b/app/Models/Account.php index 0c6fc04..c3b7ed5 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -281,7 +281,7 @@ class Account extends Model implements IDs DB::raw('SUM(amount) AS payments'), DB::raw('SUM(fees_amt) AS payment_fees'), ]) - ->join('payment_items',['payment_items.payment_id'=>'payments.id']) + ->leftjoin('payment_items',['payment_items.payment_id'=>'payments.id']) ->where('payments.active',TRUE) ->where('payment_items.active',TRUE) ->groupBy(['payment_items.invoice_id']) @@ -299,6 +299,7 @@ class Account extends Model implements IDs ->leftjoin('invoice_item_taxes',['invoice_item_taxes.invoice_item_id'=>'invoice_items.id']) ->rightjoin('invoices',['invoices.id'=>'invoice_items.invoice_id']) ->where('invoice_items.active',TRUE) + ->where('invoice_item_taxes.active',TRUE) ->where('invoices.active',TRUE) ->groupBy(['invoice_items.invoice_id']), ),'p') diff --git a/resources/views/theme/backend/adminlte/r/account/widgets/list.blade.php b/resources/views/theme/backend/adminlte/account/widget/admin/list.blade.php similarity index 100% rename from resources/views/theme/backend/adminlte/r/account/widgets/list.blade.php rename to resources/views/theme/backend/adminlte/account/widget/admin/list.blade.php diff --git a/resources/views/theme/backend/adminlte/account/widget/invoice_due.blade.php b/resources/views/theme/backend/adminlte/account/widget/invoice_due.blade.php index 12e7de6..14aa456 100644 --- a/resources/views/theme/backend/adminlte/account/widget/invoice_due.blade.php +++ b/resources/views/theme/backend/adminlte/account/widget/invoice_due.blade.php @@ -7,7 +7,7 @@
No invoice due
diff --git a/resources/views/theme/backend/adminlte/home.blade.php b/resources/views/theme/backend/adminlte/home.blade.php index a228e61..5d1a04d 100644 --- a/resources/views/theme/backend/adminlte/home.blade.php +++ b/resources/views/theme/backend/adminlte/home.blade.php @@ -96,7 +96,7 @@ @if($o==$user) @canany('reseller','wholesaler')Account | +# | +Due | +Items | +Discounts | +Total | +Payments | +Balance | +
---|---|---|---|---|---|---|---|
{{ $oo->account->name }} | +{{ $oo->lid }} | +{{ $oo->due_at->format('Y-m-d') }} | +${{ number_format($oo->_item+$oo->_tax,2) }} | +${{ number_format($oo->_discount,2) }} | +${{ number_format($oo->_total,2) }} | +${{ number_format($oo->_payment,2) }} | +${{ number_format($oo->_balance,2) }} | +
No invoice due
diff --git a/resources/views/theme/backend/adminlte/invoice/widget/due.blade.php b/resources/views/theme/backend/adminlte/invoice/widget/due.blade.php index 2bddfc1..c91d863 100644 --- a/resources/views/theme/backend/adminlte/invoice/widget/due.blade.php +++ b/resources/views/theme/backend/adminlte/invoice/widget/due.blade.php @@ -1,6 +1,6 @@ - + -Account | @@ -12,8 +12,8 @@||
---|---|---|
{{ $oo->account->name }} | {{ $oo->lid }} | {{ $oo->due_at->format('Y-m-d') }} | @@ -32,9 +32,9 @@ @js(datatables,bootstrap4|rowgroup)