187 row.insertCell().appendChild(document.createTextNode(status.toString()))
188 row.insertCell().appendChild(document.createTextNode(description.toString()))
189 row.insertCell().appendChild(document.createTextNode(amount.toString()))
190 row.insertCell().innerHTML = '<td ><button id="'+ id.toString() +'"onclick="deleteRecord(this.id)" type="button">Delete</button></td>';191
192}
193//ela
70function addTotalRow(){
71 let table = getElementById("tbTable");
72 let row = table.insertRow();
73 row.innerHTML = '<tr class="lastrow"> <td></td> <td class="bold align_right">'+parseFloat(totDebit).toFixed(2)+'</td> <td class="bold align_right">'+parseFloat(totCredit).toFixed(2)+'</td> </tr>'74}
50 console.log(variable);
51
52
53 document.getElementById("tbody").innerHTML += '<td>' + record.ID + '</td>' +54 '<td>' + record.Date.slice(0,10) + '</td>' +55 '<td>' + record.description + '</td>' +56 '<td><span class="status '+ record.Type +'x">' + record.Type + '</span></td>' +57 '<td>' + variable + '</td>' +58 '<td>' + record.Amount + '</td>';59 });
60}
61
66 console.log(r)
67
68 document.getElementById('netprofit').innerHTML = 'Rs.'+r.data().Net_Profit;
69 document.getElementById('grossprofit').innerHTML = 'Rs.'+r.data().Gross_Profit;70 document.getElementById('totassets').innerHTML = 'Rs.'+r.data().Total_Assets;
71 document.getElementById('titliabs').innerHTML = 'Rs.'+r.data().Total_Liabilities;
72 document.getElementById('totequi').innerHTML = 'Rs.'+r.data().Total_Equity;
67
68 document.getElementById('netprofit').innerHTML = 'Rs.'+r.data().Net_Profit;
69 document.getElementById('grossprofit').innerHTML = 'Rs.'+r.data().Gross_Profit;
70 document.getElementById('totassets').innerHTML = 'Rs.'+r.data().Total_Assets;71 document.getElementById('titliabs').innerHTML = 'Rs.'+r.data().Total_Liabilities;
72 document.getElementById('totequi').innerHTML = 'Rs.'+r.data().Total_Equity;
73 }
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";