GnuCash-Pocket / gnucash-android

GnuCash Pocket – a mobile companion app for Gnucash desktop application (https://github.com/Gnucash/gnucash). Developed independently of GnuCash.
Apache License 2.0
87 stars 17 forks source link

Schedule period unknown when import #160

Open pnemonic78 opened 4 months ago

pnemonic78 commented 4 months ago

Steps to reproduce the behaviour

  1. Import a desktop gnucash book with schedules

Expected behaviour

No errors and warnings about period types.

Actual behaviour

Unsupported period constant: end of month (Ask Gemini)
   java.lang.IllegalArgumentException: No enum constant org.gnucash.android.model.PeriodType.END OF MONTH
      at java.lang.Enum.valueOf(Enum.java:302)
      at org.gnucash.android.model.PeriodType.valueOf(Unknown Source:2)
      at org.gnucash.android.importer.GncXmlHandler.endElement(GncXmlHandler.java:728)
      at org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:167)
      at org.apache.harmony.xml.ExpatParser.appendBytes(Native Method)
      at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:526)
      at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:487)
      at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:324)
      at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:287)
      at org.gnucash.android.importer.GncXmlImporter.parse(GncXmlImporter.java:70)
      at org.gnucash.android.importer.ImportAsyncTask.doInBackground(ImportAsyncTask.java:84)
      at org.gnucash.android.importer.ImportAsyncTask.doInBackground(ImportAsyncTask.java:44)
      at android.os.AsyncTask$3.call(AsyncTask.java:394)
      at java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
      at java.lang.Thread.run(Thread.java:1012)
Unsupported period constant: nth weekday (Ask Gemini)
   java.lang.IllegalArgumentException: No enum constant org.gnucash.android.model.PeriodType.NTH WEEKDAY
      at java.lang.Enum.valueOf(Enum.java:302)
      at org.gnucash.android.model.PeriodType.valueOf(Unknown Source:2)
      at org.gnucash.android.importer.GncXmlHandler.endElement(GncXmlHandler.java:728)
      at org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:167)
      at org.apache.harmony.xml.ExpatParser.appendBytes(Native Method)
      at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:526)
      at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:487)
      at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:324)
      at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:287)
      at org.gnucash.android.importer.GncXmlImporter.parse(GncXmlImporter.java:70)
      at org.gnucash.android.importer.ImportAsyncTask.doInBackground(ImportAsyncTask.java:84)
      at org.gnucash.android.importer.ImportAsyncTask.doInBackground(ImportAsyncTask.java:44)
      at android.os.AsyncTask$3.call(AsyncTask.java:394)
      at java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
      at java.lang.Thread.run(Thread.java:1012)