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