5,626

(16 replies, posted in Wish List)

Works in Adobe Acrobat Reader X
Works in the Browser plugin in MS IE 8 and FF 18.0
Works from Sumatra PDF Reader v2.2.1 - 2.5 MB

Please let me know which PDF Reader it did not work.

If the PayPal Link is necessary to be shown in full, maybe we can add a config variable (all companies) for it or a setup preference (sys_prefs) variable for it (per company basis). The patch contains the native way to populate a link in TCPDF with no dependency of FPDF parsers. The latest TCPDF also has ShotCodes, Extended barcodes / QCodes as well.

1. Backup v2.3.11 - SQL, config_db.php, config.php, installed_extensions.php lang/linstalled_languages.inc
2. Uninstall all extensions.
3. Backup SQL again along with the said files
4. rename the frontaccounting folder.
5. extract latest mercurial build onto new frontaccounting folder
6. install FA to another dummy db.
7. compare the saved files (config_db.php, config.php, installed_extensions.php lang/linstalled_languages.inc) with the currently installed ones and make changes to use the old db.
8. Login to the 0 company and go to Setup -> Software Upgrade and force an upgrade.

Post your php.ini file along with the output of:
uname -a
php -m

Better still, VNC your desktop which can be chrooted into your cloud server.

Report Generator extension is broken / unsafe for FA v2.3.13+

Thanks Joe, Mer Build 3136 fixes the login company field width.

5,629

(16 replies, posted in Wish List)

Lines 205 and 209 in the file reporting/includes/header2.inc attached in the previous post are both:

$this->row -= $this->lineHeight;

If the said lines are commented out, the blank line in the middle of the footer disappears.

Attached herein is the before and after picture set of an invoice.

Hope you have a pre-upgrade db backup and the original config.php file with you.
Expect it is a linux install.
Did you have any extensions installed?
What languages / locales are you using?
Have you tried one of the current mercurial builds available - like the one here?

PM me access details of server or VNC while you watch.

5,631

(16 replies, posted in Wish List)

Your Pretty Link is done!
Replace file reporting/includes/header2.inc with the one attached.

Yes, Joe, the fields can be spaced out intelligently - no need to scale columns like ID, Amount, and restrict scaling up from portrait to Landscape only for text fields

Also for Chris instance where his company name is quite long, the 30 character limit may not suffice - needs to be extended in atleast 2 files (for the non select textbox method as well):

access/login.inc -> Line 110
admin/create_coy.php Line 336
make maxlength from 30 to 50 atleast

Fixed this issue natively using TCPDF class base methods itself. Fully backwards compatible from TCPDF induction into FA onwards.

Patch for reporting/includes/header2.inc attached.
This patch is for current Mercurial Build 3135.

The function AddLink is defined in class TCPDF in line 2722 of reporting/includes/tcpdf.php.

This class TCPDF extended by class FPDF in reporting/includes/fpdi/fpdi2tcpdf_bridge.php .

The class FPDF is further extended by class FPDF_TPL in reporting/ncludes/fpdi/fpdf_tpl.php where the error override function AddLink is defined in Line 306 to redirect to it's namesake in the original grandparent class TCPDF.

FPDF_TPL is now extended by class FPDI in reporting/includes/fpdi/fpdi.php

There is no reference to the function addLink() in any of these classes (note case). The function addLink is used twice in reporting/includes/header2.inc :

Line 116:

$this->addLink($url, $c2col, $this->row, $mcol, $this->row + $this->lineHeight);

Line 202:   

$this->addLink($txt, $ccol, $this->row, $this->pageWidth - $this->rightMargin, $this->row + $this->lineHeight);

If we assume that it is a typo and correct it to AddLink, then the function description states that it is an internal link within the document only but our usage in FA is for external links which require the SetLink method of TCPDF.

Commenting out the said lines (tested commenting out line 202) results in no loss in functionality - the link is clickable in the PDF. This means that when any URL is sent to the TextWrap method that preceeded the addLink, it will intelligently be rendered clickable.

Which parameter is then to be used in setting the display text for the link if it needs to be other than the url?

5,635

(16 replies, posted in Wish List)

Obtained the backup sql of your system and am testing it out in an OpenVZ VPS - a sort of test ride  troubleshooting using it.

The changes from the stock FA v2.3.13 to the Mercurial Build now as far as the database is concerned is only the following statements (You are using company 0 with a table prefix of "f1_"):

# Default value is not '1' but blank
ALTER TABLE `f1_users` 
    CHANGE `print_profile` `print_profile` varchar(30)  COLLATE latin1_swedish_ci NOT NULL DEFAULT '' after `pos`;

# InnoDB needed for Foreign Keys - not mere unique key
ALTER TABLE `f1_tag_associations` 
    ADD PRIMARY KEY(`record_id`,`tag_id`), 
    DROP KEY `record_id`, ENGINE=InnoDB; 

ALTER TABLE `f1_tags` ENGINE=InnoDB; 

# New feature in Mercurial build needs it
INSERT INTO `f1_sys_prefs` VALUES ('bcc_email', 'setup.company', 'varchar', '100', NULL);

