first version of project billing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@606853 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -49,11 +49,13 @@ PageTitleFindPhase=Find Phase
|
||||
PageTitleFindSubProject=Find Sub Project
|
||||
PageTitleFindSubTask=Find Sub Task
|
||||
PageTitleFindTask=Find Task
|
||||
PageTitleHoursNotYetBilled=Hours not yet billed
|
||||
PageTitleListPartyAssigns=Current Resource Assignments
|
||||
PageTitleListProjectNotes=List Project Notes
|
||||
PageTitleListResources=Resources
|
||||
PageTitleListTaskNotes=List Task Notes
|
||||
PageTitleMyTimesheets=My timesheet list
|
||||
PageTitleProjectBilling=Project Billing
|
||||
PageTitleProjectInformation=Project Information
|
||||
PageTitleRequestList=Request List
|
||||
PageTitleTasksAfter=Tasks to be executed after the current task
|
||||
@@ -66,6 +68,7 @@ ProjectMgrAddNewTask=Add a new task to one of my projects.
|
||||
ProjectMgrAssignATaskToMe=Assign an existing Task to me.
|
||||
ProjectMgrAssignMyTaskToSomebodyElse=Assign My Task To Somebody Else.
|
||||
ProjectMgrSchedule=Schedule
|
||||
ProjectMgrBilling=Billing
|
||||
ProjectMgrCompanyName=Ofbiz Company
|
||||
ProjectMgrCompanySubtitle=Project
|
||||
ProjectMgrCopyProject=Copy Project
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
import java.lang.*;
|
||||
import java.util.Iterator;
|
||||
import javolution.util.FastMap;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.ofbiz.entity.*;
|
||||
import org.ofbiz.base.util.*;
|
||||
import org.ofbiz.base.util.UtilMisc;
|
||||
import org.ofbiz.base.util.UtilValidate;
|
||||
import org.ofbiz.entity.condition.EntityConditionList;
|
||||
import org.ofbiz.entity.condition.EntityExpr;
|
||||
import org.ofbiz.entity.condition.EntityOperator;
|
||||
|
||||
|
||||
import org.ofbiz.entity.util.*;
|
||||
import org.ofbiz.base.util.*;
|
||||
import org.ofbiz.entity.condition.*;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
projectId = parameters.get("projectId");
|
||||
|
||||
// get all tasks from the project, get related time entries and checked if not invoiced
|
||||
List entryList = new LinkedList();
|
||||
entries = delegator.findByAnd("ProjectAndPhaseAndTask", UtilMisc.toMap("projectId", projectId), UtilMisc.toList("phaseName", "workEffortName"));
|
||||
t = entries.iterator();
|
||||
while (t.hasNext()) {
|
||||
entry = t.next();
|
||||
entryItems = entry.getRelated("TimeEntry");
|
||||
e = entryItems.iterator();
|
||||
while (e.hasNext()) {
|
||||
entryItem = e.next();
|
||||
if (entryItem.getString("invoiceId") == null) {
|
||||
timesheet = entryItem.getRelatedOne("Timesheet");
|
||||
if (timesheet.getString("statusId").equals("TIMESHEET_COMPLETED")) {
|
||||
Map all = FastMap.newInstance();
|
||||
all.put("workEffortName", entry.getString("workEffortName"));
|
||||
all.put("workEffortId", entry.getString("workEffortId"));
|
||||
all.put("phaseName", entry.getString("phaseName"));
|
||||
all.put("phaseId", entry.getString("phaseId"));
|
||||
all.put("partyId", timesheet.getString("partyId"));
|
||||
all.put("hours", entryItem.getDouble("hours"));
|
||||
all.put("fromDate", entryItem.getTimestamp("fromDate"));
|
||||
entryList.add(all);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
context.put("entryList", entryList);
|
||||
@@ -55,6 +55,10 @@
|
||||
<security https="true" auth="true"/>
|
||||
<response name="success" type="view" value="EditProject"/>
|
||||
</request-map>
|
||||
<request-map uri="projectBilling">
|
||||
<security https="true" auth="true"/>
|
||||
<response name="success" type="view" value="projectBilling"/>
|
||||
</request-map>
|
||||
<request-map uri="createProject">
|
||||
<security https="true" auth="true"/>
|
||||
<event type="service" invoke="createProject"/>
|
||||
@@ -493,6 +497,7 @@
|
||||
<view-map name="FindResource" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#FindResource"/>
|
||||
<view-map name="FindProject" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#FindProject"/>
|
||||
<view-map name="EditProject" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProject"/>
|
||||
<view-map name="projectBilling" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#projectBilling"/>
|
||||
<view-map name="EditWorkEffort" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProject"/>
|
||||
<view-map name="ChildWorkEfforts" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#ChildWorkEfforts"/>
|
||||
<view-map name="EditProjectAndAssoc" type="screen" page="component://projectmgr/widget/ProjectScreens.xml#EditProjectAndAssoc"/>
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
<menu-item name="tasks" title="${uiLabelMap.ProjectMgrTasks}"><link target="EditProjectTasks?projectId=${projectId}"/></menu-item>
|
||||
<menu-item name="parties" title="${uiLabelMap.ProjectMgrResources}"><link target="ListWorkEffortPartyAssigns?projectId=${projectId}"/></menu-item>
|
||||
<menu-item name="notes" title="${uiLabelMap.CommonNotes}"><link target="EditWorkEffortNotes?projectId=${projectId}"/></menu-item>
|
||||
<menu-item name="subprojects" title="${uiLabelMap.ProjectMgrSubProjects}"><link target="ListSubProjects?projectId=${projectId}"/></menu-item>
|
||||
<menu-item name="subprojects" title="${uiLabelMap.ProjectMgrSubProjects}"><link target="ListSubProjects?projectId=${projectId}"/></menu-item>
|
||||
<menu-item name="billing" title="${uiLabelMap.ProjectMgrBilling}"><link target="projectBilling?projectId=${projectId}"/></menu-item>
|
||||
<!--menu-item name="treeDetails" title="${uiLabelMap.ProjectMgrTreeDetails}"><link target="ChildWorkEfforts?projectId=${projectId}&trail=${workEffortId}&workEffortTypeId=PROJECT&workEffortAssocTypeId=WORK_EFF_BREAKDOWN"/></menu-item-->
|
||||
</menu>
|
||||
<menu name="ProjectSubTabBar" type="simple" menu-container-style="button-bar button-style-2" default-selected-style="selected">
|
||||
|
||||
@@ -131,21 +131,43 @@ under the License.
|
||||
<set field="titleProperty" value="PageTitleEditProject"/>
|
||||
<set field="tabButtonItem" value="editproject"/>
|
||||
<set field="labelTitleProperty" value="PageTitleEditProject"/>
|
||||
<set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
|
||||
<service service-name="getProject" result-map-name="result">
|
||||
<field-map field-name="projectId" env-name="projectId"/>
|
||||
</service>
|
||||
<set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
|
||||
<service service-name="getProject" result-map-name="result">
|
||||
<field-map field-name="projectId" env-name="projectId"/>
|
||||
</service>
|
||||
<set field="project" from-field="result.projectInfo"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<widgets>
|
||||
<decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<container style="screenlet">
|
||||
<container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditProject} ${uiLabelMap.CommonInformation}</label></container>
|
||||
<container style="screenlet-body">
|
||||
<include-form name="EditProject" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
|
||||
</container>
|
||||
</container>
|
||||
<decorator-section name="body">
|
||||
<container style="screenlet">
|
||||
<container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditProject} ${uiLabelMap.CommonInformation}</label></container>
|
||||
<container style="screenlet-body">
|
||||
<include-form name="EditProject" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
|
||||
</container>
|
||||
</container>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
</section>
|
||||
</screen>
|
||||
<screen name="projectBilling">
|
||||
<section>
|
||||
<actions>
|
||||
<set field="titleProperty" value="PageTitleProjectBilling"/>
|
||||
<set field="tabButtonItem" value="billing"/>
|
||||
<set field="labelTitleProperty" value="PageTitleProjectBilling"/>
|
||||
<set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<container style="screenlet">
|
||||
<container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleHoursNotYetBilled} ${uiLabelMap.CommonInformation}</label></container>
|
||||
<container style="screenlet-body">
|
||||
<include-form name="hoursNotYetBilled" location="component://projectmgr/widget/forms/ProjectForms.xml"/>
|
||||
</container>
|
||||
</container>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
|
||||
@@ -98,6 +98,16 @@
|
||||
<field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time type="date"/></field>
|
||||
<field name="projectName" parameter-name="workEffortName" title="${uiLabelMap.ProjectMgrProjectName}"><text/></field>
|
||||
<field name="find" title="${uiLabelMap.CommonFind}"><submit/></field>
|
||||
</form>
|
||||
<form name="hoursNotYetBilled" type="list" list-name="entryList">
|
||||
<actions>
|
||||
<script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/hoursNotYetBilled.bsh"/>
|
||||
</actions>
|
||||
<field name="workEffortName"><display/></field>
|
||||
<field name="phaseName"><display/></field>
|
||||
<field name="hours"><display/></field>
|
||||
<field name="partyId"><display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName}"/></field>
|
||||
<field name="fromDate"><display type="date"/></field>
|
||||
</form>
|
||||
<form name="ListProjects" type="list" list-name="projects" paginate-target="FindProject">
|
||||
<field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}" widget-style="buttontext">
|
||||
|
||||
Reference in New Issue
Block a user