The following documents are missing from the contract.
You have down payment invoice with unsetteled balance: @cMoney($dp->downpayment_amount_remaining, $invoice->currency, true)
The contract of this invoice have retention: {{$invoice->contract->getPrintableRetentionAmount()}}
{{-- --}}To update this invoice or tax authority you have to delete the payment from main invoice. Deleting main invoice payment will also delete the authority invoice payment