526

(6 replies, posted in Announcements)

This is really very cool and good tutorials. Those who are seeking alternative tutorial for FA.  They can follow this. @joe just update the wiki with third party tutorials link.

527

(6 replies, posted in Announcements)

That's nice to hear.

Is it developer tutorials ?

or

Is it user Tutorials ?

And is it covering all the country wide examples ?.

Describe more about the tutorial topics.  So users can get  idea of how it would be going to help them.

Without php knowledge it's hard for you to do this update successfully. So check with the person who helped you initially or find someone from the forum and make him to update it for you. 

Always keep backup before make changes.

529

(3 replies, posted in Reporting)

Good to hear it.

Sorry i have not brought this code online sofar. Let me takeout the Batch codes alone from batch with expiry and bring it online with my version of FA along with it.  Because all of my codes are customized inside code and also made some changes in core of FA.

531

(3 replies, posted in Reporting)

Within the rep203.php file. you need to change something to get it.

function getTransactions($supplier, $date)
{
    $date = date2sql($date);
    $dec = user_price_dec();

    $sql = "SELECT  supp_reference, tran_date, due_date, trans_no, type, rate,
            (ABS( ov_amount) + ABS( ov_gst) -  alloc) AS Balance,
            (ABS( ov_amount) + ABS( ov_gst) ) AS TranTotal
        FROM ".TB_PREF."supp_trans
        WHERE  supplier_id = '$supplier'
        AND ROUND(ABS( ov_amount),$dec) + ROUND(ABS( ov_gst),$dec) - 
        ROUND( alloc,$dec) != 0
        AND  tran_date <='$date'
        ORDER BY  type,
             trans_no";

    return db_query($sql, "No transactions were returned");
}

Here you need to add some  changes.

 
function getTransactions($supplier, $date)
{
    $date = date2sql($date);
    $dec = user_price_dec();

    $sql = "SELECT  reference AS supp_reference, tran_date, due_date, trans_no, type, rate,   // Here I have modified to make the reference as supp_reference
            (ABS( ov_amount) + ABS( ov_gst) -  alloc) AS Balance,
            (ABS( ov_amount) + ABS( ov_gst) ) AS TranTotal
        FROM ".TB_PREF."supp_trans
        WHERE  supplier_id = '$supplier'
        AND ROUND(ABS( ov_amount),$dec) + ROUND(ABS( ov_gst),$dec) - 
        ROUND( alloc,$dec) != 0
        AND  tran_date <='$date'
        ORDER BY tran_date,  type,   // New Order by Here with tran_date
             trans_no";

    return db_query($sql, "No transactions were returned");
}

Let's get clients feedback before move on with it. I heard it was no more and no further alternative to use it.

533

(27 replies, posted in Installation)

good to hear it.

Hello,

Your PHP version must be 7.4. From this version the get_magic_quotes_gpc was deprecated. And there is no alternative to use it. So lets take out the code and make it work on. This function available inside session.inc and isession.inc.

function strip_quotes($data)
{
    if(get_magic_quotes_gpc()) {
        if(is_array($data)) {
            foreach($data as $k => $v) {
                $data[$k] = strip_quotes($data[$k]);
            }
            return $data;
        } else
            return stripslashes($data);
    }
   
}

And just remove the if condition like this

function strip_quotes($data)
{
        if(is_array($data)) {
            foreach($data as $k => $v) {
                $data[$k] = strip_quotes($data[$k]);
            }
           return $data;
        } else
            return stripslashes($data);
    
    
}

.

Hope it will fix your problem to work on.  if its fixed just reply to this conversation, @joe will update to the core.

Sure. Drop your suggestions and results here.

The drop down is a nice one to change it to other tax types. 

As i thinking we need one column in them. But try it without making a column. if it works fine. we dont need to make a column to save it. I worked with item tax types a bit back. so i am not sure for the new column in them.  Just bring the item tax types drop down in cart and process an order and try to view it.  and you can compare the rates to get it .

Let me give you a way to do this. From the sales cart table let's add a column item tax type as header. And within it. Let's put a checkbox. The checkbox should be checked by default ( mark of item tax type selected).  If we uncheck it. The item tax should be exempted. Here the functionality is complex. We have to pass this checkbox value to tax calculations and modify it.

But there is one thing I am not sure to bring.  After we created the invoice, order or quote. As we are calling the tax calculations again to get it. Like on sales order view page we call the tax calculations again and get the values. In this case, we need to create  a column in debtors_trans_details and sales_order_details.

538

(27 replies, posted in Installation)

