| @@ 411-415 (lines=5) @@ | ||
| 408 | ||
| 409 | // kunde |
|
| 410 | $contact = new Contact($this->kernel, $input["contact_id"]); |
|
| 411 | if (is_object($contact->address)) { |
|
| 412 | $contact_address_id = $contact->address->get("address_id"); |
|
| 413 | } else { |
|
| 414 | $this->error->set("Ugyldig kunde"); |
|
| 415 | } |
|
| 416 | ||
| 417 | if ($contact->get("type") == "corporation") { |
|
| 418 | $validator->isNumeric($input["contact_person_id"], "Der er ikke angivet en kontaktperson"); |
|
| @@ 172-177 (lines=6) @@ | ||
| 169 | } |
|
| 170 | if ($validator->isNumeric($input["contact_id"], "Du skal angive en kunde", "greater_than_zero")) { |
|
| 171 | $contact = new Contact($this->kernel, (int)$input["contact_id"]); |
|
| 172 | if (is_object($contact->address)) { |
|
| 173 | $contact_id = $contact->get("id"); |
|
| 174 | $contact_address_id = $contact->address->get("address_id"); |
|
| 175 | } else { |
|
| 176 | $this->error->set("Ugyldig kunde"); |
|
| 177 | } |
|
| 178 | ||
| 179 | if ($contact->get("type") == "corporation") { |
|
| 180 | $validator->isNumeric($input["contact_person_id"], "Der er ikke angivet en kontaktperson"); |
|