How to Calculate GST tax value Apply adjustment in Taxdocument through code for PO or SO While posting Invoice

HI All,

How to Calculate GST tax value Apply adjustment in Taxdocument through code for PO or SO While posting Invoice in D365. GST tax value Adjustment only editable in Invoice form in PO or SO Taxdocument.

Thanks,

Krishna.