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.