Merge branch 'fronkdev' into 'master'

added magenta activation date import script

See merge request fronk/thetool!1153
This commit is contained in:
Frank Schubert
2025-03-29 19:52:28 +00:00
13 changed files with 473 additions and 65 deletions

View File

@@ -117,12 +117,22 @@ $pagination_entity_name = "Billingrecords";
<!--button type="submit" class="btn btn-primary"><i class="fas fa-fw fa-check"></i> Markierte Elemente als Contract übernehmen</button-->
</div>
<div class="float-right">
<a class="btn btn-outline-primary mb-2" href="<?=self::getUrl("PreorderBilling", "importPreorders")?>">
<i class="far fa-fw fa-file-import"></i> Rechnungsdatensätze erstellen
</a>
<a class="btn btn-primary mb-2 ml-2" href="<?=self::getUrl("PreorderBillingInvoice", "create")?>">
<i class="far fa-fw fa-file-invoice"></i> Rechnungen erstellen
</a>
<div class="row">
<div class="col">
<a class="btn btn-outline-primary mb-2" href="<?=self::getUrl("PreorderBilling", "importPreorders")?>">
<i class="far fa-fw fa-file-import"></i> Rechnungsdatensätze erstellen
</a>
</div>
</div>
<?php if(PreorderBilling::count(["invoice_id" => false])): ?>
<div class="row">
<div class="col">
<a class="btn btn-primary mb-2" href="<?=self::getUrl("PreorderBillingInvoice", "create")?>">
<i class="far fa-fw fa-file-invoice"></i> Rechnungen erstellen
</a>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>

View File

@@ -109,7 +109,7 @@ $pagination_entity_name = "Rechnungen";
<th>Rechnungsdatum</th>
<th>Kundennummer</th>
<th>Rechnungsadresse</th>
<th>Text</th>
<th>Rechnungstext</th>
<th>Netto</th>
<th>Ust.</th>
<th>Brutto</th>
@@ -137,7 +137,7 @@ $pagination_entity_name = "Rechnungen";
<?=$invoice->zip?> <?=$invoice->city?>
<?=($invoice->country != "Österreich") ? "<br >".$invoice->country : ""?>
</td>
<td><?=$invoice->head_text?></td>
<td><?=nl2br(htmlentities($invoice->head_text))?></td>
<td>€ <?=number_format($invoice->total, 2, ",", ".")?></td>
<td>€ <?=number_format($invoice->total_gross - $invoice->total, 2, ",", ".")?></td>
<td>€ <?=number_format($invoice->total_gross, 2, ",", ".")?></td>

View File

@@ -28,14 +28,7 @@
}
</script>
<div style="margin-bottom: 16px;height: 1px"></div>
<div style="color:grey;text-align: center;margin-bottom: 0">
<span>RML Infrastruktur GmbH | Wirtschaftspark A | 8940 Liezen</span><br>
<span>E-Mail: office@rmlinfrastruktur.at | IBAN: {{ bank_iban }}</span><br>
<span>UID: ATU77557626 | FN: 568443x | Gerichtsstand Liezen</span><br>
</div>
<div style="text-align: right">Seite <span class="page"></span> von <span class="topage"></span></div>
<div style="padding-bottom: 56px; padding-right: 6px; text-align: right;">Seite <span class="page"></span> von <span class="topage"></span></div>
<div style="margin-top: 16px;height: 1px"></div>
</body>

View File

@@ -11,19 +11,33 @@
border: 0;
margin: 0;
padding-top: 0;
font-family: "Open Sans", sans-serif, Verdana;
font-family: "Calibri", sans-serif, Verdana;
font-size: 12px;
}
.rml-header-text {
padding-left: 12pt;
width: 60%;
font-size: 17px;
padding-top: 52px;
line-height: 18px;
}
.rml-header-text .header {
font-size: 20px;
}
.info-table {
border-collapse: collapse;
width: 100%;
}
.customer-details {
font-weight: bold;
vertical-align: top;
font-size: 14px;
padding-left: 30pt;
padding-right: 30pt;
width: 50%;
}
@@ -62,18 +76,17 @@
</head>
<body>
<div id="topSpacer"></div>
<table style="width: 100%; margin-bottom: 64px;">
<tr>
<td style="padding-left: 30pt; width: 60%; font-size: 14px; padding-top: 52px;">
<strong>RML Infrastruktur GmbH</strong><br />
<td class="rml-header-text">
<span class="header">RML Infrastruktur GmbH</span><br />
Wirtschaftspark A<br />
8940 Liezen<br />
Österreich
</td>
<td style="width: 40%; text-align: right; padding-right: 0;">
<img alt="RML Logo" src="{{ basedir }}/public/assets/images/rml-logo-header.png" style="text-align:right;height: 125px;">
</td>
</tr>
</table>

View File

