[ 'model' => \Litecms\Account\Models\Ledger::class, 'table' => 'litecms_account_ledgers', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['coa_id', 'ledgerable_id', 'ledgerable_type', 'company_id', 'branch_id', 'date', 'name', 'description', 'debit', 'credit', 'currency', 'currency_rate', 'currency_value', 'user_id'], 'translatables' => [], 'upload_folder' => 'account/ledger', 'uploads' => [ /* 'images' => [ 'count' => 10, 'type' => 'image', ], 'file' => [ 'count' => 1, 'type' => 'file', ], */ ], 'casts' => [ 'marking' => 'array', /* 'images' => 'array', 'file' => 'array', */ ], 'revision' => [], 'perPage' => '20', 'search' => [ 'name' => 'like', 'status', ] ], 'search' => [ ], 'list' => [ [ "key" => "coa_id", "type" => "text", "label" => 'account::ledger.label.coa_id', 'sort' => true, 'roles' => [], ], [ "key" => "ledgerable_id", "type" => "text", "label" => 'account::ledger.label.ledgerable_id', 'sort' => true, 'roles' => [], ], [ "key" => "ledgerable_type", "type" => "text", "label" => 'account::ledger.label.ledgerable_type', 'sort' => true, 'roles' => [], ], [ "key" => "company_id", "type" => "text", "label" => 'account::ledger.label.company_id', 'sort' => true, 'roles' => [], ], [ "key" => "branch_id", "type" => "text", "label" => 'account::ledger.label.branch_id', 'sort' => true, 'roles' => [], ], [ "key" => "date", "type" => "text", "label" => 'account::ledger.label.date', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'account::ledger.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'account::ledger.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "debit", "type" => "text", "label" => 'account::ledger.label.debit', 'sort' => true, 'roles' => [], ], [ "key" => "credit", "type" => "text", "label" => 'account::ledger.label.credit', 'sort' => true, 'roles' => [], ], [ "key" => "currency", "type" => "text", "label" => 'account::ledger.label.currency', 'sort' => true, 'roles' => [], ], [ "key" => "currency_rate", "type" => "text", "label" => 'account::ledger.label.currency_rate', 'sort' => true, 'roles' => [], ], [ "key" => "currency_value", "type" => "text", "label" => 'account::ledger.label.currency_value', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'coa_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::ledger.label.coa_id', "placeholder" => 'account::ledger.placeholder.coa_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ledgerable_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::ledger.label.ledgerable_id', "placeholder" => 'account::ledger.placeholder.ledgerable_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ledgerable_type', "element" => 'text', "type" => 'text', "label" => 'account::ledger.label.ledgerable_type', "placeholder" => 'account::ledger.placeholder.ledgerable_type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'company_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::ledger.label.company_id', "placeholder" => 'account::ledger.placeholder.company_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'branch_id', "element" => 'text', "type" => 'text', "label" => 'account::ledger.label.branch_id', "placeholder" => 'account::ledger.placeholder.branch_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'date', "element" => 'date_time_picker', "type" => 'date_time_picker', "label" => 'account::ledger.label.date', "placeholder" => 'account::ledger.placeholder.date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'account::ledger.label.name', "placeholder" => 'account::ledger.placeholder.name', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'account::ledger.label.description', "placeholder" => 'account::ledger.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'debit', "element" => 'decimal', "type" => 'decimal', "label" => 'account::ledger.label.debit', "placeholder" => 'account::ledger.placeholder.debit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'credit', "element" => 'decimal', "type" => 'decimal', "label" => 'account::ledger.label.credit', "placeholder" => 'account::ledger.placeholder.credit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'currency', "element" => 'text', "type" => 'text', "label" => 'account::ledger.label.currency', "placeholder" => 'account::ledger.placeholder.currency', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'currency_rate', "element" => 'decimal', "type" => 'decimal', "label" => 'account::ledger.label.currency_rate', "placeholder" => 'account::ledger.placeholder.currency_rate', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'currency_value', "element" => 'decimal', "type" => 'decimal', "label" => 'account::ledger.label.currency_value', "placeholder" => 'account::ledger.placeholder.currency_value', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'account/ledger/new', 'method' => 'GET', ], 'create' => [ 'url' => 'account/ledger/create', 'method' => 'GET', ], 'store' => [ 'url' => 'account/ledger', 'method' => 'POST', ], 'update' => [ 'url' => 'account/ledger', 'method' => 'PUT', ], 'list' => [ 'url' => 'account/ledger', 'method' => 'GET', ], 'delete' => [ 'url' => 'account/ledger', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'account::ledger.label.created_at', 'name' => 'account::ledger.label.name', 'status' => 'account::ledger.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "account::ledger.groups.main", 'group' => "main.main", 'title' => "account::ledger.groups.main", ], [ 'icon' => "fe:home", 'name' => "account::ledger.groups.details", 'group' => "main.details", 'title' => "account::ledger.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "account::ledger.groups.images", 'group' => "main.images", 'title' => "account::ledger.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "account::ledger.groups.settings", 'group' => "main.settings", 'title' => "account::ledger.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Account', 'module' => 'Ledger', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Litecms\Account\Models\Ledger::class, ], 'places' => [ 'Draft', 'Pending', 'Approved', 'Closed', 'Published', 'Archived', 'Unpublished', ], 'initial_places' => ['Draft'], 'transitions' => [ 'submit' => [ 'from' => 'Draft', 'to' => 'Pending', 'metadata' => [ 'roles' => [ 'user' => ['*'], ], 'rules' => [ 'name' => 'required', ] ], ], 'reject' => [ 'from' => 'Pending', 'to' => 'Draft', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin', 'manager'], ], 'form' => [ 'title' => 'Reject', 'button' => [ 'cancel' > [ 'icon' > '', 'varient' > '', 'label' > 'Cancel' ], 'submit' > [ 'icon' > '', 'varient' > 'primary', 'label' > 'Reject' ] ], 'fields' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'advert::advert.label.count', "placeholder" => 'advert::advert.placeholder.count', "options" => call_user_func(function () { return [ 1 => ['value' => 1, 'text' => 1], 2 => ['value' => 2, 'text' => 2], 3 => ['value' => 3, 'text' => 3], 4 => ['value' => 4, 'text' => 4], ]; }), "col" => "12", ], 'comment' => [ "element" => 'textarea', "type" => 'text', "required" => 'required', "label" => 'advert::advert.label.comment', "placeholder" => 'advert::advert.placeholder.comment', "col" => "12", ], ], ], ], ], 'approve' => [ 'from' => 'Pending', 'to' => 'Approved', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin', 'manager'], ] ], ], 'publish' => [ 'from' => ['Approved', 'Unpublished'], 'to' => 'Published', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin'], ] ], ], 'unpublish' => [ 'from' => ['Published'], 'to' => 'Unpublished', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], 'archive' => [ 'from' => ['Published', 'Unpublished'], 'to' => 'Archived', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], 'unarchive' => [ 'from' => ['Archived'], 'to' => 'Draft', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], ], ], 'actions' => [ 'copy' => [ 'type' => ['Details', 'List'], 'label' => 'account::ledger.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['account.ledger.copy', 'account.ledger.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'account::ledger.label.count', "placeholder" => 'account::ledger.placeholder.count', "options" => call_user_func(function () { return [ 1 => ['value' => 1, 'text' => 1], 2 => ['value' => 2, 'text' => 2], 3 => ['value' => 3, 'text' => 3], 4 => ['value' => 4, 'text' => 4], ]; }), "col" => "12", ], 'comment' => [ "element" => 'textarea', "type" => 'text', "required" => 'required', "label" => 'account::ledger.label.comment', "placeholder" => 'account::ledger.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'account::ledger.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'account::ledger.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];