Takepos Refunds (Credits) Partial refund

Hello there!
We are looking at using Dolibarr for our retail sales, and TakePos in our shop.
At the moment we are at the ‘research stage’ and are looking to understand how best to use Dolibarr TakePos

I’m seeing no problems with taking orders, however I am a little confused about the Credit/Refund mechanism, The two issues I see are as follows.

  1. I cannot see how to credit part of an order. It is common for a customer to buy multiple items, but want a refund for just one at a later date. The credit option seems to only refund all the items, and the credit does not seem editable after creation to remove the items not being refunded - if I try to delete a line the entire credit ‘disappears’ and a new order is created.

  2. While credited stock is returned to stores, it does not seem that the money is returned, and any attempt to use the payment button fails with the message ‘Invoice is already validated’ . I’ve checked the ‘Cash report’ and underlying Payment and bank tables in the database, I can see the money coming in, but not going out, which would mean the ‘close cash’ report at the end of the day would not match the actual money in the till.

Is there a solution or work around I’m missing to these issues, or am I misunderstanding how things work?
Thanks!

Excuse me replying to my own post, but as no one has replied, I thought I would offer my own solution in case it helps any other readers.

As I have been unable to figure out an alternative way of working, I have taken a look at modifying the php code to allow me to edit a credit, and refund the payment.

There are 3 issues that stop TakePos processing a credit in the way I want:

  1. The credit is already validated, so it cannot be edited.
  2. The edit routines cannot change the items on the order, as the invoice-ref does not match the required template.
  3. Payment cannot occur and an order cant be ‘paid’ (in this case refunded) if the value of the order is less than or equal to zero.

I made the following changes to ‘/takepos/invoice.php’

  1. I commented out the entire ‘$creditnote->validate’ block (starting ‘if (isModEnabled(‘stock’) && $conf->global->$constantforkey != “1”) {’ )- This means credits are created with ‘not validated’ status.
  2. I added a sql update to the credit creation section, setting ref=‘(PROV-POS".$_SESSION[“takeposterminal”].“-”.$place.")’ - this allows the edit routines to work, and part of the credit to be deleted before validation.
  3. I changed ‘$remaintopay > 0’ to ‘$remaintopay != 0’ - This allows a ‘payment’ to the credit to be made, refunding the money to the bank account and validating the credit.

This mod seems to give the functionality I had expected, without altering normal invoice functionality ,however I am inexperienced developer for this system, so would prefer an ‘official’ way of working with partial credits and refund.

I have the same requirement. We need to edit the ticket, only take out the items that the customer returned, do cash back on the Takepos for the items returned, and also put the returned items back into the stock. Also need to see the transaction on the cash up report.

Good day. If you don’t mind, attached the Invoice.PHP file. Need to see where you made the changes. Thanks