Skip to content

Commit

Permalink
11119-visible faktura fields (#67)
Browse files Browse the repository at this point in the history
* 11119-visible faktura fields

* 11119-hidden tablename addressFaktura in fieldLoaderGeneric

* 11119- add unittest fieldLoaderGeneric

* 11119- add unittest fieldLoaderGeneric

* 11119- add unittest fieldLoaderGeneric

Co-authored-by: yen.nguyenthi <yen.nguyenthi@ncc.asia>
  • Loading branch information
hungnc89 and yenncc authored Jun 16, 2021
1 parent adf9f22 commit a6ad036
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/Field/Collection/FieldLoaderGeneric.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public function load(): Generator
}

foreach ($fieldArray as $fieldName => $fieldProperties) {
if ($module === onOfficeSDK::MODULE_ADDRESS && $fieldProperties['tablename'] === 'addressFaktura') {
continue;
}
if ($module === onOfficeSDK::MODULE_ESTATE && $fieldName === 'regionaler_zusatz') {
$fieldProperties['type'] = FieldTypes::FIELD_TYPE_SINGLESELECT;
$this->_pRegionController->fetchRegions();
Expand Down
18 changes: 18 additions & 0 deletions tests/resources/ApiResponseGetFields.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@
"tablename": "AdrZusatz",
"content": "Adtl Address"
},
"addressFakturaSeparator1": {
"type": "text",
"length": null,
"permittedvalues": null,
"default": null,
"label": "FakturaDividinglinie1",
"tablename": "addressFaktura",
"content": null
},
"addressFakturaSeparator2": {
"type": "text",
"length": null,
"permittedvalues": null,
"default": null,
"label": "FakturaDividinglinie2",
"tablename": "addressFaktura",
"content": null
},
"Anrede-Titel": {
"type": "varchar",
"length": 80,
Expand Down

0 comments on commit a6ad036

Please sign in to comment.