Tax & Fee Amount is not showing in Receipt


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() = UUID.randomUUID()
val items: MutableList = ArrayList()
val item3 = OrderItem() = “Item3” = 1002
item3.unitPrice = subTotalAmount
item3.quantity = 1.0f
item3.status = OrderItemStatus.ORDERED
item3.unitOfMeasure = UnitOfMeasure.EACH

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

     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() = 2222L = label

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

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

         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

Udaya Murthy

Refer to the following link for the attachment files
Image No1 : CashEmailRcpt
Image No2 : CardEmailRcpt
Image No3 : Cash
Image No4 : Card