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','count_invoices_form_GOT','Form for count invoices',false,NULL,'{"form": [[{"id": "client_id", "key": "id", "cols": 3, "list": "api/v1/registry/registrylist/CLI ", "name": "client_id", "type": "dropdown", "label": "table_count_invoices_client_id", "values": "entity_name,person_name", "onchange": "jivaCoreOptions.unsavedData=true;", "autofocus": true, "mandatory": true, "createForm": "registry_list_form", "valueSearch": "api/v1/registry/search/id:", "typeaheadList": "api/v1/registry/search/entity_name!person_name:", "createEndpoint": "api/v1/registry", "createdEntryFields": "entity_name", "createEndpointMethod": "post"}, {"id": "invoice_date", "cols": 3, "name": "invoice_date", "type": "date", "label": "table_count_invoices_invoice_date", "default": "today", "onchange": "jivaCoreOptions.unsavedData=true;checkAllDates();", "validate": "mandatory,date", "mandatory": true}, {"id": "currency", "cols": 3, "name": "currency", "type": "hidden", "label": "table_count_invoices_currency", "value": "EUR"}, {"id": "date_due", "cols": 3, "name": "date_due", "type": "date", "label": "table_count_invoices_date_due", "onchange": "jivaCoreOptions.unsavedData=true;", "validate": "mandatory,date", "mandatory": true}, {"id": "invoice_total", "cols": 3, "name": "invoice_total", "type": "int", "label": "table_count_invoices_invoice_total", "disabled": true, "additionalClass": "count-green"}], [{"id": "paid", "cols": 1, "name": "paid", "type": "hidden", "label": "paid", "value": false, "mandatory": false}, {"id": "credit_note", "cols": 1, "name": "credit_note", "type": "hidden", "label": "credit_note", "value": false, "mandatory": false}, {"id": "proforma", "cols": 1, "name": "proforma", "type": "hidden", "label": "proforma", "value": false, "mandatory": false}, {"id": "service_date", "cols": 3, "name": "service_date", "type": "date", "label": "table_count_invoices_service_date", "onblur": "jivaCoreOptions.unsavedData=true;setTimeServiceDue();", "validate": "mandatory,date", "mandatory": true}, {"id": "service_due", "cols": 3, "name": "service_due", "type": "date", "label": "table_count_invoices_service_due", "onblur": "if (jivaCoreFunc.checkChanged(this)) {objectSave();}", "onfocus": "jivaCoreFunc.startChanging(this);", "validate": "mandatory,date", "mandatory": true}, {"id": "reference", "cols": 3, "name": "reference", "type": "text", "label": "table_count_invoices_reference", "onchange": "jivaCoreOptions.unsavedData=true;", "mandatory": false, "helperTooltip": "table_count_invoices_reference_tooltip"}]]}',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
	 ('BCIADDC','count_invoices_view_add_cash','SCNTIVW','','','count/invoices','count','Permission to add count invoices cash invoice button','BUT','fa-solid fa-money-bills',1,false,false,NULL);
