Browse Source

Changes Personal to Stand Time and many other things:

* Updates populate
* Makes Stand Time a special transaction_type_id
* Adds new definitions to database_functions
devel
Jonathan Rosenbaum 7 years ago
parent
commit
1805449b50
  1. 10
      Connections/database_functions.php
  2. 9
      sql/populate.sql

10
Connections/database_functions.php

@ -40,6 +40,12 @@ define("MEMBERSHIP_DAYS",2);
// Define how long a patron remains a member if they purchase a membership.
define("PURCHASED_MEMBERSHIP_DAYS",365);
/*********
STAND TIME
**********/
// Determines the behaviour of Stand Time (transaction_type_id)
define("STAND_TIME_HOURLY_RATE",10);
/********************************
SWEAT EQUITY / VOLUNTEER BENEFITS
*********************************/
@ -65,6 +71,8 @@ define("VOLUNTEER_HOUR_VALUE",8);
define("VOLUNTEER_DISCOUNT",25);
define("SPECIAL_VOLUNTEER_HOURS_QUALIFICATION",100);
define("SPECIAL_VOLUNTEER_DISCOUNT",50);
// Determines the behaviour of Bicycles (transaction_type_id) for volunteer to earn-a-bike purchases
define("EARN_A_BIKE_LIMIT",1);
// Map transaction_type_id for transaction to the type of benefits desired
@ -172,7 +180,7 @@ define("ACCOUNTING_GROUP", "Sales");
define("DEFAULT_TRANSACTION_TYPE", "Sale - Used Parts");
// shop_user_role
define("DEFAULT_SHOP_USER", "Personal");
define("DEFAULT_SHOP_USER", "Stand Time");
/* Change Fund - A specific amount of money for the purpose of making change.
The amount on hand should remain the same at all times;

9
sql/populate.sql

@ -32,6 +32,9 @@ INSERT INTO shop_types (shop_type_id, list_order) VALUES
--
-- default select value for shop user may be set in Connections/database_functions.php,
-- a shop_type_id with the same name needs to exist in order for this to work.
--
-- Stand Time is a special type of user_role_id (assuming all 0's) where hours are figured out automatically in the
-- special Stand Time transaction_type_id.
ALTER TABLE shop_user_roles ADD other_volunteer tinyint(1) NOT NULL DEFAULT '0';
DELETE FROM shop_user_roles;
@ -39,7 +42,7 @@ INSERT INTO shop_user_roles (
shop_user_role_id, hours_rank, volunteer, sales, paid, other_volunteer
) VALUES
("Coordinator",0,1,1,0,0),
("Personal",0,0,0,0,0),
("Stand Time",0,0,0,0,0),
("Volunteer",0,1,0,0,0),
("Greeter",0,1,1,0,0),
("Staff",0,0,1,1,0),
@ -161,6 +164,10 @@ INSERT INTO contacts (
-- Bicycles (transaction_type_id) is a special transaction type that can have limits applied to how many bicycles can be
-- earned with volunteer hour benefits (transforming volunteer hours into cash).
--
-- STAND TIME
-- Stand Time (transaction_type_id) is a special transaction type to automatically figures out the amount that needs to be paid based
-- on the configured hourly rate.
--
-- DONATIONS are best complimented with anonymous, see below.
--
-- "show_payment" shows cash, credit, and check payment types if selected.

Loading…
Cancel
Save