diff --git a/build.go b/build.go index cda8913..be9c610 100644 --- a/build.go +++ b/build.go @@ -264,21 +264,11 @@ func (d *Document) appendTotal(pdf *gofpdf.Fpdf) { pdf.SetX(102) pdf.SetFillColor(GreyBgColor[0], GreyBgColor[1], GreyBgColor[2]) pdf.Rect(100, pdf.GetY(), 40, 10, "F") - pdf.CellFormat(40, 10, formatAmount(d.PaidAmount1.Amount), "0", 0, "L", false, 0, "") + pdf.CellFormat(40, 10, formatAmount(d.PaidAmount.Amount), "0", 0, "L", false, 0, "") pdf.SetX(30) pdf.SetFillColor(GreyBgColor[0], GreyBgColor[1], GreyBgColor[2]) pdf.Rect(20, pdf.GetY(), 80, 10, "F") - pdf.CellFormat(60, 10, encodeString(d.Options.Payout1+" "+d.PaidAmount1.PayoutDate), "0", 0, "R", false, 0, "") + pdf.CellFormat(60, 10, encodeString(d.Options.Payout+" "+d.PaidAmount.PayoutDate), "0", 0, "R", false, 0, "") pdf.SetY(pdf.GetY() + 11) - - pdf.SetX(102) - pdf.SetFillColor(GreyBgColor[0], GreyBgColor[1], GreyBgColor[2]) - pdf.Rect(100, pdf.GetY(), 40, 10, "F") - pdf.CellFormat(40, 10, formatAmount(d.PaidAmount2.Amount), "0", 0, "L", false, 0, "") - - pdf.SetX(30) - pdf.SetFillColor(GreyBgColor[0], GreyBgColor[1], GreyBgColor[2]) - pdf.Rect(20, pdf.GetY(), 80, 10, "F") - pdf.CellFormat(60, 10, encodeString(d.Options.Payout2+" "+d.PaidAmount2.PayoutDate), "0", 0, "R", false, 0, "") } diff --git a/builder.go b/builder.go index b4bd750..a61f990 100644 --- a/builder.go +++ b/builder.go @@ -85,12 +85,3 @@ func (d *Document) SetPaidAmount(paidAmount *PaidAmount) *Document { d.PaidAmount = paidAmount return d } - -func (d *Document) SetPaidAmount1(paidAmount *PaidAmount) *Document { - d.PaidAmount1 = paidAmount - return d -} -func (d *Document) SetPaidAmount2(paidAmount *PaidAmount) *Document { - d.PaidAmount2 = paidAmount - return d -} diff --git a/document.go b/document.go index 187a220..f6ac3a2 100644 --- a/document.go +++ b/document.go @@ -29,6 +29,4 @@ type Document struct { WithholdingTax *WithholdingTax `json:"withholding_tax,omitempty"` PaymentFree *PaymentFree `json:"payment_free,omitempty"` PaidAmount *PaidAmount `json:"paid_amount,omitempty"` - PaidAmount1 *PaidAmount `json:"paid_amount_1,omitempty"` - PaidAmount2 *PaidAmount `json:"paid_amount_2,omitempty"` } diff --git a/generator_test.go b/generator_test.go index e2c96f3..22a6ea2 100644 --- a/generator_test.go +++ b/generator_test.go @@ -34,9 +34,7 @@ func TestNew(t *testing.T) { doc.SetAfterCommission(&AfterCommission{Amount: 630000, ConsumptionTax: 64545, IsDomesticCreator: true}) doc.SetWithholdingTax(&WithholdingTax{Amount: 64323}) doc.SetPaymentFree(&PaymentFree{Amount: 35244}) - doc.SetPaidAmount(&PaidAmount{Amount: 593433}) - doc.SetPaidAmount1(&PaidAmount{Amount: 304050, PayoutDate: "2021年11月30日"}) - doc.SetPaidAmount2(&PaidAmount{Amount: 304050, PayoutDate: "2021年12月31日"}) + doc.SetPaidAmount(&PaidAmount{Amount: 593433, PayoutDate: "2021年11月30日"}) pdf, err := doc.Build() if err != nil { diff --git a/options.go b/options.go index 8d62b39..139be7e 100644 --- a/options.go +++ b/options.go @@ -30,6 +30,5 @@ type Options struct { TextPaymentTotal string `default:"決済手数料" json:"text_payment_total,omitempty"` TextWithholdingTaxTotal string `default:"源泉所得税" json:"text_withholding_tax_total,omitempty"` TextTotalTotal string `default:"お支払い金額" json:"text_total_total,omitempty"` - Payout1 string `default:"第1回支払予定日" json:"payout_1,omitempty"` - Payout2 string `default:"第2回支払予定日" json:"payout_2,omitempty"` + Payout string `default:"支払予定日" json:"payout,omitempty"` } diff --git a/payment_details_example.pdf b/payment_details_example.pdf index e5dd404..b8cd126 100644 Binary files a/payment_details_example.pdf and b/payment_details_example.pdf differ