Why two different content types (invoice and scheduled invoice)?
it would be better to have on ct and scheduling is an option.
field_invoice_item
Why is there a field "total"? think it is not needed.
fields total and subtotal
these fields should be automatically filled and not visible.
Payment recieved
there is an default date "now". should be empty on creation.
Comments
Comment #1
nikolai fischer commentedI'm not sure. We must always create a new invoice with an unique invoice number as soon as the schedule is executed.
Currently the invoice number mechanism (serial module) is not flexible enough, to solve this.
Any idea?
It's used for the total sum of a single item. E. g.: you can have a position with an hourly wage of 50,- € and a quantity of 2,5. Then the invoice items total would be 125,-
Yes, you are right! I'm working on this!
Will be fixed in devel stack soon.
Greetings,
Niko
Comment #2
bennos commentedhi
cool.
Let us think about. We need a unique number for every invoice, right?
With two ct, you do not have a unique number for all invoices, only a unique number for invoices in the same ct.
It's bad, when I am looking for an invoice and an I must search in two ct's.
A scheduled invoice without repeating date should work easily. invoice gets published on the date and has a unique serial number.
Scheduling and repeating dates are a little complicated. As i know a scheduled invoice with a repeapting dates does not generates a new node for every repeating date and this would be neccessary to have a unique serial number. Right?
Comment #3
nikolai fischer commentedHi bennos,
The idea behind the second ct for scheduling invoices is, that every time the schedule runs and an invoice is in the pipe for creation, a rule creates a new invoice with the schedule invoice content. So its like a dublication. The benefit of this way is, that there will be a unique invoice number for every new invoice. BUT: The most important benefit - imho - is, that you can change the schedule invoice (wich is like a template invoice) later on (for example: add a product or change a line item).
I think the main problem is the current way of creating a unique serial number. There must be a new mechanism that allows the definition of a starting number in the company content type with own number circles by company.
What do you think?
Niko
Comment #4
bennos commentedSounds good. Document it, so others see the difference between an invoice and an scheduled invoice.
look at the issue queue of the serial field.
like here
http://drupal.org/node/1522642
and there are several more isssues, with the the same problem.
there are some patches with different approaches like an UI to define a starting value for the serial field.
try something out, have looked at the same problem a while ago. my solution was to define the starting value at the db autoincrement field.
this does not solve it here.
Comment #5
nikolai fischer commentedI will document it as soon as possible.
Thanks for the hint. I will have a look at it.
Comment #6
nikolai fischer commentedIt's documented here Difference between "invoices" and "scheduled invoices"