Topic: qty_done is not updated correctly when partial invoice is voided

Create a Direct Delivery as below

https://prnt.sc/1tdjz2u

Create Partial Invoice of the Delivery as Below

https://prnt.sc/1tdk6yi

Now void this newly created invoice and then again create a Invoice for the delivery. You will find the wrong updated qty_done as below

https://prnt.sc/1tdkfp2

www.boxygen.pk

2 (edited by rafat 09/24/2021 03:39:12 am)

Re: qty_done is not updated correctly when partial invoice is voided

Yes I can reproduce the above easily. FA2.4.10
I will post it in mantis.

Re: qty_done is not updated correctly when partial invoice is voided

inside /sales/includes/db/sales_invoice_db.inc   find line no around 260

update_parent_line($type, $row['id'], -$row['quantity']);

replace this with

update_parent_line($type, $row['id'], -$row['qty_done']);

actually we need to pass the quantity_done, not the original quantity

Subscription service based on FA
HRM CRM POS batch Themes

Re: qty_done is not updated correctly when partial invoice is voided

Thanks @kvvaradha, I will fix and commit.

Joe

Re: qty_done is not updated correctly when partial invoice is voided

joe wrote:

Thanks @kvvaradha, I will fix and commit.

Joe

Why are you guys not considering the issue with fixed asset depreciation problems? The value is not correct... Who can assist correct this error.
@ap.muthu . The depreciation value is not correct with the rate provided. whether straight line or declining method. the book value is incorrect,
it seems like the focus is more given into sales and purchases, what about the other modules ?

Re: qty_done is not updated correctly when partial invoice is voided

@cedricktshiyoyo,
I think the developers are looking at experienced programmers like you to suggest a solution, This is what open source is all about. A community collaboration. So if you think you have a solution then suggest it. If they see it feasible they will include it. Also Fixed Assets is an optional module and the usage is not as much as Sales or Purchase..Its normal to have more focus on widely used modules. I don't see any bias between any of FA modules.

Re: qty_done is not updated correctly when partial invoice is voided

cedricktshiyoyo wrote:
joe wrote:

Thanks @kvvaradha, I will fix and commit.

Joe

Why are you guys not considering the issue with fixed asset depreciation problems? The value is not correct... Who can assist correct this error.
@ap.muthu . The depreciation value is not correct with the rate provided. whether straight line or declining method. the book value is incorrect,
it seems like the focus is more given into sales and purchases, what about the other modules ?

Probably we need more clear explanation to implement a change in code.  The straight line or decline method. Whatever it's. Explain the issue clearly with the calculation of sample.

If you are not interested to contribute the open source community,  hire a freelancer and do that for you.

Most of the shouting users are not helping the community to grow.

Subscription service based on FA
HRM CRM POS batch Themes

Re: qty_done is not updated correctly when partial invoice is voided

kvvaradha wrote:
cedricktshiyoyo wrote:
joe wrote:

Thanks @kvvaradha, I will fix and commit.

Joe

Why are you guys not considering the issue with fixed asset depreciation problems? The value is not correct... Who can assist correct this error.
@ap.muthu . The depreciation value is not correct with the rate provided. whether straight line or declining method. the book value is incorrect,
it seems like the focus is more given into sales and purchases, what about the other modules ?

Probably we need more clear explanation to implement a change in code.  The straight line or decline method. Whatever it's. Explain the issue clearly with the calculation of sample.

If you are not interested to contribute the open source community,  hire a freelancer and do that for you.

Most of the shouting users are not helping the community to grow.

I am not part of the shouting community, review my activities, you will see that i have a contribute in many areas. I am just trying to point out a error i have noticed, isn't a company asset management of a great importance?
I am just asking one thing, where the maths is happening when it comes to asset depreciation... The book value after depreciation is not correct according to the percentage you entered.