Ignore:
Timestamp:
Jun 21, 2010, 12:23:21 PM (14 years ago)
Author:
gav
Message:

Domain change, several changes to InventoryItemPurchase.
Update views and logic to suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/InventoryPurchaseService.groovy

    r600 r605  
    150150                    return fail(code:"inventoryItemPurchase.delete.failure.payment.approved")
    151151
    152                 def startOfDay = dateUtilService.getMidnight(result.inventoryItemPurchaseInstance.dateEntered)
     152                def startOfDay = dateUtilService.getMidnight(result.inventoryItemPurchaseInstance.date)
    153153                def inventoryMovements = InventoryMovement.withCriteria {
    154154                    eq("inventoryItem", result.inventoryItemPurchaseInstance.inventoryItem )
     
    234234            result.inventoryItemPurchaseInstance.properties = params
    235235            result.inventoryItemPurchaseInstance.purchaseOrderNumber = result.inventoryItemPurchaseInstance.purchaseOrderNumber.trim()
     236            result.inventoryItemPurchaseInstance.lastUpdatedBy = authService.currentUser
    236237
    237238            if(result.inventoryItemPurchaseInstance.hasErrors() || !result.inventoryItemPurchaseInstance.save())
     
    315316            // Fetch to prevent lazy initialization error.
    316317            result.inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure
     318            result.inventoryItemPurchaseInstance.inventoryItem.inventoryLocation
    317319
    318320            if(order.hasErrors() || !order.save())
     
    339341
    340342        } // end withTransaction
    341     } // save()
     343    } // receiveSave()
    342344
    343345    def approveInvoicePaymentSave(params) {
Note: See TracChangeset for help on using the changeset viewer.