@ -146,36 +146,6 @@ unless Rails.env.test?
child_organisation : managing_agent2 ,
)
if ( Rails . env . development? || Rails . env . review? ) && SalesLog . count . zero?
SalesLog . find_or_create_by! (
saledate : Date . new ( 2023 , 1 , 1 ) ,
purchid : " 1 " ,
ownershipsch : 1 ,
type : 2 ,
jointpur : 1 ,
jointmore : 1 ,
)
SalesLog . find_or_create_by! (
saledate : Date . new ( 2023 , 1 , 1 ) ,
purchid : " 1 " ,
ownershipsch : 2 ,
type : 9 ,
jointpur : 1 ,
jointmore : 1 ,
)
SalesLog . find_or_create_by! (
saledate : Date . new ( 2023 , 1 , 1 ) ,
purchid : " 1 " ,
ownershipsch : 3 ,
type : 10 ,
companybuy : 1 ,
)
pp " Seeded a sales log of each type "
end
if Rails . env . development? || Rails . env . review?
User . find_or_create_by! (
name : " Provider " ,
@ -197,7 +167,7 @@ unless Rails.env.test?
user . confirmed_at = Time . zone . now
end
User . find_or_create_by! (
support_user = User . find_or_create_by! (
name : " Support " ,
email : " support@example.com " ,
organisation : org ,
@ -210,6 +180,42 @@ unless Rails.env.test?
pp " Seeded 3 dummy users "
end
if ( Rails . env . development? || Rails . env . review? ) && SalesLog . count . zero?
SalesLog . find_or_create_by! (
created_by : support_user ,
owning_organisation : org ,
saledate : Date . new ( 2023 , 1 , 1 ) ,
purchid : " 1 " ,
ownershipsch : 1 ,
type : 2 ,
jointpur : 1 ,
jointmore : 1 ,
)
SalesLog . find_or_create_by! (
created_by : support_user ,
owning_organisation : org ,
saledate : Date . new ( 2023 , 1 , 1 ) ,
purchid : " 1 " ,
ownershipsch : 2 ,
type : 9 ,
jointpur : 1 ,
jointmore : 1 ,
)
SalesLog . find_or_create_by! (
created_by : support_user ,
owning_organisation : org ,
saledate : Date . new ( 2023 , 1 , 1 ) ,
purchid : " 1 " ,
ownershipsch : 3 ,
type : 10 ,
companybuy : 1 ,
)
pp " Seeded a sales log of each type "
end
if Rails . env . development? || Rails . env . review?
dummy_org = Organisation . find_or_create_by! (
name : " FooBar LTD " ,