@apmuthu.

Please make another test. I have uploaded another ex. Ok here in Safari, Chrome, Firefox, IE and Microsoft Edge.

If not, please state your equipment. Thanks in advance.

Joe

Hello again Guys,

I have uploaded 3 new themes that are based on flat simple colors and flat icons from flaticons.net. They have many good icons and it is easy to color the icons before downloading.

The Default2 theme, is mirroring the Default theme, but it has gone a major update.

The Flatcolor Theme is a new theme, also with flat colors. A horizontal menu at the top and a module menu dropdown.

The third, Flatcolor2 is with a sidebar accordion menu, that can be expanded and taken away with the Menu sign above the sidebar. This could be a candidate outside the defaults.

They all need a little fine tuning but please give your comments.

Did you improve yours a bit, @kvvaradha. I also guess that @notrinos has one coming. Exiting!

The url is:

https://frontaccounting.com/fa24test

User: testing
Pass: password

The testing user is only allowed to make queries.

/Joe

This has been fixed and committed to stable repo. Thanks @notrinos.

The fixed file can be downloaded here.

/Joe

@kvvaradha.

A good theme, however I think the icons are a little too black and dominating. I would prefer a color of #333 or #444.
The grey section at the top is too height. It is difficult to have all the menu info on screen without scrolling.
But this can be fixed.
At the same time I have also been working on a couple of themes, one of them could also be in the standard themes. I will publish them in a couple of days.
But thank you for doing this.

/Joe

Hello @kvvaradha

This has been fixed And I have sent it to Janusz and asked him to upload it to the extension repo.

Thank you for finding this issue. And a Happy New Year to you and the rest of the members.

/Joe

Ok, this is an extension report, but I will have a look at it.

Joe

607

(2 replies, posted in Announcements)

Announcement

This is a 2.4.6 release, which is mainly bugfix release, but also contains a couple of improvements (see below for details).
In this release some sql injection vulnerabilities were fixed. Please feel encouraged to update as soon as possible,
especially if your FrontAccounting site is publicly available or runs in untrusted environment.

Please report any bugs/problems found via our Mantis Bugtracker at http://mantis.frontaccounting.com.

Download instructions

In Sourceforge FrontAccounting (https:/sourceforge.net/projects/frontaccounting), select
Files -> FrontAccounting 2.4 ->2.4.6.

For Windows users select the zip file. For all other users select the tar.gz file.

Common

  • Fixed Bug in count_array(), /includes/ui/ui_globals.inc.

  • Fixed a non well formed numeric value encountered rep102.php and rep202.php when running php 7.2.

  • New reliable currency rate provider, EXCHANGE-RATES.ORG added as default.

  • No exchange rate was working in FA now. Fixed ECB, CCA and EXCHANGE-RATES.ORG. More fixes to come.

  • Attach Documents: fixed SQL injection vulnerability.

Sales

  • Pressing the Batch button in Invoice against Deliveries got a missing indexes. Fixed.

  • Credit Notes were never seen in View Sales Order. Fixed.

  • Bug 4796: Entering customer payment with a bank charge equal to the total amount results in database error. Fixed.

  • Added new report, Customer Trial Balance.

Purchasing

  • Added new report, Supplier Trial Balance.

Items and Inventory

  • Report Stock Check Sheet is now testing for valid barcodes of EAN, EAN-8, EAN-13, GTIN-8, GTIN-12, GTIN-14, UPC,
    UPC-12 coupon code, JAN if 'Using Barcodes' is enabled. More test to come later

Bank and General Ledger

  • Changed Journal # to GL # in GL Trans View. This was a little confusing.

  • Bug 4811: magnifying glass select on deposits/payments erroneously shows bank account gl accounts. Fixed.

  • Bug 4821: banking overdraft message had php errors. Fixed.

We have now established a Barcode Checker for the following types:

EAN, EAN-8, EAN-13, GTIN-8, GTIN-12, GTIN-14, UPC, UPC-12 coupon code, JAN 

This will be committed in a while.
If we later find som further testing of barcode types we will add these as well.

/Joe

We don't have a $type when calling is_valid_barcode.

I have been trying this:

function is_valid_barcode($code)
{
    $types = array("EAN2", "EAN5", "EAN8", "EAN13", "UPCA", "UPCE", "C39", "C39+", "C39E", "C39E+", "I25", 
        "C128A", "C128B", "C128C", "POSTNET", "CODABAR");

    foreach ($types as $type)
    {
        if (substr($type, 0, 3) === "EAN" || substr($type, 0, 3) == "UPC")
        {
            if (!preg_match("/^[0-9]+$/", $code))
                continue;
        }        
           $barcode = new TCPDFBarcode($code, $type);
        $chk = $barcode->getBarcodeArray();
        if ($chk !== false)
            return true;
    }
    return false;
}

But if alphanumerical characters it is still testing. It shouldn't if EAN of UPC. Please try it.

Maybe I have overseen something, so please help.

/Joe

No, I couldn't get it to work. So I will have to leave it as is.

/Joe

Maybe we can use the class TCPDFBarcode in /reporting/includes/barcodes.php för testing of valid barcodes. I will give it a try.

Joe

Or this one. Taken from PHP Classes.  It is a class, but I extracted the function.

<?php
/* Check length of barcode for validity via the checkdigit calculation
 * We split the barcode into it's constituent digits, offset them into the GTIN
 * calculation tuple (x1, x3, x1, x3, x1, etc, etc), multiply the digits and add
 * them together, then modulo them on 10, and you get the calculated check digit.
 * For more information see GS1 website: https://www.gs1.org/check-digit-calculator
 * @param string gtin
 * @return bool */
