WIP PreorderBilling 2025-03-26

This commit is contained in:
Frank Schubert
2025-03-26 14:06:23 +01:00
parent c73c2e2a86
commit e3a6d494ef
10 changed files with 195 additions and 10 deletions
@@ -148,7 +148,7 @@ class PreorderBillingController extends mfBaseController {
$now_day = date("d");
$today = new DateTime("$now_year-$now_month-$now_day");
$today = new DateTime("2025-04-13");
//$today = new DateTime("2025-04-13");
$today->setTime(2,0,0);
$today->setTimezone(new DateTimeZone("Europe/Vienna"));
@@ -339,6 +339,7 @@ class PreorderBillingController extends mfBaseController {
"end_date" => $status_change_date->format("Y-m-d"),
"billing_delivery" => "email",
"product_id" => $product->id,
"product_type" => $product->type,
"product_info" => "",
"article_number" => $article_number,
"amount" => 1,
@@ -425,6 +426,11 @@ class PreorderBillingController extends mfBaseController {
die("Unknown billing type $type");
}
if(!$billing_data["unit"]) {
var_dump($billing_data);exit;
}
$billing = PreorderBilling::create($billing_data);
if(!$billing->save()) {
die("Billing record could not be saved!");
@@ -632,6 +638,7 @@ class PreorderBillingController extends mfBaseController {
"end_date" => $end_date->format("Y-m-d"),
"billing_delivery" => "email",
"product_id" => $product->id,
"product_type" => $product->type,
"product_info" => "",
"article_number" => $article_number,
"amount" => 1,