【问题标题】:Empty 'Invoice Date' error on Checks and Payments支票和付款出现空“发票日期”错误
【发布时间】:2020-02-26 19:17:46
【问题描述】:

我在尝试保存支票和付款记录时遇到错误。

该过程是当我点击“操作”下的“支付账单/应用调整”(AP301000) 时,我被重定向到“支票和付款”(AP302000) 屏幕。当我尝试保存记录时,我得到了下面的堆栈跟踪。

Error: Inserting  'Payment' record raised at least one error. Please review the errors.

Error: 'Invoice Date' cannot be empty.

   at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attribute.cs:line 3684
   at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\ModelEventHandling.cs:line 146
   at PX.Data.PXTableAttribute.PrepareParametersForInsert(PXCache sender, Object row, Type[] tables, ISqlDialect dialect, Boolean audit, List`1[] pars) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributebase.cs:line 1123
   at PX.Data.PXTableAttribute.PersistInserted(PXCache sender, Object row) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributebase.cs:line 990
   at PX.Data.PXCache`1.PersistInserted(Object row, Boolean bypassInterceptor) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 6550
   at PX.Data.PXCache`1.Persist(PXDBOperation operation) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 6090
   at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 4402
   at PX.Data.PXGraph.Persist() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 4322
   at PX.Objects.AP.APPaymentEntry.Persist() in C:\Bld\AC-FULL2019R18-JOB1\Sources\WebSites\Pure\PX.Objects\AP\APPaymentEntry.cs:line 1468
   at PX.Data.PXSave`1.d__2.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\CommonActions.cs:line 73
   at PX.Data.PXAction`1.d__32.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\PXAction.cs:line 954
   at PX.Data.PXAction`1.d__32.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\PXAction.cs:line 896
   at PX.Web.UI.PXBaseDataSource.tryExecutePendingCommand(String viewName, String[] sortcolumns, Boolean[] descendings, Object[] searches, Object[] parameters, PXFilterRow[] filters, DataSourceSelectArguments arguments, Boolean& closeWindowRequired, Int32& adapterStartRow, Int32& adapterTotalRows) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Web.UI\Controls\Data\DataSource.cs:line 2592
   at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Web.UI\Controls\Data\DataSource.cs:line 1983

巧合的是,我有一个自定义字段,即显示文本“发票日期”。所以,我做的第一件事就是在 PXDefault 属性中将 PersistingCheck 置为空。

[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]

但这仍然没有解决问题。 所以,我取消发布自定义,问题仍然存在。最后我什至从数据库中删除了自定义字段(注意:该字段可以为空),以确保我的自定义不会导致问题。但这也没有用。

在尝试查找具有特定显示文本的 DAC 字段时,我找到了一些字段,但这些字段似乎与这些屏幕的图表无关。

谢谢。

【问题讨论】:

  • 您在“付款”屏幕的“申请订单”选项卡上有任何内容吗?
  • 没有看到发票日期,但我在支票和付款屏幕中看到了付款日期(docDate 字段)。 imgur.com/kTiQGAm

标签: acumatica


【解决方案1】:

看起来很奇怪,我没有看到任何带有“发票日期”显示名称的相关字段,这可能会导致问题。由于 IIS 数据缓存,我遇到了类似的奇怪问题。

我建议执行以下操作:

  • 重启 IIS
  • 删除位于此处某处的临时 ASP.NET 文件C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
  • 删除临时自定义文件

然后确保问题不在您的自定义中

  • 例如,将您的自定义字段从“发票日期”重命名为“发票日期 1”
  • 再次发布您的自定义项
  • 再次尝试您的步骤并验证错误消息(如果仍然存在) - 您看到哪个显示名称,“发票日期”或“发票日期 1”?

【讨论】:

  • 重新启动 IIS 确实起到了作用。我之前也遇到过重启 Acumatica 的问题。但我不明白为什么我没有想到这一点。将 PersistingCheck 添加到 Nothing 已经完成了这项工作。但是自定义没有更新。并重新启动 IIS 完成了这项工作。我认为我们也可以从 Acumatica 本身执行应用更新,这与我相信重新启动 IIS 几乎相同。非常感谢你的帮助。真的很感激。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-10-09
  • 1970-01-01
  • 2017-12-17
  • 2015-11-30
  • 1970-01-01
  • 2021-11-04
  • 2016-07-18
相关资源
最近更新 更多