BillingMailing - ob-vss-ss18/ppl-core GitHub Wiki

Erstellt Rechnungen als PDF und verschickt diese der Mail, speichert diese und bietet API zur Abfrage an. Hier wird keine Berechnung duchgeführt, diese geschieht in ppl-pricecalculator.

TODO:

type Invoice {
  billingId: Int // 0 on creation
  recipient: Recipient
  items: [BillingItem]
  date: Date
  billing: Billing
}

type Recipient {
  cid: Int
  fullName: String
  street: String
  number: String
  zip: String
  city: String
  country: String
}

type BillingItem {
  id: Int
  description: String
  price_single: Float
  amount: Int
  price_total: Float
  discount_perc: Float
  discount_abs: Float
}

type Billing {
  price: Float
  price_total: Float
  discount_perc: Float
  discount_abs: Float
}

type Query {
  invoices(user: User, cid: Int): [Invoice]
  invoicepdf(user: User, billingId: Int): String // URL to file
}

type Mutation {
  createInvoice(user: User!, invoice: Invoice!): Int // billingId
}