@@ -60,3 +60,60 @@ func TestNew(t *testing.T) {
60
60
t .Errorf (err .Error ())
61
61
}
62
62
}
63
+
64
+ func TestWithLongTitle (t * testing.T ) {
65
+ doc , _ := New (Invoice , & Options {
66
+ TextTypeInvoice : "調整ロイヤリティ支払報告書" ,
67
+ AutoPrint : true ,
68
+ })
69
+
70
+ doc .SetFooter (& HeaderFooter {
71
+ Text : "<center>*ロイヤリティは所得税法上の源泉徴収の対象となる使用料の支払に該当し、所定の源泉徴収税率を乗じて算出しています。</center>\n " +
72
+ "<center>*上記を確認の上、内容に異議がある場合には2週間以内に連絡下さいますようお願い致します。</center>" ,
73
+ Pagination : true ,
74
+ })
75
+
76
+ doc .SetVersion (GenerateInvoiceNumber ())
77
+
78
+ doc .SetDescription ("対象期間:2021年5月1日~2021年5月31日" )
79
+
80
+ doc .SetDate ("2021/07/10" )
81
+
82
+ doc .SetCompany (& Contact {
83
+ Name : "PostPrime(DKT株式会社)" ,
84
+ Address : & Address {Country : " " , City : " " , Address : " " , Address2 : " " , PostalCode : " " },
85
+ })
86
+
87
+ doc .SetCustomer (
88
+ & Contact {
89
+ Name : "安部 慎之介 様" ,
90
+ Address : & Address {
91
+ Address : "港区芝浦3-8-1" ,
92
+ Address2 : "ホゲホゲビル 3F" ,
93
+ PostalCode : "1080023" ,
94
+ City : "東京都" ,
95
+ Country : "日本" ,
96
+ },
97
+ Email : "abe.shinosuke@gmail.com" ,
98
+ InvoiceRegistrationNumber : "T1234567891234" ,
99
+ },
100
+ )
101
+
102
+ //doc.AppendItem(&Item{Name: "対象期間のDKTの売上", Total: 900000, Tax: &Tax{Amount: 90000}})
103
+
104
+ doc .SetAfterCommission (& AfterCommission {Amount : 630000 , ConsumptionTax : 64545 , IsDomesticCreator : true })
105
+ doc .SetWithholdingTax (& WithholdingTax {Amount : 64323 })
106
+ doc .SetPaymentFree (& PaymentFree {Amount : 35244 })
107
+ doc .SetPaidAmount (& PaidAmount {Amount : 593433 , PayoutDate : "2021年11月30日" })
108
+
109
+ pdf , err := doc .Build ()
110
+ if err != nil {
111
+ t .Errorf (err .Error ())
112
+ }
113
+
114
+ err = pdf .OutputFileAndClose ("payment_details_example.pdf" )
115
+
116
+ if err != nil {
117
+ t .Errorf (err .Error ())
118
+ }
119
+ }
0 commit comments