Thank you, now it works.
I had tried to search the topics with this string: "Salary rate must be a number."
But found nothing.

Have you made any kind of user manual for the module?
I am not quite shure about what the following is meant to do:

What are pay elements and grades?
And how are they connected to allocations and salary structures?
What is the Deductible Account?
What is the purpose of Documents?

Just installed HRM and when trying to add a new leave type I get the following error:

"Salary rate must be a number."

even if the rate is a number.

Any idea what to modify in which file?

Just installed HRM and when trying to add a new leave type I get the following error:

"Salary rate must be a number."

even if the rate is a number.

Any idea what to modify in which file?

I know, but the opening and closing {} does not match.
Also the line:
    $js = "

does not mean anything.

The way it is now, you don't know which function is inside the other.

Some { or } missing from the functions below and I am not sure which functions belong to which functions (if they are nested functions)?
The code starts around line 830.

function get_js_date_picker()
{
    global $go_debug;
    $fpath = company_path().'/js_cache/'.'date_picker.js';

    if (!file_exists($fpath) || $go_debug) {

    global $dateseps, $date_system, $tmonths;

    $how = user_date_format();                // 0 = us/ca, 1 = eu, au, nz, 2 = jp, sw
    $sep = $dateseps[user_date_sep()];        // date separator
    $wstart = (($date_system == 1 || $date_system == 2 || $date_system == 3) ? 6 : ($how == 0 || $how == 3 ? 0 : 1));    // weekstart (sun = 0, mon = 1)
    $months = array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
    $wdays = array(_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa"));
    $wno = _("W"); // week no
    $back = _("Back");
    if ($date_system == 1)
        list($cyear, $cmon, $cday) = gregorian_to_jalali(date("Y"), date("n"), date("j"));
    else if ($date_system == 2)
        list($cyear, $cmon, $cday) = gregorian_to_islamic(date("Y"), date("n"), date("j"));


    $js = "               
function positionInfo(object) {
  var p_elm = object;
  this.getElementLeft = getElementLeft;
  function getElementLeft() {
    var x = 0;
    var elm;
    if(typeof(p_elm) == 'object'){
      elm = p_elm;
    } else {
      elm = document.getElementById(p_elm);
    }
    while (elm != null) {
      x+= elm.offsetLeft;
      elm = elm.offsetParent;
    }
    return parseInt(x);
  }
  this.getElementWidth = getElementWidth;

6

(2 replies, posted in Setup)

Anyone knows how to set up the local Help system.
I cannot find where to download the help pages from.

It works fine with wiki, but I would like to set it up localy

Sorry about the report.

It was the openssl extension of the php server that was not enabled.

After correcting it in the apache server php.conf file everything is ok.

When clicking those links the page stops loading and this error is reported:

"Call to undefined function openssl_verify() in C:\wamp\www\frontaccounting\includes\packages.inc on line 302"

Around line 300 in the file we find:

"           $sig = url_get_contents($repo.'/Release.sig');
        $data = file_get_contents($loclist);
        $cert = file_get_contents(PUBKEY_PATH.'/FA.pem');
        if (openssl_verify($data, $sig, $cert) <= 0) "

The function is "openssl_verify". When searching all files I cannot find this function declared anywhere.

I am using version 2.3.14.

This is what is reported:

Language
( ! ) SCREAM: Error suppression ignored for
( ! )
Call Stack
#    Time    Memory    Function    Location
1    0.0014    350464    {main}( )    ..\inst_lang.php:0
2    1.1539    7747408    display_languages( )    ..\inst_lang.php:290
3    1.1540    7768160    get_languages_list( )    ..\inst_lang.php:59
4    1.1540    7769928    get_pkg_or_list( )    ..\packages.inc:452

Extensions
( ! ) SCREAM: Error suppression ignored for
( ! )
Call Stack
#    Time           Memory    Function                        Location
1    0.0026    332424    {main}( )                         ..\inst_module.php:0
2    1.1513    7731336    display_extensions( )   ..\inst_module.php:261
3    1.1514    7750368    get_extensions_list( )  ..\inst_module.php:109
4    1.1514    7752384    get_pkg_or_list( )        ..\packages.inc:499

Theme
( ! ) SCREAM: Error suppression ignored for
( ! )
Call Stack
#    Time    Memory    Function    Location
1    0.0010    286056    {main}( )    ..\inst_theme.php:0
2    1.1660    7701272    get_themes_list( )    ..\inst_theme.php:78
3    1.1660    7702336    get_pkg_or_list( )    ..\packages.inc:548

Chart of Accounts
( ! )
Call Stack
#    Time    Memory    Function    Location
1    0.0021    278872    {main}( )    ..\inst_chart.php:0
2    1.1348    7695272    get_charts_list( )    ..\inst_chart.php:54
3    1.1348    7697032    get_pkg_or_list( )    ..\packages.inc:581

I finally managed to locate where to put the _() for the combo boxes to get translated.       
It is in the file frontaccounting/includes/ui/ui_lists.inc    around line 190.
The variable $contact_row[1] contains the expression taken from the database that you want to translate.
All you need to do is to add the middle line shown below.

        $value = $contact_row[0];
    $contact_row[1] = _($contact_row[1]);   //   this line is added
    $descr = $opts['format']==null ?  $contact_row[1] :

Then when you manually put the translations in the PO file and make a new MO file your combo boxes will also be translated.

Example:

The first 2 entries in the chart_types table are "Current Assets" and "Inventory Assets".

Then add the following to your PO file:

#: from table chart_types
msgid "Current Assets"
msgstr "Omløpsmidler"

#: from table chart_types
msgid "Inventory Assets"
msgstr "Anleggsmidler"

The translation shown above is Norwegian, but you put the translation in your own language.

I have made a file of most of the database entries that should be translated and will try to make it available for all to download.

Some places are easy to find and some are difficult to find.
The Account Types page is an example.
On the screen 2 of the combo boxes can easily be translated as you say, but the 2 others are difficult to find.

The 2 easy ones are found in the "while" statement starting around line 133 in the file /frontaccounting/gl/manage/gl_account_types.php.
In the label_cell function calls around line 150 the _() are inserted as shown below. When the correct translations are inserted in the PO file, they are translated correctly.
I found that the ($parent_text) could not be empty. You have to assign it some value. Otherwise it returns the whole PO file.

while ($myrow = db_fetch($result))
{

    alt_table_row_color($k);

    $bs_text = get_account_class_name($myrow["class_id"]);
    $parent_text = "-";
    if ($myrow["parent"] == '-1')
    {
        $parent_text = "-";
    }
    else
    {
        $parent_text = get_account_type_name($myrow["parent"]) . " ";
    }

    label_cell($myrow["id"]);
    label_cell(_($myrow["name"]));//   here the _() is put
    label_cell(_($parent_text));//   here the _() is put
    label_cell(_($bs_text));//   here the _() is put
    inactive_control_cell($myrow["id"], $myrow["inactive"], 'chart_types', 'id');
    edit_button_cell("Edit".$myrow["id"], _("Edit"));
    delete_button_cell("Delete".$myrow["id"], _("Delete"));
    end_row();
}
--------------------------------------------------------------------------------------------------------------------------------------------
The 2 combo boxes at the bottom of the page are more difficult to handle. I have not managed to find out where to introduce the _(). I have tried several places in the "gl_account_types.php" file and in the ui_lists.php file and the gl_db_account_types.inc file but I cannot find out where to put them.

Do you have any suggestions where to put the _()?

Yes, and then the phrase "Payment due within 10 days" taken from the database would appear in the PO file as

msgid "Payment due within 10 days"
msgstr "whatever it is in your language"

and whenever this phrase appeared in the combo boxes it would be translated to your language.

So my question is: Is there a way to fix this?

12

(4 replies, posted in Report Bugs here)

It was Firefox 18.0.1.
When I tried the other browsers it was ok.

In Firefox it was also dependent on which of the 3 sample companies was active.
With Ghostbusters it was ok but not with the 2 others

13

(4 replies, posted in Report Bugs here)

Some of the combo boxes (for instance Payment, Item Description, Dimension) are vertically top-adjusted and the line-height is increased.
Others (like Customer, Branch) are correct line-height and centered.
I dont know if it is the line-height that is too big or what is causing the layout to not be ok.

I want to fix this, but cannot find the file controlling the output.

These data should also be "internationalized". If people working in the same company from different countries are using the program, these data should also be in the language of the user. A user in Germany sending out an invoice should have the messages in German, a user in Norway in Norwegian.
As it is now there is only one choice.
To fix this you need to introduce a country table and add the different translations to the appropriate tables so that these messages can be written in the language of the user.

Some parts of the program get the words from the database itself, and they are all in English.
Like each, hrs,  Payment due within 10 days and so on.
Is there a way to translate these words? I have tried to  put _() around the items in the sql query, but it does not seem to work

I just discovered that when using POEdit I need to make a change in the original translated text, then save the PO file so that a new MO file is created, then stop and restart the Apache server for the change to take place.

I just found out that I have to stop and restart the Apache server for the changes to take place.

Anyone knows about another way of doing it?

It should be a quicker way to do it.

I use Poedit and after making changes to the PO file and saving it, an updated MO file is created. I can see from the time stamp on the file. The file is also in the correct directory.

But the translation does not show after refreshing the browser.

I use xampp 1.8.0.

Is there something else that needs to be refreshed?

To navigate on a page the & is used in front of the shortcut letter, like in "Add and Manage &Customers", so that the C gets underscored.
I am using the Danish translation and all phrases without the & get translated, but none which contains the &.

How to fix this?

20

(12 replies, posted in Translations)

I had the xampp 1.7.3 initially and after upgrading to xampp 1.8.0 the problem was solved. Maybe something wrong with the PHP part of xampp 1.7.3.

21

(12 replies, posted in Translations)

hi
Thats what I do. But still no different language.
What changes do you need to make in the ini files?
Maybe I need to make the same changes in the xampp ini files?
The no_NO download was ok.

22

(12 replies, posted in Translations)

Anders
Preferences is the same as Display setup.
If you email me your language files, I will take a look. I use Poedit.
Is your translation working? And which system and server do you use?

23

(12 replies, posted in Translations)

Since the Danish did not work, I tried to make a Norwegian translation file, and since there is no Norwegian on the net, I had to install it manually. The Norwegian is in the directory no_NO and the Danish in da_DK. Nothing is working. I tried to install some other languages as well, but nothing works.
Is there something I miss out?
I download the language via "Install/Update Languages" and set the new language to be the default. Then I go to Preferences and set the language I want and press Update. But nothing gets translated.

24

(12 replies, posted in Translations)

If I try to add a language manually I get the following errors:

unlink(../lang/no_NO/LC_MESSAGES/no_NO.po) [function.unlink]: Permission denied in file: C:\xampp\htdocs\frontaccounting\admin\inst_lang.php at line 174
C:\xampp\htdocs\frontaccounting\admin\inst_lang.php:174:    unlink('../lang/no_NO/LC_MESSAGES/no_NO.po')
C:\xampp\htdocs\frontaccounting\admin\inst_lang.php:267:    handle_submit('-1')
unlink(../lang/no_NO/LC_MESSAGES/no_NO.mo) [function.unlink]: Permission denied in file: C:\xampp\htdocs\frontaccounting\admin\inst_lang.php at line 182
C:\xampp\htdocs\frontaccounting\admin\inst_lang.php:182:    unlink('../lang/no_NO/LC_MESSAGES/no_NO.mo')
C:\xampp\htdocs\frontaccounting\admin\inst_lang.php:267:    handle_submit('-1')

25

(12 replies, posted in Translations)

w7 and xampp 1.7.3