2,751

(5 replies, posted in Announcements)

As the FrontAccounting forum is community managed and driven, please use it diligently and with care. Whilst every effort is taken to ban advertising and undesirable SEO activities, it is incumbent on the user fraternity to report any

1. irrelevant posts,
2. duplicate postings and
3. postings in old threads with seemingly relevant matter often taken from other valid posts.

All of these and others not listed here introduce needless complexity and waste of human resources in moderating the board. Attempting to maintain a Hall of Shame would be an additional waste of resources.

When posting issues, please list

1. version numbers of Platform OS, Browser, PHP, MySQL, Webserver, plugins, upgrade path and locale among others as necessary
2. relevant Menu Navigation sequences,
3. screenshots appropriately annotated (host the images/documents anywhere - flickr, dropbox, etc) and linked into the posts,
4. use BBCode to format your posts

@karl1234: good work!

Committed.

FA 2.3.x not affected.

2,753

(8 replies, posted in Accounts Payable)

Try smaller numbers first and see when the error occurs. You should not exhaust the floating point precision of your variable.

This is a PHP issue:

$a = 31975454.54545400;
$b = 3197545.45454540;

echo $a+$b;

// Outputs: 35172999.999999

What is the value of precision in your php.ini file?
Increase it and see what happens.

Increasing it from 14 to 17 in PHP 5.3.3 on 32 bit XAMPP:

$a = 31975454.54545400;
$b = 3197545.45454540;

echo $a+$b;

// Outputs 35172999.999999397

This might do the job.

In the code, it can be dynamically set as well:

ini_set('precision', 17);

2,754

(13 replies, posted in FA Modifications)

Thanks @joe.
Committed

2,755

(3 replies, posted in Banking and General Ledger)

There is no 1100 in your image.
If you want an amount in words, then you will have to use the locale script to get it. The template is available in lang/new_language_template/locale.inc. Translate and use in your language folder.

If you want the hint "View this transaction" when you hover on the Trans# link, then add the attribute title="View this transaction" to the link's anchor <a ....> tag.

Kindly take professional assistance on the Job board from someone who understands your language.

2,756

(1 replies, posted in Jobs wanted/offered, non-free offers)

Set default printer in AndroidPOS device and print from the browser UI in the Android device itself. Some may also come with the web interface API.

Esc/POS Print Driver for PHP

2,757

(3 replies, posted in Banking and General Ledger)

It is already present.

There is certainly no decimals issue in using all hard currencies and the SA Rand.

Posting as Guest has been hopefully disabled by now.

The kit is formed in Assembly like a bunch of items sold together as a pack. It will have another Stock ID as well and hence placing them in stock should be no issue.

Items and Inventory => Sales Kits

@joe: Does this warrant a check? Assign the first post in this thread to user: @karl1234. (done)

It appears that your email id is not available and your credentials are wrong. Kindly contact the board admin (@joe) for account validation.

Sell the Necklace as a Kit of 2 items - a sort of package.

The window size of F2, F3, F4 search pages need to be expanded to adjust to the larger layout.
It is very slow to load.

The HTML page output and it's assets sizes are 109KB and 464KB respectively for your theme.
The standard default FA 2.4.2 theme equivalents are 15.9KB and 58.2 B respectively.

Tough convincing any serious accountant to accept such a bloat for visual eye candy.

It appears that third party extensions are not allowed an extension number in FA. The code is used in function local_extension() in admin/inst_module.php. The function handle_delete() in the same file refers to the version not being a hyphen for a standard uninstall.

2,762

(13 replies, posted in FA Modifications)

It will need an earlier separate traversal into another array.....
Or make it appear only in the Summary report.

2,763

(13 replies, posted in FA Modifications)

Before and After Screenshots attached.

2,764

(13 replies, posted in FA Modifications)

The file at gl/inquiry/gl_trial_balance.php is sought to be altered using the essential diff as:

