svn commit: r1768683 - in /ofbiz/branches: release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/ release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/ release15.12/applications/workeffort/script/org/ofbiz/wor...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1768683 - in /ofbiz/branches: release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/ release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/ release15.12/applications/workeffort/script/org/ofbiz/wor...

jleroux@apache.org
Author: jleroux
Date: Tue Nov  8 12:57:10 2016
New Revision: 1768683

URL: http://svn.apache.org/viewvc?rev=1768683&view=rev
Log:
Backports by hand
-----------------------------------------------------------------------------------------
Fix for: Add WorkEffort Timesheet to Invoice or to New Invoice does not work.
(OFBIZ-5636)

Thanks: Ahmad Ludin for reporting and Avnindra Sharma for the patch.

-----------------------------------------------------------------------------------------

Modified:
    ofbiz/branches/release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
    ofbiz/branches/release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
    ofbiz/branches/release15.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml

Modified: ofbiz/branches/release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=1768683&r1=1768682&r2=1768683&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml (original)
+++ ofbiz/branches/release13.07/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Tue Nov  8 12:57:10 2016
@@ -157,19 +157,24 @@ under the License.
     </simple-method>
     <simple-method method-name="createTimeEntryInvoiceItemsInline" short-description="createTimeEntryInvoiceItemsInline">
         <set field="orderBy[]" value="rateTypeId"/>
-        <get-related value-field="workEffort" relation-name="TimeEntry" list="timeEntryList" order-by-list="orderBy"/>
         <set field="invoiceItemMap.invoiceId" from-field="parameters.invoiceId"/>
         <set field="invoiceItemMap.taxableFlag" value="N"/>
         <set field="invoiceItemMap.invoiceItemTypeId" value="INV_TE_ITEM"/>
         <set field="invoiceItemMap.uomId" value="TF_hr"/>
-        <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/>
-        <get-related value-field="workEffort" relation-name="CustRequestWorkEffort" list="custRequestWorkEfforts"/>
-        <if-not-empty field="custRequestWorkEfforts">
-            <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
-            <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
-            <if-not-empty field="custRequest">
-                <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
-                <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
+        <if-not-empty field="timesheet">
+            <set field="invoiceItemMap.description" value="[Timesheet:${timesheet.timesheetId}]"/>
+        </if-not-empty>
+        <if-not-empty field="workEffort">
+            <get-related value-field="workEffort" relation-name="TimeEntry" list="timeEntryList" order-by-list="orderBy"/>
+            <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/>
+            <get-related value-field="workEffort" relation-name="CustRequestWorkEffort" list="custRequestWorkEfforts"/>
+            <if-not-empty field="custRequestWorkEfforts">
+                <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
+                <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
+                <if-not-empty field="custRequest">
+                    <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
+                    <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
+                </if-not-empty>
             </if-not-empty>
         </if-not-empty>
         <iterate entry="timeEntry" list="timeEntryList">

Modified: ofbiz/branches/release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=1768683&r1=1768682&r2=1768683&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml (original)
+++ ofbiz/branches/release14.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Tue Nov  8 12:57:10 2016
@@ -157,19 +157,24 @@ under the License.
     </simple-method>
     <simple-method method-name="createTimeEntryInvoiceItemsInline" short-description="createTimeEntryInvoiceItemsInline">
         <set field="orderBy[]" value="rateTypeId"/>
-        <get-related value-field="workEffort" relation-name="TimeEntry" list="timeEntryList" order-by-list="orderBy"/>
         <set field="invoiceItemMap.invoiceId" from-field="parameters.invoiceId"/>
         <set field="invoiceItemMap.taxableFlag" value="N"/>
         <set field="invoiceItemMap.invoiceItemTypeId" value="INV_TE_ITEM"/>
         <set field="invoiceItemMap.uomId" value="TF_hr"/>
-        <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/>
-        <get-related value-field="workEffort" relation-name="CustRequestWorkEffort" list="custRequestWorkEfforts"/>
-        <if-not-empty field="custRequestWorkEfforts">
-            <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
-            <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
-            <if-not-empty field="custRequest">
-                <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
-                <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
+        <if-not-empty field="timesheet">
+            <set field="invoiceItemMap.description" value="[Timesheet:${timesheet.timesheetId}]"/>
+        </if-not-empty>
+        <if-not-empty field="workEffort">
+            <get-related value-field="workEffort" relation-name="TimeEntry" list="timeEntryList" order-by-list="orderBy"/>
+            <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/>
+            <get-related value-field="workEffort" relation-name="CustRequestWorkEffort" list="custRequestWorkEfforts"/>
+            <if-not-empty field="custRequestWorkEfforts">
+                <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
+                <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
+                <if-not-empty field="custRequest">
+                    <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
+                    <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
+                </if-not-empty>
             </if-not-empty>
         </if-not-empty>
         <iterate entry="timeEntry" list="timeEntryList">

Modified: ofbiz/branches/release15.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=1768683&r1=1768682&r2=1768683&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml (original)
+++ ofbiz/branches/release15.12/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Tue Nov  8 12:57:10 2016
@@ -157,19 +157,24 @@ under the License.
     </simple-method>
     <simple-method method-name="createTimeEntryInvoiceItemsInline" short-description="createTimeEntryInvoiceItemsInline">
         <set field="orderBy[]" value="rateTypeId"/>
-        <get-related value-field="workEffort" relation-name="TimeEntry" list="timeEntryList" order-by-list="orderBy"/>
         <set field="invoiceItemMap.invoiceId" from-field="parameters.invoiceId"/>
         <set field="invoiceItemMap.taxableFlag" value="N"/>
         <set field="invoiceItemMap.invoiceItemTypeId" value="INV_TE_ITEM"/>
         <set field="invoiceItemMap.uomId" value="TF_hr"/>
-        <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/>
-        <get-related value-field="workEffort" relation-name="CustRequestWorkEffort" list="custRequestWorkEfforts"/>
-        <if-not-empty field="custRequestWorkEfforts">
-            <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
-            <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
-            <if-not-empty field="custRequest">
-                <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
-                <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
+        <if-not-empty field="timesheet">
+            <set field="invoiceItemMap.description" value="[Timesheet:${timesheet.timesheetId}]"/>
+        </if-not-empty>
+        <if-not-empty field="workEffort">
+            <get-related value-field="workEffort" relation-name="TimeEntry" list="timeEntryList" order-by-list="orderBy"/>
+            <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/>
+            <get-related value-field="workEffort" relation-name="CustRequestWorkEffort" list="custRequestWorkEfforts"/>
+            <if-not-empty field="custRequestWorkEfforts">
+                <first-from-list entry="custRequestWorkEffort" list="custRequestWorkEfforts"/>
+                <get-related-one value-field="custRequestWorkEffort" relation-name="CustRequest" to-value-field="custRequest"/>
+                <if-not-empty field="custRequest">
+                    <set field="invoiceItemDescription" value="${custRequest.custRequestName} [CRQ:${custRequest.custRequestId}] ${custRequest.description}"/>
+                    <set field="invoiceItemMap.description" value="${groovy:invoiceItemDescription.size()&gt;255?invoiceItemDescription.substring(0,251)+&quot; ...&quot;:invoiceItemDescription}"/>
+                </if-not-empty>
             </if-not-empty>
         </if-not-empty>
         <iterate entry="timeEntry" list="timeEntryList">