dscf-credit 0.4.55 → 0.4.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d03d8c1db12a3dddd204a85a1584050c51e268e1533ca2b24ee9ca9c680145c
4
- data.tar.gz: 0c55a66f160d74298f48fd1aff8b50a782e8c439fa09ba71bd910decbf47b5f4
3
+ metadata.gz: 4bcd4921c638c87e3e338d719bd993f8bc85cdd6bb79dd4f851ae22af6a51b35
4
+ data.tar.gz: 04caed6c06626e1994fd53f3d9344fc1ddf1573a9fa2a424f6d006700a81eedb
5
5
  SHA512:
6
- metadata.gz: ccbe643cd93d1145184999edcbfd8eb45faa8c0902e7cfaa8e6c11811d583f283b957ced5144bebed30eb4cbcd79a7c6b507dc2ee39d45072833582812928d1b
7
- data.tar.gz: 832270b58285a20fd5952d5e8ff6c97418d55b2548abb8cd584c4ada48ea8d47df73869e45aa9701589bdcb9fd2eca633019f54c4a0c867bb9239353b8a70a0d
6
+ metadata.gz: 70283c3783f0e65ca4f1855db5f019cf21b68ec5a6d80426ff84b7a38639c15ebcf1ecc04af3df0847d0def9f0675ccaf7d6dfdbbe44b948e362bf029c9a099f
7
+ data.tar.gz: 7dda7607f319c8e7a30786c77940d3d10c2505138e8dbe59b5dbd973ae9eb51d2a477402668f590812415431f4faa56d511af624ed3f3de9b970467e2d8faafc
data/db/seeds.rb CHANGED
@@ -1,5 +1,12 @@
1
1
  puts "Starting minimal DSCF Credit seed..."
2
2
 
3
+ puts "Seeding business types..."
4
+ if defined?(Dscf::Core::BusinessType)
5
+ wholesaler = Dscf::Core::BusinessType.find_or_create_by(name: 'wholesaler')
6
+ puts "✓ Business types created/found"
7
+ end
8
+
9
+
3
10
  puts "Registering dscf_credit permissions..."
4
11
  if defined?(Dscf::Core::PermissionRegistry)
5
12
  Dscf::Core::PermissionRegistry.register("dscf_credit") do
@@ -83,5 +90,29 @@ bunna_bank = Dscf::Credit::Bank.find_or_create_by!(registration_number: 'BUN001'
83
90
  bank.status = 'active'
84
91
  end
85
92
 
93
+ bunna_head_office = Dscf::Credit::BankBranch.find_or_create_by(bank: bunna_bank, branch_name: 'Head Office') do |branch|
94
+ branch.branch_code = 'BUN-HO-001'
95
+ branch.branch_address = 'Churchill Avenue, Addis Ababa'
96
+ branch.city = 'Addis Ababa'
97
+ branch.country = 'Ethiopia'
98
+ branch.contact_email = 'headoffice@bunnabank.com'
99
+ branch.contact_phone = '+251115510001'
100
+ branch.status = 'active'
101
+ end
102
+
103
+ if defined?(Dscf::Core::Business) && defined?(Dscf::Core::BusinessType)
104
+ business1 = Dscf::Core::Business.find_or_create_by(
105
+ user_id: admin_user.id,
106
+ business_type_id: wholesaler.id
107
+ ) do |business|
108
+ business.name = 'Individual Trading Business'
109
+ business.description = 'Individual business for trading services'
110
+ business.contact_email = admin_user.email
111
+ business.contact_phone = admin_user.phone
112
+ end
113
+
114
+ puts "✓ Businesses created/found"
115
+ end
116
+
86
117
  puts "✓ Bank created/found: #{bunna_bank.name}"
87
118
  puts "Minimal seed completed successfully."
@@ -1,5 +1,5 @@
1
1
  module Dscf
2
2
  module Credit
3
- VERSION = "0.4.55"
3
+ VERSION = "0.4.56"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dscf-credit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.55
4
+ version: 0.4.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adoniyas