YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function registerEventForFormSubmit has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        registerEventForFormSubmit: function () {
            jQuery('#leadsMapping').on('submit', function (e) {
                e.preventDefault();
                var mappingDetails = jQuery(this).serializeFormData();
                var params = {

    Function setChangeStatusTasks has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            setChangeStatusTasks: function (e, recordId, status) {
                let changeButtonType = jQuery(e);
                let container = jQuery(e).closest('tr');
                app.showConfirmModal({
                    title: app.vtranslate('LBL_STATUS_CONFIRMATION'),

      Function addNoteBookWidget has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              addNoteBookWidget: function (element, url) {
                  var thisInstance = this;
                  element = jQuery(element);
                  app.showModalWindow(null, 'index.php?module=Home&view=AddNotePad', function (wizardContainer) {
                      var form = jQuery('form', wizardContainer);

        Function registerAddShortcutDragDropEvent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                registerAddShortcutDragDropEvent: function () {
                    var elements = $('.js-menu__item .js-menu__link--draggable');
                    var self = this;
                    var classes = 'ui-draggable-menuShortcut bg-warning';
                    elements.draggable({

          Function displayConvertLeadModel has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  displayConvertLeadModel: function (data, buttonElement) {
                      var instance = this;
                      var errorElement = jQuery(data).find('#convertLeadError');
                      if (errorElement.length != '0') {
                          var errorMsg = errorElement.val();
          Severity: Minor
          Found in public_html/layouts/basic/modules/Leads/resources/Detail.js - About 1 hr to fix

            Function registerChangeDiscountModal has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    registerChangeDiscountModal: function (modal, parentRow, params) {
                        let thisInstance = this;
                        let form = modal.find('form');
                        form.validationEngine(app.validationEngineOptions);
                        modal.on('change', '.individualDiscountType', function (e) {
            Severity: Minor
            Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

              Function calculateTax has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      calculateTax: function (_row, modal) {
                          let netPriceWithoutTax = App.Fields.Double.formatToDb(modal.find('.valueNetPrice').text()),
                              valuePrices = netPriceWithoutTax,
                              globalTax = 0,
                              groupTax = 0,
              Severity: Minor
              Found in public_html/layouts/basic/modules/Vtiger/resources/Inventory.js - About 1 hr to fix

                Function select_node has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        this.select_node = function (obj, supress_event, prevent_open, e) {
                            var condition;
                            if (e.target.className.baseVal === undefined) {
                                condition = e.target.className.indexOf('noAction');
                            } else {
                Severity: Minor
                Found in public_html/layouts/resources/libraries/jstree.category.js - About 1 hr to fix

                  Function registerRecordActionsEvents has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      registerRecordActionsEvents: function (container) {
                          container.on('click', '.js-action-confirm', function (event) {
                              event.stopPropagation();
                              let target = $(this),
                                  sourceView = target.data('sourceView'),
                  Severity: Minor
                  Found in public_html/layouts/resources/app.js - About 1 hr to fix

                    Function registerModalEvents has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        registerModalEvents: function (container, sendByAjaxCb) {
                            let form = container.find('form');
                            let validationForm = false;
                            if (form.hasClass('validateForm') || form.hasClass('js-validate-form')) {
                                form.validationEngine(app.validationEngineOptions);
                    Severity: Minor
                    Found in public_html/layouts/resources/app.js - About 1 hr to fix

                      Method importModule has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function importModule()
                          {
                              $moduleName = (string) $this->_modulexml->name;
                              $tabLabel = $this->_modulexml->label;
                              $tabVersion = $this->_modulexml->version;
                      Severity: Minor
                      Found in vtlib/Vtiger/PackageImport.php - About 1 hr to fix

                        Method populateSharingPrivileges has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function populateSharingPrivileges($enttype, $userId, $module, $pertype, $varArr = false)
                            {
                                $tabId = Module::getModuleId($module);
                                $dbCommand = \App\Db::getInstance()->createCommand();
                                if (empty($varArr)) {
                        Severity: Minor
                        Found in app/UserPrivilegesFile.php - About 1 hr to fix

                          Method getSender has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getSender(): array
                              {
                                  if (isset($this->senderCache)) {
                                      return $this->senderCache;
                                  }
                          Severity: Minor
                          Found in app/Mail/Rbl.php - About 1 hr to fix

                            Method process has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function process(): int
                                {
                                    $query = (new \App\Db\Query())->select([
                                        'ID_DOKUMENTU_HANDLOWEGO', 'ID_FIRMY', 'ID_KONTRAHENTA',  'ID_DOK_ORYGINALNEGO',
                                        'NUMER', 'FORMA_PLATNOSCI', 'UWAGI', 'KONTRAHENT_NAZWA', 'WARTOSC_NETTO', 'WARTOSC_BRUTTO', 'DOK_KOREKTY',
                            Severity: Minor
                            Found in app/Integrations/Wapro/Synchronizer/CorrectingInvoice.php - About 1 hr to fix

                              Method saveInventoryField has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function saveInventoryField(App\Request $request)
                                  {
                                      $inventory = Vtiger_Inventory_Model::getInstance($request->getByType('sourceModule', 'Standard'));
                                      if ($isNew = $request->isEmpty('id')) {
                                          $fieldModel = $inventory->getFieldCleanInstance($request->getByType('type'));
                              Severity: Minor
                              Found in modules/Settings/LayoutEditor/actions/SaveAjax.php - About 1 hr to fix

                                Method getSupportedCurrencies has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function getSupportedCurrencies()
                                    {
                                        $supportedCurrencies = [];
                                        $supportedCurrencies[Settings_CurrencyUpdate_Module_Model::getCRMCurrencyName($this->getMainCurrencyCode())] = $this->getMainCurrencyCode();
                                        $dateCur = date('Y-m-d', strtotime('last monday'));
                                Severity: Minor
                                Found in modules/Settings/CurrencyUpdate/bankmodels/NBP.php - About 1 hr to fix

                                  Method process has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function process(App\Request $request)
                                      {
                                          $viewer = $this->getViewer($request);
                                          $userModel = \App\User::getCurrentUserModel();
                                          $warnings = \App\SystemWarnings::getWarnings('all');
                                  Severity: Minor
                                  Found in modules/Settings/Vtiger/views/Index.php - About 1 hr to fix

                                    Method saveWidget has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function saveWidget(App\Request $request)
                                        {
                                            $params = $request->getMultiDimensionArray('params', [
                                                'tabid' => 'Integer',
                                                'data' => [
                                    Severity: Minor
                                    Found in modules/Settings/Widgets/actions/SaveAjax.php - About 1 hr to fix

                                      Method addKey has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function addKey($type, $userID)
                                          {
                                              $query = new App\Db\Query();
                                              $query->select(['id'])
                                                  ->from('dav_users')
                                      Severity: Minor
                                      Found in modules/Settings/Dav/models/Module.php - About 1 hr to fix

                                        Method getAdvancedLinks has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getAdvancedLinks()
                                            {
                                                $moduleModel = $this->getModule();
                                                $moduleName = $moduleModel->getName();
                                                $advancedLinks = [];
                                        Severity: Minor
                                        Found in modules/Documents/models/ListView.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language