CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Method Read has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public override void Read()
    { 
        initDevice();
        TcpListener http = new TcpListener(IPAddress.Loopback, LISTEN_PORT);
        http.Start();
Severity: Major
Found in pos/is4c-nf/scale-drivers/drivers/NewMagellan/SPH_Datacap_PDCX.cs - About 2 hrs to fix

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator int?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator decimal?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator byte?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator double?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator float?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator char?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator long?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 801..816
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

            public static explicit operator short?(JToken value)
            {
                if (value == null)
                    return null;
    
    
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 596..611
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 618..633
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 640..655
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 779..794
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 846..861
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 910..925
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 932..947

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 157.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                        case ParserTimeZone.LocalEastOfUtc:
                        {
                            TimeSpan offset = new TimeSpan(dateTimeParser.ZoneHour, dateTimeParser.ZoneMinute, 0);
                            ticks = d.Ticks - offset.Ticks;
                            if (ticks >= DateTime.MinValue.Ticks)
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Utilities/DateTimeUtils.cs on lines 244..261

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 156.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                        case ParserTimeZone.LocalWestOfUtc:
                        {
                            TimeSpan offset = new TimeSpan(dateTimeParser.ZoneHour, dateTimeParser.ZoneMinute, 0);
                            ticks = d.Ticks + offset.Ticks;
                            if (ticks <= DateTime.MaxValue.Ticks)
    pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Utilities/DateTimeUtils.cs on lines 262..279

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 156.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        mod.autosubmit = function(ev, ui) {
            $('#upc').val(ui.item.value);
            mod.search();
            console.log("Current: " + $('#upc').val());
        };
    Severity: Major
    Found in fannie/modules/plugins2.0/DeliInventory/scanner.js and 1 other location - About 2 hrs to fix
    fannie/modules/plugins2.0/ShelfAudit/js/full.js on lines 77..81

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 77.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        mod.autosubmit = function(ev, ui) {
            $('#upc').val(ui.item.value);
            mod.search();
            console.log("Current: " + $('#upc').val());
        };
    Severity: Major
    Found in fannie/modules/plugins2.0/ShelfAudit/js/full.js and 1 other location - About 2 hrs to fix
    fannie/modules/plugins2.0/DeliInventory/scanner.js on lines 120..124

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 77.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        var args = 'action=save&date1='+date1+'&date2='+date2+'&changeOrder='+changeOrder+'&openSafeCount='+openSafeCount+'&buyAmount='+buyAmount+'&atmAmount='+atmAmount+'&tillCount='+tillCount+'&notes='+notes+'&store='+store+'&type='+type+'&atmAmount2='+atmAmount2;
    Severity: Major
    Found in fannie/modules/plugins2.0/OverShortTools/js/countV3.js and 1 other location - About 2 hrs to fix
    fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 29..29

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 77.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function useSRPs() {
        $('tr.batchItem').each(function(){
            var srp = $(this).find('.itemSRP').val();
            $(this).find('.itemPrice').val(srp);
        });
    Severity: Major
    Found in fannie/batches/from-search.js and 1 other location - About 2 hrs to fix
    fannie/modules/plugins2.0/StaffArPayrollDeduction/js/accounts.js on lines 78..84

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 77.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function useCurrent()
    {
        $('.accountrow').each(function() {
            var cur = $(this).find('.currentbalance').html();
            $(this).find('.nextdeduct').val(cur);
    fannie/batches/from-search.js on lines 14..19

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 77.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        var args = 'action=save&date1='+date1+'&date2='+date2+'&changeOrder='+changeOrder+'&openSafeCount='+openSafeCount+'&closeSafeCount='+closeSafeCount+'&buyAmount='+buyAmount+'&dropAmount='+dropAmount+"&depositAmount="+depositAmount+'&atmAmount='+atmAmount+'&store='+store;
    Severity: Major
    Found in fannie/modules/plugins2.0/OverShortTools/js/count.js and 1 other location - About 2 hrs to fix
    fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 31..31

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 77.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File TsEmployeesEditor.php has 254 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    include(dirname(__FILE__).'/../../../../config.php');
    if (!class_exists('FannieAPI')) {
        include_once(__DIR__ . '/../../../../classlib2.0/FannieAPI.php');
    }
    Severity: Minor
    Found in fannie/modules/plugins2.0/TimesheetPlugin/admin/TsEmployeesEditor.php - About 2 hrs to fix

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          public function post_id_discount_handler()
          {
              $dbc = $this->connection;
              $dbc->selectDB($this->config->get('OP_DB'));
              $json = array('msg'=>'');
      Severity: Major
      Found in fannie/mem/MemberTypeEditor.php and 5 other locations - About 2 hrs to fix
      fannie/mem/MemberTypeEditor.php on lines 91..107
      fannie/mem/MemberTypeEditor.php on lines 109..125
      fannie/mem/MemberTypeEditor.php on lines 127..143
      fannie/mem/MemberTypeEditor.php on lines 145..161
      fannie/mem/MemberTypeEditor.php on lines 181..197

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 6 locations. Consider refactoring.
      Open

          public function post_id_description_handler()
          {
              $dbc = $this->connection;
              $dbc->selectDB($this->config->get('OP_DB'));
              $json = array('msg'=>'');
      Severity: Major
      Found in fannie/mem/MemberTypeEditor.php and 5 other locations - About 2 hrs to fix
      fannie/mem/MemberTypeEditor.php on lines 91..107
      fannie/mem/MemberTypeEditor.php on lines 127..143
      fannie/mem/MemberTypeEditor.php on lines 145..161
      fannie/mem/MemberTypeEditor.php on lines 163..179
      fannie/mem/MemberTypeEditor.php on lines 181..197

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 123.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language