76

(3 replies, posted in Items and Inventory)

Thanks @Braath and @Varadha for your suggestions.

Inventory Valuation Report Served the subject for me. Now my Trial Balance is giving exactly the same value of Inventory as that of Inventory Valuation Report. I had to set $use_costed_values = 1 in config.php. This I tested for any Date.

But now I am facing a very strange issue that I had to dig out after hours.

Here is the Screen shot of the Database.

https://prnt.sc/1qbickh

This is one item's records in stock_moves table which is fetch by Inventory Valuation Report to calculate average cost in the function getAverageCost

Now the below condition is calculating wrong average cost because in one record the standard_cost is ZERO as highlighted in above image.

https://prnt.sc/1qbiflo

What is the purpose of this condition? And I don't know why the standard_cost is set to ZERO for that line in first image?

If I remove this condition my Inventory Valuation is perfect. But I am unable to understand why this condition was applied earlier.

Here is the Screen Shot of Inventory Valuation Report
Any idea?

I am facing a challenge.
In one FA installation with many inventory items, the opening inventory was recorded at a cost and that was averaged out with purchases, voiding of transactions, inventory adjustments etc and current inventory is at average cost.

Now If I see the inventory valuation report of the first day of the fiscal year it is not giving the actual value of the inventory rather the averaged out value. Now auditor want's to see the actual value of the opening inventory.

Is there any way out to give him report.

We have a function handle_negative_inventory() in includes/db/inventory_db.inc.

This function performs action when inventory of an stock is going to be negative or ZERO with following condition.

if ($qoh + $quantity <= 0 && $qoh > 0) //Positive inventory turning zero/negative

But I think this should only check if Inventory is going to be negative. Zero Inventory is not an issue while Negative inventory is an issue.

I may be wrong in a broader scenarios but in one recent scenario I found the condition to be as below.

if ($qoh + $quantity < 0 && $qoh > 0) //Positive inventory turning negative

Just putting it here so that may get some expert advices.

Regards.

79

(3 replies, posted in Manufactoring)

7.4

80

(3 replies, posted in Manufactoring)

While voiding work order the following error comes

https://prnt.sc/1oesuya

The possible fix could be following.

    @@ -161,7 +161,7 @@ function void_work_order_produce($type_no)
        return;

    // deduct the quantity of this production from the parent work order
    -  work_order_update_finished_quantity($prod["workorder_id"], -$prod["quantity"], false);
    + work_order_update_finished_quantity($prod["workorder_id"], -$prod["quantity"], 0);

Sometimes the Users mouse is speedy and single click causes double click on Place Invoice button.

FA takes it as double input and creates 2 invoices of same value.

This is very irritating and sometimes not caught instantly.

Is there any workaround to prevent this? To disable the button after First click?

Hello,

I found one bug in purchasing/includes/db/invoice_db.inc Line # 500.

This should be

$details_row['quantity_inv'],

instead of this

$details_row['quantity_inv']-$details_row["quantity"],

Otherwise it is not showing Quantity Invoiced on Supplier Credit page as shown in image below. While the Quantity Invoiced should be 10

https://prnt.sc/1ap60iw

I tried to figure out if this option is useful any other way. But I couldn't. May be I have overlooked something. But as far as Supplier Credit is concerned this should be fixed.

83

(19 replies, posted in Accounts Payable)

I am sorry to bother you. Actually I was trying on my custom theme and in that theme I am using Select2 for drop down. In that theme the COGS dropdown is not retaining focus when I hit tab from Price before Tax. While it is working fine on default theme on the same installation with same data. I will try to fix it.

One thing I need to ask is that while we are importing goods from foreign supplier hence different currency. But the Local Expenses are in Local currency. Is this also handled in this Modification?

Anyway this is a very useful modification and very beautifully placed in the current UI.

Bundle of thanks.

84

(19 replies, posted in Accounts Payable)

No, not the Ajax is running on COGS menu rather it is running on the Price Before Tax as shown in image . When the focus shifts from Price Box to COGS menu the Ajax runs and bring the focus back to Price box.

85

(19 replies, posted in Accounts Payable)

Braath Waate wrote:

One idea, but I haven't tried it out yet.

https://github.com/apmuthu/frontac24/pull/7 allows service costs to be wrapped into purchased item costs on a single P/O or direct invoice and offers three methods for the calculation.

Thus, using the example offered, each computer is $100 and 10 computers are ordered.   A Freight service item for $100 is added to the P/O, and using the Quantity method, the price of the computer is automatically recalculated to $110 and the service item is zeroed.

While this does not directly address the issue of wrapping in P/Os from multiple vendors, such as DHL, it may be possible to do this by leaving the P/O open until the DHL bill arrives:

1.  When the DHL bill comes in, add the freight to the original P/O, which is then incorporated into the item pricing as described above.

2.  Because now this overstates the amount payable to the vendor of the original P/O, when the P/O is invoiced, the Freight account must be added as a G/L item to the invoice using the negative amount of the DHL payment.

3.  The amount invoiced should now be correct for the original vendor.

4.  DHL is paid in the usual manner against the G/L Freight account.

5.  The net Freight expense is zero, because the negative amount on the invoice offsets the positive amount of the DHL payment.

Result: the cost of the DHL freight is captured in the item price and will be reflected in COGS when the item is sold.

The disadvantage of this approach is that the P/O had to remain open to wait for the DHL freight billing, which delays deliveries, and therefore may not be acceptable.

