Also use the later Mercurial Build version of FA from this post.

5,677

(4 replies, posted in Items and Inventory)

Use a different pricelist.

Update the en_US .mo / .po files and submit to the the project what you consider to be real en_US.

5,679

(6 replies, posted in Accounts Payable)

Thanks Joe,

The change set 3130 is reproduced here to help detect and fix similar errors:

--- old/purchasing/manage/suppliers.php    Thu Oct 04 13:09:47 2012
+++ new/purchasing/manage/suppliers.php    Sat Jan 05 10:17:23 2013
@@ -214,7 +214,7 @@
                 $_POST['website'], $_POST['supp_account_no'], $_POST['bank_account'], 
                 input_num('credit_limit', 0), $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['curr_code'],
                 $_POST['payment_terms'], $_POST['payable_account'], $_POST['purchase_account'], $_POST['payment_discount_account'],
-                $_POST['notes'], $_POST['tax_group_id'], @$_POST['tax_included']);
+                $_POST['notes'], $_POST['tax_group_id'], get_post('tax_included', 0));
             update_record_status($_POST['supplier_id'], $_POST['inactive'],
                 'suppliers', 'supplier_id');

5,680

(5 replies, posted in Banking and General Ledger)

Will Quick Entries help?

5,681

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

Thanks Janusz.

Will deposit in bank suffice or possibly deposit with bank or deposit into bank ?

Looks like the said function is disabled in your php.ini - contact your system admin or see if your apache httpd.conf / .htaccess can be configured to allow it.

Please use the latest version of FA from the development repository if you are starting anew as many bugs have been fixed and not released as yet.

FrontAc_default_Mer_3127_2012-12-20.tar.gz.

Check out the release post.

5,684

(5 replies, posted in FA Modifications)

1. Take a SQL dump of the FA db.
2. Manually add one journal transaction in FA that you would normally have imported from the remote db.
3. Take a second SQL Dump
4. Compare the changes from the first to the second SQL dump in an utility like WinMerge2
5. You can now see what tables have been affected: The sequence number table for the journal transactions, the transaction details itself, possibly some log tables that can rither be ignored or made to have a single entry that logs the summary of the whole import (when imported).

5,685

(5 replies, posted in FA Modifications)

If I understand your needs, you have an offline database table containing Journal Entries that need to be sucked into the FA system when it is used for the first time in a day (or in specific time period) or on demand.

This is easily achieved using a function that kicks in thru includes/main.inc.

You can also build a standalone script that reads what the remote journal entry last voucher number is and checks with the local FA system of last imported remote voucher number (reference number) to decide if an update is in order and does the import of the recent records only.

The standalone script can be scheduled to be exectuted at whatever frequency necessary thru a cron job.

If the remote journal entries exist in another FrontAccounting Server, then use any RESTful API like the SimpleAPI.

5,686

(5 replies, posted in FA Modifications)

Hooks and Hook Activate.

Read the /includes/hooks.class.inc file.

Extend / modify the hooks class in it to have pre-load, post-load functions and activate them in appropriate places in the header.inc / footer.inc files in the includes/page folder.

In fact the includes/pages/header.inc file includes a JS function in the body onload attribute passed thru the function page_header() 's parameter list and used in line 136.
access/logout.phpincludes/page/ and in includes/main.inc files only. The latter calls it in it's function page().

All other pages that call the page function generally use only the first parameter (page title), but in your pages of choice, you can include the other parameters. The primitive for usage can be taken from the function constructs in the files referred to above.

Please be specific about which version of FA you are using and on what platform (from the looks of your path, it appears to be some shared linux hosting).

I suggest you use the FA v2.3.13+ latest Mercurial Build available.

This might be possible natively in FA if the portion of the invoice that needs to go into an expense account be done using a secondary "Tax" for it and/or a quick entry be made for it.

You can use the 5 digit COAs.
Or start from scratch.

1. Make the old fiscal year as active year
2. Import the Journal Entries
3. Make a fresh Journal Entry for transferring all P&L Balances to the Profit and Loss Account so that the Balance Sheet will truly reflect the closing balances.
4. Close the Old Fiscal Year.
5. Do the same in order for all previous fiscal years and then the opening balance in the current fiscal year will be correct.

I am not a chartered accountant.

5,691

(4 replies, posted in Translations)

You have a choice of Arabic Fonts installable at:
https://frontaccounting.com/wbt/pages/download/download-release-2.3.php

Check the wiki for encodings, PDF settings, etc., at
https://frontaccounting.com/fawiki/index.php?n=Help.InstallUpdateLanugages

Good Luck.

Lines 64-70 of reporting/includes/class.pdf.inc are:

class Cpdf extends FPDI {

