Author: hansbak
Date: Tue Oct 7 20:30:10 2008 New Revision: 702690 URL: http://svn.apache.org/viewvc?rev=702690&view=rev Log: create new invoiceItem, not when rateType changes but when the reateAmount changes Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=702690&r1=702689&r2=702690&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml (original) +++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Tue Oct 7 20:30:10 2008 @@ -154,7 +154,7 @@ <or> <and> <not><if-empty field="parameters.thruDate"/></not> - <if-compare-field operator="less" field="timeEntry.fromDate" to-field="parameters.thruDate"></if-compare-field> + <if-compare-field operator="less" field="timeEntry.fromDate" to-field="parameters.thruDate"/> </and> <if-empty field="parameters.thruDate"/> </or> @@ -164,23 +164,23 @@ <if-compare field="invoice.statusId" operator="equals" value="INVOICE_IN_PROCESS"> <!-- only add to invoice if it is not already on an invoice--> <if-empty field="timeEntry.invoiceId"> + <set field="getTimeEntryRate.timeEntryId" from-field="timeEntry.timeEntryId"/> + <set field="getTimeEntryRate.currencyUomId" from-field="invoice.currencyUomId"/> + <call-service service-name="getTimeEntryRate" in-map-name="getTimeEntryRate"> + <result-to-field result-name="rateAmount"/> + </call-service> <!-- check if the RateTypeId changed or the first time entry record --> <if> <condition> <or> - <if-empty field="oldRateTypeId"/> + <if-empty field="oldRateAmount"/> <and> - <not><if-empty field="oldRateTypeId"/></not> - <if-compare-field field="timeEntry.rateTypeId" operator="not-equals" to-field="oldRateTypeId"/> + <not><if-empty field="OldRateAmount"/></not> + <if-compare-field field="rateAmount" operator="not-equals" to-field="oldRateAmount"/> </and> </or> </condition> <then> - <set field="getTimeEntryRate.timeEntryId" from-field="timeEntry.timeEntryId"/> - <set field="getTimeEntryRate.currencyUomId" from-field="invoice.currencyUomId"/> - <call-service service-name="getTimeEntryRate" in-map-name="getTimeEntryRate"> - <result-to-field result-name="rateAmount"/> - </call-service> <set field="invoiceItemMap.amount" from-field="rateAmount" default-value="0.0" type="Double"/> <if-compare field="parameters.combineInvoiceItem" operator="equals" value="Y" > <set field="invoiceItemMap.description" value="${workEffort.workEffortName} [Task:${workEffort.workEffortId}]"/> @@ -210,7 +210,7 @@ </if-compare> </else> </if> - <set field="oldRateTypeId" from-field="timeEntry.rateTypeId"/> + <set field="oldRateAmount" from-field="rateAmount"/> <!-- create an invoiceitem for every time entry --> <if-compare field="parameters.combineInvoiceItem" operator="not-equals" value="Y" > |
Free forum by Nabble | Edit this page |