It would be very nice if we could call up the balance of an Order and have that displayed. We often don't have orders payed in full so it would be nice to be able to create a view that showed the current balance rather than only the order total.

There is currently a token that can be used in the order invoice template that outputs the balance, [order-payment-balance], does that help?

Thanks!

Comments

madsph’s picture

I will look into this - but as you might have guessed from my late reply, I am pretty busy with other stuff right now, so I can't commit to any time frame, I am afraid.

deggertsen’s picture

Thanks for getting back to me anyway. When it becomes more important/urgent for me I may see if I can do it myself and submit a patch.

hedley’s picture

StatusFileSize
new2.64 KB

I've got this working and attached a patch, pretty new to this so may need reviewing

hedley’s picture

StatusFileSize
new2.97 KB

Just realised the field is being rendered as 'unknown' - adding $this->field_alias = 'order_balance'; to the handler seems to solve this.

longwave’s picture

Status: Active » Fixed

Committed to CVS, thanks for the patch!

Status: Fixed » Closed (fixed)

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

hedley’s picture

Just a note: the Ubercart Payments module must be enabled to use this handler, otherwise a 'Call to undefined function' occurs. Could consider making this a dependency of uc_views?

hedley’s picture

Just downloaded the latest release, doesn't look like the complete patch made it in there?

m.stenta’s picture

Status: Closed (fixed) » Active

I am trying to take the next step with this by enabling a Sort and Filter handler for the order balance. I'm having trouble getting them to work, though, because it isn't an actual database column so the standard views_handler_sort and views_handler_filter_float handlers don't work. I'll have some time to put into this again soon, but for now I'll subscribe to this thread in case someone else has a suggestion.

gary.evans’s picture

Have you had any luck on finding a solution to this?