Values are not printing correctly in Sales Invoice

I wanted to get values from 2 table and print the sales invoice. I am getting values, but printing in wrong way.
Please anyone help me

   <tr>
			<td rowspan="2">HSN/SAC</td>
			<td rowspan="2">Taxable Value</td>
			<td colspan="2">Central Tax</td>
			
			<td colspan="2">State Tax</td>
			<td rowspan="2">Total Amount</td>
		</tr>

<tr>
			<td>Rate</td>
			<td>Amount</td>
			<td>Rate</td>
			<td>Amount</td>
			
		</tr>
	

    <tr>{%- for row in doc.items-%}
        <td>{{ row.gst_hsn_code}}</td>
			<td>{{ row.get_formatted("amount", doc) }}
{%- endfor -%}

{%- for row in doc.taxes-%}





   	</tr>{%- endfor -%}
   	<tr>
			<td>Total</td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
	</tr>
9% {{ row.get_formatted(“tax_amount”, doc) }} 9% {{ row.get_formatted(“tax_amount”, doc) }} {{ row.get_formatted(“total”, doc) }}

When you say they’re not printing correctly…how are they printing, and what is it that you need to change?
There’s an example here of an SI that might help

I need to get values from 2 table. But the for loop is not coming correctly in each td. Thats the problem

{% for row in doc.items|list + doc.taxes|list %}

{{ row.gst_hsn_code}}
{{ row.get_formatted(“amount”, doc) }}

				<td>9%</td>
				<td>{{ row.get_formatted("tax_amount", doc) }}</td>
				<td>9%</td>
			<td>{{ row.get_formatted("tax_amount", doc) }}</td>
			<td>{{ row.get_formatted("total", doc) }}</td>

   	</tr>{%- endfor -%}![error1|690x392](upload://9V4A7zUvRRFDCM5zldO3T17Lyr2.png)