After having tested this weighted average material cost, I have found that the test for qoh > 0 and for qoh+qty > 0 will fail for very small values under 0.0000000001, so the test will be changed to test for this value instead to avoid these fails.

Joe

@kvvaradha

To use our weighted average material cost, we must use the same decimals in the items qty. It is this that causes our miss calculation. F.i. if you start with qoh with 0.09 our algorithm is just fine. If we use the qoh of 0.08 we will get a zero value and nothing is calculated. Just fine.

So I see no problems here.

Joe

$kvvaradha

yes, if the ($qoh + $qty) is less than 1, there will be strange results. Before calculating this new material_cost, maybe we should first test if the (qoh + qty) >= 1. what do you think?

The routine get_unic_dec() will sometimes return -1. If the return value is -1, then the UOM is using the user defined decimals on the UOM. And should be tested by user_qty_dec(). I will check if all calls to get_unic_dec() is testing for this.
I am aware of the user_price_dec problem with material price. Maybe a standard flag on the home_currency function. to return the value without rounding. I am jsut afraid of ev. side effects. What do you think?

Joe

FA is using average material cost on stock items.

The operation can be seen in /purchasing/includes/db/grn_db.inc in the first function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false).

On line 66 you will see
$material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) /    ($qoh + $qty);
$material_cost will be currennt material cost multiplied by current qoh + transaction qty multiplied by price in home currency. This will then be divided by qoh + qty.
These operations will be new average matefial cost.
So the calculations are correctly done.

All stock transactions are going through this routine.

Joe

FA is using average material cost on stock items.

The operation can be seen in /purchasing/includes/db/grn_db.inc in the first function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false).

On line 66 you will see

$material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) /    ($qoh + $qty);

$material_cost will be current material cost multiplied by current qoh + transaction qty multiplied by price in home currency. This will then be divided by qoh + qty.
These operations will be new average material cost.
So the calculations are correctly done.

All stock transactions are going through this routine.

Joe

81

(9 replies, posted in Translations)

Sure, will download and ask Itronics to do that.

Joe

Ok, done. Included in 2.4.15 at Sourceforge.net.

Joe

83

(3 replies, posted in Announcements)

Announcement

This is a 2.4.15 release, which is mainly a bugfix release, but also contains an improvement and additional security fixes.

A couple of php 8 problems has been fixed. This release should now be PHP 8 compatible. The following versions has been tested: 8.0.0, 8.0.7, 8.0.12 and 8.1.6.

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

Security

FrontAccounting should NOT be used via unsecure http protocol. If you really need this - change SECURE_ONLY constant in /includes/session.inc to false (comment in the file added). Unfortunately this option cannot be added in sysprefs/config.php because the settings are not available before session is started.

Download instructions

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

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

Common

  • Bug. Not translatable string in Print Statements Report. Fixed.

  • Feature. Added company switch for placing company logo on certain views.

  • Bug. Call to Function add_access_extension was missing in Dropdown theme. Fixed.

  • Feature. Install/Activate Extensions: displays more sensible information for modules available/installed.

  • Feature. Implemented automatic greater fonts in default themes, when higher screen resolutions.

  • Feature. Clean up in function get_attachment_string() in attachments_db.inc

  • Bug. php 8. call to function db_set_charset, maintenance_db.inc can not have second parameter (encoding) to null. Used utf8 instead.

Sales

  • Bug. GL Dimensions should also be included on balance accounts in sales order delivery and Inventory adjustments. Fixed.

  • Bug. Dimensions on credit note should also be set on balance accounts. Fixed.

  • Bug 5660: php8. Unable to create customer credit note. Fixed.

  • Bug. Can't void customer payment if there is an invoice with same number that has been credited. Fixed.

  • Feature. Customer Transactions, Allocations and Supplier Transactions, Allocations has got another selection type, Journal Entries.

  • Feature. Added Customer Payment Attachments menu option after operation.

  • Bug. php 8. nl2br with null parameter in view_sales_order. Fixed.

Purchasing

  • Bug in purchasing/includes/db/invoice_db.inc gives error. Wrong document src. Fixed.

  • Bug. Credit note bug in suppliers. Result in errors. Fixed.

  • Bug. Cannot add received items to invoice if there are empty prev. items. Fixed.

  • Feature. Added Supplier Payment Attachments menu option after operation.

