byrokrat / giroapp

Command line app for managing autogiro donations.
GNU General Public License v3.0
4 stars 2 forks source link

Unable to perform IMPORT_TRANSACTION_REMOVED when in state TRANSACTION_REGISTRATION_SENT #202

Open hanneskod opened 1 year ago

hanneskod commented 1 year ago

Anonymised content:

PG_8502000149_BAG_2022-05-26_001.txt:

01AUTOGIRO              20220525            MAKULERING/�NDRING  5839600054502034
1120220530000000xxxxxxxxxx82000000012000REFERENS00000000xVVZvM500r00NEAn12      
1120220628000000xxxxxxxxxx82000000012000REFERENS00000000xVVZvM500r00NEAn12      
1120220728000000xxxxxxxxxx82000000012000REFERENS00000000xVVZvM500r00NEAn12      
09202205259900              000000000000000000000003000000000003600�000000000000
hannes@greybox ~/Hämtningar $ giroapp import agag/
Importing file PG_8502000149_BAG_2022-05-26_001.txt
ERROR: Unable to perform transition 'IMPORT_TRANSACTION_REMOVED' on donor 'xVVZvM500r00NEAn' (possible values: 'IMPORT_TRANSACTION_ACTIVE')

hannes@greybox ~/Hämtningar $ giroapp show xVVZvM500r00NEAn
mandate-key: xVVZvM500r00NEAn
state: TRANSACTION_REGISTRATION_SENT
mandate-source: MANDATE_SOURCE_ONLINE_FORM
payer-number: 1111111111
account: 1111,111111-1
id: 111111-1111
name: xxxx
address: xxxx,     ,     , 11111, xx
email: xxxxx
phone: 
amount: 120.00
comment: 
created: 2022-04-14
updated: 2022-04-28
attribute.Summa: 120
attribute.E-post: xxxxxxx
attribute.online_form_id: standard
attribute.online_verification_time: 2022-04-05 09:38:53
attribute.online_verification_code: ff350951-09b2-44e1-abfe-e8b92245715b

