Merge branch 'fronkdev' into 'master'

PreorderBilling: Fixed using first status change to 500 as activation date

See merge request fronk/thetool!1943
This commit is contained in:
Frank Schubert
2025-12-09 16:13:12 +00:00

View File

@@ -446,7 +446,7 @@ class PreorderBillingController extends mfBaseController {
die("fibu_revenue code not found for preorder ".$preorder->id);
}
$change_to_active = PreorderHistoryModel::getFirstStatusChangeTo($preorder->id, 500);
$change_to_active = PreorderHistoryModel::getLastStatusChangeTo($preorder->id, 500);
if($change_to_active) {
$status_change_date = new DateTime("@".$change_to_active->changed);
$billing_data["start_date"] = $status_change_date->format("Y-m-d");