invoice and bill show transaction line updated

This commit is contained in:
batuhanbas 2019-12-12 17:16:25 +03:00
parent b1f1b3e63c
commit ad308932c1
2 changed files with 149 additions and 129 deletions

View File

@ -39,9 +39,7 @@
@stack('timeline_start')
@if ($bill->status->code != 'paid')
<div class="row justify-content-center">
@stack('timeline_body_start')
<div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
<div class="card">
<div class="card-body">
<div class="timeline timeline-one-side" data-timeline-content="axis" data-timeline-axis-style="dashed">
@ -52,13 +50,15 @@
</span>
<div class="timeline-content">
@stack('timeline_body_create_bill_head_start')
<h3 class="font-weight-bold">{{ trans('bills.create_bill') }}</h3>
<h2>{{ trans('bills.create_bill') }}</h2>
@stack('timeline_body_create_bill_head_end')
@stack('timeline_body_create_bill_body_start')
@stack('timeline_body_create_bill_body_message_start')
<span> {{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('bills.messages.status.created', ['date' => Date::parse($bill->created_at)->format($date_format)]) }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500"> {{ trans_choice('general.statuses', 1) . ':' }}</h4>
<small class="pl-2">{{ trans('bills.messages.status.created', ['date' => Date::parse($bill->created_at)->format($date_format)]) }}</small>
</div>
@stack('timeline_body_create_bill_body_message_end')
<div class="mt-3">
@ -80,13 +80,16 @@
</span>
<div class="timeline-content">
@stack('timeline_body_receive_bill_head_start')
<h3 class="font-weight-bold">{{ trans('bills.receive_bill') }}</h3>
<h2>{{ trans('bills.receive_bill') }}</h2>
@stack('timeline_body_receive_bill_head_end')
@stack('timeline_body_receive_bill_body_start')
@if ($bill->status->code == 'draft')
@stack('timeline_body_receive_bill_body_message_start')
<span> {{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('bills.messages.status.receive.draft') }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4>
<small class="pl-2">{{ trans('bills.messages.status.receive.draft') }}</small>
</div>
@stack('timeline_body_receive_bill_body_message_end')
<div class="mt-3">
@ -98,7 +101,10 @@
</div>
@else
@stack('timeline_body_receive_bill_body_message_start')
<span> {{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('bills.messages.status.receive.received', ['date' => Date::parse($bill->created_at)->format($date_format)]) }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4>
<small class="pl-2">{{ trans('bills.messages.status.receive.received', ['date' => Date::parse($bill->created_at)->format($date_format)]) }}</small>
</div>
@stack('timeline_body_receive_bill_body_message_end')
@endif
@stack('timeline_body_receive_bill_body_end')
@ -114,15 +120,19 @@
<div class="timeline-content">
@stack('timeline_body_make_payment_head_start')
<h3 class="font-weight-bold">{{ trans('bills.make_payment') }}</h3>
<h2>{{ trans('bills.make_payment') }}</h2>
@stack('timeline_body_make_payment_head_end')
@stack('timeline_body_make_payment_body_start')
@stack('timeline_body_get_paid_body_message_start')
@if($bill->status->code != 'paid' && empty($bill->transactions->count()))
<span> {{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('bills.messages.status.paid.await') }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500"> {{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('bills.messages.status.paid.await') }}</small>
</div>
@else
<p class=" text-sm mt-1 mb-0">{{ trans_choice('general.statuses', 1) . ': ' . trans('general.partially_paid') }}</p>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('general.partially_paid') }}</small>
</div>
@endif
@stack('timeline_body_make_payment_body_message_end')
@ -140,9 +150,7 @@
</div>
</div>
</div>
</div>
@stack('timeline_body_end')
</div>
@endif
@stack('timeline_end')
@ -334,11 +342,11 @@
@stack('name_td_end')
@stack('quantity_td_start')
<td class="col-xs-4 col-sm-3 text-center">{{ $item->quantity }}</td>
<td class="col-xs-4 col-sm-3 text-center pl-6">{{ $item->quantity }}</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="col-sm-3 text-center hidden-sm pl-5">@money($item->price, $bill->currency_code, true)</td>
<td class="col-sm-3 text-center hidden-sm pl-8">@money($item->price, $bill->currency_code, true)</td>
@stack('price_td_end')
@stack('total_td_start')
@ -485,8 +493,8 @@
<thead class="thead-light">
<tr class="table-head-line">
<th>{{ trans('general.date') }}</th>
<th>{{ trans_choice('general.statuses', 1) }}</th>
<th>{{ trans('general.description') }}</th>
<th class="text-center">{{ trans_choice('general.statuses', 1) }}</th>
<th class="text-left">{{ trans('general.description') }}</th>
</tr>
</thead>
<tbody>
@ -494,7 +502,7 @@
<tr>
<td>@date($history->created_at)</td>
<td class="text-center">{{ $history->status->name }}</td>
<td class="text-right">{{ $history->description }}</td>
<td class="text-left">{{ $history->description }}</td>
</tr>
@endforeach
</tbody>
@ -529,7 +537,7 @@
@foreach($bill->transactions as $transaction)
<tr>
<td>@date($item->paid_at)</td>
<td>@money($transaction->amount, $transaction->currency_code, true)</td>
<td class="text-right">@money($transaction->amount, $transaction->currency_code, true)</td>
<td>{{ $transaction->account->name }}</td>
<td>
@if ($transaction->reconciled)

View File

@ -50,12 +50,15 @@
</span>
<div class="timeline-content">
@stack('timeline_body_create_invoice_head_start')
<h3 class="font-weight-bold">{{ trans('invoices.create_invoice') }}</h3>
<h2>{{ trans('invoices.create_invoice') }}</h2>
@stack('timeline_body_create_invoice_head_end')
@stack('timeline_body_create_invoice_body_start')
@stack('timeline_body_create_invoice_body_message_start')
<span> {{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('invoices.messages.status.created', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500"> {{ trans_choice('general.statuses', 1) . ':' }}</h4>
<small class="pl-2">{{ trans('invoices.messages.status.created', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }}</small>
</div>
@stack('timeline_body_create_invoice_body_message_end')
<div class="mt-3">
@ -77,13 +80,15 @@
</span>
<div class="timeline-content">
@stack('timeline_body_send_invoice_head_start')
<h3 class="font-weight-bold">{{ trans('invoices.send_invoice') }}</h3>
<h2>{{ trans('invoices.send_invoice') }}</h2>
@stack('timeline_body_send_invoice_head_end')
@stack('timeline_body_send_invoice_body_start')
@if ($invoice->status->code != 'sent' && $invoice->status->code != 'partial' && $invoice->status->code != 'viewed')
@stack('timeline_body_send_invoice_body_message_start')
<span>{{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('invoices.messages.status.send.draft') }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('invoices.messages.status.send.draft') }}</small>
</div>
@stack('timeline_body_send_invoice_body_message_end')
<div class="mt-3">
@ -109,14 +114,17 @@
@endif
@stack('timeline_body_send_invoice_body_button_email_end')
</div>
@elseif($invoice->status->code == 'viewed')
@stack('timeline_body_viewed_invoice_body_message_start')
<span>{{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('invoices.messages.status.viewed') }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('invoices.messages.status.viewed') }}</small>
</div>
@stack('timeline_body_viewed_invoice_body_message_end')
@else
@stack('timeline_body_send_invoice_body_message_start')
<span>{{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('invoices.messages.status.send.sent', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('invoices.messages.status.send.sent', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }}</small>
</div>
@stack('timeline_body_send_invoice_body_message_end')
@endif
@stack('timeline_body_send_invoice_body_end')
@ -132,15 +140,19 @@
<div class="timeline-content">
@stack('timeline_body_get_paid_head_start')
<h3 class="font-weight-bold">{{ trans('invoices.get_paid') }}</h3>
<h2>{{ trans('invoices.get_paid') }}</h2>
@stack('timeline_body_get_paid_head_end')
@stack('timeline_body_get_paid_body_start')
@stack('timeline_body_get_paid_body_message_start')
@if($invoice->status->code != 'paid' && empty($invoice->transactions->count()))
<span>{{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('invoices.messages.status.paid.await') }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('invoices.messages.status.paid.await') }}</small>
</div>
@else
<span>{{ trans_choice('general.statuses', 1) . ' :' }}</span> <span class=" text-sm font-weight-300">{{ trans('general.partially_paid') }}</span>
<div class="d-flex align-items-center">
<h4 class="mb-0 font-weight-500">{{ trans_choice('general.statuses', 1) . ':' }}</h4> <small class="pl-2">{{ trans('general.partially_paid') }}</small>
</div>
@endif
@stack('timeline_body_get_paid_body_message_end')
@ -338,7 +350,7 @@
@stack('quantity_th_end')
@stack('price_th_start')
<th class="col-sm-3 text-center hidden-sm pl-5">{{ trans($text_override['price']) }}</th>
<th class="col-sm-3 text-center hidden-sm">{{ trans($text_override['price']) }}</th>
@stack('price_th_end')
@stack('total_th_start')
@ -352,11 +364,11 @@
@stack('name_td_end')
@stack('quantity_td_start')
<td class="col-xs-4 col-sm-3 text-center">{{ $item->quantity }}</td>
<td class="col-xs-4 col-sm-3 text-center pl-6">{{ $item->quantity }}</td>
@stack('quantity_td_end')
@stack('price_td_start')
<td class="col-sm-3 text-center hidden-sm pl-5">@money($item->price, $invoice->currency_code, true)</td>
<td class="col-sm-3 text-center hidden-sm pl-8">@money($item->price, $invoice->currency_code, true)</td>
@stack('price_td_end')
@stack('total_td_start')
@ -527,7 +539,7 @@
<tr class="table-head-line">
<th>{{ trans('general.date') }}</th>
<th class="text-center">{{ trans_choice('general.statuses', 1) }}</th>
<th class="text-center">{{ trans('general.description') }}</th>
<th class="text-left">{{ trans('general.description') }}</th>
</tr>
</thead>
<tbody>
@ -535,7 +547,7 @@
<tr>
<td>@date($history->created_at)</td>
<td class="text-center">{{ $history->status->name }}</td>
<td class="text-right">{{ $history->description }}</td>
<td class="text-left">{{ $history->description }}</td>
</tr>
@endforeach
</tbody>
@ -570,7 +582,7 @@
@foreach($invoice->transactions as $transaction)
<tr>
<td>@date($transaction->paid_at)</td>
<td>@money($transaction->amount, $transaction->currency_code, true)</td>
<td class="text-right">@money($transaction->amount, $transaction->currency_code, true)</td>
<td>{{ $transaction->account->name }}</td>
<td>
@if ($transaction->reconciled)