close #252 Fixed: Invoice partial payments are unpredictable
This commit is contained in:
@ -113,10 +113,23 @@
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach($bill->totals as $total)
|
||||
<tr>
|
||||
<th>{{ trans($total['name']) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@if ($total->code != 'total')
|
||||
<tr>
|
||||
<th>{{ trans($total['name']) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
@if ($bill->paid)
|
||||
<tr class="text-success">
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">- @money($bill->paid, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans($total['name']) }}:</th>
|
||||
<td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -113,10 +113,23 @@
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach($invoice->totals as $total)
|
||||
<tr>
|
||||
<th>{{ trans($total['name']) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($total->code != 'total')
|
||||
<tr>
|
||||
<th>{{ trans($total['name']) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr class="text-success">
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans($total['name']) }}:</th>
|
||||
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -165,7 +165,9 @@
|
||||
<li class="divider"></li>
|
||||
@endif
|
||||
@permission('update-incomes-invoices')
|
||||
@if($invoice->invoice_status_code != 'partial')
|
||||
<li><a href="{{ url('incomes/invoices/' . $invoice->id . '/sent') }}">{{ trans('invoices.mark_sent') }}</a></li>
|
||||
@endif
|
||||
@endpermission
|
||||
@if($invoice->customer_email)
|
||||
<li><a href="{{ url('incomes/invoices/' . $invoice->id . '/email') }}">{{ trans('invoices.send_mail') }}</a></li>
|
||||
|
Reference in New Issue
Block a user