aboutsummaryrefslogtreecommitdiff
path: root/src/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/invoice.ts34
-rw-r--r--src/classes/invoice_item.ts21
-rw-r--r--src/classes/item.ts2
3 files changed, 55 insertions, 2 deletions
diff --git a/src/classes/invoice.ts b/src/classes/invoice.ts
new file mode 100644
index 0000000..213eddc
--- /dev/null
+++ b/src/classes/invoice.ts
@@ -0,0 +1,34 @@
+import Address from './address'
+import Item from './item'
+
+export default class Customer {
+ 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 = ""
+ }
+}
diff --git a/src/classes/invoice_item.ts b/src/classes/invoice_item.ts
new file mode 100644
index 0000000..a7a0a85
--- /dev/null
+++ b/src/classes/invoice_item.ts
@@ -0,0 +1,21 @@
+export default class InvoiceItem {
+ UnitOfMeasure: string
+ Quantity: string
+ Name: string
+ Description: string
+ HSN: string
+ UnitPrice: string
+ GSTPercentage: string
+ BrandName: string
+
+ constructor() {
+ this.Name = ''
+ this.Description = ''
+ this.HSN = ''
+ this.UnitPrice = ''
+ this.GSTPercentage = ''
+ this.UnitOfMeasure = ''
+ this.Quantity = ""
+ this.BrandName = ""
+ }
+}
diff --git a/src/classes/item.ts b/src/classes/item.ts
index 271eb3d..ba437a7 100644
--- a/src/classes/item.ts
+++ b/src/classes/item.ts
@@ -1,6 +1,5 @@
export default class Item {
unitofmeasure: string
- hasdecimalquantity: boolean
name: string
description: string
hsn: string
@@ -15,7 +14,6 @@ export default class Item {
this.unitprice = ''
this.gstpercentage = ''
this.unitofmeasure = ''
- this.hasdecimalquantity = false
this.brandid = 0
}
}