function processOwnFromLoginReport(ownFromResult, usrIndex, startIndex)
{
    dbFunction.dbUser.getUsrName(ownFromResult[startIndex].performUserId)
    .then((ownFromName) => {
        console.log("Owing " + ownFromResult[startIndex].debtAmount  + " from "+ ownFromName +".")
        if (startIndex == (ownFromResult.length - 1))
        {
            processUsrAvailableLoginReport(usrIndex);
        }
        else
        {
            processOwnFromLoginReport(ownFromResult, usrIndex, startIndex + 1);
        }
    })
    .catch(() => {
        console.error(err);
        process.exit(1);
    });
}
// To print own from login user
To print own from login user
To print own from login user
function processOwnFromLoginReport(ownFromResult, usrIndex, startIndex)
{
    dbFunction.dbUser.getUsrName(ownFromResult[startIndex].performUserId)
    .then((ownFromName) => {
        console.log("Owing " + ownFromResult[startIndex].debtAmount  + " from "+ ownFromName +".")
        if (startIndex == (ownFromResult.length - 1))
        {
            processUsrAvailableLoginReport(usrIndex);
        }
        else
        {
            processOwnFromLoginReport(ownFromResult, usrIndex, startIndex + 1);
        }
    })
    .catch(() => {
        console.error(err);
        process.exit(1);
    });
}
function processOwnFromLoginReport ( ownFromResult , usrIndex , startIndex ) { dbFunction . dbUser . getUsrName ( ownFromResult [ startIndex ] . performUserId ) . then ( ( ownFromName ) => { console . log ( "Owing " + ownFromResult [ startIndex ] . debtAmount + " from " + ownFromName + "." ) if ( startIndex == ( ownFromResult . length - 1 ) ) { processUsrAvailableLoginReport ( usrIndex ) ; } else { processOwnFromLoginReport ( ownFromResult , usrIndex , startIndex + 1 ) ; } } ) . catch ( ( ) => { console . error ( err ) ; process . exit ( 1 ) ; } ) ; }
To print own from login user
To print own from login user