package app

import (
	"database/sql"

	"code.tnxs.net/taxnexus/lib/api/ops/ops_models"
)

// InvoiceActivityWrapper wraps the object with workflow params
type InvoiceActivityWrapper struct {
	Obj      ops_models.Invoice
	APIKey   string
	SagaID   string
	SagaType string
}

// Invoice is the in-memory struct for invoices
type Invoice struct {
	ID                       string
	AccountID                string
	Advance                  bool
	Amount                   float64
	AmountAdjustment         float64
	AmountDue                float64
	AmountPaid               float64
	AuditMessage             string
	BillingAddress           *Address
	BillingContact           string
	BillingRunID             string
	BusinessAddress          *Address
	BusinessTax              float64
	CannabisTax              float64
	ContractID               string
	CoordinateID             string
	CreatedByID              string
	CreatedDate              sql.NullTime
	CustomerID               string
	DateIssued               sql.NullTime
	DaysDue                  int64
	DepositAmount            float64
	Description              string
	Discount                 float64
	EstimatedAmount          float64
	EstimatedBusinessTax     float64
	EstimatedCannabisTax     float64
	EstimatedCOGS            float64
	EstimatedDiscount        float64
	EstimatedSalesTax        float64
	EstimatedSubtotal        float64
	IngestID                 string
	InvoiceDate              sql.NullTime
	InvoiceNumber            string
	IsInternational          bool
	IssuedAccountBalance     float64
	IssuedAmountDue          float64
	IssuedByID               string
	IsValid                  bool
	Items                    []*InvoiceItem
	JobID                    string
	LastModifiedByID         string
	LastModifiedDate         sql.NullTime
	MinimumPaymentDue        float64
	MonthlyAmount            float64
	OpportunityID            string
	OrderID                  string
	OverDue0                 float64
	OverDue120               float64
	OverDue30                float64
	OverDue45                float64
	OverDue60                float64
	OverDue90                float64
	ParentFK                 string
	PartnerAccountID         string
	PaymentDue               sql.NullTime
	PaymentMethodDescription string
	PaymentMethodID          string
	PaymentTerms             string
	PeriodID                 string
	PlaceGeoCode             string
	Posted                   bool
	PriorAccountBalance      float64
	PriorAdjustments         float64
	PriorInvoiceAmount       float64
	PriorInvoiceDate         sql.NullTime
	PriorInvoiceID           string
	PriorPaymentAmount       float64
	PriorPaymentDate         sql.NullTime
	PriorPaymentID           string
	PriorPaymentMemo         string
	Prorated                 bool
	ProratedDays             float64
	PurchaseAmount           float64
	QuoteID                  string
	RatingEngineID           string
	Ref                      string
	Reference                string
	SalesRegulation          string
	SalesTax                 float64
	ScheduledPaymentDate     sql.NullTime
	ServiceTerm              string
	ShippingAddress          *Address
	ShippingHandling         float64
	Status                   string
	Subtotal                 float64
	TaxTransactions          []*TaxTransaction
	TelecomTax               float64
	TemplateID               string
	TenantID                 string
	Total                    *Total
	TotalID                  string
	Type                     string
}
