Skip to content

Commit

Permalink
Improve Banque Pictet & Cie SA PDF-Importer
Browse files Browse the repository at this point in the history
Remove obsolet source
  • Loading branch information
Nirus2000 committed Apr 4, 2024
1 parent 9435785 commit 5d9ba20
Showing 1 changed file with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,12 @@ private void addBuySellTransaction()
})

// Is type --> "Sale" change from BUY to SELL
.optionalOneOf( //
// @formatter:off
// Purchase 24'728.000 PIMCO GIS-GL.LO.DUR.R/R INS.USD-ACC at USD 11.97
// Sale -74.620 AGIF-CHINA A-SHARES PT GBP-ACC. at GBP 1'565.99
// @formatter:on
section -> section //
.attributes("type") //
.match("^(?<type>(Purchase|Sale)) (\\-)?[\\.'\\d]+ .* [\\w]{3} [\\.'\\d]+$") //
.assign((t, v) -> {
if ("Sale".equals(v.get("type")))
t.setType(PortfolioTransaction.Type.SELL);
}),
// @formatter:off
// Purchase 24'728.000 PIMCO GIS-GL.LO.DUR.R/R INS.USD-ACC at USD 11.97
// Sale -74.620 AGIF-CHINA A-SHARES PT GBP-ACC. at GBP 1'565.99
// @formatter:on
section -> section //
.attributes("type") //
.match("^(?<type>(Purchase|Sale)) (\\-)?[\\.'\\d]+ .* [\\w]{3} [\\.'\\d]+$")
.assign((t, v) -> {
if ("Sale".equals(v.get("type")))
t.setType(PortfolioTransaction.Type.SELL);
}))
.section("type") //
.match("^(?<type>(Purchase|Sale)) .* [\\.'\\d]+.*$") //
.assign((t, v) -> {
if ("Sale".equals(v.get("type")))
t.setType(PortfolioTransaction.Type.SELL);
})

.oneOf( //
// @formatter:off
Expand Down

0 comments on commit 5d9ba20

Please sign in to comment.