-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add billing #855
feat: add billing #855
Conversation
Kudos, SonarCloud Quality Gate passed! |
@asbiin please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Just some consistency changes, because I'm boring.
app/Jobs/Invoicing/LogDailyMaxNumberOfActiveEmployeesInCompanies.php
Outdated
Show resolved
Hide resolved
app/Console/Kernel.php
Outdated
@@ -37,6 +39,11 @@ protected function schedule(Schedule $schedule) | |||
$schedule->job(new StartRateYourManagerProcess())->lastDayOfMonth('01:00'); | |||
$schedule->job(new StopRateYourManagerProcess())->hourly(); | |||
|
|||
$schedule->command('timeoff:calculate '.Carbon::today()->format('Y-m-d'))->daily(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as the commented line below
Co-authored-by: Alexis Saettler <alexis@saettler.org>
…es.php Co-authored-by: Alexis Saettler <alexis@saettler.org>
Co-authored-by: Alexis Saettler <alexis@saettler.org>
Kudos, SonarCloud Quality Gate passed! |
🎉 This PR is included in version 0.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This pull request has been automatically locked since there |
Billing is a critical feature.
It allows us to bill customers appropriately, thus giving us more resources to work on the product. We need to make sure billing is done well on day 1.
Here is how it works on OfficeLife.
.env
variable that is enabled by default, which let us have paid plan on the instance. This flag will make sure customers are billed every month.LogDailyMaxNumberOfActiveEmployeesInCompanies
. An active employee is an employee who hasn't been locked in the account. This information is stored in a new table, calledcompany_daily_usage_history
.company_usage_history_details
. This table might be huge in the future as we get more customers - we might need to auto-delete the record after a given number of months.company_invoices
. The job is calledCreateMonthlyInvoiceForCompany
.In an ideal world, charging customers will be automated. For now, we'll charge manually.
Here is a breakdown of all the things we need to do:
.env
variable is documented