2,501

(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,505

(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,509

(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.

Works as expected for Customer Credit Note Edit.

1. Create a Credit Invoice  for 3 items (Payment Terms: Not Cash Invoice as it will have a Cash payment entry automatically made)
2. Create a Credit Note for 1 item returned
3. Create a payment for 1 item and allocate it to the Invoice
4. Edit earlier Credit Note and make it as 2 items returned
5. Allocate the Credit Note to the Invoice
6. The settled Invoice will show it's fulfillment transactions as okay.

Attached is the sequence of operations documents.

The same sequence should suffice for a Supplier Txn.

Possible bug in the Supplier Credit Note Edit - each edit makes a separate Credit Note!

Also getting:

Rounding error -0.01 encountered for trans_type:11,trans_no:1

Since the format from every supplier need not be the same, the script will need to be customised as per your need - make an extension for it then.

When using FA, make sure there are no other instances of the browser / browser tab open.

2,517

(2 replies, posted in Setup)

This tool misses out on CHAR to VARCHAR conversions and some other small constructs, but yes, it is a quick and dirty fix.

Attached is the SQLyog output for the same FA 2.3 to 2.4 official diff.

Yes, variable assignment is not acceptable inside the gettext function call since it is checked for presence in the compiled .mo file if available and else the string is returned verbatim if valid.

The person_id field in both gl_trans and bank_trans tables are of tinyblob type whereas it is of INT type in all other tables (crm_contacts, cust_allocations, supp_allocations) where it exists. Luckily, it does not form part of any index when in the tinyblob avatar.

@joe: Would you like to correct this inconsistency by making it INT everywhere it is a tinyblob? Or is there any reason for this different type casting?

The ,po file should then be compiled into a .mo file which is what the gettext engine will lookup. If any string does not exist in the translations files then the source string will be used. All translations will generally get updated during the release phase. Compare the empty.po file with the one you have for your language and update as necessary. Alternatively code and collect at Transifex.

Whichever currency is the settlement currency agreed upon for the transaction should be taken and the appropriate exchange rate accepted / adjusted in the company's home currency to provide for the contra. The Exchange Rate Profit/Loss account should take care of the rest.

Decide on what language you want the Chart for Lebanon to be in and if English, it can be named en_LB.sql.

1. Start by making a copy of sql/en_US-new.sql as say en_LB.sql.
2. Edit the en_LB.sql file for chart_master, currencies and sys_prefs tables data among others as suited to Lebanon.
3. Place the en_LB.sql file in the sql folder in FA.
4. Insert a stanza for the Lebanese chart in installed_extensions.php file.

The newly created Lebanese Chart of Accounts will now be available in creation of new company form.

2,522

(4 replies, posted in Accounts Receivable)

Please share your code so that it can be evaluated to accomodate it into the core.

2,523

(4 replies, posted in Accounts Receivable)

You probably mean:
When a user enters the price of an item, if that :
  price < cost (which cost: average, last, etc?) show a yellow notification alert
  price < list price (which list price - there may be many) show a red notification alert.

Make an extension to implement your rules.

2,524

(14 replies, posted in Setup)

The fix is a little long. @poncho1234's fix to acquire the inactive field's value directly in the sql may have sufficed as the combo box generation routine merges the $show_inactive variable appropriately like all other tables based combos. Functions like item_type_inactive($id) if replicated for each and every inactive field in FA's multitude of tables would become a veritable maze. Any overarching issues that were encountered in fixing it this way would be a lesson on coding similar pages for the community at large.

@itronics: Thanks for the quick fix.

The sales/manage/customer_branches.php already has     hidden('popup', @$_REQUEST['popup']); in it's line 226 and hence F3 - Select Branch works as expected in Direct Invoice like forms.

Line 303 of sales/manage/customers.php:

    div_start('controls');

should now be:

    div_start('controls');
    if (@$_REQUEST['popup']) hidden('popup', 1);

Similarly for purchasing/manage/suppliers.php at line 169 as well.

The Supplier deletion notification is obtained by making line 281 in purchasing/manage/suppliers.php:

        $Ajax->activate('_page_body');

to be

        $Ajax->activate('_page_body');
        display_notification("#" . $_POST['supplier_id'] . " " . _("Supplier has been deleted."));

@joe: Tested. Can commit.