aboutsummaryrefslogtreecommitdiff
path: root/src/classes/invoice.ts
blob: 0fee42fa3cefc20bcc6cccb372a16fe675eea872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import Address from './address'
import Item from './item'

export default class Invoice {
  InvoiceDate: string
  InvoiceNumber: number
  BillingAddress: Address
  ShippingAddress: Address
  IsDraft: boolean
  Items: Item[]

  CustomerName: string
  CustomerGstin: string
  CustomerContactName: string
  CustomerPhone: string
  CustomerEmail: string
  CustomerWebsite: string

  constructor() {
    this.InvoiceDate = ""
    this.InvoiceNumber = 0
    this.BillingAddress = new Address()
    this.ShippingAddress = new Address()
    this.IsDraft = true
    this.Items = []

    this.CustomerName = ""
    this.CustomerGstin = ""
    this.CustomerContactName = ""
    this.CustomerPhone = ""
    this.CustomerEmail = ""
    this.CustomerWebsite = ""
  }
}

export class InvoiceTotal {
  TotalQuantity: string
  TotalGSTValue: string
  TotalWithoutGST: string
  TotalWithGST: string

  constructor() {
    this.TotalQuantity = ""
    this.TotalGSTValue = ""
    this.TotalWithoutGST = ""
    this.TotalWithGST = ""
  }
}