Fixed PHP 7.2 count() compatibility
Some workarounds have been made for SQL strict mode compatibility
Also added new function attendance for a date range, now user can add edit timekeeping for a range of dates

Hello Braath Waate

I have have not investigate to functions but based on your describe blank value passed to an interger column I guess this is a violation with SQL strict mode.
Try to change line 13 of connect_db_mysqli.inc with the following

define('SQL_MODE', ''); // STRICT_ALL_TABLES,NO_ZERO_IN_DATE ?

and test again to see if the problem disappeared or not.

Announce

This module is getting database errors with FA 2.4.6
The reason is because from 2.4.6 database SQL_MODE has been shifted to strict mode.
If you are planning to upgrade to 2.4.6 please consider this module will not work.
I will check then update FrontHrm source code later next month.

Thank you

129

(82 replies, posted in FA Modifications)

Undefined variable error has been fixed.
New source code can be downloaded HERE
Thank you @kvvaradha

130

(82 replies, posted in FA Modifications)

A demo for this modification was not prepared @kvvaradha, will inform once it is ready.
But all source codes and instruction can be found in post #18, you can get this work easily in about 5 minutes, an example for a module in post #19 was attached as well.

131

(82 replies, posted in FA Modifications)

@apmuthu
this requires the following css codes for every themes to get affected

div.widgets_container {
    display: inline-block;
    width: 100%;
}

div.widget_title {
    font-weight: bold;
    color: #555;
    font-size: 1.3em;
    width: 100%;
    border-bottom: 1px solid #DDD;
    padding: 5px 0;
    margin-bottom: 5px;
}

div.widget {
    border: 1px solid #DDD;
    background: #FFF;
    padding: 0 10px;
    margin: 10px 0;
    box-sizing: border-box;
    display: inline-block;
    float: left;
    height: 23em;
    overflow: auto;
}

div.widget_full {
    width: calc(100% - 40px);
    margin-left: 20px;
}

div.widget_half {
    width: calc(50% - 30px);
    margin-left: 20px ;
}

These are screen shots for the current core themes:
Default
Canvas
Dropdown

This Commit has created at line 348 of ui_list.inc a semicolon instead of a colon ?

ps: I have just searched through php documentation it is possible to use a semicolon but should it be or not ?

133

(82 replies, posted in FA Modifications)

And an example for custom dashboard module as well: custom_sales_dashboard

You will see a new addition widget in the Sales/Dasboard after active this module.

134

(82 replies, posted in FA Modifications)

Hello everyone, thank you so much for your responses
Here is the completed code for this modification.
After unzip the attachment we will need to replace one core file: admin/dashboard.php and copy every files in the reporting folder to the coresponding places.
Also need to copy the css contents to every theme we have.

We need new css codes because I used DIV tags to replace the current structure which has been built on tables structure, gradual replacement of tables to DIV tags would create future advantages when building responsive themes.

With this new dashboard system the current file includes/dashboard.inc can be removed.

DOWNLOAD

Thank you all

135

(14 replies, posted in Manufactoring)

@joe
Nothing changed in the rollback

code block from line 106 - 111 needs to be replaced with:

if ($qty > 0 && ($qoh != -$qty))
        $avg_cost = ($avg_cost*($qoh+$qty_delayed)+$unit_cost*$qty_new)/($qoh+$qty);

136

(14 replies, posted in Manufactoring)

Yes @boxygen
Problem is not solved with new method applying to grn_db.inc
Thank you for correcting my serious mistake.
I have to find another way to get this cost value.

@joe THIS COMMIT
needs to be rolled back.

137

(14 replies, posted in Manufactoring)

Hello @boxygen

I found the cause of this issue is not the new calculating method, it gives more accurate average cost than the old method.
The problem is when updated this new method for manufactured items cost we did not update the same method for component/purchased items cost so that system calculates wrong inventory values.

I guess the solution would be: lines 66, 67 of grn_db.inc needs to be replaced with

if ($qoh + $qty > 0) {
            if($qoh == 0 && $material_cost != 0)
                $material_cost = ($material_cost + $price_in_home_currency)/2;
            else
                $material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) /    ($qoh + $qty);
        }

Will take a closer investigate tomorrow

138

(14 replies, posted in Manufactoring)

Yes, serious problem! will check right now

139

(14 replies, posted in Manufactoring)

Yes, isn't avg cost 55 more accurate ?
Things are explained here: https://frontaccounting.com/punbb/viewtopic.php?id=7568

140

(14 replies, posted in Manufactoring)

How wrong it was $boxygen ?
I'm the one who created these lines

141

(82 replies, posted in FA Modifications)

Will try to make codes ready later this month @boxygen

Yes, custom access pages in theme folder would be great, but which folder ? Should system need to access users cookies to get their last used theme ?

Yes @kanay
This bug can be fixed by adding this code to below the line 260 of supp_trans_db.inc

$sql2 .= " AND trans.delivery_date >= '$date_after'
            AND trans.delivery_date <= '$date_to'";

No it can't @akshaya1972
But I don't understand your requirement, attendance is not posting gl transactions, why we need add dimension to this ?

145

(7 replies, posted in FA Modifications)

Latest kanban source code here @akshaya1972

Fixed file gl_db_rates.inc for ECB and included CCA can be download here

for config file:

$xr_providers = array("ECB", "EXCHANGE-RATES.ORG", "CCA", "YAHOO", "GOOGLE", "BLOOMBERG");

A well-known financial institution should be default so I moved ECB to first position.

Here is the code: https://drive.google.com/open?id=1yvXKr … ch0jnsdbvE
For the config file:

$xr_providers = array("EXCHANGE-RATES.ORG", "ECB", "YAHOO", "GOOGLE", "BLOOMBERG");

We should remove all current rate providers as well, they no longer allow to access their data without permission

Should we use https://exchange-rates.org ?
Seems they have most currencies in the world and create their website for currency converting purpose.
They are also quite generous with having someone use their data by providing code to embed rates table.

yes, rep202.php line 214 need the same commit as well

Sales -> Aged Customer Analysis is firing this error

line 207 of rep102.php should be:

$trans[$i] = (float)$trans[$i] * $rate;