Need help with repeater data behaving randomly

Hi, Thanks for the links. I study them & make the changes as what I understood. But I’m still unable to fix this issue. Actually, the point is repeater can’t hold the number value on change. It’s shows the number for a while then change it to NaN. For another change, it’s shows content accurately. Did you think that there is something error with the code?

Also, if I create a new dataset & display the values then this will fine. But I don’t know how to display the dataset values using code.

import wixData from 'wix-data';
import wixUsers from 'wix-users';
import wixSearch from 'wix-search';
import { local } from 'wix-storage';
import wixWindow from 'wix-window';

$w.onReady(() => {
    debitsum();
    wixData.query("kisaandiary")
        .find()
        .then((results) => {
 //   console.log(totalvalues)
            $w('#repeater1').forEachItem(($item) => {
 var getting = parseFloat($item("#text19").text);
 if ($item("#text20").text === "Debit") {
 var value = (-1 * getting);
                    $item("#text19").html = "<p style='font-size: 25px; font-style: avenir; text-align: right; color: red;'>" + value.toLocaleString('en-IN', {
                        maximumFractionDigits: 2,
                        style: 'currency',
                        currency: 'INR'
                    }); + "</p>";
 //$w("#text19").html = "<p style='font-size: 25px; font-style: avenir; text-align: right; color: #D12020;'>" + value + "</p>";
                } else {
 var value = getting;
 // console.log("Else Running")
                    $item("#text19").html = "<p style='font-size: 25px; font-style: avenir; text-align: right; color: green;'>" + value.toLocaleString('en-IN', {
                        maximumFractionDigits: 2,
                        style: 'currency',
                        currency: 'INR'
                    }); + "</p>";
                }

            })
        })

 // })
    $w('#dropdown1').onChange(() => dropdown1_change());
});

function dropdown1_change() {
    local.clear();
    debitsum2();
    wixData.query("kisaandiary").eq("_owner", wixUsers.currentUser.id).eq("expenseFor", $w('#dropdown1').value)
        .find()
        .then((results) => {
            $w('#repeater1').forEachItem(($item) => {
 var getting = parseFloat($item("#text19").text);
 if ($item("#text20").text === "Debit") {
 var value = (-1 * getting);
                    $item("#text19").html = "<p style='font-size: 25px; font-style: avenir; text-align: right; color: red;'>" + value.toLocaleString('en-IN', {
                        maximumFractionDigits: 2,
                        style: 'currency',
                        currency: 'INR'
                    }); + "</p>";
 //$w("#text19").html = "<p style='font-size: 25px; font-style: avenir; text-align: right; color: #D12020;'>" + value + "</p>";
                } else {
 var value = getting;
 // console.log("Else Running")
                    $item("#text19").html = "<p style='font-size: 25px; font-style: avenir; text-align: right; color: green;'>" + value.toLocaleString('en-IN', {
                        maximumFractionDigits: 2,
                        style: 'currency',
                        currency: 'INR'
                    }); + "</p>";
                }

            })
        })
}