class ComptaCourse
Allow for courses to be paid This module attributes the courses to the accounts. Normally this should happen automatically, but for old installations, this editor is necessary.
Public Instance Methods
layout()
click to toggle source
# File Views/Compta/Course.rb, line 7 def layout @order = 50 @update = true @functions_need = [:accounting_courses] @visible = false gui_hboxg do gui_vbox :nogroup do show_entity_course :courses, :single, :name, :flexheight => 1, :callback => true, :width => 100 end gui_vbox do show_str :account_path, :width => 300 show_button :new_account_path, :save end gui_window :win_new_account do gui_vbox :nogroup do show_list_single :new_account, :width => 500, :height => 300 show_button :assign_new_account, :add_archives, :close end end end end
rpc_list_choice( session, name, data )
click to toggle source
# File Views/Compta/Course.rb, line 79 def rpc_list_choice( session, name, data ) dputs(4){"name is #{name} - data is #{data.inspect}"} if course = data._courses dputs(3){"Course is #{course.inspect}"} reply( :empty_nonlists, [:account_path] ) + if course.entries and course.entries != [] reply( :update, :account_path => course.entries.path ) else [] end end end
rpc_update( session )
click to toggle source
# File Views/Compta/Course.rb, line 92 def rpc_update( session ) reply( :empty_nonlists, :courses ) + reply( :update, :courses => Courses.list_courses(session)) end