currently, it works fine when clicking and staying in any table page

but when changing the page still there is a problem to be resolved.

//-------------------------------------------------------------------------------------------------------------------------
//               the bellow sequence is very important for controlling the checkboxes relation header / rows
//-------------------------------------------------------------------------------------------------------------------------
          
$id = find_submit('_rec_');      // check if a row was clicked

if (!check_value('chkbx')) { update_all('0') ;  }   // always clear all the rows checkboxes whenever the header is not marked

if ( check_value('chkbx')==1 && $id == -1) { update_all('1') ;  }  // when we are sure that the header is
                                                                                                                      //  clicked and not one of the rows was clicked
       
if ($id != -1)                                  // when a row is clicked => toggle its mark & update the "sel_chk" field to (0 || 1 )
        {
            $chkbox_value = check_value("rec_".$id) ? '1' : '0';
            update_gl_trans_sel_chk_value($id,$chkbox_value);
        }

//--------------------------------------------------------------------------------------------------------------------------
//               the above sequence is very important for controlling the checkboxes relation header / rows
//--------------------------------------------------------------------------------------------------------------------------


I m sure now that things are on the right track.

- the goods is I didn't use javascripts until now except of the standard ((( JsHttpRequest.request("_XXXX_update", this.form); )))

- the bads is that I was obliged to control the header checkbox through modifications in db_pager_view.inc file:

related to   :    $labels[0]   <==>  $table->columns->headers[0]   ( table header )


thanks for your support

Khaled

Hi,

to resolve the checkboxes select/deselect in the rows, I did the following :

