The (printable) invoice of a recurring fee gets the right (newly generated) order number, but the order date is the date of the initial purchase and not the date of the renewal.

CommentFileSizeAuthor
#4 uc_recurring-1319946-1.patch463 bytesMark B

Comments

ju.ri’s picture

I solved this by using the token for "date modified". That puts the right date on each recurring order/invoice.

Kirk’s picture

ju.ri,

I just noticed this too, but I'm uncertain what you mean by you used the token. I can't find anywhere to modify the token date for the order.

Any additional info would be greatly appreciated.

ju.ri’s picture

you have to overwrite the invoice template.
copy uc_order.tpl.php and uc_order-customer.tpl.php from the ubercart/oder/template folder to your theme directory.
modify them to include $order_date_modified
you find all tokens in the conditional actions pages, when editing email actions for example. just modify the token name to have underscores and "$" to use them in templates.

Mark B’s picture

Status: Active » Needs review
StatusFileSize
new463 bytes

This is causing us a much bigger deal. We have to report on orders placed in each month, and if a renewal is generated in November but has an order creation date from August (copied from the initial order) then we have a problem.

I've attached a patch to fix this which works well for our requirements, but I don't know if it has other implications elsewhere.

ju.ri’s picture

that's true, I haven't even thought about reporting.. thanks for hint, and for the patch!
Without this the reports are all wrong, dating all recurring orders back to the original purchase.

ju.ri’s picture

@Univate, is it safe to do this? Can we use this patch without breaking anything else?

rickmanelius’s picture

Needs commit to 7.x branch as well. I'm applying on my site now as it's a one line fix.

rickmanelius’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed it works for D7. And since it's the exact same for D6, marking RBTC.

univate’s picture

Status: Reviewed & tested by the community » Fixed

thanks, committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.