Seeking help to get Miscellaneous charges for Purchase order in Ax 2012

If you are Seeking help to get Miscellaneous charges for the Purchase order in Ax 2012 then this code can help you.

Sometimes we need to display Miscellaneous charges total in the report then you can get help as per below code.

  while select sum(Value),MarkupCode from markuptrans_txt group by MarkupCode join purchline where purchline.RecId ==markuptrans_txt.TransRecId  
                                     && markuptrans_txt.TransTableId == purchline.tableid  
                                     && purchline.PurchId == vendPurchOrderJour.PurchId  
                                     && markuptrans_txt.Value != 0.00  
   {  
     purchPurchaseOrderHeader.MiscChargeDesc = purchPurchaseOrderHeader.MiscChargeDesc+strFmt("Add %1 : \n",MarkupTable::find(MarkupModuleType::Vend,markuptrans_txt.MarkupCode).Txt )  
    ;  

No comments: