Ignore:
Timestamp:
Feb 22, 2010, 6:29:13 PM (15 years ago)
Author:
gav
Message:

Add address feature.

Location:
trunk/grails-app/services
Files:
1 added
1 edited

Legend:

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

    r394 r397  
    5858        createBaseUnitsOfMeasure()
    5959        createBasePeriods()
    60         createBaseSupplierType()
    61         createBaseManufacturerType()
     60        createBaseSupplierTypes()
     61        createBaseManufacturerTypes()
     62        createBaseAddressTypes()
    6263
    6364        // Tasks
     
    470471    }
    471472
    472     def createBaseSupplierType() {
     473    def createBaseSupplierTypes() {
    473474
    474475        // SupplierType
     
    486487    }
    487488
    488     def createBaseManufacturerType() {
     489    def createBaseManufacturerTypes() {
    489490
    490491        // ManufacturerType
     
    501502        saveAndTest(manufacturerTypeInstance)
    502503
     504    }
     505
     506    def createBaseAddressTypes() {
     507
     508        // AddressType
     509        def addressTypeInstance
     510
     511        // AddressType #1
     512        addressTypeInstance = new AddressType(name: "Postal",
     513                                                                                description: "A postal address.")
     514        saveAndTest(addressTypeInstance)
     515
     516        // AddressType #2
     517        addressTypeInstance = new AddressType(name: "Physical",
     518                                                                                description: "A physical address.")
     519        saveAndTest(addressTypeInstance)
     520
     521        // AddressType #3
     522        addressTypeInstance = new AddressType(name: "Postal & Physical",
     523                                                                                description: "An address that is both the postal and physical address.")
     524        saveAndTest(addressTypeInstance)
     525
     526        // AddressType #4
     527        addressTypeInstance = new AddressType(name: "Invoice",
     528                                                                                description: "An address to send invoices to.")
     529        saveAndTest(addressTypeInstance)
     530
     531        // AddressType #5
     532        addressTypeInstance = new AddressType(name: "Delivery",
     533                                                                                description: "An address to send deliveries to.")
     534        saveAndTest(addressTypeInstance)
    503535    }
    504536
Note: See TracChangeset for help on using the changeset viewer.