robert 2 роки тому
батько
коміт
845f7cd0e0
3 змінених файлів з 446 додано та 2 видалено
  1. 9 0
      sandbox/factor.py
  2. 435 0
      sandbox/freshdesk.json
  3. 2 2
      sandbox/starmoney.py

+ 9 - 0
sandbox/factor.py

@@ -0,0 +1,9 @@
+for i in range(10, 100):
+    if i % 10 == 0:
+        continue
+    row = []
+    for j in range(2, 10):
+        if str(i * j)[-2] == '0':
+            row.append(f'{i} * {j} = {i * j}')
+    if len(row) > 0:
+        print(f'{i}: ' + ', '.join(row))

+ 435 - 0
sandbox/freshdesk.json

@@ -0,0 +1,435 @@
+[
+    {
+        "cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de"
+        ],
+        "ticket_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058771317,
+        "responder_id": null,
+        "source": 1,
+        "company_id": 103000839802,
+        "status": 2,
+        "subject": "Fwd: Neuer Server - keine Daten 2022 in den Berichten",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 15,
+        "type": null,
+        "due_by": "2023-02-06T11:59:25Z",
+        "fr_due_by": "2023-02-02T11:59:25Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:59:25Z",
+        "updated_at": "2023-02-01T11:59:25Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "matarrelli@global-cube.de",
+            "mbe@dca-computer.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "matarrelli@global-cube.de",
+            "mbe@dca-computer.de"
+        ],
+        "ticket_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "matarrelli@global-cube.de",
+            "mbe@dca-computer.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058771652,
+        "responder_id": null,
+        "source": 1,
+        "company_id": 103000839799,
+        "status": 2,
+        "subject": "Fwd: AH Zumbült - neues Management Informationssystem",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 14,
+        "type": null,
+        "due_by": "2023-02-06T11:56:43Z",
+        "fr_due_by": "2023-02-02T11:56:43Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:56:43Z",
+        "updated_at": "2023-02-01T12:00:53Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "edv@darmas.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "edv@darmas.de"
+        ],
+        "ticket_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "edv@darmas.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058770514,
+        "responder_id": null,
+        "source": 1,
+        "company_id": null,
+        "status": 2,
+        "subject": "Fwd: AH Darmas - neues Managment Informationssystem",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 13,
+        "type": null,
+        "due_by": "2023-02-06T11:56:12Z",
+        "fr_due_by": "2023-02-02T11:56:12Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:56:12Z",
+        "updated_at": "2023-02-01T11:56:12Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "stephane.brandt@hasler-garage.ch"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "stephane.brandt@hasler-garage.ch"
+        ],
+        "ticket_cc_emails": [
+            "winter@global-cube.de",
+            "bedner@global-cube.de",
+            "stephane.brandt@hasler-garage.ch"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058770514,
+        "responder_id": null,
+        "source": 1,
+        "company_id": null,
+        "status": 2,
+        "subject": "Fwd: AH Hasler - neues Managment Informationssystem",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 12,
+        "type": null,
+        "due_by": "2023-02-06T11:55:52Z",
+        "fr_due_by": "2023-02-02T11:55:52Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:55:51Z",
+        "updated_at": "2023-02-01T11:55:52Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "ticket_cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": 103000201737,
+        "priority": 1,
+        "requester_id": 103058770327,
+        "responder_id": 103057514342,
+        "source": 1,
+        "company_id": null,
+        "status": 5,
+        "subject": "Fwd: Fehlerberichte fehlen",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 11,
+        "type": "Problem",
+        "due_by": "2023-02-06T14:21:54Z",
+        "fr_due_by": "2023-02-02T14:21:54Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:55:00Z",
+        "updated_at": "2023-02-01T14:31:54Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "c.otten@dresen.de",
+            "ali.salmi@dresen.de",
+            "b.oberlaender@dresen.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "c.otten@dresen.de",
+            "ali.salmi@dresen.de",
+            "b.oberlaender@dresen.de"
+        ],
+        "ticket_cc_emails": [
+            "c.otten@dresen.de",
+            "ali.salmi@dresen.de",
+            "b.oberlaender@dresen.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058769698,
+        "responder_id": null,
+        "source": 1,
+        "company_id": 103000839807,
+        "status": 2,
+        "subject": "Fwd: Änderung der Provisionsgrundlage",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 10,
+        "type": null,
+        "due_by": "2023-02-06T11:52:39Z",
+        "fr_due_by": "2023-02-02T11:52:39Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:52:39Z",
+        "updated_at": "2023-02-01T12:35:24Z",
+        "associated_tickets_count": null,
+        "tags": [
+            "Provision"
+        ],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "ticket_cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058769083,
+        "responder_id": null,
+        "source": 1,
+        "company_id": 103000839808,
+        "status": 2,
+        "subject": "Keyloop Mazda NASA Schnittstelle",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 9,
+        "type": null,
+        "due_by": "2023-02-06T11:51:09Z",
+        "fr_due_by": "2023-02-02T11:51:09Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:51:09Z",
+        "updated_at": "2023-02-01T12:34:12Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "m.berning@autohaus-berning.de",
+            "matthias.berning@reisacher.de",
+            "geiss@global-cube.de",
+            "bedner@global-cube.de",
+            "winter@global-cube.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "m.berning@autohaus-berning.de",
+            "matthias.berning@reisacher.de",
+            "geiss@global-cube.de",
+            "bedner@global-cube.de",
+            "winter@global-cube.de"
+        ],
+        "ticket_cc_emails": [
+            "m.berning@autohaus-berning.de",
+            "matthias.berning@reisacher.de",
+            "geiss@global-cube.de",
+            "bedner@global-cube.de",
+            "winter@global-cube.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": null,
+        "priority": 1,
+        "requester_id": 103058768865,
+        "responder_id": null,
+        "source": 1,
+        "company_id": 103000839803,
+        "status": 2,
+        "subject": "Fwd: Abstimmung GO-LIVE Planung 2023 + offene Punkte",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 8,
+        "type": null,
+        "due_by": "2023-02-06T11:50:37Z",
+        "fr_due_by": "2023-02-02T11:50:37Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T11:50:37Z",
+        "updated_at": "2023-02-01T11:50:37Z",
+        "associated_tickets_count": null,
+        "tags": [],
+        "nr_due_by": null,
+        "nr_escalated": false
+    },
+    {
+        "cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "fwd_emails": [],
+        "reply_cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "ticket_cc_emails": [
+            "bedner@global-cube.de"
+        ],
+        "fr_escalated": false,
+        "spam": false,
+        "email_config_id": 103000070386,
+        "group_id": 103000201737,
+        "priority": 1,
+        "requester_id": 103058694921,
+        "responder_id": 103057514342,
+        "source": 1,
+        "company_id": 103000839633,
+        "status": 4,
+        "subject": "Fwd: Endlauf 07.2022 und Umsatzprovision",
+        "association_type": null,
+        "support_email": "global-cubedesupport@globalcube-support.freshdesk.com",
+        "to_emails": [
+            "support@global-cube.de"
+        ],
+        "product_id": null,
+        "id": 7,
+        "type": "Problem",
+        "due_by": "2023-02-06T14:30:01Z",
+        "fr_due_by": "2023-02-02T14:30:01Z",
+        "is_escalated": false,
+        "custom_fields": {
+            "cf_reference_number": null
+        },
+        "created_at": "2023-02-01T08:50:48Z",
+        "updated_at": "2023-02-01T14:32:01Z",
+        "associated_tickets_count": null,
+        "tags": [
+            "Provision"
+        ],
+        "nr_due_by": null,
+        "nr_escalated": false
+    }
+]