Item and Inventory

  • Bug. Dimensions in cost update should also be set on balance accounts. Fixed.

  • Bug. Cost Update - Second parameter in memo was not showing decimals. Fixed.

  • Bug. Inventory valuation report. Unit decimal -1 issue. Fixed.

Manufacturing

  • Bug. When booking costs on workorders the set dimension on the item wasn't booked on the balance account. Fixed.

Fixed Assets

  • Bug. Presenting a fixed asset attachment (was presenting the Purchase Delivery, should be the Supplier Invoice).

Dimensions

  • Bug. GL Dimensions should also be included on balance accounts in sales order delivery and Inventory adjustments. Fixed.

  • Bug. Dimensions in cost update should also be set on balance accounts. Fixed.

  • Bug. Dimensions on credit note should also be set on balance accounts. Fixed.

  • Bug. When booking costs on workorders the set dimension on the item wasn't booked on the balance account. Fixed.

Bank and General Ledger

  • Bug. Reconcile Bank Account added filter up to reconcile data.

  • Bug. Audit trail is showing double entries for Payment and Deposit. Fixed.

  • Bug. GL Account in Company Defaults missing for test. Fixed

  • Feature. Moved years in default COAs one year forward.

Thanks @kvvaradha.

We just got this included in the new minor 2.4.15 that is releasing today.

Joe

85

(10 replies, posted in FA Modifications)

FYI, itronics has updated the Fiscal Years in the Repo COAs (not included in core). He has found a smart way to automatically always use the current year and previous year for Fiscal Years.

Joe

The topics are inside the Sections. The archive forum is the parent forum for all the sections. There are no topics here.
The sections are accessible by the links.

After some initial statical problems while converting to Archives, it seems to work now.

Joe

88

(6 replies, posted in Wish List)

Yes, a first go is established, look at the sticky Topic in Announcement Forum.

Joe

A new Archive Forum has been established with sections related to our normal Forums.

All Topics that are created for more than 2 years ago are transfered to the Archive, Section.
The Archive is Read Only. You cannot post here. If needed you must create a new Topic in the original Forums.

I will run an Archive script now and then to update the Archive.

Joe

You become a Member after you as a New Member have made 10 posts. This is now the limit for uploading attachments.

Joe

91

(6 replies, posted in Wish List)

Yes, I will have a look into this. Maybe we can create a Forum, called Archive or something like that and move all topics older than 2 year into this. Or do you have any better ideas?

Joe

Of course your name is @MacKenzie. Sorry. Thanks for your contributions.

Joe

@MacKensie

Please avoid all these technical descriptions when reporting. It will make most users confused.

1. Set the $go_debug variable in file config.php to 2. It will then report if there are php errors in the code.

2. If you want to make entries in all non closed fiscal years, then check that you are 'Super administrator' and set the 'Allow entry on non closed fiscal years' in 'Banking & GL configuration', 'Access Setup', 'Setup' tab.

3. Use the 'Help' menu if you need information and tips on your current operations. The Help is Context Sensitive.

As I told before, we can't reproduce your reported error and during the years with these operations noone has reported any errors.

Joe

@MacKensie

Did you forget to set the current fiscal year as @rafat advised?

I cannot reproduce this error with the correct fiscal year set on the company.

Joe

@MacKensie

Please have a look at Posts 16 and 18, where I try to explain how we are implementing the Year Closure.

You can still do the year closing yourself and get it as you like. But if the transactions are not in balance we have to do it.

We are doing it this way in FA, by keeping the P/L transactions and only debit the year result as explained above.
This way we can perform multi year p/l and balance reports for dimensions (projects).

Joe

Hello Sir,

I guess you are referring to an external COA. In the FA core there are 2 COAs, en_US_demo.sql and en_US_new.sql. These 2 COAs only contains two fiscal years, Currently these are 2020 and 2021.

In the next minor release these will be updated to 2021 and 2022.

All the COAs in the Extension repository are maintained by various users and some are probably not updated.

Joe

@Zilvermeeuw,

Thank you for observing this. It has been fixed and committed to stable repo.

/Joe

98

(6 replies, posted in Setup)

@boxygen

Thanks for finding this. Fixed and Committed to stable repo.

Joe

@dz,
Thanks for finding this.

This has been fixed and committed to stable repo.

Joe

@boxygen,
Thanks for observing this and fix.
Committed to stable repo.
The fix can be downloaded here and replaced on server.

Joe