mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
Fixes for invoice feature
This commit is contained in:
@@ -136,6 +136,8 @@ class MemberController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Merge one member into another
|
||||||
|
*
|
||||||
* @throws AuthorizationException
|
* @throws AuthorizationException
|
||||||
* @throws OnlyPlaceholdersCanBeMergedIntoAnotherMember
|
* @throws OnlyPlaceholdersCanBeMergedIntoAnotherMember
|
||||||
* @throws \Throwable
|
* @throws \Throwable
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ class JetstreamServiceProvider extends ServiceProvider
|
|||||||
'invoices:update',
|
'invoices:update',
|
||||||
'invoices:download',
|
'invoices:download',
|
||||||
'invoices:delete',
|
'invoices:delete',
|
||||||
|
'invoice-settings:view',
|
||||||
|
'invoice-settings:update',
|
||||||
])->description('Owner users can perform any action. There is only one owner per organization.');
|
])->description('Owner users can perform any action. There is only one owner per organization.');
|
||||||
|
|
||||||
Jetstream::role(Role::Admin->value, 'Administrator', [
|
Jetstream::role(Role::Admin->value, 'Administrator', [
|
||||||
@@ -195,6 +197,8 @@ class JetstreamServiceProvider extends ServiceProvider
|
|||||||
'invoices:update',
|
'invoices:update',
|
||||||
'invoices:download',
|
'invoices:download',
|
||||||
'invoices:delete',
|
'invoices:delete',
|
||||||
|
'invoice-settings:view',
|
||||||
|
'invoice-settings:update',
|
||||||
])->description('Administrator users can perform any action, except accessing the billing dashboard.');
|
])->description('Administrator users can perform any action, except accessing the billing dashboard.');
|
||||||
|
|
||||||
Jetstream::role(Role::Manager->value, 'Manager', [
|
Jetstream::role(Role::Manager->value, 'Manager', [
|
||||||
@@ -242,6 +246,8 @@ class JetstreamServiceProvider extends ServiceProvider
|
|||||||
'invoices:update',
|
'invoices:update',
|
||||||
'invoices:download',
|
'invoices:download',
|
||||||
'invoices:delete',
|
'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.).');
|
])->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', [
|
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
|
public function formatInterval(CarbonInterval $interval): string
|
||||||
{
|
{
|
||||||
if ($this->intervalFormat === IntervalFormat::Decimal) {
|
if ($this->intervalFormat === IntervalFormat::Decimal) {
|
||||||
|
|||||||
Reference in New Issue
Block a user