<table id="tbl_packing" class="table table-bordered table-sm table-responsive-sm tbl-th-grey-bg">
	<thead>
		<tr>
			<th>Packing</th>
			<?php if($action=="add"){ ?>
			<th width="50px" class="text-center">#</th>
			<?php } ?>
		</tr>
	</thead>
	<tbody>
<?php 	
	$no_of_rows = 1;
	if($acObj->request->getPost('pp_name')){
		$no_of_rows = count($acObj->request->getPost('pp_name'));
	}else if(isset($packing_list)){
		$no_of_rows = count($packing_list);		
	}
	for($i=0; $i < $no_of_rows; $i++){
		echo view('admin/product_packing_detail_row',['i'=>$i,'packing'=>($packing_list[$i] ?? [])]);
	}
?>
	</tbody>
</table>
<?php if($action=="add"){ ?>
<div class="clearfix">
	<p id="add_packing_btn_container" class="float-right font-weight-boldest text-uppercase mb-0"><a href="javascript:void(0);" onclick="addPackingDetailRow();">Add More</a></p>
</div>	
<?php } ?>