Use the GL Inquiry if you want Bank Payment and Deposit entries.
Use Tax Inquiry only for the Taxes alone.

Use this file and see (rename as php and use) for dropdown theme.

Lines 163-164:

            echo "<div class='fa-body'>\n";
            echo "<div class='fa-content'>\n";

have been replaced with:

            echo "<div class='fa-body'>\n";
            if (!$no_menu)
                add_access_extensions();
            echo "<div class='fa-content'>\n";

2,453

(5 replies, posted in Setup)

Schema update / synch scripts added to my repo - FA23, FA24.

FA 2.4 Schema optimisations consolidated

- @joe/@itronics can vet it for inclusion in the core.

The Dropdown theme was not updated by the author.
It is based on the Dynamic theme.
Compare the files between the two if you have issues.
Attached is the Dropdown theme after making $SysPrefs fixes.
Updated in my FA24Extensions Repo.

2,455

(5 replies, posted in Setup)

In MySQL 5.0 and later, TEXT/BLOB fields cannot have default values.

The only case in FA where it occurs is in the sys_prefs table and that too only in FA 2.4.x:

`value` TEXT NOT NULL DEFAULT '',

It should be:

`value` TEXT NOT NULL,

In FA 2.3.x it was:

`value` tinytext,

There is no constant SA_CSVIMPORT in any of the themes and the FA core. It is possible you got it from one of your extensions or the official import_items extension. My extensions repo has the updated files (attached) for the official extension and see if they mitigate your issue.

2,457

(5 replies, posted in Setup)

After cleaning up the entire standard Chart of Accounts, we are left with the following CHAR fields (whilst all else have been mostly changed to VARCHAR):

0_bank_accounts:  `bank_curr_code` char(3) NOT NULL DEFAULT '',
0_crm_persons:  `lang` char(5) DEFAULT NULL,
0_currencies:  `curr_abrev` char(3) NOT NULL DEFAULT '',
0_debtors_master:  `curr_code` char(3) NOT NULL DEFAULT '',
0_exchange_rates:  `curr_code` char(3) NOT NULL DEFAULT '',
0_journal:  `currency` char(3) NOT NULL DEFAULT '',
0_prices:  `curr_abrev` char(3) NOT NULL DEFAULT '',
0_stock_category:  `dflt_mb_flag` char(1) NOT NULL DEFAULT 'B',
0_stock_master:  `mb_flag` char(1) NOT NULL DEFAULT 'B',
0_stock_master:  `depreciation_method` char(1) NOT NULL DEFAULT 'S',
0_suppliers:  `curr_code` char(3) DEFAULT NULL,

Attachments are a privilege permission set by the board admin.
Screenshots of web pages with mostly text are best captured in PNG format for small size and less pixelation on enlargement.

Void the Supplier Credit Note in the Setup tab and then enter a new one.

The existing SQL to debug is:

SELECT 
    SUM(IF(trans_type=21,-1,1) *
    IF((reg_type=0) || ((trans_type IN (20,21) OR (trans_type=0 AND reg_type=1))
        ), net_amount*ex_rate,0)
    ) net_output

    , SUM(IF(trans_type=21,-1,1) *
    IF((reg_type=0) || ((trans_type IN (20,21) OR (trans_type=0 AND reg_type=1))
        ), amount*ex_rate,0)) payable

    , SUM(IF(trans_type IN (21),-1,1) *
    IF(reg_type=1 AND tax_type_id AND taxrec.rate, net_amount*ex_rate, 0)) net_input


    , SUM(IF(trans_type IN (21),-1,1) *
    IF(reg_type=1 AND tax_type_id AND taxrec.rate, amount*ex_rate, 0)) collectible,
    taxrec.rate,
    ttype.id,
    ttype.name

FROM 0_trans_tax_details taxrec LEFT JOIN 0_tax_types ttype ON taxrec.tax_type_id=ttype.id
WHERE taxrec.trans_type IN (10, 11, 20, 21, 0)
-- AND taxrec.tran_date >= '$fromdate'
-- AND taxrec.tran_date <= '$todate'
GROUP BY ttype.id;

All numbers/prices/amounts are entered as is and then the system formats it as needed.
The home currency is assumed.
input_num may be needed.

@joe: does it need to change?

2,461

(9 replies, posted in Setup)

Close your previous fiscal years and purge them of their data.

This issue does not prevail in FA 2.3 and hence the above fix only addresses the output and not the underlying db fetch function in FA 2.4. Attached is the FA 2.3 output without the above fix and it works perfectly.

Therefore the function get_tax_summary() in gl/includes/db/gl_db_trans.inc needs to be investigated and it is different from it's FA 2.3 counterpart.

