Author: hansbak
Date: Mon Jul  6 06:00:54 2009
New Revision: 791389

URL: http://svn.apache.org/viewvc?rev=791389&view=rev
Log:
edit project did not show the client billing partyId, also do not show 
nonbilled hours when either billing partyId or organization party is missing

Modified:
    
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectIsBillable.groovy
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml

Modified: 
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectIsBillable.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectIsBillable.groovy?rev=791389&r1=791388&r2=791389&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectIsBillable.groovy
 (original)
+++ 
ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ProjectIsBillable.groovy
 Mon Jul  6 06:00:54 2009
@@ -33,7 +33,9 @@
        }
        if (fromPartyId && toPartyId && fromPartyId.equals(toPartyId)) {
                context.isBillable = false;
-       } else {
+       } else if (!toPartyId || !fromPartyId){
+        context.isBillable = false;
+       } else {        
                context.isBillable = true;
        }
 }

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=791389&r1=791388&r2=791389&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml 
(original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Mon Jul 
 6 06:00:54 2009
@@ -25,6 +25,16 @@
             <entity-one entity-name="PartyGroup" value-field="partyGroup">
                 <field-map field-name="partyId" from-field="partyId"/>
             </entity-one>
+            <entity-and entity-name="WorkEffortPartyAssignment" list="assigns" 
filter-by-date="true">
+                <field-map field-name="workEffortId" 
from-field="parameters.projectId"/>
+                <field-map field-name="roleTypeId" value="CLIENT_BILLING"/>
+            </entity-and>
+            <set field="project.clientBillingPartyId" 
from-field="assigns[0].partyId"/>
+            <entity-and entity-name="WorkEffortPartyAssignment" 
list="assignsOrg" filter-by-date="true">
+                <field-map field-name="workEffortId" 
from-field="parameters.projectId"/>
+                <field-map field-name="roleTypeId" 
value="INTERNAL_ORGANIZATIO"/>
+            </entity-and>
+            <set field="project.organizationPartyId" 
from-field="assignsOrg[0].partyId"/>
         </actions>
         <alt-target use-when="project==null" target="createProject"/>
         <field use-when="project==null" name="templateId">


Reply via email to