151

(14 replies, posted in Accounts Receivable)

before the function count_array() was deployed we used PHP build in function count() for validating both array and number
since the count() has been changed to validate array, object only so we need to create new function in FA for checking both number and array.
The current function count_array() should be modified to:

function fa_count($input)
{
    if(is_array($input))
        return count($input);
    elseif(ctype_digit($input) && (int)$input > 0)
        return (int)$input;
    else
        return 0;
}

Do this we could change every curently count() to fa_count() without worry about errors that may arise somewhere.

152

(14 replies, posted in Accounts Receivable)

@joe
my function is not working because it is called inside function get_sales_child_documents which use 3 times in file view_sales_order.php validating for both number and array.

your solution is working in this case but seems we still need a function to check both array element and number

153

(14 replies, posted in Accounts Receivable)

yes, function count_array() is for the purpose as of its name.
all places that are checking positive intergers need a different function.

function is_positive_int($input)
{
    if(ctype_digit($input) && (int)$input > 0)
        return true;

    return false;
}

and line 371 of sales_db.inc needs to be modified to :

if (!is_positive_int($trans_no))

also roll back the last commit.

hello @akshaya1972
your link is not responding

Not Found
The requested URL /adm/news was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at b4india.org Port 80

155

(11 replies, posted in Banking and General Ledger)

@emiangel839

journal number has already shown in the TOP LEFT BOX in your image so you can just ignore that empty box.

@akshaya1972

could not access your link

157

(6 replies, posted in Modules Add-on's)

Hello @akshaya1972

I installed FrontHrm in both FA 2.4.4 and 2.4.5 but couldn't reappear the error message
Please describe your problem on THIS TOPIC so that people who encountered the same problem can get their help also.


Thank you

158

(82 replies, posted in FA Modifications)

@kvvaradha
Just like the Report Extensions, a hook class is not necessary
Can write anything tables, graphs, charts in the custom widgets
You can even add your custom chart library to write a dynamic chart

159

(82 replies, posted in FA Modifications)

Hello

Here is the modification for a customizable dashboard system

- One current core file to be modified: /admin/dashboard.php
- One folder to be added to the root folder: /dashboards
- In this new folder dashboards the build in widgets would be placed there
- For custom dashboard, developer should create a folder named dashboards in his extension folder then put here a file named custom_dashboards.php. To add new dashboard and widgets would require this file' contents like this:

define('DA_HRM', 'FrontHrm');

$dashboard->addDashboard(_('HRM'), DA_HRM);
$dashboard->addWidget(DA_HRM, 997, _('Widget name 1'), WIDGET_HALF);
$dashboard->addWidget(DA_HRM, 998, _('Widget name 2'), WIDGET_HALF);
$dashboard->addWidget(DA_HRM, 999, _('Widget name 3'), WIDGET_FULL);
...

This is a rough sketch for what I have proposed.
Following this method users can decide which widget, chart would be shown on their dashboard.
I have been doing this by simulating the Report System.
Jquery and any Js, charts libraries could be included later

Thank you

ps: also need few more new css lines

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 ;
}

160

(82 replies, posted in FA Modifications)

Yes @apmuthu
Jquery can be implemented locally in any extension.
My plan is a bit different.
1. Developers could create dashboards themselves for their extensions and
2. They also could created extensions to replace the build in dashboard.
Without include Jquery in the core  the second possibility would be restricted in creating dynamic widgets (or at least I don't know how to do).

I'm going provide the first roughly modification today or tomorrow to make ideas clearer.

Thank you

161

(82 replies, posted in FA Modifications)

Yes @Joe @itronics
I understand and entirely agreed with these standards.
The first modifications will be presented next week
Thank you

162

(82 replies, posted in FA Modifications)

Yes
Using it could open a vast space for improving the user experience.

163

(82 replies, posted in FA Modifications)

Yes sir
But how about Jquery ?
We are seem to be a bit cautious with the use of 3rd party libraries ?

164

(82 replies, posted in FA Modifications)

We have a flexible Reports System which can be modularized very good.
Go through working with FA I found many functions that are not as flexible as the Reports is
So I have been planning to modularize these inflexible functions.

Will begin with the Dashboards System and hope to get more feedback from everyone.
Also hope these modifications would be considered to the core deployment.

165

(26 replies, posted in Reporting)

There are still some where

  1. /includes/ui/items_cart.inc line 312. Error firing on Modifying Journal Transaction

  2. /includes/ui/contacts_view.inc line 137. Error firing on Add Customer Contact without selecting Contact Category

166

(26 replies, posted in Reporting)

Line 186 file maintenance_db.inc also needs array check function.
Error raising on Installation Wizard step 5.

This commit created problem in line 635 by did not call the constant TB_PREF.

168

(2 replies, posted in Installation)

FA now is working fine with PHP 7.1 or higher.
Since this commit

169

(10 replies, posted in Setup)

From Bangladesh you can contact ngicon
His website: http://www.ngicon.com/
And apmuthu above from India

Should we add this modification to the next release also ?
https://frontaccounting.com/punbb/viewtopic.php?id=7764

Should add these checks for function can_process() gl_setup.php

if (!check_num('past_due_days', 0, 100))
    {
        display_error(_("The past due days interval allowance must be between 0 and 100."));
        set_focus('past_due_days');
        return false;
    }

    if (!check_num('default_quote_valid_days', 0))
    {
        display_error(_("Quote Valid Days is not valid number."));
        set_focus('default_quote_valid_days');
        return false;
    }

    if (!check_num('default_delivery_required', 0))
    {
        display_error(_("Delivery Required By is not valid number."));
        set_focus('default_delivery_required');
        return false;
    }

    if (!check_num('default_receival_required', 0))
    {
        display_error(_("Receival Required By is not valid number."));
        set_focus('default_receival_required');
        return false;
    }

    if (!check_num('default_workorder_required', 0))
    {
        display_error(_("Work Order Required By After is not valid number."));
        set_focus('default_workorder_required');
        return false;
    }

Company setup should be added new procedures to check input data:

  • Tax Periods

  • Tax Last Period

  • Add Price from Std Cost

  • Round Calculated

The two lines 125 - 126 need to be moved to right below the line 123. This is to avoid focusing to company name on every time of updating.

Modified company_preferences.php here: https://drive.google.com/open?id=1JTzLV … LYz9hsjFxt

@andijani

The TCPDF error can be fixed by doing coresponding step in the instruction (README.md)
Will check the payment calculator, thank you.

174

(10 replies, posted in Setup)

@rahmanbd: His contacts can be found here

@emiangel839

Just deactivate the old one, replace code then active the module again to clear old data