Tip Report duplicating ticket tips

Hi i am having a problem with my tip report
I have set the system up so that is shows cash and card tip’s per waiter

this is the report that i am using:

[Server Sales Details: 3,2,3,2,2]
Date:|{DATE}
@{REPORT TICKET DETAILS:T.User.asc::,}
    Server:|$1
    TOTAL:|||R[=TN('{REPORT PAYMENT TOTAL:(TU=$1)}')-TN('{REPORT CALCULATION TOTAL:(CT=Tip) AND (TU=$1)}')]
    Tip:|||R{REPORT CALCULATION TOTAL:(CT=Tip)AND (TU=$1)}

[Tickets:1.5,1.5,1,1,1,1]
Ticket|Amount|Tip|Cash/Card|
@{REPORT PAYMENT DETAILS:T.User.asc::,}

>>Waiter:|$1    
{REPORT PAYMENT DETAILS:T.TicketNumber,[T.TotalAmount]-[CA.Tip],CA.Tip,P.Type:(TS.Status=Paid) AND (TU=$1)}
>Total Tip Cash:||{REPORT PAYMENT DETAILS:CA.Tip.Sum:(TS.Status=Paid) AND (TU=$1) AND (PA=Cash)}
>Total Tip Card:||{REPORT PAYMENT DETAILS:CA.Tip.Sum:(TS.Status=Paid) AND (TU=$1) AND (PA=Credit Card)}
>>Total Tips:||{REPORT PAYMENT DETAILS:CA.Tip.Sum:(TS.Status=Paid)}

and it gives me this

And shows me the ticket number amount as well as the tip if it was cash or card.
But if I split a bill cash and card it adds the tip to both.

If i change this

{REPORT PAYMENT DETAILS:T.TicketNumber

TO THIS

{REPORT TICKET DETAILS:T.TicketNumber

It works but dose not show me if the tip was card and what was chash

Can anyone help

So if you split the bill cash and card how does samba know if the tip calculation was paid using cash or card?
How are you expecting it to display a ticket with split payments?
You will most likely find its not just split payments of different type that causes this, if you made a split payment using two of the same payment type it would still duplicate like that as your refering to a ticket based calculation from a payment.
There are two payments on that ticket so the payment report will report both payments and since they are both on the same ticket it will show the ticket calculation for tip on both/all payments for that ticket.

My System is set up to do the following:

when i split the payment lets say that the bill is $90
I then split and put 50 on the card leaving a balance $40
then i pay $50 cash leaving a $10 as a tip $10 is there no way that the report can pick up that the final payment been cash must record the tip?