app/helpers/cornell_catalog_helper.rb
# if there are notes on the holding record, but there are no item records,
# we need to copy the holding note fields to the copies array
if there are notes on the holding record, but there are no item records,
we need to copy the holding note fields to the copies array
if there are notes on the holding record but there are no item records we need to copy the holding note fields to the copies array
def fix_notes(condensed)
	  condensed.each do |loc|
	    if !loc["copies"][0]["items"]["Not Available"].blank? and loc["copies"][0]["items"]["Not Available"]["status"] == 'none'
	      ['orders','summary_holdings','supplements','indexes','notes',
		 'reproduction_note','current_issues'].each do |type|
		loc["copies"][0][type] =  loc[type]  unless loc[type].blank?
	      end
	    end
	  end
	  condensed
	  end
def fix_notes ( condensed ) condensed . each do | loc | if ! loc [ "copies" ] [ 0 ] [ "items" ] [ "Not Available" ] . blank? and loc [ "copies" ] [ 0 ] [ "items" ] [ "Not Available" ] [ "status" ] == 'none' [ 'orders' , 'summary_holdings' , 'supplements' , 'indexes' , 'notes' , 'reproduction_note' , 'current_issues' ] . each do | type | loc [ "copies" ] [ 0 ] [ type ] = loc [ type ] unless loc [ type ] . blank? end end end condensed end
if there are notes on the holding record, but there are no item records,
we need to copy the holding note fields to the copies array
if there are notes on the holding record but there are no item records we need to copy the holding note fields to the copies array
##Rails.logger.debug "\nes287_debug line(#{__LINE__}) location=#{loc['location_name']} #{loc['call_number']}\n" ##Rails.logger.debug "\nes287_debug line(#{__LINE__}) copies  =   " + loc["copies"][0].count.inspect ##Rails.logger.debug "\nes287_debug line(#{__LINE__}) seems like there are no items, so copy notes,etc."
condensed
<not_specific>