@Joe
I guess the most complex issues are resolved. For someone not referring to Inv.Val report, advanced assembly works at GL level. Exception is:
1) labour_cost column of stock_master table, upon 2nd batch production, if 2nd batch labour cost = 0, doesn't update with new average labour cost. Same to overhead_cost column.
2) Even on the 1st batch production, suppose the production takes 2 days and you insert:
day1 labor cost $150
day2 labor cost $20
Stock_master, labour_cost column overwrites $150 by $20 instead of adding up.

Whoever can dig deep, can take up the challenge from here.

@Joe
Thank you for your attention to the problem and prompt responses.
I now have accuracy issues: to replicate my situation:
1. Just restore to previous backup (https://drive.google.com/file/d/0B8DlmARQ8isNM01BeE03Mzd1Qjg/view?usp=sharing)
2. Receive the outstanding p.o >> produce 1 qty of Output1 with $41.4 add.material, $150 labor and $50 Overhead costs.
3. Right away make a 2nd batch production of 3qty of Output1 with $41.4 add.material, $150 labor and $50 Overhead costs.
Now you're supposed to get this:https://drive.google.com/file/d/0B8DlmARQ8isNWGo4RnlHVUxtdE0/view?usp=sharing
But you get this: https://drive.google.com/file/d/0B8DlmARQ8isNNzdrbks3Q1Nid28/view?usp=sharing


* I still see that received p.o. items, appear at a rounded rate in material_cost column, understating the value of inventory. I've agreed with @apmuthu in another thread that rounding is waived at storage level to maintain accuracy and should only apply at display level.

Hi there,
Sorry for the delay: here's a link
https://drive.google.com/file/d/0B8DlmARQ8isNM01BeE03Mzd1Qjg/view?usp=sharing
I included a helpful readme.txt file (which is why I delayed).

@Joe
$use_costed_values must remain zero at all times for accounting sake. It includes tax values in to inventory cost and then separately reports tax in liability, causing double consideration of tax in the gl.
Coming to advanced assembly:
On a fresh install as well, I see our recent fixes are advantageous to post production costs to the right assembly account but, behind the screen:
* Labour and overhead costs are not picked up by their respective stock_master columns
* Additional issues properly picked up by material_cost column during production eventually gets overwritten by BOM value post production (instead of adding up)
* Upon purchase, the material_cost column improperly does rounding to the unit rate.
I guess these are the problems and all other disparities are by-products of these same points.

@Joe
Back to advanced assembly:
Something remains a disparity between ledger account cost record and the database.
Suppose you produce a product with a $10 BOM, $5 additional issuance, $4 labour & $2 overhead cost:
*The finished goods account receives all $21 (this is where it's improved) but leaves behind the non-BOM costs upon sale of the item. Leaving FG account with leftover $11.
*Stock_master picks up only the $10 and distributes it over material_cost, labour_cost and overhead_cost columns using some strange ratio, I'm still trying to figure out: and this ruins INV. VAL report.
*I noticed that when you issue additional materials, it goes correctly to material_cost column but eventually gets overwritten (instead of adding up) by info from BOM when WO is closed.
*Suppose you produce an item without BOM, simply by a series of issuance of materials and other costs on top, stock_master does receive what ever is given, so does the gl, but after "process" is clicked, stock_master nullifies its column values, while assembly account gets stuck with dissociated costs that remain there even if the item is sold out and, Inv Val report rates the item @ 0.
I guess they all mean the same thing == dissociation.

First thing is first. Recent corrections aiming at advanced manufacture caused material_cost column of stock_master to start rounding figures to user_decimal() for purchased items only. This causes:
* Understatement of the value of inventory while passing through one production phase to another.
* Distorts the weighted average accuracy we used to find on inv.valuation report.

@Joe
Just tested the fix.
The additional cost of labor, overhead and materials do get posted to assembly account and add up with the value of the BOM. Guess what? then when you check inventory valuation of the produced item it's valued only by the BOM. Then when you sell the item, cost of goods sold is calculated only to the BOM and while the inventory is sold out, finished goods account still shows the additional production costs. In short, the additional costs do get posted to the right account but are not associating them selves with the product.
Hint: stock_master table, cost columns aren't updated for additional costs to production.

@Joe
2. Yes, two different buttons will do.
"PROCESS" will do what it does now. Allocation of costs to their respective GL accounts (of course to assembly account).
"CLOSE" will play more of an internal control role by making past production contracts inaccessible for erroneous postings to them.

@Joe
That's exactly the help I'm asking for, I'll rephrase the problem statement here below:
1. A line of codes in fa instructs fa to post additional material issuances, labor costs and overhead costs to "price variance account" instead of "the item's assembly account". Where is this code?
2. Again there's a line of codes somewhere that makes a click on "process" button to closedown a work order. where?

I confirm "Latest fix" by @itronics does the job.

Thanks

@apmuthu
https://drive.google.com/file/d/0B8DlmARQ8isNc3Nuc0dWODRhYUk/view?usp=sharing

The Tax_calc.inc file that brought harmony between me, my received inventory and GRC account is in the link.


Cheers.

OK GOT A SOLUTION: the whole doghouse story as complicated as it seems, it only needs 2 minor fixes.

SOLUTION 1,  Achieve FG value accuracy and proper GL account posting.
To achieve this we need to re-route only one line. The values that fa throws to some cost of good sold section account (which then becomes the net loss on profit statement) should be routed to the item's assembly account (by altering the codes). It goes there and awaits BOM raw materials to come and join it. Together they make up finished good balance ==total production cost (of a doghouse, for instance). If we manage to do this the following happens:
Pro's
FA will not demonstrate fake losses in profit or loss report for productions.
FA will permit customer billing per job status type of projects (constructions).
Producers and accountants wouldn't worry about crafting an absolute BOM as additions and modifications are all costed properly to that specific item's assembly cost.
Con's
It makes BOM optional as anyone can add any item anytime and still achieve properly costed product. (Is this a con by the way?)
This "re-routing" still doesn't mean it's accurate during production (remember items on BOM remain in raw material inventory until completion) but it is accurate post production. (In accounting terms, after re-routing, we get correct profit or loss statement but not correct balance sheet until "process" is clicked).

SOLUTION 2,  Make the "process" button do different than "process and close" button
I completely agree with fa's inception that if qty ordered ==qty produced, auto-close the WO. But if a user clicks "process" and not "process and close", it means the producer is not done uploading pertaining costs. Imagine, right now I still have $10 direct labor cost I am unable to post. I know the importance of closing WO on time, but it should be left to the user's choice/risk/will.


In short, a help from anyone who is handy with the codes in this area can review only these two lines, and we got ourselves no errors.

This is an illustrative example to show areas of improvement in the advanced manufacture of fa.
Assume:
I’m making a doghouse to be sold.
Dec 20 – purchased woods, glue and nails; properly recorded to "raw material inventory" in fa.
Dec 21 – Built the "BOM" for a doghouse, but since I’m not sure, I will be using "advanced manufacture" so I can issue more materials later.
Dec 22 – Started joining the woods as per the "BOM" and paid for my helper $50 and posted it to "labor cost".
Dec 23- Heavy rain came and to protect my doghouse bought plastic shed and charged it to "overhead cost" $50.
Dec 24- Ran out of glue and nails, in addition to the qty set in BOM, bought more and issued it to the "work order" $20.
Dec 25-30 no movement.
Dec 31 – Printed a "balance sheet" and found out the following:
Cash is less by $120 due to the above 3 expenses (correct).
My raw material inventory originally purchased is intact because no "work order" is processed yet (misleading).
Printed "profit or loss" statement:
I have a calculated return (loss) of -$120, because additional material, plastic shed and labor pay were charged to cost of goods sold account (or an account under this section).
Dec 31- After reviewing the reports, I got up, finished the doghouse and in fa, clicked on "process" (not "process and close" because I may have overhead charges to charge later).
Now "balance sheet" shows raw materials transferred to finished goods, by a value proportional to the qty in "BOM" ONLY, even though the doghouse consumed more material than that.
The $120 under "cost of goods sold section" remained there while I wanted it to add-up in "finished goods inventory".       
Later my helper came and complained he has $10 unpaid with me. We checked his hours and he is right. So I paid $10 but to include it to the "workorder", fa has closed it. (Even though I only clicked "process", not "process and close").

Can we not improve advanced manufacture to replicate real life?

The culprit was found in taxes\tax_calc.inc like you hinted, I turned off the rounding function from all the lines (except the ones about shipping cost) and went back to my p.o. receive.

Yes! the inventory was valued correctly and once the supplier's invoice is processed, GRC account is NIL.
What's surprising again is that the purchase module continue to be flawless, while what was disrupting p.o receive was caught in taxes. It's easy to think why. A tax is a multiplier, it's a rate, and is not wise to round it as it's multiplied product is expected to be reconciled against physical documents. (The supplier's bill in our case). If anything we have to round, should be the product and not the tax nor the rate. Hence, turning it off from selected lines in tax_calc.inc makes sense. 


''Rounding is done for consistent storage value in the db to persist across version changes of the db server.''  I am in support of the existence of rounding functions here and there, if I can add, application optimization is another reason. The round codes in all php files you listed above, their purpose is obvious and are essential. However, like I said in a previous post, it should round results and not multiplicative factors such as taxes and rates.

I'm afraid that will just remove rounding from purchasing prices applied in p.o and supplier's invoice. We need to remove rounding from taxfree_charge_price.
You see rounding can exist behind the screen but it should round the right items. In our case what fa does upon p.o. receive is:
ENTERED QTY X (ROUND($4.5/1.05,2))=INVENTORY VALUE
But what it should do is:
ENTERED QTY X ($4.5/1.05)=ROUND(INVENTORY VALUE,2)
Or
It should stop rounding at all as the functions in display would round it anyway.

FLOAT_COMP_DELTA  doesn't seem to have an effect (in fact left me with a blank web page at a point smile )
I managed to successfully receive items without left-over GRC balances by setting my decimal places to 10 digits. Once again confirming that it is the setting in preferences that affects inventory valuation during POD. I insist we nullify the effect of   user_price_dec() during p.o. receiving.

This error occurs when dealing with large quantity credit purchase from a supplier whose price includes tax.
Suppose a supplier “X” whose price includes tax and a P.O. for 5000 pcs of item “X” @ $4.35.

Receive the whole of the P.O. quantity. (i.e. process POD)
Book the supplier’s invoice.
Now, go and check on Trial balance or Balancesheet or GL enquiry how it all worked out.
You’ll find out that inventory is properly received. A/P and pertaining sales tax are registered and surprisingly, there is uncleared balance on GRC account. Why?
During the POD processing, the POD, instead of simply picking up details from the P.O., it is coded to engage itself in to developing a new inventory rate, net of tax and rounded to "user defined" decimal places. And that rounding difference multiplied by large qty such as 5000 pcs leaves Goods Received Clearing account with uncleared balance of, say, $14.
SOLUTION
Whoever can go through the codes for POD and stop it from rounding the rate it developed, solves the problem.

I kindly disagree with the procedure being applied. I believe the purchase module is completely flawless. That's why FA in a non manufacturing business is error free. Even in a manufacturing business, as long as the product being produced has qoh <>0 it works perfectly. Problem arises WHEN it saves a production of an item that is qoh=0. The area that should be trailed is the one that sends material_cost value to stock_master table, material_cost column, upon saving a successful work order.

https://drive.google.com/file/d/0B8DlmARQ8isNR0lzWEtvV2dRYUU/view?usp=sharing

I've left you a read me txt file for details.
Best of luck.
Write me back if anything is missing.

Hello again,
Your prompt reply motivated me to do the test all over again. I'll report every bit here:
1. Launched my UniServer Zero XI version 11.0.3, php 5.4.3 mysql 5.0.10 on mozilla 40.0.3 (win 8.1 64x pc)
2. Downloaded fa_master from your link ... fa installation on
3. Chart of account= standard new co. American, Lang = Eng
4. Created cash customer, supplier, 4 test items: i1, i2, i3 and i4:
      i1 and i2 are purchased types, inv account= 1510 inventory
      i3 is a semi processed item, inv account= 1530 WIP, assembled in 1530 WIP
      i4 is finished good, inv account = 1540 FG, assembled in same
5. BOM: each i1+ each i2+$3 Labor cost+$2 Overhead cost = 1 unit of i3
              each i3 +$3 Labor cost+$2 Overhead cost = 1 unit of i4
6. First purchase made i1 bought for $5, i2 bought for $10 and sent to production: a$20 cost i3 is made successfully and is reported as a work-in-process item on balancesheet as desired.
7. Further processed i3 to i4 now having $25 worth finished item. sold it for $33 and P/L statement correctly shows my $8 profit while B/S report shows zero inventories.
8. Second round purchase made for i1 & i2, same price as above. Produced i3 right away (for $3+$2 additional costs as above). Expecting a $20 cost i3 in all respective reports...
*B/sheet correctly shows $20 stock in progress, Costed inv report also correct
*Inventory valuation shows i3 @ $30 cost
*Went to my db, stock_master table, i3 row material_cost column shows $30
9. There's no point in continuing further as i3 will be picked up to the next production as a $30 worth material. Which then renders loss.

I noticed that when a produced items is sold out, and on a zero 'qoh' a new batch is produced, stock master table takes almost the double of the total material_cost per unit the production consumed while labor_cost and overhead_cost lines are properly distributed. I've checked this on fa2.3.10 to fa2.3.24 and it persists.
The double figure that went to material_cost of the item in-turn provides wrong IV report and unfortunately, cost of good sold calculates itself from this exaggerated material_cost. Hence, the problem not only disrupts some reports we can avoid using but also the GL itself when the item is sold.
Can someone help me on this please, I'm tired of manually uploading actual material costs in the db tables, and I'm sure that's not how FA is made.