<!-- Edit this file to change the layout of the detail view print preview page -->


<div class="panel-heading"><h3 class="panel-title">
	<strong><%%DETAIL_VIEW_TITLE%%></strong>
	<div class="hidden-print pull-right">
		<div class="btn-group">
			<button type="button" id="print" onclick="window.print();" title="<%%TRANSLATION(Print)%%>" class="btn btn-primary"><i class="glyphicon glyphicon-print"></i> <%%TRANSLATION(Print)%%></button>
			<button type="submit" id="back" title="<%%TRANSLATION(Cancel Printing)%%>" class="btn btn-default"><i class="glyphicon glyphicon-remove-circle"></i> <%%TRANSLATION(Cancel Printing)%%></button>
		</div>
	</div>
	<div class="clearfix"></div>
</h3></div>

<div class="panel-body">
	<fieldset class="form-horizontal">
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Date</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(date)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Pi&#232;ce N&#176;</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(num_piece)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Agence</label>
			<div class="col-xs-9">
				<div class="form-control-static"><span id="agence<%%RND1%%>"><%%COMBOTEXT(agence)%%></span></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Service</label>
			<div class="col-xs-9">
				<div class="form-control-static"><span id="service<%%RND1%%>"><%%COMBOTEXT(service)%%></span></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Nature</label>
			<div class="col-xs-9">
				<div class="form-control-static"><span id="nature<%%RND1%%>"><%%COMBOTEXT(nature)%%></span></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Montant</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(montant)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Obs</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(obs)%%></div>
			</div>
		</div>
	</fieldset>
</div>
<!-- child records -->
<div class="panel-body">
	<div id="recettes-children"></div>
</div>

<script>
	$j(function() {
		/* prevent loading child records in multiple DVP */
		if($j('[id=recettes-children]').length > 1) return;

		post(
			'parent-children.php', {
				ParentTable: 'recettes',
				SelectedID: '<%%VALUE(idrecette)%%>',
				Operation: 'show-children-printable'
			},
			'recettes-children',
			'disable-element',
			'loading-element',
			apply_persisting_children
		);

		$j('form').on('click', '#children-tabs button[data-target]', function() {
			$j(this).toggleClass('active');
			persist_expanded_child($j(this).attr('id'));
		});
	})
</script>

