Browse Source

Add example fee templates

master
Immanuel Onyeka 2 years ago
parent
commit
76644bf9d8
2 changed files with 49 additions and 2 deletions
  1. +3
    -2
      migrations/0_29092022_create_main_tables.sql
  2. +46
    -0
      migrations/seed.sql

+ 3
- 2
migrations/0_29092022_create_main_tables.sql View File

@@ -116,8 +116,9 @@ CREATE TABLE fee_template (
id INT AUTO_INCREMENT,
user_id INT,
branch_id INT,
amount INT NOT NULL,
type ENUM('Goverment', 'Title', 'Other'),
amount INT,
perc SMALLINT, /* Percentage of sale price instead of amount */
type ENUM('Goverment', 'Title', 'Required', 'Lender', 'Other'),
notes VARCHAR(255),
name VARCHAR(30),
/* Group heading shown in report */


+ 46
- 0
migrations/seed.sql View File

@@ -83,3 +83,49 @@ INSERT IGNORE INTO loan_type (
(SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
'manager idea'
);

INSERT IGNORE INTO fee_template (
user_id,
branch_id,
amount,
perc,
type,
auto,
name
) VALUES
(
NULL,
(SELECT id FROM branch LIMIT 1),
0,
200,
'Title',
true,
"Lender's Title Insurance"
),
(
(SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
(SELECT id FROM branch LIMIT 1),
5250,
0,
'Required',
true,
"Appraisal"
),
(
(SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
NULL,
9900,
0,
"Government",
false,
"Recording Charges"
),
(
(SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
NULL,
0,
400,
'Lender',
true,
"Processing fee"
);

Loading…
Cancel
Save