195 lines
4.6 KiB
Markdown
195 lines
4.6 KiB
Markdown
# Billing App Configuration
|
|
|
|
This page explains all configuration options for the Billing app in codem-phone.
|
|
|
|
---
|
|
|
|
## Basic Settings
|
|
|
|
### Enable App
|
|
```lua
|
|
Enable = true
|
|
```
|
|
Enable or disable the billing app entirely.
|
|
|
|
### Default Tax Percent
|
|
```lua
|
|
DefaultTaxPercent = 20
|
|
```
|
|
Default tax percentage applied to all new invoices. Can be changed per invoice.
|
|
|
|
### Default Commission Rate
|
|
```lua
|
|
DefaultCommissionRate = 10
|
|
```
|
|
Default commission rate for new businesses (percentage).
|
|
|
|
### Default Can Invoice
|
|
```lua
|
|
DefaultCanInvoice = true
|
|
```
|
|
Default setting for whether new businesses can create invoices.
|
|
|
|
### Default Due Days
|
|
```lua
|
|
DefaultTaxDueDays = 7
|
|
```
|
|
Number of days before an invoice is due.
|
|
|
|
---
|
|
|
|
## Authorized Businesses
|
|
|
|
```lua
|
|
AuthorizedBusinesses = {
|
|
["police"] = "Police Department",
|
|
["ambulance"] = "Medical Services",
|
|
}
|
|
```
|
|
Jobs that can create invoices. These will be automatically added to database on server start. You can also manage them via admin panel.
|
|
|
|
| Key | Value |
|
|
|-----|-------|
|
|
| Job name | Job label displayed in UI |
|
|
|
|
---
|
|
|
|
## Authorized Citizens
|
|
|
|
```lua
|
|
AuthorizedCitizens = {
|
|
"license:abc123",
|
|
"license:def456",
|
|
}
|
|
```
|
|
Individual citizens who can create invoices. These will be automatically added to database on server start. You can also manage them via admin panel.
|
|
|
|
---
|
|
|
|
## Default Employee Permissions
|
|
|
|
```lua
|
|
DefaultEmployeePermissions = {
|
|
can_access_business = false, -- Access to business settings
|
|
can_create_invoices = true, -- Create invoices
|
|
can_cancel_invoices = false, -- Cancel invoices
|
|
can_pay_taxes = false, -- Pay business taxes
|
|
}
|
|
```
|
|
These permissions will be given to new employees when they join a job.
|
|
|
|
| Permission | Description |
|
|
|------------|-------------|
|
|
| `can_access_business` | Access to business settings panel |
|
|
| `can_create_invoices` | Ability to create new invoices |
|
|
| `can_cancel_invoices` | Ability to cancel existing invoices |
|
|
| `can_pay_taxes` | Ability to pay business taxes |
|
|
|
|
---
|
|
|
|
## Vehicle Tax Settings
|
|
|
|
```lua
|
|
VehicleTax = {
|
|
enabled = true,
|
|
amount = 100,
|
|
intervalHours = 24,
|
|
reason = "Vehicle Tax",
|
|
}
|
|
```
|
|
If enabled, automatically creates tax invoices for each vehicle owned by online players.
|
|
|
|
| Parameter | Type | Description |
|
|
|-----------|------|-------------|
|
|
| `enabled` | boolean | Enable/disable vehicle tax |
|
|
| `amount` | number | Tax amount per vehicle |
|
|
| `intervalHours` | number | How often to charge (in hours) |
|
|
| `reason` | string | Invoice reason displayed to player |
|
|
|
|
---
|
|
|
|
## House Tax Settings
|
|
|
|
```lua
|
|
HouseTax = {
|
|
enabled = true,
|
|
amount = 150,
|
|
intervalHours = 24,
|
|
reason = "House Tax",
|
|
}
|
|
```
|
|
If enabled, automatically creates tax invoices for each house owned by online players.
|
|
|
|
| Parameter | Type | Description |
|
|
|-----------|------|-------------|
|
|
| `enabled` | boolean | Enable/disable house tax |
|
|
| `amount` | number | Tax amount per house |
|
|
| `intervalHours` | number | How often to charge (in hours) |
|
|
| `reason` | string | Invoice reason displayed to player |
|
|
|
|
---
|
|
|
|
## House Script Configuration
|
|
|
|
### Select House Script
|
|
```lua
|
|
UseHouseScript = true
|
|
HouseScript = "qb-houses"
|
|
```
|
|
|
|
| Value | House Script |
|
|
|-------|--------------|
|
|
| `qb-houses` | QBCore Houses |
|
|
| `origen-housing` | Origen Housing |
|
|
| `0r-houses` | 0r Properties |
|
|
| `tgiann-houses` | Tgiann Housing |
|
|
|
|
### House Script Database Configs
|
|
```lua
|
|
HouseScriptConfigs = {
|
|
["qb-houses"] = {
|
|
table = "player_houses",
|
|
ownerField = "citizenid",
|
|
nameField = "house"
|
|
},
|
|
["origen-housing"] = {
|
|
table = "origen_housing",
|
|
ownerField = "citizenid",
|
|
nameField = "name"
|
|
},
|
|
["0r-houses"] = {
|
|
table = "properties",
|
|
ownerField = "owner",
|
|
nameField = "name"
|
|
},
|
|
["tgiann-houses"] = {
|
|
table = "tgiann_housing",
|
|
ownerField = "owner",
|
|
nameField = "name"
|
|
},
|
|
}
|
|
```
|
|
Add your own house script configuration here if not listed.
|
|
|
|
| Parameter | Description |
|
|
|-----------|-------------|
|
|
| `table` | Database table name |
|
|
| `ownerField` | Column name for owner identifier |
|
|
| `nameField` | Column name for house/property name |
|
|
|
|
---
|
|
|
|
## Excluded Vehicles from Tax
|
|
|
|
```lua
|
|
DisableTaxesVehicles = {
|
|
['police'] = true,
|
|
['police2'] = true,
|
|
['police3'] = true,
|
|
['police4'] = true,
|
|
['ambulance'] = true,
|
|
['firetruk'] = true,
|
|
}
|
|
```
|
|
Vehicles excluded from automatic tax by model name. Useful for emergency and government vehicles.
|