function Checkgtin($gtin) 
{
    /* Checks the length of the GTIN
     * @param string gtin
     * @return bool */
    // Check length is ok
    if (strlen($gtin) < 8 || strlen($gtin) > 14)
        return false;

    // Check whether is a number
    preg_match("/\d+/", $gtin, $m, PREG_OFFSET_CAPTURE, 0);
    if (empty($m))
        return false;

    // Define fixed variables
    $CheckDigitArray = [];
    $gtinMaths = [3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3];
    $modifier = 17 - (strlen($gtin) - 1);  // Gets the position to place first digit in array
    $gtinCheckDigit = substr($gtin, -1); // Get provided check digit
    $BarcodeArray = str_split($gtin);  // Split barcode at each digit into array
    $gtinLength = strlen($gtin);
    $tmpCheckDigit = 0;
    $tmpCheckSum = 0;
    $tmpMath = 0;

    // Run through and put digits into multiplication table
    for ($i = 0; $i < ($gtinLength - 1); $i++) {
        $CheckDigitArray[$modifier + $i] = $BarcodeArray[$i];  // Add barcode digits to Multiplication Table
    }

    // Calculate "Sum" of barcode digits
    for ($i = $modifier; $i < 17; $i++) {
        $tmpCheckSum += ($CheckDigitArray[$i] * $gtinMaths[$i]);
    }

    // Difference from Rounded-Up-To-Nearest-10 - Fianl Check Digit Calculation
    $tmpCheckDigit = (ceil($tmpCheckSum / 10) * 10) - $tmpCheckSum;

    // Check if last digit is same as calculated check digit
    if ($gtinCheckDigit == $tmpCheckDigit)
        return true;
    return false;
}
  
$gtin = "00abcd";
if (Checkgtin($gtin))
    echo "$gtin is ok<br />";
else    
    echo "$gtin is NOT ok<br />";

/Joe

I found this class for Barcode validation on github. Maybe we could extract a function or use the class for validation:

Barcode validator.

I wonder if this could be used.

/Joe

614

(11 replies, posted in Reporting)

A couple of minor issues are fixed in the rep115.php and rep206. The no_zeroes parameter didn't work and some parameters were missing in the rep115.php report. The files are committed to repo and you can re-download them a bit up.

We are not glad for the Copyright notice in the beginning of the 2 files. We are going to change our copyright to be FrontAccounting Team from next major 2.5. In the readme.md files we are going to present the active developers in the FrontAccounting Team.
For now I have changed the Copyright to FrontAccounting Team for the 2 files.
A bit down there are a field called 'Creator'. We will use that field for the Team Member that have created the file.
I hope you are ok with this, @boxygen.

/Joe

615

(11 replies, posted in Reporting)

The 2 reports has been added to core and are committed.

You can download the 3 files
/reporting/rep115.php
/reporting/rep206.php
/reporting/reports_main.php

/Joe

616

(11 replies, posted in Reporting)

wow, you are my man, @boxygen.

Will incorporate this as well. will be committed later this afternoon.

/Joe

@boxygen,

Yes, i agree. I am just waiting for @notrinos suggestions about what to change in the core to help modularizing the Dashboard.

@boxygen, @notrinos and @apmuthu.

Thank you for your creative coop in this and other matters.

/Joe

618

(11 replies, posted in Reporting)

Hi @boxygen,

This is a nice and productive report. Let me incorporate this in the core.
Maybe a good idea to also make a Supplier Trial Balance, right?

/Joe

The 3 Providers, ECB, CCA and EXCHANGE-RATES.ORG is working now and the /gl/includes/db/gl_db_rates.inc is committed as well as config.default.php.
They can be downloaded here and here.

Please copy the $xr_providers array from config.default.php to your config.php.

/Joe

Hello @notrinos

I got the following errors when using

Yahoo
Undefined offset: 1 in file: C:\wamp3\www\account24\gl\includes\db\gl_db_rates.inc at line 228
Google
Cannot retrieve exchange rate for currency GBP. Please adjust approximate rate if needed.
Bloomberg
Cannot retrieve exchange rate for currency GBP. Please adjust approximate rate if needed.

I think we could just commit it. The 3 first providers works OK. We can then investigate further on the others, right?

/Joe

Sure @notrinos. Thanks for the investigation.

I will just test them all and commit them later.

/Joe

Hello @boxygen,

Your code for CCA doesn't work. It gives no rates. Will you give it a check, please? Thanks.

/Joe

Hello @apmuthu,

Yes I will include your fix and @boxygen's provider in FA later this evening.

Joe

Hello Guys,

I have now been in contact with Janusz and he has explained the implementation.

The Journal # in GL trans view is a column for transactions that are closed by 'Closing GL Transactions' in Banking & General Ledger.
We have changed the column header to GL #. It will show 'None' for inside a non closing period and a serial number for inside a closing period.

Some small adjustments have been done. Committed to Repo.

File /includes/ui/ui_view.inc can be downloaded here
File /gl/view/gl_trans_view.php can be downloaded here
File /gl/inquiry/journal_inquiry.php can be downloaded here.

Joe

This seems to be reliable and has been included in FA. Committed to stable repo. Thanks @notrinos.

new file: config-default.php can be downloaded here. (trailing tab in affected line to be fixed later)
new file: /gl/includes/db/gl_db_rates.inc can be downloaded here.

Joe