Hi Exson:
I think you are right, and the main cause I guess it is we code the same
thing many times in different scripts, each one slighlty different.
It could be solved creating only one function like
CalculateDemandForWO(StockId) and use the same function all over webERP
whenever we need to calculate the Demand. It could be done in multiple
places where we keep calculating the same thing many times (QOH. QOO, etc
etc).
I found many bugs on multicurrency due to thsi problem of having the same
thing coded multiple times by several people in different scripts. Just few
general abstraction functions would simplify code an make it more readable
(if function names are descriptive enough)
Sure it is a bit more inefficient, but on the other side it would keep the
code cleaner and less lines to maintain, a good trade IMO.
What I'm trying to say is: a bit more of abstraction (more functions to
retrieve and maintain data used multiple times) would allow webERP to be
more consistent and bug-free as would be easier to detect. I'm not
advocating for a OO approach, but a bit more of abstraction.
But this deserves a thought by all developers, specially the core ones :-),
and see if we can slowly move towards this approach.
My 2 cents.
Regards,
Ricard
2014-02-17 21:38 GMT+08:00 ExsonQu <hex...@gm...>:
> *Hi, Dear all:*
>
> Thank you for your great contribution to webERP.
>
> I've found that the demand of Work Order in StockLocStatus.php
> seems to be wrong. It calculates the demand by
> sum((woitems.qtyreqd-woitems.qtyrecd)*bom.quantity). But usually, the
> components issued usually not like this, a more reasonable way is to use
> stockmoves to calculate. Although we still face the not so accurate
> qtyreqd,
> at least there is some improvement.
>
> Any idea for this?
>
> Thanks and best regards!
>
> Exson
>
>
>
> --
> View this message in context:
> http://weberp-accounting.1478800.n4.nabble.com/Demand-calculation-is-wrong-tp4657228.html
> Sent from the web-ERP-developers mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience. Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Web-erp-developers mailing list
> Web...@li...
> https://lists.sourceforge.net/lists/listinfo/web-erp-developers
>
|