--- gl/inquiry/gl_trial_balance.php    Thu Nov 12 03:19:51 2015
+++ gl/inquiry/gl_trial_balance.php    Wed Aug 30 15:59:57 2017
@@ -84,6 +84,16 @@
         $begin = $_POST['TransFromDate'];
     $begin = add_days($begin, -1);
 
+    $Apdeb=$pdeb;
+    $Apcre=$pcre;
+    $Acdeb=$cdeb;
+    $Accre=$ccre;
+    $Atdeb=$tdeb;
+    $Atcre=$tcre;
+    $Apbal=$pbal;
+    $Acbal=$cbal;
+    $Atbal=$tbal;
+
     while ($account = db_fetch($accounts))
     {
         //Print Type Title if it has atleast one non-zero account    
@@ -157,6 +167,29 @@
 
         }
         display_trial_balance($accounttype["id"], $accounttype["name"].' ('.$typename.')');
+    }
+
+    if (!check_value('Balance'))
+    {
+        start_row("class='inquirybg' style='font-weight:bold'");
+        label_cell(_("Total") ." - ".$typename, "colspan=2");
+
+        amount_cell($pdeb-$Apdeb );
+        amount_cell($pcre-$Apcre);
+        amount_cell($cdeb-$Acdeb );
+        amount_cell($ccre-$Accre );
+        amount_cell($tdeb-$Atdeb );
+        amount_cell($tcre-$Atcre);
+        end_row();
+    }
+    else
+    {
+    start_row("class='inquirybg' style='font-weight:bold'");
+    label_cell(_("Total") ." - ".$typename , "colspan=2");
+    display_debit_or_credit_cells($pbal-$Apbal);
+    display_debit_or_credit_cells($cbal-$Acbal );
+    display_debit_or_credit_cells($tbal-$Atbal);
+    end_row();
     }
 }
 

@joe: want to include this in the core?
The attachment has a few whitespace fixes as well.

2,765

(27 replies, posted in Banking and General Ledger)

Here is a tedious way of troubleshooting it.
Turn on all debug including select in sql trail in the config file.
Insert the troubleshooting code at each place in the FA scripts sequentially to inspect where the error comes in.
Sample troubleshooting code:

$log_output = "\n\n Start dump of all variables \n\n" . print_r(get_defined_vars(),true) . "\n\n";
file_put_contents('D:/XAMPP/htdocs/fa24/tmp/log_file.txt', $log_output, FILE_APPEND);

2,766

(1 replies, posted in Report Bugs here)

When viewing an old / existing quote, the Reference Number must be taken from the table record and not the next one.

1. In file sales/view/view_sales_order.php line 42:

$_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no'], true);

should be replaced with

$_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no']);

as the last parameter in the Cart class (defined in sales/includes/class_cart.inc) constructor is for determining if a new Reference is to be taken or an existing one is to be used. This is how it is in FA 2.3.26 where the last parameter if false is omitted as that is the default for the constructor..

2. The leading semicolon (;) on line 96 can be removed as well in the same file.

3. The line 24 in the Cart class file sales/includes/class_cart.inc:

class cart

can be corrected to

class Cart

as it is used that way in all the scripts and in the extensions.

@joe: can commit this. - Committed

To replace line 206 in reporting/rep101.php:

            if ($no_zeros && floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0) continue;

with

if ($no_zeros) {
    if ($show_balance) {
        if ($trans['TotalAmount']== 0) continue;
    } else {
        if (floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0)) continue;
    }
}

@joe: want to commit it?
Committed

2,768

(8 replies, posted in Accounts Payable)

Try to see if the latest debian based php version solves your issue.
Check out MariaDB as well.

The easiest way is for you to use the companys' default base home currency as IDR and work from there using standard 8 decimal places for exchange rates and 2 decimals for prices/amounts.

You can play around with the constant FLOAT_COMP_DELTA defined in current_user.inc which is by default set at 0.004. Checkout the function round2() and number_format2() on the use of the value +/- .0000000001 in the same file.

Also see if you can use a larger unit for items to get meaningful rates per unit.

Try 8 decimal places for Exchange Rates and 0 or 2 decimal places for Prices/Amounts.

