search for: invoiceitem

Displaying 7 results from an estimated 7 matches for "invoiceitem".

2005 Dec 15
12
Adding multiple invoice items to an invoice on the same form
...ment .I am designing a invoice printing system .So right now I have the NEW page for adding the invoice details to the table .Now I have the requirement of adding Invoice Items In the same form .I have added multiple text boxes to enter the values of the Items using <%= text_field ''invoiceitems[]'', ''item_price'' %> <%= text_field ''invoiceitems[]'', ''item_qty'' %> etc. How can I save the multiple items in the same form .I have to insert the invoice details and the invoice items on the same button click. Waiting for...
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...
2005 Dec 23
0
adding items to a particular invoice on the same page
...n the final page .This page will have fields for entering the invoice details and also I have added a AJAX effect so that fields for invoice items get created dynamically . its all design well but the issue comes when I am trying to save the page .That is adding ivoice details to invoices table and invoiceitems details to invoiceitems table .We have to add the invoiceid to the invoiceitems table .I am adding all the required code with this mail. View Index.rhtml <html> <head> <title>Ajax List Demo</title> <%= javascript_include_tag "prototype" %> </...
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.n...
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 al...
2005 Dec 20
0
Dynamic fields creation and accessing data
Hi friends , I was trying this code and finding some errors.I am trying this to implement dynamic creation of invoice items in invoices using AJAX .Please go thru . I added a partial :: <% @invoiceitem = invoiceitem -%> <%= text_field ''invoiceitem'', ''item_price'', ''index'' => invoiceitem_counter %> <%= text_field ''invoiceitem'', ''item_qty'', ''index'' => invoiceitem_counter...
2005 Dec 23
1
key value pairs working
Hi, can anyone tell me how is the following lines in ruby works on rails .how is the key value pairs accessed by rails . params[:invoiceitem].each do |key, val| @invoice.invoiceitems << InvoiceItem.new(val) end Thanx and regards, Naroor Rathish, www.naroor.blogspot.com -- Posted via http://www.ruby-forum.com/.