From 5d9ba20d9368215ace3cc066f832916e83bcaf6f Mon Sep 17 00:00:00 2001 From: Nirus2000 Date: Thu, 4 Apr 2024 03:05:12 +0200 Subject: [PATCH] Improve Banque Pictet & Cie SA PDF-Importer Remove obsolet source --- .../pdf/PictetCieGruppeSAPDFExtractor.java | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/PictetCieGruppeSAPDFExtractor.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/PictetCieGruppeSAPDFExtractor.java index f0f968d39a..fb18ebb955 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/PictetCieGruppeSAPDFExtractor.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/PictetCieGruppeSAPDFExtractor.java @@ -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("^(?(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("^(?(Purchase|Sale)) (\\-)?[\\.'\\d]+ .* [\\w]{3} [\\.'\\d]+$") - .assign((t, v) -> { - if ("Sale".equals(v.get("type"))) - t.setType(PortfolioTransaction.Type.SELL); - })) + .section("type") // + .match("^(?(Purchase|Sale)) .* [\\.'\\d]+.*$") // + .assign((t, v) -> { + if ("Sale".equals(v.get("type"))) + t.setType(PortfolioTransaction.Type.SELL); + }) .oneOf( // // @formatter:off