There is hardcoded current timestamp in function uc_payment_enter();

  db_query("INSERT INTO {uc_payment_receipts} (order_id, method, amount, uid, data, comment, received) VALUES (%d, '%s', %f, %d, '%s', '%s', %d)",
    $order_id, $method_name, $amount, $uid, $data, $comment, time());

I need a date field in uc_payment_by_order form (and use current timestamp only if no value added).
I want to add all payments weekly, but need exact date of bank transfer on the invoice.

Or does anybody has sugestion how to inject to that process (with knowing receipt ID) programtically in own module?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mertskeli’s picture

There's a contrib module for that somewhere. Search.
Uc core lacks such a vital feature.
For now, I'm doing it manually in a db.

bokki’s picture

merskeli,

I've searched high and low for the module you mentioned.
Are you referring to the module mentioned here which allows for the invoice date to be entered manually
or one that specifically deals with payments within an order?

karlos007,
did you find a solution to your problem? I'm needing to do the same but not to display it on an invoice - more for end-of year accounting. Before I came to your issue, I ended up opening one #1138174: Admin-entered "payment received date" for bank transfer? in the bank_transfer module (though in retrospect this would also apply to cheques and maybe COD/manual CC payments) and xibun said it can be done. awaiting reply on the 'how'.
If the date can be changed (manually added) on the payments page, then putting it on the invoice would be as easy as editing the invoice template.

mertskeli’s picture

bokki,
probably the order date.

TR’s picture

Version: 6.x-2.4 » 7.x-3.x-dev

Let's get this into 7.x-3.x first.

bgm’s picture

Status: Active » Needs review
FileSize
3.13 KB

Here's a patch for 7.x-3.x to allow the user to enter a payment date. It defaults to the current date.

Imho, I see no reason to stop store admins from entering a date. This can be useful to enter post-dated checks, as much as to enter payments received a few days ago. (our site exports this data automatically to the accountancy system, so it's important to have the correct date)

TR’s picture

TR’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

This is a no-brainer. I tested the patch and it works as advertised. Committed to 7.x-3.x, should be backported to 6.x-2.x as well.

Thanks bgm!

TR’s picture

Status: Patch (to be ported) » Fixed

Backported #5 to D6, tested and committed.

http://drupalcode.org/project/ubercart.git/commitdiff/15ba904

Status: Fixed » Closed (fixed)

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