<?php
use common\components\accountstate\AccountStateWidget;
use common\components\total\TotalDifferenceWidget;
?>

 <style>
	.table td{
		padding: 2px;
	}
	.table th{
		padding: 2px;
	}
</style>
<div class="account-state-view ">

    <table class="table-top">
    	<tbody>
    	<tr>
	    <td class="top-cell first">
	    	<p class="p">Zárás összefoglaló</p>
	   		<?php echo AccountStateWidget::widget(['model' =>$model]) ?>
	    </td>
	    <td class="top-cell last">
		    <?php if ( $model->hasDifferenceToPrevState() ){
		    	?>
		    	<?php 
		    	if ( $model->hasMinus()){
		    			?>
		    			 <p class="p">Negatív különbözet</p> 
		    			<?php 
		    		}else{
		    			?>
		    			 <p class="p">Pozitív különbözet</p> 
		    			<?php 
		    		}
		    	echo TotalDifferenceWidget::widget(['model' => $model]	);
		    	
		    }
			?>
    	</td>
    	</tr>
    	</tbody>
    </table>
</div>



<?php   echo $this->render('_mixed', [
					'model' => $model,
					'details' => $details
			] ); ?>
			