Sorry for the delay ...
but I couldn't find the time to check this out.
This should be the soluten:
in eConfig161.pl set $config{'allow_cent'} = 0
in sub check_item_data replace the $config{'currency'} block with this
Code: $config{'currency'} == 0
? do { # USA
$config{'allow_cent'} == 1
? ($pattern = qr/(\d*\W*\d{1,3})$/)
: ($pattern = qr/(\d*\W*\d{1,3})$/);
}
: do {
$config{'allow_cent'} == 1
? ($pattern = qr/(\d*\W*\d{1,3})$/)
: ($pattern = qr/(\d*\W*\d{1,3})$/);
};
in sub proc_bid replace the block $config{'currency'} ...
Code: $config{'currency'} == 1
? do {
$config{'allow_cent'} == 1
? do {
$form{'BID'} !~ /(\d*\D*\d{1,3}\,{1}\d{2})$/ && do {
close LOCK;
unlink "$config{'basepath'}$form{'ITEM'}_lock.dat" or die $!;
oops($txt{'You must enter a valid bid amount'})
};
}
: do {
$form{'BID'} !~ /(\d*\D*\d{1,3})$/ && do {
close LOCK;
unlink "$config{'basepath'}$form{'ITEM'}_lock.dat" or die $!;
oops($txt{'You must enter a valid bid amount'})
};
};
}
: do {
$config{'allow_cent'} == 1
? do {
$form{'BID'} !~ /(\d*\D*\d{1,3}\.{1}\d{2})$/ && do {
close LOCK;
unlink "$config{'basepath'}$form{'ITEM'}_lock.dat" or die $!;
oops($txt{'You must enter a valid bid amount'})
};
}
: do {
$form{'BID'} !~ /(\d*\D*\d{1,3})$/ && do {
close LOCK;
unlink "$config{'basepath'}$form{'ITEM'}_lock.dat" or die $!;
oops($txt{'You must enter a valid bid amount'})
};
};
};
replace sub form_amt_dec with this
Code:sub form_amt_dec {
my $amt = shift;
$amt =~ s/\D//g;
$config{'currency'} == 0
? ($amt =~ s/(\d{1,3})(?=(?:\d{3}))/$1\,/g)
: do {
$amt =~ s/(\d{1,3})(?=(?:\d{3}))/$1\./g;
$amt =~ s/(\.(\d{2}))$/\,$2/;
};
return $amt;
}