Skip to content

Commit cbc40ca

Browse files
M4rc0Russ0Kammerlo
andauthored
Rel/merge 1.0.0 into 1.1.0 (#251)
* fix: journal enrichment (#240) * Update Dockerfile * Update Dockerfile * Update Dockerfile * chore: update docker * chore: updating docker * chore: updating docker * chore: increasing the poolsize to 50 * chore: upgrading docker version * chore: increase maximum pool-size * Fix/cant create new db transactions (#241) * chore: updating docker image * chore: increase pool size * chore: updating docker * chore: decreasing max pool size * chore: updating docker * chore: update docker * chore: update docker * fix: missing_currecny_data_should_result_invalid_tx (#242) Co-authored-by: Kammerlo <thomas.kammerlocher@cardanofoundation.org> * Update Dockerfile * chore: update docker * Fix: CARDANO_MAX_TRANSACTION_SIZE_BYTES (#244) * fix: extraction endpoint and public interface (#246) * fix: public interface (#247) * Dockerfile (#249) * fix: account credit name (#250) * rel: Platform version --------- Co-authored-by: Thomas Kammerlocher <thomas.kammerlocher@cardanofoundation.org>
1 parent 13be89f commit cbc40ca

File tree

6 files changed

+46
-20
lines changed

6 files changed

+46
-20
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG LIB_DOCKER_IMAGE=pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-reeve-platform-library-m2-cache:release-1.1.0-0949718-GHRUN15535313749
1+
ARG LIB_DOCKER_IMAGE=pro.registry.gitlab.metadata.dev.cf-deployments.org/base-infrastructure/docker-registry/cf-reeve-platform-library-m2-cache:release-1.1.0-de67ab8-GHRUN15610256653
22
FROM ${LIB_DOCKER_IMAGE} AS m2-cache
33

44
FROM openjdk:21-jdk-slim AS build

cf-application/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,4 @@ springdoc:
236236
realm: reeve-master
237237
oauth2-redirect-url: ${OAUTH2_REDIRECT_URL:http://localhost:9000/swagger-ui/oauth2-redirect.html}
238238
security:
239-
csp-policy: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' http://localhost:8080; frame-src http://localhost:8080"
239+
csp-policy: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' http://localhost:8080; frame-src http://localhost:8080"

cf_netsuite_altavia_erp_connector/src/main/java/org/cardanofoundation/lob/app/cf_netsuite_altavia_erp_connector/config/CFConfig.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
import org.cardanofoundation.lob.app.accounting_reporting_core.repository.AccountingCoreTransactionRepository;
99
import org.cardanofoundation.lob.app.accounting_reporting_core.service.assistance.AccountingPeriodCalculator;
1010
import org.cardanofoundation.lob.app.accounting_reporting_core.service.internal.SystemExtractionParametersFactory;
11-
import org.cardanofoundation.lob.app.cf_netsuite_altavia_erp_connector.convertors.AccountNumberConvertor;
12-
import org.cardanofoundation.lob.app.cf_netsuite_altavia_erp_connector.convertors.CostCenterConvertor;
13-
import org.cardanofoundation.lob.app.cf_netsuite_altavia_erp_connector.convertors.ProjectConvertor;
14-
import org.cardanofoundation.lob.app.cf_netsuite_altavia_erp_connector.convertors.VatConvertor;
11+
import org.cardanofoundation.lob.app.accounting_reporting_core.service.internal.TransactionRepositoryGateway;
12+
import org.cardanofoundation.lob.app.cf_netsuite_altavia_erp_connector.convertors.*;
1513
import org.cardanofoundation.lob.app.netsuite_altavia_erp_adapter.client.NetSuiteClient;
1614
import org.cardanofoundation.lob.app.netsuite_altavia_erp_adapter.domain.core.FieldType;
1715
import org.cardanofoundation.lob.app.netsuite_altavia_erp_adapter.domain.core.FinancialPeriodSource;
@@ -40,9 +38,7 @@
4038
@Configuration
4139
@ComponentScan(basePackages = {
4240
"org.cardanofoundation.lob.app.netsuite_altavia_adapter.config",
43-
"org.cardanofoundation.lob.app.netsuite_altavia_adapter.service",
44-
"org.cardanofoundation.lob.app.accounting_reporting_core.service",
45-
"org.cardanofoundation.lob.app.csv_erp_adapter.service"
41+
"org.cardanofoundation.lob.app.netsuite_altavia_adapter.service"
4642
})
4743
@Slf4j
4844
public class CFConfig {
@@ -75,8 +71,7 @@ public ExtractionParametersFilteringService extractionParametersFilteringService
7571

7672
@Bean
7773
public SystemExtractionParametersFactory systemExtractionParametersFactory(OrganisationPublicApiIF organisationPublicApiIF,
78-
AccountingPeriodCalculator accountPeriodService)
79-
{
74+
AccountingPeriodCalculator accountPeriodService) {
8075
return new SystemExtractionParametersFactory(organisationPublicApiIF, accountPeriodService);
8176
}
8277

@@ -97,14 +92,14 @@ public TransactionConverter transactionConverter(Validator validator,
9792

9893
@Bean
9994
public NetSuiteExtractionService netSuiteExtractionService(IngestionRepository ingestionRepository,
100-
NetSuiteClient netSuiteClient,
101-
TransactionConverter transactionConverter,
102-
ApplicationEventPublisher eventPublisher,
103-
SystemExtractionParametersFactory extractionParametersFactory,
104-
ExtractionParametersFilteringService parametersFilteringService,
105-
NetSuiteParser netSuiteParser,
106-
@Value("${lob.events.netsuite.to.core.send.batch.size:100}") int sendBatchSize,
107-
@Value("${lob.events.netsuite.to.core.netsuite.instance.debug.mode:true}") boolean isDebugMode
95+
NetSuiteClient netSuiteClient,
96+
TransactionConverter transactionConverter,
97+
ApplicationEventPublisher eventPublisher,
98+
SystemExtractionParametersFactory extractionParametersFactory,
99+
ExtractionParametersFilteringService parametersFilteringService,
100+
NetSuiteParser netSuiteParser,
101+
@Value("${lob.events.netsuite.to.core.send.batch.size:100}") int sendBatchSize,
102+
@Value("${lob.events.netsuite.to.core.netsuite.instance.debug.mode:true}") boolean isDebugMode
108103
) {
109104
return new NetSuiteExtractionService(
110105
ingestionRepository,
@@ -169,6 +164,7 @@ public PreprocessorService preprocessorService() {
169164
fieldProcessors.put(PROJECT, new ProjectConvertor());
170165
fieldProcessors.put(CHART_OF_ACCOUNT, new AccountNumberConvertor());
171166
fieldProcessors.put(VAT, new VatConvertor());
167+
fieldProcessors.put(ACCOUNT_CREDIT_NAME, new AccountCreditConvertor());
172168

173169
return new PreprocessorService(fieldProcessors);
174170
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package org.cardanofoundation.lob.app.cf_netsuite_altavia_erp_connector.convertors;
2+
3+
import io.vavr.control.Either;
4+
import lombok.val;
5+
import org.zalando.problem.Problem;
6+
7+
import java.util.function.Function;
8+
import java.util.regex.Pattern;
9+
10+
public class AccountCreditConvertor implements Function<String, Either<Problem, String>> {
11+
12+
private static final Pattern pattern = Pattern.compile("^(\\d+)\\s(.*)$");
13+
14+
@Override
15+
public Either<Problem, String> apply(String s) {
16+
val matcher = pattern.matcher(s);
17+
18+
if (matcher.matches()) {
19+
return Either.right(STR."\{matcher.group(2)}");
20+
}
21+
22+
return Either.left(Problem.builder()
23+
.withTitle("INVALID_CREDIT_ACCOUNT")
24+
.withDetail("Invalid credit account code")
25+
.with("project", s)
26+
.build());
27+
}
28+
29+
}

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ services:
217217
ports:
218218
- "3001:3001"
219219
- "8081:8080"
220+
- "10000:10000"
220221
entrypoint: [ "/app/yaci-cli", "create-node", "-o", "--start" ]
221222
# labels:
222223
# - "traefik.enable=true"

yaci-config/env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ IS_DOCKER=true
3232
#######################################################
3333

3434
#topup_addresses=addr_test1qzlwg5c3mpr0cz5td0rvr5rvcgf02al05cqgd2wzv7pud6chpzk4elx4jh2f7xtftjrdxddr88wg6sfszu8r3gktpjtqrr00q9:2000,addr_test1qqwpl7h3g84mhr36wpetk904p7fchx2vst0z696lxk8ujsjyruqwmlsm344gfux3nsj6njyzj3ppvrqtt36cp9xyydzqzumz82:1000
35-
topup_addresses=addr_test1qppcuzs25ghufz2mzg37hcm77px4matwz2hz072z4ms7umqasylaf2uure0h5dw6zmm4ctnxfm0m9gf8lst6fflthlhq5hrg7w:1000
35+
topup_addresses=addr_test1qppcuzs25ghufz2mzg37hcm77px4matwz2hz072z4ms7umqasylaf2uure0h5dw6zmm4ctnxfm0m9gf8lst6fflthlhq5hrg7w:10000000
3636

3737
############################################################
3838
#To configure an external database for Yaci Store (Indexer),

0 commit comments

Comments
 (0)