Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
PichuChen committed Mar 2, 2024
1 parent 4893c8f commit 4222136
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions mig/invoice_amount.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "fmt"

// 在 Mig 4.0 裡面的 Invoice/Amount 有兩種定義,一個是 A0401 開立發泡
// 另一個是 F0401 平台存證開立發票訊息,相同欄位名稱的驗證規則不一定相同
// 舉例來說,A0401 的 SalesAmount 的 fractionDigits 是 0
// 舉例來說,A0101 的 SalesAmount 的 fractionDigits 是 0
// 但是 F0401 的 SalesAmount 的 fractionDigits 是 7
// 相同部分的驗證會在 InvoiceAmount 物件被驗證,如果規則有不同時則會被拆分驗證

Expand All @@ -21,7 +21,7 @@ type InvoiceAmount struct {
Currency string `xml:"Currency,omitempty"`
}

type A0401InvoiceAmount struct {
type A0101InvoiceAmount struct {
InvoiceAmount
}

Expand Down Expand Up @@ -79,7 +79,7 @@ func (block *InvoiceAmount) Validate() error {
return nil
}

func (block *A0401InvoiceAmount) Validate() error {
func (block *A0101InvoiceAmount) Validate() error {
err := block.InvoiceAmount.Validate()
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions mig/invoice_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type InvoiceMain struct {
Reserved2 string `xml:"Reserved2,omitempty"`
}

type A0401InvoiceMain struct {
type A0101InvoiceMain struct {
InvoiceMain
}

Expand Down Expand Up @@ -134,7 +134,7 @@ func (block *InvoiceMain) Validate() error {
return nil
}

func (block *A0401InvoiceMain) Validate() error {
func (block *A0101InvoiceMain) Validate() error {
err := block.InvoiceMain.Validate()
if err != nil {
return err
Expand Down

0 comments on commit 4222136

Please sign in to comment.