Merge branch 'fronkdev2' into 'master'
Preorder AHA Report Download See merge request fronk/thetool!703
This commit is contained in:
27
scripts/contract/list-upgrades.php
Normal file
27
scripts/contract/list-upgrades.php
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/php
|
||||
<?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);
|
||||
|
||||
foreach(ContractLinkModel::search(["type" => "upgrade"]) as $link) {
|
||||
$origin_contract = $link->origin;
|
||||
$successor_contract = $link->contract;
|
||||
|
||||
if($successor_contract->create < 1728216155) continue;
|
||||
if(!$origin_contract->cancel_date) continue;
|
||||
|
||||
echo "Kunde: ".$successor_contract->owner->getCompanyOrName()."\n";
|
||||
echo "From Contract ".$origin_contract->id."\t(Canceldate: ".((new DateTime("@".$origin_contract->cancel_date))->setTimezone(new DateTimeZone("Europe/Vienna"))->format("Y-m-d")).") ".$origin_contract->product_name." [".$origin_contract->matchcode."]\n";
|
||||
echo "To Contract ".$successor_contract->id."\t(Finishdate: ".((new DateTime("@".$successor_contract->finish_date))->setTimezone(new DateTimeZone("Europe/Vienna"))->format("Y-m-d")).") ".$successor_contract->product_name." [".$successor_contract->matchcode."]\n";
|
||||
echo "\n";
|
||||
}
|
||||
@@ -84,6 +84,14 @@ foreach($hausnummern as $hausnummmer_id) {
|
||||
}
|
||||
//exit;
|
||||
// Preorders speichern, um neue OAID zu generieren
|
||||
foreach($preorders as $preorder) {
|
||||
$preorder->save();
|
||||
foreach($hausnummern as $hausnummmer_id) {
|
||||
foreach(ADBWohneinheitModel::search(["hausnummer_id" => $hausnummmer_id]) as $unit) {
|
||||
$preorder = PreorderModel::getFirst(["adb_wohneinheit_id" => $unit->id]);
|
||||
if(!$preorders) {
|
||||
echo "Preoder not found unit ".$unit->id."\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$preorder->save();
|
||||
}
|
||||
}
|
||||
156517
scripts/fibu-check/files/NTCS_Bankeinzug DT.xml
Normal file
156517
scripts/fibu-check/files/NTCS_Bankeinzug DT.xml
Normal file
File diff suppressed because it is too large
Load Diff
4687
scripts/fibu-check/files/tt-rech-export-bmd-2024-07-09_19-42-04.csv
Normal file
4687
scripts/fibu-check/files/tt-rech-export-bmd-2024-07-09_19-42-04.csv
Normal file
File diff suppressed because it is too large
Load Diff
37
scripts/fix-multiple-oaids.php
Normal file
37
scripts/fix-multiple-oaids.php
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/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);
|
||||
|
||||
$db = new FronkDB();
|
||||
|
||||
$sql = "SELECT oaid, count(oaid) as anzahl FROM `Preorder`
|
||||
LEFT JOIN Preordercampaign on (Preordercampaign.id = Preorder.preordercampaign_id)
|
||||
LEFT JOIN Preorderstatus ON (Preorder.status_id = Preorderstatus.id)
|
||||
WHERE Preorderstatus.code < 899 AND deleted = 0
|
||||
GROUP BY oaid HAVING anzahl > 1";
|
||||
|
||||
$res = $db->query($sql);
|
||||
while($oaid_data = $db->fetch_object($res)) {
|
||||
$oaid = $oaid_data->oaid;
|
||||
|
||||
$unit_count = ADBWohneinheitModel::count(["oaid" => $oaid]);
|
||||
if($unit_count < 2) {
|
||||
continue;
|
||||
echo "nur eine einheit\n";
|
||||
}
|
||||
echo "$oaid\n";
|
||||
}
|
||||
10001
scripts/preorder/ofaa-oaid/ofaa-oaids-estmk_1-10000.csv
Normal file
10001
scripts/preorder/ofaa-oaid/ofaa-oaids-estmk_1-10000.csv
Normal file
File diff suppressed because it is too large
Load Diff
45
scripts/stomp-test.php
Normal file
45
scripts/stomp-test.php
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/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");
|
||||
|
||||
use Stomp\Client;
|
||||
use Stomp\Network\Connection;
|
||||
use Stomp\StatefulStomp;
|
||||
use Stomp\Transport\Message;
|
||||
|
||||
|
||||
$me = new User(1);
|
||||
|
||||
$api_token = "E665AA3B0D8363D2A965B39A0CE28A100B16FE7D4505EF59FA2A1014A6D69967";
|
||||
$api_user = "api_rml03_ob";
|
||||
$api_pass = "7ktbho1s";
|
||||
|
||||
$queue = "test";
|
||||
|
||||
try {
|
||||
//$stomp_connection = new Connection("ssl://outboundqueue.d-test.rimo-saas.com:443");
|
||||
$stomp_connection = new Connection("tcp://localhost:61613");
|
||||
$stomp_client = new Client($stomp_connection);
|
||||
|
||||
$stomp_client->setLogin("api_rml03_ob", "7ktbho1s");
|
||||
$stomp = new StatefulStomp($stomp_client);
|
||||
|
||||
|
||||
|
||||
} catch (Exception $ex) {
|
||||
die("Exception: ".$ex->getCode()." Message: :".$ex->getMessage()."\n");
|
||||
}
|
||||
|
||||
$stomp->subscribe($queue);
|
||||
$frame = $stomp->readFrame();
|
||||
|
||||
print_r($frame);
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
exit;
|
||||
|
||||
//require 'vendor/autoload.php';
|
||||
require("../config/config.php");
|
||||
|
||||
@@ -14,9 +14,10 @@ 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);
|
||||
|
||||
foreach(ADBNetzgebietModel::getAll() as $netzgebiet) {
|
||||
$unit = ADBWohneinheitModel::getFirst(["netzgebiet_id" => $netzgebiet->id]);
|
||||
if($unit) $unit->save();
|
||||
}
|
||||
|
||||
$contract = new Contract(3088);
|
||||
$new_contract = ContractModel::createCreditForContract($contract);
|
||||
$new_contract->save();
|
||||
var_dump($new_contract);
|
||||
Reference in New Issue
Block a user