diff --git a/application/PreorderBilling/PreorderBillingController.php b/application/PreorderBilling/PreorderBillingController.php index 2785de0f4..d11104877 100644 --- a/application/PreorderBilling/PreorderBillingController.php +++ b/application/PreorderBilling/PreorderBillingController.php @@ -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");