Typo in Company Name - Extraordinaire.

The config.php must be matched with the config.default.php to make up for the missing/changed entries. Stick to default themes for now till the other themes are updated to accommodate the changed function locations that affect the renderer.php in the older themes.

The choice of white background in your logo blends well with stock white paper invoice!
COA has Retained Earnings, Owner's Drawings and Owner's Equity in Owner's Capital type(7).

Working on the prettier link without having to change the code much.....

A working mercurial build is available for download here.

It is possibly easier than it appears.

The form input page can have a dropdown of various paper sizes - A4, Letter, etc.

The reports can remain the existing repXXX.php - no duplication is required.

The horizontal layout of the report for each page size for heading and detail can have their numbers in arrays - one of which is chosen based on the flag taken from form input data. In all other cases, where separate arrays are not available for different page sizes, the Landscape should be the same as the Portrait except that the longest field if any may be expanded to fill the slack space.

The Vertical Layout remains the same as long as the headers and detail elements add from the top and the footer elements subtract from the bottom and the page size determines the number of lines inbetween - that is all automatic in tcpdf used.

5,638

(9 replies, posted in Setup)

This happens when not rounding off as would occur in integer division. The only place in gl/includes/db/gl_db_trans.inc where such a calculation occurs is at line 360:

$net_amount = $amount/$tax['rate']*100;

What needs to be done is how the $dec is being used from the Page Preferences > Decimal Places > Prices/Amounts.

Each element is populated in the report only if the variable exists.
unsetting the "not required" elements of variable $this->company like $this->company['gst_no'] during report population and the setting it back would suffice.

As for number to words, use a function price_in_words() in your language locale.inc (this does not seem to be documented yet).

Price in words. $doc_type is set to document type and can be used to suppress
price in words printing for selected document types.
Used instead of built in simple english price_in_words() function.

The default function price_in_words() is defined in includes/ui/ui_view.inc and the default documents it is used in are when $document is any of ST_SUPPAYMENT / ST_CUSTPAYMENT / ST_CHEQUE

The actual number to words conversion is done in the function _number_to_words() in the same file.

Joe, this can be accommodated using a flag in the form data input - Report Mode -> Portrait / Landscape.
Also hope the numbers pertain to A4 as well.

Date functions use date subtraction and date intervals usually. Hence the PHP/Apache TimeZone in general is assumed to match the MySQL TimeZone setting. I have not had the time as yet to look into the exact code and why this occurs and if it is an exception for your environment.

As for the Mercurial Build, it is advisable to work on a clone of the earlier db and try Setup -> SoftwareUpgrade. Alternatively on a new database and mercurial build, try with the demo data.

Actually, just create one sales person and one customer or keep the class teacher or principal or bursar as the sales person. Assign the one sales person to the one customer. See what tables get updated and then do a bulk sql import for all students! It should be a one time initial import only - thereafter each new student comes one at a time - so it's okay - and then repeat for each new intake batch of students. Similarly for tax s well in the same sql import.

5,643

(16 replies, posted in Wish List)

If the only usage is a pdf that will be emailed or seen in a browser, then the shortened text with the hyperlink beneath it would have been okay.

The reason that is expanded in full is that in a printout the URL is not clickable!

Please try replacing Lines 1350-1355 in includes/ui/ui_view.inc for your requirement (inspite of reason listed) with:

if (!isset($payment_services))
{
    $payment_services = array(
        'PayPal' => "<a href='https://www.paypal.com/xclick/business=<company_email>&item_name=<comment>&amount=<amount>&currency_code=<currency>'>Payment Link</a>",
    );
}

Line 259 in file reporting/includes/doctext.inc:

$Footer[_("You can pay through"). " $service: "] = "$url";

and Line 1014 in file reporting/includes/pdf_report.inc:

$msg.= _("You can pay through"). " $service: $url\n\n";

are used to display the assembled $url string.

BTW: your screenshot was http and not https and yes, upload rights are controlled by the board admin.

Please note that both Inventory Planning Report and Inventory Purchasing Report use the Alt-P keyboard shortcut in the current codebase as of Mercurial Build 3133.

Also the report details exceed the headings on the right side. Attached screenshot.

Set the Help URL in FA to see context sensitive help and mirror the wiki locally for minimizing bandwidth usage.
Or else, PDF the Wiki.

Wikied it.

Make a PDF of the pages in the Wiki

5,648

(16 replies, posted in Wish List)

Lines 1350-1355 in includes/ui/ui_view.inc:

if (!isset($payment_services))
{
    $payment_services = array(
        'PayPal' => "https://www.paypal.com/xclick/business=<company_email>&item_name=<comment>&amount=<amount>&currency_code=<currency>",
    );
}

What do you mean by that "it appears at the bottom" ? - a screenshot would be nice.

Is the server date/timezone affecting the issue?

Want to try it out in the later Mercurial build ?

Copy the respective php pages and rename them and link them into the menu after editing the permission roles in them and then assign the role to the restricted user.