Item Tax Template in the line didn’t effect the invoice when the sales invoice created from API.
My code
new_ivoice = {
"doctype": "Sales Invoice",
"naming_series": "ACC-SINV-.YYYY.-",
"posting_date": "2022-09-21",
"customer": "Public Customer",
"customer_name": "Public Customer",
"grand_total": 300.000,
"docstatus":1,
"items": [{
"item_code": "Test Product",
"item_name": "Test Product",
"description": "Test Product",
#"uom": "ml",
"conversion_factor":1,
"rate": 150.000,
"base_rate": 150.000,
"amount": 300.000,
"base_amount": 300.000,
#"income_account": "1110 - Cash - Z",
#"stock_qty":2,
"qty": 2 ,
"item_tax_template" : "Egypt Tax - Z",
}],
"payments":[{
"mode_of_payment":"Cash",
"amount":300.000,
"base_amount":300.000,
"account":"1110 - Cash - Z",
}],
}