-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
345 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{ | ||
"$schema": "https://gobl.org/draft-0/envelope", | ||
"head": { | ||
"uuid": "8a51fd30-2a27-11ee-be56-0242ac120002", | ||
"dig": { | ||
"alg": "sha256", | ||
"val": "4df4dd22fc22b163c693d45a7b2605340fd241c5bd8bfa0ba9132deb8e26b809" | ||
} | ||
}, | ||
"doc": { | ||
"$schema": "https://gobl.org/draft-0/bill/invoice", | ||
"$regime": "MX", | ||
"$addons": [ | ||
"mx-cfdi-v4" | ||
], | ||
"$tags": [ | ||
"simplified" | ||
], | ||
"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0", | ||
"type": "standard", | ||
"series": "TEST", | ||
"code": "00001", | ||
"issue_date": "2023-07-10", | ||
"currency": "MXN", | ||
"tax": { | ||
"ext": { | ||
"mx-cfdi-doc-type": "I", | ||
"mx-cfdi-issue-place": "21000" | ||
} | ||
}, | ||
"supplier": { | ||
"name": "ESCUELA KEMPER URGATE", | ||
"tax_id": { | ||
"country": "MX", | ||
"code": "EKU9003173C9" | ||
}, | ||
"ext": { | ||
"mx-cfdi-fiscal-regime": "601" | ||
} | ||
}, | ||
"lines": [ | ||
{ | ||
"i": 1, | ||
"quantity": "1", | ||
"item": { | ||
"name": "Cobro por tarjetas", | ||
"price": "10.00", | ||
"ext": { | ||
"mx-cfdi-prod-serv": "84141602" | ||
} | ||
}, | ||
"sum": "10.00", | ||
"discounts": [ | ||
{ | ||
"percent": "10.0%", | ||
"amount": "1.00" | ||
} | ||
], | ||
"taxes": [ | ||
{ | ||
"cat": "VAT", | ||
"rate": "standard", | ||
"percent": "16.0%" | ||
} | ||
], | ||
"total": "9.00" | ||
}, | ||
{ | ||
"i": 2, | ||
"quantity": "1", | ||
"item": { | ||
"name": "Porcentaje sobre GMV", | ||
"price": "10.00", | ||
"unit": "service", | ||
"ext": { | ||
"mx-cfdi-prod-serv": "80141628" | ||
} | ||
}, | ||
"sum": "10.00", | ||
"taxes": [ | ||
{ | ||
"cat": "VAT", | ||
"rate": "standard", | ||
"percent": "16.0%" | ||
} | ||
], | ||
"total": "10.00" | ||
} | ||
], | ||
"payment": { | ||
"terms": { | ||
"notes": "Condiciones de pago" | ||
} | ||
}, | ||
"totals": { | ||
"sum": "19.00", | ||
"total": "19.00", | ||
"taxes": { | ||
"categories": [ | ||
{ | ||
"code": "VAT", | ||
"rates": [ | ||
{ | ||
"key": "standard", | ||
"base": "19.00", | ||
"percent": "16.0%", | ||
"amount": "3.04" | ||
} | ||
], | ||
"amount": "3.04" | ||
} | ||
], | ||
"sum": "3.04" | ||
}, | ||
"tax": "3.04", | ||
"total_with_tax": "22.04", | ||
"payable": "22.04" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
$schema: "https://gobl.org/draft-0/bill/invoice" | ||
$addons: | ||
- "mx-cfdi-v4" | ||
$tags: | ||
- "simplified" | ||
uuid: "3aea7b56-59d8-4beb-90bd-f8f280d852a0" | ||
issue_date: "2023-07-10" | ||
series: "TEST" | ||
code: "00001" | ||
tax: | ||
ext: | ||
mx-cfdi-issue-place: "21000" | ||
supplier: | ||
name: "ESCUELA KEMPER URGATE" | ||
ext: | ||
mx-cfdi-fiscal-regime: "601" | ||
tax_id: | ||
country: "MX" | ||
code: "EKU9003173C9" | ||
lines: | ||
- quantity: "1" | ||
item: | ||
name: "Cobro por tarjetas" | ||
price: "10.00" | ||
ext: | ||
mx-cfdi-prod-serv: "84141602" | ||
discounts: | ||
- percent: "10.0%" | ||
taxes: | ||
- cat: "VAT" | ||
rate: "standard" | ||
- quantity: "1" | ||
item: | ||
name: "Porcentaje sobre GMV" | ||
price: "10.00" | ||
unit: "service" | ||
ext: | ||
mx-cfdi-prod-serv: "80141628" | ||
taxes: | ||
- cat: "VAT" | ||
rate: "standard" | ||
payment: | ||
terms: | ||
notes: "Condiciones de pago" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package uuid | ||
|
||
import ( | ||
"database/sql" | ||
"database/sql/driver" | ||
"fmt" | ||
) | ||
|
||
var _ driver.Valuer = UUID("") | ||
var _ sql.Scanner = (*UUID)(nil) | ||
|
||
// Value implements the driver.Valuer interface. | ||
func (u UUID) Value() (driver.Value, error) { | ||
return u.String(), nil | ||
} | ||
|
||
// Scan implements the sql.Scanner interface. | ||
// A 16-byte slice will be handled by UnmarshalBinary, while | ||
// a longer byte slice or a string will be handled by UnmarshalText. | ||
func (u *UUID) Scan(src interface{}) error { | ||
switch src := src.(type) { | ||
case UUID: | ||
*u = src | ||
return nil | ||
case []byte: | ||
if len(src) == Size { | ||
return u.UnmarshalBinary(src) | ||
} | ||
return u.UnmarshalText(src) | ||
case string: | ||
uu, err := Parse(src) | ||
*u = uu | ||
return err | ||
} | ||
|
||
return fmt.Errorf("cannot convert %T to UUID", src) | ||
} |
Oops, something went wrong.