search for: invoices

Displaying 20 results from an estimated 265 matches for "invoices".

2006 Jun 20
1
ActiveRecord saving madness?
Hello, First of all, I love RoR. I am studying it, and I am finally "getting there". However, I do have a bit of a problem with ActiveRecord''s saving behaviour. Imagine to have Orders (id, name) {has_one:invoice} and Invoices (id, order_id) {belongs_to :order} . If you type: invoice = Invoice.new(...whatever...) an_order.invoice = invoice if invoice fails to save, you will never know. What''s worse, an_order will be saved, and will have a nasty nil, which means that your rhtml template will *fail* when goin...
2008 Jun 14
0
does BackgrounDRB not "know" the rails environment it is running within/in parallel with?]
Hi, it probably is a noob question but I''m confused by this error message: active_support/dependencies.rb:478:in `const_missing'': uninitialized constant Invoice::ApplicationController Situation: I have an InvoicesController with a create method that in turn calls upon a MiddleMan.worker(:billing_worker), which in turn finds an Invoice and calls upon @invoice.print_invoice "public/forms/invoices/html/#{invoice.invoice_number}.html" to generate a html version of an invoice. The class Invoice.rb...
2006 May 31
1
find by sql
..., which makes use of an sql statment to get the results required. However this just doesnt seem right for rails, as ive managed to develop the whole project without using any other pure sql. Is there a cleaner way of doing this, but gaining the same results. thanks 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 p...
2018 Apr 10
3
Invoice numbering for customers
Just wanted to ask a quick question here. I am running GNUC 2.6.12 and when I create a invoice for a customer I have to enter an invoice number. I was thinking perhaps there is setting somewhere that I missed to get it to automatically fill in a invoice number? Id hate to have invoices with the same invoice number since I have to manually type them in right now. Thank you, jdegraw
2006 Jan 03
4
Would someone like to tell me why this code will not solve my problem? (it''s short)
...produced because there is no earlier invoice number. My solution is as follows (and does not work) This is in the ''create'' controller if Invoice.find(:all) @temp = Invoice.find_by_sql("select max(inv_number) as inv_number from invoices where company_id = params [:company_id") @invoice.inv_number = @temp[0].inv_number +1 else @invoice.inv_number=1 end The error I am getting is NoMethodError in Invoices#create You have a nil object when you didn''t expect it! You might have expected an ins...
2006 May 19
7
AR transactions and isolation levels
...ecute(). Any better approaches? If i understand correctly, under the serializable transaction level i shouldn''t be able to read data that''s being updated by another transaction. Still, running Invoice.create_new from two different consoles at the same time seems to create two new Invoices, both with the same invoice_no. Am I mistaken about how transactions or the serializable isolation level really work, or is it my code or environment that''s fubar? Am using Postgres 8.1.something, so the DB should be up to the task. Any feedback appreciated, Isak
2010 Aug 02
5
What do you use for Invoicing?
...e, Sorry, if it's not directly related to Asterisk. Some of people on this list might have PBX deployed for their clients. What software do you use to invoice them so the invoice looks like a proper telecom invoice maybe? Prefer: -opensource with Windows binary available. -able to create .pdf invoices rather than printable ones. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100802/2cd582c3/attachment.htm
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 23
0
adding items to a particular invoice on the same page
...ys and been stuck on 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 "prototy...
2006 Nov 07
2
undefined local variable or method `invoices' for Provider:Class
I''m pretty new to Rails, and I think my app has progressed quicker than my knowledge of Rails/Ruby has ... I have the following models: [ -- Begin -- ] class Provider < ActiveRecord::Base has_many :invoices has_one :user def self.get_invoices invoices.find(:all) end end class User < ActiveRecord::Base belongs_to :Provider belongs_to :Consumer def invoices_raised Provider.get_invoices end ... end [ -- End -- ] and when I call User.invoices_raised I get this error: und...
2005 Dec 15
12
Adding multiple invoice items to an invoice on the same form
Hi Friends , Got a unique requirement .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''
2006 Jun 06
3
Invoice and invoice_lines
Hello 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
2005 Dec 30
3
Select SUM(?) Query
When using PHP, I was able to enter a query against my list of invoices such as : Select SUM(amount) from invoices where project="123" This would give me the total amount of all invoices for project 123. In rails, how would I do this? I tried using "find_by_sql," but couldn''t figure out how to extract the results out of this. Thanks! _...
2006 Feb 10
1
Eager loading issue
I have three tables, Invoices, Projects, and Managers. Each manager has many projects. Each project has many invoices. When displaying a list of the invoices, I am using: Invoice.find(:all, :include => [:project]) Since the list shows information from the project table. (For example, a table showing Invoice Date, Proje...
2005 Dec 24
0
Problem with the association.
I have a problem with the association. I have the model called Invoice whit the associations: belongs_to :company belongs_to :client belongs_to :type_invoice has_many :row_invoices belongs_to :bank belongs_to :payment When i create the invoice i use a session variable, so i can add all the information i wont and I can save all at the end. This is all ok. def new session[:invoice] = Invoice.new # new invoice session[:invoice].company = Company.find(1) # load company ......
2007 Aug 13
0
Invoice system
Hi, I wanna make a invoice system. I''ve set up a invoice model and a invoice_item model (invoice has_many invoice_item and invoice_item belongs_to invoice). Also invoice belongs_to a customer, and a customer has_many invoice. My problem is i don''t know how to create the form for making a new invoice. I''ve made a similar system in php, and here is how the html form was:
2014 Apr 16
0
[XPOST] Invoicing - 1.0.0 released
Hello people, We have released invoicing gem which helps you in creating, managing and generating pdf for invoices. Bit of background: Invoicing gem was initially developed by Martin Kleppmann (https://github.com/ept/) for generating and displaying invoices. This release polishes the gem, makes it compatible with rails 3 and rails 4, adds pdf generation source: https://github.com/code-mancers/invoicing docs:...
2006 Jan 03
3
What am I doing wrong!!!
...i: @x = Invoice.find(:first) if @x do one thing else do another end This ought to work but does not. I think that @x is nil but if I test for existance or @x != nil or @x.attribute != nil - my code does not respond correctly. What is the value of @x if there are no records yet in the invoices table? Thanks in advance. bruce
2006 Jul 21
0
Selecting customers and addresses in a form (was Getting joined collections on a form)
...s, each customer has one or more addresses. The user opens the Invoice form and selects from a list of customers which in turn populates and displays a list of that customer''s addresses. It works like this: 1) The Invoice controller receives a new request and renders the new.rhtmlform: /invoices/new def new @invoice = Invoice.new @customers = Customer.find(:all, :order => "name") end new.rhtml <% form_for :invoice, @invoice, :url => { :action => "create" } do |f| %> Customer: <%= collection_select(:invoice, :custo...
2006 Jan 06
3
Error Handling
Hi, I am doing a project on invoice. For that I have to use a page both for crating new invoices and for updation of existing invoices. The problem is that when an error occures, I can''t maintain the same page for error correction. How can I redirect it from the controller ? Or can I display ruby errors before submit of the page in ruby? Thanks.. Sainaba. -- Posted via http://w...