Showing 4,652 of 306,333 total issues
Function registerEventForFormSubmit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
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
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
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
Open
displayConvertLeadModel: function (data, buttonElement) {
var instance = this;
var errorElement = jQuery(data).find('#convertLeadError');
if (errorElement.length != '0') {
var errorMsg = errorElement.val();
Function registerChangeDiscountModal
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerChangeDiscountModal: function (modal, parentRow, params) {
let thisInstance = this;
let form = modal.find('form');
form.validationEngine(app.validationEngineOptions);
modal.on('change', '.individualDiscountType', function (e) {
Function calculateTax
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateTax: function (_row, modal) {
let netPriceWithoutTax = App.Fields.Double.formatToDb(modal.find('.valueNetPrice').text()),
valuePrices = netPriceWithoutTax,
globalTax = 0,
groupTax = 0,
Function select_node
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 {
Function registerRecordActionsEvents
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerRecordActionsEvents: function (container) {
container.on('click', '.js-action-confirm', function (event) {
event.stopPropagation();
let target = $(this),
sourceView = target.data('sourceView'),
Function registerModalEvents
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Method importModule
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function importModule()
{
$moduleName = (string) $this->_modulexml->name;
$tabLabel = $this->_modulexml->label;
$tabVersion = $this->_modulexml->version;
Method populateSharingPrivileges
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function populateSharingPrivileges($enttype, $userId, $module, $pertype, $varArr = false)
{
$tabId = Module::getModuleId($module);
$dbCommand = \App\Db::getInstance()->createCommand();
if (empty($varArr)) {
Method getSender
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSender(): array
{
if (isset($this->senderCache)) {
return $this->senderCache;
}
Method process
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
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',
Method saveInventoryField
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
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'));
Method getSupportedCurrencies
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSupportedCurrencies()
{
$supportedCurrencies = [];
$supportedCurrencies[Settings_CurrencyUpdate_Module_Model::getCRMCurrencyName($this->getMainCurrencyCode())] = $this->getMainCurrencyCode();
$dateCur = date('Y-m-d', strtotime('last monday'));
Method process
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process(App\Request $request)
{
$viewer = $this->getViewer($request);
$userModel = \App\User::getCurrentUserModel();
$warnings = \App\SystemWarnings::getWarnings('all');
Method saveWidget
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveWidget(App\Request $request)
{
$params = $request->getMultiDimensionArray('params', [
'tabid' => 'Integer',
'data' => [
Method addKey
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addKey($type, $userID)
{
$query = new App\Db\Query();
$query->select(['id'])
->from('dav_users')
Method getAdvancedLinks
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAdvancedLinks()
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
$advancedLinks = [];