How to do word representation of amount field in A

2019-04-11 13:03发布

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

enter image description here

enter image description here

标签: c# acumatica
1条回答
我想做一个坏孩纸
2楼-- · 2019-04-11 13:44

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.

enter image description here

enter image description here

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.

查看更多
登录 后发表回答