- I added a temporary field column "sel_chk" to the $sql used in journal_inquiry ( based on adding join the existing "gl_trans" to temporary table containing [ clone of gl_trans.counter & sel_chk]

- I controlled their previous selection  within the $sql pagination by adding a $_session var for the journal_inquiry page & by adding a conditional check in db_pager_view.inc

- I imitate the selection checkboxes as in : /gl/bank_account_reconcile.php and it works ok for the rows.


Now for doing the check ALL case in the deader i m freezed:

- I cannot adopt the JAVASCRIPT approach as in the links because it deals with the seen page only, and when paginating it flashes away all the checkboxes ( I tried as described )

- I tried to call a php function through AJAX ( it looks a good approach ) but i failed because it seems that in this JAVA / AJAX / PHP connection, JAVSCRIPT establish a new connection tunnel for the communication and in this case it couldn't recognize all of the server original environment and and the relations were lost.

it is really a difficult exercise.

khaled

Thanks for your reply.

Khaled

Hi Joe,

Controlling the checkboxes in the tables rows are ok now ( learned how to do it from : bank_account_reconcile.php ),

but still I failed to control the top checkbox in their column header.

The idea is to use it as : check all / uncheck all / checked (whenever one of the rows checkboxes is checked)

AND whenever the header is being checked a tiny icon menu will  show up ( and this tiny menu will disappear when unchecked ).

Any suggestion ?

Regards,
Kalido

Hi,

I couldn't understand your comment, but I attached the pic to help figure out what i am working on.

Anyhow I appreciate any help in this regard.

I did a deep search for a solution on the net, but it seems it is a bit complicated to have such kind of control and I found nothing interesting unless advises to use $_session ( cookies ) when paginating to hold control of checked checkboxes.

I didn't found any sample to base my trials on it and because of that I tried to ask for suggestions.

For sure there is no selfishness when I said that I failed to do this exercise.    smile

Thanks,
Kalido

I will submit the code, but until now I failed to hold the checkbox's when activating AJAX.

I added the checkbox's to a new Journal Inquiry page and trying to control the selection for exporting or printing out.

Any proposal ?

hey,

really i m thankful a lot.

Kalido

Thanks,

I m trying to have a new look for ..\gl\inquiry\journal_inquiry.php with which  I want to add a new checkbox column at the beginning
of the displayed table.

When selecting checkbox's , it will popup a set of control buttons who will allow us to Export the selected rows.

It is a some kind of additional control to add for List inquiry web pages used in different locations of FA.

Kalido

Hi,


Kindly, I couldn't add a column in the db_pager containing checkboxes. Is it possible ?
Perhaps I need to modify the sql's by adding a virtual column than include the checkbox field in the cols of the db_pager ? If so , how i can write it up :

_("chkbx") => array('insert'=>true, 'fun'=> 'echo"<input type=\"checkbox\" name=\"".$row['chknew']." value=\"".$nb."\">"'),

Regards,
Khaled Ali

hi

the expected page that permit me to select the PHP file, repgen_select.php did not appear.

in the version 2.2,  when asking for an extension, a page appear in which controls are inserted.

/khaled

Hi,

I faced with the Ver 2.3.1 problems when trying installing the Repgen 2.30 module.

How can I install it manually ?

/khaled

Hi Joe,

-----> config.php 

add :

    // Show Zero's from Voided Transactions : 1 = Show it ; 0 = Hide it  ===> Default : Hide it = 0
     $Show_Zeros_of_Voided_Transactions='0';   

------> gl_db_trans.inc 

change to :
function get_gl_transactions($from_date, $to_date, $trans_no=0,
    $account=null, $dimension=0, $dimension2=0, $filter_type=null,
    $amount_min=null, $amount_max=null,$Show_Zeros_of_Voided_Transactions='0')

add just before the line :    if ($trans_no > 0)
the statement :
if ( $Show_Zeros_of_Voided_Transactions == '0')     $sql .=   " AND ".TB_PREF."gl_trans.amount <> '0' ";

------> gl_account_inquiry.php

in function show_results()

change to :
global $path_to_root, $table_style, $systypes_array,$Show_Zeros_of_Voided_Transactions;

change to :
    $result = get_gl_transactions($_POST['TransFromDate'], $_POST['TransToDate'], -1,                         
        $_POST["account"], $_POST['Dimension'], $_POST['Dimension2'], null,
        input_num('amount_min'), input_num('amount_max'),$Show_Zeros_of_Voided_Transactions);

-------> Rep702.php

in function print_list_of_journal_entries()

change to:
    global $path_to_root, $systypes_array, $Show_Zeros_of_Voided_Transactions;

change to:
    $trans = get_gl_transactions($from, $to, -1, null, 0, 0, $systype,null,null,$Show_Zeros_of_Voided_Transactions); 

--------> Rep704.php

in function print_GL_transactions()

change to:
    global $path_to_root, $systypes_array, $Show_Zeros_of_Voided_Transactions; 

change to:
    $trans = get_gl_transactions($from, $to, -1, $account['account_code'], $dimension, $dimension2,null,null,null,$Show_Zeros_of_Voided_Transactions);


RE : Report Generator,

I really don't know any, but I doubt it is perhaps easier if we sub-devised the Rep-xxx associated with FA to different  sub-modules :

- Title (1, 2,...) : generalized

- Core (1,2,...) : special for each report

- Tail (1,2,...)   : generalized

it is a semi automatic approach.

Regards,
Khaled

I will do the modification as you suggest. And I will post it to the community soon.

From other side, I m very happy that you adopted the Characters Accounts approach.

I think now,perhaps it is about time for an effort to some kind of a Simple Reports Generator.

/khaled

Hi,

to hide Voided Transactions Records who appears as Zero's in :

GL Account Inquiry ( ...../gl/inquiry/gl_account_inquiry.php? ) Or in the Account Statement Reports,

I added a variable : $Include_Zero_Amounts = 'No';
in   the function  "  get_gl_transactions  " ///  " gl_db_trans.php  "  to control the associated query.

Is there another alternative I may use  ?

Thanks,
Khaled

thanks Janusz.

It seems I set it before & forgot to reset it to : 0.         I am very sorry.

RE : excel, I don't know perhaps it is a problem of non compatibility with my excel 2010 version.

thanks.

Hi,

I tried to upgrade the software from FA 2.2.4 to FA 2.3.1, & then I altered the database as required.

Upgrading the database was successful.

I use the Arabic language data : UTF-8 & ar_EG , the ae_tholoth fonts.

Can you advise me please, since I faced the following problem :

When I tried to evoke

---->     an excel report, the outputted data was trunked.

---->     a pdf report , I had the following :

    %PDF-1.3
1.00 w
3 0 obj
<</Type /Page
/Parent 1 0 R
/MediaBox [0 0 595.28 841.89]
/Resources 2 0 R
/Contents 4 0 R>>
endobj
4 0 obj
<</Filter /FlateDecode /Length 2110>>
stream
x??????E?@????8??! ???p@6??X?K?r9?h??##??mb???b+?}H??d0? Z?/?X?*??q??k?_??jf?{g????Y]????s??????? ??xj???z??V:?k????9u?? ????>???\??ssF
?(C>?1??o????M???u???M?????????l=???rG??z?z?z?Z??jg?$???gg?l?;??u?c???q???0?

17

(3 replies, posted in Reporting)

Thanks for your help. I try it as you propose but seems it does not work.

Hope any further ideas.

regards

Hello,

when I try to generate JV report for a tight period 1-2 months,
the prn_redirect.php generate a pdf doc.

when I tried to generate JV report for a wide period of 20 months, the prn_redirect.php couldn't generate a pdf doc.

For this reason I tried the following :

- I increased the [ default timeout value : tout ] in " utils.js " to 50000

- I increased $uni [ memory_limit ] from 48M to 512M in " class.pdf.inc "

Also it didn't work.

Note : - I use laptop / 3GB RAM, 1.87Ghz core duo from Intel.
          - In my office & w/ desktop 1 GB RAM , I don't face this problem.
          - Data are utf-8 (arabic language)
          - I faced this issue w/ V2.2.4 & today also with V2.3.0 after upgrading


Any Idea to resolve this issue ? I will be thankful.

Regards,
Khaled

I added

$reports->addReport(_('General Ledger'),702,_('List of &Journal Entries'),
array(    _('Start Date') => 'DATEBEGINM',
                _('End Date') => 'DATEENDM',
    _('Type') => 'SYS_TYPES',
    _('Comments') => 'TEXTBOX',
    _('Destination') => 'DESTINATION'));

as an another example for reporting. I noticed that it is ok for it, but still freezing when calling rep_annual_balance_breakdown.php

I tried : $go_debug=1 in config.php ---> in this case when I enter the Reports page, the FA Freeze. So i couldn't profit form it (  $go_debug=1)

khaled

hello Joe,

I will try that & I will back to you


khaled

Hello,

I tried to use the new rep_annual_balance_breakdown.php report module.

But it seems it don't generate a report although I tried to gives it a more time by extending the timeout option limit in utils.js ( tout = tout | 100000;    // default timeout value   )

Any suggestions ?

Khaled

Hello,

Nice & Fast Work smile

Khaled

Hello,

I notice that if I modify a Journal Voucher who belongs to a year other than the  current working fiscal year, the Date of that voucher is automatically directed to the 31 December of that year.

Is there a way to avoid that event and preserve the already registered date ?

If somehow you forgot to make your fiscal year equal to that of the  targeted transcation, your modification will move that voucher to the 31 Dec of the current year automatically.

Regards,


Khaled

24

(2 replies, posted in Wish List)

hi,


I faced the problem when using : " Annual Expense Breakdown ". It is a nice report, but to expanded it horizontally I noticed that I need to change the paper size to A3. In that case $col data in rep705.php should be changed.

Anyhow you are right Joe,
by using Lansdcape output this will resolve the problem but still the need to have the option for using that choice when directing the printout to the PDF generator [ FrontReport() parameter : L or P ] in addition to a control for $col data in harmony with the selected Paper either A4,A3,LETTER,LEGAL as defined in FrontReport().

Also, controlling the amounts to : x 100  or  x 1000 will help to minimize outputted data in the reports when no deep precision is needed.

Finally, I will add this wish topic to Wiki Page.


Thanks,


Khaled

Hello,


Is it simple to add screen controls for :

- A3 paper size output reports

- Selector for decimals counts to be displayed in reports

- Selector for Amounts to be displayed in Thousands, Hundreds or as Actual in   
  reports

Khaled