fix total discount issue

This commit is contained in:
spvarma
2020-12-24 13:43:29 +05:30
parent fa512629d9
commit 8b04e94446
2 changed files with 50 additions and 44 deletions

View File

@ -94,26 +94,27 @@
</tr>
@endforeach
@endif
@if ($estimate->discount_per_item === 'NO')
<tr>
<td class="pl-10 border-0 total-table-attribute-label">
@if($estimate->discount_type === 'fixed')
@lang('pdf_discount_label')
@endif
@if($estimate->discount_type === 'percentage')
@lang('pdf_discount_label') ({{$estimate->discount}}%)
@endif
</td>
<td class="text-right border-0 item-cell total-table-attribute-value">
@if($estimate->discount_type === 'fixed')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
@if($estimate->discount_type === 'percentage')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
</td>
</tr>
@if($estimate->discount > 0)
@if ($estimate->discount_per_item === 'NO')
<tr>
<td class="pl-10 border-0 total-table-attribute-label">
@if($estimate->discount_type === 'fixed')
@lang('pdf_discount_label')
@endif
@if($estimate->discount_type === 'percentage')
@lang('pdf_discount_label') ({{$estimate->discount}}%)
@endif
</td>
<td class="text-right border-0 item-cell total-table-attribute-value">
@if($estimate->discount_type === 'fixed')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
@if($estimate->discount_type === 'percentage')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
</td>
</tr>
@endif
@endif
<tr>
<td class="py-3"></td>