mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Fixes for invoice feature
This commit is contained in:
committed by
Gregor Vostrak
parent
e78a551098
commit
827e0fe377
@@ -136,6 +136,8 @@ class MemberController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge one member into another
|
||||
*
|
||||
* @throws AuthorizationException
|
||||
* @throws OnlyPlaceholdersCanBeMergedIntoAnotherMember
|
||||
* @throws \Throwable
|
||||
|
||||
@@ -138,6 +138,8 @@ class JetstreamServiceProvider extends ServiceProvider
|
||||
'invoices:update',
|
||||
'invoices:download',
|
||||
'invoices:delete',
|
||||
'invoice-settings:view',
|
||||
'invoice-settings:update',
|
||||
])->description('Owner users can perform any action. There is only one owner per organization.');
|
||||
|
||||
Jetstream::role(Role::Admin->value, 'Administrator', [
|
||||
@@ -195,6 +197,8 @@ class JetstreamServiceProvider extends ServiceProvider
|
||||
'invoices:update',
|
||||
'invoices:download',
|
||||
'invoices:delete',
|
||||
'invoice-settings:view',
|
||||
'invoice-settings:update',
|
||||
])->description('Administrator users can perform any action, except accessing the billing dashboard.');
|
||||
|
||||
Jetstream::role(Role::Manager->value, 'Manager', [
|
||||
@@ -242,6 +246,8 @@ class JetstreamServiceProvider extends ServiceProvider
|
||||
'invoices:update',
|
||||
'invoices:download',
|
||||
'invoices:delete',
|
||||
'invoice-settings:view',
|
||||
'invoice-settings:update',
|
||||
])->description('Managers have full access to all projects, time entries, ect. but cannot manage the organization (add/remove member, edit the organization, ect.).');
|
||||
|
||||
Jetstream::role(Role::Employee->value, 'Employee', [
|
||||
|
||||
@@ -64,6 +64,17 @@ class LocalizationService
|
||||
}
|
||||
}
|
||||
|
||||
public function formatNumberWithoutTrailingZeros(BigDecimal|float $number): string
|
||||
{
|
||||
$number = $this->formatNumber($number);
|
||||
|
||||
$number = rtrim($number, '0');
|
||||
$number = rtrim($number, '.');
|
||||
$number = rtrim($number, ',');
|
||||
|
||||
return $number;
|
||||
}
|
||||
|
||||
public function formatInterval(CarbonInterval $interval): string
|
||||
{
|
||||
if ($this->intervalFormat === IntervalFormat::Decimal) {
|
||||
|
||||
Reference in New Issue
Block a user