If a customer overpays, show how much change they should receive. It should just show as a highlighted line item, see 7.x version for example if needed.

*Note, this issue depends on #2907670: POS Payment Page which should be merged in shortly

Comments

smccabe created an issue. See original summary.

smccabe’s picture

Also will have to update the ability to add payment over the total, right now it will not allow any overpay.

sorabh.v6’s picture

Assigned: Unassigned » sorabh.v6

Working on it.

sorabh.v6’s picture

StatusFileSize
new26.23 KB

I am trying to add change row to the order payment container. But I think some code from https://www.drupal.org/project/commerce_pos/issues/2907670 needs to be updated. For example when I enter 15 in keypad and order total is 12 then row with payment option and payment amount shows 12 but it should be 15 instead. Similarly, Total paid is the order total and it should be the amount user paid, that is, 15.

Attaching image for reference.

@smccabe Please share your opinion on this.

Thanks

sorabh.v6’s picture

Assigned: sorabh.v6 » Unassigned
Status: Active » Needs review
StatusFileSize
new148.26 KB
new5.07 KB

Patch posted for showing the 'change' row in the order total container. Please review.

jnrfred’s picture

Patch worked for me.

Status: Needs review » Needs work

The last submitted patch, 5: 2916643-5.patch, failed testing. View results

smccabe’s picture

Patch is causing 2 failing tests, so that needs to be reviewed and either tests updated or code fixed.

deepakaryan1988’s picture

Assigned: Unassigned » deepakaryan1988
rakesh.gectcr’s picture

Status: Needs work » Needs review
StatusFileSize
new5.07 KB

Just checking why the testing is getting failed. In my local instance, it is working fine.

Status: Needs review » Needs work

The last submitted patch, 10: 2916643-10.patch, failed testing. View results

sorabh.v6’s picture

@deepakaryan1988 I did not saw any progress posted on this from your end so I decided to work on this. I will be posting patch shortly. Also, I noticed today that the patch I posted in #5 doesn't cover a case and due to that, the test is failing. I will also update the test file with the test for the updated code for showing change.

deepakaryan1988’s picture

Assigned: deepakaryan1988 » Unassigned

Thanks @sorabh.v6
Please proceed!

sorabh.v6’s picture

Status: Needs work » Needs review
StatusFileSize
new6.82 KB
new8.25 KB

Hi Guys, I have corrected the error I made in #5 and updated POSFormTest with the code for testing 'Change'. Uploading patch and interdiff.

Status: Needs review » Needs work

The last submitted patch, 14: 2916643-13.patch, failed testing. View results

sorabh.v6’s picture

StatusFileSize
new581 bytes
new8.3 KB

Update code for test.

sorabh.v6’s picture

Status: Needs work » Needs review
subhojit777’s picture

Assigned: Unassigned » subhojit777
deepakaryan1988’s picture

@subhojit777
I think, it's working for me atleast.

subhojit777’s picture

Assigned: subhojit777 » Unassigned
Status: Needs review » Reviewed & tested by the community

Unassigning. Some important stuff has come up.

RTBC-ing on behalf of Deepak.

  • smccabe committed 1c5dcd4 on 8.x-2.x authored by sorabh.v6
    Issue #2916643 by sorabh.v6, rakesh.gectcr: Support showing "change"
    
smccabe’s picture

Status: Reviewed & tested by the community » Fixed

As per recommendation by Matt F, did a slight change to always show change and to pay labels, just at 0 if nothing is needed.

Otherwise good, committed!

Status: Fixed » Closed (fixed)

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