Tax & Fee Amount is not showing in Receipt

Hi,

I placed an order that included tax and fees. I completed both cash and card transactions using a Poynt Terminal and received a receipt that clearly showed the tax and fees (please see attached images: CardEmailRcpt and CashEmailRcpt). However, when I attempted the same transaction using a physical device, the receipt did not show the tax and fees (please see attached images: Card and Cash). Could you please review the code I used to generate the order and let me know if there are any issues?

open fun createCardOrder(subTotalAmount: Long, netAmount: Long, actualAmt : Long, stateTax: String, customFeeAmt: String, label: String, isStateTax :Boolean, isFee :Boolean): Order? {
val order = Order()
order.id = UUID.randomUUID()
val items: MutableList = ArrayList()
val item3 = OrderItem()
item3.name = “Item3”
item3.id = 1002
item3.unitPrice = subTotalAmount
item3.quantity = 1.0f
item3.status = OrderItemStatus.ORDERED
item3.unitOfMeasure = UnitOfMeasure.EACH

    if(isStateTax){
         item3.tax = getFeeTaxValue(stateTax,actualAmt.toInt()).toLong()
     }
     if(isFee){
         item3.fee = getFeeTaxValue(customFeeAmt,actualAmt.toInt()).toLong()
     }

     items.add(item3)
     order.items = items

     var subTotal = BigDecimal(0)
     for (item in items) {
         var price = BigDecimal(item.unitPrice)
         price.setScale(2, RoundingMode.HALF_UP)
         price = price.multiply(BigDecimal(item.quantity.toDouble()))
         subTotal = subTotal.add(price)
     }

    if(isFee) {
        val orderFee = Fee()
        orderFee.amount = getFeeTaxValue(customFeeAmt,subTotalAmount.toInt()).toLong()
        orderFee.id = 2222L
        orderFee.name = label

        val fees: ArrayList<Fee> = ArrayList()
        fees.add(orderFee)
        order.fees = fees
    }

     val amounts = OrderAmounts()
     amounts.currency = "USD"
     amounts.subTotal = subTotalAmount
     amounts.netTotal = netAmount

     if(isStateTax){
         amounts.taxTotal = getFeeTaxValue(stateTax,actualAmt.toInt()).toLong()
     }

     if(isFee) {
         val feeAmount = getFeeTaxValue(customFeeAmt,actualAmt.toInt()).toLong()
         amounts.feeTotal = feeAmount
     }

     order.amounts = amounts

     val orderStatuses = OrderStatuses()
     orderStatuses.status = OrderStatus.OPENED
     order.statuses = orderStatuses

    return order
}

Thanks,
Udaya Murthy

Refer to the following link for the attachment files
https://app.gemoo.com/share/image-annotation/547827221088772096?codeId=DW45W6Nl20wQ8
Image No1 : CashEmailRcpt
Image No2 : CardEmailRcpt
Image No3 : Cash
Image No4 : Card