/// <summary>
 /// Sets the controls to be displayed based on whether multi-currency is enabled.
 /// </summary>
 private void SetControlsDisplay(ISalesOrder salesOrder)
 {
     if (BusinessRuleHelper.IsMultiCurrencyEnabled())
     {
         UpdateMultiCurrencyExchangeRate(salesOrder, salesOrder.ExchangeRate.GetValueOrDefault(1));
         tblDetails.Border        = 1;
         tblDetails.Width         = "100%";
         rowDetailsHeader.Visible = true;
         rowSOSubTotal.Visible    = true;
         rowMyCurSubTotal.Visible = true;
         rowSODiscount.Visible    = true;
         rowMyCurDiscount.Visible = true;
         rowSOShipping.Visible    = true;
         rowMyCurShipping.Visible = true;
         rowSOTax.Visible         = true;
         rowMyCurTax.Visible      = true;
         rowSOTotal.Visible       = true;
         rowMyCurTotal.Visible    = true;
         rowSubTotal.Style.Add(HtmlTextWriterStyle.PaddingRight, "0px");
     }
     if (BusinessRuleHelper.IsBOEEnabled(typeof(ISalesOrder)) && !BusinessRuleHelper.IsLocalCRMPricingEnabled("SalesOrder"))
     {
         rowDiscount.Visible      = false;
         rowShipping.Visible      = false;
         rowTax.Visible           = false;
         tblMultiCurrency.Visible = string.IsNullOrEmpty(salesOrder.ErpExtId);
         var pendingChanges = salesOrder.SyncStatus ==
                              Saleslogix.Integration.BOE.Common.Constants.SyncStatus.ChangesPending ||
                              salesOrder.SyncStatus == Saleslogix.Integration.BOE.Common.Constants.SyncStatus.OutOfSync;
         lblSyncState.Visible      = !string.IsNullOrEmpty(salesOrder.ErpExtId) && !pendingChanges;
         lblSyncState.Text         = string.Format(GetLocalResourceObject("lblSyncStateNoPendingChanges").ToString(), salesOrder.ErpLastModifiedDate);
         lblPendingChanges.Visible = !string.IsNullOrEmpty(salesOrder.ErpExtId) && pendingChanges;
         lblPendingChanges.Text    = salesOrder.SyncStatus == Saleslogix.Integration.BOE.Common.Constants.SyncStatus.OutOfSync
             ? GetLocalResourceObject("lblSyncStateError").ToString()
             : string.Format(GetLocalResourceObject("lblSyncStatePendingChanges").ToString(), salesOrder.ErpLastModifiedDate);
     }
 }