将货币余额字段添加到客户门户?

Adding the currency balance fields to the customer portal?

我尝试将当前余额(货币)字段添加到 header 区域中客户门户的 "My Documents (SP.40.20.00)" 页面,但无论我做什么,这些字段都不会显示,并且似乎不可能修改(覆盖)聚合函数(包装器错误)。有没有其他方法可以让我获得货币(客户)总数而不是默认货币总数?

Link to the project

您正在处理的基础图表​​ (ARDocumentEnq) 根据许可证中选择的功能集和所选行 CuryID/company 基础货币在 RowSelected 事件中进行了可见性验证。

在配置->常用设置->许可->Enable/Disable 功能中检查主站点是否启用了这些功能,并计算出 row.CuryID 和 [=18= 所需的条件].要覆盖基本图表条件,您可以在图表扩展中添加 RowSelected 事件。

public class ARDocumentEnq_Extension:PXGraphExtension<ARDocumentEnq>
  {
    public virtual void ARDocumentFilter_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
    {
      ARDocumentEnq.ARDocumentFilter row = (ARDocumentEnq.ARDocumentFilter)e.Row;
      if (row == null) return;

      PXCache docCache = Base.Documents.Cache;

      // Forcing display
      bool byPeriod = true; //(row.Period != null);
      bool isMCFeatureInstalled = true; //PXAccess.FeatureInstalled<FeaturesSet.multicurrency>();
      bool isForeignCurrencySelected = true; //String.IsNullOrEmpty(row.CuryID) == false && (row.CuryID != this.Company.Current.BaseCuryID);
      bool isBaseCurrencySelected = true; //String.IsNullOrEmpty(row.CuryID) == false && (row.CuryID == this.Company.Current.BaseCuryID);

      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentFilter.curyID>(cache, row, isMCFeatureInstalled);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentFilter.curyBalanceSummary>(cache, row, isMCFeatureInstalled && isForeignCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentFilter.curyDifference>(cache, row, isMCFeatureInstalled && isForeignCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentFilter.curyCustomerBalance>(cache, row, isMCFeatureInstalled && isForeignCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentFilter.curyCustomerDepositsBalance>(cache, row, isMCFeatureInstalled && isForeignCurrencySelected);

      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.curyID>(docCache, null, isMCFeatureInstalled);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.rGOLAmt>(docCache, null, isMCFeatureInstalled && !isBaseCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.curyBegBalance>(docCache, null, byPeriod && isMCFeatureInstalled && !isBaseCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.begBalance>(docCache, null, byPeriod);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.curyOrigDocAmt>(docCache, null, isMCFeatureInstalled && !isBaseCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.curyDocBal>(docCache, null, isMCFeatureInstalled && !isBaseCurrencySelected);
      PXUIFieldAttribute.SetVisible<ARDocumentEnq.ARDocumentResult.curyDiscActTaken>(docCache, null, isMCFeatureInstalled && !isBaseCurrencySelected);
    }
  }