|
179 | 179 | <th>{{ trans('fi.product') }}</th> |
180 | 180 | <th class="text-right" style="width:70px;">{{ trans('fi.quantity') }}</th> |
181 | 181 | <th class="text-right" style="width:70px;">{{ trans('fi.price') }}</th> |
182 | | - @if ($quote->amount->formatted_total_tax != '')<th class="text-right" style="width:70px;">{{ trans('fi.tax_rate') }}</th>@endif |
| 182 | + @if ($quote->amount->total_tax > 0)<th class="text-right" style="width:70px;">{{ trans('fi.tax_rate') }}</th>@endif |
183 | 183 | <th class="text-right" style="width:80px;">{{ trans('fi.subtotal') }}</th> |
184 | 184 | </tr> |
185 | 185 | </thead> |
|
192 | 192 | </td> |
193 | 193 | <td class="text-right">{{ $item->formatted_quantity }}</td> |
194 | 194 | <td class="text-right">{{ $item->formatted_price }}</td> |
195 | | - @if ($quote->amount->formatted_total_tax != '')<td class="text-right">@if ($item->taxRate) {{ $item->taxRate->formatted_percent }} @endif</td>@endif |
| 195 | + @if ($quote->amount->total_tax > 0)<td class="text-right">@if ($item->taxRate) {{ $item->taxRate->formatted_percent }} @endif</td>@endif |
196 | 196 | <td class="text-right">{{ $item->amount->formatted_subtotal }}</td> |
197 | 197 | </tr> |
198 | 198 | @endforeach |
199 | 199 | </tbody> |
200 | 200 | <tfoot> |
201 | 201 | {{--*/ $colspan = 3 /*--}} |
202 | | - @if ($quote->amount->formatted_total_tax != '') |
| 202 | + @if ($quote->amount->total_tax > 0) |
203 | 203 | {{--*/ $colspan = 4 /*--}} |
204 | 204 | <tr> |
205 | 205 | <th colspan="{{ $colspan }}" class="border-top text-right text-normal">{{ trans('fi.subtotal') }}</th> |
206 | 206 | <td class="border-top text-right">{{ $quote->amount->formatted_item_subtotal }}</td> |
207 | 207 | </tr> |
208 | | - @foreach ($quote->taxRates as $quoteTaxRate) |
| 208 | + @foreach ($quote->summarized_taxes as $tax) |
209 | 209 | <tr> |
210 | | - <td colspan="{{ $colspan }}" class="text-right">{{ $quoteTaxRate->taxRate->name }} {{ $quoteTaxRate->taxRate->formatted_percent }}</td> |
211 | | - <td class="text-right">{{ $quoteTaxRate->formatted_tax_total }}</td> |
| 210 | + <td colspan="{{ $colspan }}" class="text-right text-normal">{{{ mb_strtoupper($tax->name) }}} {{{ $tax->percent }}}</td> |
| 211 | + <td class="text-right">{{{ $tax->total }}}</td> |
212 | 212 | </tr> |
213 | 213 | @endforeach |
| 214 | + @if (count($quote->summarized_taxes) > 1) |
214 | 215 | <tr> |
215 | 216 | <th colspan="{{ $colspan }}" class="text-right text-normal">{{ trans('fi.total') }} {{ trans('fi.tax') }}</th> |
216 | 217 | <td class="text-right">{{ $quote->amount->formatted_total_tax }}</td> |
217 | 218 | </tr> |
| 219 | + @endif |
218 | 220 | @endif |
219 | 221 | <tr> |
220 | 222 | <th colspan="{{ $colspan }}" class="text-right">{{ trans('fi.total') }}</th> |
|
0 commit comments