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

This commit is contained in:
Frank Schubert
2025-12-09 17:11:14 +01:00
parent 65868ba3f7
commit 8a0cb38272

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");