As there is no Primary Key field in the xx_reports table, even DELETION will not work reliably if it does work at all.
6,077 11/10/2009 09:11:16 pm
Re: Report Generator (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.
6,078 11/10/2009 08:05:07 pm
Re: Report Generator (12 replies, posted in Modules Add-on's)
It would be nice if this board enables file attachments.
6,079 11/10/2009 08:02:50 pm
Re: Report Generator (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.
6,080 11/10/2009 07:54:52 pm
Re: Report Generator (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.
6,081 11/10/2009 05:29:34 pm
Re: Report Generator (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.
6,082 11/10/2009 05:25:39 pm
Re: Report Generator (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.
6,083 11/10/2009 05:17:01 pm
Re: Report Generator (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.
6,084 11/10/2009 04:34:58 pm
Re: Report Generator (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.
6,085 08/05/2009 11:44:25 am
Topic: Sigapore COA based on en_US-new2 (1 replies, posted in Misc. Charts of Accounts)
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?
6,086 05/02/2009 07:03:13 am
Re: Print out date and time (10 replies, posted in Setup)
Very nice indeed - it truly reflects the server time in the company's preferred time zone setting.
6,087 05/02/2009 04:59:36 am
Re: Print out date and time (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.