Any upgrade will require the first login to be admin on the default company. Thereafter, a login as admin for each company will be in order. The value of the version_id in the sys_prefs table must be 2.4.1 as of now - that is the current database schema version.

1. Take a backup of the database for all companies individually before any upgrade.
2. All v2.3.x installations must first upgrade to the v2.3.26 version even if there is no db change necessary.
3. Take a backup of each company individually again now.
4. Then make sure all is well by checking out the various company instances.
5. Take note of non FA tables and tables belonging to various FA Extensions and the changes in the tables some extensions may have made.
6. Make a clean FA 2.4 installation and use it in the following steps.
7. Create each company manually with the standard en_US.sql in the FA 2.4.x install.
8. Import the FA 2.3.26 backup from step 3 above for every non default company (assuming your default company is just a dummy one)
9. Login as admin into each upgraded company and verify that the software upgrade shows as having been done.
10. Copy over the company folder image and custom reports assets into the new installation.
11. Now install your extensions and verify they work and tweak their tables and changes as needed.
12. Any custom code / tables / schema mods you may have done in 2.3.x must then be ported professionally.

The final fix for this would be to replace the following lines in inventory/manage/items.php:

        submit_center_first('addupdate', _("Update Item"), '', 
            $page_nested ? true : 'default');
        submit_return('select', get_post('stock_id'), 
            _("Select this items and return to document entry."), 'default');

with

        if (@$_REQUEST['popup']) hidden('popup', 1);
        submit_center_first('addupdate', _("Update Item"), '', 
            $page_nested ? true : 'default');
        submit_return('select', get_post('stock_id'), 
            _("Select this items and return to document entry."));

@joe: you can commit this now.
Committed

The function submit_return() defined in includes/ui/ui_input.inc takes in 3 arguments but it's usage in inventory/manage/items.php shows 4 arguments. The last one in it can be omitted.

Please note that it's usage in items.php when F4 is invoked (or independantly invoked as in http://localhost/fa24//inventory/manage/items.php?stock_id=101&popup=1) hides the "Select" button on item change in drop down box or on update. This needs to be rectified. This is because when first invoked, the GET parameter popup=1 is available. On subsequent ajax and other posts, it is not available and the conditional submit() in the submit_return() blanks it out.

The actual Items Select button html is:

<button 
        class="ajaxsubmit"
        type="submit" 
        aspect="selector" rel="101"
        name="select" 
         id="select" 
        value="Select" 
        title="Select this items and return to document entry.">
    <img height="12" 
         alt="" 
         src="../../themes/default/images/ok.gif">
    <span>Select</span>
</button>

2,772

(19 replies, posted in Report Bugs here)

Only some Sales Quotes have the original Quote Date editable whilst others do not. Also when the Customer name, Branch, Valid Till Date and Payment Terms are changed, the reference value shown in the View Sales Quote page reverts to the first number in the template but the database entries and Print Sales Quote are okay.

2,773

(19 replies, posted in Report Bugs here)

Make sure that the company folder and all it's subfolders are writeable by the web server owner.

To enlarge the F2 screen for customers replace Line 506 in includes/ui/ui_controls.inc from

        113,    _("Customers"), 900, 500),

with

        113,    _("Customers"), 900, 600),

@joe: can commit this.
Committed

Why are we sprinkling variable and array assignments in files that otherwise contain functions only?

2,774

(19 replies, posted in Report Bugs here)

There is no way to extend / change the validity end date of a quotation for cash only quotes.

2,775

(19 replies, posted in Report Bugs here)

After applying @itronics update:

Fiscal years 2016 and 2017 are open.
Company is set to Fiscal Year 2016.
3 Quotes - Nos. 1,2,3 are created in 2017 fiscal year.
1 Quote - No. 4 is created in 2016 fiscal year now during Aug 2017.

The View Quote shows the reference as 004/2016 whereas it should be 001/2016 which it is in the refs table.
The Print Quote shows 001/2016 as the Quote No (reference) in the header and in the middle, it shows Quotation No. 4.

These need to be fixed as well.