-
Notifications
You must be signed in to change notification settings - Fork 0
/
builder.go
87 lines (70 loc) · 1.72 KB
/
builder.go
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
Package invoice_generator
Copyright 2021 @chunvv. All Rights Reserved.
Created by Trung Vu on AD 2021/07/10.
*/
package invoice_generator
func (d *Document) SetType(docType string) *Document {
d.Type = docType
return d
}
func (d *Document) SetHeader(header *HeaderFooter) *Document {
d.Header = header
return d
}
func (d *Document) SetFooter(footer *HeaderFooter) *Document {
d.Footer = footer
return d
}
func (d *Document) SetVersion(version string) *Document {
d.Number = version
return d
}
func (d *Document) SetDescription(desc string) *Document {
d.Description = desc
return d
}
func (d *Document) SetNotes(notes string) *Document {
d.Notes = notes
return d
}
func (d *Document) SetCompany(company *Contact) *Document {
d.Company = company
return d
}
func (d *Document) SetCustomer(customer *Contact) *Document {
d.Customer = customer
return d
}
func (d *Document) AppendItem(item *Item) *Document {
d.Items = append(d.Items, item)
return d
}
func (d *Document) SetDate(date string) *Document {
d.Date = date
return d
}
func (d *Document) SetPaymentTerm(term string) *Document {
d.PaymentTerm = term
return d
}
func (d *Document) SetAfterCommission(afterCommission *AfterCommission) *Document {
d.AfterCommission = afterCommission
return d
}
func (d *Document) SetConsumptionTax(consumptionTax *ConsumptionTax) *Document {
d.ConsumptionTax = consumptionTax
return d
}
func (d *Document) SetWithholdingTax(withholdingTax *WithholdingTax) *Document {
d.WithholdingTax = withholdingTax
return d
}
func (d *Document) SetPaymentFree(paymentFee *PaymentFree) *Document {
d.PaymentFree = paymentFee
return d
}
func (d *Document) SetPaidAmount(paidAmount *PaidAmount) *Document {
d.PaidAmount = paidAmount
return d
}