<?php


return  
    [
        'model' => [
            'model' => \Bixo\Account\Models\Allocation::class,
            'table' => 'bixo_account_allocations',
            'hidden'=> [],
            'visible' => [],
            'guarded' => ['*'],
            'slugs' => ['slug' => 'name'],
            'dates' => ['deleted_at', 'created_at', 'updated_at'],
            'appends' => [],
            'fillable' => ['date',  'type',  'allocatable_id',  'allocatable_type',  'customer_id',  'customer_name',  'coa_id',  'coa_name',  'payment',  'receipt',  'allo_tranTypeName',  'allo_tranDocID',  'Journal',  'doc_code',  'Journal',  'doc_date',  'Journal',  'doc_amount',  'Journal',  'allo_tranAlloOutstanding',  'status'],
            'translatables' => [],
            'upload_folder' => 'account/allocation',
            'uploads' => [
            /*
                    'images' => [
                        'count' => 10,
                        'type'  => 'image',
                    ],
                    'file' => [
                        'count' => 1,
                        'type'  => 'file',
                    ],
            */
            ],

            'casts' => [
            
            /*
                'images'    => 'array',
                'file'      => 'array',
            */
            ],

            'revision' => [],
            'perPage' => '20',
            'search'        => [
                'name'  => 'like',
                'status',
            ]
        ],

        'search' => [
            
        ],

        'list' => [
            [
                "key" => "date", 
                "type" => "text", 
                "label" => 'account::allocation.label.date', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "type", 
                "type" => "text", 
                "label" => 'account::allocation.label.type', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "allocatable_id", 
                "type" => "text", 
                "label" => 'account::allocation.label.allocatable_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "allocatable_type", 
                "type" => "text", 
                "label" => 'account::allocation.label.allocatable_type', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "customer_id", 
                "type" => "text", 
                "label" => 'account::allocation.label.customer_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "customer_name", 
                "type" => "text", 
                "label" => 'account::allocation.label.customer_name', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "coa_id", 
                "type" => "text", 
                "label" => 'account::allocation.label.coa_id', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "coa_name", 
                "type" => "text", 
                "label" => 'account::allocation.label.coa_name', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "payment", 
                "type" => "text", 
                "label" => 'account::allocation.label.payment', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "receipt", 
                "type" => "text", 
                "label" => 'account::allocation.label.receipt', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "allo_tranTypeName", 
                "type" => "text", 
                "label" => 'account::allocation.label.allo_tranTypeName', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "allo_tranDocID", 
                "type" => "text", 
                "label" => 'account::allocation.label.allo_tranDocID', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "Journal", 
                "type" => "text", 
                "label" => 'account::allocation.label.Journal', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "doc_code", 
                "type" => "text", 
                "label" => 'account::allocation.label.doc_code', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "Journal", 
                "type" => "text", 
                "label" => 'account::allocation.label.Journal', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "doc_date", 
                "type" => "text", 
                "label" => 'account::allocation.label.doc_date', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "Journal", 
                "type" => "text", 
                "label" => 'account::allocation.label.Journal', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "doc_amount", 
                "type" => "text", 
                "label" => 'account::allocation.label.doc_amount', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "Journal", 
                "type" => "text", 
                "label" => 'account::allocation.label.Journal', 
                'sort' => true,
                'roles' => [],
            ],
            [
                "key" => "allo_tranAlloOutstanding", 
                "type" => "text", 
                "label" => 'account::allocation.label.allo_tranAlloOutstanding', 
                'sort' => true,
                'roles' => [],
            ],
        ],

        'form' => [
            [
                "key" => 'date',
                "element" => 'date_picker',
                "type" => 'date_picker',
                "label" => 'account::allocation.label.date',
                "placeholder" => 'account::allocation.placeholder.date',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'type',
                "element" => 'radios',
                "type" => 'radios',
                "label" => 'account::allocation.label.type',
                "placeholder" => 'account::allocation.placeholder.type',
                "rules" => '',
                "options" => function(){
                    return trans('account::allocation.options.type');
                },
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'allocatable_id',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::allocation.label.allocatable_id',
                "placeholder" => 'account::allocation.placeholder.allocatable_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'allocatable_type',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::allocation.label.allocatable_type',
                "placeholder" => 'account::allocation.placeholder.allocatable_type',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'customer_id',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::allocation.label.customer_id',
                "placeholder" => 'account::allocation.placeholder.customer_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'customer_name',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::allocation.label.customer_name',
                "placeholder" => 'account::allocation.placeholder.customer_name',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'coa_id',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::allocation.label.coa_id',
                "placeholder" => 'account::allocation.placeholder.coa_id',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'coa_name',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::allocation.label.coa_name',
                "placeholder" => 'account::allocation.placeholder.coa_name',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'payment',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::allocation.label.payment',
                "placeholder" => 'account::allocation.placeholder.payment',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'receipt',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::allocation.label.receipt',
                "placeholder" => 'account::allocation.placeholder.receipt',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'allo_tranTypeName',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::allocation.label.allo_tranTypeName',
                "placeholder" => 'account::allocation.placeholder.allo_tranTypeName',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'allo_tranDocID',
                "element" => 'numeric',
                "type" => 'numeric',
                "label" => 'account::allocation.label.allo_tranDocID',
                "placeholder" => 'account::allocation.placeholder.allo_tranDocID',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'Journal',
                "element" => 'package::package.formcontrols.doc',
                "type" => 'package::package.formcontrols.doc',
                "label" => 'account::allocation.label.Journal',
                "placeholder" => 'account::allocation.placeholder.Journal',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'doc_code',
                "element" => 'text',
                "type" => 'text',
                "label" => 'account::allocation.label.doc_code',
                "placeholder" => 'account::allocation.placeholder.doc_code',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'Journal',
                "element" => 'package::package.formcontrols.doc',
                "type" => 'package::package.formcontrols.doc',
                "label" => 'account::allocation.label.Journal',
                "placeholder" => 'account::allocation.placeholder.Journal',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'doc_date',
                "element" => 'date_picker',
                "type" => 'date_picker',
                "label" => 'account::allocation.label.doc_date',
                "placeholder" => 'account::allocation.placeholder.doc_date',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'Journal',
                "element" => 'package::package.formcontrols.doc',
                "type" => 'package::package.formcontrols.doc',
                "label" => 'account::allocation.label.Journal',
                "placeholder" => 'account::allocation.placeholder.Journal',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'doc_amount',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::allocation.label.doc_amount',
                "placeholder" => 'account::allocation.placeholder.doc_amount',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'Journal',
                "element" => 'package::package.formcontrols.doc',
                "type" => 'package::package.formcontrols.doc',
                "label" => 'account::allocation.label.Journal',
                "placeholder" => 'account::allocation.placeholder.Journal',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
            [
                "key" => 'allo_tranAlloOutstanding',
                "element" => 'decimal',
                "type" => 'decimal',
                "label" => 'account::allocation.label.allo_tranAlloOutstanding',
                "placeholder" => 'account::allocation.placeholder.allo_tranAlloOutstanding',
                "rules" => '',
                "group" => "main.main",
                "col" => "6",
                "append" => null,
                "prepend" => null,
                "roles" => [],
                "attributes" => [
                    'wrapper' => [],
                    "label" => [],
                    "element" => [],

                ],
            ],
        ],

        'urls' => [
            'new' => [
                'url' => 'account/allocation/new',
                'method' => 'GET',
            ],
            'create' => [
                'url' => 'account/allocation/create',
                'method' => 'GET',
            ],
            'store' => [
                'url' => 'account/allocation',
                'method' => 'POST',
            ],
            'update' => [
                'url' => 'account/allocation',
                'method' => 'PUT',
            ],
            'list' => [
                'url' => 'account/allocation',
                'method' => 'GET',
            ],
            'delete' => [
                'url' => 'account/allocation',
                'method' => 'DELETE',
            ],
        ],

        'order' => [
            'created_at' => 'account::allocation.label.created_at',
            'name' => 'account::allocation.label.name',
            'status' => 'account::allocation.label.status',
        ],

        'groups' => [
            [
                'icon' => "mdi:account-supervisor-outline",
                'name' => "account::allocation.groups.main",
                'group' => "main.main",
                'title' => "account::allocation.groups.main",
            ],
            [
                'icon' => "fe:home",
                'name' => "account::allocation.groups.details",
                'group' => "main.details",
                'title' => "account::allocation.groups.details",
            ],
            'images' => [
                'icon' => "fe:home",
                'name' => "account::allocation.groups.images",
                'group' => "main.images",
                'title' => "account::allocation.groups.images",
            ],
            'settings' => [
                'icon' => "fe:home",
                'name' => "account::allocation.groups.settings",
                'group' => "main.settings",
                'title' => "account::allocation.groups.settings",
            ]
        ],

        'controller' => [
            'provider' => 'Bixo',
            'package' => 'Account',
            'module' => 'Allocation',
        ],

        
        
    ];