I wrote the pull request to operate on the P/O, but perhaps it would preferable for it to operate when the invoice is created, which should work because item prices are not firmed up in FA until then.  That would allow the delivery to go forward before the DHL freight bill was received.

@braathwate, I was trying your fork to test this feature. I am facing one problem. When I select a Service Item on PO or Invoice I can see a Drop Down under COGS column with 3 options. By Line Total, By Quantity, By Line Item.

Unfortunately I am not able to select any of these three options as the Ajax is taking back focus from this dropdown list.

I am trying to use API in a project where API call is from within FA for the currently logged in user and company.

In this case how the session will be handled in the current FA API plugin.

Session Handling
I don't want to create a new session. Instead want to use the same session.

API Call
I created a test page and called the absolute url using file_get_contents as below and I got response.

$result = file_get_contents('https://pakerp.net/modules/api-bx/category');

But I am not sure what is the right way to call API using relative path within FA.

Hello, amputhu I am trying to use your api in a project. The api call is within the FA so I don't want to recreate session instead use the same Logged In Session. How to do this?

88

(4 replies, posted in Development)

This is such a great input. I highly recommend to include this in Core

89

(4 replies, posted in Development)

I have tried to use Jquery to validate some form fields based on input value.
It works fine but when the default FA Ajax is called on the page the jquery doesn't load and hence no validations are done.

I have added this in themes renderer.php menu_header() function.

add_js_ufile("$theme_path/libraries/jquery-1.10.2.min.js");

send_scripts();

Where else I shall add this to ensure that it works even after default Ajax Call on the page?

Please guide.

In FA we can activate Ajax on Combo fields by setting Submit_on_Change to true.

Is there any way we can activate Ajax on Input Text Field if the value is changed then Ajax is called?

91

(1 replies, posted in Wish List)

How to re-open Closed work order.

Work order closed by mistake. There is any way to reopen this

Thanks a lot for this detailed information.

Dear all UAE members here specially @rafat,

Can you please explain the FTA requirements by UAE authorities for any accounting solution? Is there any defined report/format?

Does FA fulfil those requirements or we need to do some modifications?

said.omn wrote:

Thank you for your reply

In fact, I don't have a problem with working on the database, I have good experience but I need the database relationship diagram to find out the related tables, in order to change the Item Code using SQL statement.

I think the database designer should have added an independent indexed field for the barcode where it's not a primary key, this way it will be easy even to change the item barcode without effecting the whole table or other tables in the database.

Good Suggestion

The similar handling needs to be done for Supplier Transactions Allocation at Line # 410

                $trans = get_supp_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type, $_SESSION['alloc']->person_id);            

I suggest to commit the core for this.

96

(1 replies, posted in Installation)

Ok, I found the problem. Server Locales were not updated.

I found this thread useful https://serverfault.com/questions/54591 … -on-debian

97

(1 replies, posted in Installation)

Hello I am facing difficulty in Installing Languages in latest repo of FA2.4.9.

Below is the error message.

click here

The bug I am going to detail here needs a scenario.

Using on Journal Entry I recorded the Opening Balances of all customers.
Upon recording payment for one out of those customers I encountered following error.

/PATH-TO-FA/includes/errors.inc:207:    trigger_error('DATABASE ERROR : duplicate debtor transactions found for given params
sql that failed was : SELECT trans.*,ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total,cust.name AS DebtorName, cust.address, cust.curr_code, cust.tax_id, trans.prep_amount>0 as prepaid,com.memo_, branch.* FROM debtor_trans trans LEFT JOIN comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN shippers ON shippers.shipper_id=trans.ship_via, debtors_master cust, cust_branch branch WHERE trans.trans_no='96' AND trans.type='0' AND trans.debtor_no=cust.debtor_no AND branch.branch_code = trans.branch_code


','256')
/PATH-TO-FA/sales/includes/db/cust_trans_db.inc:214:    display_db_error('duplicate debtor transactions found for given params','SELECT trans.*,ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total,cust.name AS DebtorName, cust.address, cust.curr_code, cust.tax_id, trans.prep_amount>0 as prepaid,com.memo_, branch.* FROM &TB_PREF&debtor_trans trans LEFT JOIN &TB_PREF&comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN &TB_PREF&shippers ON &TB_PREF&shippers.shipper_id=trans.ship_via, &TB_PREF&debtors_master cust, &TB_PREF&cust_branch branch WHERE trans.trans_no='96' AND trans.type='0' AND trans.debtor_no=cust.debtor_no AND branch.branch_code = trans.branch_code ','1')
/PATH-TO-FA/includes/ui/allocation_cart.inc:381:    get_customer_trans('96','0')
/PATH-TO-FA/sales/customer_payments.php:222:    check_allocations()
/PATH-TO-FA/sales/customer_payments.php:236:    can_process()

The reason for this bug is that multiple customer payments are recorded for One Transaction Number and Same Transaction Type.

I found the solution to this is to add 3rd argument in function call get_customer_trans() in /includes/ui/allocation_cart.inc as below on Line#399

                $trans = get_customer_trans($_SESSION['alloc']->allocs[$counter]->type_no, $_SESSION['alloc']->allocs[$counter]->type, $_SESSION['alloc']->person_id);

I hope this shall not cause any other bug.

99

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

I have a sms plugin for FA. You can send forum email to me if needed .

in purchasing_db.inc on line # 200 the 10th argument true is extra I think