+ 2 - 2
sandbox/starmoney.py

@@ -2,7 +2,7 @@ import pandas as pd
 import numpy as np
 from pathlib import Path
 
-year = '2021'
+year = '2022'
 export_dir = f'/home/robert/Dropbox/Jugendchor 2000/Kasse/{year}/Export'
 kst = {'3115532': '0', '3123981': '1', '3124005': '2', '3123999': '3', '3124039': '4', '3123973': '5', '3124013': '6'}
 from_label = ['Buchungstag', 'Internet', 'Verwendungszweckzeile 1', 'Kommentar', 'KST',
@@ -25,7 +25,7 @@ def import_csv(filename):
     df = df[from_label]
     print(df.shape)
     first_row = [f'01.01.{year}', '', 'Anfangsbestand - SLS ' + kto, 'AB', kst[kto], '', '', '', 0, first_saldo, 0]
-    last_row = [f'31.12.{year}', '', 'Endbestand - SLS ' + kto, 'EB', kst[kto], '', '', '', len(df) + 1, last_saldo, 0]
+    last_row = [f'31.12.{year}', '', 'Endbestand - SLS ' + kto, 'EB', kst[kto], '', '', '', len(df) + 1, 0, last_saldo]
     df = pd.concat([
         pd.DataFrame([first_row], columns=from_label),
         df,