@@ -1,8 +1,13 @@
<?php
/*
* RML Preorder Invoice Layout
*/
/**
* @var string $ressourcePathPrefix
* @var Invoice $invoice
* @var array $vat
* @var string $qrcode
*/
$net_total = $invoice->total;
$gross_total = $invoice->total_gross;
@@ -12,8 +17,6 @@ $invoice_date = new DateTime($invoice->invoice_date);
$this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
//die(json_encode($invoice->positions));
?>
<!DOCTYPE html>
@@ -21,16 +24,20 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<head>
<title>Rechnung</title>
<meta charset="utf-8" />
<!-- <link href="-->
<?php //= self::getResourcePath() ?><!--assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />-->
<style>
body {
margin-top: 0;
padding-top: 0;
/*padding-top: 20pt;*/
font-family: "Open Sans", sans-serif, Verdana;
font-size: 12px;
font-family: "Calibri", Arial, sans-serif;
font-size: 14px;
}
.head-text {
font-family: Calibri, Arial, sans-serif;
font-size: 16px;
margin-bottom: 24px;
}
tr {
@@ -61,7 +68,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
}
#invoiceTable tr td {
font-size: 11px;
font-size: 13px;
}
tr.position td {
@@ -87,7 +94,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<h2><?=($is_credit) ? "Gutschrift" : "Rechnung"?> <?=$invoice->invoice_number?></h2>
<?php if($invoice->head_text):?>
<p><?=$invoice->head_text?></p>
<p class="head-text"><?=nl2br(htmlentities($invoice->head_text))?></p>
<?php endif; ?>
<table style="border-collapse: collapse; width: 100%;" id="invoiceTable">
@@ -103,26 +110,26 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<?php
$i = 0;
foreach($invoice->positions as $p):
$amount = (float) number_format($p->amount, 3, ",", ".");
$price = number_format($p->price, 2, ",",".");
$price_total = number_format($p->price_total, 2, ",",".");
$price_gross = number_format($p->price_gross, 2, ",",".");
$vatrate = number_format($p->vatrate, 0, ",",".");
$amount = (float) number_format($p->amount, 3, ",", ".");
$price = number_format($p->price, 2, ",",".");
$price_total = number_format($p->price_total, 2, ",",".");
$price_gross = number_format($p->price_gross, 2, ",",".");
$vatrate = number_format($p->vatrate, 0, ",",".");
?>
?>
<tr class="position <?=($i%2 == 0) ? "even" : "uneven" ?>">
<td style="text-align: left"><?=$i+1?></td>
<td style="text-align: left"><?=$p->article_number?></td>
<td style="text-align: left"><?=$p->article_name?></td>
<td style="text-align: right"><?=$amount?></td>
<td style="text-align: left"><?=$p->unit?></td>
<td style="text-align: right"><?=$price?> €</td>
<td style="padding-right: 4pt;"><?=$price_total?> €</td>
</tr>
<tr class="position <?=($i%2 == 0) ? "even" : "uneven" ?>">
<td style="text-align: left"><?=$i+1?></td>
<td style="text-align: left"><?=$p->article_number?></td>
<td style="text-align: left"><?=$p->article_name?></td>
<td style="text-align: right"><?=$amount?></td>
<td style="text-align: left"><?=$p->unit?></td>
<td style="text-align: right"><?=$price?> €</td>
<td style="padding-right: 4pt;"><?=$price_total?> €</td>
</tr>
<?php
$i++;
<?php
$i++;
endforeach;
?>
<tr style="font-weight: bold; background-color: #ebebeb; border-bottom: 1px solid black;border-top: 1px solid black">
@@ -153,7 +160,28 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<p style="font-weight: bold;"><?=$invoice->tax_text?></p>
<?php endif; ?>
Zahlungsziel 14 Tage.
<table style="width: 100%; border-collapse: collapse;">
<tr>
<th style="width: 20%; text-align: left">Zahlungskondition:</th>
<td style="text-align: left;">Zahlbar sofort nach Erhalt der Rechnung ohne Abzug</td>
<td rowspan="3">
<img alt="QR-Code" src="<?=$qrcode?>" style="text-align:right;height: 3cm;">
</td>
</tr><tr>
<th style="text-align: left; vertical-align: top;">Bankverbindung:</th>
<td style="text-align: left; vertical-align: top;">
UniCredit Bank Austria AG<br />
IBAN: AT85 1200 0100 3986 5885 &nbsp; BIC: BKAUATWWXXX
</td>
</tr><tr>
<td style="width: 20%; text-align: left; vertical-align: top; padding-top: 16px;"></td>
<td style="text-align: left; vertical-align: top; padding-top: 16px;">
<strong>+43 664 128 10 43</strong><br />
<strong>office@rml-infrastruktur.at</strong>
</td>
</tr>
</table>
</div>

View File

@@ -13,6 +13,7 @@ class ADBWohneinheitModel {
public $zusatz;
public $bezeichner;
public $nutzung;
public $enduser_setup_invoice_date;
public $rimo_ex_state;
public $rimo_op_state;
public $patch_cluster;

View File

@@ -941,7 +941,7 @@ class AddressdbApicontroller extends mfBaseApicontroller {
//$paid = $unit->enduser_setup_paid;
if(PreorderBilling::getFirst(["adb_wohneinheit_id" => $unit->id, "product_id" => $enduser_setup_product_id, "invoice_id" => false])) {
if($unit->enduser_setup_invoice_date || PreorderBilling::getFirst(["adb_wohneinheit_id" => $unit->id, "product_id" => $enduser_setup_product_id, "invoice_id" => false])) {
$prices_return["enduser_setup_price_net"] = 0;
$prices_return["enduser_setup_price_gross"] = 0;
$prices_return["enduser_setup_info"] = "paid";

View File

@@ -47,13 +47,6 @@ class PreorderBillingController extends mfBaseController {
$pagination['start'] = intval($this->request->s);
}
/*$my_campaigns = [];
$my_networks = $this->me->myNetworks(["netowner", "salespartner"]);
foreach($my_networks as $network) {
foreach(PreordercampaignModel::search(['network_id' => $network->id]) as $campaign) {
if(!array_key_exists($campaign->id, $my_campaigns)) $my_campaigns[] = $campaign;
}
}*/
$my_campaigns = PreordercampaignModel::search(["owner_id" => $this->me->address_id]);
//var_dump($my_network_ids,$my_campaign_ids);exit;
$this->layout()->set("my_campaigns", $my_campaigns);
@@ -275,6 +268,7 @@ class PreorderBillingController extends mfBaseController {
$order_date = $options['order_date'];
$today = $options['today'];
$bill_date = $options['bill_date'];
$latest_bill_date = $options['latest_bill_date'];
$earliest_bill_date = $options['earliest_bill_date'];
$latest_quarter_bill_date = $options["latest_quarter_bill_date"];
@@ -329,6 +323,16 @@ class PreorderBillingController extends mfBaseController {
$status_change_date = new DateTime("@".$preorder->create);
}
if($status_change_date < $earliest_bill_date) {
$this->log->debug(__METHOD__.": Not billing setups for preorder ".$preorder->id." because status change date ".$status_change_date->format("Y-m-d")." is before earliest_bill_date ".$earliest_bill_date->format("Y-m-d"));
return true;
}
if($status_change_date->format("Ymd") > $latest_bill_date->format("Ymd")) {
$this->log->debug(__METHOD__.": Skipping setup for preorder ".$preorder->id." because billing date (status change date) ".$status_change_date->format("Y-m-d")." is after latest_bill_date ".$latest_bill_date->format("Y-m-d"));
return true;
}
$billing_data = [
"netowner_id" => $netowner->id,
"preorder_id" => $preorder->id,
@@ -390,10 +394,11 @@ class PreorderBillingController extends mfBaseController {
$billing_data[$key] = $value;
}
$address = $preorder->adb_hausnummer->strasse->name." ".$preorder->adb_hausnummer->hausnummer." ".($preorder->adb_hausnummer->stiege ? "/".$preorder->adb_hausnummer->stiege : "").", ".$preorder->adb_hausnummer->plz->plz." ".$preorder->adb_hausnummer->ortschaft->name;
$billing_data["preorderbillingcustomer_id"] = $customer->id;
$billing_data["fibu_account_number"] = $customer->fibu_account_number;
$billing_data["product_name"] = "Herstellungsentgelt Glasfaser-Internetanschluss";
$billing_data["product_info"] = "Bestellung vom ".$order_date->format("d.m.Y");
$billing_data["product_info"] = $address;
} elseif($type == "operator_setup") {
$change_to_active = PreorderHistoryModel::getFirstStatusChangeTo($preorder->id, 500);
@@ -408,6 +413,11 @@ class PreorderBillingController extends mfBaseController {
return true;
}
if($status_change_date->format("Ymd") > $latest_bill_date->format("Ymd")) {
$this->log->debug(__METHOD__.": Skipping setup for preorder ".$preorder->id." because billing date (status change date) ".$status_change_date->format("Y-m-d")." is after latest_bill_date ".$latest_bill_date->format("Y-m-d"));
return true;
}
// Netzbetreiber Setup Gebühr
$billing_data["product_name"] = "Brereitstellungsentgelt ".$status_change_date->format("m/Y");
$billing_data["owner_id"] = $netoperator->id;
@@ -449,6 +459,7 @@ class PreorderBillingController extends mfBaseController {
$order_date = $options['order_date'];
$today = $options['today'];
$bill_date = $options['bill_date'];
$latest_bill_date = $options['latest_bill_date'];
$earliest_bill_date = $options['earliest_bill_date'];
$latest_quarter_bill_date = $options["latest_quarter_bill_date"];
@@ -470,7 +481,7 @@ class PreorderBillingController extends mfBaseController {
if($preorder->status->code >= 899) {
$this->log->debug(__METHOD__.": Preorder ".$preorder->id." / ".$preorder->oaid." is cancelled");
// TODO is cancelled, so determine if refund is necessary
// TODO: is cancelled, so determine if refund is necessary
return true;
}
@@ -502,6 +513,11 @@ class PreorderBillingController extends mfBaseController {
$earliest_bill_date = $status_change_date;
}
if($status_change_date->format("Ymd") > $latest_bill_date->format("Ymd")) {
$this->log->debug(__METHOD__.": Skipping setup for preorder ".$preorder->id." because billing date (status change date) ".$status_change_date->format("Y-m-d")." is after latest_bill_date ".$latest_bill_date->format("Y-m-d"));
return true;
}
$first_bill_date = clone $status_change_date;

View File

@@ -1,5 +1,9 @@
<?php
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use chillerlan\QRCode\Output\QROutputInterface;
class PreorderBillingInvoice extends mfBaseModel {
protected $forcestr = ["company", "zip", "email", "phone"];
private $positions;
@@ -34,6 +38,8 @@ class PreorderBillingInvoice extends mfBaseModel {
$invoice_date = new DateTime("@1");
}
$conf = TT_PREORDER_BILLING[$this->netowner_id];
$filename = "";
$positions = $this->getProperty("positions");
@@ -48,13 +54,14 @@ class PreorderBillingInvoice extends mfBaseModel {
$pdf_vars = [
"invoice" => $this,
"vat" => $vat,
"qrcode" => $this->getSepaQRCode($this->netowner_id, $invoice_number, round($this->total_gross, 2)),
];
$me = new User();
$me->loadMe();
// Replace placeholders in header
$headerHtml = file_get_contents(BASEDIR . "/Layout/default/PreorderBillingInvoice/PDF_HEADER.html");
$headerHtml = file_get_contents(BASEDIR . "/Layout/default/PreorderBillingInvoice/PDF_HEADER-".$this->netowner_id.".html");
$headerHtml = str_replace("{{ basedir }}", BASEDIR, $headerHtml);
$headerHtml = str_replace("{{ addressLine_1 }}", $this->company ? $this->company : "", $headerHtml);
$headerHtml = str_replace("{{ addressLine_2 }}", $this->firstname . " " . $this->lastname, $headerHtml);
@@ -75,23 +82,59 @@ class PreorderBillingInvoice extends mfBaseModel {
// Replace placeholders in header
$footerHtml = file_get_contents(BASEDIR . "/Layout/default/PreorderBillingInvoice/PDF_FOOTER.html");
$footerHtml = str_replace("{{ bank_iban }}", "AT85 1200 0100 3986 5885", $footerHtml);
$footerHtml = str_replace("{{ bank_bic }}", "", $footerHtml);
$footerHtml = file_get_contents(BASEDIR . "/Layout/default/PreorderBillingInvoice/PDF_FOOTER-".$this->netowner_id.".html");
$footerHtml = str_replace("{{ bank_iban }}", $conf["bank-account-iban"], $footerHtml);
$footerHtml = str_replace("{{ bank_bic }}", $conf["bank-account-bic"], $footerHtml);
$footerFile = BASEDIR . "/var/temp/preorderbillinginvoice_footer-" . date("U") . "-" . rand(1000, 9999) . ".html";
file_put_contents($footerFile, $footerHtml);
$pdf = new PdfForm("PreorderBillingInvoice/PDF_MAIN", $pdf_vars);
$wkhtmltopdfArgs = "--margin-top 10mm --header-spacing 90 --header-html '$headerFile' --footer-html '$footerFile'";
$pdf = new PdfForm("PreorderBillingInvoice/PDF_MAIN-".$this->netowner_id, $pdf_vars);
$wkhtmltopdfArgs = "--margin-top 2mm --header-spacing 90 --header-html '$headerFile' --footer-html '$footerFile'";
$filename = $pdf->render($wkhtmltopdfArgs);
if($conf["invoice-pdf-bg-file"]) {
// run pdftk with $filename as input and $conf["invoice-pdf-bg-file"] as output
// to add background to pdf
$bg_file = $conf["invoice-pdf-bg-file"];
$temp_file_name = tempnam(TEMP_DIR, "invoice-pdftk").".pdf";
$pdftk_cmd = PDFTK_BIN_PATH." '$filename' background '$bg_file' output '$temp_file_name'";
$this->log->debug(__METHOD__." $pdftk_cmd");
shell_exec($pdftk_cmd);
$filename = $temp_file_name;
}
return $filename;
}
public function getSepaQRCode($netowner_id, $invoice_number, $amount) {
if(!$netowner_id) return "";
$conf = TT_PREORDER_BILLING[$netowner_id];
$IBAN = str_replace(" ", "", $conf["bank-account-iban"]);
$BIC = str_replace(" ", "", $conf["bank-account-bic"]);
$Owner = $conf["bank-account-owner"];
$epc = "BCD
001
1
SCT
$BIC
$Owner
$IBAN
EUR$amount
$invoice_number
RML Infrastruktur GmbH";
return (new QRCode)->render($epc);
}
public function getProperty($name) {

View File

@@ -168,6 +168,20 @@ class PreorderBillingInvoiceController extends mfBaseController {
protected function createAction() {
$netowner_id = $this->me->address_id;
$today = new DateTime();
$bill_month = clone $today;
$bill_month->modify("-1 month");
$fmt = new IntlDateFormatter(
MFLOCALE_TIME,
IntlDateFormatter::NONE,
IntlDateFormatter::NONE,
"Europe/Vienna",
IntlDateFormatter::GREGORIAN,
'MMMM'
);
$bill_month_year_text = $fmt->format($bill_month)." ".$bill_month->format("Y");
$bill_quarter = ceil($bill_month->format("n") / 3);
$billing_row_count = 0;
$positions_count = 0;
@@ -191,6 +205,8 @@ class PreorderBillingInvoiceController extends mfBaseController {
}
$campaign_name = $campaign->name;
$campaign_name = preg_replace('/^RML Liezen\s+-\s+/', '', $campaign_name);
$cluster = array_shift($campaign->salesclusters);
$cluster_name = $cluster->extref;
$bill_positions = [];
$credit_positions = [];
@@ -397,8 +413,12 @@ class PreorderBillingInvoiceController extends mfBaseController {
unset($position->count);
if($position->product_id != 2) {
$invoice->head_text = "Entgelte für Netzgebiet $campaign_name";
if($position->product_type != "enduser_setup") {
if(array_key_exists($netoperator_id, TT_PREORDER_BILLING[$netowner_id]["netoperators"]) && TT_PREORDER_BILLING[$netowner_id]["netoperators"][$netoperator_id]["billing-period"] == "quarterly") {
$invoice->head_text = "Abrechnung Q$bill_quarter ".$bill_month->format("Y")."\n$campaign_name\nPOP-Cluster: $cluster_name";
} else {
$invoice->head_text = "Abrechnung $bill_month_year_text\n$campaign_name\nPOP-Cluster: $cluster_name";
}
}
$total_net += $position->price_total;

Binary file not shown.

View File

@@ -0,0 +1,109 @@
#!/usr/bin/php
<?php
//require 'vendor/autoload.php';
require("../../config/config.php");
define('FRONKDB_SQLDEBUG', false);
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
require_once(LIBDIR . "/mvcfronk/mfRouter/mfRouter.php");
require_once(LIBDIR . "/mvcfronk/mfBase/mfBaseModel.php");
require_once(LIBDIR . "/mvcfronk/mfBase/mfBaseController.php");
$me = new User(1);
define("INTERNAL_USER_ID", $me->id);
define("INTERNAL_USER_USERNAME", $me->username);
define("MFBASE_BYPASS_LOGIN", true);
$folder = __DIR__."/import/";
$filename = "25_MagentaKunden.csv";
$db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
$log = mfLoghandler::singleton();
$start = date("U");
$last_ts = $start;
$input = fopen($folder.$filename, "r");
$bom = "\xef\xbb\xbf";
if(fgets($input, 4) !== $bom) {
// BOM not found - rewind pointer to start of file.
rewind($input);
}
$headers = [];
$import_date = false;
$status_500 = PreorderstatusModel::getFirst(["code" => 500]);
if(!$status_500) {
die("No status 500");
}
//$c = 0;
$i = 0;
while($csv = fgetcsv($input, 0)) {
$i++;
if ($i == 1) {
foreach ($csv as $key => $name) {
$headers[$name] = $key;
}
continue;
}
if (!trim($csv[0])) {
continue;
}
$oaid = trim($csv[$headers["OAID HOME"]]);
$input_date = trim($csv[$headers["ISP Service aktiv"]]);
if(!$oaid || !$input_date) {
break;
}
$activation_date = new DateTime($input_date);
$activation_date->setTime(4, 0, 0);
if(PreorderModel::countActive(["oaid" => $oaid]) > 1) {
die("OAID $oaid more than 1 active Preorder!");
}
$preorder = PreorderModel::getFirstActive(["oaid" => $oaid]);
if(!$preorder) {
die("Preorder $oaid not Found!");
}
if($preorder->status->code < 500) {
echo "$oaid -> status ".$preorder->status->code."\n";
}
$active_change = PreorderHistoryModel::getLastStatusChangeTo($preorder->id, 500);
/*echo "$oaid: $input_date\n";
echo "$oaid: ".$activation_date->format("Y-m-d")."\n";
if($input_date != $activation_date->format("Y-m-d")) {
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
}
continue;*/
if(!$active_change) {
$active_change = PreorderHistoryModel::create([
"preorder_id" => $preorder->id,
"key" => "status_id",
"old_value" => 1,
"new_value" => $status_500->id,
]);
$active_change->save();
}
$active_change->changed = $activation_date->getTimestamp();
$active_change->save();
}
echo "$i\n";

View File

@@ -0,0 +1,175 @@
OAID HOME,ISP Service aktiv
AT-8952-b92fcb7d.001,2023-10-17
AT-8952-0923e13a.001,2023-12-07
AT-8952-d5efb0c5.001,2024-04-24
AT-8952-20559f13.001,2023-12-07
AT-8952-18354d50.001,2024-04-24
AT-8952-f15a2ca7.001,2024-01-12
AT-8952-e2aac412.001,2024-04-24
AT-8952-d150720b.001,2024-01-10
AT-8952-03e9c108.001,2024-01-15
AT-8952-a9ef64c5.001,2023-12-07
AT-8952-5dfb7093.001,2023-12-07
AT-8952-e41153d0.001,2024-04-24
AT-8952-4e7fa84f.001,2024-09-12
AT-8952-46bb7fff.001,2024-04-23
AT-8952-49928eab.001,2024-01-10
AT-8952-fc73db80.001,2024-05-15
AT-8943-2a911dab.001,2024-07-25
AT-8952-544d23e8.001,2024-04-23
AT-8952-a0784e8d.001,2024-07-11
AT-8982-a415bb94.001,2024-08-14
AT-8952-1629b7f4.001,2024-05-15
AT-8952-2ce0dc06.001,2024-05-17
AT-8943-65b57745.001,2024-09-03
AT-8943-40c99c0d.002,2024-08-12
AT-8943-40c99c0d.004,2024-08-12
AT-8943-40c99c0d.001,2024-08-12
AT-8943-40c99c0d.003,2024-08-12
AT-8952-db66a8b5.001,2024-09-12
AT-8952-a2959a59.001,2024-09-10
AT-8952-d82544fa.001,2024-09-11
AT-8943-dcab7caf.001,2024-09-12
AT-8943-cf48ccef.001,2024-09-02
AT-8943-2c01ac8d.001,2024-09-03
AT-8952-eb1f181f.001,2024-09-30
AT-8952-ab64ee00.001,2024-09-10
AT-8943-3f07dd46.001,2024-09-30
AT-8943-f2c2ae10.002,2024-09-10
AT-8943-fa78f417.001,2024-09-04
AT-8952-9298eb35.001,2024-09-10
AT-8943-05505f1e.001,2024-09-04
AT-8943-b8e526a2.002,2024-09-03
AT-8943-b8e526a2.001,2024-09-03
AT-8943-54e2caa3.001,2024-09-11
AT-8952-907f3e5b.001,2024-09-12
AT-8943-91b15e79.001,2024-09-11
AT-8952-e3ead452.001,2024-09-11
AT-8943-a28e1bce.001,2024-09-10
AT-8952-6825d3ae.001,2024-09-11
AT-8943-e29b3cd4.001,2024-09-11
AT-8952-5badd1cd.001,2024-09-09
AT-8943-1277b7eb.001,2024-09-11
AT-8943-5d391327.001,2024-09-09
AT-8943-b4c1b606.001,2024-09-09
AT-8943-6e424945.001,2024-09-05
AT-8943-339cdc17.001,2024-09-05
AT-8943-a443cbe2.001,2024-09-05
AT-8943-dd7e2b71.005,2024-10-08
AT-8952-d63f3b4a.001,2024-11-11
AT-8943-9389a188.002,2024-11-07
AT-8952-730c7315.001,2024-11-04
AT-8943-9389a188.001,2024-11-05
AT-8943-090108fa.001,2024-11-04
AT-8952-56809ead.001,2024-11-05
AT-8952-0f09116b.001,2024-11-05
AT-8952-7a957a9e.001,2024-11-04
AT-8943-ad0ba787.001,2024-11-05
AT-8952-8ff3a2c9.001,2024-11-05
AT-8952-fccc732a.001,2024-11-04
AT-8952-8307773c.001,2024-11-04
AT-8943-8bde59fc.004,2024-11-11
AT-8952-d510b7aa.001,2024-11-07
AT-8952-39b3f98f.001,2024-11-07
AT-8952-f2a0a99d.001,2024-11-06
AT-8952-cfd374ef.001,2024-11-11
AT-8952-84e38d21.001,2024-11-06
AT-8952-a95bda77.001,2024-11-06
AT-8952-5df56224.001,2024-11-04
AT-8952-047a8d82.001,2024-11-06
AT-8952-174a11aa.001,2024-11-06
AT-8943-ac155257.001,2024-11-04
AT-8943-ad0ba787.004,2024-11-05
AT-8943-d906ff07.001,2024-10-30
AT-8952-be7a0660.001,2024-10-28
AT-8952-4bffce63.001,2024-10-28
AT-8952-aed7e5ed.001,2024-10-29
AT-8952-cd78c3e5.001,2024-10-29
AT-8952-af85f1e0.001,2024-10-29
AT-8952-b9749ec9.001,2024-10-29
AT-8952-f63e9d2c.001,2024-10-30
AT-8952-affe64f2.001,2024-10-30
AT-8952-f4468002.001,2024-10-30
AT-8952-e80422e6.001,2024-10-31
AT-8943-13e70f36.001,2024-10-30
AT-8943-426cda48.002,2024-10-18
AT-8943-0281f0db.003,2024-10-28
AT-8943-426cda48.001,2024-10-28
AT-8943-5565dba0.001,2024-10-30
AT-8952-a7c37d89.001,2024-10-31
AT-8952-a8bd4bd9.001,2024-11-13
AT-8952-d4fb7422.001,2024-11-13
AT-8952-8ea45971.001,2024-11-13
AT-8943-a464c429.001,2024-12-12
AT-8943-fffb3d90.006,2024-12-11
AT-8943-ad6205f0.001,2024-12-18
AT-8982-6a510a7a.001,2024-12-20
AT-8982-66f307a0.001,2024-12-20
AT-8982-dbab4714.002,2024-12-19
AT-8943-dd7e2b71.003,2024-12-19
AT-8982-2827d3aa.001,2024-12-19
AT-8982-a1ada847.001,2024-12-20
AT-8943-fce5a31f.003,2024-12-18
AT-8943-49b0c91c.001,2024-12-12
AT-8982-0208e8be.001,2024-12-20
AT-8943-fffb3d90.003,2024-12-10
AT-8943-fffb3d90.004,2024-12-10
AT-8943-c964421e.001,2024-12-12
AT-8982-580833dd.001,2024-12-20
AT-8943-77d4537b.001,2024-12-18
AT-8943-820efe44.001,2024-12-12
AT-8943-3c8f8152.003,2024-12-10
AT-8982-614920ab.001,2024-12-20
AT-8943-9c8937e8.001,2024-12-02
AT-8982-af3a8d63.001,2024-12-19
AT-8943-3c8f8152.002,2024-12-18
AT-8982-d798cd99.001,2024-12-19
AT-8943-3c8f8152.001,2024-12-11
AT-8982-c6d7e4f2.001,2024-12-19
AT-8982-9641fb2e.001,2024-12-19
AT-8943-6e670739.001,2024-12-12
AT-8943-ed3620c0.001,2024-10-15
AT-8943-399bd714.001,2024-09-04
AT-8943-69ae30fb.001,2024-09-05
AT-8943-a1116acf.001,2024-12-12
AT-8952-5eea3a46.001,2024-12-10
AT-8952-3083a5c1.001,2025-01-28
AT-8943-46ec6651.001,2025-01-28
AT-8982-aded99c2.001,2025-01-21
AT-8982-abd61a0b.001,2025-01-21
AT-8952-64e40186.003,2025-01-13
AT-8983-2bf3214f.001,2025-01-14
AT-8952-c291163a.003,2025-01-29
AT-8952-47e52775.003,2025-01-29
AT-8943-d61452be.002,2025-01-21
AT-8943-c10d87c7.002,2025-01-28
AT-8943-fffb3d90.002,2024-12-11
AT-8982-451c1eb1.001,2024-12-19
AT-8982-3126a5dc.001,2024-12-19
AT-8982-06484e3f.001,2024-12-19
AT-8943-fffb3d90.001,2024-12-11
AT-8982-63977aa7.001,2024-12-20
AT-8982-7edf2184.001,2024-12-19
AT-8982-edc6a443.001,2024-12-20
AT-8952-64e40186.002,2025-01-13
AT-8982-bce86ac9.001,2024-12-19
AT-8982-d448ba70.001,2024-12-20
AT-8943-fce5a31f.002,2024-12-10
AT-8952-64e40186.001,2025-01-13
AT-8982-be11d84d.001,2024-12-20
AT-8952-ec0bd13d.001,2025-02-18
AT-8952-2c5c1a88.001,2025-02-18
AT-8943-9db3a055.002,2025-02-25
AT-8982-8ecff7fc.001,2025-02-05
AT-8952-ad79e49e.003,2025-02-27
AT-8943-9db3a055.001,2025-02-25
AT-8952-ad79e49e.002,2025-02-26
AT-8943-122f171a.001,2025-02-25
AT-8943-a72c5637.002,2025-02-05
AT-8982-f02e6c7d.002,2025-02-05
AT-8952-8e408a37.002,2025-02-27
AT-8982-f02e6c7d.001,2025-02-05
AT-8952-91880329.001,2025-02-11
AT-8943-bba3a3bc.001,2025-02-25
AT-8952-51989893.003,2025-03-11
AT-8943-f92eb5f7.001,2025-03-11
1 OAID HOME ISP Service aktiv
2 AT-8952-b92fcb7d.001 2023-10-17
3 AT-8952-0923e13a.001 2023-12-07
4 AT-8952-d5efb0c5.001 2024-04-24
5 AT-8952-20559f13.001 2023-12-07
6 AT-8952-18354d50.001 2024-04-24
7 AT-8952-f15a2ca7.001 2024-01-12
8 AT-8952-e2aac412.001 2024-04-24
9 AT-8952-d150720b.001 2024-01-10
10 AT-8952-03e9c108.001 2024-01-15
11 AT-8952-a9ef64c5.001 2023-12-07
12 AT-8952-5dfb7093.001 2023-12-07
13 AT-8952-e41153d0.001 2024-04-24
14 AT-8952-4e7fa84f.001 2024-09-12
15 AT-8952-46bb7fff.001 2024-04-23
16 AT-8952-49928eab.001 2024-01-10
17 AT-8952-fc73db80.001 2024-05-15
18 AT-8943-2a911dab.001 2024-07-25
19 AT-8952-544d23e8.001 2024-04-23
20 AT-8952-a0784e8d.001 2024-07-11
21 AT-8982-a415bb94.001 2024-08-14
22 AT-8952-1629b7f4.001 2024-05-15
23 AT-8952-2ce0dc06.001 2024-05-17
24 AT-8943-65b57745.001 2024-09-03
25 AT-8943-40c99c0d.002 2024-08-12
26 AT-8943-40c99c0d.004 2024-08-12
27 AT-8943-40c99c0d.001 2024-08-12
28 AT-8943-40c99c0d.003 2024-08-12
29 AT-8952-db66a8b5.001 2024-09-12
30 AT-8952-a2959a59.001 2024-09-10
31 AT-8952-d82544fa.001 2024-09-11
32 AT-8943-dcab7caf.001 2024-09-12
33 AT-8943-cf48ccef.001 2024-09-02
34 AT-8943-2c01ac8d.001 2024-09-03
35 AT-8952-eb1f181f.001 2024-09-30
36 AT-8952-ab64ee00.001 2024-09-10
37 AT-8943-3f07dd46.001 2024-09-30
38 AT-8943-f2c2ae10.002 2024-09-10
39 AT-8943-fa78f417.001 2024-09-04
40 AT-8952-9298eb35.001 2024-09-10
41 AT-8943-05505f1e.001 2024-09-04
42 AT-8943-b8e526a2.002 2024-09-03
43 AT-8943-b8e526a2.001 2024-09-03
44 AT-8943-54e2caa3.001 2024-09-11
45 AT-8952-907f3e5b.001 2024-09-12
46 AT-8943-91b15e79.001 2024-09-11
47 AT-8952-e3ead452.001 2024-09-11
48 AT-8943-a28e1bce.001 2024-09-10
49 AT-8952-6825d3ae.001 2024-09-11
50 AT-8943-e29b3cd4.001 2024-09-11
51 AT-8952-5badd1cd.001 2024-09-09
52 AT-8943-1277b7eb.001 2024-09-11
53 AT-8943-5d391327.001 2024-09-09
54 AT-8943-b4c1b606.001 2024-09-09
55 AT-8943-6e424945.001 2024-09-05
56 AT-8943-339cdc17.001 2024-09-05
57 AT-8943-a443cbe2.001 2024-09-05
58 AT-8943-dd7e2b71.005 2024-10-08
59 AT-8952-d63f3b4a.001 2024-11-11
60 AT-8943-9389a188.002 2024-11-07
61 AT-8952-730c7315.001 2024-11-04
62 AT-8943-9389a188.001 2024-11-05
63 AT-8943-090108fa.001 2024-11-04
64 AT-8952-56809ead.001 2024-11-05
65 AT-8952-0f09116b.001 2024-11-05
66 AT-8952-7a957a9e.001 2024-11-04
67 AT-8943-ad0ba787.001 2024-11-05
68 AT-8952-8ff3a2c9.001 2024-11-05
69 AT-8952-fccc732a.001 2024-11-04
70 AT-8952-8307773c.001 2024-11-04
71 AT-8943-8bde59fc.004 2024-11-11
72 AT-8952-d510b7aa.001 2024-11-07
73 AT-8952-39b3f98f.001 2024-11-07
74 AT-8952-f2a0a99d.001 2024-11-06
75 AT-8952-cfd374ef.001 2024-11-11
76 AT-8952-84e38d21.001 2024-11-06
77 AT-8952-a95bda77.001 2024-11-06
78 AT-8952-5df56224.001 2024-11-04
79 AT-8952-047a8d82.001 2024-11-06
80 AT-8952-174a11aa.001 2024-11-06
81 AT-8943-ac155257.001 2024-11-04
82 AT-8943-ad0ba787.004 2024-11-05
83 AT-8943-d906ff07.001 2024-10-30
84 AT-8952-be7a0660.001 2024-10-28
85 AT-8952-4bffce63.001 2024-10-28
86 AT-8952-aed7e5ed.001 2024-10-29
87 AT-8952-cd78c3e5.001 2024-10-29
88 AT-8952-af85f1e0.001 2024-10-29
89 AT-8952-b9749ec9.001 2024-10-29
90 AT-8952-f63e9d2c.001 2024-10-30
91 AT-8952-affe64f2.001 2024-10-30
92 AT-8952-f4468002.001 2024-10-30
93 AT-8952-e80422e6.001 2024-10-31
94 AT-8943-13e70f36.001 2024-10-30
95 AT-8943-426cda48.002 2024-10-18
96 AT-8943-0281f0db.003 2024-10-28
97 AT-8943-426cda48.001 2024-10-28
98 AT-8943-5565dba0.001 2024-10-30
99 AT-8952-a7c37d89.001 2024-10-31
100 AT-8952-a8bd4bd9.001 2024-11-13
101 AT-8952-d4fb7422.001 2024-11-13
102 AT-8952-8ea45971.001 2024-11-13
103 AT-8943-a464c429.001 2024-12-12
104 AT-8943-fffb3d90.006 2024-12-11
105 AT-8943-ad6205f0.001 2024-12-18
106 AT-8982-6a510a7a.001 2024-12-20
107 AT-8982-66f307a0.001 2024-12-20
108 AT-8982-dbab4714.002 2024-12-19
109 AT-8943-dd7e2b71.003 2024-12-19
110 AT-8982-2827d3aa.001 2024-12-19
111 AT-8982-a1ada847.001 2024-12-20
112 AT-8943-fce5a31f.003 2024-12-18
113 AT-8943-49b0c91c.001 2024-12-12
114 AT-8982-0208e8be.001 2024-12-20
115 AT-8943-fffb3d90.003 2024-12-10
116 AT-8943-fffb3d90.004 2024-12-10
117 AT-8943-c964421e.001 2024-12-12
118 AT-8982-580833dd.001 2024-12-20
119 AT-8943-77d4537b.001 2024-12-18
120 AT-8943-820efe44.001 2024-12-12
121 AT-8943-3c8f8152.003 2024-12-10
122 AT-8982-614920ab.001 2024-12-20
123 AT-8943-9c8937e8.001 2024-12-02
124 AT-8982-af3a8d63.001 2024-12-19
125 AT-8943-3c8f8152.002 2024-12-18
126 AT-8982-d798cd99.001 2024-12-19
127 AT-8943-3c8f8152.001 2024-12-11
128 AT-8982-c6d7e4f2.001 2024-12-19
129 AT-8982-9641fb2e.001 2024-12-19
130 AT-8943-6e670739.001 2024-12-12
131 AT-8943-ed3620c0.001 2024-10-15
132 AT-8943-399bd714.001 2024-09-04
133 AT-8943-69ae30fb.001 2024-09-05
134 AT-8943-a1116acf.001 2024-12-12
135 AT-8952-5eea3a46.001 2024-12-10
136 AT-8952-3083a5c1.001 2025-01-28
137 AT-8943-46ec6651.001 2025-01-28
138 AT-8982-aded99c2.001 2025-01-21
139 AT-8982-abd61a0b.001 2025-01-21
140 AT-8952-64e40186.003 2025-01-13
141 AT-8983-2bf3214f.001 2025-01-14
142 AT-8952-c291163a.003 2025-01-29
143 AT-8952-47e52775.003 2025-01-29
144 AT-8943-d61452be.002 2025-01-21
145 AT-8943-c10d87c7.002 2025-01-28
146 AT-8943-fffb3d90.002 2024-12-11
147 AT-8982-451c1eb1.001 2024-12-19
148 AT-8982-3126a5dc.001 2024-12-19
149 AT-8982-06484e3f.001 2024-12-19
150 AT-8943-fffb3d90.001 2024-12-11
151 AT-8982-63977aa7.001 2024-12-20
152 AT-8982-7edf2184.001 2024-12-19
153 AT-8982-edc6a443.001 2024-12-20
154 AT-8952-64e40186.002 2025-01-13
155 AT-8982-bce86ac9.001 2024-12-19
156 AT-8982-d448ba70.001 2024-12-20
157 AT-8943-fce5a31f.002 2024-12-10
158 AT-8952-64e40186.001 2025-01-13
159 AT-8982-be11d84d.001 2024-12-20
160 AT-8952-ec0bd13d.001 2025-02-18
161 AT-8952-2c5c1a88.001 2025-02-18
162 AT-8943-9db3a055.002 2025-02-25
163 AT-8982-8ecff7fc.001 2025-02-05
164 AT-8952-ad79e49e.003 2025-02-27
165 AT-8943-9db3a055.001 2025-02-25
166 AT-8952-ad79e49e.002 2025-02-26
167 AT-8943-122f171a.001 2025-02-25
168 AT-8943-a72c5637.002 2025-02-05
169 AT-8982-f02e6c7d.002 2025-02-05
170 AT-8952-8e408a37.002 2025-02-27
171 AT-8982-f02e6c7d.001 2025-02-05
172 AT-8952-91880329.001 2025-02-11
173 AT-8943-bba3a3bc.001 2025-02-25
174 AT-8952-51989893.003 2025-03-11
175 AT-8943-f92eb5f7.001 2025-03-11