parent
911ebea909
commit
a1899a8ac9
|
@ -40,6 +40,9 @@ type TaxType struct {
|
||||||
// Category
|
// Category
|
||||||
Category string `json:"Category,omitempty"`
|
Category string `json:"Category,omitempty"`
|
||||||
|
|
||||||
|
// Type of tax chaining
|
||||||
|
ChainType string `json:"ChainType,omitempty"`
|
||||||
|
|
||||||
// Collector Domain Id
|
// Collector Domain Id
|
||||||
CollectorDomainID string `json:"CollectorDomainID,omitempty"`
|
CollectorDomainID string `json:"CollectorDomainID,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,18 @@ type TaxReturnPanel struct {
|
||||||
// cannabis c o g s total
|
// cannabis c o g s total
|
||||||
CannabisCOGSTotal float64 `json:"CannabisCOGSTotal,omitempty"`
|
CannabisCOGSTotal float64 `json:"CannabisCOGSTotal,omitempty"`
|
||||||
|
|
||||||
|
// cannabis gross margin
|
||||||
|
CannabisGrossMargin []float64 `json:"CannabisGrossMargin"`
|
||||||
|
|
||||||
|
// cannabis gross margin percentage average
|
||||||
|
CannabisGrossMarginPercentageAverage float64 `json:"CannabisGrossMarginPercentageAverage,omitempty"`
|
||||||
|
|
||||||
|
// cannabis gross margin perentage
|
||||||
|
CannabisGrossMarginPerentage []float64 `json:"CannabisGrossMarginPerentage"`
|
||||||
|
|
||||||
|
// cannabis gross margin total
|
||||||
|
CannabisGrossMarginTotal float64 `json:"CannabisGrossMarginTotal,omitempty"`
|
||||||
|
|
||||||
// cannabis revenue
|
// cannabis revenue
|
||||||
CannabisRevenue []float64 `json:"CannabisRevenue"`
|
CannabisRevenue []float64 `json:"CannabisRevenue"`
|
||||||
|
|
||||||
|
@ -106,6 +118,18 @@ type TaxReturnPanel struct {
|
||||||
// estimated discounts total
|
// estimated discounts total
|
||||||
EstimatedDiscountsTotal float64 `json:"EstimatedDiscountsTotal,omitempty"`
|
EstimatedDiscountsTotal float64 `json:"EstimatedDiscountsTotal,omitempty"`
|
||||||
|
|
||||||
|
// estimated gross margin
|
||||||
|
EstimatedGrossMargin []float64 `json:"EstimatedGrossMargin"`
|
||||||
|
|
||||||
|
// estimated gross margin percentage average
|
||||||
|
EstimatedGrossMarginPercentageAverage float64 `json:"EstimatedGrossMarginPercentageAverage,omitempty"`
|
||||||
|
|
||||||
|
// estimated gross margin perentage
|
||||||
|
EstimatedGrossMarginPerentage []float64 `json:"EstimatedGrossMarginPerentage"`
|
||||||
|
|
||||||
|
// estimated gross margin total
|
||||||
|
EstimatedGrossMarginTotal float64 `json:"EstimatedGrossMarginTotal,omitempty"`
|
||||||
|
|
||||||
// estimated sales taxes
|
// estimated sales taxes
|
||||||
EstimatedSalesTaxes []float64 `json:"EstimatedSalesTaxes"`
|
EstimatedSalesTaxes []float64 `json:"EstimatedSalesTaxes"`
|
||||||
|
|
||||||
|
@ -142,6 +166,18 @@ type TaxReturnPanel struct {
|
||||||
// merch c o g s total
|
// merch c o g s total
|
||||||
MerchCOGSTotal float64 `json:"MerchCOGSTotal,omitempty"`
|
MerchCOGSTotal float64 `json:"MerchCOGSTotal,omitempty"`
|
||||||
|
|
||||||
|
// merch gross margin
|
||||||
|
MerchGrossMargin []float64 `json:"MerchGrossMargin"`
|
||||||
|
|
||||||
|
// merch gross margin percentage
|
||||||
|
MerchGrossMarginPercentage []float64 `json:"MerchGrossMarginPercentage"`
|
||||||
|
|
||||||
|
// merch gross margin percentage average
|
||||||
|
MerchGrossMarginPercentageAverage float64 `json:"MerchGrossMarginPercentageAverage,omitempty"`
|
||||||
|
|
||||||
|
// merch gross margin total
|
||||||
|
MerchGrossMarginTotal float64 `json:"MerchGrossMarginTotal,omitempty"`
|
||||||
|
|
||||||
// merch revenue
|
// merch revenue
|
||||||
MerchRevenue []float64 `json:"MerchRevenue"`
|
MerchRevenue []float64 `json:"MerchRevenue"`
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"code.tnxs.net/taxnexus/lib/api/ledger/ledger_models"
|
"code.tnxs.net/taxnexus/lib/api/ledger/ledger_models"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GetAccountingRulesetsByAccountID is an accounting ruleset helper function
|
||||||
func GetAccountingRulesetsByAccountID(
|
func GetAccountingRulesetsByAccountID(
|
||||||
accountID string,
|
accountID string,
|
||||||
principal *User,
|
principal *User,
|
||||||
|
|
|
@ -6,12 +6,14 @@ import (
|
||||||
"code.tnxs.net/taxnexus/lib/api/geo/geo_models"
|
"code.tnxs.net/taxnexus/lib/api/geo/geo_models"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GeocodeAddressParams is a params type
|
||||||
type GeocodeAddressParams struct {
|
type GeocodeAddressParams struct {
|
||||||
BusinessAddress *Address
|
BusinessAddress *Address
|
||||||
Account *Account
|
Account *Account
|
||||||
Ref string
|
Ref string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GeocodeAddress returns a full Coordinate object in response to Business Address
|
||||||
func GeocodeAddress(params GeocodeAddressParams, principal *User) (*geo_models.CoordinateBasic, error) {
|
func GeocodeAddress(params GeocodeAddressParams, principal *User) (*geo_models.CoordinateBasic, error) {
|
||||||
if params.BusinessAddress == nil {
|
if params.BusinessAddress == nil {
|
||||||
sugar.Infof("ops.geocodeAddress: ❗ Business Address is null, ref = %s", params.Ref)
|
sugar.Infof("ops.geocodeAddress: ❗ Business Address is null, ref = %s", params.Ref)
|
||||||
|
|
|
@ -45,7 +45,7 @@ const dateTimeFormatAlt = "2006-01-02 15:04:05"
|
||||||
const dateFormatAlt = "1/2/2006"
|
const dateFormatAlt = "1/2/2006"
|
||||||
const countyGeocodeLength = 7
|
const countyGeocodeLength = 7
|
||||||
|
|
||||||
var maxTaxTypes = int64(2000)
|
var maxTaxTypes = int64(2000) //nolint:gomnd // it's a var const
|
||||||
|
|
||||||
// const cityGeocodeLength = 12
|
// const cityGeocodeLength = 12
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ func UnMarshalTaxType(s *geo_models.TaxType) *TaxType {
|
||||||
AgentID: s.AgentID,
|
AgentID: s.AgentID,
|
||||||
Amount: s.Amount,
|
Amount: s.Amount,
|
||||||
Category: s.Category,
|
Category: s.Category,
|
||||||
|
ChainType: s.ChainType,
|
||||||
CollectorDomainID: s.CollectorDomainID,
|
CollectorDomainID: s.CollectorDomainID,
|
||||||
CompanyID: s.CompanyID,
|
CompanyID: s.CompanyID,
|
||||||
ContactID: s.ContactID,
|
ContactID: s.ContactID,
|
||||||
|
@ -123,6 +124,7 @@ func (obj *TaxType) MarshalToSwagger() *geo_models.TaxType {
|
||||||
AgentID: obj.AgentID,
|
AgentID: obj.AgentID,
|
||||||
Amount: obj.Amount,
|
Amount: obj.Amount,
|
||||||
Category: obj.Category,
|
Category: obj.Category,
|
||||||
|
ChainType: obj.ChainType,
|
||||||
CollectorDomainID: obj.CollectorDomainID,
|
CollectorDomainID: obj.CollectorDomainID,
|
||||||
CompanyID: obj.CompanyID,
|
CompanyID: obj.CompanyID,
|
||||||
ContactID: obj.ContactID,
|
ContactID: obj.ContactID,
|
||||||
|
|
|
@ -25,6 +25,7 @@ type TaxType struct {
|
||||||
AgentID string
|
AgentID string
|
||||||
Amount float64
|
Amount float64
|
||||||
Category string
|
Category string
|
||||||
|
ChainType string
|
||||||
CollectorDomainID string
|
CollectorDomainID string
|
||||||
CompanyID string
|
CompanyID string
|
||||||
Contact Contact
|
Contact Contact
|
||||||
|
|
|
@ -2504,6 +2504,9 @@ definitions:
|
||||||
Category:
|
Category:
|
||||||
description: Category
|
description: Category
|
||||||
type: string
|
type: string
|
||||||
|
ChainType:
|
||||||
|
description: Type of tax chaining
|
||||||
|
type: string
|
||||||
CollectorDomainID:
|
CollectorDomainID:
|
||||||
description: Collector Domain Id
|
description: Collector Domain Id
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -432,6 +432,22 @@ definitions:
|
||||||
CannabisCOGSTotal:
|
CannabisCOGSTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
CannabisGrossMargin:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
CannabisGrossMarginPercentageAverage:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
CannabisGrossMarginPerentage:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
CannabisGrossMarginTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
CannabisRevenue:
|
CannabisRevenue:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -457,12 +473,6 @@ definitions:
|
||||||
CountySalesTaxesTotal:
|
CountySalesTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
DistrictCombinedRate:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
DistrictSalesTaxRate:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
DistrictCannabisBusinessTaxes:
|
DistrictCannabisBusinessTaxes:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -479,6 +489,14 @@ definitions:
|
||||||
DistrictCannabisDeliveryTaxesTotal:
|
DistrictCannabisDeliveryTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
DistrictCombinedRate:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
DistrictName:
|
||||||
|
type: string
|
||||||
|
DistrictSalesTaxRate:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
DistrictSalesTaxes:
|
DistrictSalesTaxes:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -487,26 +505,8 @@ definitions:
|
||||||
DistrictSalesTaxesTotal:
|
DistrictSalesTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
DistrictName:
|
|
||||||
type: string
|
|
||||||
DistrictType:
|
DistrictType:
|
||||||
type: string
|
type: string
|
||||||
EstimatedSalesTaxes:
|
|
||||||
items:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
type: array
|
|
||||||
EstimatedSalesTaxesTotal:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
EstimatedTotals:
|
|
||||||
items:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
type: array
|
|
||||||
EstimatedTotalsTotal:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
EstimatedBusinessTaxes:
|
EstimatedBusinessTaxes:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -515,14 +515,6 @@ definitions:
|
||||||
EstimatedBusinessTaxesTotal:
|
EstimatedBusinessTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
EstimatedCannabisTaxes:
|
|
||||||
items:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
type: array
|
|
||||||
EstimatedCannabisTaxesTotal:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
EstimatedCOGS:
|
EstimatedCOGS:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -531,6 +523,14 @@ definitions:
|
||||||
EstimatedCOGSTotal:
|
EstimatedCOGSTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
EstimatedCannabisTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
EstimatedCannabisTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
EstimatedDiscounts:
|
EstimatedDiscounts:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -539,6 +539,30 @@ definitions:
|
||||||
EstimatedDiscountsTotal:
|
EstimatedDiscountsTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
EstimatedGrossMargin:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
EstimatedGrossMarginPercentageAverage:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
EstimatedGrossMarginPerentage:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
EstimatedGrossMarginTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
EstimatedSalesTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
EstimatedSalesTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
EstimatedSubtotals:
|
EstimatedSubtotals:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -547,6 +571,14 @@ definitions:
|
||||||
EstimatedSubtotalsTotal:
|
EstimatedSubtotalsTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
EstimatedTotals:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
EstimatedTotalsTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
ExciseTaxes:
|
ExciseTaxes:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -567,6 +599,22 @@ definitions:
|
||||||
MerchCOGSTotal:
|
MerchCOGSTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
MerchGrossMargin:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
MerchGrossMarginPercentage:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
MerchGrossMarginPercentageAverage:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
MerchGrossMarginTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
MerchRevenue:
|
MerchRevenue:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -599,6 +647,14 @@ definitions:
|
||||||
SalesTaxesTotal:
|
SalesTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
StateCannabisTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
StateCannabisTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
StateSalesTaxRate:
|
StateSalesTaxRate:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
@ -610,14 +666,6 @@ definitions:
|
||||||
StateSalesTaxesTotal:
|
StateSalesTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
StateCannabisTaxes:
|
|
||||||
items:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
type: array
|
|
||||||
StateCannabisTaxesTotal:
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
TaxExemptRevenue:
|
TaxExemptRevenue:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
|
Loading…
Reference in New Issue