{ts escape="sql"}The information you provide will NOT be shared with any third party organisations.{/ts}
{ts escape="sql"}Thank you for getting involved in our campaign!{/ts}
'), (3, 'participant_status', 'Participant', '{ts escape="sql"}Participant Status{/ts}', 0, 1, NULL), (4, 'new_individual', 'Individual,Contact', '{ts escape="sql"}New Individual{/ts}' , 0, 1, NULL), (5, 'new_organization', 'Organization,Contact','{ts escape="sql"}New Organization{/ts}' , 0, 1, NULL), (6, 'new_household', 'Household,Contact', '{ts escape="sql"}New Household{/ts}' , 0, 1, NULL), (7, 'summary_overlay', 'Contact', '{ts escape="sql"}Summary Overlay{/ts}' , 0, 1, NULL), (8, 'shared_address', 'Contact', '{ts escape="sql"}Shared Address{/ts}' , 0, 1, NULL), (9, 'on_behalf_organization', 'Contact,Organization','{ts escape="sql"}On Behalf Of Organization{/ts}', 0, 1, NULL), (10, 'contribution_batch_entry', 'Contribution', '{ts escape="sql"}Contribution Bulk Entry{/ts}' , 0, 1, NULL), (11, 'membership_batch_entry', 'Membership', '{ts escape="sql"}Membership Bulk Entry{/ts}' , 0, 1, NULL), (12, 'event_registration', 'Individual, Contact', '{ts escape="sql"}Your Registration Info{/ts}', 0, 0, NULL); INSERT INTO civicrm_uf_join (is_active,module,entity_table,entity_id,weight,uf_group_id) VALUES (1, 'User Registration',NULL, NULL,1,1), (1, 'User Account', NULL, NULL, 1, 1), (1, 'Profile', NULL, NULL, 1, 1), (1, 'Profile', NULL, NULL, 2, 2), (1, 'Profile', NULL, NULL, 3, 4), (1, 'Profile', NULL, NULL, 4, 5), (1, 'Profile', NULL, NULL, 5, 6), (1, 'Profile', NULL, NULL, 6, 7), (1, 'Profile', NULL, NULL, 7, 8), (1, 'Profile', NULL, NULL, 8, 9), (1, 'Profile', NULL, NULL, 9, 10), (1, 'Profile', NULL, NULL, 9, 11), (1, 'Profile', NULL, NULL, 9, 12); INSERT INTO civicrm_uf_field ( uf_group_id, field_name, is_required, is_reserved, weight, visibility, in_selector, is_searchable, location_type_id, label, field_type, help_post, phone_type_id ) VALUES ( 1, 'first_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}First Name{/ts}', 'Individual', NULL, NULL), ( 1, 'last_name', 1, 0, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Last Name{/ts}', 'Individual', NULL, NULL), ( 1, 'street_address', 0, 0, 3, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}Street Address (Home){/ts}', 'Contact', NULL, NULL), ( 1, 'city', 0, 0, 4, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}City (Home){/ts}', 'Contact', NULL, NULL), ( 1, 'postal_code', 0, 0, 5, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}Postal Code (Home){/ts}', 'Contact', NULL, NULL), ( 1, 'country', 0, 0, 6, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}Country (Home){/ts}', 'Contact', NULL, NULL), ( 1, 'state_province', 0, 0, 7, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}State (Home){/ts}', 'Contact', NULL, NULL), ( 2, 'first_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}First Name{/ts}', 'Individual', NULL, NULL), ( 2, 'last_name', 1, 0, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Last Name{/ts}', 'Individual', NULL, NULL), ( 2, 'email', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL), ( 3, 'participant_status', 1, 1, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Participant Status{/ts}', 'Participant', NULL, NULL), ( 4, 'first_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}First Name{/ts}', 'Individual', NULL, NULL), ( 4, 'last_name', 1, 0, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Last Name{/ts}', 'Individual', NULL, NULL), ( 4, 'email', 0, 0, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL), ( 5, 'organization_name', 1, 0, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Organization Name{/ts}', 'Organization',NULL, NULL), ( 5, 'email', 0, 0, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL), ( 6, 'household_name', 1, 0, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Household Name{/ts}', 'Household', NULL, NULL), ( 6, 'email', 0, 0, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL), ( 7, 'phone', 1 ,0 ,1 ,'User and User Admin Only' ,0 ,0 ,1 ,'{ts escape="sql"}Home Phone{/ts}' ,'Contact' ,NULL, 1 ), ( 7, 'phone', 1 ,0 ,2 ,'User and User Admin Only' ,0 ,0 ,1 ,'{ts escape="sql"}Home Mobile{/ts}' ,'Contact' ,NULL, 2 ), ( 7, 'street_address', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Primary Address{/ts}', 'Contact', NULL, NULL), ( 7, 'city', 1, 0, 4, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}City{/ts}', 'Contact', NULL, NULL), ( 7, 'state_province', 1, 0, 5, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}State{/ts}', 'Contact', NULL, NULL), ( 7, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Postal Code{/ts}', 'Contact', NULL, NULL), ( 7, 'email', 1, 0, 7, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Primary Email{/ts}', 'Contact', NULL, NULL), ( 7, 'group', 1, 0, 8, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Groups{/ts}', 'Contact', NULL, NULL), ( 7, 'tag', 1, 0, 9, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Tags{/ts}', 'Contact', NULL, NULL), ( 7, 'gender_id', 1 ,0 ,10 ,'User and User Admin Only' ,0 ,0 ,NULL, '{ts escape="sql"}Gender{/ts}' ,'Individual' ,NULL, NULL), ( 7, 'birth_date', 1 ,0 ,11 ,'User and User Admin Only' ,0 ,0 ,NULL, '{ts escape="sql"}Date of Birth{/ts}' ,'Individual' ,NULL, NULL), ( 8, 'street_address', 1, 1, 1, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}Street Address (Home){/ts}', 'Contact', NULL, NULL), ( 8, 'city', 1, 1, 2, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}City (Home){/ts}', 'Contact', NULL, NULL), ( 8, 'postal_code', 0, 0, 3, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}Postal Code (Home){/ts}', 'Contact', NULL, NULL), ( 8, 'country', 0, 0, 4, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}Country (Home){/ts}', 'Contact', NULL, NULL), ( 8, 'state_province', 0, 0, 5, 'User and User Admin Only', 0, 0, 1, '{ts escape="sql"}State (Home){/ts}', 'Contact', NULL, NULL), ( 9, 'organization_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Organization Name{/ts}', 'Organization',NULL, NULL), ( 9, 'phone', 1, 0, 2, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}Phone (Main) {/ts}', 'Contact', NULL, 1), ( 9, 'email', 1, 0, 3, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}Email (Main) {/ts}', 'Contact', NULL, NULL), ( 9, 'street_address', 1, 0, 4, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}Street Address{/ts}', 'Contact', NULL, NULL), ( 9, 'city', 1, 0, 5, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}City{/ts}', 'Contact', NULL, NULL), ( 9, 'postal_code', 1, 0, 6, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}Postal Code{/ts}', 'Contact', NULL, NULL), ( 9, 'country', 1, 0, 7, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}Country{/ts}', 'Contact', NULL, NULL), ( 9, 'state_province', 1, 0, 8, 'User and User Admin Only', 0, 0, 3, '{ts escape="sql"}State / Province{/ts}', 'Contact', NULL, NULL), ( 10, 'financial_type', 1, 1, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Type{/ts}', 'Contribution', NULL, NULL ), ( 10, 'total_amount', 1, 1, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Amount{/ts}', 'Contribution', NULL, NULL ), ( 10, 'contribution_status_id', 1, 1, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Status{/ts}', 'Contribution', NULL, NULL ), ( 10, 'receive_date', 1, 1, 4, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Received{/ts}', 'Contribution', NULL, NULL ), ( 10, 'contribution_source', 0, 0, 5, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Source{/ts}', 'Contribution', NULL, NULL ), ( 10, 'payment_instrument', 0, 0, 6, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Paid By{/ts}', 'Contribution', NULL, NULL ), ( 10, 'check_number', 0, 0, 7, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Check Number{/ts}', 'Contribution', NULL, NULL ), ( 10, 'send_receipt', 0, 0, 8, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Send Receipt{/ts}', 'Contribution', NULL, NULL ), ( 10, 'invoice_id', 0, 0, 9, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Invoice ID{/ts}', 'Contribution', NULL, NULL ), ( 10, 'soft_credit', 0, 0, 10, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit{/ts}', 'Contribution', NULL, NULL ), ( 11, 'membership_type', 1, 1, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Type{/ts}', 'Membership', NULL, NULL ), ( 11, 'join_date', 1, 1, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Member Since{/ts}', 'Membership', NULL, NULL ), ( 11, 'membership_start_date', 0, 1, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Start Date{/ts}', 'Membership', NULL, NULL ), ( 11, 'membership_end_date', 0, 1, 4, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}End Date{/ts}', 'Membership', NULL, NULL ), ( 11, 'membership_source', 0, 0, 5, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Source{/ts}', 'Membership', NULL, NULL ), ( 11, 'send_receipt', 0, 0, 6, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Send Receipt{/ts}', 'Membership', NULL, NULL ), ( 11, 'financial_type', 1, 1, 7, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Financial Type{/ts}', 'Membership', NULL, NULL ), ( 11, 'total_amount', 1, 1, 8, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Amount{/ts}', 'Membership', NULL, NULL ), ( 11, 'receive_date', 1, 1, 9, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Received{/ts}', 'Membership', NULL, NULL ), ( 11, 'payment_instrument', 0, 0, 10, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Paid By{/ts}', 'Membership', NULL, NULL ), ( 11, 'check_number', 0, 0, 11, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Check Number{/ts}', 'Membership', NULL, NULL ), ( 11, 'contribution_status_id', 1, 1, 12, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Payment Status{/ts}', 'Membership', NULL, NULL ), ( 11, 'soft_credit', 0, 0, 13, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit{/ts}', 'Membership', NULL, NULL ), ( 12, 'first_name', 1, 0, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}First Name{/ts}', 'Individual', NULL, NULL), ( 12, 'last_name', 1, 0, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Last Name{/ts}', 'Individual', NULL, NULL), ( 12, 'email', 1, 0, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL); INSERT INTO civicrm_participant_status_type (id, name, label, class, is_reserved, is_active, is_counted, weight, visibility_id) VALUES (1, 'Registered', '{ts escape="sql"}Registered{/ts}', 'Positive', 1, 1, 1, 1, 1 ), (2, 'Attended', '{ts escape="sql"}Attended{/ts}', 'Positive', 0, 1, 1, 2, 2 ), (3, 'No-show', '{ts escape="sql"}No-show{/ts}', 'Negative', 0, 1, 0, 3, 2 ), (4, 'Cancelled', '{ts escape="sql"}Cancelled{/ts}', 'Negative', 1, 1, 0, 4, 2 ), (5, 'Pending from pay later', '{ts escape="sql"}Pending from pay later{/ts}', 'Pending', 1, 1, 1, 5, 2 ), (6, 'Pending from incomplete transaction', '{ts escape="sql"}Pending from incomplete transaction{/ts}', 'Pending', 1, 1, 0, 6, 2 ), (7, 'On waitlist', '{ts escape="sql"}On waitlist{/ts}', 'Waiting', 1, 0, 0, 7, 2 ), (8, 'Awaiting approval', '{ts escape="sql"}Awaiting approval{/ts}', 'Waiting', 1, 0, 1, 8, 2 ), (9, 'Pending from waitlist', '{ts escape="sql"}Pending from waitlist{/ts}', 'Pending', 1, 0, 1, 9, 2 ), (10, 'Pending from approval', '{ts escape="sql"}Pending from approval{/ts}', 'Pending', 1, 0, 1, 10, 2 ), (11, 'Rejected', '{ts escape="sql"}Rejected{/ts}', 'Negative', 1, 0, 0, 11, 2 ), (12, 'Expired', '{ts escape="sql"}Expired{/ts}', 'Negative', 1, 1, 0, 12, 2 ), (13, 'Pending in cart', '{ts escape="sql"}Pending in cart{/ts}', 'Pending', 1, 1, 0, 13, 2 ); -- CRM-8150 INSERT INTO civicrm_action_mapping (entity, entity_value, entity_value_label, entity_status, entity_status_label, entity_date_start, entity_date_end, entity_recipient) VALUES ( 'civicrm_activity', 'activity_type', 'Activity Type', 'activity_status', 'Activity Status', 'activity_date_time', NULL, 'activity_contacts'), ( 'civicrm_participant', 'event_type', 'Event Type', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'), ( 'civicrm_participant', 'civicrm_event', 'Event Name', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'), ( 'civicrm_membership', 'civicrm_membership_type', 'Membership Type', 'auto_renew_options', 'Auto Renew Options', 'membership_join_date', 'membership_end_date', NULL), ( 'civicrm_participant', 'event_template', 'Event Template', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'); INSERT INTO `civicrm_contact_type` (`id`, `name`, `label`,`image_URL`, `parent_id`, `is_active`,`is_reserved`) VALUES ( 1, 'Individual' , '{ts escape="sql"}Individual{/ts}' , NULL, NULL, 1, 1), ( 2, 'Household' , '{ts escape="sql"}Household{/ts}' , NULL, NULL, 1, 1), ( 3, 'Organization', '{ts escape="sql"}Organization{/ts}', NULL, NULL, 1, 1); {include file='civicrm_msg_template.tpl'} -- CRM-8358 INSERT INTO `civicrm_job` ( domain_id, run_frequency, last_run, name, description, api_entity, api_action, parameters, is_active ) VALUES ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Send Scheduled Mailings{/ts}', '{ts escape="sql" skip="true"}Sends out scheduled CiviMail mailings{/ts}', 'job', 'process_mailing', NULL, 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Fetch Bounces{/ts}', '{ts escape="sql" skip="true"}Fetches bounces from mailings and writes them to mailing statistics{/ts}', 'job', 'fetch_bounces', NULL, 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Process Inbound Emails{/ts}', '{ts escape="sql" skip="true"}Inserts activity for a contact or a case by retrieving inbound emails from a mail directory{/ts}', 'job', 'fetch_activities', NULL, 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Process Pledges{/ts}', '{ts escape="sql" skip="true"}Updates pledge records and sends out reminders{/ts}', 'job', 'process_pledge','{ts escape="sql" skip="true"}send_reminders=[1 or 0] optional- 1 to send payment reminders{/ts}', 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Geocode and Parse Addresses{/ts}', '{ts escape="sql" skip="true"}Retrieves geocodes (lat and long) and / or parses street addresses (populates street number, street name, etc.){/ts}', 'job', 'geocode', '{ts escape="sql" skip="true"}geocoding=[1 or 0] required parse=[1 or 0] required start=[contact ID] optional-begin with this contact ID end=[contact ID] optional-process contacts with IDs less than this throttle=[1 or 0] optional-1 adds five second sleep{/ts}', 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Update Greetings and Addressees{/ts}','{ts escape="sql" skip="true"}Goes through contact records and updates email and postal greetings, or addressee value{/ts}', 'job', 'update_greeting','{ts escape="sql" skip="true"}ct=[Individual or Household or Organization] required gt=[email_greeting or postal_greeting or addressee] required force=[0 or 1] optional-0 update contacts with null value, 1 update all{/ts}', 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Mail Reports{/ts}', '{ts escape="sql" skip="true"}Generates and sends out reports via email{/ts}', 'job', 'mail_report','{ts escape="sql" skip="true"}instanceId=[ID of report instance] required format=[csv or print] optional-output CSV or print-friendly HTML, else PDF{/ts}', 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Send Scheduled Reminders{/ts}', '{ts escape="sql" skip="true"}Sends out scheduled reminders via email{/ts}', 'job', 'send_reminder', NULL, 0), ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Update Participant Statuses{/ts}', '{ts escape="sql" skip="true"}Updates pending event participant statuses based on time{/ts}', 'job', 'process_participant', NULL, 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Update Membership Statuses{/ts}', '{ts escape="sql" skip="true"}Updates membership statuses. WARNING: Membership renewal reminders have been migrated to the Schedule Reminders functionality, which supports multiple renewal reminders.{/ts}', 'job', 'process_membership', NULL, 0), ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Process Survey Respondents{/ts}', '{ts escape="sql" skip="true"}Releases reserved survey respondents when they have been reserved for longer than the Release Frequency days specified for that survey.{/ts}', 'job', 'process_respondent',NULL, 0), ( @domainID, 'Hourly' , NULL, '{ts escape="sql" skip="true"}Clean-up Temporary Data and Files{/ts}','{ts escape="sql" skip="true"}Removes temporary data and files, and clears old data from cache tables. Recommend running this job every hour to help prevent database and file system bloat.{/ts}', 'job', 'cleanup', NULL, 0), ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Send Scheduled SMS{/ts}', '{ts escape="sql" skip="true"}Sends out scheduled SMS{/ts}', 'job', 'process_sms', NULL, 0), ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Rebuild Smart Group Cache{/ts}', '{ts escape="sql" skip="true"}Rebuilds the smart group cache.{/ts}', 'job', 'group_rebuild', '{ts escape="sql" skip="true"}limit=Number optional-Limit the number of smart groups rebuild{/ts}', 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Disable expired relationships{/ts}','{ts escape="sql" skip="true"}Disables relationships that have expired (ie. those relationships whose end date is in the past).{/ts}', 'job', 'disable_expired_relationships', NULL, 0), ( @domainID, 'Daily' , NULL, '{ts escape="sql" skip="true"}Validate Email Address from Mailings.{/ts}', '{ts escape="sql" skip="true"}Updates the reset_date on an email address to indicate that there was a valid delivery to this email address.{/ts}', 'mailing', 'update_email_resetdate', '{ts escape="sql" skip="true"}minDays, maxDays=Consider mailings that have completed between minDays and maxDays{/ts}', 0); SELECT @option_value_rel_id := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Income Account is'; SELECT @option_value_rel_id_exp := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Expense Account is'; SELECT @option_value_rel_id_ar := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Accounts Receivable Account is'; SELECT @option_value_rel_id_as := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Asset Account is'; SELECT @option_value_rel_id_cg := value FROM civicrm_option_value WHERE option_group_id = @option_group_id_arel AND name = 'Cost of Sales Account is'; SELECT @financial_type_id_dtn := max(id) FROM civicrm_financial_type WHERE name = '{ts escape="sql"}Donation{/ts}'; SELECT @financial_type_id_md := max(id) FROM civicrm_financial_type WHERE name = '{ts escape="sql"}Member Dues{/ts}'; SELECT @financial_type_id_cc := max(id) FROM civicrm_financial_type WHERE name = '{ts escape="sql"}Campaign Contribution{/ts}'; SELECT @financial_type_id_ef := max(id) FROM civicrm_financial_type WHERE name = '{ts escape="sql"}Event Fee{/ts}'; SELECT @financial_account_id_dtn := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Donation{/ts}'; SELECT @financial_account_id_md := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Member Dues{/ts}'; SELECT @financial_account_id_cc := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Campaign Contribution{/ts}'; SELECT @financial_account_id_ef := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Event Fee{/ts}'; SELECT @financial_account_id_bf := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Banking Fees{/ts}'; SELECT @financial_account_id_ap := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Accounts Receivable{/ts}'; SELECT @financial_account_id_ar := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Deposit Bank Account{/ts}'; SELECT @financial_account_id_pp := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Payment Processor Account{/ts}'; SELECT @financial_account_id_pr := max(id) FROM civicrm_financial_account WHERE name = '{ts escape="sql"}Premiums{/ts}'; INSERT INTO `civicrm_entity_financial_account` ( entity_table, entity_id, account_relationship, financial_account_id ) VALUES ( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id, @financial_account_id_dtn ), ( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id_exp, @financial_account_id_bf ), ( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id_ar, @financial_account_id_ap ), ( 'civicrm_financial_type', @financial_type_id_dtn, @option_value_rel_id_cg, @financial_account_id_pr ), ( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id, @financial_account_id_md ), ( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id_exp, @financial_account_id_bf ), ( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id_ar, @financial_account_id_ap ), ( 'civicrm_financial_type', @financial_type_id_md, @option_value_rel_id_cg, @financial_account_id_pr ), ( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id, @financial_account_id_cc ), ( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id_exp, @financial_account_id_bf ), ( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id_ar, @financial_account_id_ap ), ( 'civicrm_financial_type', @financial_type_id_cc, @option_value_rel_id_cg, @financial_account_id_pr ), ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id_exp, @financial_account_id_bf ), ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id_ar, @financial_account_id_ap ), ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id, @financial_account_id_ef ), ( 'civicrm_financial_type', @financial_type_id_ef, @option_value_rel_id_cg, @financial_account_id_pr ); -- CRM-11516 INSERT INTO civicrm_entity_financial_account (entity_table, entity_id, account_relationship, financial_account_id) SELECT 'civicrm_option_value', cov.id, @option_value_rel_id_as, @financial_account_id_ar FROM `civicrm_option_group` cog LEFT JOIN civicrm_option_value cov ON cog.id = cov.option_group_id WHERE cog.name = 'payment_instrument' AND cov.name NOT IN ('Credit Card', 'Debit Card'); SELECT @option_value_cc_id := max(id) FROM `civicrm_option_value` WHERE `option_group_id` = @option_group_id_pi AND `name` = 'Credit Card'; SELECT @option_value_dc_id := max(id) FROM `civicrm_option_value` WHERE `option_group_id` = @option_group_id_pi AND `name` = 'Debit Card'; INSERT INTO `civicrm_entity_financial_account` ( entity_table, entity_id, account_relationship, financial_account_id ) VALUES ( 'civicrm_option_value', @option_value_cc_id, @option_value_rel_id_as, @financial_account_id_pp), ( 'civicrm_option_value', @option_value_dc_id, @option_value_rel_id_as, @financial_account_id_pp); -- CRM-9714 SELECT @financial_type_id := max(id) FROM `civicrm_financial_type` WHERE `name` = 'Member Dues'; INSERT INTO `civicrm_price_set` ( `name`, `title`, `is_active`, `extends`, `is_quick_config`, `financial_type_id`, `is_reserved` ) VALUES ( 'default_contribution_amount', 'Contribution Amount', '1', '2', '1', NULL,1), ( 'default_membership_type_amount', 'Membership Amount', '1', '3', '1', @financial_type_id,1); SELECT @setID := max(id) FROM civicrm_price_set WHERE name = 'default_contribution_amount' AND extends = 2 AND is_quick_config = 1 ; INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`,`weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`,`visibility_id` ) VALUES ( @setID, 'contribution_amount', 'Contribution Amount', 'Text', '1', '1', '1', '1', '1', '1' ); SELECT @fieldID := max(id) FROM civicrm_price_field WHERE name = 'contribution_amount' AND price_set_id = @setID; INSERT INTO `civicrm_price_field_value` ( `price_field_id`, `name`, `label`, `amount`, `weight`, `is_default`, `is_active`, `financial_type_id`) VALUES ( @fieldID, 'contribution_amount', 'Contribution Amount', '1', '1', '0', '1', 1);