0

Ansicht mit Filter

Ich habe für das folgende Problem zwar von Gemini gefühlte 100 Lösungsvorschläge erhalten, aber keine geht.

Aufgabenstellung: Buchhaltung als Teil einer Immobilienverwaltung

Folgende Tabellen:

Konten → 1:n → Mandanten → 1:n → Objekte → 1:n zu Buchungen

In Buchungen gibt es zwei n:1 Verknüpfungen zu Konten, einmal für Soll und einmal für Haben.

Nun möchte ich in der Tabelle Objekte eine Ansicht, in der mir alle Konten angezeigt werden. Das geht mit 'select Konten' auch. Wähle ich dann das Konto aus, werden mir alle Buchungen für alle Objekte angezeigt, da ja Buchungen die Objekte nicht kennt. In den jeweiligen Tabellen für Soll und Haben kann ich die Objekte anzeigen und kann die auch manuell auch filtern, was aber umständlich und vor allem für andere Nutzer zu kompliziert ist.

Gesuchte Lösung: Was muss ich tun, damit ich in der Ansicht unter Objekte das Konto wählen kann und es werden mir nur die zum Objekt gehörenden Buchungen angezeigt? Geht das überhaupt?

6 Antworten

null
    • Fred
    • vor 2 Tagen
    • Gemeldet - anzeigen

    Aren't bookings already linked to an account? Through Objects back to Clients back to Accounts.

    So you need bookings to be linked to other accounts as well?

      • Marco.1
      • gestern
      • Gemeldet - anzeigen

      Thanks  for the quick reply. The booking is connected to Accounts. However Objects are not connected to Accounts. That might be the problem. See picture.

      • Fred
      • gestern
      • Gemeldet - anzeigen

       Objekt and Konten are related through Buchungen. So if you are in Objekt then the following code will get you Konten:

      Buchungen.Konten
      • Marco.1
      • vor 12 Stunden
      • Gemeldet - anzeigen

       Thanks again. Somehow, my reply disappeared. I try again: How or better where do I use that code under 'Objekt'? Pict 1 shows all the bookings for all objects. Pict 2 shows the objects with all its bookings which show the accounts through the connection 'Objekt' → 'Buchungen'  → 'Konten'. Pict 3 shows the accounts with all bookings for this account.

      What I would like to get is pict 3 but only for one object. I've tried to creat a page (instead of a table) with a view (not sure how it's called in English, German it's 'Ansicht'). But couldn't get the desired result either.

    • Fred
    • vor 7 Stunden
    • Gemeldet - anzeigen

    Let us back up. You originally posted you wanted to:

    Sought solution: What do I have to do so that I can choose the account in the view under Objects and only the bookings belonging to the object are displayed to me? Is this even possible?

    Then you added:

    What I would like to get is pict 3 but only for one object. I've tried to creat a page (instead of a table) with a view (not sure how it's called in English, German it's 'View'). But couldn't get the desired result either.

    Let us explore this path, since creating pages to interact with your data is the best way forward if you are making it for others to use.

    If you create a page, one of the first steps for users is to pick a Konten. That means you either have a:

    1. reference field to Konten
    2. dynamic choice field to Konten

    So a user selects a Konten. Now what do you want to happen?

      • Marco.1
      • vor 1 Stunde
      • Gemeldet - anzeigen

      Thanks  . I've  decided to change the hierarchy of the db, i.e. Client → Object → Accounting. That has the disadvantage, i.e. I have to manually choose the accounts needed for every object.  For that I have table Account Plan which contains all possible accounts. I've linked this table to Accounting. Not the most elegant solution probably but since the number of objects will bi limited, it works for me. Thanks again for your support.

Content aside

  • Status Answered
  • vor 1 StundeZuletzt aktiv
  • 6Antworten
  • 28Ansichten
  • 2 Folge bereits