Qr Values when prepaid amount is deducted

I have 2 invoices with the same information (one is standard and the second is simplified)
image

and I include Line for prepayements in Item lines for both Invoices
Both invoices are Approved

I setup Qr & Sign manualy, and I am not using SDK ,
Please advise which is correct to be followed in future
Thanks All