<?php 
	use Backend\Models\User;
	use NetSTI\System\Models\CompanySettings; 
	use NetSTI\System\Models\PaymentsSettings; 
?>
<div class="scoreboard">
	<div data-control="toolbar">
		<div class="scoreboard-item title-value">
			<h4><?= trans('netsti.system::lang.estimates.label_nid') ?></h4>
			<p><?= $model->label_nid ?></p>
			<p class="description"><?= CompanySettings::get('company_name_nid')." : ".CompanySettings::get('company_nid') ?></p>
		</div>

		<div class="scoreboard-item title-value">
			<h4><?= trans('netsti.system::lang.estimates.total') ?></h4>
			<p><?= PaymentsSettings::getCurrencyData()['symbol_native'] ?> <span class="total-widget"><?= number_format($model->total, 2, '.', ',') ?></span></p>
			<p class="description"><?= date_format($model->updated_at, 'D d, M Y') ?></p>
		</div>

		<div class="scoreboard-item title-value">
			<h4><?= trans('netsti.system::lang.estimates.created_by') ?></h4>
			<p class="oc-icon-user"><?= $model->owner->first_name.' '.$model->owner->last_name ?></p>
			<p class="description"><?= date_format($model->created_at, 'D d, M Y - h:i a') ?></p>
		</div>
	</div>
</div>
<div data-control="toolbar">
	<a href="<?= Backend::url('netsti/system/estimates') ?>" class="btn btn-primary oc-icon-chevron-left">
		<?= trans('netsti.system::lang.back_close') ?>
	</a>

	<a href="<?= Backend::url('netsti/system/estimates/update/'.$model->id) ?>" class="btn btn-primary oc-icon-edit">
		<?= trans('netsti.system::lang.edit') ?>
	</a>

	<div class="btn-group">
		<button
			class="btn btn-default oc-icon-send"
			data-request="onMail"
			data-request-confirm="<?= trans('netsti.system::lang.send_cofirm') ?>"
			data-stripe-load-indicator>
			<?= trans('netsti.system::lang.send') ?>
		</button>
		<a href="<?= Backend::url('netsti/system/estimates/pdf/'.$model->id) ?>" target="_blank" class="btn btn-default oc-icon-print">
			<?= trans('netsti.system::lang.print') ?>
		</a>
		<a href="<?= Backend::url('netsti/system/invoices/create') ?>" class="btn btn-default oc-icon-chevron-right">
			<?= trans('netsti.system::lang.estimates.to_invoice') ?>
		</a>
	</div>
</div>