private void ShowProcessingWarnIfLock(PXAdapter adapter)
        {
            TPrimary doc = adapter.Get <TPrimary>().FirstOrDefault();

            if (doc != null && adapter.ExternalCall && LockExists(doc))
            {
                WebDialogResult result = PaymentTransaction.Ask(AR.Messages.CCProcessingARPaymentAlreadyProcessed, MessageButtons.OKCancel);
                if (result == WebDialogResult.No)
                {
                    throw new PXException(AR.Messages.CCProcessingOperationCancelled);
                }
            }
        }