Oh, that must be !!! I'm using a customized theme, maybe my render file is not working properly according to the new version, I'll trace this issue in this way. Thanks a lo Janusz!

The file includes/packages.inc line 190 contains:
   

display_error(_("No key field '$index' in file '$file'"));

Should be:
   

display_error(sprintf( _("No key field '%s' in file '%s'"), $index, $file) );

   
   
The file gl/includes/db/gl_db_rates.inc line 128 contains:
   

display_warning(_("Cannot retrieve currency rate from $provider page. Please set the rate manually."));

Should be:
   

display_warning(sprintf(_("Cannot retrieve currency rate from %s page. Please set the rate manually."), $provider));

   
   
The file includes/access_levels.inc line 69 contains:
   

SS_MANUF => _("Manufacturing transations"),

Should be
   

SS_MANUF => _("Manufacturing transactions"),

I already did it. And I had found this behavior.
I had put error_log() calls in my hooks.php file and this is how I notice that the init funtion was not called when you enter a link inside a tab (it does when you click on a tab).

Do you have this behavior also or this does not happend to you ?
Are you using 2.3.1 ?

4

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

Answer to my question:
Yes, you have to create the report an place it into modules/xxx/reporting
The function find_custom_file in main.inc search in this order:
1) report in the company folder
2) report in one extension (the first found is the first used)
3) standar file

Oh, please dismiss the spanish translation, this is not a problem about languages or locales.

6

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

In the old extension system you can replace a report by creating the reporting folder and the report number, like "report/rep107.php"

In 2.3, is there any way to do it ?

7

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

Hi! do you experimented this issue ?
https://frontaccounting.com/punbb/viewtopic.php?pid=8289

I have an extension like yours and I have my tab missed when I enter to a link in any tab.

Hi there! I'm working with FA 2.3.1 and I have found a strange behavior with extensions.

When I enter to one tab or login my created tab is visible without a problem.
If I enter to a link (Setup/Company Setup) then the tab dissapears (there is no text) and links to nothing, like this:

<li ><a href='./index.php?application=orders'><b>Ventas</b></a></li>
<li ><a href='./index.php?application=AP'><b>Compras</b></a></li>
<li ><a href='./index.php?application=stock'><b>Productos e Inventarios</b></a></li>
<li ><a href='./index.php?application=manuf'><b>Manufactura</b></a></li>
<li ><a href='./index.php?application=GL'><b>Contabilidad y Bancos</b></a></li>
<li ><a href='./index.php?application='><b></b></a></li>
<li class='active'><a href='./index.php?application=system'><b>Configuración</b></a></li>

I had review the code and I can see that when you enter a tab install_tabs is called,
on the other hand, If you enter a link install_tabs is not called even the hook object is created.

To solve this issue I have to add these lines to the file session.inc line 300

    if (!isset($_SESSION['App'])) {
        $_SESSION['App'] = new front_accounting();
        $_SESSION['App']->init();
    } else { // line added
        $_SESSION['App']->init(); // line added
    }

In this way the method install_tabs of my hook is called when I enter a link and when I enter a tab.

I hope this could help others.

OK, thanks for your fast response.

In the case of products, the selected taxes are the join between customer branch tax group and product item item tax type.
In the case of shipping charge, how this behaves ?

Is it the join between customer branch tax group and shipping tax group ?
OR
All taxes in shipping tax group are included ?

I'm using FA 2.2.11

On the database structure the table tax_groups has a field tax_shipping.

It is managed by the script Tax Groups /taxes/tax_groups.php under the label "Shipping Tax" and label "Tax applied to Shipping"
The logic says that only one tax group can be marked as tax_shipping to true.

I search the entire project to see how and when this field is used. I found nothing but the input form and the database management:
/taxes/tax_groups.php
/taxes/db/tax_groups_db.inc

Is this field used in any other place ?
When this fields is used ?
What is it used for ?

Thanks in advance

11

(6 replies, posted in Accounts Payable)

This looks more than a trick than a solution, but it could work:
You could create an account "Prepaid purchases" as a bank account
Make a transfer between accounts Banks to Prepaid purchases
When you do the receive process made the payment but taking the money from "Prepaid services"

I'll try to get an answer from our accountant about this

I continue reviewing the code and I found this.

You are moving all the permissions specified by plug-ins or modules (specified in $security_sections and $security_areas) by adding a counter and the extension id so it will not interfere with the normal permissions.

When those files are included the variables $security_areas and $security_sections are not the global variables, they are local variables that you use as basis to the new codes.

$page_security = 'SA_MEXCFD_SETUP';
include_once($path_to_root . "/includes/session.inc");
add_access_extensions();

If a module or plug-in is using different codes to security the function add_access_extensions() must be called in order to add the permissions described on 'acc_file'

This is solved, I hope this information works for other people

I've have added manually to the database the permissions.
security_roles.sections <= added ";51456"
security_roles.areas, <= added ";51457;51458"

The message about "The security settings on your account do not permit you to access this function" now disappears, so, there is maybe a bug in the Access Setup (/admin/security_roles.php) that store the value adding 16384 => 100000000000000.

Please advise.

I had made a plugin but I have problems with access levels
FA version 2.2.8

I have read https://frontaccounting.com/fawiki/index.php?n=Devel.AccessControl

I have a module with access_levels.php with this:

define('SS_MEXCFD',    201<<8);
$security_sections[SS_MEXCFD] = _("MEXCFD (electronic invoices)");

$security_areas['SA_MEXCFD_SETUP'] = array(SS_MEXCFD|1, _("MEXCFD Connector Setup")) ;
$security_areas['SA_MEXCFD_NOTICES'] = array(SS_MEXCFD|2, _("MEXCFD Notices")) ;
/*
201<<8   => 1100100100000000 (51456)
201<<8|1 => 1100100100000001 (51457)
201<<8|2 => 1100100100000010 (51458)
*/

I try to enter my module, setting $page_security = 'SA_MEXCFD_SETUP';
And get an error abput "The security settings on your account do not permit you to access this function"

The role I'm using already have set the permission at Access Setup (I had logout & login again)

In the database the access is stored as 91136, 91236 and 91237

91136 => 10110010000000000
91236 => 10110010001100100
91237 => 10110010001100101

I have found this relation between the permission code (for SA_MEXCFD_SETUP) and the permission set by the access setup:

91236 & 51456 => 16384 => 100000000000000

I don't know if this is the normal behavior or what I have to do in order to use the permission I'm setting in  $page_security

I have check also the file current_user.php and the step where it return false is this:

return $code && in_array($code, $this->role_set) && ($this->company == 0 || (($code&~0xff) != SS_SADMIN));
$code = 51457;
in_array($code, $this->role_set) => this return false
$this->role_set contains 91236 instead of 51457;

Could you please advise about this ? Thanks in advance !!