CORE-POS/IS4C

View on GitHub
fannie/modules/plugins2.0/OverShortTools/js/countV2.js

Summary

Maintainability
F
1 wk
Test Coverage

Function updateBuyAmount has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function updateBuyAmount(d){
    if (d === 'Checks' || d === '100.00' || d === '50.00' || d === 'Junk')
        return;

    $('.denom').each(function(){
Severity: Major
Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js - About 2 hrs to fix

    File countV2.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    function loader(){
        $('#display').html('');
        var date1 = $('#startDate').val();
        var date2 = $('#endDate').val();
        var store = $('select[name=store]').val();
    Severity: Minor
    Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js - About 2 hrs to fix

      Function updateBuyAmount has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      function updateBuyAmount(d){
          if (d === 'Checks' || d === '100.00' || d === '50.00' || d === 'Junk')
              return;
      
          $('.denom').each(function(){
      Severity: Minor
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

      function updateOpenSafeCount(d){
          var newval = Number(document.getElementById('safeCount1'+d).value);
          
          var v = newval;
          var elem = document.getElementById('changeOrder'+d);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 1 other location - About 1 day to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 123..147

      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 323.

      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 recalcDropVariance(e) {
          var elem = e.target;
          var cash = $(elem).closest('tr').find('.pos').html();
          var myself = elem.value;
          var diff = Math.round((myself - cash) * 100) / 100;
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 1 other location - About 1 day to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 285..304

      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 274.

      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

      function updateAAVariance(){
          var accountable = Number($('#cashInTillsTotal').html());
          var actual = Number($('#safeCount2Total').html());
      
          var variance = actual - accountable;
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 1 other location - About 6 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 149..158

      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

      function loader(){
          $('#display').html('');
          var date1 = $('#startDate').val();
          var date2 = $('#endDate').val();
          var store = $('select[name=store]').val();
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 1 other location - About 5 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 1..14

      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 152.

      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 5 locations. Consider refactoring.
      Open

      function resumInputs(rowname){
          var sum = 0;
      
          $('.denom').each(function(){
              denom = $(this).val();
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 4 other locations - About 4 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 196..208
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 171..181
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 160..172
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 174..184

      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 134.

      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 5 locations. Consider refactoring.
      Open

      function resumRow(rowname){
          var sum = 0;
          $('.denom').each(function(){
              denom = $(this).val();
              var elem = document.getElementById(rowname+denom);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 4 other locations - About 4 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 196..208
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 157..169
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 160..172
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 174..184

      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 134.

      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

      function updateChangeOrder(d){
          var newval = Number(document.getElementById('changeOrder'+d).value);
          
          var v = Number(document.getElementById('safeCount1'+d).value) + newval;
          document.getElementById('cashInTills'+d).innerHTML = Math.round(v*100)/100;
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 1 other location - About 4 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 110..121

      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 133.

      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

      function existingDates(dateStr)
      {
          if (dateStr != '') {
              var dates = dateStr.split(' ');
              if (dates.length === 2) {
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 1 other location - About 4 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 271..283

      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 130.

      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 3 locations. Consider refactoring.
      Open

      function saveChangeOrder(){
          var ret = '';
          $('.denom').each(function(){
              var denom = $(this).val();
              var elem = document.getElementById('changeOrder'+denom);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 2 other locations - About 3 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 73..83
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 87..97

      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 113.

      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 3 locations. Consider refactoring.
      Open

      function saveOpenSafeCount(){
          var ret = '';
          $('.denom').each(function(){
              var denom = $(this).val();
              var elem = document.getElementById('safeCount1'+denom);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 2 other locations - About 3 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 85..94
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 99..108

      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 110.

      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 3 locations. Consider refactoring.
      Open

      function saveRow(rowName){
          var ret = '';
          $('.denom').each(function(){
              var denom = $(this).val();
              var elem = document.getElementById(rowName+denom);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 2 other locations - About 3 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 41..51
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 43..53

      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 106.

      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 4 locations. Consider refactoring.
      Open

      function saveNotes() {
          var ret = '';
          $('.day-notes').each(function () {
              var noteID = this.id;
              var note = encodeURIComponent(this.value);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 3 other locations - About 2 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 52..61
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 55..64
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 66..75

      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 83.

      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 4 locations. Consider refactoring.
      Open

      function saveTillCounts() {
          var ret = '';
          $('.drop').each(function() {
              var rowID = this.id;
              var amt = Number(this.value);
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 3 other locations - About 2 hrs to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 63..72
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 55..64
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 66..75

      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 83.

      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

          while ((Math.round(dimes * 100)) % 500 != 0 && (Math.round(dimes * 100)) % 10 == 0) {
              dimes += 0.10;
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 5 other locations - About 1 hr to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 233..235
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 247..249
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 237..239
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 244..246
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 251..253

      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 58.

      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

          while ((Math.round(nickels * 100)) % 200 != 0 && (Math.round(nickels * 100)) % 5 == 0) {
              nickels += 0.05;
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 5 other locations - About 1 hr to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 233..235
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 240..242
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 237..239
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 244..246
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 251..253

      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 58.

      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

          while ((Math.round(quarters * 100)) % 1000 != 0 && (Math.round(quarters * 100)) % 25 == 0) {
              quarters += 0.25;
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 5 other locations - About 1 hr to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 240..242
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 247..249
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 237..239
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 244..246
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 251..253

      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 58.

      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 4 locations. Consider refactoring.
      Open

          if ($('#atmCount').length !== 0) {
              ret += 'count:'+$('#atmCount').val();
          } else {
              ret += 'count:0';
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 3 other locations - About 50 mins to fix
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 55..59
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 60..64
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 65..69

      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 52.

      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

          while (v % 50 != 0 && i < 10){
              v = v - 5;
              i = i+1;
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 5 other locations - About 30 mins to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 210..213
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 226..229
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 214..217
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 222..225
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 230..233

      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 45.

      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 4 locations. Consider refactoring.
      Open

          $.ajax({
              url: 'OverShortSafecountV2.php',
              type: 'post',
              data: args,
              success: function(data){
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 3 other locations - About 30 mins to fix
      fannie/modules/plugins2.0/OverShortTools/js/cashier.js on lines 73..80
      fannie/modules/plugins2.0/OverShortTools/js/count.js on lines 31..38
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 33..40

      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 45.

      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

          while (v % 50 != 0 && i < 50){
              v = v - 1;
              i = i+1;
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 5 other locations - About 30 mins to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 210..213
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 218..221
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 214..217
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 222..225
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 230..233

      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 45.

      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

          while (v % 50 != 0 && i < 5){
              v = v - 10;
              i = i+1;
          }
      Severity: Major
      Found in fannie/modules/plugins2.0/OverShortTools/js/countV2.js and 5 other locations - About 30 mins to fix
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 218..221
      fannie/modules/plugins2.0/OverShortTools/js/countV2.js on lines 226..229
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 214..217
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 222..225
      fannie/modules/plugins2.0/OverShortTools/js/countV3.js on lines 230..233

      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 45.

      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

      There are no issues that match your filters.

      Category
      Status