Ignore:
Timestamp:
Nov 24, 2010, 7:07:48 PM (9 years ago)
Author:
gav
Message:

Domain change: remove InventoryItem.averageDeliveryPeriod and averageDeliveryTime.

File:
1 edited

Legend:

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

    r715 r718  
    5252            def line = []
    5353            def lineNumber = 0
    54             def maxNumberOfColumns = 25
     54            def maxNumberOfColumns = 23
    5555            def inventoryParams = [:]
    5656            def inventoryProperties = ["name", "description", "comment", "unitsInStock", "reorderPoint", "reorderQuantity",
    5757                                                        "unitOfMeasure", "estimatedUnitPriceAmount", "estimatedUnitPriceCurrency",
    5858                                                        "enableReorderListing", "inventoryLocation", "inventoryStore", "site",
    59                                                         "inventoryGroup", "inventoryType", "averageDeliveryTime", "averageDeliveryPeriod",
     59                                                        "inventoryGroup", "inventoryType",
    6060                                                        "suppliersPartNumber", "preferredSupplier", "alternateSuppliers",
    6161                                                        "manufacturersPartNumber", "preferredManufacturer", "alternateManufacturers",
     
    7979            def inventoryStoreInstance
    8080            def inventoryLocationInstance
    81             def averageDeliveryPeriodInstance
    8281
    8382            def tempPreferredSupplierItemAndType = ''
     
    237236                    if(!unitOfMeasureInstance.save()) {
    238237                        log.error "Failed to create unit of measure on line: " + lineNumber
    239                         return fail(code: "inventory.import.failure", args: [lineNumber, logFileLink])
    240                     }
    241                 }
    242 
    243                 // AverageDeliveryPeriod.
    244                 if(inventoryParams.averageDeliveryPeriod) {
    245                     averageDeliveryPeriodInstance = Period.findByPeriod(inventoryParams.averageDeliveryPeriod)
    246                     if(!averageDeliveryPeriodInstance) {
    247                         log.error "Failed, not a valid delivery period on line: " + lineNumber
    248238                        return fail(code: "inventory.import.failure", args: [lineNumber, logFileLink])
    249239                    }
     
    426416                inventoryParams.inventoryType = inventoryTypeInstance
    427417                inventoryParams.unitOfMeasure = unitOfMeasureInstance
    428                 inventoryParams.averageDeliveryPeriod = averageDeliveryPeriodInstance
    429418                inventoryParams.preferredSupplier = preferredSupplierInstance
    430419                inventoryParams.preferredManufacturer = preferredManufacturerInstance
     
    524513                                        "Mechanical Stock",
    525514                                        "Consumable",
    526                                         "7", "Week(s)",
    527515                                        "123", "Multi Supplier@Local",
    528516                                        "Multi Distributors1@OEM; Multi Distributors2@Local",
     
    540528                                        "Mechanical Stock",
    541529                                        "Consumable",
    542                                         "2", "Month(s)",
    543530                                        "456KL", "Multi Supplier",
    544531                                        "Multi Distributors1; Multi Distributors2",
     
    584571            row.add(inventoryItem.inventoryGroup)
    585572            row.add(inventoryItem.inventoryType)
    586             row.add(inventoryItem.averageDeliveryTime)
    587             row.add(inventoryItem.averageDeliveryPeriod)
    588573            row.add(inventoryItem.suppliersPartNumber)
    589574
     
    827812            ["Name*", "Description", "Comment", "Units In Stock", "Reorder Point*", "Reorder Quantity", "Unit Of Measure*",
    828813            "Estimated Unit Price", "Currency", "Enable Reorder", "Location*", "Store*", "Site*", "Group*", "Type*",
    829             "Average Delivery Time", "Average Delivery Period", "Supplier's Part Number", "Preferred Supplier", "Alternate Suppliers",
     814            "Supplier's Part Number", "Preferred Supplier", "Alternate Suppliers",
    830815            "Manufacturer's Part Number", "Preferred Manufacturer", "Alternate Manufacturers", "Alternate Item", "Spare For"]
    831816    }
Note: See TracChangeset for help on using the changeset viewer.