Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • concrexit concrexit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 70
    • Issues 70
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • thaliathalia
  • concrexitconcrexit
  • Issues
  • #1010
Closed
Open
Issue created Feb 12, 2020 by Job Doesburg@jdoesburgContributor

Create Payable interface

One-sentence description

Create a Payable interface to be used for all models that use Payments

Why?

To prevent code duplication and improve testing

Current implementation

Shitty, chaotic, anarchy, tears

Suggested implementation

Payable abstract class with @property @abstractmethods:

  • payment_amount as the amount of the payment
  • payment_topic as the grouping key for the type of payment (ledger information)
  • payment_notes for the user specific details
  • payment_payer for the user paying

Payments must then have a constructor create_payment that takes as arguments:

  • a Payable object
  • a payment processor that is the person that processes the payment
  • the payment type being either thalia pay, card, cash or wire transfer (no None anymore!)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking