59 replies [Last post]
Sborselli's picture
Offline
Joined: 03/15/2010
Juice: 10
Was this information Helpful?

Hi everybody,

i come from reading this: http://www.ubercart.org/forum/module_support/3222/invoice_number
and this http://www.ubercart.org/faq/2892 about how numbering invoices.

My qyestion, is there a way to differentiate invoice number and order number?

As an example: let the order number alone and, maybe via conditional action, let the system create the invoice only after the order reach the status "Payment received"?

In this way the invoice number would be fiscally consistent.

I say so because (at least in Italy), for the fiscal law is mandatory that invoices number are consecutive.

Do you have any hint? But please consider that I'm not so php-savvy to write code.

Thank you very much indeed
Simone

Uberchic's picture
Offline
Administrator
Joined: 08/29/2008
Juice: 754
Re: invoice number vs order number

So, not all orders produce invoices? What is the difference between orders that produce invoices and ones that dont? Would it be possible to assign an invoice to each order, but mark the not needed ones as paid in full?

Sborselli's picture
Offline
Joined: 03/15/2010
Juice: 10
the problem is...

That every operation in the checkout part generate an order.
If a user start to buy, then stop the process and never complete it, the number of that order is gone.

What i need instead is a way to generate invoices only at the very end of the process, and the invoice number generated only at that moment, so I'm sure the invoices are consecutive and generated only once the client pays.

koyama's picture
Offline
Joined: 08/12/2009
Juice: 36
Re: invoice number vs order number

I had similar problems for a Danish webshop. Also in Denmark, invoice numbers are required to be consecutive.

Attached is a custom module I am using for a webshop being developed. For use with Drupal 6.x / Ubercart 2.x

Extends Ubercart 2.x to provide

* Invoice number (in addition to the order id)
* Button which the shop owner can click when an invoice needs to be generated for an order
* Consecutive invoice numbers 1,2,3...
* Invoice date
* Invoice template that includes invoice date and invoice number

In the included README.txt there are some instructions.

Since I am new with Drupal and Ubercart it may be somewhat primitive.

Screen shot showing button "Generate invoice":
http://img543.imageshack.us/img543/2038/ss20100419014100.png

Screen shot showing invoice with "invoice number" and "invoice date"
http://img59.imageshack.us/img59/9710/ss20100419014333.png

AttachmentSize
uc_invoice_6.x-custom.tar.gz 4.12 KB
Bruno-2M's picture
Offline
Joined: 01/27/2010
Juice: 28
module UC invoice

Thanks a lot,

Works perfectly !

klippklapp's picture
Offline
Joined: 05/17/2010
Juice: 28
Hi there, I was trying to

Hi there,

I was trying to find a way that a conditional aktion could manage this after the order is completed instead of pushing the button.
Does anyone have a tip for me what php code i have to take for this?

klipp

cfab's picture
Offline
Joined: 06/30/2009
Juice: 70
Conditional action added

Hi there,

for those who are still interested here is a modified version of this module, adding a conditional action to generate the invoice automatically.

Enjoy!

AttachmentSize
uc_invoice.zip 6.06 KB
klippklapp's picture
Offline
Joined: 05/17/2010
Juice: 28
Thank you for your work!

But, what do I have to do to get it work?
Thanks for helping Smiling

klippklapp

cfab's picture
Offline
Joined: 06/30/2009
Juice: 70
Re: Thank you for your work!

You have to activate the invoice module, then you can create a conditional action taking the order status change (to whatever status you want) as a predicate and you'll find an action "Invoice > Generate the invoice corresponding to the order".

klippklapp's picture
Offline
Joined: 05/17/2010
Juice: 28
Works Great!!!!

Thank you very much cfab!

Now I just need t find a way to generate a PDF file from the Invoice but thats another tricky thing i have to find out. Any ideas?

klipp

derjochenmeyer's picture
Offline
Joined: 10/10/2010
Juice: 3
Thanks for this module

Module works as described above.
- Conditional actions work && manual invoice generation works.

Modifications:
- cleaned up the code to meet Drupal's coding standards.
- use hook_uc_invoice_templates to meet requirements of ubercarts new template system
- rewrite the invoice template from itpl.php to new tpl.php

To make new template with "invoice #" and "invoice date" work you need to:
- copy the template from this module "uc_invoice-invoice.tpl.php" to ubercart/uc_order/templates
- goto admin/store/settings/orders/edit and choose "invoice" from the dropdown "On-site invoice template"

AttachmentSize
uc_invoice.zip 9.83 KB
willeaton's picture
Offline
Joined: 05/06/2008
Juice: 65
Re: Thanks for this module

There were a few spelling mistakes in this in the module and the template file for the word "invoice" however the variable used in the template to show the order ID needs fixing as well.

Instead of $order->invoice_id it should be $order->invoice[invoice_id]

Thanks
Will Eaton

bunset's picture
Offline
Joined: 03/06/2011
Juice: 33
Doesnt work for me in ubercart 6.x-2.4

Hello, thanks for your module.

I have
- installed and enabled your uc_invoice
- copied uc_invoice-invoice.tpl.php to ubercart/uc_order/templates
- selected "invoice" from dropdown "on-site invoice template",

but it doesnt show your custom template with invoice id value,
it is always using uc_order-customer.tpl.php.
I know it becuase if I rename the file uc_order-customer.tpl.php, it is giving error and no invoice showed.

Are you tested in 6.x-2.4?

I dont know what to do to get using your template and Im needing it for spanish invoices requirement.

Paracetamol (not verified)
Paracetamol's picture
Re: Doesnt work for me in ubercart 6.x-2.4

That error had been fixed in a newer version of the module, see #28
You can then apply the display changes in the 2 PHP templates as described above.

polmaresma's picture
Offline
Joined: 02/19/2008
Juice: 19
Reset invoice number on january 1st

Thank's for the module!
I can't see on the code if in the 1st of january it will start again from 1. In Spain it's necessary and I'm sure on other countryes too.

Thank's again.

willeaton's picture
Offline
Joined: 05/06/2008
Juice: 65
Re: Reset invoice number on january 1st

You do not need to start the factura numbers at 1 again every year in Spain, you will end up with duplication like that. Me personally I do my facturas in the following format...

WE2010-00001

so basically you can write what you want so long as they are sequential.

designate's picture
Offline
Joined: 11/16/2009
Juice: 79
Invoice number mailed 000

I followed instructions as described, installed uc_invoice which provides a conditional action with which you can generate an invoice automatically after receiving payment. I also added the action to mail the invoice afterwards. Everything works fine except the invoice I receive contains an invoice number BDY-2010-0000 with 4 zero's for which I use the following code in my template file;


<?php
echo t('Invoice #:');
?>

<?php
print ("BDY")."-"; print date("Y")."-"; printf("%04d"$order->invoice[invoice_id]);
?>

When I view the invoice from within Ubercart Order admin the invoicenumber is something like BDY-2010-0010 etc. Also when I received an order, generate the invoice by hand via Orders admin, make payment for specific order, I receive an invoice with a correct invoicenumber. When I set the arguments in the condition and actions to "original order" no email is sent, it only sents when it is put on "updated order" so all three arguments are set to to state.

Any help or idea's please!

Regards, Rob

Vantel's picture
Offline
Joined: 06/03/2010
Juice: 68
How To Generate Multiple Invoices on the Number of Order

Can someone help me with how I can generate multiple invoices depending on the number of orders. Say for instance, a customer orders 3 Shirts. I would like to generate 3 different invoices each with its own unique invoice number or order number. Please help.

cfab's picture
Offline
Joined: 06/30/2009
Juice: 70
Re: How To Generate Multiple Invoices on the Number of Order

Then maybe it's more a multiple orders you need rather than multiple invoices, since invoices are linked to orders.

Vantel's picture
Offline
Joined: 06/03/2010
Juice: 68
Re: Re: How To Generate Multiple Invoices on the Number of Order

Thanks Cfab for your reply. How can I generate the multiple orders for the purchase to make this possible? Some people suggested Conditional Action, however, I don't know how to do this with Conditional Action. Can you please explain the Step By Step method. I'm new to Ubercart. Thank you in advance.

fuerst's picture
Offline
Joined: 03/12/2011
Juice: 25
Re: invoice number vs order number

Attached is a modified release mainly because the uc_invoice.zip from 10/10/2010 did not work in Ubercart 2.4:

  • Added hook_theme_registry_alter(): Allow template file to stay in uc_invoice/templates.
  • Changed template name for the On-site invoice template option from invoice to invoice-number to make clear the modules template should be choosen.
  • Renamed the template from uc_invoice-invoice.tpl.php to uc_order-invoice-number.tpl.php. Note: Invoice templates must start by uc_order- to be recognized by the Order module.
  • Fixed wrong variable call for the Invoice ID in the template file: $order->invoice['invoice_id'] instead of $order->invoice_id
  • Added Invoice date to the template file because Invoice date may by different from Order date.
  • Added module dependencies: uc_order and ca.
  • Renamed it in the uc_invoice.info from UC Invoice to Invoice Number to reflect it's aim better.
  • Fixed some typos.
  • Updated README.txt

I tested the module successfully with Ubercart 2.4.

I think that module deserves to be a project (module) at drupal.org. May be better renamed to uc_invoice_number probably. What do you think?

AttachmentSize
uc_invoice_2011-03-12.zip 6.41 KB
bunset's picture
Offline
Joined: 03/06/2011
Juice: 33
Excellent module. How can I see list of invoices?

Now I have to see each order and into the order I see invoice in case it is created,
I need to see a list of invoices easily, how can I do ?

Thanks.

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Custom number

Hi,

I also had the need for invoice numbering but like Neo13 I needed to have a prefix to this number (current year) so I made some changes to this module taking into account all the previous remarks (including fuerst's). I kept the name UC Invoice as opposed to Invoice Number (what fuerst suggested) because for me invoice embodies more than only the number and I can imagine other functionalities being added to this module later like 'credit note'.
I added a field invoice_nbr which is a varchar to allow for more flexibility in invoice numbering, I kept the invoice_id auto increment as primary key.
In my module the invoice number looks like: 201100001, 201100002,... .
Code for this:

$result = db_query("SELECT invoice_nbr FROM {uc_invoices} WHERE invoice_id = (SELECT MAX(invoice_id) FROM {uc_invoices})");
$invoice_nbr = db_result($result);
$invoice_nbr_prefix = substr($invoice_nbr,0,4);
$invoice_nbr_key = (int)(substr($invoice_nbr,4,strlen($invoice_nbr)-4));
$current_year = date('Y');
if ($invoice_nbr_prefix != $current_year) {
$invoice_nbr = $current_year.'00001';
}
else {
$invoice_nbr_key += 1;
$invoice_nbr = $current_year.str_pad($invoice_nbr_key, 5, "0", STR_PAD_LEFT);
}

db_query("INSERT INTO {uc_invoices} (invoice_id, order_id, created, invoice_nbr) VALUES (NULL, %d, %d, %s)", $order_id, $time, $invoice_nbr);

I also made some changes to the template so that it's named Invoice instead of Order when an invoice number is present.

I agree with fuerst that this module deserves to be a project.

AttachmentSize
uc_invoice_2011-03-22.zip 6.77 KB
peterkamp's picture
Offline
Joined: 03/15/2011
Juice: 11
Invoice number in Views

Hi,

You all did a great job creating this nice invoice number module.
Works great.

I want to use the invoice number in a View. Any ideas?

Thanks

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Invoice number in Views

Hi,

I made it work using the module uc_views but I had to make a change to the uc_invoice table, this was calles uc_invoices and I renamed the table to uc_invoice. So you should uninstall uc_invoice (loosing the invoice numbers) and reïnstall with the attached module (or you can rename the table manually to uc_invoice).

Then install the module uc_views and add following code to the function uc_views_views_data() in the file /modules/uc_views/views/uc_views.views.inc
(you can search for "return $data" and past it before)

****** Copy below ******
//Added by jan_ver
$invoice_schema = drupal_get_schema('uc_invoice');
$data['uc_invoice']['table']['join']['uc_orders'] = array(
'left_field' => 'order_id',
'field' => 'order_id',
);
$data['uc_invoice']['table']['join']['uc_order_products'] = array(
'left_field' => 'order_id',
'field' => 'order_id',
);
$data['uc_invoice']['table']['group'] = t('Ubercart invoice number');
$data['uc_invoice']['invoice_nbr'] = array(
'title' => t('Invoice number'),
'help' => $invoice_schema['fields']['invoice_nbr']['description'],
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
);
$data['uc_invoice']['created'] = array(
'title' => t('Invoice date'),
'help' => $invoice_schema['fields']['created']['description'],
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort_date',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
),
);
****** Copy above ******

After that you can add "Invoice number" and "Invoice date" to the orders view.

Kind regards,

Jan Verhulst

AttachmentSize
uc_invoice_2011-03-30.zip 7.06 KB
peterkamp's picture
Offline
Joined: 03/15/2011
Juice: 11
Invoice number in Views

Hello Jan,

I had made some changes insite your module. My invoice number are like this 11-00005.
So I copied your Views code and made it work for the uc_invoices table.

It works great. Thank you very much for sharing this nice pice of code.

Is there aa way to add this oudsite of the uc_views module?
As soon as we get an update from them we have to change the code again.

Thanks again.

Kind regards Peter

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Re: Invoice number in Views

Actually I just realised I made a stupid mistake and there was no need to hack the uc_views code (beginnersmistake). I'm now adding the code to the uc_invoice module so you don't need to hack uc_views.

peterkamp's picture
Offline
Joined: 03/15/2011
Juice: 11
Re: Invoice number in Views

Hi Jan,

That sounds great.
Hope to see your new code soon.

Thanks, Peter

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Invoice number in Views

Attached the changed uc_invoice that doesn't require hacking uc_views.

AttachmentSize
uc_invoice_2011-03-30-2300.zip 7.21 KB
jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Disable order deletion

Since it's not so good to delete an order that has an invoice number I rewrote the uc_invoice_order function (= hook_order implementation) so that if an invoice number exists for an order the order cannot be deleted (unless the user has the 'unconditionally delete orders' permission). I also added the function uc_invoice_order_has_invoice (to avoid the recurring code).

Replace function uc_invoice_order with:
**** COPY BELOW ****
function uc_invoice_order($op, &$arg1, $arg2) {
switch ($op) {
case 'load':
$order = $arg1;
if (uc_invoice_order_has_invoice($order)) {
$result = db_query("SELECT invoice_id, created, invoice_nbr FROM {uc_invoice} WHERE order_id = %d", $order->order_id);
$row = db_fetch_array($result);
$invoice_id = $row['invoice_id'];
$created = $row['created'];
$invoice_nbr = $row['invoice_nbr'];
$order->invoice = array(
'invoice_id' => $invoice_id,
'created' => $created,
'invoice_nbr'=> $invoice_nbr,
);
}
break;

case 'can_delete':
$order = $arg1;
if (uc_invoice_order_has_invoice($order)) {
return FALSE;
}
break;
}
}

function uc_invoice_order_has_invoice($order) {
$result = db_query("SELECT COUNT(*) FROM {uc_invoice} WHERE order_id = %d", $order->order_id);
$count = db_result($result);
if ($count > 0) {
return TRUE;
}
else {
return FALSE;
}
}
**** COPY ABOVE****

If your using Ubercart 2.4 (don't know about the other versions) the above won't work because of a bug in the UC API.
I created an issue fo this:
http://drupal.org/node/1112550

Until an official patch is released you can fix it yourself by doing some changes in uc_order.module according to my comment #2 on http://drupal.org/node/1112550
Because of the bug above you were also able to delete orders that already had payments.

In attachment my invoice module

Note: If the user has the 'unconditionally delete orders' permission and he deletes an order the invoice number will not be cleaned up automatically.

AttachmentSize
uc_invoice_2011-04-01.zip 7.27 KB
simmel's picture
Offline
Joined: 01/14/2010
Juice: 9
hey there,thanks for the

hey there,
thanks for the code.
I updated the uc_invoice files but didn't get the fields in the views. Do I still have to rename the table uc_inoices table?

EDIT: After some refreshing of my view I got the field! BUT:
I get the following error message: "Table '###.uc_invoice' doesn't exist query: ..."
so I still have to rename the table?

Thanks, simon

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Yes, table should be as

Yes,
table should be as follows:

function uc_invoice_schema() {
$schema['uc_invoice'] = array(
'description' => t('Generates and stores ubercart Invoice numbers.'),
'fields' => array(
'invoice_id' => array(
'description' => t('A consecutive Invoice ID'),
'type' => 'serial',
'not null' => TRUE,
),
'order_id' => array(
'description' => t('The order_id stored in uc_orders table.'),
'type' => 'int',
'not null' => TRUE,
),
'created' => array(
'description' => t('Invoice Date'),
'type' => 'int',
'not null' => TRUE,
),
'invoice_nbr' => array(
'description' => t('A consecutive Invoice number'),
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array('invoice_id'),
'indexes' => array(
'order_id' => array('order_id'),
),
);
return $schema;
}

This is not an upgrade to previous versions so your old invoice numbers won't show anymore unless you copy them yourself to the invoice_nbr field

simmel's picture
Offline
Joined: 01/14/2010
Juice: 9
customize invoice number

Thank you so far for your help. The table now works.
Could you help me get the right code for my customized invoice number?

It should look like: FMA-2011-#####
where ##### is the actual invoice number. i can't get the code to put the FMA in front of it and insert the dashes "-".
For instance, if I put:
$invoice_nbr = ''.$current_year.'-'.str_pad($invoice_nbr_key, 5, "0", STR_PAD_LEFT).'';

I get for invoice 1200 an invoice number of 811 since 2011-1200=810

I really appreciate your help! I already tried it for 2 hours this morning, but somehow I don't get it working.

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Re: customize invoice number

Change the function uc_invoice_view_generate_invoice_form_submit in the uc_invoice.module to:

function uc_invoice_view_generate_invoice_form_submit($form, &$form_state) {
// insert new row in `uc_invoice` table
$order_id = $form_state['values']['order_id'];
$time = time();

//JVH
$result = db_query("SELECT invoice_nbr FROM {uc_invoice} WHERE invoice_id = (SELECT MAX(invoice_id) FROM {uc_invoice})");
$invoice_nbr = db_result($result);
$invoice_nbr_prefix_year = substr($invoice_nbr,4,4);

$invoice_nbr_key = (int)(substr($invoice_nbr,9,strlen($invoice_nbr)-9));
$current_year = date('Y');
if ($invoice_nbr_prefix_year != $current_year) {
$invoice_nbr = "FMA-".$current_year."-".'00001';
}
else {
$invoice_nbr_key += 1;
//$invoice_nbr = $current_year.str_pad($invoice_nbr_key, 5, "0", STR_PAD_LEFT);
$invoice_nbr = "FMA-".$current_year."-".str_pad($invoice_nbr_key, 5, "0", STR_PAD_LEFT);

}

db_query("INSERT INTO {uc_invoice} (invoice_id, order_id, created, invoice_nbr) VALUES (NULL, %d, %d, '%s')", $order_id, $time, $invoice_nbr);

drupal_set_message(t('Invoice generated. '));
}

****END OF CODE****
To be tested...

Make changes accordingly to function uc_invoice_generate_invoice in uc_invoice.ca.inc

I think you were having so much difficulties because '%s' in the INSERT sql wasn't quoted. This works fine for numbers but not if you add other characters.

victorcoder's picture
Offline
Joined: 07/20/2009
Juice: 15
Re: invoice number vs order number

Why not create a official drupal project for this?

Paracetamol (not verified)
Paracetamol's picture
Vote for Drupal project
victorcoder wrote:

Why not create a official drupal project for this?

I just registered at ubercart.org to vote for the same thing. This module concept, aside with VAT seems to be among the most important setups for European Ubercart shops (for the less IT savvy at least).

Also big thanks to #28 for providing a solution to the template name problem and cleanup for Ubercart 2.4.

On a sidenote (and another strong point to start a real Drupal project) I have been using one of the earlier solutions in the thread and was a bit confused, when jan_ver's solution introduced different table names, that – on a Drupal project – would make an upgrade function necessary, especially because otherwise the invoices reset their count.

So for users relying on this for a longer time, the solution in #28 is the best upgrade method.

cjl
cjl's picture
Offline
Joined: 12/11/2011
Juice: 3
name on project?

What is the name of the drupal project? how do i find it at drupal.org?

fuerst's picture
Offline
Joined: 03/12/2011
Juice: 25
Look at my drupal.org sandbox

Currently this module is not available as a official one. I put it into my sandbox at drupal.org to let it grow and mature before releasing it into the wild. Please try it and report any issues: http://drupal.org/sandbox/fuerst/1249740. Be patient - I'm currently somewhat busy.

Paracetamol (not verified)
Paracetamol's picture
Thank you!

Already huge thumbs up for starting a real Drupal project at all and maintaining code!

Paracetamol (not verified)
Paracetamol's picture
Compatibility?

Just as a quick question: Can anybody confirm, that the last update of fuerst's forum version (see comment #29) still works with the latest Ubercart update from October? Or are we better off using the sandbox project?
I was still hesitating to update Ubercart.

Thanks again many times for this extremely useful module!

Luc
Luc's picture
Offline
Joined: 07/24/2010
Juice: 44
Re: invoice number vs order number

I tried both #31 and #38 but something isn't working at my end: when i click the 'generate' button, the order shows the comment that invoice # is created but when i go to that invoice, there's no invoice number. Am i missing something? I have the invoice template enabled in the store settings.

Also, i can't create the conditional action because the action "Invoice > Generate the invoice corresponding to the order is missing (or isn't that part anymore of the module?)

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Re: Re: invoice number vs order number

Try what I wrote in #42, so change the query to db_query("INSERT INTO {uc_invoice} (invoice_id, order_id, created, invoice_nbr) VALUES (NULL, %d, %d, '%s')", $order_id, $time, $invoice_nbr);

I haven't used (tested) conditional actions with this module and don't have time to do so for the moment.

Luc
Luc's picture
Offline
Joined: 07/24/2010
Juice: 44
Re: invoice number vs order number

I tried that and imediately got:

user warning: Table 'd38625_drupal.uc_invoice' doesn't exist query: INSERT INTO uc_invoice (invoice_id, order_id, created, invoice_nbr) VALUES (NULL, 121, 1313262014, '201100005') in /xxx/xxxx/public_html/projects/drupal/sites/all/modules/uc_invoice/uc_invoice.module on line 78.

uc_invoice table exists but the invoice that gives the error isn't created ...

So i uninstalled the module and reinstalled it again ... error went away, invoice number was created (also in DB) but still no number on the invoice ...

As i'm not interested in using a view, i used the uc_invoice_2011-03-22 module.

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Re: invoice number vs order number

The only thing I can think of is that it may not be using the correct template, make some changes to the template to try.

Luc
Luc's picture
Offline
Joined: 07/24/2010
Juice: 44
Hi Jan, that's what i was

Hi Jan,

that's what i was suspecting. But am i correct that the template has to be uploaded to my theme folder? And if so, is it needed that i create a template folder in my theme, because other modules i use don't require that when they use a custom template.

Also, when you say to make changes to the template i'm not sure if i understand you ... i'm not a php coder and should the template as provided by your module not supposed to be sufficient?

What i did notice is that probably the template doesn't get picked up somehow: i'm not a php coder but i do know that the help text fom your template doesn't get shown on the invoice.

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Re: Hi Jan, that's what i was

You do not need to copy the template folder to the theme folder, you leave it under uc_invoice/templates and select the correct template (invoice) at admin/store/settings/orders/edit/basic.
If all else fails you can also overwrite the contents of ubercart/uc_order/templates/uc_order-customer.tpl.php with the contents of uc_invoice-invoice.tpl.php and the select the customer template at /admin/store/settings/orders/edit/basic but this is not very clean.
When building a drupal website or any php-based website and especially an e-commerce site I think knowing some php is a must, http://www.w3schools.com/ gives you a good starting point.

fuerst's picture
Offline
Joined: 03/12/2011
Juice: 25
Drupal sandbox project created

I created a sandbox Drupal project from #29 at http://drupal.org/sandbox/fuerst/1249740. Sandbox project just means it is not available using standard Drupal mechanisms. You have to use Git to download it.

I invite interested parties to discuss changes in the issue queue at http://drupal.org/project/issues/1249740, send patches, or become co-maintainer of the module. Once we get (hopefully) most of you satisfied I will make the sandbox project a real Drupal project.

@jan_ver: I just got lost tracking your modifications to the code. Do you want to re-apply it to the sandbox project at drupal.org?

jan_ver's picture
Offline
Joined: 03/19/2011
Juice: 39
Re: Drupal sandbox project created

@fuerst: Will do ASAP

mindhunter's picture
Offline
Joined: 05/21/2010
Juice: 45
Re: invoice number vs order number

Thank you so much for this great module!

But i also want to know how can i reset the invoice numbers. I tested on my webshop and now i want to reset the numbers so i can start at 1.

And what if i client needs to begin at invoice number 239, how can i change the module so it starts with 240 ?

Thank you so much.

mindhunter's picture
Offline
Joined: 05/21/2010
Juice: 45
Re: invoice number vs order number

The module was working great.

But i updated from uc 2.6 - 2.7, and now the conditional action to make an invoice when a payment is received is not working anymore.

Does anyone else has the same problem?

designate's picture
Offline
Joined: 11/16/2009
Juice: 79
Invoice number

Hi Mindhunter,
Within UC2.7 the conditional action works slightly different. Select the CA "Update order status on full payment" click the action tab/ button where you'll find the generate invoice action.
Regards, Rob