parent
c1b130c5c6
commit
18bebd0c09
|
@ -839,7 +839,7 @@ type TransactionsResponseValuesItems0CartItemsItems0 struct {
|
||||||
BatchID string `json:"batchId,omitempty"`
|
BatchID string `json:"batchId,omitempty"`
|
||||||
|
|
||||||
// batch sku
|
// batch sku
|
||||||
BatchSku float64 `json:"batchSku,omitempty"`
|
BatchSku string `json:"batchSku,omitempty"`
|
||||||
|
|
||||||
// calc cultivation tax
|
// calc cultivation tax
|
||||||
CalcCultivationTax float64 `json:"calcCultivationTax,omitempty"`
|
CalcCultivationTax float64 `json:"calcCultivationTax,omitempty"`
|
||||||
|
|
12
app/mysql.go
12
app/mysql.go
|
@ -11,19 +11,25 @@ import (
|
||||||
var MyDB *sql.DB
|
var MyDB *sql.DB
|
||||||
|
|
||||||
// InitDB initializes the MySQL database using DSN information from the config file
|
// InitDB initializes the MySQL database using DSN information from the config file
|
||||||
|
// and disables foreign key check's because we maintain referential integreity to allow
|
||||||
|
// for mass batch input.
|
||||||
|
//
|
||||||
func InitDB() {
|
func InitDB() {
|
||||||
var db *sql.DB
|
var db *sql.DB
|
||||||
var err error
|
var err error
|
||||||
if GetDBMS() == "mysql" {
|
if GetDBMS() != "mysql" {
|
||||||
db, err = sql.Open("mysql", GetDSN())
|
|
||||||
} else {
|
|
||||||
sugar.Fatalf("app.InitDB: 💣 ⛔ unknown DBMS: %s", GetDBMS())
|
sugar.Fatalf("app.InitDB: 💣 ⛔ unknown DBMS: %s", GetDBMS())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
db, err = sql.Open("mysql", GetDSN())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
sugar.Fatalf("app.InitDB: 💣 ⛔ Can't log on to DBMS host: %w", err)
|
sugar.Fatalf("app.InitDB: 💣 ⛔ Can't log on to DBMS host: %w", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
_, err = db.Exec("set foreign_key_check=0")
|
||||||
|
if err != nil {
|
||||||
|
sugar.Warnf("app.InitDB: 💣⛔ can't disable foreign key check")
|
||||||
|
}
|
||||||
MyDB = db
|
MyDB = db
|
||||||
sugar.Debugf("app.InitDB: 👍 📤 %s", GetDBMS())
|
sugar.Debugf("app.InitDB: 👍 📤 %s", GetDBMS())
|
||||||
}
|
}
|
||||||
|
|
|
@ -6501,7 +6501,7 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
batchSku:
|
batchSku:
|
||||||
example: 0
|
example: 0
|
||||||
type: number
|
type: string
|
||||||
calcCultivationTax:
|
calcCultivationTax:
|
||||||
example: 0
|
example: 0
|
||||||
type: number
|
type: number
|
||||||
|
|
|
@ -16,7 +16,7 @@ info:
|
||||||
contact:
|
contact:
|
||||||
email: "noc@taxnexus.net"
|
email: "noc@taxnexus.net"
|
||||||
license:
|
license:
|
||||||
name: "Proprietary"
|
name: "Proprietary - Copyright (c) 2018-2021 by Taxnexus, Inc."
|
||||||
termsOfService: "https://www.taxnexus.com/terms/"
|
termsOfService: "https://www.taxnexus.com/terms/"
|
||||||
description: |
|
description: |
|
||||||
# Taxnexus Vendor Gateway
|
# Taxnexus Vendor Gateway
|
||||||
|
|
Loading…
Reference in New Issue