<div class="col s12 m12">   
  
		

  <ul class="collapsible-block popout relatedtab" data-collapsible="expandable">	
  	<li>
	<div class="collapsible-header active {{themebasiccolor}}">
				<i class="material-icons left more"  style="display: none">chevron_right</i>
				<i class="material-icons left less">expand_more</i>
				<span>{{"LBL_INVENTORY"|trans|raw}}</span>
				</div>
				<div class="collapsible-body">
				

		{% if record["LineItems"]|length > 0 %}
		<div class="col s12 m12">
  	<div class="card myc-responsive-container">
      
	<table class="bordered ">
        <thead>
          <tr>
          	  
              
          	  {% for fieldname in inventory_line_fields %}
              <th data-field="{{fieldname}}">{{fieldname|trans}}</th>
              {% endfor %}
              
              
          </tr>
        </thead>

        <tbody>
          {% for inventory_record in record["LineItems"] %}
          <tr class="inventory-row" {% if app.assigned_routes[inventory_record["entitytype"]] is defined %}onclick="gotoPage('{{app.config.base_url}}/{{app.assigned_routes[inventory_record["entitytype"]]}}/{{inventory_record["productinfo"]["id"]}}')"{% endif %}>
          	
          	{% for fieldname in inventory_line_fields %}
            <td>
	            <div class="flow-text">
		            {% if inventory_record[fieldname] is defined %}
		            	{{inventory_record[fieldname]|raw}}
		            {% else %}
		            	{{inventory_record["productinfo"][fieldname]|raw}}
		            {% endif %}
	            </div>
	        </td>
            {% endfor %}   
            
                     
          </tr>
          {% endfor %}
          
           {% for total_field in inventory_total_fields %}
           {% if record[total_field] is defined %}
           <tr class="inventory-totals">
	          {% if inventory_line_fields|length > 2 %}
	          <td colspan="{{inventory_line_fields|length - 2}}"></td>
	          {% endif %}
	          <td class="right-align"><div class="flow-text"><b>{{total_field|trans}}</b></div></td>
	          <td><div class="flow-text">{{record[total_field]}} {{record["currencysymbol"]}}</div></td>
	       </tr>
	       {% endif %}
	       {% endfor %}
           
          
        </tbody>
        
	</table>
	
	<style>
		.inventory-totals td:nth-child(2){
			padding-right: 10px !important;
		}	
	</style>
	
    </div>
    
		</div>
    {% else %}
    <h5><small>{{"LBL_NO_DATA"|trans|raw}} </small></h5>
    <div class="clearfix"></div>
    {% endif %}
    
		</div>
  	</li>
	</ul>

		
		
		
</div>