CORE-POS/IS4C

View on GitHub

Showing 1,963 of 8,684 total issues

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

        $data[] = array(
            'Total Personnel Cost (est)',
            '',
            number_format($total_wages->projected * $p_est, 0),
            '',
fannie/modules/plugins2.0/OpenBookFinancing/ObfWeeklyReport.php on lines 710..724

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

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

        if ($this->connection->tableExists("$source")) {
            $dQuery = "SELECT paymentDepartment
                FROM $source
                WHERE paymentDepartment != 0";
            $dResults = $this->connection->query($dQuery);
fannie/modules/plugins2.0/CoopCred/models/vmodels/CCredHistoryTodaySumModel.php on lines 57..76

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

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

        if ($this->connection->tableExists("$source")) {
            $dQuery = "SELECT paymentDepartment
                FROM $source
                WHERE paymentDepartment != 0";
            $dResults = $this->connection->query($dQuery);
fannie/modules/plugins2.0/CoopCred/models/vmodels/CCredHistoryTodayModel.php on lines 58..77

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

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

        if (isset($dots[$upc]) && $dots[$upc] == 'PRODUCE') {
            $pdf->SetFillColor(0, 255, 100); // green 
            $pdf->Circle($full_x+48.5, $full_y+9.5, 1.25, 'F');
            $pdf->SetFillColor(255,255,255);
            $pdf->SetTextColor(255,255,255);
Severity: Major
Found in fannie/admin/labels/pdf_layouts/WFC_Hybrid.php and 1 other location - About 3 hrs to fix
fannie/admin/labels/pdf_layouts/WFC_Hybrid_Single.php on lines 273..281

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

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

    public function readinessCheck()
    {
        $dbc = $this->connection;
        $dbc->selectDB($this->config->get('OP_DB'));
        if ($this->tableExistsReadinessCheck($this->config->get('OP_DB'), 'PurchaseOrderItems') === false) {
Severity: Major
Found in fannie/reports/ItemOrderHistory/ItemOrderHistoryReport.php and 1 other location - About 3 hrs to fix
fannie/reports/ItemLastQuarter/ItemLastQuarterReport.php on lines 127..144

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

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

    public function readinessCheck()
    {
        $dbc = $this->connection;
        $dbc->selectDB($this->config->get('ARCHIVE_DB'));
        if ($this->tableExistsReadinessCheck($this->config->get('ARCHIVE_DB'), 'productWeeklyLastQuarter') === false) {
Severity: Major
Found in fannie/reports/ItemLastQuarter/ItemLastQuarterReport.php and 1 other location - About 3 hrs to fix
fannie/reports/ItemOrderHistory/ItemOrderHistoryReport.php on lines 157..174

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

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

    protected function get_id_handler()
    {
        global $FANNIE_TRANS_DB;
        $this->card_no = $this->id;

Severity: Major
Found in fannie/modules/plugins2.0/PIKiller/PIArPage.php and 1 other location - About 3 hrs to fix
fannie/modules/plugins2.0/PIKiller/PIB2BListPage.php on lines 34..51

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

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

        if (isset($dots[$upc]) && $dots[$upc] == 'PRODUCE') {
            $pdf->SetFillColor(0, 255, 100); // green 
            $pdf->Circle($full_x+48.0, $full_y+9.5, 1.25, 'F');
            $pdf->SetFillColor(255,255,255);
            $pdf->SetTextColor(255,255,255);
Severity: Major
Found in fannie/admin/labels/pdf_layouts/WFC_Hybrid_Single.php and 1 other location - About 3 hrs to fix
fannie/admin/labels/pdf_layouts/WFC_Hybrid.php on lines 286..294

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

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

    protected function get_id_handler()
    {
        global $FANNIE_TRANS_DB;
        $this->card_no = $this->id;

Severity: Major
Found in fannie/modules/plugins2.0/PIKiller/PIB2BListPage.php and 1 other location - About 3 hrs to fix
fannie/modules/plugins2.0/PIKiller/PIArPage.php on lines 34..51

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['floralAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpFloral.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['directAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDirect.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDual.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpOrder.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDual.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['orderAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpOrder.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 157..165
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161

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

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

            for (i=0; i<oIDs.length; i++) {
                var elemID = oIDs[i];
                if (state['directAmt'][elemID] !== '') {
                    var field = document.getElementById(elemID);
                    if (field) {
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDirect.js and 6 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 198..206
fannie/modules/plugins2.0/RP/rpDual.js on lines 158..166
fannie/modules/plugins2.0/RP/rpDual.js on lines 184..192
fannie/modules/plugins2.0/RP/rpFloral.js on lines 84..92
fannie/modules/plugins2.0/RP/rpOrder.js on lines 153..161
fannie/modules/plugins2.0/RP/rpOrder.js on lines 172..180

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

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 ND_show(pf){
    ParentField = pf;

    if (top.main_frame.document.getElementById('numpad')){
        top.main_frame.document.getElementById('numpad').style.display = 'block';
Severity: Major
Found in pos/is4c-nf/js/Numbers.js and 1 other location - About 3 hrs to fix
pos/is4c-nf/js/Letters.js on lines 4..13

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

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 LD_show(pf){
    LD_ParentField = pf;

    if (top.main_frame.document.getElementById('letterpad')){
        top.main_frame.document.getElementById('letterpad').style.display = 'block';
Severity: Major
Found in pos/is4c-nf/js/Letters.js and 1 other location - About 3 hrs to fix
pos/is4c-nf/js/Numbers.js on lines 4..13

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

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

for o, a in opts:
    if o in ("-u", "--user"): SITE_LOGIN=a
    elif o in ("-p", "--pass"): SITE_PASSWD=a
    elif o in ("-a", "--account"): ACCOUNT=a
fannie/modules/plugins2.0/USFoodsInvoiceGrabber/noauto/usf.py on lines 28..31
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi.py on lines 31..34

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

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

for o, a in opts:
    if o in ("-u", "--user"): USER=a
    elif o in ("-p", "--pass"): PASS=a
    elif o in ("-v", "--verbose"): VERBOSE=True
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi.py on lines 31..34
fannie/modules/plugins2.0/UnfiInvoiceGrabber/noauto/myunfi2.py on lines 32..35

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

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