Needs work
Project:
e-Commerce
Version:
6.x-4.x-dev
Component:
ec_receipt
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2009 at 12:00 UTC
Updated:
7 Sep 2010 at 05:52 UTC
Jump to comment: Most recent file
Comments
Comment #1
Soren Jones commentedThis is part of a some code that was added to ec_receipt.module on March 19, 2009:
Diff of /contributions/modules/ecommerce/ec_receipt/ec_receipt.module
The added functions all seem to relate to admin/store/receipts [the ec_receipt_list view in ec_receipt.views_default.inc].
There are three bulk operations that were added to admin/store/receipts at this time: ec_receipt_action_delete, ec_receipt_action_allocate, and ec_receipt_action_refund.
ec_receipt_action_delete and ec_receipt_action_refund both seem to be dead ends.
Question:
Is admin/store/receipts [the ec_receipt_list view] a todo, an abandoned idea, or something else?
For reference:
ec_receipt_action_allocate calls ec_receipt_allocate, which is also called in ec_receipt_checkout_post_submit [in ec_receipt.checkout.inc].
Allocations can be reversed elsewhere at admin/store/receipts_alloc. "Reverse Allocation" on this page uses ec_receipt_reverse_allocation.
Comment #2
Soren Jones commentedComment #3
burningdog commentedIs this as simple as
DELETE FROM {ec_receipt} WHERE erid = %receipt_id? Are there other tables we need to take into account? (Not that I can see, at least)Comment #4
burningdog commentedTo answer the question from #1, admin/store/receipts shows a view of receipts. I don't know what ec_receipt_action_refund() is supposed to do. Well, it's supposed to refund receipts - is this returning money to users at some point?
I've implemented my suggestion from #3 to allow the deleting of receipts; patch attached.
Comment #6
burningdog commentedFine then :p
Comment #7
Soren Jones commentedComment #9
gordon commentedThis will not really work.
Just deleting the receipt is not going to leave artifacts such as allocation. We need to make sure that when delete a receipt we are able to. ie. The receipt is still allocated to a transaction, it needs to be unallocated and refunded before it can be deleted.
Allowing someone delete a receipt will cause the system to go out of balance.
I think this is why I didn't implement it and left this as it was.