Fixed productchange for partners
This commit is contained in:
@@ -525,6 +525,18 @@ class AddressController extends mfBaseController {
|
||||
$search = trim($this->request->q);
|
||||
$autocomplete = $this->request->autocomplete;
|
||||
|
||||
if($autocomplete && $this->request->searchedID) {
|
||||
$address = new Address($this->request->searchedID);
|
||||
if($address->id) {
|
||||
$result = [
|
||||
'value' => $address->id,
|
||||
'text' => str_replace("'", "\\'", str_replace(["\n", "\r"], " ",$address->getCompanyOrName()))." (".$address->zip." ".$address->city.", ".$address->street.")".(($address->customer_number) ? " [".$address->customer_number."]" : "")
|
||||
];
|
||||
$results[] = $result;
|
||||
$this->returnJson($results);
|
||||
}
|
||||
}
|
||||
|
||||
$po = 1;
|
||||
$role = false;
|
||||
// if searching for billingaddress, set role and parents_only to 0
|
||||
|
||||
@@ -539,7 +539,7 @@ class OrderController extends mfBaseController {
|
||||
}
|
||||
|
||||
if($contract->termination_id) {
|
||||
if(!in_array($contract->termination->network_id, $my_network_ids)) {
|
||||
if(!in_array($contract->termination->building->network_id, $my_network_ids)) {
|
||||
$this->layout()->setFlash("Keine Berechtigung", "error");
|
||||
$this->redirect("Order", "addUpgrade", ["owner_id" => $contract->owner_id]);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ Vue.component('OrderProductchange', {
|
||||
<div class="col">
|
||||
|
||||
<p class="alert alert-purple">Wählen Sie den Vertragsinhaber aus, um die aktiven Produkte anzuzeigen.<br />
|
||||
Produktwechsel sollten immer mit dem Hauptprodukt durchgeführt werden. Dies ist fast immer das Internetzugangsprodukt.</p>
|
||||
Produktwechsel sollten immer mit dem <strong>Hauptprodukt</strong> durchgeführt werden. Dies ist fast immer das <strong>Internetzugangsprodukt</strong>.</p>
|
||||
|
||||
<tt-autocomplete :api-url="window['TT_CONFIG']['ADDRESS_API_URL'] + '?do=findAddress'"
|
||||
v-model="owner_id" label="Vertragsinhaber suchen" placeholder="Tippen zum Suchen..."></tt-autocomplete>
|
||||
@@ -25,7 +25,8 @@ Vue.component('OrderProductchange', {
|
||||
disable-filtering ref="contractTable">
|
||||
|
||||
<template v-slot:actions="{ row }">
|
||||
<a :href="window['TT_CONFIG']['ORDER_PRODUCTCHANGE_URL'] + '?contract_id=' + row.id"
|
||||
<a v-if="!row.product_name.match(/Service Pauschale/i) && row.billing_period > 0"
|
||||
:href="window['TT_CONFIG']['ORDER_PRODUCTCHANGE_URL'] + '?contract_id=' + row.id"
|
||||
class="btn btn-purple"><i class="fas fa-fw fa-square-up"></i> Produktwechsel erstellen</a>
|
||||
</template>
|
||||
<template v-slot:billing_period="{ row }">
|
||||
|
||||
Reference in New Issue
Block a user