Skip to content
Code-Schnipsel Gruppen Projekte
Commit a21aa326 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

feat: candyman-gmbh/projektplanung#96 - CH company number

Übergeordneter 6b2ecd79
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -143,10 +143,17 @@ public static function onUserSaveBegin(QUI\Users\User $User)
return;
}
if (isset($data['data'])) {
$data = \json_decode($data['data'], true);
}
if (isset($data['company'])) {
try {
$Address = $User->getStandardAddress();
$Address->setAttribute('company', $data['company']);
$Address->setAttribute(
'company',
QUI\Utils\Security\Orthos::clear($data['company'])
);
$Address->save();
} catch (QUI\Exception $Exception) {
QUI\System\Log::writeDebugException($Exception);
......@@ -163,7 +170,11 @@ public static function onUserSaveBegin(QUI\Users\User $User)
}
// save VAT ID
$User->setAttribute('quiqqer.erp.euVatId', $vatId);
$User->setAttribute('quiqqer.erp.euVatId', QUI\Utils\Security\Orthos::clear($vatId));
}
if (isset($data['chUID'])) {
$User->setAttribute('quiqqer.erp.chUID', QUI\Utils\Security\Orthos::clear($data['chUID']));
}
}
......
......@@ -46,6 +46,16 @@
</label>
</td>
</tr>
<tr>
<td>
<label class="field-container">
<span class="field-container-item" style="width: 150px">
{locale group="quiqqer/erp" var="quiqqer.erp.chUID"}
</span>
<input type="text" name="quiqqer.erp.chUID" class="field-container-field"/>
</label>
</td>
</tr>
<tr>
<td>
<label class="field-container">
......
......@@ -2,6 +2,7 @@
<user>
<attributes>
<attribute>quiqqer.erp.euVatId</attribute>
<attribute>quiqqer.erp.chUID</attribute>
<attribute>quiqqer.erp.taxId</attribute>
<attribute>quiqqer.erp.address</attribute>
<attribute>quiqqer.erp.isNettoUser</attribute>
......@@ -16,4 +17,4 @@
<template>OPT_DIR/quiqqer/erp/template/user/erpSettings.html</template>
</tab>
</window>
</user>
\ No newline at end of file
</user>
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren