From 92edb9c812c14349176b413ef48ae28e2031ff7e Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Fri, 5 Jul 2024 10:45:22 +0200 Subject: [PATCH 1/2] WIP Contract/Billing 2024-07-04 --- application/Address/Address.php | 2 +- application/AddressLink/AddressLinkModel.php | 9 +- .../Admin/functions/IvtContractImport.php | 270 +- .../Admin/functions/IvtCreditImport.php | 24 +- application/Billing/Billing.php | 1 + application/Billing/BillingController.php | 25 +- application/Billing/BillingModel.php | 3 + .../BillingVoicenumber/BillingVoicenumber.php | 5 + .../BillingVoicenumberController.php | 19 + .../BillingVoicenumberModel.php | 413 + application/Contract/Contract.php | 24 + application/Country/CountryModel.php | 4 +- application/Invoice/InvoiceController.php | 25 +- application/Invoice/InvoiceModel.php | 7 + .../Invoiceposition/InvoicepositionModel.php | 3 + .../IvtCustomerProduct/IvtCustomerProduct.php | 2 +- .../VoiceCallHistoryController.php | 65 + .../VoiceCallHistoryModel.php | 20 + application/Voicenumber/VoicenumberModel.php | 2 +- .../20240625164727_contract_add_vat.php | 4 +- .../20240702192635_billing_add_fibu_data.php | 67 + ...40704170016_create_billing_voicenumber.php | 47 + lib/Helper/Helper.php | 6 +- public/css/sknx_print.css | 11 +- scripts/test.php | 307 +- scripts/voice/add-contract-ids.php | 21 + scripts/voice/unknown-numbers | 6773 +++++++++++++++++ 27 files changed, 8043 insertions(+), 116 deletions(-) create mode 100644 application/BillingVoicenumber/BillingVoicenumber.php create mode 100644 application/BillingVoicenumber/BillingVoicenumberController.php create mode 100644 application/BillingVoicenumber/BillingVoicenumberModel.php create mode 100644 db/migrations/20240702192635_billing_add_fibu_data.php create mode 100644 db/migrations/20240704170016_create_billing_voicenumber.php create mode 100644 scripts/voice/add-contract-ids.php create mode 100644 scripts/voice/unknown-numbers diff --git a/application/Address/Address.php b/application/Address/Address.php index 2d612b4d5..5b10f9469 100644 --- a/application/Address/Address.php +++ b/application/Address/Address.php @@ -592,7 +592,7 @@ class Address extends mfBaseModel { }*/ if($name == "links") { - $links = AddressLinkModel::search(['origin_address_id' => $this->id]); + $links = AddressLinkModel::search(['address_or_origin_id' => $this->id]); //var_dump($links);exit; foreach($links as $link) { if(!array_key_exists($link->type, $this->links)) { diff --git a/application/AddressLink/AddressLinkModel.php b/application/AddressLink/AddressLinkModel.php index dc27046f5..f463bfc6b 100644 --- a/application/AddressLink/AddressLinkModel.php +++ b/application/AddressLink/AddressLinkModel.php @@ -91,7 +91,7 @@ class AddressLinkModel { if(is_array($limit) && count($limit)) { if(is_numeric($limit['start']) && is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['start'].", ".$limit['count']; - } elseif(is_numeric($count)) { + } elseif(is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['count']; } } @@ -125,6 +125,13 @@ class AddressLinkModel { $where .= " AND origin_address_id=$origin_address_id"; } } + + if(array_key_exists("address_or_origin_id", $filter)) { + $address_or_origin_id = $filter["address_or_origin_id"]; + if(is_numeric($address_or_origin_id)) { + $where .= " AND (address_id=$address_or_origin_id OR origin_address_id=$address_or_origin_id)"; + } + } if(array_key_exists("type", $filter)) { switch($filter['type']) { diff --git a/application/Admin/functions/IvtContractImport.php b/application/Admin/functions/IvtContractImport.php index d69d7c013..7230ab5d0 100644 --- a/application/Admin/functions/IvtContractImport.php +++ b/application/Admin/functions/IvtContractImport.php @@ -5,6 +5,7 @@ class Admin_IvtContractImport { private $log; private $static_ivt_order_match = []; private $no_matchcode = []; + private $ownerIdToBillingAddress = []; public function __construct($request = false) { $this->request = $request; @@ -140,6 +141,7 @@ class Admin_IvtContractImport { if(!$customer_check_return || !array_key_exists("billingaddress_id", $customer_check_return) || !$customer_check_return["billingaddress_id"]) { echo "IVT Customer " . $ivt_contract->cid . " nicht im tool
\n"; + var_dump($customer_check_return); exit; } @@ -413,77 +415,217 @@ class Admin_IvtContractImport { die("Address $ivt_custnum not found!"); } + if(array_key_exists($owner->id, $this->ownerIdToBillingAddress)) { + return ["billingaddress_id" => $this->ownerIdToBillingAddress[$owner->id]]; + } + + $compare_address = $owner; + $compare_type = "owner"; + $return["billingaddress_id"] = $owner->id; + $order = $this->findOrder($ivt_contract); if(!$order) { - return ["billingaddress_id" => $owner->id]; + $return["billingaddress_id"] = $owner->id; + $compare_address = $owner; + $compare_type = "owner"; } // look for billingaddress_id in order and use it - if ($order->billingaddress_id) { - if ($order->billingaddress_id == $ivt_custnum) { - $return["billingaddress_id"] = $order->billingaddress_id; - } else { - $billingaddress = new Address($order->billingaddress_id); - if (!$billingaddress->id) { - die("Billingaddress " . $order->billingaddress_id . " does not exist (order " . $order->id . "; ivt customer $ivt_custnum)"); - } - $return["billingaddress_id"] = $billingaddress->id; + if ($order && $order->billingaddress_id) { + $return["billingaddress_id"] = $order->billingaddress_id; + + $billingaddress = new Address($order->billingaddress_id); + if (!$billingaddress->id) { + die("Billingaddress " . $order->billingaddress_id . " does not exist (order " . $order->id . "; ivt customer $ivt_custnum)"); } + + $compare_address = $billingaddress; + $compare_type = "billingaddress"; } + + // if no billingaddress_id in order, compare address of Address and ivt_customer and // create new billingaddress if nessecary + if(!$compare_address) { + die("No Compare address"); + } + + $address_update = $this->compareBillingAddresses($ivt_customer, $compare_address); + if($address_update === true) { + $return["billingaddress_id"] = $compare_address->id; + } elseif(is_array($address_update) && count($address_update)) { + if($compare_type == "billingaddress") { + // update billingaddress + $compare_address->update($address_update); + if(!$compare_address->save()) { + die("error updateing Billingaddress"); + } + $this->ownerIdToBillingAddress[$owner->id] = $compare_address->id; + $return["billingaddress_id"] = $compare_address->id; + } else { + // create billingaddress + $billingaddress = AddressModel::create($address_update); + try { + if(!$billingaddress->save()) { + var_dump($address_update); + die("error creating Billingaddress"); + } + $return["billingaddress_id"] = $billingaddress->id; + if(!array_key_exists($owner->id, $this->ownerIdToBillingAddress)) { + $this->ownerIdToBillingAddress[$owner->id] = $billingaddress->id; + $this->log->debug(__METHOD__.": Creating billing link for owner ".$owner->id." ".$owner->getCompanyOrName()." with billing address ".$billingaddress->id." ".$billingaddress->getCompanyOrName()); + $this->log->debug("OWNER:"); + $this->log->debug(print_r($owner->data, true)); + $this->log->debug("ADDRESS UPDATE:"); + $this->log->debug(print_r($address_update, true)); + // create addresslink + + $link = AddressLinkModel::create([ + 'origin_address_id' => $owner->id, + 'type' => "billing", + 'address_id' => $billingaddress->id + ]); + $link->save(); + } + + } catch (Exception $e) { + echo "Exception: ".$e->getMessage()."\n"; + var_dump($address_update); + exit(); + } + + } + + } + + return $return; + + } + + private function compareBillingAddresses($ivt_customer, $tool_customer) { + $owner = $tool_customer; + $new_billing = []; - if ($ivt_customer->company) { - if ($ivt_customer->company != $owner->company) $new_billing["company"] = $ivt_customer->company; + if (strtolower(trim($ivt_customer->company)) != strtolower(trim($owner->company))) $new_billing["company"] = $ivt_customer->company; } else { - if ($ivt_customer->firstname != $owner->firstname) $new_billing["firstname"] = $ivt_customer->firstname; - if ($ivt_customer->surname != $owner->lastname) $new_billing["lastname"] = $ivt_customer->surname; + if (strtolower(trim($ivt_customer->firstname)) != strtolower(trim($owner->firstname))) $new_billing["firstname"] = $ivt_customer->firstname; + if (strtolower(trim($ivt_customer->surname)) != strtolower(trim($owner->lastname))) $new_billing["lastname"] = $ivt_customer->surname; } //if ($ivt_customer->UID != $owner->uid) $new_billing["uid"] = $ivt_customer->UID; - if ($ivt_customer->zip != $owner->zip) $new_billing["zip"] = $ivt_customer->zip; - if ($ivt_customer->location != $owner->city) $new_billing["city"] = $ivt_customer->location; - if ($ivt_customer->street . " " . $ivt_customer->housenumber != $owner->street) $new_billing["street"] = $ivt_customer->street . " " . $ivt_customer->housenumber; - if ($ivt_customer->phone != $owner->phone) $new_billing["phone"] = $ivt_customer->phone; - if ($ivt_customer->email != $owner->email) $new_billing["email"] = $ivt_customer->email; + if (strtolower(trim($ivt_customer->zip)) != strtolower(trim($owner->zip))) $new_billing["zip"] = $ivt_customer->zip; + if (strtolower(trim($ivt_customer->location)) != strtolower(trim($owner->city))) $new_billing["city"] = $ivt_customer->location; + if (strtolower(trim($ivt_customer->street . " " . $ivt_customer->housenumber)) != strtolower(trim($owner->street))) $new_billing["street"] = $ivt_customer->street . " " . $ivt_customer->housenumber; + //if (strtolower(trim($ivt_customer->phone)) != strtolower(trim($owner->phone))) $new_billing["phone"] = $ivt_customer->phone; + if (strtolower(trim($ivt_customer->email)) != strtolower(trim($owner->email))) { + if($ivt_customer->email && (!$owner->email || $owner->email = "dummy@xinon.at")) { + $owner->email = strtolower(trim($ivt_customer->email)); + $owner->save(); + } else { + $new_billing["email"] = $ivt_customer->email; + } + } - if ($ivt_customer->payment == 1 && $owner->billing_type != "invoice") { - $new_billing["billing_type"] = "invoice"; - } elseif ($ivt_customer->payment == 0 && $owner->billing_type != "sepa") { - $new_billing["billing_type"] = "sepa"; - } elseif ($ivt_customer->paper_invoice == 1 && $owner->billing_delivery != "paper") { - $new_billing["billing_delivery"] = "paper"; - } elseif ($ivt_customer->paper_invoice == 0 && $owner->billing_delivery != "email") { - $new_billing["billing_delivery"] = "email"; + $billing_type = ""; + $billing_delivery = ""; + if($ivt_customer->payment == 1 && $owner->billing_type != "invoice") { + $billing_type = "invoice"; + if($owner->billing_type) { + $new_billing["billing_type"] = "invoice"; + } else { + $owner->billing_type = "invoice"; + $owner->save(); + } + } elseif($ivt_customer->payment == 0 && $owner->billing_type != "sepa") { + $billing_type = "sepa"; + if($owner->billing_type) { + $new_billing["billing_type"] = "sepa"; + } else { + $owner->billing_type = "sepa"; + $owner->save(); + } + } elseif($ivt_customer->paper_invoice == 1 && $owner->billing_delivery != "paper") { + $billing_delivery = "paper"; + if($owner->billing_delivery) { + $new_billing["billing_delivery"] = "paper"; + } else { + $owner->billing_delivery = "paper"; + $owner->save(); + } + } elseif($ivt_customer->paper_invoice == 0 && $owner->billing_delivery != "email") { + $billing_delivery = "email"; + if($owner->billing_delivery) { + $new_billing["billing_delivery"] = "email"; + } else { + $owner->billing_delivery = "email"; + $owner->save(); + } } //if($ivt_customer->bank_account_bank != $owner->bank_account_bank) $new_billing["bank_account_bank"] = $ivt_customer->bank_account_bank; //if($ivt_customer->bank_account_owner != $owner->bank_account_owner) $new_billing["bank_account_owner"] = $ivt_customer->bank_account_owner; - $iban = strtoupper(trim($ivt_customer->IBAN)); - $bic = strtoupper(trim($ivt_customer->BIC)); + $iban = strtoupper(trim(str_replace(" ","", $ivt_customer->IBAN))); + $bic = strtoupper(trim(str_replace(" ","", $ivt_customer->BIC))); if ((array_key_exists("billing_type", $new_billing) && $new_billing["billing_type"] == "sepa") || $ivt_customer->payment == 0 && ($iban || $bic)) { - if ($iban != strtoupper(trim($owner->bank_account_iban))) $new_billing["bank_account_iban"] = $iban; - if ($bic != strtoupper(trim($owner->bank_account_bic))) $new_billing["bank_account_bic"] = $bic; + if ($iban != strtoupper(trim(str_replace(" ","", $owner->bank_account_iban)))) $new_billing["bank_account_iban"] = $iban; + if ($bic != strtoupper(trim(str_replace(" ","", $owner->bank_account_bic)))) $new_billing["bank_account_bic"] = $bic; } - $missing_fields = []; + if(array_key_exists("bank_account_bic", $new_billing) && !array_key_exists("bank_account_iban", $new_billing)) { + $owner->bank_account_bic = $new_billing["bank_account_bic"]; + $owner->save(); + unset($new_billing["bank_account_bic"]); + } + + if(count($new_billing) == 2 && array_key_exists("billing_type", $new_billing) && array_key_exists("billing_delivery", $new_billing)) { + $owner->billing_type = $billing_type; + $owner->billing_delivery = $billing_delivery; + $owner->save(); + return true; + } + if(count($new_billing) == 1) { + if(array_key_exists("billing_type", $new_billing)) { + $owner->billing_type = $billing_type; + $owner->save(); + return true; + } + if(array_key_exists("billing_delivery", $new_billing)) { + $owner->billing_delivery = $billing_delivery; + $owner->save(); + return true; + } + + } + + + + //$missing_fields = []; $create = false; - foreach(["company", "firstname", "lastname", "street", "zip", "city", "phone", "email", "uid", "billing_type", "billing_delivery", + foreach(["company", "firstname", "lastname", "street", "zip", "city", "email", "uid", "billing_type", "billing_delivery", "bank_account_iban", "bank_account_bic"] as $field) { if(!array_key_exists($field, $new_billing)) { + /*if(!$owner->$field) { + if($field == "billing_delivery") { + $new_billing[$field] = "paper"; + } else { + $new_billing[$field] = ""; + } + + } else { + $new_billing[$field] = $owner->$field; + }*/ $new_billing[$field] = $owner->$field; } else { - if($field == "email" && $field = "dummy@xinon.at") continue; - $missing_fields[] = $field; + if($field == "email" && $new_billing["email"] == "dummy@xinon.at") continue; $create = true; } } - + /* if($create) { $billingaddress = AddressModel::create($new_billing); //var_dump($billingaddress, $missing_fields);exit; @@ -491,9 +633,14 @@ class Admin_IvtContractImport { die("Error createing billingaddress\n"); } $return["billingaddress_id"] = $billingaddress->id; + }*/ + + if($create) { + return $new_billing; } - return ["billingaddress_id" => $owner->id]; + return true; + } private function checkIvtProduct($product) { @@ -631,7 +778,7 @@ class Admin_IvtContractImport { } - private function findOrder($ivt_contract) { + public function findOrder($ivt_contract) { // find order $ivt_customer = $ivt_contract->customer; $ivt_product = $ivt_contract->product; @@ -724,6 +871,8 @@ class Admin_IvtContractImport { $number = preg_replace('/^0043/', '43', $ivtnum->number); if(!$number) continue; + + // find number in block $voicenumberblock = Voicenumberblock::findBlock($number); if(!$voicenumberblock) { @@ -746,16 +895,23 @@ class Admin_IvtContractImport { $voice_contract = false; - foreach($contracts as $contract) { - if(array_key_exists("needs_number", $contract->product->attributes) && $contract->product->attributes["needs_number"] == 1) { - $voice_contract = $contract; + if($ivt_customer_id == 1376) { + //if(in_array($number, [43313228451, 43313228406, 43720666572, 43313228400, 4331324890, 43720103806])) { + $prometheus_primary_contract = ContractModel::getFirst(["customer_number" => 1376]); + $voice_contract = $this->createVoiceContract($prometheus_primary_contract, true); + } else { + foreach($contracts as $contract) { + if(array_key_exists("needs_number", $contract->product->attributes) && $contract->product->attributes["needs_number"] == 1) { + $voice_contract = $contract; + } } + if(!$voice_contract) { + $voice_contract = $this->createVoiceContract($contracts); + } } - if(!$voice_contract) { - $voice_contract = $this->createVoiceContract($contracts); - } + //var_dump($voice_contract);exit; @@ -824,7 +980,7 @@ class Admin_IvtContractImport { return true; } - private function createVoiceContract($contracts) { + private function createVoiceContract($contracts, $nolink = false) { // find rufnummer only product (residential or business) $product = new Product(101); // Telefonie (nur Rufnummer - Privat) $sla_id = 4; @@ -863,21 +1019,23 @@ class Admin_IvtContractImport { $voice_contract = ContractModel::create($data); if(!$voice_contract->save()) { - $this->log->error("Unable to create voice contract for cust ".$fc->customer_number); + $this->log->error("Unable to create voice contract for cust " . $fc->customer_number); exit; } // link to all $contracts - foreach($contracts as $contract) { - if (ContractLinkModel::getFirst(["contract_id" => $voice_contract->id, "origin_contract_id" => $contract->id])) { - continue; + if(!$nolink) { + foreach($contracts as $contract) { + if(ContractLinkModel::getFirst(["contract_id" => $voice_contract->id, "origin_contract_id" => $contract->id])) { + continue; + } + $link = ContractLinkModel::create([ + 'contract_id' => $voice_contract->id, + 'origin_contract_id' => $contract->id, + 'type' => 'link' + ]); + $link->save(); } - $link = ContractLinkModel::create([ - 'contract_id' => $voice_contract->id, - 'origin_contract_id' => $contract->id, - 'type' => 'link' - ]); - $link->save(); } return $voice_contract; @@ -902,7 +1060,7 @@ class Admin_IvtContractImport { } $address_data['zip'] = $cust->zip; $address_data['city'] = $cust->location; - $address_data['country'] = ""; + $address_data['country_id'] = 163; // 163 - Austria $address_data['phone'] = $cust->phone; $address_data['fax'] = ""; $address_data['mobile'] = ""; diff --git a/application/Admin/functions/IvtCreditImport.php b/application/Admin/functions/IvtCreditImport.php index 45948c217..d90d05fad 100644 --- a/application/Admin/functions/IvtCreditImport.php +++ b/application/Admin/functions/IvtCreditImport.php @@ -158,6 +158,20 @@ class Admin_IvtCreditImport { $data["finish_date"] = $primary_contract->finish_date; $data["finish_date_by"] = $primary_contract->finish_date_by; $data["note"] = $primary_contract->note; + + $matchcode = ""; + if($primary_contract->termination_id) { + $building = $primary_contract->termination->building; + if($building->networksection_id) { + $matchcode .= $building->networksection->name; + } + $matchcode .= $customer->getCompanyOrName(); + $matchcode .= "; ".$building->street.", ".$building->zip." ".$building->city; + } else { + $matchcode .= "; ".$customer->street.", ".$customer->zip." ".$customer->city; + } + + } else { $create_date = new DateTime($cust_cred->created); $create_date->setTime(2,0); @@ -183,9 +197,17 @@ class Admin_IvtCreditImport { $data["finish_date"] = $finish_date->getTimestamp(); $data["finish_date_by"] = 1; $data["note"] = null; + + $matchcode = $cust_cred->comment; } - $data["matchcode"] = $cust_cred->comment; + + + + + + + $data["matchcode"] = $matchcode; $data["owner_id"] = $netowner->id; $data["billingaddress_id"] = $netowner->id; $data["termination_id"] = null; diff --git a/application/Billing/Billing.php b/application/Billing/Billing.php index 69ccd8318..2cb6fe2b0 100644 --- a/application/Billing/Billing.php +++ b/application/Billing/Billing.php @@ -3,6 +3,7 @@ class Billing extends mfBaseModel { protected $forcestr = ["product_name","product_info","matchcode"]; private $contract; + private $vatgroup; diff --git a/application/Billing/BillingController.php b/application/Billing/BillingController.php index 1f81e7f37..6321227c5 100644 --- a/application/Billing/BillingController.php +++ b/application/Billing/BillingController.php @@ -109,7 +109,7 @@ class BillingController extends mfBaseController { $now_day = date("d"); //$now_year = 2024; //$now_month = 6; - $now_day = 3; // XXX for debugging only, must be removed + //$now_day = 3; // XXX for debugging only, must be removed // XXX only for 1st Billing after IVT Import //$yearly_not_before = new DateTime("$now_year-$now_month-01"); @@ -354,13 +354,13 @@ class BillingController extends mfBaseController { $data["owner_id"] = $contract->owner_id; $data["billingaddress_id"] = ($contract->billingaddress_id) ? $contract->billingaddress_id : $contract->owner_id; $data["customer_number"] = $contract->owner->customer_number; + $data["fibu_account_number"] = $contract->owner->fibu_account_number; $data["company"] = $billingaddress->company; $data["firstname"] = $billingaddress->firstname; $data["lastname"] = $billingaddress->lastname; $data["street"] = $billingaddress->street; $data["zip"] = $billingaddress->zip; $data["city"] = $billingaddress->city; - $data["country"] = $billingaddress->country->name; $data["email"] = $billingaddress->email; $data["uid"] = $billingaddress->uid; $data["billing_type"] = $billing_type; @@ -376,9 +376,28 @@ class BillingController extends mfBaseController { $data["amount"] = $contract->amount; $data["price"] = $price; $data["price_setup"] = $price_setup; - $data["vatrate"] = $contract->vatrate; $data["billing_period"] = $contract->billing_period; + if(!$contract->billingaddress->country_id) { + $billcountry = CountryModel::getFirst(["isocode" => TT_HOMECOUNTRY_ISOCODE]); + } else { + $billcountry = $contract->billingaddress->country; + } + + $vatgroup = $contract->vatgroup; + $vatarea = "domestic"; + if($billcountry->isocode != TT_HOMECOUNTRY_ISOCODE && $billcountry->is_eu) { + $vatarea = "eu"; + } if($billcountry->isocode != TT_HOMECOUNTRY_ISOCODE && !$billcountry->is_eu) { + $vatarea = "other"; + } + + $data["country"] = $billcountry->name; + $data["vatrate"] = $vatgroup->rates[$vatarea]->rate; + $data["vatgroup_id"] = $contract->vatgroup_id; + $data["vatarea"] = $vatarea; + + $billing = BillingModel::create($data); if (!$billing->save()) { var_dump($billing); diff --git a/application/Billing/BillingModel.php b/application/Billing/BillingModel.php index 23a72bb44..07ab84103 100644 --- a/application/Billing/BillingModel.php +++ b/application/Billing/BillingModel.php @@ -8,6 +8,7 @@ class BillingModel { public $owner_id; public $billingaddress_id; public $customer_number; + public $fibu_account_number; public $company; public $firstname; public $lastname; @@ -30,7 +31,9 @@ class BillingModel { public $amount; public $price; public $price_setup; + public $vatarea; public $vatrate; + public $vatgroup_id; public $billing_period; public $create_by; diff --git a/application/BillingVoicenumber/BillingVoicenumber.php b/application/BillingVoicenumber/BillingVoicenumber.php new file mode 100644 index 000000000..755e33541 --- /dev/null +++ b/application/BillingVoicenumber/BillingVoicenumber.php @@ -0,0 +1,5 @@ +needlogin = true; + $me = new User(); + $me->loadMe(); + $this->me = $me; + $this->layout()->set("me", $me); + + if (!$me->is(["Admin"])) { + $this->redirect("Dashboard"); + } + } + + +} \ No newline at end of file diff --git a/application/BillingVoicenumber/BillingVoicenumberModel.php b/application/BillingVoicenumber/BillingVoicenumberModel.php new file mode 100644 index 000000000..ccbc226f2 --- /dev/null +++ b/application/BillingVoicenumber/BillingVoicenumberModel.php @@ -0,0 +1,413 @@ + $value) { + if(property_exists(get_called_class(), $field)) { + $model ->$field = $value; + } + } + + $me = new User(); + $me->loadMe(); + + if($model->create_by === null) { + $model->create_by = $me->id; + } + if($model->edit_by === null) { + $model->edit_by = $me->id; + } + + return $model; + } + + public static function getAll() { + $items = []; + + $db = FronkDB::singleton(); + + $res = $db->select("BillingVoicenumber", "*", "1 = 1 ORDER BY BillingVoicenumberaddress_id"); + if($db->num_rows($res)) { + while($data = $db->fetch_object($res)) { + $items[] = new BillingVoicenumber($data); + } + } + return $items; + + } + + public static function getFirst($filter) { + $db = FronkDB::singleton(); + + $where = self::getSqlFilter($filter); + $sql = "SELECT * FROM BillingVoicenumber + WHERE $where + ORDER BY BillingVoicenumberaddress_id LIMIT 1"; + //var_dump($sql);exit; + $res = $db->query($sql); + if($db->num_rows($res)) { + $data = $db->fetch_object($res); + $item = new BillingVoicenumber($data); + if($item->id) { + return $item; + } else { + return null; + } + } + return null; + } + + public static function getLast($filter) { + $db = FronkDB::singleton(); + + $where = self::getSqlFilter($filter); + $sql = "SELECT * FROM BillingVoicenumber + WHERE $where + ORDER BY `create` DESC LIMIT 1"; + //var_dump($sql);exit; + $res = $db->query($sql); + if($db->num_rows($res)) { + $data = $db->fetch_object($res); + $item = new BillingVoicenumber($data); + if($item->id) { + return $item; + } else { + return null; + } + } + return null; + } + + public static function getInvoiceBaseData($filter) { + $db = FronkDB::singleton(); + + $items = []; + + $where = self::getSqlFilter($filter); + $sql = "SELECT owner_id, BillingVoicenumberaddress_id, BillingVoicenumber_type, BillingVoicenumber_delivery FROM BillingVoicenumber + WHERE $where + GROUP BY owner_id, BillingVoicenumberaddress_id, BillingVoicenumber_type, BillingVoicenumber_delivery + ORDER BY owner_id, BillingVoicenumberaddress_id, BillingVoicenumber_type, BillingVoicenumber_delivery"; + //var_dump($sql);exit; + $res = $db->query($sql); + if($db->num_rows($res)) { + while($data = $db->fetch_object($res)) { + $items[] = [ + "owner_id" => $data->owner_id, + "BillingVoicenumberaddress_id" => $data->BillingVoicenumberaddress_id, + "BillingVoicenumber_type" => $data->BillingVoicenumber_type, + "BillingVoicenumber_delivery" => $data->BillingVoicenumber_delivery + ]; + } + } + return $items; + } + + public static function count($filter) { + $db = FronkDB::singleton(); + + $where = self::getSqlFilter($filter); + $sql = "SELECT COUNT(*) as cnt FROM BillingVoicenumber + WHERE $where"; + + //mfLoghandler::singleton()->debug($sql); + + $res = $db->query($sql); + if($db->num_rows($res)) { + $data = $db->fetch_object($res); + return $data->cnt; + } + return 0; + } + + public static function search($filter, $limit = false, $order = false) { + //var_dump($filter);exit; + $items = []; + + if(!$order) { + $order = "id ASC"; + } + + $db = FronkDB::singleton(); + + $where = self::getSqlFilter($filter); + $sql = "SELECT * FROM BillingVoicenumber + WHERE $where + ORDER BY $order"; + + if(is_array($limit) && count($limit)) { + if(is_numeric($limit['start']) && is_numeric($limit['count'])) { + $sql .= " LIMIT ".$limit['start'].", ".$limit['count']; + } elseif(is_numeric($limit['count'])) { + $sql .= " LIMIT ".$limit['count']; + } + } + + mfLoghandler::singleton()->debug($sql); + + $res = $db->query($sql); + if($db->num_rows($res)) { + while($data = $db->fetch_object($res)) { + $items[$data->id] = new BillingVoicenumber($data); + } + } + + return $items; + } + + private static function getSqlFilter($filter) { + $where = "1=1 "; + + $db = FronkDB::singleton(); + + //var_dump($filter);exit; + + if(array_key_exists("id", $filter)) { + $id = $filter['id']; + if(is_numeric($id)) { + $where .= " AND BillingVoicenumber.id like '%$id%'"; + } + } + + if(array_key_exists("approved", $filter)) { + $approved = $filter['approved']; + if($approved) { + $where .= " AND BillingVoicenumber.approved = 1"; + } else { + $where .= " AND BillingVoicenumber.approved = 0"; + } + } + + if(array_key_exists("invoice_id", $filter)) { + $invoice_id = $filter['invoice_id']; + if(is_numeric($invoice_id)) { + $where .= " AND BillingVoicenumber.invoice_id=$invoice_id"; + } elseif($invoice_id === null || $invoice_id === false) { + $where .= " AND (BillingVoicenumber.invoice_id IS NULL OR BillingVoicenumber.invoice_id=0)"; + } + } + + if(array_key_exists("contract_id", $filter)) { + $contract_id = $filter['contract_id']; + if(is_numeric($contract_id)) { + $where .= " AND BillingVoicenumber.contract_id=$contract_id"; + } + } + + if(array_key_exists("start_date", $filter)) { + $start_date = FronkDB::singleton()->escape($filter['start_date']); + if($start_date) { + $where .= " AND BillingVoicenumber.start_date='$start_date'"; + } + } + + if(array_key_exists("start_date>", $filter)) { + $start_date = FronkDB::singleton()->escape($filter['start_date>']); + if($start_date) { + $where .= " AND BillingVoicenumber.start_date > '$start_date'"; + } + } + + if(array_key_exists("start_date<", $filter)) { + $start_date = FronkDB::singleton()->escape($filter['start_date<']); + if($start_date) { + $where .= " AND BillingVoicenumber.start_date < '$start_date'"; + } + } + + if(array_key_exists("start_date>=", $filter)) { + $start_date = FronkDB::singleton()->escape($filter['start_date>=']); + if($start_date) { + $where .= " AND BillingVoicenumber.start_date >= '$start_date'"; + } + } + + if(array_key_exists("start_date<=", $filter)) { + $start_date = FronkDB::singleton()->escape($filter['start_date<=']); + if($start_date) { + $where .= " AND BillingVoicenumber.start_date <= '$start_date'"; + } + } + + if(array_key_exists("owner_id", $filter)) { + $owner_id = $filter['owner_id']; + if(is_numeric($owner_id)) { + $where .= " AND BillingVoicenumber.owner_id=$owner_id"; + } + } + + if(array_key_exists("BillingVoicenumberaddress_id", $filter)) { + $BillingVoicenumberaddress_id = $filter['BillingVoicenumberaddress_id']; + if(is_numeric($BillingVoicenumberaddress_id)) { + $where .= " AND BillingVoicenumber.BillingVoicenumberaddress_id=$BillingVoicenumberaddress_id"; + } + } + + if(array_key_exists("customer_number", $filter)) { + $customer_number = $filter['customer_number']; + if(is_numeric($customer_number)) { + $where .= " AND BillingVoicenumber.customer_number LIKE $customer_number"; + } + } + + if (array_key_exists("company", $filter)) { + $company = FronkDB::singleton()->escape($filter["company"]); + if ($company) { + $where .= " AND company like '%$company%'"; + } + } + + if (array_key_exists("firstname", $filter)) { + $firstname = FronkDB::singleton()->escape($filter["firstname"]); + if ($firstname) { + $where .= " AND firstname like '%$firstname%'"; + } + } + + if (array_key_exists("lastname", $filter)) { + $lastname = FronkDB::singleton()->escape($filter["lastname"]); + if ($lastname) { + $where .= " AND lastname like '%$lastname%'"; + } + } + + if (array_key_exists("mergedName", $filter)) { + $name = FronkDB::singleton()->escape($filter["mergedName"]); + if ($name) { + $where .= " AND (CONCAT(firstname, ' ', lastname) like '%$name%' OR CONCAT(lastname, ' ', firstname) like '%$name%' )"; + } + } + + if (array_key_exists("street", $filter)) { + $street = FronkDB::singleton()->escape($filter["street"]); + if ($street) { + $where .= " AND street like '%$street%'"; + } + } + + if (array_key_exists("zip", $filter)) { + $zip = FronkDB::singleton()->escape($filter["zip"]); + if ($zip) { + $where .= " AND zip like '%$zip%'"; + } + } + + if (array_key_exists("city", $filter)) { + $city = FronkDB::singleton()->escape($filter["city"]); + if ($city) { + $where .= " AND city like '%$city%'"; + } + } + + if (array_key_exists("country", $filter)) { + $country = FronkDB::singleton()->escape($filter["country"]); + if ($country) { + $where .= " AND country like '%$country%'"; + } + } + + if (array_key_exists("email", $filter)) { + $email = FronkDB::singleton()->escape($filter["email"]); + if ($email) { + $where .= " AND email like '%$email%'"; + } + } + + if(array_key_exists("matchcode", $filter)) { + $matchcode = FronkDB::singleton()->escape($filter["matchcode"]); + if($matchcode) { + $where .= " AND matchcode like '%$matchcode%'"; + } + } + + if(array_key_exists("product_id", $filter)) { + $product_id = $filter['product_id']; + if(is_numeric($product_id)) { + $where .= " AND BillingVoicenumber.product_id=$product_id"; + } + } + + if(array_key_exists("product_name", $filter)) { + $product_name = $db->escape($filter['product_name']); + if($product_name) { + $where .= " AND product_name like '%$product_name%')"; + } + } + + if(array_key_exists("matchcode", $filter)) { + $matchcode = $db->escape($filter['matchcode']); + if($matchcode) { + $where .= " AND BillingVoicenumber.`matchcode` like '%$matchcode%'"; + } + } + + if(array_key_exists("price<", $filter)) { + $price = $filter['price<']; + if(is_numeric($price)) { + $where .= " AND BillingVoicenumber.price < $price"; + } + } + if(array_key_exists("price<=", $filter)) { + $price = $filter['price<=']; + if(is_numeric($price)) { + $where .= " AND BillingVoicenumber.price <= $price"; + } + } + + if(array_key_exists("price>", $filter)) { + $price = $filter['price>']; + if(is_numeric($price)) { + $where .= " AND BillingVoicenumber.price > $price"; + } + } + if(array_key_exists("price>=", $filter)) { + $price = $filter['price>=']; + if(is_numeric($price)) { + $where .= " AND BillingVoicenumber.price >= $price"; + } + } + + if(array_key_exists("add-where", $filter)) { + $where .= " ".$filter['add-where']; + } + + + if(array_key_exists("BillingVoicenumber_type", $filter)) { + $BillingVoicenumber_type = $filter['BillingVoicenumber_type']; + if(is_numeric($BillingVoicenumber_type)) { + $where .= " AND BillingVoicenumber.BillingVoicenumber_type = $BillingVoicenumber_type"; + } + } + + if(array_key_exists("BillingVoicenumber_type", $filter)) { + $BillingVoicenumber_type = $db->escape($filter['BillingVoicenumber_type']); + if($BillingVoicenumber_type) { + $where .= " AND BillingVoicenumber.BillingVoicenumber_type = '$BillingVoicenumber_type'"; + } + } + + if(array_key_exists("BillingVoicenumber_delivery", $filter)) { + $BillingVoicenumber_delivery = $db->escape($filter['BillingVoicenumber_delivery']); + if($BillingVoicenumber_delivery) { + $where .= " AND BillingVoicenumber.BillingVoicenumber_delivery = '$BillingVoicenumber_delivery'"; + } + } + + //var_dump($filter, $where);exit; + return $where; + } + +} diff --git a/application/Contract/Contract.php b/application/Contract/Contract.php index 7427bfe46..9736f4053 100644 --- a/application/Contract/Contract.php +++ b/application/Contract/Contract.php @@ -27,6 +27,8 @@ class Contract extends mfBaseModel { private $productchangeTo; private $relocationFrom; private $relocationTo; + private $vatgroup; + private $vatrate; private $finisher; private $canceler; private $creator; @@ -193,6 +195,15 @@ class Contract extends mfBaseModel { } + public function getConfigValue($itemname) { + $configvalues = $this->getProperty("configvalues"); + if(!$configvalues) return null; + if(!array_key_exists($itemname, $configvalues)) return null; + + $confitem = $configvalues[$itemname]; + return $confitem->value; + } + public function getProperty($name) { if($this->$name == null) { @@ -292,6 +303,19 @@ class Contract extends mfBaseModel { return $this->contractConfigItems; }*/ + + if($name == "vatrate") { + $vatgroup = $this->getProperty("vatgroup"); + $country = $this->getProperty("country"); + $vatrate = $vatgroup->rates["domestic"]->rate; + if($this->country_id && $country->is_eu) { + $vatrate = $vatgroup->rates["eu"]->rate; + } if($this->country_id && !$country->is_eu) { + $vatrate = $vatgroup->rates["other"]->rate; + } + $this->vatrate = $vatrate; + return $this->vatrate; + } if($name == "journals") { $this->journals = array_reverse(ContractjournalModel::search(["contract_id" => $this->id])); diff --git a/application/Country/CountryModel.php b/application/Country/CountryModel.php index 594962ac8..04d851bb3 100644 --- a/application/Country/CountryModel.php +++ b/application/Country/CountryModel.php @@ -99,7 +99,7 @@ class CountryModel { if(is_array($limit) && count($limit)) { if(is_numeric($limit['start']) && is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['start'].", ".$limit['count']; - } elseif(is_numeric($count)) { + } elseif(is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['count']; } } @@ -131,7 +131,7 @@ class CountryModel { if(array_key_exists("isocode", $filter)) { $isocode = $db->escape($filter['isocode']); if($isocode) { - $where .= " AND Country.`isocode` like '%$isocode%'"; + $where .= " AND Country.`isocode` like '$isocode'"; } } diff --git a/application/Invoice/InvoiceController.php b/application/Invoice/InvoiceController.php index 61b014674..f89204776 100644 --- a/application/Invoice/InvoiceController.php +++ b/application/Invoice/InvoiceController.php @@ -65,7 +65,7 @@ class InvoiceController extends mfBaseController { } if(array_key_exists("address", $filter)) { - if(array_key_exists("address", $filter) && $filter["address"]) { + if($filter["address"]) { $search = $this->db()->escape($filter['address']); if(!array_key_exists("add-where", $new_filter)) $new_filter["add-where"] = ""; $new_filter['add-where'] .= " AND (street like '%$search%' OR zip like '%$search%' OR city like '%$search%' OR country like '%$search%')"; @@ -102,7 +102,7 @@ class InvoiceController extends mfBaseController { if(!array_key_exists($p->vatrate, $vat)) { $vat[$p->vatrate] = 0; } - $vat[$p->vatrate] += $p->price_gross - $p->price; + $vat[$p->vatrate] += $p->price_gross - ($p->price * $p->amount); } $pdf_vars = [ @@ -153,9 +153,13 @@ class InvoiceController extends mfBaseController { //var_dump($owner_id, $billingaddress_id, $bills);exit; $invoice_data = []; + $invoice_vatrate = 20; foreach($billing_rows as $bill) { - $vatrate = $bill->vatrate; + $vatarea = $bill->vatarea; + $invoice_vatrate = $bill->vatgroup->rates[$vatarea]->rate; + + $vatrate = $invoice_vatrate; $price = $bill->price; $price_total = $bill->price * $bill->amount; $price_gross = ($vatrate) ? $price_total + ($price_total / 100) * $vatrate : $price_total; @@ -177,6 +181,9 @@ class InvoiceController extends mfBaseController { $position_data["amount"] = $bill->amount; $position_data["billing_period"] = $bill->billing_period; + $position_data["fibu_cost_account"] = $bill->vatgroup->rates[$vatarea]->account; + $position_data["fibu_cost_account_legacy"] = $bill->vatgroup->rates[$vatarea]->legacy_account; + $position_data["fibu_taxcode"] = $bill->vatgroup->rates[$vatarea]->taxcode; if($is_setup_only) { $this->log->debug("Contract ID ". $bill->contract_id." is setup only"); @@ -219,6 +226,8 @@ class InvoiceController extends mfBaseController { $invoice_data["owner_id"] = $owner_id; $invoice_data["billingaddress_id"] = $billingaddress_id; $invoice_data["customer_number"] = $bill->customer_number; + $invoice_data["fibu_account_number"] = $bill->fibu_account_number; + $invoice_data["company"] = $bill->company; $invoice_data["firstname"] = $bill->firstname; $invoice_data["lastname"] = $bill->lastname; @@ -239,6 +248,12 @@ class InvoiceController extends mfBaseController { $invoice_data["total_vat"] = 0; + $invoice_data["fibu_cost_area"] = $vatarea; + $invoice_data["fibu_cost_account"] = $bill->vatgroup->rates[$vatarea]->account; + $invoice_data["fibu_cost_account_legacy"] = $bill->vatgroup->rates[$vatarea]->legacy_account; + $invoice_data["fibu_taxcode"] = $bill->vatgroup->rates[$vatarea]->taxcode; + $invoice_data["tax_text"] = $bill->vatgroup->rates[$vatarea]->invoice_text; + } @@ -265,9 +280,9 @@ class InvoiceController extends mfBaseController { // add Invoice::id to Invoiceposition $position->invoice_id = $invoice->id; - - if(!$position->vatrate) { + if(!$invoice_vatrate || !$position->vatrate) { $total_net += $position->price_total; + $total_gross += $position->price_total; } else { $total_vat += ($position->price_total / 100) * $position->vatrate; $total_net += $position->price_total; diff --git a/application/Invoice/InvoiceModel.php b/application/Invoice/InvoiceModel.php index a9b2b7d77..c68f6becd 100644 --- a/application/Invoice/InvoiceModel.php +++ b/application/Invoice/InvoiceModel.php @@ -3,8 +3,15 @@ class InvoiceModel { public $invoice_number; public $invoice_date; + public $owner_id; public $billingaddress_id; public $customer_number; + public $fibu_account_number; + public $fibu_cost_area; + public $fibu_cost_account; + public $fibu_cost_account_legacy; + public $fibu_taxcode; + public $tax_text; public $company; public $firstname; public $lastname; diff --git a/application/Invoiceposition/InvoicepositionModel.php b/application/Invoiceposition/InvoicepositionModel.php index 2bbb6460c..1b793c999 100644 --- a/application/Invoiceposition/InvoicepositionModel.php +++ b/application/Invoiceposition/InvoicepositionModel.php @@ -15,6 +15,9 @@ class InvoicepositionModel { public $price_total; public $price_gross; public $vatrate; + public $fibu_cost_account; + public $fibu_cost_account_legacy; + public $fibu_taxcode; public $billing_period; public $create_by; diff --git a/application/IvtCustomerProduct/IvtCustomerProduct.php b/application/IvtCustomerProduct/IvtCustomerProduct.php index c2cc0f9e2..99d23cb0e 100644 --- a/application/IvtCustomerProduct/IvtCustomerProduct.php +++ b/application/IvtCustomerProduct/IvtCustomerProduct.php @@ -12,7 +12,7 @@ class IvtCustomerProduct extends mfBaseModel { public function __construct($_=NULL) { $this->log = mfLoghandler::singleton(); $this->data = new stdClass(); - $this->table = "products"; + $this->table = "customer_product"; $this->db = FronkDB::singleton(IVT_DBHOST, IVT_DBUSER, IVT_DBPASS, IVT_DBNAME); diff --git a/application/VoiceCallHistory/VoiceCallHistoryController.php b/application/VoiceCallHistory/VoiceCallHistoryController.php index 1970ee31f..96d38c093 100644 --- a/application/VoiceCallHistory/VoiceCallHistoryController.php +++ b/application/VoiceCallHistory/VoiceCallHistoryController.php @@ -106,4 +106,69 @@ class VoiceCallHistoryController extends mfBaseController { ] ]; } + + public function addContractIds() { + $unknown_numbers = []; + // get calls without contract id + foreach(VoiceCallHistoryModel::getVoiceCallHistoryAsEntity(["contract_id" => null, "billable" => "1", "duration" => ["from" => 1], "end" => "2024-06-01"]) as $call) { + //var_dump($call);exit; + //echo "\n"; + + $number = $call->voice_account; + if(!$number) continue; + + if(in_array($number, $unknown_numbers)) continue; + $voicenumber = VoicenumberModel::getFirst(["number" => $number]); + + // TODO: Mail an office + if(!$voicenumber) { + $this->log->debug(__METHOD__.": Voicenumber $number not found."); + $unknown_numbers[] = $number; + continue; + } + + if(!$voicenumber->contract_id) { + $this->log->debug(__METHOD__.": Missing Contract_ID in Voicenumber ".$voicenumber->number); + continue; + } + + $calldate = new DateTime($call->start); + $calldate->setTimezone(new DateTimeZone("Europe/Vienna")); + + + + $contract = $voicenumber->contract; + + + // calls from before first IVT Import must be right, we don't have historic contract data + if($calldate->format("Y-m") < "2024-08") { + $call->contract_id = $contract->id; + //echo "save 1\n"; + if(!$call->save()) { + die("Cannot save call ".$call->id); + } + continue; + } + + // check if contract was active at this time ... + if($calldate->getTimestamp() <= $contract->finish_date && (!$contract->cancel_date || $calldate->getTimestamp() <= $contract->cancel_date)) { + // 2023-08 is the oldest we can know because of contract import in July 2024 + $call->contract_id = $contract->id; + echo "save 2\n"; + $call->save(); + } + + // ... else look for contract with this number active at that time ... + + // ... else use current active contract + if(!$contract) { + // find contract by ContractConfigValue voicenumberblock_voicenumber + + } + + $call->contract_id = $voicenumber->contract_id; + echo "save 3\n"; + $call->save(); + } + } } \ No newline at end of file diff --git a/application/VoiceCallHistory/VoiceCallHistoryModel.php b/application/VoiceCallHistory/VoiceCallHistoryModel.php index b86d43cd1..d5c48caee 100644 --- a/application/VoiceCallHistory/VoiceCallHistoryModel.php +++ b/application/VoiceCallHistory/VoiceCallHistoryModel.php @@ -2,6 +2,7 @@ class VoiceCallHistoryModel { public $uid; public $voice_account; + public $contract_id; public $start; public $source; public $destination; @@ -109,6 +110,7 @@ class VoiceCallHistoryModel { $sql .= isset($filters['destination']) ? Helper::generateFilterCondition($filters['destination'], "destination") : ""; $sql .= isset($filters['billable']) ? Helper::generateFilterCondition($filters['billable'], "billable") : ""; $sql .= isset($filters['duration']) ? Helper::generateFilterCondition($filters['duration'], "duration") : ""; + $sql .= array_key_exists("contract_id", $filters) ? Helper::generateFilterCondition($filters['contract_id'], "contract_id") : ""; return $sql; } @@ -119,6 +121,7 @@ class VoiceCallHistoryModel { $sql .= $order === null || $order['key'] === null ? " ORDER BY `start` DESC" : " ORDER BY `" . $order['key'] . "` " . $order['order']; $sql .= $limit === null ? "" : " LIMIT " . $limit . " OFFSET " . $offset; + //mfLoghandler::singleton()->debug($sql);exit; // die($sql); $result = $db->query($sql); $rows = []; @@ -129,6 +132,23 @@ class VoiceCallHistoryModel { return $rows; } + public static function getVoiceCallHistoryAsEntity($filters, $limit = null, $offset = 0, $order = null) { + $db = FronkDB::singleton(); + $sql = "SELECT * FROM `VoiceCallHistory` WHERE 1 " . self::getSqlFilter($filters); + $sql .= $order === null || $order['key'] === null ? " ORDER BY `start` DESC" : " ORDER BY `" . $order['key'] . "` " . $order['order']; + $sql .= $limit === null ? "" : " LIMIT " . $limit . " OFFSET " . $offset; + + //mfLoghandler::singleton()->debug($sql);exit; +// die($sql); + $result = $db->query($sql); + $rows = []; + while ($row = $db->fetch_object($result)) { + $rows[] = new VoiceCallHistory($row); + } + + return $rows; + } + public static function countVoiceCallHistory($filters) { $db = FronkDB::singleton(); $sql = "SELECT COUNT(*) as `total_rows` FROM `VoiceCallHistory` WHERE 1 " . self::getSqlFilter($filters); diff --git a/application/Voicenumber/VoicenumberModel.php b/application/Voicenumber/VoicenumberModel.php index afc618d86..97555b4e3 100644 --- a/application/Voicenumber/VoicenumberModel.php +++ b/application/Voicenumber/VoicenumberModel.php @@ -67,7 +67,7 @@ class VoicenumberModel { $db = FronkDB::singleton(); $where = self::getSqlFilter($filter); - mfLoghandler::singleton()->debug($where); + //mfLoghandler::singleton()->debug($where); $res = $db->select("Voicenumber", "*", "$where ORDER BY voicenumberblock_id, number"); if($db->num_rows($res)) { $data = $db->fetch_object($res); diff --git a/db/migrations/20240625164727_contract_add_vat.php b/db/migrations/20240625164727_contract_add_vat.php index b41b12b67..33b89b448 100644 --- a/db/migrations/20240625164727_contract_add_vat.php +++ b/db/migrations/20240625164727_contract_add_vat.php @@ -9,7 +9,7 @@ final class ContractAddVat extends AbstractMigration { if($this->getEnvironment() == "thetool") { $table = $this->table("Contract"); - $table->addColumn("vatrate", "decimal", ["null" => false, "default" => 0, "precision" => 6, "scale" => 2, "after" => "price_setup"]); + $table->addColumn("vatgroup_id", "integer", ["null" => false, "after" => "price_setup"]); $table->update(); } @@ -22,7 +22,7 @@ final class ContractAddVat extends AbstractMigration { if($this->getEnvironment() == "thetool") { $table = $this->table("Contract"); - $table->removeColumn("vatrate"); + $table->removeColumn("vatgroup_id"); $table->update(); } diff --git a/db/migrations/20240702192635_billing_add_fibu_data.php b/db/migrations/20240702192635_billing_add_fibu_data.php new file mode 100644 index 000000000..ea288ab4f --- /dev/null +++ b/db/migrations/20240702192635_billing_add_fibu_data.php @@ -0,0 +1,67 @@ +getEnvironment() == "thetool") { + $billing = $this->table("Billing"); + $billing->addColumn("fibu_account_number", "integer", ["null" => true, "default" => null, "after" => "customer_number"]); + $billing->addColumn("vatgroup_id", "string", ["null" => true, "default" => null, "after" => "vatrate"]); + $billing->addColumn("vatarea", "string", ["null" => true, "default" => null, "after" => "vatgroup_id"]); + $billing->save(); + + $invoice = $this->table("Invoice"); + $invoice->addColumn("fibu_account_number", "integer", ["null" => true, "default" => null, "after" => "customer_number"]); + $invoice->addColumn("fibu_cost_area", "string", ["null" => true, "default" => null, "after" => "fibu_account_number"]); + $invoice->addColumn("fibu_cost_account", "integer", ["null" => true, "default" => null, "after" => "fibu_cost_area"]); + $invoice->addColumn("fibu_cost_account_legacy", "integer", ["null" => true, "default" => null, "after" => "fibu_cost_account"]); + $invoice->addColumn("fibu_taxcode", "integer", ["null" => true, "default" => null, "after" => "fibu_cost_account_legacy"]); + $invoice->addColumn("tax_text", "string", ["null" => true, "default" => null, "length" => 255, "after" => "fibu_taxcode"]); + $invoice->save(); + + $ip = $this->table("Invoiceposition"); + $ip->addColumn("fibu_cost_account", "integer", ["null" => true, "default" => null, "after" => "vatrate"]); + $ip->addColumn("fibu_cost_account_legacy", "integer", ["null" => true, "default" => null, "after" => "fibu_cost_account"]); + $ip->addColumn("fibu_taxcode", "integer", ["null" => true, "default" => null, "after" => "fibu_cost_account_legacy"]); + $ip->save(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + + $this->table("Invoiceposition") + ->removeColumn("fibu_taxcode") + ->removeColumn("fibu_cost_account_legacy") + ->removeColumn("fibu_cost_account") + ->update(); + + $this->table("Invoice") + ->removeColumn("fibu_invoice_text") + ->removeColumn("fibu_taxcode") + ->removeColumn("fibu_cost_account_legacy") + ->removeColumn("fibu_cost_account") + ->removeColumn("fibu_cost_area") + ->removeColumn("fibu_account_number") + ->update(); + $this->table("Billing") + ->removeColumn("vatarea") + ->removeColumn("vatgroup_id") + ->removeColumn("fibu_account_number") + ->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/db/migrations/20240704170016_create_billing_voicenumber.php b/db/migrations/20240704170016_create_billing_voicenumber.php new file mode 100644 index 000000000..5d2c78e11 --- /dev/null +++ b/db/migrations/20240704170016_create_billing_voicenumber.php @@ -0,0 +1,47 @@ +getEnvironment() == "thetool") { + $table = $this->table("BillingVoicenumber"); + $table->addColumn("invoice_id", "integer", ["null" => true, "default" => null]); + $table->addColumn("contract_id", "integer", ["null" => false]); + $table->addColumn("owner_id", "integer", ["null" => false]); + $table->addColumn("billingaddress_id", "integer", ["null" => false]); + $table->addColumn("voicenumber", "string", ["null" => false, "limit" => 64]); + $table->addColumn("start_date", "date", ["null" => false]); + $table->addColumn("end_date", "date", ["null" => false]); + $table->addColumn("zone", "string", ["null" => false, "limit" => 64]); + $table->addColumn("duration", "integer", ["null" => false]); + $table->addColumn("price", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); + $table->addColumn("total_vat", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); + + $table->addColumn("create_by", "integer", ["null" => false]); + $table->addColumn("edit_by", "integer", ["null" => false]); + $table->addColumn("create", "integer", ["null" => false]); + $table->addColumn("edit", "integer", ["null" => false]); + + $table->create(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + $this->table("BillingVoicenumber")->drop()->save(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/lib/Helper/Helper.php b/lib/Helper/Helper.php index 9f5ba3e01..8a7a44a28 100644 --- a/lib/Helper/Helper.php +++ b/lib/Helper/Helper.php @@ -15,13 +15,15 @@ class Helper { if (is_array($filterValue)) { if (isset($filterValue['from']) && isset($filterValue['to'])) { $sql = " AND `$columnName` >= " . $filterValue['from'] . " AND `$columnName` <= " . $filterValue['to']; - } else if (isset($filterValue['from'])) { + } elseif (isset($filterValue['from'])) { $sql = " AND `$columnName` >= " . $filterValue['from']; - } else if (isset($filterValue['to'])) { + } elseif (isset($filterValue['to'])) { $sql = " AND `$columnName` <= " . $filterValue['to']; } } else if ($filterValue === "0" || $filterValue === "1") { $sql .= " AND `$columnName` = " . $filterValue; + } else if ($filterValue === null) { + $sql .= " AND `$columnName` IS NULL"; } else if (!empty($filterValue)) { if ($exactMatch) { $sql .= " AND `$columnName` = '" . $filterValue . "'"; diff --git a/public/css/sknx_print.css b/public/css/sknx_print.css index bb06c7a23..676d07487 100644 --- a/public/css/sknx_print.css +++ b/public/css/sknx_print.css @@ -1,16 +1,23 @@ +@page { + size: A4; + margin: 0mm; +} + * { font-family: "Open Sans"; } html { - margin: 24pt; + /*margin: 24pt;*/ + margin: 0; height:100%; } body { font-size:9pt; height:100%; - margin-top: 50pt; + margin: 0; + margin-top: 20pt; } h2 { diff --git a/scripts/test.php b/scripts/test.php index c9ca9b70b..12ce7892b 100644 --- a/scripts/test.php +++ b/scripts/test.php @@ -4,61 +4,290 @@ //require 'vendor/autoload.php'; require("../config/config.php"); -define('FRONKDB_SQLDEBUG',false); +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"); +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); -$chars = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ'; -$charsLength = strlen($chars); +require_once(APPDIR . "Admin/functions/IvtContractImport.php"); -$c = 0; +$ownerIdToBillingAddress = []; -$db = FronkDB::singleton(); -$res = $db->query("SELECT id FROM Preorder WHERE oaid IS NOT NULL ORDER BY RAND()"); -/*while($data = $db->fetch_object($res)) { - if($c > 1000) break; +$ici = new Admin_IvtContractImport(); + +$orderproduct = false; +$orderproduct_id = false; + +$ivt_contract = new IvtCustomerProduct(5983); + +$ivt_customer = $ivt_contract->customer; +$ivt_product = $ivt_contract->product; + +/* + * get thetool product from IvtProductMatch + */ +$productMatch = IvtProductMatchModel::getFirst(["ivt_product_id" => $ivt_contract->pid]); +if(!$productMatch) { + echo "Kein Match zu IVT Product " . $ivt_contract->pid . " gefunden.
\n"; + exit; +} + +$ip = $productMatch->ivtproduct; +$product = $productMatch->product; + +/* + * check ivt customer and get Billingaddress + */ +$billingaddress_id = false; + +//var_dump($ivt_contract);exit; +$customer_check_return = checkIvtCustomer($ivt_contract, $ivt_customer, $product); + + +private function checkIvtCustomer($ivt_contract, $ivt_customer, $product, $doit = false) + { + global $ownerIdToBillingAddress; + $return = []; + // create customer if not exists + $ivt_custnum = $ivt_customer->id; + if (!$ivt_custnum) return false; + + // sync billing address + $owner = AddressModel::getFirst(["customer_number" => $ivt_custnum]); + if (!$owner) { + //var_dump($ivt_customer, $ivt_contract); + die("Address $ivt_custnum not found!"); + } + + if(array_key_exists($owner->id, $this->ownerIdToBillingAddress)) { + return ["billingaddress_id" => $this->ownerIdToBillingAddress[$owner->id]]; + } + + $compare_address = $owner; + $compare_type = "owner"; + $return["billingaddress_id"] = $owner->id; + + $order = $this->findOrder($ivt_contract); + if(!$order) { + $return["billingaddress_id"] = $owner->id; + $compare_address = $owner; + $compare_type = "owner"; + } + + // look for billingaddress_id in order and use it + if ($order && $order->billingaddress_id) { + $return["billingaddress_id"] = $order->billingaddress_id; + + $billingaddress = new Address($order->billingaddress_id); + if (!$billingaddress->id) { + die("Billingaddress " . $order->billingaddress_id . " does not exist (order " . $order->id . "; ivt customer $ivt_custnum)"); + } + + $compare_address = $billingaddress; + $compare_type = "billingaddress"; + } + + + + // if no billingaddress_id in order, compare address of Address and ivt_customer and + // create new billingaddress if nessecary + + if(!$compare_address) { + die("No Compare address"); + } + + $address_update = $this->compareBillingAddresses($ivt_customer, $compare_address); + if($address_update === true) { + $return["billingaddress_id"] = $compare_address->id; + } elseif(is_array($address_update) && count($address_update)) { + if($compare_type == "billingaddress") { + // update billingaddress + $compare_address->update($address_update); + if(!$compare_address->save()) { + die("error updateing Billingaddress"); + } + $this->ownerIdToBillingAddress[$owner->id] = $billingaddress->id; + $return["billingaddress_id"] = $compare_address->id; + } else { + // create billingaddress + $billingaddress = AddressModel::create($address_update); + try { + if(!$billingaddress->save()) { + var_dump($address_update); + die("error creating Billingaddress"); + } + $return["billingaddress_id"] = $billingaddress->id; + if(!array_key_exists($owner->id, $this->ownerIdToBillingAddress)) { + $ownerIdToBillingAddress[$owner->id] = $billingaddress->id; + /*$this->log->debug(__METHOD__.": Creating billing link for owner ".$owner->id." ".$owner->getCompanyOrName()."with billing address ".$billingaddress->id." ".$billingaddress->getCompanyOrName()); + $this->log->debug("OWNER:"); + $this->log->debug(print_r($owner->data, true)); + $this->log->debug("ADDRESS UPDATE:"); + $this->log->debug(print_r($address_update, true));*/ + // create addresslink + $l = AddressLinkModel::create([ + 'origin_address_id' => $owner->id, + 'type' => "billing", + 'address_id' => $billingaddress->id + ]); + $l->save(); + } + + } catch (Exception $e) { + echo "Exception: ".$e->getMessage()."\n"; + var_dump($address_update); + exit(); + } + + } + + } + + return $return; - $preorder = new Preorder($data->id); - if(!$preorder->oaid) { - echo "no oaid ".$preorder->id."\n"; - } - $oaid = $preorder->oaid; - $ucode = ''; - for($i = 0; $i < 20; $i++) { - $ucode .= $chars[rand(0, $charsLength - 1)]; } - echo "$oaid;$ucode\n"; - $c++; -}*/ + private function compareBillingAddresses($ivt_customer, $tool_customer) { + $owner = $tool_customer; -$stati = PreorderstatusModel::getAll(); + $new_billing = []; -while($data = $db->fetch_object($res)) { - if($c > 1000) break; + if ($ivt_customer->company) { + if (strtolower(trim($ivt_customer->company)) != strtolower(trim($owner->company))) $new_billing["company"] = $ivt_customer->company; + } else { + if (strtolower(trim($ivt_customer->firstname)) != strtolower(trim($owner->firstname))) $new_billing["firstname"] = $ivt_customer->firstname; + if (strtolower(trim($ivt_customer->surname)) != strtolower(trim($owner->lastname))) $new_billing["lastname"] = $ivt_customer->surname; + } - $preorder = new Preorder($data->id); - if(!$preorder->oaid) { - echo "no oaid ".$preorder->id."\n"; - } - $oaid = $preorder->oaid; + //if ($ivt_customer->UID != $owner->uid) $new_billing["uid"] = $ivt_customer->UID; + if (strtolower(trim($ivt_customer->zip)) != strtolower(trim($owner->zip))) $new_billing["zip"] = $ivt_customer->zip; + if (strtolower(trim($ivt_customer->location)) != strtolower(trim($owner->city))) $new_billing["city"] = $ivt_customer->location; + if (strtolower(trim($ivt_customer->street . " " . $ivt_customer->housenumber)) != strtolower(trim($owner->street))) $new_billing["street"] = $ivt_customer->street . " " . $ivt_customer->housenumber; + //if (strtolower(trim($ivt_customer->phone)) != strtolower(trim($owner->phone))) $new_billing["phone"] = $ivt_customer->phone; + if (strtolower(trim($ivt_customer->email)) != strtolower(trim($owner->email))) { + if($ivt_customer->email && !$owner->email) { + $owner->email = strtolower(trim($ivt_customer->email)); + $owner->save(); + } else { + $new_billing["email"] = $ivt_customer->email; + } + } - $r = rand(0, count($stati)-1); - $new_status = $stati[$r]; + $billing_type = ""; + $billing_delivery = ""; + if($ivt_customer->payment == 1 && $owner->billing_type != "invoice") { + $billing_type = "invoice"; + if($owner->billing_type) { + $new_billing["billing_type"] = "invoice"; + } else { + $owner->billing_type = "invoice"; + $owner->save(); + } + } elseif($ivt_customer->payment == 0 && $owner->billing_type != "sepa") { + $billing_type = "sepa"; + if($owner->billing_type) { + $new_billing["billing_type"] = "sepa"; + } else { + $owner->billing_type = "sepa"; + $owner->save(); + } + } elseif($ivt_customer->paper_invoice == 1 && $owner->billing_delivery != "paper") { + $billing_delivery = "paper"; + if($owner->billing_delivery) { + $new_billing["billing_delivery"] = "paper"; + } else { + $owner->billing_delivery = "paper"; + $owner->save(); + } + } elseif($ivt_customer->paper_invoice == 0 && $owner->billing_delivery != "email") { + $billing_delivery = "email"; + if($owner->billing_delivery) { + $new_billing["billing_delivery"] = "email"; + } else { + $owner->billing_delivery = "email"; + $owner->save(); + } + } - if(!$new_status->code) { - fwrite(STDERR, "status not found\n"); - continue; - } + //if($ivt_customer->bank_account_bank != $owner->bank_account_bank) $new_billing["bank_account_bank"] = $ivt_customer->bank_account_bank; + //if($ivt_customer->bank_account_owner != $owner->bank_account_owner) $new_billing["bank_account_owner"] = $ivt_customer->bank_account_owner; + $iban = strtoupper(trim(str_replace(" ","", $ivt_customer->IBAN))); + $bic = strtoupper(trim(str_replace(" ","", $ivt_customer->BIC))); + if ((array_key_exists("billing_type", $new_billing) && $new_billing["billing_type"] == "sepa") || $ivt_customer->payment == 0 && ($iban || $bic)) { + if ($iban != strtoupper(trim(str_replace(" ","", $owner->bank_account_iban)))) $new_billing["bank_account_iban"] = $iban; + if ($bic != strtoupper(trim(str_replace(" ","", $owner->bank_account_bic)))) $new_billing["bank_account_bic"] = $bic; + } - echo "$oaid;".$new_status->code."\n"; + if(array_key_exists("bank_account_bic", $new_billing) && !array_key_exists("bank_account_iban", $new_billing)) { + $owner->bank_account_bic = $new_billing["bank_account_bic"]; + $owner->save(); + unset($new_billing["bank_account_bic"]); + } - $c++; -} \ No newline at end of file + if(count($new_billing) == 2 && array_key_exists("billing_type", $new_billing) && array_key_exists("billing_delivery", $new_billing)) { + $owner->billing_type = $billing_type; + $owner->billing_delivery = $billing_delivery; + $owner->save(); + return true; + } + if(count($new_billing) == 1) { + if(array_key_exists("billing_type", $new_billing)) { + $owner->billing_type = $billing_type; + $owner->save(); + return true; + } + if(array_key_exists("billing_delivery", $new_billing)) { + $owner->billing_delivery = $billing_delivery; + $owner->save(); + return true; + } + + } + + + + //$missing_fields = []; + $create = false; + foreach(["company", "firstname", "lastname", "street", "zip", "city", "email", "uid", "billing_type", "billing_delivery", + "bank_account_iban", "bank_account_bic"] as $field) { + if(!array_key_exists($field, $new_billing)) { + /*if(!$owner->$field) { + if($field == "billing_delivery") { + $new_billing[$field] = "paper"; + } else { + $new_billing[$field] = ""; + } + + } else { + $new_billing[$field] = $owner->$field; + }*/ + $new_billing[$field] = $owner->$field; + } else { + if($field == "email" && $new_billing["email"] == "dummy@xinon.at") continue; + $create = true; + } + } + + /* + if($create) { + $billingaddress = AddressModel::create($new_billing); + //var_dump($billingaddress, $missing_fields);exit; + if(!$billingaddress->save()) { + die("Error createing billingaddress\n"); + } + $return["billingaddress_id"] = $billingaddress->id; + }*/ + + if($create) { + return $new_billing; + } + + return true; + + } \ No newline at end of file diff --git a/scripts/voice/add-contract-ids.php b/scripts/voice/add-contract-ids.php new file mode 100644 index 000000000..edd96edb2 --- /dev/null +++ b/scripts/voice/add-contract-ids.php @@ -0,0 +1,21 @@ +#!/usr/bin/php +id); +define("INTERNAL_USER_USERNAME", $me->username); + +$vchc = new VoiceCallHistoryController(false); + +$vchc->addContractIds(); \ No newline at end of file diff --git a/scripts/voice/unknown-numbers b/scripts/voice/unknown-numbers new file mode 100644 index 000000000..560accef7 --- /dev/null +++ b/scripts/voice/unknown-numbers @@ -0,0 +1,6773 @@ +4331322094 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322094 +4331192942 +4334737948 +43313228428 +43313228428 +4334737948 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43313330089 +433159258910 +43312720527 +4331322094 +4331322094 +4331322094 +4331322094 +4331322097 +4331278207 +4331192942 +4331192942 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228400 +43313228428 +43313228428 +43720832217 +4331278207 +43313228428 +43720832217 +43311540800 +43311540800 +43311540800 +4331322097 +43720832217 +43311540800 +43313228400 +43313228428 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +4331278207 +43311540800 +43311540800 +43720666555 +4331278207 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +4331322097 +43311540800 +43720666555 +43720832217 +43313228428 +43313228428 +43313228428 +43720832217 +43313228428 +4331278207 +43313228428 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +4331192942 +43311540800 +43313228428 +43313228428 +43311540800 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228400 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43311540800 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228400 +43313228400 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43313228400 +43313228400 +43720832217 +43720832217 +43313228428 +43311540800 +43311540800 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +4331192942 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +4334737948 +43313228428 +43313228428 +4331322097 +4333342421 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43313228400 +43313228428 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43311236300 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43313228428 +43313228428 +43311540800 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43311540800 +43313228428 +43720832217 +43311540800 +43311540800 +43311540800 +4367761737195 +43311540800 +43720832217 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +4331278207 +43311540800 +4331192942 +4331278207 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +4334737948 +4333342421 +43315829429 +43315829429 +43315829429 +4331192942 +4331278207 +4331192942 +4331278207 +4331322094 +4331322094 +43315829429 +43315829429 +43313228428 +43311540800 +43313228428 +4331322097 +4331322097 +43311236300 +43313228428 +43311540800 +4331322094 +43313228428 +4331192942 +43311540800 +43313228428 +4331278207 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +4331278207 +4331192942 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43312720527 +4331278207 +43313228414 +43313228428 +43720832217 +43313228428 +43311540800 +43313228428 +43720832217 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +4331278207 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43311540800 +43313228428 +43720832217 +43313228428 +43313228428 +43311540800 +43311540800 +43313228400 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43311540800 +43720832217 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +4331192942 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +4331322097 +4331322097 +43311540800 +43311540800 +4331322094 +4331322094 +4331322094 +43312720527 +4331322094 +43313228428 +43313228428 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43313228400 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43313228428 +43313228400 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43313228428 +43313228428 +4331278207 +43311540800 +4331322094 +43311540800 +43720832217 +43311540800 +43311540800 +4331322094 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +4331322094 +43311540800 +43313228428 +43311540800 +43720832217 +43720832217 +43316413006 +43313228428 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228400 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +4331192942 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43720832217 +43311540800 +43315829429 +43720832217 +43720832217 +43720832217 +4331322094 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4331278207 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43316413006 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +43311540800 +43313228428 +43313228428 +4331278207 +43313228428 +4331278207 +43311540800 +43720832217 +43313228428 +43311540800 +43313228428 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4331322097 +43720832217 +43720832217 +4334737948 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228414 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +4331278207 +43720832217 +4331278207 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43315829429 +43720832217 +43315829429 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +4333342421 +43720832217 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43313228428 +43720832217 +43311540800 +43311540800 +4331322097 +43311540800 +4334737948 +4331322097 +4331322097 +43311236300 +4331192942 +4334737948 +43318372223 +43313228414 +4331192942 +4331322097 +43313228400 +4331192942 +4331332005 +4331332005 +4331332005 +4331332005 +4331332005 +4331332005 +4331332005 +4331332005 +4331332005 +4331322097 +4331322097 +43313228400 +43313228414 +43313228414 +4331278207 +43313228428 +43313228400 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +4331192942 +43313228428 +43313330089 +4331192942 +43313228428 +43313330089 +43313330089 +43313330089 +43313330089 +43313228428 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43313228400 +4331278207 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +4334737948 +43311540800 +43311540800 +4334737948 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +4331278207 +43313228428 +43311540800 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +4331192942 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313228428 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +4333342421 +43315829429 +43313228428 +43311540800 +43311540800 +43311540800 +4331192942 +43720832217 +43720832217 +43316413006 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +4331278207 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43313228400 +43313228400 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +4331192942 +43311540800 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +4331192942 +43311540800 +4331192942 +43311540800 +43720832217 +4331192942 +4331278207 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +4331322097 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228414 +43313228428 +43313228414 +43311540800 +43313228414 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +4331192942 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43311540800 +4331278207 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43311236300 +43720832217 +43311540800 +43311540800 +43311540800 +4334737948 +4331333682 +43311540800 +43313228428 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228400 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +4331332005 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43311540800 +43316413006 +43313330089 +43313330089 +4331192942 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +4334737948 +43311540800 +4334737948 +43720832217 +43311540800 +43720832217 +4331278207 +4331322097 +4331278207 +4334737948 +43312724242 +4334737948 +4331192942 +4331322097 +4331322097 +4331322097 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322094 +4331332005 +4331332005 +4331332005 +4331332005 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228400 +43313228428 +4331278207 +43313228428 +43313228428 +43313228428 +4331192942 +43313228428 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228428 +43313228428 +43313228428 +4331322097 +43312720527 +4334737948 +4334737948 +43316413006 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228414 +4334737948 +4331322094 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +4331278207 +43313228428 +43311540800 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43311540800 +43313228428 +43313228428 +4331322097 +43313228428 +43313228428 +43313228428 +43311540800 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +4331278207 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720666555 +43720832217 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43316413006 +43316413006 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43313330089 +43316413006 +43313330089 +43313330089 +43313330089 +43313330089 +4331278207 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331322097 +43316413006 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228414 +43313228414 +43313228414 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +4331323613 +4331322097 +43311540800 +43313228428 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +4331278207 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +4331278207 +43311540800 +43313228428 +43311540800 +43311540800 +43313228400 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +4331192942 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313330089 +43313330089 +43311540800 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331322097 +43311540800 +43311540800 +43313228414 +43720832217 +43311540800 +43720832217 +43313228428 +43313228428 +4331323613 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43313228428 +43720832217 +43313228400 +43313228400 +4331322097 +4331322097 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +4331322097 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +4331322097 +43311540800 +4331322097 +43311540800 +4331322097 +43720666555 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43720666555 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43313228428 +43315829429 +43315829429 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +4331332005 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43720832217 +43720832217 +4331192942 +4331192942 +4331192942 +4331192942 +4331322097 +4334737948 +4331322097 +4334737948 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4334737948 +4334737948 +4331322097 +4331322097 +43318372223 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331332005 +4331332005 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43623237705 +43311540800 +43313228428 +43311540800 +4331192942 +43311540800 +43311540800 +43311236300 +43313228428 +43311540800 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228428 +4331322097 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832202 +43720832217 +43313228428 +4331278207 +43311540800 +43313228400 +43311540800 +4331192942 +4331192942 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43720832217 +43313228428 +4331278207 +43311540800 +43312720527 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43312720527 +4331192942 +4331192942 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331278207 +4331278207 +4331278207 +43720832217 +4331322097 +43720832217 +43720832217 +4331278207 +43311540800 +43311540800 +43311540800 +4331278207 +4331278207 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +4331322097 +4331278207 +43311540800 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4331192942 +43311540800 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +4334737948 +43318430999 +43313228414 +43313228414 +43313228428 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43313228428 +4331278207 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720666555 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43313228400 +43311540800 +43313228400 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43313228400 +4331192942 +43720832217 +43311540800 +43313228428 +43311540800 +43318430999 +43311540800 +43313228414 +4334737948 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +43318430999 +43318430999 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331278207 +4331322097 +4331322097 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +43318430999 +43313228414 +4334737948 +43313228414 +43313228414 +43318430999 +43313228414 +43313228414 +4331322097 +43318430999 +43311540800 +43311540800 +43311540800 +4331192942 +4331192942 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331323613 +43311540800 +4331322097 +43313228414 +4331322097 +4331322097 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +4334737948 +43311540800 +43313228400 +4331278207 +43311540800 +43311540800 +43313228414 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +4333342421 +43311540800 +43311540800 +43720666555 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +4331192942 +43313330089 +43313330089 +43313330089 +43313228428 +43313330089 +43313330089 +43313228428 +43313228428 +43313228428 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4333342421 +43313330089 +43311540800 +43311540800 +43313228428 +43311540800 +43318430999 +43720832217 +43313228400 +43311540800 +4331278207 +43720832217 +43720832217 +4331322097 +43311540800 +43311236300 +43311236300 +43313228428 +43313228414 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43318430999 +43311540800 +43318430999 +43318430999 +43311540800 +43311540800 +43720832217 +43311540800 +4331322097 +43311540800 +43720832217 +43318430999 +43313228400 +43311540800 +43311540800 +43313228400 +43313228400 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43318430999 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43313228428 +43313228400 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43318430999 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43720832217 +43720832217 +4334737948 +43720832217 +43720832217 +43313330089 +43311540800 +43313330089 +43720832217 +43720832217 +43313330089 +43318430999 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43318430999 +43313228428 +43311540800 +43311540800 +43318430999 +43318430999 +43318430999 +43311540800 +43318430999 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43318430999 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43313228400 +43720832217 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43311540800 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +4331278207 +43311540800 +43313228400 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +4331192942 +43720832217 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +4331278207 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +4334737948 +43313228428 +43720832217 +43318430999 +4331278207 +43311540800 +43720832217 +43311540800 +43313228428 +43311540800 +43312720527 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43313228400 +43720832217 +43720832217 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43318372223 +43720832217 +43720832217 +43720832217 +43311540800 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43313228428 +43720832217 +43313228428 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43720832217 +43311540800 +43311236300 +43313228428 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +4331278207 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +4331322097 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +4331278207 +43311540800 +43720832202 +43720832202 +4331192942 +43720832217 +43311540800 +43311540800 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43318430999 +43311540800 +43311540800 +4331192942 +43318430999 +43318430999 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43318430999 +43720832217 +43318430999 +43318430999 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +43311540800 +43313228428 +43720832217 +43313228428 +43313228428 +43311540800 +43313228428 +43720832217 +43720832217 +43313228428 +43311540800 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311236300 +43720832217 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +4331192942 +43311540800 +43313228400 +43311540800 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313228400 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43311540800 +43313330089 +43318430999 +43720832217 +43318430999 +43318430999 +43318430999 +43313228400 +43318430999 +43311540800 +43318430999 +43720832217 +4331278207 +4331322097 +43311540800 +43313228414 +43313228414 +4334737948 +4331192942 +43318430999 +4331192942 +43318430999 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43318430999 +43318430999 +43318430999 +43318430999 +43318430999 +43316413006 +4331322097 +4334737948 +4331322097 +4331322097 +4334737948 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43318430999 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43720832217 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +4331322097 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43313228400 +43311540800 +4331322097 +43313228428 +43313228428 +4331278207 +4331278207 +43313228428 +43313228428 +43311540800 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +4331192942 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43311540800 +43313228428 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43311236300 +4331322097 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43313228400 +43311540800 +43316413006 +43720832217 +43313228428 +43313228428 +4331192942 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +4334737948 +43311540800 +43311540800 +4331278207 +43311540800 +43311540800 +43313228400 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43313228428 +43720832217 +43311540800 +43313228428 +43313228428 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43313228400 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43313228400 +4334737948 +4331278207 +4331192942 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4331322097 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +4331192942 +43311540800 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43318430999 +43313228428 +43311540800 +43311540800 +43720832217 +4331322097 +43720832217 +433159258910 +43720832217 +43720832217 +43720832217 +43312424444 +43720832217 +43720832217 +43313228414 +4331278207 +43720832217 +43720832217 +43318430999 +4331333682 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43313228414 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43313228400 +43313228428 +43313228428 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +43720832217 +43311540800 +43313228428 +43313228414 +43313228428 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43318430999 +43311540800 +43318430999 +43311540800 +43311540800 +43313228414 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43313228428 +43720832217 +43313228428 +43313228400 +43311540800 +43313228428 +43313228428 +43720832217 +43311540800 +43313228414 +43311540800 +43313228400 +4331278207 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +4331192942 +43311540800 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +4331278207 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43311540800 +43720832217 +4333342421 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +4331278207 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +4331322097 +4331322097 +43318430999 +4331322094 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43318430999 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43316413006 +43316413006 +43720832217 +43313228428 +43311540800 +4334737948 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331278207 +43318430999 +43318430999 +43318430999 +43318430999 +43315829429 +4331322097 +4331322097 +4331192942 +4331192942 +43318430999 +43318430999 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4334737948 +4331278207 +43318430999 +43312720527 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43313228428 +43313228400 +43313228428 +43313228428 +43313228428 +43313228400 +43311540800 +43720832217 +43311540800 +43311540800 +4334737948 +43311540800 +4331322094 +43311540800 +43313228428 +43720666555 +43311540800 +43313228400 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228400 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228428 +4331192942 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43311540800 +43313228428 +43313228428 +43313228400 +43311540800 +43311540800 +43311540800 +43313228428 +43313228400 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43313228428 +43313228400 +43720832217 +43720666555 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +4331192942 +43311540800 +43313228428 +43313228428 +43313228428 +43346621001 +43720832217 +43311540800 +43346621001 +4334737948 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43313228428 +43720832217 +43720832217 +43313228400 +43313228400 +43720832217 +43313330089 +43313330089 +43313330089 +43311540800 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43312720527 +43313228428 +43311540800 +4333342443 +4333342443 +4333342443 +4333342443 +4333342443 +4333342443 +43311540800 +4331322097 +43316413006 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331322097 +43313228428 +43311540800 +43313228428 +43316413006 +43313228428 +43313228428 +43313228428 +43720832202 +43720832217 +43720832217 +43311540800 +43311540800 +43313228428 +43313228400 +43313228400 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +4331322097 +43311540800 +43313228428 +43313228428 +43313228428 +43720832217 +43311540800 +43311540800 +4334737948 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43313228428 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43313228400 +43313228400 +43311540800 +43720832217 +43313228428 +43313228428 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43311540800 +43313330089 +43313228428 +43313330089 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331322097 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +43313228428 +43313228428 +4334737948 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +4331278207 +43720832217 +43311540800 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43313228400 +43311540800 +43313228428 +43720832217 +43311540800 +43313228428 +4331192942 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +4331278207 +43720832217 +43720832217 +43313330089 +4331278207 +43313330089 +43313330089 +43313330089 +43313330089 +4331278207 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228400 +43313330089 +43313330089 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313228428 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +4331278207 +43311540800 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +4331192942 +43720832217 +43311540800 +43313330089 +43311540800 +43313330089 +43720832217 +43313330089 +43313228428 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43313228428 +4331278207 +43720832217 +43720832217 +4334737948 +4334737948 +4334737948 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +4331278207 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +43313228428 +43311540800 +43720832217 +43311540800 +43313228428 +4331322097 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43313228400 +4331322094 +43720832217 +4331278207 +43720832217 +43720832217 +43313228400 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228400 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331322097 +43311540800 +43311540800 +4334737948 +43311540800 +43311540800 +43311540800 +4331322097 +4331322097 +4331278207 +43316413006 +43720832217 +43720832217 +43720832217 +43720832217 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43313228400 +43720832217 +43720832217 +43313228400 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313228400 +43720832217 +43313228428 +43311540800 +4331278207 +43311540800 +43318430999 +43318430999 +43318430999 +4333342443 +4333342443 +4333342443 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +4333342443 +4334737948 +4331192942 +43316413006 +43318430999 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +4331322097 +4331322097 +4331322097 +4331322097 +4331322097 +4331322097 +4331278207 +4331278207 +43311540800 +43311540800 +43311540800 +43720666555 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331278207 +43311540800 +43313228414 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43720832202 +43318430999 +43313228400 +43311540800 +43313228400 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832217 +43315829429 +43720832202 +43720832202 +43720832202 +43720832217 +43720832202 +43313228428 +43720832202 +43313228428 +43720832217 +43720832202 +43313228428 +43313228428 +43313228428 +43313228428 +43312720527 +43720832217 +43311540800 +43313228428 +43311540800 +4331278207 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43313228400 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311236300 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +4331192942 +43311540800 +43311540800 +43311540800 +43720832202 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43313228428 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43313228428 +43720832217 +4331278207 +43720832217 +43311540800 +43720832217 +43311540800 +43720832202 +43720832202 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +43720832202 +43311540800 +43720832202 +43312720527 +43311540800 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43313228400 +4331323613 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43720832217 +4334737948 +43311540800 +43313228428 +43311540800 +4331322097 +43311540800 +43311540800 +43311540800 +43311540800 +43315829429 +43311540800 +4331322097 +43311540800 +43311540800 +4331322097 +43311540800 +43313228428 +43313228428 +43313228428 +43720832217 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43720832217 +43313228428 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43318430999 +4331192942 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43313228428 +43313228428 +4333342443 +4333342443 +4333342443 +4333342443 +4333342443 +4333342443 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4334737948 +43720832217 +43313228428 +43720832217 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +4334737948 +43311540800 +4331322097 +43311540800 +43313228428 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43720832217 +43313228400 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43311540800 +43313228428 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43313228400 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +4331192942 +43720832217 +4331278207 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43311540800 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +4331322097 +4331278207 +43311540800 +4331322097 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4333342443 +4333342443 +4331322094 +4331322094 +4331322094 +4331322094 +4334737948 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331278207 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +43313228414 +43313228414 +43313228414 +43318430999 +4331322097 +4331322097 +4334737948 +4333342443 +4333342443 +4333342443 +4333342443 +4333342443 +4331192942 +4331192942 +4331192942 +43316413006 +43318430999 +43318430999 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43311540800 +43311540800 +43311540800 +4333342443 +4333342443 +4333342443 +43318430999 +43318430999 +4331278207 +43720832202 +43720832202 +43311540800 +43311540800 +4331322097 +43311540800 +43311540800 +43311540800 +4331278207 +43311540800 +4331192942 +43311540800 +43311540800 +43313228400 +43313228400 +43313228400 +43313228400 +4331322097 +4331322097 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +4331278207 +43311540800 +43311540800 +4331278207 +43311540800 +43720832202 +43720832202 +43720832202 +43311540800 +43720832202 +43720832202 +43720832202 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +4331278207 +43720832217 +43720832217 +43311540800 +43312720527 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +4331192942 +4331278207 +4331192942 +4331192942 +4331192942 +4331192942 +4331192942 +43720832217 +43311540800 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +4331278207 +43311540800 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43720832217 +43318430999 +43318430999 +43720832202 +4331322097 +43311540800 +4334737948 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +4334737948 +4334737948 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43313338707 +4331278207 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +4331192942 +43313228400 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +4331192942 +43720832217 +43318430999 +43311540800 +43313228400 +43720832217 +43720832217 +43720832217 +43318430999 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322094 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +4331278207 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +4334737948 +43720832217 +4334737948 +4334737948 +43720832217 +4331322097 +4331322097 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43313228400 +43720832217 +43311540800 +4331322097 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +4331322097 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +4331322097 +43720832217 +4331322097 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43316413006 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720666555 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +4331278207 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +4331278207 +4331278207 +4331192942 +4331322094 +43311540800 +43720832217 +43311540800 +43720832217 +4331278207 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43318430999 +4331322094 +43720832217 +4331322094 +4331322094 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4334737948 +4331322094 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331322097 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43313338707 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +4331322094 +43720832217 +43720832217 +43720832217 +43316413006 +4331322094 +43311540800 +4331322094 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43720832217 +43311540800 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43720832217 +43313330089 +4331322097 +43720832217 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +43311540800 +433152255410 +433152255410 +433152255410 +4331192942 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +433152255410 +43720832217 +43311540800 +43311540800 +43311540800 +43318430999 +4334737948 +4331322094 +4331322094 +4331322094 +4331322094 +4331322094 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +43311540800 +43313228414 +43313228414 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331322094 +43315829429 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43318430999 +43315829429 +43720832202 +43313228428 +4331322094 +43311540800 +4331322094 +43311540800 +43311540800 +43313228400 +43313228428 +4334737948 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331278207 +43311540800 +4331322094 +4331322094 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322094 +43313330089 +43313330089 +43313330089 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43312720527 +43311540800 +4331322094 +43720832217 +43720832217 +43720832217 +4331322097 +4331322094 +4331322094 +43312720527 +43313228428 +4331278207 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43313228400 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43720832202 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +4331192942 +43318430999 +43311540800 +43313228400 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43311540800 +43313228428 +43313228400 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +4331322094 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43313228428 +4331278207 +43311540800 +4331278207 +4331322094 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +4331192942 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43311540800 +43313330089 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +4331322094 +43313228428 +43318430999 +43318430999 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331322094 +43313228428 +4331322094 +43311540800 +43311540800 +43720832217 +43720832217 +43313228414 +43720832217 +43720832217 +43720832217 +43313228414 +43720832217 +43313228428 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331322097 +43313228428 +43313228428 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +433159258910 +43313228428 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +4331192942 +43311540800 +43720832217 +43316413006 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43720832217 +43313330089 +43313330089 +43313228428 +43720832217 +43313228428 +43311540800 +43313228428 +43313228428 +43720832217 +4331278207 +4331278207 +43720832217 +43720832217 +43720832217 +4334737948 +43720832217 +43720832217 +43720832217 +43313228428 +4331322094 +43720832217 +43311540800 +43313228428 +43313228428 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43313228428 +43313228428 +43311540800 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43720832217 +4331278207 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +4331192942 +43318430999 +4331641220846 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +43318430999 +43313228414 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4331322097 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43313228428 +4331278207 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +4331192942 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +4331278207 +43720832217 +43311540800 +43720832217 +43311540800 +43313228428 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43313228414 +4334737948 +4333342423 +4331192942 +4331192942 +43313228400 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322097 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +4331322094 +4331322094 +43313228414 +43313228414 +4331322094 +4331322094 +4331322094 +4331322094 +4331322097 +4331192942 +43313330089 +43313330089 +43313330089 +4331322094 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +4331322094 +43313330089 +43313330089 +43313330089 +43313330089 +43313228428 +43311540800 +43313228428 +43720666555 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331278207 +43311540800 +43313228400 +43311540800 +43311540800 +4331192942 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313228428 +43311540800 +43720832217 +4333342443 +4333342443 +4333342443 +4333342443 +43720832217 +43720832217 +43313228428 +43313228414 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43313228428 +43313228428 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43316413006 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311236300 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43312720527 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43313338707 +43313228428 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +4331192942 +43313228428 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43313228428 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +4331192942 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313338707 +43311540800 +43313228400 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +4334737948 +4331322094 +43313228428 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +4331278207 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43316413006 +4334737948 +43313228428 +43720832217 +43313228428 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +4334737948 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +4331192942 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43311540800 +43313228428 +43311540800 +43311540800 +43313228400 +43313228428 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43720832217 +43720832217 +4331322097 +4331322097 +4331322097 +4331322094 +43313228428 +43313228428 +43313228428 +43311540800 +4331278207 +4331322097 +43311540800 +43313228428 +4331322097 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +4331322097 +43313228428 +43313228428 +43720832217 +43720832217 +43313228428 +43311540800 +43720832217 +43313228428 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43720832217 +4331322094 +43720832217 +43313228428 +43313228428 +4331322094 +43313228428 +43720832217 +4331322094 +43720832217 +43313228428 +43313228428 +43313228428 +4331322097 +43720832217 +43720832217 +43720832217 +4331278207 +43313338707 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43313330089 +43720832217 +43313330089 +4331278207 +43313330089 +43720832217 +43313228400 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313228428 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43720832217 +43720832217 +43720832217 +4331192942 +43313330089 +43720832217 +43313330089 +43313330089 +43720832217 +43720832217 +43720832217 +43313330089 +43313228428 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313330089 +43313330089 +43313330089 +43311540800 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43313330089 +43720832217 +43313330089 +43313228428 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43311540800 +43313338707 +43313338707 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228414 +43311540800 +4331278207 +43311540800 +43313228428 +43313228414 +43313228428 +43313228428 +43313228414 +43313228428 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228414 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43318372223 +43311540800 +43720832217 +43720832217 +43720832217 +4331278207 +43313228428 +43720832217 +4331278207 +43311540800 +43720832217 +43720832217 +43311540800 +4331278207 +43311540800 +43720832217 +43311540800 +4331278207 +4331278207 +4331278207 +4331278207 +4331278207 +4331322094 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +4331192942 +43720832217 +43720832217 +43316413006 +4331278207 +43720832217 +43318430999 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43311540800 +4334737948 +43313228414 +43311540800 +43313228414 +43313228414 +43313228414 +43313228414 +43313228414 +4331322097 +43313228414 +4331192942 +43313228414 +43318430999 +43318430999 +43318430999 +43318430999 +43313228414 +4331322097 +4331322097 +43318430999 +4331322097 +4331192942 +4331322097 +4331322097 +43311540800 +43313228414 +4331278207 +4331278207 +4334737948 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228400 +43311540800 +43311540800 +43311540800 +43311540800 +43720832202 +43720832202 +43311540800 +43720832202 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43313228414 +43313228414 +43313228414 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720666555 +43311540800 +43720832217 +43311540800 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43720832202 +43311540800 +43311540800 +43720832217 +43720832202 +43311540800 +43720832202 +43311540800 +43313228428 +43720832217 +43313228428 +43313228428 +43311540800 +43720832217 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43313338707 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43311540800 +43720832217 +43311540800 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +4331192942 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +4331192942 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43313228400 +43720832217 +43720832217 +43720832217 +43720832217 +4331322097 +4331322097 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +43311540800 +43720832217 +4331322097 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43720832217 +43720832217 +4331322097 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43313228428 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43313228428 +43720832217 +43313228428 +43313228428 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43720832217 +43311540800 +433159258910 +43311540800 +43311540800 +43311540800 +43313228428 +4331192942 +43313228428 +43313228428 +43311540800 +43720832217 +43313228414 +43313228414 +43311236300 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228428 +43313228428 +43720832217 +43311540800 +43720832217 +43720832217 +43311540800 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43313228400 +43313228428 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43313228428 +4331322097 +43313228428 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +43311540800 +43311540800 +43720666555 +43313228428 +43720666555 +4331192942 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43313228414 +4333342443 +4333342443 +4333342443 +4333342443 +4331322097 +4334737948 +43313228428 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +4331278207 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43313228428 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43720832217 +43720832217 +43720832217 +43311540800 +43720832217 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43720832217 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43720832217 +43720832217 +43313228428 +43720832217 +43720832217 +43720666555 +43720832217 +43311540800 +43311540800 +43311540800 +43720832217 +43720832217 +4331192942 +43311540800 +43720832217 +4331192942 +4331192942 +4331192942 +43313228428 +4331192942 +4331192942 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43720832217 +43313228428 +43311540800 +43318430999 +43318430999 +4334737948 +4331192942 +43315829429 +4331192942 +4331322094 +4331322097 +43318430999 +4331192942 +4331192735 +4333342443 +4333342443 +4333342443 +43313228428 +43313228414 +43313228414 +43311540800 +43311540800 +43311540800 +43313228414 +43311540800 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43313228428 +43313228428 +43311540800 +43313228428 +43313228428 +43313228428 +43313228428 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43313228428 +43313228400 +43311540800 +43311540800 +43313228428 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +43311540800 +4331192942 +43311540800 +43311540800 +43313330089 +43313330089 +4333342443 +4333342443 From 200af4802a62025e0bd0f356ec5cdef2e2226c8d Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Sat, 6 Jul 2024 18:37:40 +0200 Subject: [PATCH 2/2] WIP Voicenumber Billing 2024-07-05 --- Layout/default/Contractconfig/Form.php | 17 +- .../Admin/functions/IvtContractImport.php | 83 +++++++- .../Admin/functions/IvtCreditImport.php | 2 + application/Billing/BillingController.php | 179 +++++++++++++++- .../BillingVoicenumberModel.php | 191 +++--------------- application/Contract/Contract.php | 16 +- application/Contract/ContractModel.php | 2 +- .../VoiceCallHistoryController.php | 24 ++- .../VoiceCallHistoryModel.php | 4 +- application/Voicenumber/VoicenumberModel.php | 9 +- application/Voiceplan/Voiceplan.php | 33 ++- .../Voiceplandestination.php | 24 ++- .../VoiceplandestinationModel.php | 14 +- application/Voiceplanzone/Voiceplanzone.php | 24 ++- .../20240620160026_create_billing.php | 2 +- ...40704170016_create_billing_voicenumber.php | 13 +- 16 files changed, 417 insertions(+), 220 deletions(-) diff --git a/Layout/default/Contractconfig/Form.php b/Layout/default/Contractconfig/Form.php index 77f3dc988..ad575bd7e 100644 --- a/Layout/default/Contractconfig/Form.php +++ b/Layout/default/Contractconfig/Form.php @@ -76,8 +76,23 @@ } $inputid = "itemvalues_".$item->id; $array_count = 0; + ?> - multiple): ?> + + name == "voicenumberblock_voiceplan_id"): ?> + + displayname?>: + + + description?> + + + multiple): ?> getValue() as $item_value): ?> displayname?> (): diff --git a/application/Admin/functions/IvtContractImport.php b/application/Admin/functions/IvtContractImport.php index 7230ab5d0..5bd14a773 100644 --- a/application/Admin/functions/IvtContractImport.php +++ b/application/Admin/functions/IvtContractImport.php @@ -6,6 +6,12 @@ class Admin_IvtContractImport { private $static_ivt_order_match = []; private $no_matchcode = []; private $ownerIdToBillingAddress = []; + private $ivt_to_voiceplan = [ + 1 => 1, // Ivt Standard + 2 => 4, // Ivt Privat Plus + 3 => 3, // Ivt Business Easy + 4 => 1 // ESIT Partner Tarif + ]; public function __construct($request = false) { $this->request = $request; @@ -185,6 +191,7 @@ class Admin_IvtContractImport { $contract_data['billingaddress_id'] = $billingaddress_id; $contract_data['product_id'] = $product->id; $contract_data['product_name'] = $ip->name; + $contract_data['vatgroup_id'] = $product->vatgroup_id; $contract_data['amount'] = 1; $contract_data['price'] = $ivt_product->price; $contract_data['price_setup'] = 0; @@ -853,10 +860,10 @@ class Admin_IvtContractImport { private function addVoipData($ivt_customer_id, $contracts) { //$this->log->debug("in addVoipData(): cid ".$ivt_customer_id); - if($ivt_customer_id == 1376) { + /*if($ivt_customer_id == 1376) { $this->log->debug("Not importing reseller voicenumbers for PROMETHEUS - Markus Paar [1376]"); return true; - } + }*/ $ported_in = []; $voicenumbers = []; @@ -867,7 +874,19 @@ class Admin_IvtContractImport { return false; } $this->log->debug("$ivt_num_count voicenumbers in ivt for cid ".$ivt_customer_id); - foreach(IvtCustomerTelephoneNrModel::search(["cid" => $ivt_customer_id]) as $ivtnum) { + $ivtnumbers = IvtCustomerTelephoneNrModel::search(["cid" => $ivt_customer_id]); + + if($ivt_customer_id == 1840) { + $injecting_ivtnumber = new IvtCustomerTelephoneNr(); + $injecting_ivtnumber->number = "433152255410"; + $ivtnumbers[] = $injecting_ivtnumber; + + $injecting_ivtnumber = new IvtCustomerTelephoneNr(); + $injecting_ivtnumber->number = "433159258910"; + $ivtnumbers[] = $injecting_ivtnumber; + } + + foreach($ivtnumbers as $ivtnum) { $number = preg_replace('/^0043/', '43', $ivtnum->number); if(!$number) continue; @@ -895,22 +914,35 @@ class Admin_IvtContractImport { $voice_contract = false; + // always create new voice contract for special customers + $new_nolink_contract = false; if($ivt_customer_id == 1376) { + $new_nolink_contract = true; + /*echo "is PROMETHEUS number\n"; //if(in_array($number, [43313228451, 43313228406, 43720666572, 43313228400, 4331324890, 43720103806])) { $prometheus_primary_contract = ContractModel::getFirst(["customer_number" => 1376]); - $voice_contract = $this->createVoiceContract($prometheus_primary_contract, true); - } else { - foreach($contracts as $contract) { - if(array_key_exists("needs_number", $contract->product->attributes) && $contract->product->attributes["needs_number"] == 1) { + $voice_contract = $this->createVoiceContract($contracts, true);*/ + } elseif($ivt_customer_id == 1840) { + $new_nolink_contract = true; + /*//if(in_array($number, [433152255410, 433159258910])) { + $lugitsch_primary_contract = ContractModel::getFirst(["customer_number" => 1840]); + $voice_contract = $this->createVoiceContract($contracts, true);*/ + } + + if(!$new_nolink_contract) { + // try finding voice contract, otherwise create it + foreach ($contracts as $contract) { + if (array_key_exists("needs_number", $contract->product->attributes) && $contract->product->attributes["needs_number"] == 1) { $voice_contract = $contract; } } - - if(!$voice_contract) { - $voice_contract = $this->createVoiceContract($contracts); - } } + if(!$voice_contract) { + $voice_contract = $this->createVoiceContract($contracts, $new_nolink_contract); + } + + //var_dump($voice_contract);exit; @@ -971,6 +1003,9 @@ class Admin_IvtContractImport { $confitem->value->set($contract_new_numbers); $confitem->save(); + // import Voiceplan + $this->getVoiceplan($voice_contract); + $voice_contract->matchcode = implode(", ", $contract_matchcode_numbers); $voice_contract->save(); @@ -980,6 +1015,31 @@ class Admin_IvtContractImport { return true; } + /** + * @var Contract $contract + */ + private function getVoiceplan($contract) { + $cid = $contract->owner->customer_number; + $ivt_customer = new IvtCustomer($cid); + if(!$ivt_customer) { + die(__METHOD__.": Ivt Customer nicht gefunden\n"); + } + + $ivt_plan = $ivt_customer->telephony_pricelist; + if(!array_key_exists($ivt_plan, $this->ivt_to_voiceplan)) { + die("Invalid Ivt Voiceplan: ".$ivt_plan."\n"); + } + + $new_plan = $this->ivt_to_voiceplan[$ivt_plan]; + $contract->setConfigValue("voicenumberblock_voiceplan_id", $new_plan); + /*$voiceplan_item = $contract->getConfigValue("voicenumberblock_voiceplan_id"); + $voiceplan_item->set($new_plan); + $voiceplan_item->save(); + */ + return true; + + } + private function createVoiceContract($contracts, $nolink = false) { // find rufnummer only product (residential or business) $product = new Product(101); // Telefonie (nur Rufnummer - Privat) @@ -1010,6 +1070,7 @@ class Admin_IvtContractImport { $data["price_setup"] = $product->price_setup; $data["price_nne"] = $product->price_nne; $data["price_nbe"] = $product->price_nbe; + $data["vatgroup_id"] = $product->vatgroup_id; $data["billing_delay"] = $product->billing_delay; $data["billing_period"] = $product->billing_period; $data["order_date"] = $fc->order_date; diff --git a/application/Admin/functions/IvtCreditImport.php b/application/Admin/functions/IvtCreditImport.php index d90d05fad..e636f31eb 100644 --- a/application/Admin/functions/IvtCreditImport.php +++ b/application/Admin/functions/IvtCreditImport.php @@ -154,6 +154,7 @@ class Admin_IvtCreditImport { $data["billing_period"] = $primary_contract->billing_period; $data["contract_term"] = $primary_contract->contract_term; $data["order_date"] = $primary_contract->order_date; + $data["vatgroup_id"] = $primary_contract->product->vatgroup_id; $data["finish_date"] = $primary_contract->finish_date; $data["finish_date_by"] = $primary_contract->finish_date_by; @@ -190,6 +191,7 @@ class Admin_IvtCreditImport { $data["sla_id"] = 4; $data["product_external"] = 0; $data["product_external_id"] = null; + $data["vatgroup_id"] = 1; $data["billing_delay"] = 0; $data["billing_period"] = 1; $data["contract_term"] = 12; diff --git a/application/Billing/BillingController.php b/application/Billing/BillingController.php index 6321227c5..19fac8430 100644 --- a/application/Billing/BillingController.php +++ b/application/Billing/BillingController.php @@ -101,6 +101,7 @@ class BillingController extends mfBaseController { //$tomorrow->setTime(0,0,0); $i = 0; + $v = 0; //$yearly_not_before = new DateTime("2023-06-01"); @@ -160,10 +161,6 @@ class BillingController extends mfBaseController { $this->log->debug(__METHOD__.": Ignoring Contract ".$contract->id." because billing_period == 0"); continue; }*/ - if($contract->price == 0 && $contract->price_setup == 0) { - $this->log->debug(__METHOD__.": Ignoring Contract ".$contract->id." because price and price_setup == 0"); - continue; - } $cancel_date = false; if($contract->cancel_date) { @@ -295,6 +292,10 @@ class BillingController extends mfBaseController { } + /*if($contract->price != 0 || $contract->price_setup != 0) { + $this->log->debug(__METHOD__.": Ignoring Contract ".$contract->id." because price and price_setup == 0"); + continue; + }*/ $sday = $start_date->format("d"); $eday = $end_date->format("d"); @@ -369,7 +370,6 @@ class BillingController extends mfBaseController { $data["bank_account_owner"] = $billingaddress->bank_account_owner; $data["bank_account_iban"] = $billingaddress->bank_account_iban; $data["bank_account_bic"] = $billingaddress->bank_account_bic; - $data["matchcode"] = $contract->matchcode; $data["product_id"] = $contract->product_id; $data["product_name"] = $contract->product_name; $data["product_info"] = $contract->product_info; @@ -378,6 +378,13 @@ class BillingController extends mfBaseController { $data["price_setup"] = $price_setup; $data["billing_period"] = $contract->billing_period; + $matchcode = $contract->matchcode; + // if voice product and matchcode consists oh phonenumbers only, remove matchcode + if(array_key_exists("needs_number", $contract->product->attributes) && $contract->product->attributes["needs_number"] == 1 && preg_match('/^[0-9, ]+$]/', $matchcode)) { + $matchcode = ""; + } + $data["matchcode"] = $matchcode; + if(!$contract->billingaddress->country_id) { $billcountry = CountryModel::getFirst(["isocode" => TT_HOMECOUNTRY_ISOCODE]); } else { @@ -405,10 +412,170 @@ class BillingController extends mfBaseController { } $i++; + + /* + * Create Voice Billing, if contract has voicenumbers + */ + + + $voicenumbers = VoicenumberModel::search(["contract_id" => $contract->id]); + + + + if(count($voicenumbers)) { + //var_dump($voicenumbers);exit; + $voice_start_date = clone $start_date; + $voice_start_date->modify("-1 month"); + $voice_start_date->setTime(0,0,0); + + $voice_end_date = clone $voice_start_date; + $voice_end_date->modify("first day of this month"); + $voice_end_date->modify("+1 months"); + $voice_end_date->modify("-1 day"); + $voice_end_date->setTime(23,59,59); + $this->log->debug("Voice End Date: ".$voice_end_date->format("Y-m-d H:i:s")); + $earliest_start_date = $start_date; + + $voicebills = []; + $zones = []; + $destinations_cache = []; + + $voiceplan_id = $contract->getConfigValue("voicenumberblock_voiceplan_id")->int; + + if (!$voiceplan_id) { + $this->log->debug(__METHOD__ . ": No voiceplan_id in Contract " . $contract->id. ". Numbers: ".count($voicenumbers)); + continue; + } + $voiceplan = new Voiceplan($voiceplan_id); + + + // always look for whole month + // numbers usually don't change owner without at least a few months being stale + if($voice_start_date->format("d") > 1) { + $voice_start_date->modify("first day of this month"); + } + + foreach ($voicenumbers as $voicenumber) { + $vbill = BillingVoicenumberModel::getFirst(["contract_id" => $contract->id, "voicenumber" => $voicenumber->number, "start_date" => $voice_start_date->format("Y-m-d")]); + + if ($vbill) { + //var_dump($vbill);exit; + continue; // number was already billed in this period + } + $calls = VoiceCallHistoryModel::getVoiceCallHistoryAsEntity(["contract_id" => $contract->id, "start" => ["from" => $voice_start_date->getTimestamp(), "to" => $voice_end_date->getTimestamp()]]); + foreach ($calls as $call) { + //var_dump($call); + $number = $call->voice_account; + $dest_nummer = $call->destination; + + if (array_key_exists($dest_nummer, $destinations_cache)) { + $destination = $destinations_cache[$dest_nummer]; + } else { + $destination = $voiceplan->getDestinationByNumber($dest_nummer); + $destinations_cache[$dest_nummer] = $destination; + } + //var_dump($destination); + + $zone = $destination->voiceplanzone; + + //var_dump($zone); + + // inc_first - first minimumm duration to bill + // inc - subsequent minimum duration to bill + $inc_first = $zone->increment_first; + $inc = $zone->increment; + + $billable_duration = $call->duration; + if($billable_duration <= 0) continue; + + // calculate price of first duration unit + // then subtract first minimum duration from duration + $sec_price = $zone->price / 60; + $call_price = $inc_first * $sec_price; + $billable_duration -= $inc_first; + + // calculate price of remaining duration and make sure to bill in full duration units + if($billable_duration > 0) { + $multi = ceil($billable_duration / $inc); + $call_price += ($multi * $inc) * $sec_price; + } + + if (!array_key_exists($number, $voicebills)) { + $voicebills[$number] = []; + } + if (!array_key_exists($zone->id, $voicebills[$number])) { + $voicebills[$number][$zone->id] = [ + "zone_name" => $zone->name, + "voiceplan" => $voiceplan->name, + "duration" => 0, + "price" => $sec_price, + "zone_total" => 0, + "increment_first" => $zone->increment_first, + "increment" => $zone->increment, + "count" => 0 + ]; + } + + $voicebills[$number][$zone->id]["count"]++; + $voicebills[$number][$zone->id]["zone_total"] += $call_price; + $voicebills[$number][$zone->id]["duration"] += $call->duration; + } + if(!count($voicebills)) { + continue; + } + //var_dump($voicebills);exit; + + foreach($voicebills as $vbnumber => $zones) { + foreach($zones as $zone_id => $vb) { + $vbdata = []; + $vbdata["billing_id"] = $billing->id; + $vbdata["contract_id"] = $contract->id; + $vbdata["voicenumber"] = $vbnumber; + $vbdata["start_date"] = $voice_start_date->format("Y-m-d"); + $vbdata["end_date"] = $voice_end_date->format("Y-m-d"); + $vbdata["voiceplan"] = $vb["voiceplan"]; + $vbdata["zone"] = $vb["zone_name"]; + $vbdata["call_count"] = $vb["count"]; + $vbdata["duration"] = $vb["duration"]; + $vbdata["price"] = $vb["price"]; + $vbdata["price_total"] = $vb["zone_total"]; + $vbdata["increment"] = $vb["increment"]; + $vbdata["increment_first"] = $vb["increment_first"]; + + $bill_voice = BillingVoicenumberModel::create($vbdata); + if(!$bill_voice->save()) { + var_dump($vbdata); + die("Error saving Billing Voicenumber!"); + } + } + } + $v++; + + // save to BillingVoicenumber + + + + + } + + } + + + /*foreach(VoiceCallHistoryModel::getVoiceCallHistoryAsEntity(["contract_id" => $contract->id, "start" => ["from" => $start_date->getTimestamp()]]) as $call) { + // find BillingVoicenumber record for this call + $vbill = BillingVoicenumberModel::getFirst(["contract_id" => $contract->id, "voicenumber" => $call->voice_account, "start_date" => ]); + if($vbill) { + + } + }*/ } + + + + } - $this->layout()->setFlash("$i Billing records generiert"); + $this->layout()->setFlash("$i Contract Billing records generiert. $v Voicenumber Billing records generiert"); $this->redirect("Billing"); } diff --git a/application/BillingVoicenumber/BillingVoicenumberModel.php b/application/BillingVoicenumber/BillingVoicenumberModel.php index ccbc226f2..0d155f480 100644 --- a/application/BillingVoicenumber/BillingVoicenumberModel.php +++ b/application/BillingVoicenumber/BillingVoicenumberModel.php @@ -1,10 +1,21 @@ select("BillingVoicenumber", "*", "1 = 1 ORDER BY BillingVoicenumberaddress_id"); + $res = $db->select("BillingVoicenumber", "*", "1 = 1 ORDER BY id"); if($db->num_rows($res)) { while($data = $db->fetch_object($res)) { $items[] = new BillingVoicenumber($data); @@ -55,7 +66,7 @@ class BillingVoicenumberModel { $where = self::getSqlFilter($filter); $sql = "SELECT * FROM BillingVoicenumber WHERE $where - ORDER BY BillingVoicenumberaddress_id LIMIT 1"; + ORDER BY id LIMIT 1"; //var_dump($sql);exit; $res = $db->query($sql); if($db->num_rows($res)) { @@ -91,31 +102,6 @@ class BillingVoicenumberModel { return null; } - public static function getInvoiceBaseData($filter) { - $db = FronkDB::singleton(); - - $items = []; - - $where = self::getSqlFilter($filter); - $sql = "SELECT owner_id, BillingVoicenumberaddress_id, BillingVoicenumber_type, BillingVoicenumber_delivery FROM BillingVoicenumber - WHERE $where - GROUP BY owner_id, BillingVoicenumberaddress_id, BillingVoicenumber_type, BillingVoicenumber_delivery - ORDER BY owner_id, BillingVoicenumberaddress_id, BillingVoicenumber_type, BillingVoicenumber_delivery"; - //var_dump($sql);exit; - $res = $db->query($sql); - if($db->num_rows($res)) { - while($data = $db->fetch_object($res)) { - $items[] = [ - "owner_id" => $data->owner_id, - "BillingVoicenumberaddress_id" => $data->BillingVoicenumberaddress_id, - "BillingVoicenumber_type" => $data->BillingVoicenumber_type, - "BillingVoicenumber_delivery" => $data->BillingVoicenumber_delivery - ]; - } - } - return $items; - } - public static function count($filter) { $db = FronkDB::singleton(); @@ -191,14 +177,15 @@ class BillingVoicenumberModel { } } - if(array_key_exists("invoice_id", $filter)) { - $invoice_id = $filter['invoice_id']; - if(is_numeric($invoice_id)) { - $where .= " AND BillingVoicenumber.invoice_id=$invoice_id"; - } elseif($invoice_id === null || $invoice_id === false) { - $where .= " AND (BillingVoicenumber.invoice_id IS NULL OR BillingVoicenumber.invoice_id=0)"; + if(array_key_exists("billing_id", $filter)) { + $billing_id = $filter['billing_id']; + if(is_numeric($billing_id)) { + $where .= " AND BillingVoicenumber.billing_id=$billing_id"; + } elseif($billing_id === null || $billing_id === false) { + $where .= " AND (BillingVoicenumber.billing_id IS NULL OR BillingVoicenumber.billing_id=0)"; } } + if(array_key_exists("contract_id", $filter)) { $contract_id = $filter['contract_id']; @@ -207,6 +194,14 @@ class BillingVoicenumberModel { } } + if(array_key_exists("voicenumber", $filter)) { + $voicenumber = FronkDB::singleton()->escape($filter['voicenumber']); + if($voicenumber) { + $where .= " AND BillingVoicenumber.voicenumber='$voicenumber'"; + } + } + + if(array_key_exists("start_date", $filter)) { $start_date = FronkDB::singleton()->escape($filter['start_date']); if($start_date) { @@ -249,136 +244,8 @@ class BillingVoicenumberModel { } } - if(array_key_exists("BillingVoicenumberaddress_id", $filter)) { - $BillingVoicenumberaddress_id = $filter['BillingVoicenumberaddress_id']; - if(is_numeric($BillingVoicenumberaddress_id)) { - $where .= " AND BillingVoicenumber.BillingVoicenumberaddress_id=$BillingVoicenumberaddress_id"; - } - } - if(array_key_exists("customer_number", $filter)) { - $customer_number = $filter['customer_number']; - if(is_numeric($customer_number)) { - $where .= " AND BillingVoicenumber.customer_number LIKE $customer_number"; - } - } - if (array_key_exists("company", $filter)) { - $company = FronkDB::singleton()->escape($filter["company"]); - if ($company) { - $where .= " AND company like '%$company%'"; - } - } - - if (array_key_exists("firstname", $filter)) { - $firstname = FronkDB::singleton()->escape($filter["firstname"]); - if ($firstname) { - $where .= " AND firstname like '%$firstname%'"; - } - } - - if (array_key_exists("lastname", $filter)) { - $lastname = FronkDB::singleton()->escape($filter["lastname"]); - if ($lastname) { - $where .= " AND lastname like '%$lastname%'"; - } - } - - if (array_key_exists("mergedName", $filter)) { - $name = FronkDB::singleton()->escape($filter["mergedName"]); - if ($name) { - $where .= " AND (CONCAT(firstname, ' ', lastname) like '%$name%' OR CONCAT(lastname, ' ', firstname) like '%$name%' )"; - } - } - - if (array_key_exists("street", $filter)) { - $street = FronkDB::singleton()->escape($filter["street"]); - if ($street) { - $where .= " AND street like '%$street%'"; - } - } - - if (array_key_exists("zip", $filter)) { - $zip = FronkDB::singleton()->escape($filter["zip"]); - if ($zip) { - $where .= " AND zip like '%$zip%'"; - } - } - - if (array_key_exists("city", $filter)) { - $city = FronkDB::singleton()->escape($filter["city"]); - if ($city) { - $where .= " AND city like '%$city%'"; - } - } - - if (array_key_exists("country", $filter)) { - $country = FronkDB::singleton()->escape($filter["country"]); - if ($country) { - $where .= " AND country like '%$country%'"; - } - } - - if (array_key_exists("email", $filter)) { - $email = FronkDB::singleton()->escape($filter["email"]); - if ($email) { - $where .= " AND email like '%$email%'"; - } - } - - if(array_key_exists("matchcode", $filter)) { - $matchcode = FronkDB::singleton()->escape($filter["matchcode"]); - if($matchcode) { - $where .= " AND matchcode like '%$matchcode%'"; - } - } - - if(array_key_exists("product_id", $filter)) { - $product_id = $filter['product_id']; - if(is_numeric($product_id)) { - $where .= " AND BillingVoicenumber.product_id=$product_id"; - } - } - - if(array_key_exists("product_name", $filter)) { - $product_name = $db->escape($filter['product_name']); - if($product_name) { - $where .= " AND product_name like '%$product_name%')"; - } - } - - if(array_key_exists("matchcode", $filter)) { - $matchcode = $db->escape($filter['matchcode']); - if($matchcode) { - $where .= " AND BillingVoicenumber.`matchcode` like '%$matchcode%'"; - } - } - - if(array_key_exists("price<", $filter)) { - $price = $filter['price<']; - if(is_numeric($price)) { - $where .= " AND BillingVoicenumber.price < $price"; - } - } - if(array_key_exists("price<=", $filter)) { - $price = $filter['price<=']; - if(is_numeric($price)) { - $where .= " AND BillingVoicenumber.price <= $price"; - } - } - - if(array_key_exists("price>", $filter)) { - $price = $filter['price>']; - if(is_numeric($price)) { - $where .= " AND BillingVoicenumber.price > $price"; - } - } - if(array_key_exists("price>=", $filter)) { - $price = $filter['price>=']; - if(is_numeric($price)) { - $where .= " AND BillingVoicenumber.price >= $price"; - } - } if(array_key_exists("add-where", $filter)) { $where .= " ".$filter['add-where']; diff --git a/application/Contract/Contract.php b/application/Contract/Contract.php index 9736f4053..2d0eb89ad 100644 --- a/application/Contract/Contract.php +++ b/application/Contract/Contract.php @@ -200,8 +200,20 @@ class Contract extends mfBaseModel { if(!$configvalues) return null; if(!array_key_exists($itemname, $configvalues)) return null; - $confitem = $configvalues[$itemname]; - return $confitem->value; + $configitem = $configvalues[$itemname]; + return $configitem->value; + } + + public function setConfigValue($itemname, $value) { + $configvalues = $this->getProperty("configvalues"); + if(!$configvalues) return null; + if(!array_key_exists($itemname, $configvalues)) return null; + + $configitem = $configvalues[$itemname]; + + $configitem->value->set($value); + $configitem->value->save(); + return true; } public function getProperty($name) { diff --git a/application/Contract/ContractModel.php b/application/Contract/ContractModel.php index 300fd5ef1..3862ba2e5 100644 --- a/application/Contract/ContractModel.php +++ b/application/Contract/ContractModel.php @@ -15,7 +15,7 @@ class ContractModel { public $product_external_id; public $price = null; public $price_setup = null; - public $vatrate = null; + public $vatgroup_id = null; public $price_nne = null; public $price_nbe = null; public $billing_delay = null; diff --git a/application/VoiceCallHistory/VoiceCallHistoryController.php b/application/VoiceCallHistory/VoiceCallHistoryController.php index 96d38c093..5669c6199 100644 --- a/application/VoiceCallHistory/VoiceCallHistoryController.php +++ b/application/VoiceCallHistory/VoiceCallHistoryController.php @@ -108,15 +108,23 @@ class VoiceCallHistoryController extends mfBaseController { } public function addContractIds() { + $ignore_numbers = [ + "4331641220846", + "43623237705", + "4367761737195" + ]; $unknown_numbers = []; // get calls without contract id - foreach(VoiceCallHistoryModel::getVoiceCallHistoryAsEntity(["contract_id" => null, "billable" => "1", "duration" => ["from" => 1], "end" => "2024-06-01"]) as $call) { + foreach(VoiceCallHistoryModel::getVoiceCallHistoryAsEntity(["contract_id" => null, "billable" => "1", "duration" => ["from" => 1]]) as $call) { //var_dump($call);exit; //echo "\n"; $number = $call->voice_account; if(!$number) continue; + // server side failed/disconnected calls + if($call->duration == 1 && $call->state == 38) continue; + if(in_array($number, $unknown_numbers)) continue; $voicenumber = VoicenumberModel::getFirst(["number" => $number]); @@ -132,12 +140,24 @@ class VoiceCallHistoryController extends mfBaseController { continue; } + $contract = new Contract($voicenumber->contract_id); + if(!$contract) { + $this->log->debug(__METHOD__.": No Contract with Contract_ID ".$voicenumber->contract_id." in Voicenumber ".$voicenumber->number); + continue; + } + + if($contract->isCancelled()) { + // mail an office + $this->log->warning(__METHOD__.": Contract ".$voicenumber->contract_id." for Voicenumber ".$voicenumber->number." is cancelled!"); + } + + $calldate = new DateTime($call->start); $calldate->setTimezone(new DateTimeZone("Europe/Vienna")); - $contract = $voicenumber->contract; + // calls from before first IVT Import must be right, we don't have historic contract data diff --git a/application/VoiceCallHistory/VoiceCallHistoryModel.php b/application/VoiceCallHistory/VoiceCallHistoryModel.php index d5c48caee..399e33a99 100644 --- a/application/VoiceCallHistory/VoiceCallHistoryModel.php +++ b/application/VoiceCallHistory/VoiceCallHistoryModel.php @@ -110,7 +110,7 @@ class VoiceCallHistoryModel { $sql .= isset($filters['destination']) ? Helper::generateFilterCondition($filters['destination'], "destination") : ""; $sql .= isset($filters['billable']) ? Helper::generateFilterCondition($filters['billable'], "billable") : ""; $sql .= isset($filters['duration']) ? Helper::generateFilterCondition($filters['duration'], "duration") : ""; - $sql .= array_key_exists("contract_id", $filters) ? Helper::generateFilterCondition($filters['contract_id'], "contract_id") : ""; + $sql .= array_key_exists("contract_id", $filters) ? Helper::generateFilterCondition($filters['contract_id'], "contract_id", true) : ""; return $sql; } @@ -138,7 +138,7 @@ class VoiceCallHistoryModel { $sql .= $order === null || $order['key'] === null ? " ORDER BY `start` DESC" : " ORDER BY `" . $order['key'] . "` " . $order['order']; $sql .= $limit === null ? "" : " LIMIT " . $limit . " OFFSET " . $offset; - //mfLoghandler::singleton()->debug($sql);exit; + mfLoghandler::singleton()->debug($sql); // die($sql); $result = $db->query($sql); $rows = []; diff --git a/application/Voicenumber/VoicenumberModel.php b/application/Voicenumber/VoicenumberModel.php index 97555b4e3..28da70fb8 100644 --- a/application/Voicenumber/VoicenumberModel.php +++ b/application/Voicenumber/VoicenumberModel.php @@ -109,7 +109,7 @@ class VoicenumberModel { if(is_array($limit) && count($limit)) { if(is_numeric($limit['start']) && is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['start'].", ".$limit['count']; - } elseif(is_numeric($count)) { + } elseif(is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['count']; } } @@ -144,6 +144,13 @@ class VoicenumberModel { $where .= " AND voicenumberblock_id = $block_id"; } } + + if(array_key_exists("contract_id", $filter)) { + $contract_id = $filter['contract_id']; + if(is_numeric($contract_id)) { + $where .= " AND contract_id = $contract_id"; + } + } //var_dump($filter);exit; if(array_key_exists("countrycode", $filter)) { diff --git a/application/Voiceplan/Voiceplan.php b/application/Voiceplan/Voiceplan.php index 7b8cd0f27..7da3fd94b 100644 --- a/application/Voiceplan/Voiceplan.php +++ b/application/Voiceplan/Voiceplan.php @@ -8,7 +8,36 @@ class Voiceplan extends mfBaseModel { private $destinations; public $import_errors; - + + + public function getDestinationByNumber($number) { + if(!$number) return false; + + $prefix = $number; + + while(strlen($prefix)) { + $destination = VoiceplandestinationModel::getFirst(["prefix" => $prefix, "voiceplan_id" => $this->id]); + if($destination) { + break; + } + $prefix = substr($prefix, 0, strlen($prefix) - 1); + } + + if(!$destination) return false; + + return $destination; + } + public function getZoneByNumber($number) { + if(!$number) return false; + + $destination = $this->getDestinationByNumber($number); + if(!$destination) return false; + + return $destination->voiceplanzone; + + + } + public function importDestinationsFromCsv(File $file) { if(!$this->id) { return false; @@ -169,7 +198,7 @@ class Voiceplan extends mfBaseModel { return true; } - + public function getProperty($name) { if($this->$name == null) { diff --git a/application/Voiceplandestination/Voiceplandestination.php b/application/Voiceplandestination/Voiceplandestination.php index d140c6367..6bf20ae74 100644 --- a/application/Voiceplandestination/Voiceplandestination.php +++ b/application/Voiceplandestination/Voiceplandestination.php @@ -23,16 +23,20 @@ class Voiceplandestination extends mfBaseModel { } return $this->voiceplan; } - - $classname = ucfirst($name); - $idfield = $name."_id"; - $this->$name = new $classname($this->$idfield); - - if($this->$name->id) { - return $this->$name; - } else { - return null; - } + + $classname = ucfirst($name); + $idfield = $name."_id"; + $this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield); + if(!$this->$name) { + $this->$name = new $classname($this->$idfield); + } + + if($this->$name->id) { + mfValuecache::singleton()->set("mfObjectmodel-$name-".$this->$name->id, $this->$name); + return $this->$name; + } else { + return null; + } } return $this->$name; diff --git a/application/Voiceplandestination/VoiceplandestinationModel.php b/application/Voiceplandestination/VoiceplandestinationModel.php index fe9b88164..c1f5f0b47 100644 --- a/application/Voiceplandestination/VoiceplandestinationModel.php +++ b/application/Voiceplandestination/VoiceplandestinationModel.php @@ -52,8 +52,16 @@ class VoiceplandestinationModel { $db = FronkDB::singleton(); $where = self::getSqlFilter($filter); - mfLoghandler::singleton()->debug($where); - $res = $db->select("Voiceplandestination", "*", "$where ORDER BY destination,prefix"); + + $sql = "SELECT * FROM Voiceplandestination WHERE $where ORDER BY destination,prefix"; + $sql = "SELECT Voiceplandestination.* FROM Voiceplandestination + LEFT JOIN Voiceplanzone ON (Voiceplanzone.id = Voiceplandestination.voiceplanzone_id) + WHERE $where + ORDER BY destination,prefix LIMIT 1 + "; + mfLoghandler::singleton()->debug($sql); + $res = $db->query($sql); + //$res = $db->select("Voiceplandestination", "*", "$where ORDER BY destination,prefix"); if($db->num_rows($res)) { $data = $db->fetch_object($res); $item = new Voiceplandestination($data); @@ -99,7 +107,7 @@ class VoiceplandestinationModel { if(is_array($limit) && count($limit)) { if(is_numeric($limit['start']) && is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['start'].", ".$limit['count']; - } elseif(is_numeric($count)) { + } elseif(is_numeric($limit['count'])) { $sql .= " LIMIT ".$limit['count']; } } diff --git a/application/Voiceplanzone/Voiceplanzone.php b/application/Voiceplanzone/Voiceplanzone.php index 193cfc8da..4c209d701 100644 --- a/application/Voiceplanzone/Voiceplanzone.php +++ b/application/Voiceplanzone/Voiceplanzone.php @@ -25,16 +25,20 @@ class Voiceplanzone extends mfBaseModel { $this->destinations = VoiceplandestinationModel::search(["voiceplanzone_id" => $this->id]); return $this->destinations; } - - $classname = ucfirst($name); - $idfield = $name."_id"; - $this->$name = new $classname($this->$idfield); - - if($this->$name->id) { - return $this->$name; - } else { - return null; - } + + $classname = ucfirst($name); + $idfield = $name."_id"; + $this->$name = mfValuecache::singleton()->get("mfObjectmodel-$name-".$this->$idfield); + if(!$this->$name) { + $this->$name = new $classname($this->$idfield); + } + + if($this->$name->id) { + mfValuecache::singleton()->set("mfObjectmodel-$name-".$this->$name->id, $this->$name); + return $this->$name; + } else { + return null; + } } return $this->$name; diff --git a/db/migrations/20240620160026_create_billing.php b/db/migrations/20240620160026_create_billing.php index 0fdaba2c1..5db6ebdf8 100644 --- a/db/migrations/20240620160026_create_billing.php +++ b/db/migrations/20240620160026_create_billing.php @@ -38,7 +38,7 @@ final class CreateBilling extends AbstractMigration $table->addColumn("amount", "decimal", ["null" => false, "precision" => 9, "scale" => 6]); $table->addColumn("price", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); $table->addColumn("price_setup", "decimal", ["null" => false, "default" => 0, "precision" => 14, "scale" => 4]); - $table->addColumn("total_vat", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); + $table->addColumn("vatrate", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); $table->addColumn("billing_period", "integer", ["null" => false, "default" => 0]); $table->addColumn("create_by", "integer", ["null" => false]); diff --git a/db/migrations/20240704170016_create_billing_voicenumber.php b/db/migrations/20240704170016_create_billing_voicenumber.php index 5d2c78e11..19e9a17e1 100644 --- a/db/migrations/20240704170016_create_billing_voicenumber.php +++ b/db/migrations/20240704170016_create_billing_voicenumber.php @@ -9,18 +9,19 @@ final class CreateBillingVoicenumber extends AbstractMigration { if($this->getEnvironment() == "thetool") { $table = $this->table("BillingVoicenumber"); - $table->addColumn("invoice_id", "integer", ["null" => true, "default" => null]); + $table->addColumn("billing_id", "integer", ["null" => true, "default" => null]); $table->addColumn("contract_id", "integer", ["null" => false]); - $table->addColumn("owner_id", "integer", ["null" => false]); - $table->addColumn("billingaddress_id", "integer", ["null" => false]); $table->addColumn("voicenumber", "string", ["null" => false, "limit" => 64]); $table->addColumn("start_date", "date", ["null" => false]); $table->addColumn("end_date", "date", ["null" => false]); + $table->addColumn("voiceplan", "string", ["null" => false, "limit" => 255]); $table->addColumn("zone", "string", ["null" => false, "limit" => 64]); + $table->addColumn("call_count", "integer", ["null" => false]); $table->addColumn("duration", "integer", ["null" => false]); - $table->addColumn("price", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); - $table->addColumn("total_vat", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); - + $table->addColumn("price", "decimal", ["null" => false, "precision" => 14, "scale" => 8]); + $table->addColumn("price_total", "decimal", ["null" => false, "precision" => 14, "scale" => 4]); + $table->addColumn("increment", "integer", ["null" => false]); + $table->addColumn("increment_first", "integer", ["null" => false]); $table->addColumn("create_by", "integer", ["null" => false]); $table->addColumn("edit_by", "integer", ["null" => false]); $table->addColumn("create", "integer", ["null" => false]);