@php
$info_right_column = '';
$info_left_column = '';
$info_right_column .= '
' . trans('crm.estimate_pdf_heading') . '';
$info_right_column .= '
# ' . format_estimate_number($appendix->id) . '';
$status = $appendix->status;
if (get_option('show_status_on_pdf_ei') == 1) {
$info_right_column .= '
' . format_estimate_status($status, '', false) . '';
}
// Add logo
$company_logo = get_option('company_logo_dark') ? public_path('upload/company/'.get_option('company_logo_dark')) : '';
$info_left_column .= '

';
// Write top left logo and right column info/text
$organization_info = '
';
$organization_info .= format_organization_info();
$organization_info .= '
';
// Bill to
$appendix_info = '
' . trans('crm.invoice_bill_to') . '';
$appendix_info .= '
';
$appendix_info .= format_customer_info($appendix, 'estimate', 'billing');
$appendix_info .= '
';
// ship to to
if ($appendix->include_shipping == 1 && $appendix->show_shipping_on_invoice == 1) {
$appendix_info .= '
' . trans('crm.ship_to') . '';
$appendix_info .= '
';
$appendix_info .= format_customer_info($appendix, 'estimate', 'shipping');
$appendix_info .= '
';
}
$appendix_info .= '
' . trans('crm.estimate_data_date') . ' ' . local_date_format($appendix->date) . '
';
if (!empty($appendix->expirydate)) {
$appendix_info .= trans('crm.estimate_data_expiry_date') . ': ' . local_date_format($appendix->expirydate) . '
';
}
if (!empty($appendix->reference_no)) {
$appendix_info .= trans('crm.reference_no') . ': ' . $appendix->reference_no . '
';
}
if ($appendix->sale_agent != 0 && get_option('show_sale_agent_on_invoices') == 1) {
$appendix_info .= trans('crm.sale_agent_string') . ': ' . get_staff_full_name($appendix->sale_agent) . '
';
}
@endphp
{!! $info_left_column !!}
|
{!! $info_right_column !!}
|
| |
{!! $organization_info !!}
|
{!! $appendix_info !!}
|
# |
Item |
Qty |
Rate |
Amount |
@foreach($appendix->items as $item)
1 |
{{ $item->description }}
|
{{ $item->qty }} |
{{ $item->rate }} |
{{ $item->qty * $item->rate }} |
@endforeach
@php
$tbltotal = '';
$tbltotal .= '
';
$tbltotal .= '
' . trans('crm.invoice_subtotal') . ' |
' . app_format_money($appendix->subtotal, $appendix->currency) . ' |
';
$tbltotal .= '
' . trans('crm.invoice_total') . ' |
' . app_format_money($appendix->total, $appendix->currency) . ' |
';
$tbltotal .= '
';
echo $tbltotal;
@endphp
|
@if($appendix['profit'] && $appendix['profit']['profit_per_month'])
@foreach($appendix['profit']['profit_per_month'] as $pf)
{{ $pf['month'] }} |
@endforeach
@endif
Balance |
@if($appendix['profit'] && $appendix['profit']['profit_per_month'])
@foreach($appendix['profit']['profit_per_month'] as $pf)
{{ $pf['total'] }}
@if($pf['blocked'])
{{ $pf['blocked'] }}
@endif
|
@endforeach
@endif
Profit% |
@if($appendix['profit'] && $appendix['profit']['profit_per_month'])
@foreach($appendix['profit']['profit_per_month'] as $pf)
{{ $pf['profit'] }}% |
@endforeach
@endif
Gross Profit |
{{ $appendix['profit']['profit_gross'] }}
|
Net Profit |
{{ $appendix['profit']['profit_net'] }}
|
CBC Profit |
{{ $appendix['profit']['profit_cbc'] }}
|
Total Balance |
{{ $appendix['profit']['profit_total'] }}
|
@if($appendix['profit']['profit_blocked'])
Blocked amount |
{{ $appendix['profit']['profit_blocked'] }}
|
@endif
@if(!empty($appendix->clientnote))
{!! trans('crm.estimate_note') !!}
{!! $appendix->clientnote !!}
@endif
@if(!empty($appendix->terms))
{!! trans('crm.terms_and_conditions') !!}
{!! $appendix->terms !!}
@endif
@if($signature['show_signature'])
@lang('crm.authorized_signature_text') |
@lang('crm.document_customer_signature_text') |
{!! $signature['companySignature'] !!} |
{!! $signature['customerSignature'] !!} |
@endif