The new avatar has an extra parameter $also_zero_purchases set to false by default.

2,463

(18 replies, posted in Report Bugs here)

Consequent on this commit, all existing DBs may be updated with:

ALTER TABLE `0_debtor_trans`
    CHANGE `debtor_no` `debtor_no` INT(11) UNSIGNED NOT NULL, 
    DROP PRIMARY KEY, ADD PRIMARY KEY (`trans_no`, `type`, `debtor_no`);

ALTER TABLE `0_supp_trans`
    CHANGE `supplier_id` `supplier_id` INT(11) UNSIGNED NOT NULL, 
    DROP PRIMARY KEY, ADD PRIMARY KEY (`trans_no`, `type`, `supplier_id`); 

Good catch @andijani.

The Tax Inquiry page is at gl/inquiry/tax_inquiry.php. and it's line 91:

        $collectible = $tx['collectible'];

should be:

        $collectible = -$tx['collectible'];

If the Outputs/Inputs column too should get the appropriate signs, then make line 104 show the negative value.

This issue prevails in FA 2.3.x (line 95) as well and wonder how it went unchecked for so many years.

@joe: can commit it.

The translations will be available when the lang/new_language_template/LC_MESSAGES/empty.po is refreshed in the next release. In the meanwhile you are free to change your .po file and compile it into a .mo file and use it.

Please checkout the 'working' report from FA 2.3.22 (may need a few tweaks from the FA 2.4.2+ one) and see if all is as you desire. Then place it in your company/#/reporting folder to override the standard version and you should be good to go.

2,467

(12 replies, posted in Reporting)

Please take a look at the standard report and annotate it's image of what you would like to see and upload and post the link here.

Almost all reports have their skeletal outputs in image format in the wiki for reference.

Lines 568-572 of purchasing/includes/ui/invoice_ui.inc:

    if ($mode == 1)
    {
        $ret = display_grn_items_for_selection($supp_trans, $k);
        $colspan = 10;
    }

should be:

    if ($mode == 1)
    {
        $ret = display_grn_items_for_selection($supp_trans, $k);
        $colspan = 9;
    }

See the diffs between the rep709.php across the versions to revert to whichever functionality you want.

But practically all usage of $help_context variable are inside the gettext.
See sales/manage/sales_areas.php:

page(_($help_context = "Sales Areas"));

Normal assignment of strings to a variable and then using it in gettext is what is used in locations.php:

page(_($help_context));

2,471

(10 replies, posted in Report Bugs here)

Here is the fix to clear the Transaction # after voiding any transaction:
Lines 320 to 324 in admin/void_transaction.php:

if (isset($_POST['ConfirmVoiding']))
{
    handle_void_transaction();
    $Ajax->activate('_page_body');
}

should be:

if (isset($_POST['ConfirmVoiding']))
{
    handle_void_transaction();
    $selected_id = '';
    $Ajax->activate('_page_body');
}

@joe: can commit this.

As it stands, FA's Tax report is restricted to Sales and Purchase Invoices and possibly goods returns (on appropriate credit notes) if entered as standard transactions and not as quick entries or journal / bank entries.

Quick Entries are a means of entering non document type journal entries. Payment of taxes does not constitute tax incurred or accrued on Supplier/Customer invoices. All standard document types have their own data entry form and type that reports respect.

Taxes collected from customers and
Taxes incurred in invoices from suppliers only should form the part of the Tax Report (reporting/rep709.php) .

Hence there is no issue here.

It appears that the URL parameter ModifyCredit for editing a Supplier Credit Note is not doing anything and only a new credit note by default shows up in purchasing/supplier_credit.php.

Changing lines 33-34 of purchasing/supplier_credit.php:

if (isset($_GET['ModifyCredit']))
    check_is_editable(ST_SUPPINVOICE, $_GET['ModifyCredit']);

to:

if (isset($_GET['ModifyCredit'])) {
    if (isset($_GET['invoice_no'])) {
        check_is_editable(ST_SUPPINVOICE, $_GET['ModifyCredit']);
    } else {
        check_is_editable(ST_SUPPCREDIT, $_GET['ModifyCredit']);
        $help_context = "Supplier Credit Note";
        $_SESSION['page_title'] = _("Supplier Credit Note Edit");
        $_SESSION['supp_trans'] = new supp_trans(ST_SUPPCREDIT, $_GET['ModifyCredit']);
    }
}

brought up the correct Supplier Credit Note to edit but it was not editable (see attachment).

@joe: Supplier Credit Note cannot be edited in FA if this code is not filled.