<div class="modal-dialog ui-front" role="document">
  	<div class="modal-content">

    <?php echo Form::open(['url' => action('ProductionCostingController@updateRecipeCostSetup', $production_costing_mst->id), 'method' => 'put', 'id' => 'account_type_form' ]); ?>

    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <h4 class="modal-title">Edit Production/ Decompose Setup for <?php echo e($product_list->name, false); ?></h4>
    </div>

    <div class="modal-body">
      <div class="form-group">
        	<?php echo Form::label('main_category', 'Product Category:*'); ?>

          	<?php echo Form::text('main_category', $product_list->category, ['class' => 'form-control','required','readonly']);; ?>

      </div>
      <div class="form-group">
        	<?php echo Form::label('finished_product', 'Finished Product:*'); ?>

          	<?php echo Form::text('finished_product', $product_list->name, ['class' => 'form-control','required','readonly']);; ?>

      </div>
      <div class="form-group col-md-6">
        	<?php echo Form::label('production_qty', 'Expected Output Qty:*'); ?>

          	<?php echo Form::text('production_qty', $production_costing_mst->production_qty, ['class' => 'form-control input_number','required']);; ?>

      </div>
      <div class="form-group col-md-6">
        	<?php echo Form::label('require_production', 'Require Production:*'); ?>

          	<?php echo Form::select('require_production', $yesno,$production_costing_mst->require_production, ['class' => 'form-control input_number','required', 'placeholder' => 'Choose Option']);; ?>

      </div>
	  <div class="clearfix"></div>
      
	<div class="row">
		<div class="col-sm-8 col-sm-offset-2">
			<div class="form-group">
				<div class="input-group">
					<span class="input-group-addon">
						<i class="fa fa-search"></i>
					</span>
					<?php echo Form::text('search_product', null, ['class' => 'form-control mousetrap', 'id' => 'search_product', 'placeholder' => __('lang_v1.search_product_placeholder')]);; ?>

				</div>
			</div>
		</div> 
	</div>
	<div class="row"> 
	<div class="col-sm-12"> 
		<!-- Keeps count of product rows -->
		<input type="hidden" id="product_row_count" 
			value="<?php echo e($production_costing_txn->count(), false); ?>">
		<table class="table table-condensed table-bordered table-striped table-responsive" id="purchase_entry_table">
			<thead>
				<tr>
					<th class="tex-center col-md-7 ">	
						Raw Material
					</th>
					<th class="text-center col-md-4">
						<?php echo app('translator')->getFromJson('sale.qty'); ?>
					</th>
					<th class="text-center"><i class="fas fa-times" aria-hidden="true"></i></th>
				</tr>
			</thead>
			<tbody>
			<?php
			$row_count=1;
			?>
			<?php $__currentLoopData = $production_costing_txn; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
			<tr>
				<td>
					<?php echo e($product->name, false); ?>

					
				</td>
				<td>
					<?php echo Form::hidden('purchases[' . $row_count . '][product_id]', $product->raw_material );; ?>

					<?php echo Form::hidden('purchases[' . $row_count . '][variation_id]', $product->variation_id , ['class' => 'hidden_variation_id']);; ?>


					<?php
						$check_decimal = 'true';
						$currency_precision = config('constants.currency_precision', 2);
						$quantity_precision = config('constants.quantity_precision', 2);
					?>
					<?php echo Form::text('purchases[' . $row_count . '][quantity]', number_format($product->required_qty, $quantity_precision,'.',','),['class' => 'form-control input-sm purchase_quantity input_number mousetrap', 'required', 'data-rule-abs_digit' => $check_decimal, 'data-msg-abs_digit' => __('lang_v1.decimal_value_not_allowed')]);; ?>

					
				</td>
				<?php $row_count++ ;?>

				<td><i class="fa fa-times remove_purchase_entry_row text-danger" title="Remove" style="cursor:pointer;"></i></td>
			</tr>
			<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
			</tbody>
		</table>
	</div> 
	</div> 

    </div>

    <div class="modal-footer">
      <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson( 'messages.save' ); ?></button>
      <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson( 'messages.close' ); ?></button>
    </div>

    <?php echo Form::close(); ?>


  	</div><!-- /.modal-content -->
</div><!-- /.modal-dialog --><?php /**PATH D:\System\htdocs\bethosonlinee\resources\views/production_costing/edit.blade.php ENDPATH**/ ?>