How to reflect custom Grand Total value in the General Ledger?

I have used a customized calculation for Grand Total in Purchase Order which I have been able to show in Purchase Receipt and also the value is saved in the database. But sadly, this changed Grand Total is not reflected in the General Ledger. Is there any way to reflect this custom value in General Ledger?