hannes@greybox ~/Hämtningar $ giroapp history xVVZvM500r00NEAn
[2020-03-30 20:35:22] DONOR_ADDED                  {"mandate_key":"xVVZvM500r00NEAn","state":"NEW_MANDATE","mandate_source":"MANDATE_SOURCE_ONLINE_FORM","payer_number":"1111111111","account":"1111,111111-1","donor_id":"111111-1111","name":"","address":{"line1":"","line2":"","line3":"","postal_code":"","postal_city":""},"email":"","phone":"","donation_amount":"35.00","comment":"","attributes":[]}
[2020-03-30 20:35:22] DONOR_NAME_UPDATED           {"name":"xxxxx"}
[2020-03-30 20:35:22] DONOR_POSTAL_ADDRESS_UPDATED {"address":{"line1":"xxxxx","line2":"","line3":"","postal_code":"11111","postal_city":"xxx"}}
[2020-03-30 20:35:22] DONOR_EMAIL_UPDATED          {"email":"xxxxx"}
[2020-03-30 20:42:30] DONOR_STATE_UPDATED          {"state":"MANDATE_SENT","state_update_description":"Exported to BGC"}
[2020-03-31 22:02:02] DONOR_STATE_UPDATED          {"state":"AWAITING_TRANSACTION_REGISTRATION","state_update_description":"Nytt Medgivande."}
[2020-03-31 22:02:26] DONOR_STATE_UPDATED          {"state":"TRANSACTION_REGISTRATION_SENT","state_update_description":"Exported to BGC"}
[2020-04-30 13:31:41] DONOR_STATE_UPDATED          {"state":"ACTIVE","state_update_description":"Transaction active on 2020-04-28"}
[2020-04-30 13:31:41] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-04-28"}
[2020-06-02 14:33:59] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-05-28"}
[2020-07-06 10:54:30] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-06-29"}
[2020-08-11 21:17:24] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-07-28"}
[2020-09-02 09:19:09] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-08-28"}
[2020-09-29 11:19:50] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-09-28"}
[2020-11-02 11:48:02] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-10-28"}
[2020-12-06 20:48:04] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-11-30"}
[2021-01-15 10:27:37] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2020-12-28"}
[2021-02-03 11:27:25] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-01-28"}
[2021-03-01 13:41:12] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-03-01"}
[2021-04-06 19:33:04] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-03-29"}
[2021-05-17 10:16:58] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-04-28"}
[2021-06-13 21:49:56] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-05-28"}
[2021-07-16 13:52:46] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-06-28"}
[2021-08-07 21:00:46] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-07-28"}
[2021-09-01 16:47:02] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-08-30"}
[2021-10-11 10:28:50] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-09-28"}
[2021-11-27 09:01:35] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-10-28"}
[2021-12-13 14:47:18] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-11-29"}
[2022-01-13 11:20:52] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2021-12-28"}
[2022-02-21 16:12:26] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2022-01-28"}
[2022-03-03 15:06:17] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2022-02-28"}
[2022-04-14 09:40:42] TRANSACTION_PERFORMED        {"transaction_amount":"35.00","transaction_date":"2022-03-28"}
[2022-04-14 09:40:43] DONOR_STATE_UPDATED          {"state":"REVOKED","state_update_description":"Medgivandet \u00e4r makulerat p\u00e5 initiativ av betalaren eller betalarens bank."}
[2022-04-14 09:40:43] DONOR_REMOVED                []
[2022-04-14 09:43:32] DONOR_ADDED                  {"mandate_key":"xVVZvM500r00NEAn","state":"MANDATE_CREATED","mandate_source":"MANDATE_SOURCE_ONLINE_FORM","payer_number":"1111111111","account":"1111,111111-1","donor_id":"111111-1111","name":"","address":{"line1":"","line2":"","line3":"","postal_code":"","postal_city":""},"email":"","phone":"","donation_amount":"120.00","comment":"","attributes":[]}
[2022-04-14 09:43:32] DONOR_STATE_UPDATED          {"state":"NEW_MANDATE","state_update_description":"Mandate added from xml"}
[2022-04-14 09:43:32] DONOR_NAME_UPDATED           {"name":"xxxx"}
[2022-04-14 09:43:32] DONOR_POSTAL_ADDRESS_UPDATED {"address":{"line1":"xxxx","line2":"    ","line3":"    ","postal_code":"11111","postal_city":"xxx"}}
[2022-04-14 09:43:32] DONOR_EMAIL_UPDATED          {"email":"xxxxx"}
[2022-04-14 09:43:32] DONOR_ATTRIBUTE_UPDATED      {"attributes":{"Summa":"120"}}
[2022-04-14 09:43:32] DONOR_ATTRIBUTE_UPDATED      {"attributes":{"E-post":"xxxxxx"}}
[2022-04-14 09:43:32] DONOR_ATTRIBUTE_UPDATED      {"attributes":{"online_form_id":"standard"}}
[2022-04-14 09:43:32] DONOR_ATTRIBUTE_UPDATED      {"attributes":{"online_verification_time":"2022-04-05 09:38:53"}}
[2022-04-14 09:43:32] DONOR_ATTRIBUTE_UPDATED      {"attributes":{"online_verification_code":"ff350951-09b2-44e1-abfe-e8b92245715b"}}
[2022-04-14 09:45:53] DONOR_STATE_UPDATED          {"state":"MANDATE_SENT","state_update_description":"Exported to BGC"}
[2022-04-28 09:09:22] DONOR_STATE_UPDATED          {"state":"AWAITING_TRANSACTION_REGISTRATION","state_update_description":"Nytt Medgivande."}
[2022-04-28 09:09:48] DONOR_STATE_UPDATED          {"state":"TRANSACTION_REGISTRATION_SENT","state_update_description":"Exported to BGC"}