Adding a partner and data sheet – system description
The steps of saving a partner: validation, quota, client assignment, persons and signatories, tax authority and integration data, bank accounts; the tile endpoints.
Adding and editing a partner run through one save endpoint; the tiles (address, bank account, person, storage rule) use their own AJAX endpoints. Saving does not redirect and returns the new id.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role |
|---|---|
company | partner |
permission_scope | content right of the creator |
subscription_account | the user's home client |
person_company | persons, role, signatory flag |
nav | tax authority technical user and keys |
user_api_key, company_auth | QUiCK API key |
foxpost | FoxPost account |
company_bankaccount, bankaccount | bank accounts |
company_objstorage | storage rule per object type (local / gdrive / onedrive) |
Save steps
- Right:
canSave(company, id)– for 0add(without anaddroweditdecides), for an existing oneeditandcompanyInScope(). - Validation: name 1–255; exact de-dup on the 8-digit tax number stem (
getCompanyIdByTaxhu8); statistical number empty or 17 digits. - Quota for a new partner:
Dlbtquota::checkAction(user, company, add);need_credit/need_planreturns an error with upsell data.addCompany(), content right for the creator (grantCompanyScopeToCreator); with a home client the new company goes to its subscription owner (assignToOwner), otherwise it becomes the home client (attachUserToClient); after a successful save the quota is consumed (consumeAction). - Persons (with
masterdata/personedit): add only; roles, then the full signatory set in one step (setCompanySignatories). - With
navapi: tax authority row (delete + rewrite, only with a technical user), QUiCK API key (empty = unchanged, removable with a separate flag), FoxPost account. - Bank accounts:
saveCompanyBankaccounts, normalised. Database errors come asDB: ….
Form endpoints
checkduplicate(edit): exact tax number stem; name: active company of the same name, warning only.autocomplete(list),companygroup(list, scope-filtered),companygroupadd(edit).addresslist/addresssave/addressdelete(list/edit, scope; postcode and country validation).bankidentify(edit): normalisation and bank identification (GIRO / openiban);bankaccounts(list);syncAddresses,syncBankaccounts(edit).persontile(list+ personlist; editable with personedit);statements(statement documents, max. 50).objstoragelist/objstoragesave/objstoragedelete(edit+ scope); the old Drive and local folder routes are thin forwards to the document centre's canonical storage endpoints.
Permissions
Function rights: add (not in the catalogue; header button), edit, navapi; related: masterdata/person edit, mail/notify list, document/document list. taxpayerupdate does not check the scope.