Partner Producthchange WIP 2024-07-23

This commit is contained in:
Frank Schubert
2024-07-24 13:34:39 +02:00
parent ce671f2edd
commit a4f6b3b98c
8 changed files with 784 additions and 303 deletions

View File

@@ -346,6 +346,8 @@ class BillingController extends mfBaseController {
$total_days = $last_of_period->diff($first_of_period)->format("%a") + 1;
$period_days = ($end_date->diff($start_date)->format("%a")) + 1;
if($period_days < 0) continue; // don't bill for negative time range
$pc = $period_days / $total_days * 100;
$price = round($contract->price / 100 * $pc, 4);