

----------------------------------------------------------------------------------------------------------------------------------------------------------------

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('JMOBIL','mobile_self_module','MSELF','','','self/mobile','self','Permission to view self page mobile','MOB','',1,false,false,NULL),
	 ('MSELF','self',NULL,NULL,NULL,'self','self','Permission to self module','MOD','fas fa-user',950,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('PSELF','self_profile_view','MSELF','getObjects','','self/profile','self','Permission to view self profile page','PAG','fas fa-id-badge',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('BSLFSAV','self_profile_view_save','PSELF','','','self/profile','self','Permission to profile save button','BUT','fas fa-save',1,false,false,NULL),
	 ('XSFPFGT','self_profile_details_get','PSELF','getProfileDetails','','self/profile','self','Permission to get self profile details','EXE','',1,false,false,NULL),
	 ('XUPDPRO','self_profile_update','PSELF','updProfileDetails','','self/profile','self','Permission to update profile','EXE','',1,false,false,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XSFPFCR','self_profile_create_external_user','PSELF','createExternalUser','','self/profile','self','Permission to create self external user','EXE','',1,false,true,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XSFPFPR','self_password_reset','SDSMGLS','userPasswordReset','','self/profile','self','passwordReset function','EXE','',1,false,true,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XSFPFPC','self_password_reset_confirm','SDSMGLS','userSetNewPassword','','self/profile','self','userSetNewPassword function','EXE','',1,false,true,NULL);
     
INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XSFPFAC','self_profile_activate_external_user','PSELF','activateExternalUser','','self/profile','self','Activate external account','EXE','',1,false,true,NULL);

----------------------------------------------------------------------------------------------------------------------------------------------------------------


INSERT INTO public.core_user_roles (id,role_name,hidden) VALUES
	 (14,'User',0);

----------------------------------------------------------------------------------------------------------------------------------------------------------------

INSERT INTO public.core_user_role_has_permission (role_id,permission_code) VALUES
	 (14,'MSELF'),
	 (14,'JMOBIL'),
	 (14,'XSFPFGT'),
	 (14,'BSLFSAV'),
	 (14,'XUPDPRO'),
	 (14,'PSELF');
----------------------------------------------------------------------------------------------------------------------------------------------------------------

INSERT INTO public.core_settings (setting_type,setting_name,value,properties,ord) VALUES
	 ('self_settings','general_configuration','{"status": {"loginStatus": "AVL"},"allowExternamUserRegistration":false}','{"section_desc": "Self Module Settings", 
	 "section_icon": "fa-solid fa-user-gear", "setting_desc": "General configuration", "setting_icon": "fa-solid fa-sliders", 
	 "section_button": "Change settings", "setting_button": "Edit"}',100);

-- This should be updated after creating proper email template
INSERT INTO public.core_settings (setting_type,setting_name,value,properties,ord)
	VALUES ('self_settings','registration_email','{"body": "<!-- NAME: 1 COLUMN - FULL WIDTH --><!-- [if gte mso 15]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--><!--*|IF:MC_PREVIEW_TEXT|*--><!-- [if !gte mso 9]><!---->\n<p><span class=\"mcnPreviewText\" style=\"display: none; font-size: 0px; line-height: 0px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; visibility: hidden; mso-hide: all;\">Thank you for creating your IamaGoodTraveller account.</span></p>\n<!--<![endif]--><!--*|END:IF|*--><center>\n<table id=\"bodyTable\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td id=\"bodyCell\" align=\"center\" valign=\"top\"><!-- BEGIN TEMPLATE // -->\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td id=\"templatePreheader\" align=\"center\" valign=\"top\"><!-- [if (gte mso 9)|(IE)]><table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\" style=\"width:600px;\"><tr><td align=\"center\" valign=\"top\" width=\"600\" style=\"width:600px;\"><![endif]-->\n<table class=\"templateContainer\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td class=\"preheaderContainer\" valign=\"top\">\n<table class=\"mcnImageBlock\" style=\"min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody class=\"mcnImageBlockOuter\">\n<tr>\n<td class=\"mcnImageBlockInner\" style=\"padding: 9px;\" valign=\"top\">\n<table class=\"mcnImageContentContainer\" style=\"min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td class=\"mcnImageContent\" style=\"text-align: center; padding: 0 9px 0 9px;\" valign=\"top\"><img class=\"mcnImage\" style=\"max-width: 150px; padding-bottom: 0px; display: inline !important; vertical-align: bottom; border-radius: 0%;\" src=\"https://www.jivalabs.com/assets/img/Jiva-LABS-Signature.png\" alt=\"\" width=\"150\" align=\"middle\" /></td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<!-- [if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td>\n</tr>\n<tr>\n<td id=\"templateHeader\" align=\"center\" valign=\"top\"><!-- [if (gte mso 9)|(IE)]><table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\" style=\"width:600px;\"><tr><td align=\"center\" valign=\"top\" width=\"600\" style=\"width:600px;\"><![endif]-->\n<table class=\"templateContainer\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td class=\"headerContainer\" valign=\"top\">\n<table class=\"mcnTextBlock\" style=\"min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody class=\"mcnTextBlockOuter\">\n<tr>\n<td class=\"mcnTextBlockInner\" style=\"padding-top: 9px;\" valign=\"top\"><!-- [if mso]> <table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"width:100%;\"> <tr> <![endif]--> <!-- [if mso]> <td valign=\"top\" width=\"600\" style=\"width:600px;\"> <![endif]-->\n<table class=\"mcnTextContentContainer\" style=\"max-width: 100%; min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td class=\"mcnTextContent\" style=\"padding: 0 18px 9px 18px;\" valign=\"top\">\n<h1 class=\"null\">Please verify your email</h1>\n</td>\n</tr>\n</tbody>\n</table>\n<!-- [if mso]> </td> <![endif]--> <!-- [if mso]> </tr> </table> <![endif]--></td>\n</tr>\n</tbody>\n</table>\n<table class=\"mcnTextBlock\" style=\"min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody class=\"mcnTextBlockOuter\">\n<tr>\n<td class=\"mcnTextBlockInner\" style=\"padding-top: 9px;\" valign=\"top\"><!-- [if mso]> <table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"width:100%;\"> <tr> <![endif]--> <!-- [if mso]> <td valign=\"top\" width=\"600\" style=\"width:600px;\"> <![endif]-->\n<table class=\"mcnTextContentContainer\" style=\"max-width: 100%; min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td class=\"mcnTextContent\" style=\"padding: 0 18px 9px 18px;\" valign=\"top\">\n<div>\n<p id=\"docs-internal-guid-60c6a318-7fff-3556-99e4-ed73b5e819a5\" dir=\"ltr\">Hi {firstname},<br /><br />Thank you for creating your account. To continue, please verify your email address by clicking the link below.</p>\n</div>\n</td>\n</tr>\n</tbody>\n</table>\n<!-- [if mso]> </td> <![endif]--> <!-- [if mso]> </tr> </table> <![endif]--></td>\n</tr>\n</tbody>\n</table>\n<table class=\"mcnButtonBlock\" style=\"min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody class=\"mcnButtonBlockOuter\">\n<tr>\n<td class=\"mcnButtonBlockInner\" style=\"padding: 0 18px 18px 18px;\" align=\"center\" valign=\"top\">\n<table class=\"mcnButtonContentContainer\" style=\"border-collapse: separate !important; border-radius: 4px; background-color: #5db8d5;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"mcnButtonContent\" style=\"font-family: Arial; font-size: 16px; padding: 18px;\" align=\"center\" valign=\"middle\"><a class=\"mcnButton \" style=\"font-weight: bold; letter-spacing: normal; line-height: 100%; text-align: center; text-decoration: none; color: #ffffff;\" title=\"verify your email\" href=\"https://www.jivalabs.com/verify/{verifytoken}\" target=\"_blank\" rel=\"noopener\">verify your email</a></td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<table class=\"mcnTextBlock\" style=\"min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody class=\"mcnTextBlockOuter\">\n<tr>\n<td class=\"mcnTextBlockInner\" style=\"padding-top: 9px;\" valign=\"top\"><!-- [if mso]> <table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"width:100%;\"> <tr> <![endif]--> <!-- [if mso]> <td valign=\"top\" width=\"600\" style=\"width:600px;\"> <![endif]-->\n<table class=\"mcnTextContentContainer\" style=\"max-width: 100%; min-width: 100%;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n<tbody>\n<tr>\n<td class=\"mcnTextContent\" style=\"padding: 0 18px 9px 18px;\" valign=\"top\">\n<div>\n<p>Should you require assistance, we are at your full disposal. Ask your question(s) or request a teleconference to <a href=\"mailto:support@jivalabs.com\">support@jivalabs.com</a>.</p>\n<p class=\"font-italic\"><em>The JivaLabs Team</em></p>\n</div>\n</td>\n</tr>\n</tbody>\n</table>\n<!-- [if mso]> </td> <![endif]--> <!-- [if mso]> </tr> </table> <![endif]--></td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n<!-- [if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td>\n</tr>\n<tr>\n<td id=\"templateBody\" align=\"center\" valign=\"top\"><!-- [if (gte mso 9)|(IE)]><table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\" style=\"width:600px;\"><tr><td align=\"center\" valign=\"top\" width=\"600\" style=\"width:600px;\"><![endif]-->\n<table class=\"templateContainer\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td class=\"bodyContainer\" valign=\"top\">&nbsp;</td>\n</tr>\n</tbody>\n</table>\n<!-- [if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td>\n</tr>\n<tr>\n<td id=\"templateFooter\" align=\"center\" valign=\"top\"><!-- [if (gte mso 9)|(IE)]><table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\" style=\"width:600px;\"><tr><td align=\"center\" valign=\"top\" width=\"600\" style=\"width:600px;\"><![endif]-->\n<table class=\"templateContainer\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td class=\"footerContainer\" valign=\"top\">&nbsp;</td>\n</tr>\n</tbody>\n</table>\n<!-- [if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td>\n</tr>\n</tbody>\n</table>\n<!-- // END TEMPLATE --></td>\n</tr>\n</tbody>\n</table>\n</center>", "query": "select first_name as FirstName, last_name as LastName, username as Username, email as Email, verify_token as verifytoken from core_users where id = :id", "types": {"body": "html", "message": "EMAIL", "subject": "text"}, "sender": {"Name": "Normiranec", "Address": "noreply@jivalabs.com"}, "subject": "Verify your email", "availableFields": ["FirstName", "LastName", "Username", "Email", "VerificationUrl"]}'::jsonb,'{"section_desc": "Change email templates", "section_icon": "fas fa-envelope-open-text", "setting_desc": "Registration email template", "setting_icon": "fas fa-door-open", "section_button": "View templates", "setting_button": "Edit"}'::jsonb,100);

-- Auto-generated SQL script #202301171123
INSERT INTO public.core_sm_states (object_name,state_code,description,allowed_from,after_hook,feedback,afterhook_once,feedback_once,prevent_feedback_on_afterhook,billable,meta)
	VALUES ('core_users','WAI','Waiting activation','["", "OFF"]'::jsonb,'require_once($_ENV[''JIVENV''][''funcFiles''][''sendMessage''][''filePath'']);

$qUser = "SELECT * FROM core_users WHERE id=".$id;
$rUser = $_ENV[''JIVENV''][''DB''][0]->query($qUser)->fetch(PDO::FETCH_ASSOC);
$recipients[] = array(
	"Name" => $rUser[''first_name''],
	"Address" => $rUser[''email'']
);

sendMessage(
	array(
		"id" => $id,
        "type" => "self_settings",
		"template" => "registration_email",
		"recipients" => $recipients
	)
);
','[]'::jsonb,true,false,false,true,'{}'::jsonb);

INSERT INTO public.core_sm_states (object_name,state_code,description,allowed_from,before_hook,after_hook,feedback,afterhook_once,feedback_once,prevent_feedback_on_afterhook,billable,meta,object_type) VALUES
	 ('core_users','ACT','activated','["", "AVL", "WAI"]',NULL,'require_once($_ENV[''JIVENV''][''funcFiles''][''activateServices''][''filePath'']);

$activateServices = activateServices(array(
	"userId" => $id
));

if ($activateServices[''error''] == true) {
	$out[''error''] = true;
	$out[''message''][] = "Error activating services";
	$out[''activateServices''] = $activateServices;
}


','[]',true,false,false,true,'{}',NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('PSELS','self_settings_view','MSELF','getObjects','','self/settings','self','Permission to view self settings page','PAG','fa-solid fa-sliders',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('BSLFSES','self_settings_view_save','PSELS','','','self/settings','self','Permission to settings save button','BUT','fas fa-save',1,false,false,NULL),
	 ('XSFPFST','self_settings_details_get','PSELS','getProfileSettings','','self/settings','self','Permission to get self settings details','EXE','',1,false,false,NULL),
	 ('XSFPFSU','self_settings_update','PSELS','updProfileSettings','','self/settings','self','Permission to update settings','EXE','',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
     ('XGETTXD','self_tax_register_get_data','PSTAXRG','getTaxRegisterData','','self/tax_register','self','Permission to get tax register data','EXE','fa-solid fa-cash-register',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('PSNIMPT','self_normiranec_import','MSELF','getObjects','','self/normiranec_import','self','Permission to normiranec import page','PAG','fa-solid fa-file-import',1,false,false,NULL),
	 ('BNORPRC','self_normiranec_import_process_button','SNORILS','','','self/noirmiranec_import','self','Permission to process button','BUT','fa-solid fa-code-compare',1,false,false,NULL),
	 ('SNORILS','self_normiranec_import_list','PSNIMPT','','','self/normiranec_import','self','Permission to normiranec list section','SEC','',1,false,false,NULL),
	 ('SSNREDT','self_normiranec_import_edit','PSNIMPT','','','self/normiranec_import','self','Permission to normiranec import edit section','SEC','',1,false,false,NULL),
	 ('BSNBCK','self_normiranec_import_back_button','SSNREDT','','','self/normiranec_import','self','Permission to normiranec back button','BUT','fas fa-arrow-left',1,false,false,NULL);

INSERT INTO public.core_assets (asset_type,asset_name,description,custom,asset_innerhtml,asset_parameters,asset_code,before_trigger,after_trigger,failure_rollback,exec_order,meta,role_id) VALUES
	 ('form','normiranec_self_list_form','Form to add and edit files',false,'','{"form": [[{"id": "count_general.settings.status", "cols": 6, "name": "count_general[settings][status]", "type": "radio", "label": "Status", "values": "Popoldanski normirani SP:popoldanski;Polni normirani SP:polni", "onchange": "jivaCoreOptions.unsavedData=true;", "mandatory": true}, {"id": "count_general.settings.founding_date", "cols": 3, "name": "count_general[settings][founding_date]", "type": "date", "label": "Datum ustanovitve", "onchange": "jivaCoreOptions.unsavedData=true;", "mandatory": true}, {"id": "count_general.settings.starting_date", "cols": 2, "name": "count_general[settings][starting_date]", "type": "hidden", "label": "Začetek uporabe orodja", "default": "today", "onchange": "jivaCoreOptions.unsavedData=true;", "mandatory": true}, {"id": "count_general.settings.letAkontacijaDohodnine", "cols": 3, "name": "count_general[settings][letAkontacijaDohodnine]", "type": "text", "label": "Letošnja akontacija dohodnine", "onchange": "jivaCoreOptions.unsavedData=true;", "mandatory": true, "helperTooltip": "table_self_profile_settings_akontacija_dohodnine_tooltip", "additionalClass": "eur_decimal"}]], "related": {"count_general": {"setting": "count_settings.count_general_configuration"}}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL);

INSERT INTO public.core_assets (asset_type,asset_name,description,custom,asset_innerhtml,asset_parameters,asset_code,before_trigger,after_trigger,failure_rollback,exec_order,meta,role_id) VALUES
	 ('form','normiranec_import_list_form','Form to add and edit files',false,'','{"form": [[{"id": "select_import", "cols": 3, "name": "file", "type": "file", "label": "form_stash_files_select", "folder": "settings", "filename": "excel_import.xlsx", "onchange": "jivaCoreFunc.onChange.fileUpload(this);"}, {"id": "", "cols": 2, "type": "buttons", "label": "Process", "buttons": [{"id": "self_normiranec_import_process_button", "icon": "<i class=\"fa-solid fa-code-compare\"></i>", "onclick": "processFileData();"}], "mandatory": false}]]}',NULL,NULL,NULL,NULL,NULL,NULL,NULL);


INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('PSJOURN','self_journal_view','MSELF','getObjects','','self/journal','self','Permission to view self journal page','PAG','fa-solid fa-book',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('SJRNLLV','self_journal_list','PSJOURN','getObjects','','self/journal','self','Permission to journal list section','SEC','fa-solid fa-book',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('BJRNADD','self_journal_list_view_add','SJRNLLV','','','self/journal','self','Permission to journal add button','BUT','fa-solid fa-plus',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XJRNADD','self_journal_add','SJRNLLV','addJournalEntry','','self/journal','self','Permission to add journal entry','EXE','',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('BJRNEDT','self_journal_list_view_edit','SJRNLLV','','','self/journal','self','Permission to journal edit button','BUT','fas fa-edit',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('BJRNDEL','self_journal_list_view_delete','SJRNLLV','','','self/journal','self','Permission to journal delete button','BUT','fas fa-trash',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('SJRNEDT','self_journal_edit','PSJOURN','','','self/journal','self','Permission to journal edit section','SEC','',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('BJRNSAV','self_journal_list_edit_save','SJRNEDT','','','self/journal','self','Permission to journal save button','BUT','fas fa-save',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XJRNGET','self_journal_get','SJRNLLV','getJournalEntry','','self/journal','self','Permission to get journal entry','EXE','',1,false,false,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XJRNIN','self_journal_in','SJRNLLV','journalStatusIN','','self/journal','self','Permission to journal status IN','EXE','',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XJRNOUT','self_journal_out','SJRNLLV','journalStatusOUT','','self/journal','self','Permission to journal status OUT','EXE','',1,false,false,NULL);
INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XJRNBRK','self_journal_brk','SJRNLLV','journalStatusBRK','','self/journal','self','Permission to journal status BRK','EXE','',1,false,false,NULL);
