$("input[data-type='currency']").on({
keyup: function () {
formatCurrency($(this));
},
blur: function () {
formatCurrency($(this), "blur");
},
});
function formatNumber(n) {
// format number 1000000 to 1,234,567
return n.replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function formatCurrency(input, blur) {
// appends $ to value, validates decimal side
// and puts cursor back in right position.
// get input value
var input_val = input.val();
// don't validate empty input
if (input_val === "") {
return;
}
// original length
var original_len = input_val.length;
// initial caret position
var caret_pos = input.prop("selectionStart");
// check for decimal
if (input_val.indexOf(".") >= 0) {
// get position of first decimal
// this prevents multiple decimals from
// being entered
var decimal_pos = input_val.indexOf(".");
// split number by decimal point
var left_side = input_val.substring(0, decimal_pos);
var right_side = input_val.substring(decimal_pos);
// add commas to left side of number
left_side = formatNumber(left_side);
// validate right side
right_side = formatNumber(right_side);
// On blur make sure 2 numbers after decimal
if (blur === "blur") {
right_side += "00";
}
// Limit decimal to only 2 digits
right_side = right_side.substring(0, 2);
// join number by .
input_val = left_side + "." + right_side;
} else {
// no decimal entered
// add commas to number
// remove all non-digits
input_val = formatNumber(input_val);
input_val = input_val;
// final formatting
if (blur === "blur") {
input_val += ".00";
}
}
// send updated string to input
input.val(input_val);
// put caret back in the right position
var updated_len = input_val.length;
caret_pos = updated_len - original_len + caret_pos;
input[0].setSelectionRange(caret_pos, caret_pos);
}
Yes some time its happen if the application runs on front then no problemAfter completing a race the driver's application stay in a loop and does not return to the Dashboard, does this happen to anyone else? how to solve?
Has anyone encountered an error where the driver application cannot login?
Thanks for the support, the information I have made and changed is correct, but when logging in, the driver's account will load and report an erro.Check your FCM + packgname + sha 1
Need to same on firebase and app project.
Thanks for the support, the information I have made and changed is correct, but when logging in, the driver's account will load and report an erro.
HI!Check your FCM + packgname + sha 1
Need to same on firebase and app project.
and also update google-services.json after you created your release version of the app
Setting your minimal driver ballance or remove minimal ballance driver on admin panel.Hi!
I got the same error as you, have you solved this problem only, can you share it?
Hi i have this code from this source, i think this code for edit format currency.
i need remove digit .00 from format currency in this source but i don't have skills for edit that.
and i done try to litle edit but nothing change anything
Can you help me to edit this code or can you tell me about that ?
this sources code in directory "ornidsadmin\asset\app-assets\js\scripts\ourdevelops\duit.js"
Big Thanks
Code:$("input[data-type='currency']").on({ keyup: function () { formatCurrency($(this)); }, blur: function () { formatCurrency($(this), "blur"); }, }); function formatNumber(n) { // format number 1000000 to 1,234,567 return n.replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","); } function formatCurrency(input, blur) { // appends $ to value, validates decimal side // and puts cursor back in right position. // get input value var input_val = input.val(); // don't validate empty input if (input_val === "") { return; } // original length var original_len = input_val.length; // initial caret position var caret_pos = input.prop("selectionStart"); // check for decimal if (input_val.indexOf(".") >= 0) { // get position of first decimal // this prevents multiple decimals from // being entered var decimal_pos = input_val.indexOf("."); // split number by decimal point var left_side = input_val.substring(0, decimal_pos); var right_side = input_val.substring(decimal_pos); // add commas to left side of number left_side = formatNumber(left_side); // validate right side right_side = formatNumber(right_side); // On blur make sure 2 numbers after decimal if (blur === "blur") { right_side += "00"; } // Limit decimal to only 2 digits right_side = right_side.substring(0, 2); // join number by . input_val = left_side + "." + right_side; } else { // no decimal entered // add commas to number // remove all non-digits input_val = formatNumber(input_val); input_val = input_val; // final formatting if (blur === "blur") { input_val += ".00"; } } // send updated string to input input.val(input_val); // put caret back in the right position var updated_len = input_val.length; caret_pos = updated_len - original_len + caret_pos; input[0].setSelectionRange(caret_pos, caret_pos); }
I have funded the wallet for both the driver and the user but still can'tSetting your minimal driver ballance or remove minimal ballance driver on admin panel.
you need to add sha of play store to firebase and redownload the .json file to the project then rebuild and publishHi all members, anyone tries to upload driver appon play store..?? If yes then plz guide me how to get aproval driver app get rejected on playstore thx
No dear that is not the problem due to new google policy there is some terms for background location tracking they ask for pop-up disclaimer before permission granted and also dev have to proof that app requires background locqtion feture in the app too much complicated i just make an apk and distributed offline..you need to add sha of play store to firebase and redownload the .json file to the project then rebuild and publish
No dear that is not the problem due to new google policy there is some terms for background location tracking they ask for pop-up disclaimer before permission granted and also dev have to proof that app requires background locqtion feture in the app too much complicated i just make an apk and distributed offline..