You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/02/15 02:54:45 UTC

svn commit: r507773 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh widget/facility/FacilityScreens.xml

Author: sichen
Date: Wed Feb 14 17:54:44 2007
New Revision: 507773

URL: http://svn.apache.org/viewvc?view=rev&rev=507773
Log:
reverting back to the older version of the facility inventory screen so that it will work correctly when there are no inventory items yet for products which have product facility minimum stock settings

Modified:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh?view=diff&rev=507773&r1=507772&r2=507773
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh Wed Feb 14 17:54:44 2007
@@ -17,6 +17,11 @@
  * under the License.
  */
 
+// This script can be used for testing right now but it should not be used for production because
+// it does not work for marketing packages and more importantly, if there is a new product without any
+// inventory items, it will not show up on the inventory report even if it had a ProductFacility record.
+// These problems need to be addressed before this can be used in production.
+
 // This script counts the inventory in the facility using a complex and
 // pretty efficient dynamic view entity.
 // However, since the quantities are not computed using the inventory

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?view=diff&rev=507773&r1=507772&r2=507773
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Wed Feb 14 17:54:44 2007
@@ -197,8 +197,9 @@
                 <set field="productsSoldThruTimestamp" from-field="parameters.productsSoldThruTimestamp"/>
                 <set field="internalName" from-field="parameters.internalName"/>
                 <set field="productId" from-field="parameters.productId"/>
-   
-                <script location="component://product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh"/>
+
+                <!-- do not use the countFacilityInventoryByProduct.bsh script unless the issues mentioned in it are correctly addressed -->
+                <script location="component://product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">



Re: svn commit: r507773 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh widget/facility/FacilityScreens.xml

Posted by Si Chen <si...@opensourcestrategies.com>.
Jacopo Cappellato wrote:
> Si Chen wrote:
>> Jacopo,
>>
>> Also this script probably may not be handling serialized inventory 
>> correctly.  I did not check it yesterday but it needs to be checked.
>>
>> In general I am concerned that this script means the re-writing the 
>> business logic of the inventory services here in the BSH.
>>
>> Si
>
> yes, these are two good points too; however I think that sometimes 
> it's worth having to maintain some duplicated business logics if there 
> are serious performance issues (as it is happening here).
>
> Jacopo
>
For long term maintenance and to avoid bugs, we should really try to 
keep all the business logic of inventory calculation in one place.  The 
current services can be made a lot more efficient.  In reality, though, 
on a real server the performance is not too bad even with them the way 
they are.

Si

Re: svn commit: r507773 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh widget/facility/FacilityScreens.xml

Posted by Jacopo Cappellato <ti...@sastau.it>.
Si Chen wrote:
> Jacopo,
> 
> Also this script probably may not be handling serialized inventory 
> correctly.  I did not check it yesterday but it needs to be checked.
> 
> In general I am concerned that this script means the re-writing the 
> business logic of the inventory services here in the BSH.
> 
> Si

yes, these are two good points too; however I think that sometimes it's 
worth having to maintain some duplicated business logics if there are 
serious performance issues (as it is happening here).

Jacopo


Re: svn commit: r507773 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh widget/facility/FacilityScreens.xml

Posted by Si Chen <si...@opensourcestrategies.com>.
Jacopo Cappellato wrote:
> Si,
>
> about your comment: I don't think that the missing support for 
> marketing packages should prevent the usage of the script in production.
> Instead I think that the *fake* inventory units shown for the mkt pkg 
> could be an issue because the items are not really in inventory (just 
> their components are there), and most of all because the units of the 
> components are also shown in the reports and this could induce the 
> user think there are components AND mkt pkg (i.e. more inventory than 
> the real one).
> On the other hand, your second point is really worth considering (the 
> issue with a product with no InventoryItems) and so for now I think 
> that using the original script makes sense.
>
> Jacopo
>
>>  
>> +// This script can be used for testing right now but it should not 
>> be used for production because
>> +// it does not work for marketing packages and more importantly, if 
>> there is a new product without any
>> +// inventory items, it will not show up on the inventory report even 
>> if it had a ProductFacility record.
>> +// These problems need to be addressed before this can be used in 
>> production.
>> +
>
>
Jacopo,

Also this script probably may not be handling serialized inventory 
correctly.  I did not check it yesterday but it needs to be checked.

In general I am concerned that this script means the re-writing the 
business logic of the inventory services here in the BSH. 


Si

Re: svn commit: r507773 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh widget/facility/FacilityScreens.xml

Posted by Jacopo Cappellato <ti...@sastau.it>.
Si,

about your comment: I don't think that the missing support for marketing 
packages should prevent the usage of the script in production.
Instead I think that the *fake* inventory units shown for the mkt pkg 
could be an issue because the items are not really in inventory (just 
their components are there), and most of all because the units of the 
components are also shown in the reports and this could induce the user 
think there are components AND mkt pkg (i.e. more inventory than the 
real one).
On the other hand, your second point is really worth considering (the 
issue with a product with no InventoryItems) and so for now I think that 
using the original script makes sense.

Jacopo

>  
> +// This script can be used for testing right now but it should not be used for production because
> +// it does not work for marketing packages and more importantly, if there is a new product without any
> +// inventory items, it will not show up on the inventory report even if it had a ProductFacility record.
> +// These problems need to be addressed before this can be used in production.
> +