60 lines
1.7 KiB
PHP
60 lines
1.7 KiB
PHP
#!/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);
|
|
|
|
$cc = new Citycom_OanApiClient(CITYCOM_OAN_API_USER, CITYCOM_OAN_API_PASS);
|
|
$cc_helper = new Citycom_OanApiHelper($cc);
|
|
|
|
$default_data = [
|
|
"execution_date" => false,
|
|
"services" => CITYCOM_OAN_API_SERVICES_FOR_ORDER,
|
|
];
|
|
|
|
$services = [
|
|
[ // Max Haidvogl, Schillerstraße 11, Tür 1
|
|
"preorder" => new Preorder(22688),
|
|
"down" => 600,
|
|
"up" => 300,
|
|
"product_name" => "Estmk Greenstream OAN 600/300",
|
|
],
|
|
/*[ // Gerd Haidvogl, Schillerstraße 11, Tür 6
|
|
"preorder" => new Preorder(22682),
|
|
"down" => 300,
|
|
"up" => 150,
|
|
"product_name" => "Greenstream OAN 300/150",
|
|
],*/
|
|
/*[ // Robert Rottmann, Lange Gasse 7, Tür 1
|
|
"preorder" => new Preorder(22679),
|
|
"down" => 300,
|
|
"up" => 150,
|
|
"product_name" => "Greenstream OAN 300/150",
|
|
]*/
|
|
];
|
|
|
|
foreach($services as $service) {
|
|
$preorder = $service["preorder"];
|
|
|
|
$data = $default_data;
|
|
$data["down"] = $service["down"];
|
|
$data["up"] = $service["up"];
|
|
$data["product_name"] = $service["product_name"];
|
|
$sublocation_id = \Citycom_OanApiHelper::hausnummerExtrefToCitycomId($preorder->adb_wohneinheit->extref);
|
|
|
|
var_dump($cc_helper->orderServices($preorder, $sublocation_id, $data));
|
|
}
|
|
|