Thanks for that fine module :)

I am experiencing one curious problem with it. In Czech republic we have Number format as follows:
Decimals divider ","
Thousands divider ".".

On screen "admin/store/orders/__ORDER NUMBER__/receive_bank_transfer" in field Amount is pre-filled transfer amount, edited by current country settings, such as "1.918,12". But when I simply click Bank transfer" button to accept the payment, I got message saying "Amount must be a number". I have to edit it to english format (decimals divider ".", no thousands divider) to accept the amount.

Comments

xibun’s picture

Hi,

on my installation it shows:

Order balance: €1.918,12

Amount:
€ [1918,12]

So the pre-filled edit field doesn't show the thousands divider in my case. Just clicking "Receive Bank Transfer" also results in an error "The amount must be a number." - thus in general I can reproduce the bug you have reported.

Question: Is there any example in Ubercart where you can actually enter an amount in Czech format? I've just checked on the product edit page and the pre-filled values in the edit cell remains "1918.12" - also it doesn't accept the comma as separator.

I see two solutions:
a) I make sure the suggested amount is formated to be accepted (meaning 1918.12)
b) make that edit window accept amounts according to Ubercart format setting (only if this is already done in another place of Ubercart)

timurek’s picture

Hi,

I haven't found any place in my installation of uc, where I enter amount paid. There are fields where you enter price for a product, but there are never pre-filled.

Yet I am just wondering what is it good for. Having user enter amount received might be usable for some applications, where amount paid may be different from what was on order, but not in classic e-shop. Would it be possible to have both ways - for example a button "whole amount paid", as well as (might be not pre-filled) field Amount paid?

Thanks for your time.

xibun’s picture

Status: Active » Needs review
StatusFileSize
new642 bytes

product and option prices are (pre-)filled when you visit those pages for editing. (I mean create a product with price 1918.12, save it, re-open for edit). I justed tested them here and they seem to be pre-filled with "normal" formatting ignoring localized settings.

I think this is also the solution to this bug: just using standard number format to pre-fill this field. this gives the functionality you suggested: A) just click "Receive Bank Transfer" corresponds to your "whole amount paid" and B) editing the amount before clicking the same button gives the option to save partial payments [this can happen with corporate clients (often 50% pre-payment) but also with customers (requesting their bank to transfer the wrong amount...)]

attached a tiny patch which fixes the problem in my environment.

timurek’s picture

Status: Needs review » Reviewed & tested by the community

Works fine, thanks a lot"

xibun’s picture

StatusFileSize
new1.16 KB

actually I will use the occasion and update the module from uc_currency_format() to uc_price(). new patch attached.

xibun’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

commited.

timurek’s picture

It works fine as well :)

Status: Fixed » Closed (fixed)

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