add conditions in varibales of line items to account for null results, display an empty string instead of null

This commit is contained in:
Yisroel Baum 2024-10-13 10:10:07 +03:00
parent f885c7f2cb
commit ac4621f1cb

View file

@ -45,13 +45,13 @@ async function displayMonthLineItems(dateString){
const row = `
<tr id="${li.id}-row">
<th scope="row">${li.id}</th>
<th scope="row">${li.parent_line_item_id}</th>
<th scope="row">${li.parent_line_item_id || ''}</th>
<th scope="row">${li.amount}</th>
<th scope="row">${li.currency_type}</th>
<th scope="row" id="vendor-line-${li.id}">${li.vendor}</th>
<th scope="row">${li.date}</th>
<th scope="row">${li.confirmation_code}</th>
<th scope="row">${li.note}</th>
<th scope="row">${li.note || ''}</th>
<th scope="row"><button id="${li.id}" class="btn btn-primary reassign-button">Click to reassign vendor</button></th>
<th scope="row"><a class="btn btn-primary" href="#">Click to split line</a></th>
</tr>