<%= form_tag({:action=>'index'},:multipart=>true,:id=>'myForms') do %>
<% if @myAddAld %>
<% end %>
<% end %>
S.No
Group
Title
Type
Item
Setup cost
Cost Type
Value
Action
<% pagestart = params[:page] ? params[:page] : 1
if pagestart.to_i <=1
i = 1
else
i = ((pagestart.to_i-1)*10)+1
i = i.to_i
end %>
<% if @menu_item.length>0 %>
<%
@menu_item.each do |menuitm|
gruop=""
titl=""
gruopobj = get_gruop_name(menuitm.mi_compcode,menuitm.mi_group)
if gruopobj
gruop=gruopobj.grp_name
end
titlobj = get_titl_name(menuitm.mi_compcode,menuitm.mi_title_counter)
if titlobj
titl=titlobj.tc_title_counter
setupcost=titlobj.tc_min_setup_cost
end
%>
<%=i%>
<%= gruop%>
<%= titl%>
<%= menuitm.mi_type%>
<%= menuitm.mi_item%>
<% if setupcost.to_s.blank? %>
0
<%else%>
<%= setupcost%>
<%end%>
<%= menuitm.mi_cost_type%>
<% if menuitm.mi_min_amount_guest.to_s.blank? %>
0
<%else%>
<%= menuitm.mi_min_amount_guest%>
<%end%>
<% if @myEditAld %>
<% end %>
<% if @myDeletAld %>
<% end %>
<% i += 1 %>
<% end %>
<% end %>
<%= will_paginate(@menu_item)%>
<%
message = ""
rescue ActiveRecord::RecordNotFound => e
# Handle the specific exception when the record is not found
message = "Record not found #{e.message}"##{e.message}
isFlags = false
rescue ActiveRecord::StatementInvalid => e
# Handle SQL syntax errors or invalid queries
message = "Unknown error #{e.message} " ##{e.message}
isFlags = false
rescue StandardError => e
# Handle any other errors
message = "An error occurred #{e.message}" ##{e.message}
isFlags = false
end
%>
<%=message%>