2021-01-05 23:22:38 +03:00
|
|
|
<?php
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
use App\Models\Banking\Transaction;
|
|
|
|
use App\Models\Common\Contact;
|
2021-01-05 23:22:38 +03:00
|
|
|
use App\Models\Document\Document;
|
2022-06-01 10:15:55 +03:00
|
|
|
use App\Models\Setting\Category;
|
2021-01-05 23:22:38 +03:00
|
|
|
|
|
|
|
return [
|
2021-01-09 17:47:52 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
// Categories
|
|
|
|
'category' => [
|
|
|
|
Category::INCOME_TYPE => [
|
|
|
|
'alias' => '',
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'general',
|
|
|
|
],
|
2021-02-22 17:21:04 +03:00
|
|
|
],
|
2021-01-05 23:22:38 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
Category::EXPENSE_TYPE => [
|
|
|
|
'alias' => '',
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'general',
|
|
|
|
],
|
2021-01-09 17:47:52 +03:00
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
Category::ITEM_TYPE => [
|
|
|
|
'alias' => '',
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'general',
|
|
|
|
],
|
2021-04-21 00:54:14 +03:00
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
Category::OTHER_TYPE => [
|
|
|
|
'alias' => '',
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'general',
|
|
|
|
],
|
2021-02-22 17:21:04 +03:00
|
|
|
],
|
2021-01-05 23:22:38 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
// Contacts
|
2022-06-01 10:15:55 +03:00
|
|
|
'contact' => [
|
|
|
|
Contact::CUSTOMER_TYPE => [
|
2022-07-25 18:40:05 +03:00
|
|
|
'alias' => '', // core empty but module write own alias
|
2022-06-01 10:15:55 +03:00
|
|
|
'group' => 'sales',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'customers', // core use with group + prefix, module ex. estimates
|
|
|
|
'parameter' => 'customer', // sales/customers/{parameter}/edit
|
|
|
|
//'create' => 'customers.create', // if you change route, you can write full path
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'customers',
|
|
|
|
//'create' => 'create-sales-customers',
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'customers', // this translation file name.
|
|
|
|
'section_general_description' => 'customers.form_description.general',
|
|
|
|
'section_billing_description' => 'customers.form_description.billing',
|
|
|
|
'section_address_description' => 'customers.form_description.address',
|
|
|
|
],
|
|
|
|
'category_type' => 'income',
|
|
|
|
'document_type' => 'invoice',
|
|
|
|
'transaction_type' => 'income',
|
|
|
|
'hide' => [],
|
|
|
|
'class' => [],
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'common',
|
|
|
|
'file' => 'contacts',
|
|
|
|
],
|
2021-01-09 17:47:52 +03:00
|
|
|
],
|
2021-01-05 23:22:38 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
Contact::VENDOR_TYPE => [
|
2022-07-25 18:40:05 +03:00
|
|
|
'alias' => '', // core empty but module write own alias
|
2022-06-01 10:15:55 +03:00
|
|
|
'group' => 'purchases',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'vendors', // core use with group + prefix, module ex. estimates
|
|
|
|
'parameter' => 'vendor', // sales/vendors/{parameter}/edit
|
|
|
|
//'create' => 'vendors.create', // if you change route, you can write full path
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'vendors',
|
|
|
|
//'create' => 'create-purchases-vendors',
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'vendors', // this translation file name.
|
|
|
|
'section_general_description' => 'vendors.form_description.general',
|
|
|
|
'section_billing_description' => 'vendors.form_description.billing',
|
|
|
|
'section_address_description' => 'vendors.form_description.address',
|
|
|
|
],
|
|
|
|
'category_type' => 'expense',
|
|
|
|
'document_type' => 'bill',
|
|
|
|
'transaction_type' => 'expense',
|
|
|
|
'hide' => [],
|
|
|
|
'class' => [],
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'common',
|
|
|
|
'file' => 'contacts',
|
|
|
|
],
|
2021-01-09 17:47:52 +03:00
|
|
|
],
|
2021-01-05 23:22:38 +03:00
|
|
|
],
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
// Documents
|
|
|
|
'document' => [
|
|
|
|
Document::INVOICE_TYPE => [
|
|
|
|
'alias' => '', // core empty but module write own alias
|
|
|
|
'group' => 'sales', // controller folder name for permission and route
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'invoices', // core use with group + prefix, module ex. estimates
|
|
|
|
'parameter' => 'invoice', // sales/invoices/{parameter}/edit
|
|
|
|
'document' => 'invoices.index',
|
|
|
|
'recurring' => 'recurring-invoices.index',
|
|
|
|
//'create' => 'invoices.create', // if you change route, you can write full path
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'invoices', // this controller file name.
|
|
|
|
//'create' => 'create-sales-invoices', // if you change action permission key, you can write full permission
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'invoices', // this translation file name.
|
|
|
|
'add_contact' => 'general.customers', //
|
|
|
|
'issued_at' => 'invoices.invoice_date',
|
|
|
|
'due_at' => 'invoices.due_date',
|
|
|
|
'section_billing_description' => 'invoices.form_description.billing',
|
|
|
|
],
|
|
|
|
'setting' => [
|
|
|
|
'prefix' => 'invoice',
|
|
|
|
],
|
|
|
|
'category_type' => 'income',
|
|
|
|
'transaction_type' => 'income',
|
|
|
|
'contact_type' => 'customer', // use contact type
|
2022-07-14 11:22:39 +03:00
|
|
|
'transaction' => [
|
|
|
|
'email_template' => 'invoice_payment_customer', // use email template
|
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
'hide' => [], // for document items
|
|
|
|
'class' => [],
|
|
|
|
'notification' => [
|
|
|
|
'class' => 'App\Notifications\Sale\Invoice',
|
|
|
|
'notify_contact' => true,
|
|
|
|
'notify_user' => true,
|
|
|
|
],
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'common',
|
|
|
|
'file' => 'documents',
|
|
|
|
],
|
|
|
|
'status_workflow' => [
|
|
|
|
'draft' => 'send',
|
|
|
|
'sent' => 'get-paid',
|
|
|
|
'viewed' => 'get-paid',
|
|
|
|
'partial' => 'get-paid',
|
|
|
|
'paid' => 'get-paid',
|
|
|
|
'cancelled' => 'restore',
|
|
|
|
],
|
2021-06-24 13:52:49 +03:00
|
|
|
],
|
2021-01-05 23:22:38 +03:00
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
Document::INVOICE_RECURRING_TYPE => [
|
|
|
|
'alias' => '', // core empty but module write own alias
|
|
|
|
'group' => 'sales', // controller folder name for permission and route
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'recurring-invoices', // core use with group + prefix, module ex. estimates
|
|
|
|
'parameter' => 'recurring_invoice', // sales/invoices/{parameter}/edit
|
|
|
|
'document' => 'invoices.index',
|
|
|
|
'recurring' => 'recurring-invoices.index',
|
|
|
|
'end' => 'recurring-invoices.end',
|
|
|
|
//'create' => 'invoices.create', // if you change route, you can write full path
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'invoices', // this controller file name.
|
|
|
|
//'create' => 'create-sales-invoices', // if you change action permission key, you can write full permission
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'invoices', // this translation file name.
|
|
|
|
'add_contact' => 'general.customers', //
|
|
|
|
'issued_at' => 'invoices.invoice_date',
|
|
|
|
'due_at' => 'invoices.due_date',
|
|
|
|
'tab_document' => 'general.invoices',
|
|
|
|
'section_billing_description' => 'invoices.form_description.billing',
|
|
|
|
],
|
|
|
|
'setting' => [
|
|
|
|
'prefix' => 'invoice',
|
|
|
|
],
|
|
|
|
'category_type' => 'income',
|
|
|
|
'transaction_type' => 'income',
|
|
|
|
'contact_type' => 'customer', // use contact type
|
|
|
|
'hide' => [], // for document items
|
|
|
|
'class' => [],
|
|
|
|
'notification' => [
|
|
|
|
|
|
|
|
],
|
|
|
|
'image_empty_page' => 'public/img/empty_pages/recurring_templates.png',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'common',
|
|
|
|
'file' => 'documents',
|
|
|
|
],
|
|
|
|
'status_workflow' => [
|
|
|
|
'draft' => 'schedule',
|
|
|
|
'active' => 'schedule',
|
|
|
|
'end' => 'schedule',
|
|
|
|
],
|
2021-06-24 13:52:49 +03:00
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
Document::BILL_TYPE => [
|
|
|
|
'alias' => '',
|
|
|
|
'group' => 'purchases',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'bills',
|
|
|
|
'parameter' => 'bill',
|
|
|
|
'document' => 'bills.index',
|
|
|
|
'recurring' => 'recurring-bills.index',
|
|
|
|
//'create' => 'bilss.create',
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'bills',
|
|
|
|
//'create' => 'create-purchases-bills',
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'bills',
|
|
|
|
'issued_at' => 'bills.bill_date',
|
|
|
|
'due_at' => 'bills.due_date',
|
|
|
|
'section_billing_description' => 'bills.form_description.billing',
|
|
|
|
],
|
|
|
|
'setting' => [
|
|
|
|
'prefix' => 'bill',
|
|
|
|
],
|
|
|
|
'category_type' => 'expense',
|
|
|
|
'transaction_type' => 'expense',
|
|
|
|
'contact_type' => 'vendor',
|
2022-07-14 11:22:39 +03:00
|
|
|
'transaction' => [
|
|
|
|
'email_template' => 'invoice_payment_customer', // use email template
|
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
'hide' => [],
|
|
|
|
'notification' => [
|
|
|
|
'class' => 'App\Notifications\Purchase\Bill',
|
|
|
|
'notify_contact' => false,
|
|
|
|
'notify_user' => true,
|
|
|
|
],
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'common',
|
|
|
|
'file' => 'documents',
|
|
|
|
],
|
|
|
|
'status_workflow' => [
|
|
|
|
'draft' => 'receive',
|
|
|
|
'received' => 'make-payment',
|
|
|
|
'viewed' => 'make-payment',
|
|
|
|
'partial' => 'make-payment',
|
|
|
|
'paid' => 'make-payment',
|
|
|
|
'cancelled' => 'restore',
|
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
Document::BILL_RECURRING_TYPE => [
|
|
|
|
'alias' => '',
|
|
|
|
'group' => 'purchases',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'recurring-bills',
|
|
|
|
'parameter' => 'recurring_bill',
|
|
|
|
'document' => 'bills.index',
|
|
|
|
'recurring' => 'recurring-bills.index',
|
|
|
|
'end' => 'recurring-bills.end',
|
|
|
|
//'create' => 'bilss.create',
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'bills',
|
|
|
|
//'create' => 'create-purchases-bills',
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'bills',
|
|
|
|
'issued_at' => 'bills.bill_date',
|
|
|
|
'due_at' => 'bills.due_date',
|
|
|
|
'tab_document' => 'general.bills',
|
|
|
|
'section_billing_description' => 'bills.form_description.billing',
|
|
|
|
],
|
|
|
|
'setting' => [
|
|
|
|
'prefix' => 'bill',
|
|
|
|
],
|
|
|
|
'category_type' => 'expense',
|
|
|
|
'transaction_type' => 'expense',
|
|
|
|
'contact_type' => 'vendor',
|
|
|
|
'hide' => [],
|
|
|
|
'notification' => [
|
|
|
|
|
|
|
|
],
|
|
|
|
'image_empty_page' => 'public/img/empty_pages/recurring_templates.png',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'common',
|
|
|
|
'file' => 'documents',
|
|
|
|
],
|
|
|
|
'status_workflow' => [
|
|
|
|
'draft' => 'schedule',
|
|
|
|
'active' => 'schedule',
|
|
|
|
'end' => 'schedule',
|
|
|
|
],
|
2021-06-24 13:52:49 +03:00
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
],
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
// Transactions
|
|
|
|
'transaction' => [
|
|
|
|
Transaction::INCOME_TYPE => [
|
|
|
|
'group' => 'banking',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'transactions', // core use with group + prefix, module ex. estimates
|
2022-06-04 20:20:31 +03:00
|
|
|
'parameter' => 'transaction', // banking/transactions/{parameter}/edit
|
|
|
|
//'create' => 'transactions.create', // if you change route, you can write full path
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'transactions',
|
|
|
|
//'create' => 'create-banking-transactions',
|
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
'translation' => [
|
2022-06-01 10:15:55 +03:00
|
|
|
'prefix' => 'transactions', // this translation file name.
|
|
|
|
'related_document_amount' => 'invoices.invoice_amount',
|
|
|
|
'transactions' => 'general.incomes',
|
|
|
|
],
|
|
|
|
'contact_type' => 'customer',
|
|
|
|
'document_type' => 'invoice',
|
|
|
|
'split_type' => Transaction::INCOME_SPLIT_TYPE,
|
|
|
|
'email_template' => 'payment_received_customer',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'banking',
|
|
|
|
'file' => 'transactions',
|
2021-02-18 11:54:01 +03:00
|
|
|
],
|
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
2022-07-27 10:48:01 +03:00
|
|
|
Transaction::INCOME_TRANSFER_TYPE => [
|
|
|
|
'group' => 'banking',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'transactions', // core use with group + prefix, module ex. estimates
|
|
|
|
'parameter' => 'transaction', // banking/transactions/{parameter}/edit
|
|
|
|
//'create' => 'transactions.create', // if you change route, you can write full path
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'transactions',
|
|
|
|
//'create' => 'create-banking-transactions',
|
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'transactions', // this translation file name.
|
|
|
|
'related_document_amount' => 'invoices.invoice_amount',
|
|
|
|
'transactions' => 'general.incomes',
|
|
|
|
],
|
|
|
|
'contact_type' => 'customer',
|
|
|
|
'document_type' => 'invoice',
|
|
|
|
'split_type' => Transaction::INCOME_SPLIT_TYPE,
|
|
|
|
'email_template' => 'payment_received_customer',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'banking',
|
|
|
|
'file' => 'transactions',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2022-06-01 10:15:55 +03:00
|
|
|
Transaction::INCOME_RECURRING_TYPE => [
|
|
|
|
'group' => 'banking',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'recurring-transactions', // core use with group + prefix, module ex. estimates
|
2022-06-04 20:20:31 +03:00
|
|
|
'parameter' => 'recurring_transaction', // banking/recurring-transactions/{parameter}/edit
|
|
|
|
//'create' => 'transactions.create', // if you change route, you can write full path
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'transactions',
|
|
|
|
//'create' => 'create-banking-transactions',
|
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
'translation' => [
|
2022-06-01 10:15:55 +03:00
|
|
|
'prefix' => 'transactions', // this translation file name.
|
|
|
|
'new' => 'general.recurring_incomes',
|
2022-06-02 10:26:07 +03:00
|
|
|
'transactions' => 'general.incomes',
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
|
|
|
'image_empty_page' => 'public/img/empty_pages/recurring_templates.png',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'banking',
|
|
|
|
'file' => 'transactions',
|
|
|
|
],
|
|
|
|
'status_workflow' => [
|
|
|
|
'draft' => 'schedule',
|
|
|
|
'active' => 'schedule',
|
|
|
|
'end' => 'schedule',
|
2021-02-18 11:54:01 +03:00
|
|
|
],
|
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
Transaction::EXPENSE_TYPE => [
|
|
|
|
'group' => 'banking',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'transactions', // core use with group + prefix, module ex. estimates
|
2022-06-04 20:20:31 +03:00
|
|
|
'parameter' => 'transaction', // banking/transactions/{parameter}/edit
|
|
|
|
//'create' => 'transactions.create', // if you change route, you can write full path
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'transactions',
|
|
|
|
//'create' => 'create-banking-transactions',
|
2022-07-27 10:48:01 +03:00
|
|
|
],
|
|
|
|
'translation' => [
|
|
|
|
'prefix' => 'transactions', // this translation file name.
|
|
|
|
'related_document_amount' => 'bills.bill_amount',
|
|
|
|
],
|
|
|
|
'contact_type' => 'vendor',
|
|
|
|
'document_type' => 'bill',
|
|
|
|
'split_type' => Transaction::EXPENSE_SPLIT_TYPE,
|
|
|
|
'email_template' => 'payment_made_vendor',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'banking',
|
|
|
|
'file' => 'transactions',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
Transaction::EXPENSE_TRANSFER_TYPE => [
|
|
|
|
'group' => 'banking',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'transactions', // core use with group + prefix, module ex. estimates
|
|
|
|
'parameter' => 'transaction', // banking/transactions/{parameter}/edit
|
|
|
|
//'create' => 'transactions.create', // if you change route, you can write full path
|
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'transactions',
|
|
|
|
//'create' => 'create-banking-transactions',
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
'translation' => [
|
2022-06-01 10:15:55 +03:00
|
|
|
'prefix' => 'transactions', // this translation file name.
|
|
|
|
'related_document_amount' => 'bills.bill_amount',
|
|
|
|
],
|
|
|
|
'contact_type' => 'vendor',
|
|
|
|
'document_type' => 'bill',
|
|
|
|
'split_type' => Transaction::EXPENSE_SPLIT_TYPE,
|
|
|
|
'email_template' => 'payment_made_vendor',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'banking',
|
|
|
|
'file' => 'transactions',
|
2021-02-18 11:54:01 +03:00
|
|
|
],
|
|
|
|
],
|
2022-06-01 10:15:55 +03:00
|
|
|
|
|
|
|
Transaction::EXPENSE_RECURRING_TYPE => [
|
|
|
|
'group' => 'banking',
|
|
|
|
'route' => [
|
|
|
|
'prefix' => 'recurring-transactions', // core use with group + prefix, module ex. estimates
|
2022-06-04 20:20:31 +03:00
|
|
|
'parameter' => 'recurring_transaction', // banking/recurring-transactions/{parameter}/edit
|
|
|
|
//'create' => 'transactions.create', // if you change route, you can write full path
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
|
|
|
'permission' => [
|
|
|
|
'prefix' => 'transactions',
|
|
|
|
//'create' => 'create-banking-transactions',
|
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
'translation' => [
|
2022-06-02 10:26:07 +03:00
|
|
|
'prefix' => 'transactions', // this translation file name.
|
2022-06-01 10:15:55 +03:00
|
|
|
'new' => 'general.recurring_expenses',
|
2022-06-02 10:26:07 +03:00
|
|
|
'transactions' => 'general.expenses',
|
2022-06-01 10:15:55 +03:00
|
|
|
],
|
|
|
|
'image_empty_page' => 'public/img/empty_pages/recurring_templates.png',
|
|
|
|
'script' => [
|
|
|
|
'folder' => 'banking',
|
|
|
|
'file' => 'transactions',
|
|
|
|
],
|
|
|
|
'status_workflow' => [
|
|
|
|
'draft' => 'schedule',
|
|
|
|
'active' => 'schedule',
|
|
|
|
'end' => 'schedule',
|
2021-02-18 11:54:01 +03:00
|
|
|
],
|
2021-01-09 17:47:52 +03:00
|
|
|
],
|
2021-01-05 23:22:38 +03:00
|
|
|
],
|
2021-02-18 11:54:01 +03:00
|
|
|
|
2021-01-05 23:22:38 +03:00
|
|
|
];
|