When we login as admin into the default company and attempt to go to Setup -> Create/Update companies and choose to edit one of the non-default companies and we attempt to change that company's Administrative Password, the new password does not enter that company's database. The status of such a submission however states that the change has been successful even though it is not.

However, when we login to a specific company as admin and attempt to change the admin user's password, we are able to do so.

5,977

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

Hack so far - still insert, edit and delete do not work.

The last part of the repgen_strings.php now stands as:

$k = 0;   // line-number (for row color)
$kk = 0; // For input field name serial
while (list ($key,$val) = each($rec_ar))
{
    $h = explode("|",$val);
    for ($i = 0; $i < 16; $i++)
    {
        if (!isset($h[$i]))
            $h[$i] = "";
    }
    $it_typ=$h[0];
    $it_art = $h[1];
    $it_font = $h[2];
    $it_fontsize = $h[3];
    $it_number = $h[4];
    $it_x1 = $h[5];
    $it_y1 = $h[6];
    if (in_array($it_typ, array("String","DB","Term","Block","Textarea")))
        $it_str = $h[7];
    $it_ord = $h[8];
    $it_from = $h[10];
    $it_to = $h[11];
    $it_total = $h[12];
    $it_o_score = $h[13];
    $it_u_score = $h[14];
    $it_bold = $h[15];

    // <!-- existing items -->
   
    $hiddenattrs  = hidden("id1", $id_new, false);
    $hiddenattrs .= hidden("attrib", $val, false);
    $hiddenattrs .= hidden("id_new", $id_new, false);
    $hiddenattrs .= hidden("sql", $sql, false);
    $hiddenattrs .= hidden("long", $long, false);

    alt_table_row_color($k);
    label_cell($it_typ);
    label_cell($it_art);
    label_cell($it_font);
    label_cell($it_fontsize);
    label_cell($it_ord);
    label_cell($it_number);
    label_cell($it_x1);
    label_cell(($it_y1 != "" ? $it_y1 : "."));
    label_cell(($it_total != "" ? $it_total : "."));
    if (in_array($it_typ, array("Line","Rectangle")))
        label_cell(".");
    else
    {
        if (!(empty($it_from) || empty($it_to)))
            label_cell($it_str."(".$it_from."-".$it_to.")");
        else
            label_cell($it_str);
    }
    if (in_array($it_typ,array("String","DB","Term","Block","Textarea")))
        $editbutton = submit("alter", CHANGE, false);
    else
        $editbutton = " ";
    echo "<td>\n";
    start_form(false, false, "repgen_strings.php?report_type=".$report_type, "edit");
    echo $hiddenattrs . $editbutton . submit("delete", DELETE, false);
    end_form();
    echo "</td>\n";
    end_row();
    $kk++;
}  // end of while

end_table(1);

end_page();
?>

5,978

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

As there is no Primary Key field in the xx_reports table, even DELETION will not work reliably if it does work at all.

5,979

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

Both files: /modules/repgen/repgen_strings.php and repgen_graphics.php do not have any UPDATE / REPLACE SQL query for case="alter" and hence no updations occur. Hence we will have to manually enter the item values into the table for now.

The repgen_graphics.php uses the $k row variable for the "edit" form names and this alternates between 0 and 1 as it is used for alternate row colors. Another variable should be used to serially number the form name like edit1, edit2, etc. This is totally absent in repgen_strings.php.

5,980

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

It would be nice if this board enables file attachments.

5,981

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

For a start, I have done some code cleanup for /modules/repgen/repgen_strings.php by bringing all form elements into one cell for each record. They just have the same name for each record's form.

The last empty column after "Action" is removed in Line 602 by replacing:
$th = array(IT_TYP, IT_ART, IT_FONT, IT_FONT_SIZE, IT_ORD, IT_LEN, IT_X1, IT_Y1, "Total", IT_STRING, "Action", "");
with
$th = array(IT_TYP, IT_ART, IT_FONT, IT_FONT_SIZE, IT_ORD, IT_LEN, IT_X1, IT_Y1, "Total", IT_STRING, "Action");


Then replace the snippet from "existing items" till "end of while" with:

// <!-- existing items -->

    $hiddenattrs  = hidden("id1", $id_new, false);
    $hiddenattrs .= hidden("attrib", $val, false);
    $hiddenattrs .= hidden("id_new", $id_new, false);
    $hiddenattrs .= hidden("sql", $sql,false);
    $hiddenattrs .= hidden("long", $long, false);
   
    alt_table_row_color($k);
    label_cell($it_typ);
    label_cell($it_art);
    label_cell($it_font);
    label_cell($it_fontsize);
    label_cell($it_ord);
    label_cell($it_number);
    label_cell($it_x1);
    label_cell(($it_y1 != "" ? $it_y1 : "."));
    label_cell(($it_total != "" ? $it_total : "."));
    if (in_array($it_typ, array("Line","Rectangle")))
        label_cell(".");
    else
    {
        if (!(empty($it_from) || empty($it_to)))
            label_cell($it_str."(".$it_from."-".$it_to.")");
        else
            label_cell($it_str);
    }
    if (in_array($it_typ,array("String","DB","Term","Block","Textarea")))
        $editbutton = submit("alter", CHANGE, false);
    else
        $editbutton = " ";
    echo "<td>\n";
    start_form(false, false, "repgen_strings.php?report_type=".$report_type, "edit");
    echo $hiddenattrs . $editbutton . submit("delete", DELETE, false);
    end_form();
    echo "</td>\n";

    end_row();
   
}  // end of while


The form URL is still suspect - the $report_type variable in the submit url may cause problems with the other POST variables.

5,982

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

A new report can be created but items cannot be added. The EDIT and INSERT are broken.

5,983

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

The above colon typo applies to Lines 259 and 300  in /modules/repgen/repgen_graphics.php as well.

5,984

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

Lines 653 and 680 have typos:
    echo "<td style='width;0px;display:none;'>\n";
should be
    echo "<td style='width:0px;display:none;'>\n";

The semicolon (;) after "width" should be a colon (:).

This still does not as yet solve the problem.

5,985

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

Refer file /modules/repgen/repgen_strings.php :-

Line 654 is the "start_form" statement and it is inside a cell of a table and PHP decides to auto close the form within the cell itself. Hence the Line 681 which is the actual "end_form()" does not get used where intended.

The start_form() and end_form() statements must be outside of the row cells showing the current Page String Records to be effectve. If each record is in a table of it's own, it will be effective.

5,986

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

Tested repgen on FA v2.1.6 and v2.1.7 and it installed flawlessly with no changes at all.

Logged in as Admin in the Company 0 (default) and was able to see the default reports.

When we try to EDIT any of the 3 default reports
and then we go to the "Page definition for Strings",
we are unable to edit any record in the "Table of Stored Items" there.

There was a typo in the word "Provesions" in the original script.

My Singapore version of the COA is temporarily available at:-
http://www.smsfriends.net/en_SG-new2.zip

Please include it into your WebSite so other users may benefit.

Must we populate the users table with any user at all for sample chart of accounts? Doesn't it get generated automatically or does it merely update the first record?

5,988

(10 replies, posted in Setup)

Very nice indeed - it truly reflects the server time in the company's preferred time zone setting.

5,989

(10 replies, posted in Setup)

How can we set the TimeZone for the Logged In User's Profile? If this is done, then each user will be able to view the reports in their Time Zone. Caveat: Each user will see the same report in possibly different time printouts at the same time. A workaround can be a TimeZone Suffix to the printed Date / Time.