How to do word representation of amount field in Acumatica Invoice Report (AR.64.10.00)?

China☆狼群 提交于 2019-12-09 19:19:44

问题


How to do word representation of amount field in Acumatica Invoice Report (AR.64.10.00)?


回答1:


Create an un-bound field in DAC Extension for ARInvoice DAC. And use PX.Objects.AP.ToWords attribute.

public class ARInvoicePXExt : PXCacheExtension<ARInvoice>
{
    #region UsrAmountToWords

    public abstract class usrAmountToWords : IBqlField { }


   [PX.Objects.AP.ToWords(typeof(ARInvoice.curyOrigDocAmt))]
    public virtual string UsrAmountToWords { get; set; }

    #endregion
}

Use UsrAmountToWords field in AR.64.10.00 report.

The word representation happens through attribute PX.Objects.AP.ToWords. And this out-of-box word representation is English only. For non-English word representation, create your own attribute. Implementation of PX.Objects.AP.ToWords can be found in …\App_Data\CodeRepository\PX.Objects\AP\Descriptor\Attribute.cs.



来源:https://stackoverflow.com/questions/38320680/how-to-do-word-representation-of-amount-field-in-acumatica-invoice-report-ar-64

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!