def determine_items_structure
      items_params = {}
      @document.items.each do |item|
        items_params[:names] = true unless item.name.empty?
        items_params[:variables] = true unless item.variable.empty?
        items_params[:quantities] = true unless item.quantity.empty?
        items_params[:units] = true unless item.unit.empty?
        items_params[:prices] = true unless item.price.empty?
        items_params[:taxes] = true unless item.tax.empty?
        items_params[:taxes2] = true unless item.tax2.empty?
        items_params[:taxes3] = true unless item.tax3.empty?
        items_params[:amounts] = true unless item.amount.empty?
      end
      items_params
    end
def determine_items_structure
      items_params = {}
      @document.items.each do |item|
        items_params[:names] = true unless item.name.empty?
        items_params[:variables] = true unless item.variable.empty?
        items_params[:quantities] = true unless item.quantity.empty?
        items_params[:units] = true unless item.unit.empty?
        items_params[:prices] = true unless item.price.empty?
        items_params[:taxes] = true unless item.tax.empty?
        items_params[:taxes2] = true unless item.tax2.empty?
        items_params[:taxes3] = true unless item.tax3.empty?
        items_params[:amounts] = true unless item.amount.empty?
      end
      items_params
    end
def determine_items_structure items_params = { } @document . items . each do | item | items_params [ :names ] = true unless item . name . empty? items_params [ :variables ] = true unless item . variable . empty? items_params [ :quantities ] = true unless item . quantity . empty? items_params [ :units ] = true unless item . unit . empty? items_params [ :prices ] = true unless item . price . empty? items_params [ :taxes ] = true unless item . tax . empty? items_params [ :taxes2 ] = true unless item . tax2 . empty? items_params [ :taxes3 ] = true unless item . tax3 . empty? items_params [ :amounts ] = true unless item . amount . empty? end items_params end
Determine sections of the items table to show based on provided data
Determine sections of the items table to show based on provided data