Displaying 13 results from an estimated 13 matches for "invoice_id".
2008 Jun 14
0
does BackgrounDRB not "know" the rails environment it is running within/in parallel with?]
...text of billing_worker?
cheers,
walt
class BillingWorker < BackgrounDRb::MetaWorker
set_worker_name :billing_worker
def create(args = nil)
# this method is called, when worker is loaded for the first time
logger.info "Faktura baggrundsjob startet!"
end
def build_invoice(invoice_id = nil)
invoice = Invoice.find(invoice_id) unless invoice_id.nil?
logger.info "Faktura ID #{invoice_id} skal dannes!"
unless invoice.nil?
result = false
logger.info "Faktura ID #{invoice_id} dannes!"
result = invoice.print_invoice
"public/forms/inv...
2006 Jun 06
3
Invoice and invoice_lines
...o People,
I have a possibly very lame question.
I am fairly new to RoR, and I want to make sure I do it "right".
I have a model called Invoice, and one called InvoiceLines. Usual story:
the table "invoice" has a 1:n relationship with "invoice_lines", which
includes invoice_id.
Now... the application will have a "new order" button, which will allow
the user to enter all of the order details, etc. Then, the user will
want to add invoice_lines, which are obviously associated with the
order.
The easiest solution I can think of is to have a session variable
(...
2009 Jul 16
12
Find_all_by and find(:all) to only select certain values for a selection box
So....let''s have a look if I understood the issue:
-Find_all_by is actually the same like Find(:all), however Find_all_by
is much shorter and less complicated than the syntax of Find(:all)
-So in my CONTROLLER it says @files = find(:all) however I don''t want
to see all files displayed in my selection box, because I only want to
see the foles whose mandant_id is the same like
2005 Dec 16
4
Adding extra value to an object
Hello friends ,
I have a clear method here ::
def create
@invoiceitems = Invoiceitems.new(params[:invoiceitems])
@invoiceitems["invoice_id"] = params[:id]
if @invoiceitems.save
flash[:notice] = ''Invoiceitems was successfully created.''
redirect_to :action => ''new'',:id => params[:id]
else
render :action => ''new''
end
end
In the table invo...
2006 May 31
1
find by sql
...hanks
scott
#sql to find all invoices
pSql = "SELECT DISTINCT invoices.id, invoices.invoice_number,
invoices.approve_date, invoices.sent_date, invoices.paid_date
FROM projects, payments, invoices
WHERE projects.id = payments.project_id
AND payments.invoice_id = invoices.id
AND projects.id = " + params[:id] + "
ORDER BY invoices.id"
@invoices = Invoice.find_by_sql(pSql);
--
Posted via http://www.ruby-forum.com/.
2005 Dec 16
3
Not able to put into a object variable
hello friends ,
I was trying to select all the invoice items from the table invoiceitems
with a condition.But I am getting a NULL array .Please help me in fixing
this ::
@oldinvoiceitems = Invoiceitems.find(:all, :conditions =>
[''invoice_id = :invoiceid'', { :invoiceid => ''params[:id]'' } ] )
Thanx and regards,
Naroor Rathish,
www.naroor.blogspot.com
--
Posted via http://www.ruby-forum.com/.
2008 May 25
2
record will absolutely not save! so weird, please help.
...day, :amount => ''5.00'', :payable => Student.find(608))
=> #<Payment id: nil, school_id: nil, payment_reason_id: 1,
payment_method_id: 1, date: "2008-05-25", amount: #<BigDecimal:
46958f8,''0.5E1'',4(8)>, created_at: nil, updated_at: nil, invoice_id:
nil, creator: nil, check_number: nil, payable_type: "Student",
payable_id: 608>
>> p.valid?
=> false
>> p.school_id = 1 # school_id is attr_protected
=> 1
>> p.valid?
=> true
>> p.save
=> nil
>> p.save!
=> nil
>> p.save_with_validatio...
2006 Jul 05
2
get value from array.
hi,
Im running the following sql statment which returns 1 result.
pSql = "SELECT sum(amount)
FROM payments
WHERE expected_pay_date LIKE ''"+pWholeDate+"%''
AND invoice_id IS null "
aResult = Payment.find_by_sql(pSql)
how can I get the result of this?
(when doing @aResult.inspect it returns [#"18001.25"}>])
thanks
scott
--
Posted via http://www.ruby-forum.com/.
2005 Dec 16
2
Is this possible?
Hello Friends,
def new
@invoiceitems = Invoiceitems.new
@oldinvoiceitems = Invoiceitems.find(:all, :conditions
=>[''invoice_id = :invoiceid'', { :invoiceid => params[:id] } ]
end
Error is being shown in the line number with ''end''.
This is for initialising a new invoiceItems object and also finding and
storing all the invoice items for a particular invoice id .I will be
having a page '...
2006 Jun 29
0
Problem getting encrypted submit buttons working with the paypal gem and rails 1.1.2
...= File::read("#{RAILS_ROOT}/config/
business_key.pem")
@our_pubcert = File::read("#{RAILS_ROOT}/config/business_cert.pem")
and confirmed via logger.info that I''m loading the correct data from
the files.
I use them in my form view like so:
<%= paypal_setup @invoice_id, Money.us_dollar(@pp_amount_owed),
@paypal_to, :business_key => @our_privatekey, :business_cert =>
@our_pubcert, :business_certid => @our_certid, :return =>
@pp_return, :item_name => @pp_item_name, :notify_url => url_for
(:only_path => false, :action => ''payp...
2007 Aug 13
0
Invoice system
...xt" name="invoice_item[]">
I know something similar can be done in RoR, but just how i don''t know.
My question then is:
How can i make the form, so when the invoice is saved, it goes through
all the invoice_item text fields and adds them to the database - with
the right invoice_id?
Best Regards Jan Christensen
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JY...
2006 Feb 18
14
Composite primary key support in ActiveRecord?
Hi,
As I understand, composite primary keys aren''t supported in
ActiveRecord yet. May I ask if there are plans for this feature?
Better yet, if this feature is under development, how''s the progress
going?
I''m not trying to use legacy databases. I tend to think that using
multiple integer column id''s (composite primary key) are often
natural way to
2006 Dec 08
19
HABTM join table quirk
I''ve been bringing up a good basica framework for applications at work.
To give decent security I''ve been implementing the Rails Recipie for
Authorization of function calls modeled on the book''s implementation.
(Changes for our environment were added..but are minor.)
Since I initially let Rails create the join table between two data
tables with a HABTM relationship....I