Changeset 217
- Timestamp:
- Dec 4, 2009, 2:08:20 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/InventoryMovement.groovy
r210 r217 1 1 class InventoryMovement { 2 Person person 2 3 InventoryItem inventoryItem 3 4 InventoryMovementType inventoryMovementType … … 13 14 inventoryMovementType() 14 15 task(nullable:true) 16 person() 15 17 date() 16 18 } 17 19 18 20 String toString() { 19 "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')} "21 "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')} by ${person}." 20 22 } 21 23 } -
trunk/grails-app/services/InventoryMovementService.groovy
r191 r217 2 2 3 3 boolean transactional = false 4 5 def personService 4 6 5 7 def reverseMove(params) { … … 66 68 result.inventoryMovementInstance = new InventoryMovement(params) 67 69 70 result.inventoryMovementInstance.person = personService.currentUser 71 68 72 if(result.inventoryMovementInstance.validate()) { 69 73 def inventoryItem = InventoryItem.lock(result.inventoryMovementInstance.inventoryItem.id) -
trunk/grails-app/views/inventoryMovement/create.gsp
r178 r217 64 64 <tr class="prop"> 65 65 <td valign="top" class="name"> 66 <label for="person">Person:</label> 67 </td> 68 <td valign="top" class="value ${hasErrors(bean:inventoryMovementInstance,field:'person','errors')}"> 69 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${inventoryMovementInstance?.person?.id}" ></g:select> 70 </td> 71 </tr> 72 73 <tr class="prop"> 74 <td valign="top" class="name"> 66 75 <label for="date">Date:</label> 67 76 </td> -
trunk/grails-app/views/inventoryMovement/edit.gsp
r178 r217 67 67 <tr class="prop"> 68 68 <td valign="top" class="name"> 69 <label for="person">Person:</label> 70 </td> 71 <td valign="top" class="value ${hasErrors(bean:inventoryMovementInstance,field:'person','errors')}"> 72 <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${inventoryMovementInstance?.person?.id}" ></g:select> 73 </td> 74 </tr> 75 76 <tr class="prop"> 77 <td valign="top" class="name"> 69 78 <label for="date">Date:</label> 70 79 </td> -
trunk/grails-app/views/inventoryMovement/list.gsp
r178 r217 31 31 <th>Task</th> 32 32 33 < g:sortableColumn property="date" title="Date" />34 33 <th>Person</th> 34 35 35 </tr> 36 36 </thead> … … 49 49 <td>${fieldValue(bean:inventoryMovementInstance, field:'task')}</td> 50 50 51 <td>${fieldValue(bean:inventoryMovementInstance, field:' date')}</td>51 <td>${fieldValue(bean:inventoryMovementInstance, field:'person')}</td> 52 52 53 53 </tr> -
trunk/grails-app/views/inventoryMovement/show.gsp
r178 r217 58 58 59 59 <tr class="prop"> 60 <td valign="top" class="name">Person:</td> 61 62 <td valign="top" class="value"><g:link controller="person" action="show" id="${inventoryMovementInstance?.person?.id}">${inventoryMovementInstance?.person?.encodeAsHTML()}</g:link></td> 63 64 </tr> 65 66 <tr class="prop"> 60 67 <td valign="top" class="name">Date:</td> 61 68 -
trunk/grails-app/views/inventoryMovementDetailed/show.gsp
r177 r217 42 42 <td valign="top" class="name">Quantity:</td> 43 43 44 <td valign="top" class="value">${fieldValue(bean:inventoryMovementInstance, field:'quantity')}</td> 44 <td valign="top" class="value"> 45 ${fieldValue(bean:inventoryMovementInstance, field:'quantity')} 46 ${inventoryMovementInstance.inventoryItem.unitOfMeasure.encodeAsHTML()} 47 </td> 45 48 46 49 </tr> … … 68 71 69 72 </tr> 70 73 74 <tr class="prop"> 75 <td valign="top" class="name">Person:</td> 76 77 <td valign="top" class="value">${inventoryMovementInstance?.person?.encodeAsHTML()}</td> 78 79 </tr> 80 71 81 </tbody> 72 82 </table>
Note: See TracChangeset
for help on using the changeset viewer.