    function Cpdf($pageSize='A4', $lang=null, $pageOrientation='P')
    {
        $this->TCPDF($pageOrientation, 'pt', $pageSize);//, $uni, $enc);
        $this->SetLang($lang);
        $this->setPrintHeader(false);

Line 68 shows the declaration of size units as 'pt'.

Also the default $pageSize='A4' which should correctly be overridden by whatever declaration or setting is given at instantiation time. Hence check the various reports as to how a "new Cpdf" instance is created - whether the default isallowed to be assumed or it is passed on properly as a variable.

Lines 104-110 declare the encodings - see if they are an issue as well.

5,693

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

Will need a bit of work to get it fully working. Check the wiki link in my previous post for the current state.

A5 = half of A4

Line 4178 in reporting/includes/Workbook.php states:

Set the paper type. Ex. 1 = US Letter, 9 = A4

Line 1111 of reporting/includes/tcpdf.php has most paper formats listed.

Lines 94-210 of reporting/includes/pdf_report.inc has the currently used values for PDF A4 and Letter sizes - value in mm times 4 - as the smallest resolution available for print. The other values can be taken from the repgen project at sourceforge listed here for completeness:

$p_formate = array("A4"=>"595|842",
        "A3"=>"842|1190",
        "A5"=>"421|595",
        "4A0"=>"4767.87|6740.79",
        "2A0"=>"3370.39|4767.87",
        "A0"=>"2383.94|3370.39",
        "A1"=>"1683.94|3370.39",
        "A2"=>"1190.55|1683.78",
        "A6"=>"297.64|419.53",
        "A7"=>"209.76|297.64",
        "A8"=>"147.40|209.76",
        "A9"=>"104.88|147.40",
        "A10"=>"73.70|104.88",
        "B0"=>"2834.65|4008.19",
        "B1"=>"2004.09|2834.65",
        "B2"=>"1417.32|2004.09",
        "B3"=>"1000.63|1417.32",
        "B4"=>"708.66|1000.63",
        "B5"=>"498.90|708.66",
        "B6"=>"354.33|498.90",
        "B7"=>"249.45|354.33",
        "B8"=>"175.75|249.45",
        "B9"=>"124.72|175.75",
        "B10"=>"87.87|124.72",
        "C0"=>"2599.37|3676.54",
        "C1"=>"1836.85|2599.37",
        "C2"=>"1298.27|1836.85",
        "C3"=>"918.43|1298.27",
        "C4"=>"649.13|918.43",
        "C5"=>"459.21|649.13",
        "C6"=>"323.15|459.21",
        "C7"=>"229.61|323.15",
        "C8"=>"161.57|229.61",
        "C9"=>"113.39|161.57",
        "C10"=>"79.37|113.39",
        "LETTER"=>"612.00|792.00",
        "EXECUTIVE"=>"521.86|756.00",
        "LEGAL"=>"612.00|1008.00",
        "FOLIO"=>"612.00|936.00",
        "RA0"=>"2437.80|3458.27",
        "RA1"=>"1729.13|2437.80",
        "RA2"=>"1218.90|1729.13",
        "RA3"=>"864.57|1218.90",
        "RA4"=>"609.45|864.57",
        "SRA0"=>"2551.18|3628.35",
        "SRA1"=>"1814.17|2551.18",
        "SRA2"=>"1275.59|1814.17",
        "SRA3"=>"907.09|1275.59",
        "SRA4"=>"637.80|907.09"); // Paperformat 

Also have a look at line 66 in reporting/includes/class.pdf.inc.

5,695

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

Currently the following are observed:
1. Create new block works.
2. Create new function works and the code gets stored anew as the htmlentities version that is acceptable as long as no single quotes are used.
3. Test button in create new function does not work when any quote - single or double - are used. It works for any function with nothing after the function name - assuming that the function exists as part of some include(d) file.
4. Create new report results in only the report info, select and group entries being stored and the items and graphics are not stored nor are they editable - possible glitch due to db_query["BEGIN"] being used with no db_query["END"] but just a db_query["COMMIT"] assuming even that stored procedure / trigger rights are available for the MySQL user.
5. On the reports listing page, if we run any report, then subsequently all other buttons - Edit, Delete, Copy - also just run the reports.

Preliminary code reading / divining suggests that
1. some cache / globals parsing issue is involved in 5 above.
2. globals missing out on report id when passing to the strings and graphics page in 4 above. A mixture of POST and GET besides conflicting cleaning of GET and POST duplication efforts may be involved.
3. multiple escaping of quotes and / or php.ini settings different from the recommended ones being in use in some parts of the code in item 3 above for eval issues.

All Edit is done by deleting the existing record and inserting a new one in it's place - this can be more efficiently done using an update statement. "Update on insert fail" type of construct will fail as there is no primary key and the "where" can be ambiguous.

Wikied the above.

5,696

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

Moving further discussion on this topic to get report generator working fully to the new thread.

5,697

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

Attached here is the v2.3.13-1 version of the repgen Report Generator Extension incorporating corrections done so far.

Includes 2 fixes for the tab succeeding an "=" sign and preceeding a gettext translation "_("xxx").

Includes extra page sizes (but stays commented out) in the repgen.inc file

Fixed the manual.html for wrong link and removed the form tags in it.

reports.sql - cleaned up and organised by typ and id with standard delimiters with fields of double quote.

5,698

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

The following original sql statement from reports.sql:

INSERT INTO `xx_reports` (`id`, `typ`, `attrib`) VALUES
('F2', 'funct', 'atime|2007-09-21|Bauer|Actual Time|function atime() {return date("h:i a");}');

on editing the author field becomes:

INSERT INTO `xx_reports` (`id`, `typ`, `attrib`) VALUES 
('F2','funct','atime|2012-12-22|Joe|Actual Time|function atime() {return date(&quot,h:i a&quot,),}');

whereas it should have at worst been:

INSERT INTO `xx_reports` (`id`, `typ`, `attrib`) VALUES 
('F2','funct','atime|2012-12-22|Joe|Actual Time|function atime() {return date(\"h:i a\");}');

5,699

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

There are many statements like:

$query="INSERT INTO xx_reports VALUES ('".$id."','info','".$info."')";

in the repgen extension that need to be wary of single quotes getting into the strings like $info....

Thanks. It can wait till 2.3.14......