I don't know create a multi line string please the best solution. The code below does not all use multi line strings. You can see the code I commented out was because I didn't know how to create a multi line string.
Public Shared Function GetReceipt(ByVal transaction_Conflict As Transaction) As String
Return GenerateReceiptTemplate().Replace("<Orders/>", GetOrderRows(transaction_Conflict)).Replace("<Total/>", transaction_Conflict.Total.ToString() & "PHP").Replace("<Cash/>", transaction_Conflict.Cash.ToString() & "PHP").Replace("<Change/>", transaction_Conflict.Change.ToString() & "PHP").Replace("<Id/>", transaction_Conflict.Id).Replace("<Cashier/>", transaction_Conflict.GetCashier().Fullname).Replace("<Date/>", transaction_Conflict.Date.ToString())
End Function
Private Shared Function GetOrderRows(ByVal transaction_Conflict As Transaction) As String
Dim result As String = ""
transaction_Conflict.GetOrders().ForEach(Sub(item As Order)
result &= "<tr>"
result &= "<td>" & item.GetProduct().Name & "</td>"
result &= "<td align='center'>x " & item.Quantity & "</td>"
result &= "<td align='right'>" & item.Subtotal & "PHP</td>"
result &= "</tr>"
End Sub)
Return result
End Function
'code output in VB.NET
Private Shared Function GenerateReceiptTemplate() As String
Return "<center>" & vbCrLf &
"<font size='24px'><b>WcDonalds</b></font><br/>" & vbCrLf &
"<span>wcdonalds@gmail.com</span>" & vbCrLf &
"</center>" & vbCrLf &
"<br/><br/>" & vbCrLf &
"<table width='100%'>" & vbCrLf &
"<thead>" & vbCrLf &
"<tr>" & vbCrLf &
"<th align='left'>Product Name</th>" & vbCrLf &
"<th align='center'>Quantity</th>" & vbCrLf &
"<th align='right'>Subtotal</th>" & vbCrLf &
"</tr>" & vbCrLf &
"</thead>" & vbCrLf &
"<tbody>" & vbCrLf &
"<Orders/>" & vbCrLf &
"</tbody>" & vbCrLf &
"</table>" & vbCrLf &
"<br/>" & vbCrLf &
"<center>---------------------------------------</center>" & vbCrLf &
"<br/>" & vbCrLf &
'Total: <b><Total/></b><br/>
'Cash: <b><Cash/></b><br/>
'Change: <b><Change/></b><br/>
' <br/>
'Transaction ID: #<Id/><br/>
'Cashier: <Cashier/><br/>
'Date: <Date/><br/>
' <br/>
' <center>---------------------------------------</center>
' <br/>
' <center><b>Thanks For visiting WcDonalds</b></center>
End Function
` tag to break HTML lines, `` to start a new paragraph....etc. See [HTML Element Reference](https://www.w3schools.com/TAgs/default.asp). – dr.null Jun 24 '22 at 17:49