Looks like full mess up with your existing database. Because it looks like the database already has the columns what we introduced new in the version 2.4 in your 2.3.26.  So it looks like some of the db changes you have already done. That's giving trouble now.

My way for you to fix it.

1. Just export the exact database you have in 2.3.26 and keep it.
2. Download a new version 2.4.8 and extract it in separate directory.  And from the files, open FA  directory/sql/en_US-new.sql
3. Use a version comparison software and compare  both sql files.  And bring the missing changes to your existing version and which will help you to fix the problem.

Note: You need some sql query knowledge to fix it. 

The other way is edit the alter2.4.php and alter2.4.sql files inside sql directory.   With that you can remove the changes of duplicate fields. And try again to update.

Looks like we don't need to get global customer id for sales orders view page.  We need to get the customer id for the same sales order. Not the global customer id.

540

(10 replies, posted in FA Modifications)

@joe  , do the needful with core update

There is no developer documentation available  to help you.

If you are interested. You can read my article to understand the basic to start making module.
https://www.kvcodes.com/2014/01/how-to-create-modules-for-frontaccounting/

542

(10 replies, posted in FA Modifications)

Just post the modified code. @joe will add it to core and put it for other users benefit

543

(7 replies, posted in Installation)

Just tell them. Their hosting does not store the sessions due to permission problem server. Just show them the errors and tell them. These errors are not because of the software. It happened with their hosted server permissions. Not the software files.

544

(7 replies, posted in Installation)

Looks like the directory permissions of /var/ is not right. You need to set the permissions to allow. Is it root server or cpanel based server.

If it's root server you can do that with help of terminal.

For the cpanel based server check with hosting provider to set the permissions for you to continue.

No. My suggestion is to get the file from module. Not allowing end users to input into it. Or upload into the system. 

And also I just figured out. The find_custom_file function get the module files too. So we can ignore the  changes what I suggested.

@apmuthu -  For custom header changes, we are allowing to collect from forms directory. And i am trying to bring the same feature to modules directory. I can't understand your point, How it will cause security issues.

@joe - If you think its not good practice, than lets takeout the forms directory and form files support in pdf_report.inc

We are allowing to connect custom reports. If it's giving security issues. That will also give security problems

There is a small change in the core of pdf_report.inc will  give us a good way to add template form from the module itself.

from the reporting/includes/pdf_report.inc:

function NewPage() 
    {
        global $installed_extensions, $path_to_root;
    
    
        if ($this->pageNumber==0)
        {
            // check if there is pdf header template for this report
            // and set if it is found
            $tmpl_pdf = find_custom_file("/reporting/forms/".$this->headerTmpl.".pdf");
            if ($tmpl_pdf) {
                $this->tmplSize = $this->setSourceFile($tmpl_pdf);
            } else {
                // include reports installed inside extension modules
                if (count($installed_extensions) > 0)
                {
                    $extensions = $installed_extensions;
                    foreach ($extensions as $ext)
                        if (($ext['active'] && $ext['type'] == 'extension')) {
                            $tmpl_pdf = find_custom_file($path_to_root.'/'.$ext['path']."/reporting/forms/".$this->headerTmpl.".pdf");
                            if ($tmpl_pdf) {
                                $this->tmplSize = $this->setSourceFile($tmpl_pdf);
                            }
                        }
                }
            }
        }

        $this->pageNumber++;
        parent::newPage();

        if ($this->tmplSize) {
            $this->row = $this->pageHeight - $this->topMargin; // reset row
            $id = $this->importPage(min($this->pageNumber, $this->tmplSize));
            $this->useTemplate($id);
        }

        // include related php file if any
        $tmpl_php = find_custom_file("/reporting/forms/".$this->headerTmpl.".php");
        if ($tmpl_php) {
            include($tmpl_php);
        }  else {
                // include reports installed inside extension modules
                if (count($installed_extensions) > 0)
                {
                    $extensions = $installed_extensions;
                    foreach ($extensions as $ext)
                        if (($ext['active'] && $ext['type'] == 'extension')) {
                            $tmpl_php = find_custom_file($path_to_root.'/'.$ext['path']."/reporting/forms/".$this->headerTmpl.".php");
                            if ($tmpl_php) {
                                $this->tmplSize = $this->setSourceFile($tmpl_php);
                            }
                        }
                }
            }

        if (method_exists($this, $this->headerTmpl))    // draw predefined page layout if any
            $this->{$this->headerTmpl}();
    }

This would help us to hook from the modules template to work on.

This is a good feature.

You can create it. But you need to make an option in the destination and follow it to make program to open it in html view