Displaying 3 results from an estimated 3 matches for "chargetype".
Did you mean:
changetype
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
...it into rad rails i have to add quotes and the ''+'' symbol
to the end of each line. It is very tedious. What is the best method?
select timesheets.employee,
sum(items.hours) as hours,
sum(items.hours*timesheets.cost)
as cost,
sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0))
as charge,
sum(items.hours*decode(activities.chargetype,0,1,0)) as chargehours
from timesheets, contacts, items, activities, employees, divisions
where
contacts.com_branch_id = 241 and
employees.contact_id = contacts.CONTACT_ID and
contacts.expired=0 and
timesheets.id = items.timesheet and...
2006 Jul 14
3
compare two tables and find the difference?
...harge_type_id'', @charge_types,
''id'', ''full_name'' %></td>
</tr>
the relevant part of the controller:
class ImportController < ApplicationController
...
def update_charges
@new_charges = Source.absent_charges
@charge_types = ChargeType.find(:all)
if request.get?
redirect_to :action => ''update_tables'' if @new_charges.empty?
else
begin
params[:charge].each do |key, row|
Charge.create!(row)
end
rescue Exception => e
flash[:notice] = "Can'...
2006 Jul 21
0
[Slightly OT] Need Query Help
....
My models:
class Client < ActiveRecord::Base
has_and_belongs_to_many :charges, :join_table => ''matters''
...
end
class Charge < ActiveRecord::Base
belongs_to :charge_type
has_and_belongs_to_many :clients, :join_table => ''matters''
end
class ChargeType < ActiveRecord::Base
has_many :charges
end
My schema:
create_table "charge_types", :force => true do |t|
t.column "classification_level", :string, :limit => 40, :default =>
"", :null => false
t.column "classification", :string, :lim...