diff --git a/resources/views/app/pdf/estimate/partials/table.blade.php b/resources/views/app/pdf/estimate/partials/table.blade.php index 6365757b..0a01e34d 100644 --- a/resources/views/app/pdf/estimate/partials/table.blade.php +++ b/resources/views/app/pdf/estimate/partials/table.blade.php @@ -94,26 +94,27 @@ @endforeach @endif - - @if ($estimate->discount_per_item === 'NO') - - - @if($estimate->discount_type === 'fixed') - @lang('pdf_discount_label') - @endif - @if($estimate->discount_type === 'percentage') - @lang('pdf_discount_label') ({{$estimate->discount}}%) - @endif - - - @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 - - + @if($estimate->discount > 0) + @if ($estimate->discount_per_item === 'NO') + + + @if($estimate->discount_type === 'fixed') + @lang('pdf_discount_label') + @endif + @if($estimate->discount_type === 'percentage') + @lang('pdf_discount_label') ({{$estimate->discount}}%) + @endif + + + @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 + + + @endif @endif diff --git a/resources/views/app/pdf/invoice/partials/table.blade.php b/resources/views/app/pdf/invoice/partials/table.blade.php index d8993b12..8fa066cc 100644 --- a/resources/views/app/pdf/invoice/partials/table.blade.php +++ b/resources/views/app/pdf/invoice/partials/table.blade.php @@ -39,19 +39,21 @@ > {!! format_money_pdf($item->price, $invoice->user->currency) !!} + @if($invoice->discount_per_item === 'YES') @if($item->discount_type === 'fixed') - {!! format_money_pdf($item->discount_val, $invoice->user->currency) !!} - @endif - @if($item->discount_type === 'percentage') - {{$item->discount}}% - @endif + {!! format_money_pdf($item->discount_val, $invoice->user->currency) !!} + @endif + @if($item->discount_type === 'percentage') + {{$item->discount}}% + @endif @endif + discount_per_item === 'NO') - - - @if($invoice->discount_type === 'fixed') - @lang('pdf_discount_label') - @endif - @if($invoice->discount_type === 'percentage') - @lang('pdf_discount_label') ({{$invoice->discount}}%) - @endif - - - @if($invoice->discount_type === 'fixed') - {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} - @endif - @if($invoice->discount_type === 'percentage') - {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} - @endif - - + @if($invoice->discount > 0) + @if ($invoice->discount_per_item === 'NO') + + + @if($invoice->discount_type === 'fixed') + @lang('pdf_discount_label') + @endif + @if($invoice->discount_type === 'percentage') + @lang('pdf_discount_label') ({{$invoice->discount}}%) + @endif + + + @if($invoice->discount_type === 'fixed') + {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} + @endif + @if($invoice->discount_type === 'percentage') + {!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!} + @endif + + + @endif @endif +