sales

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SaleDocumentTypeInvWayBill    = "INVWAYBILL"
	SaleDocumentTypeCASHINVOICE   = "CASHINVOICE"
	SaleDocumentTypeWayBill       = "WAYBILL"
	SaleDocumentTypePrepayment    = "PREPAYMENT"
	SaleDocumentTypeOffer         = "OFFER"
	SaleDocumentTypeExportInvoice = "EXPORTINVOICE"
	SaleDocumentTypeReservation   = "RESERVATION"
	SaleDocumentTypeCreditInvoice = "CREDITINVOICE"
	SaleDocumentTypeOrder         = "ORDER"
	SaleDocumentTypeInvoice       = "INVOICE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentsManger added in v1.9.1

type AssignmentsManger interface {
	SaveAssignment(ctx context.Context, filters map[string]string) (int64, error)
}

type BaseDocument

type BaseDocument struct {
	ID     int    `json:"id"`
	Number string `json:"number"`
	Type   string `json:"type"`
	Date   string `json:"date"`
}

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(client *common.Client) *Client

func (*Client) CalculateShoppingCart

func (cli *Client) CalculateShoppingCart(ctx context.Context, filters map[string]string) (*ShoppingCartTotals, error)

func (*Client) DeleteDocument

func (cli *Client) DeleteDocument(ctx context.Context, filters map[string]string) error

func (*Client) GetPayments

func (cli *Client) GetPayments(ctx context.Context, filters map[string]string) ([]PaymentInfo, error)

func (*Client) GetPaymentsBulk added in v1.14.0

func (cli *Client) GetPaymentsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetPaymentsResponseBulk, error)

func (*Client) GetProjectStatus

func (cli *Client) GetProjectStatus(ctx context.Context, filters map[string]string) ([]ProjectStatus, error)

GetProjectStatus will list projects statuses according to specified filters.

func (*Client) GetProjects

func (cli *Client) GetProjects(ctx context.Context, filters map[string]string) ([]Project, error)

GetProjects will list projects according to specified filters.

func (*Client) GetSalesDocuments

func (cli *Client) GetSalesDocuments(ctx context.Context, filters map[string]string) ([]SaleDocument, error)

func (*Client) GetSalesDocumentsBulk added in v1.7.5

func (cli *Client) GetSalesDocumentsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetSaleDocumentResponseBulk, error)

func (*Client) GetSalesDocumentsWithStatus added in v1.14.0

func (cli *Client) GetSalesDocumentsWithStatus(ctx context.Context, filters map[string]string) (*GetSalesDocumentResponse, error)

func (*Client) GetSalesReport added in v1.14.0

func (cli *Client) GetSalesReport(ctx context.Context, filters map[string]string) (*GetSalesReport, error)

func (*Client) GetVatRates

func (cli *Client) GetVatRates(ctx context.Context, filters map[string]string) (VatRates, error)

GetVatRatesByVatRateID ...

func (*Client) GetVatRatesBulk added in v1.14.0

func (cli *Client) GetVatRatesBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetVatRatesResponseBulk, error)

func (*Client) SaveAssignment added in v1.9.0

func (cli *Client) SaveAssignment(ctx context.Context, filters map[string]string) (int64, error)

GetVatRatesByVatRateID ...

func (*Client) SavePayment

func (cli *Client) SavePayment(ctx context.Context, filters map[string]string) (int64, error)

func (*Client) SavePurchaseDocument

func (cli *Client) SavePurchaseDocument(ctx context.Context, filters map[string]string) (PurchaseDocImportReports, error)

func (*Client) SaveSalesDocument

func (cli *Client) SaveSalesDocument(ctx context.Context, filters map[string]string) (SaleDocImportReports, error)

func (*Client) SaveVatRate added in v1.13.1

func (cli *Client) SaveVatRate(ctx context.Context, filters map[string]string) (*SaveVatRateResult, error)

func (*Client) SaveVatRateBulk added in v1.13.1

func (cli *Client) SaveVatRateBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SaveVatRateResponseBulk, error)

func (*Client) SaveVatRateComponent added in v1.13.1

func (cli *Client) SaveVatRateComponent(ctx context.Context, filters map[string]string) (*SaveVatRateComponentResult, error)

func (*Client) SaveVatRateComponentBulk added in v1.13.1

func (cli *Client) SaveVatRateComponentBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SaveVatRateComponentResponseBulk, error)

type DocumentManager

type DocumentManager interface {
	SaveSalesDocument(ctx context.Context, filters map[string]string) (SaleDocImportReports, error)
	GetSalesDocuments(ctx context.Context, filters map[string]string) ([]SaleDocument, error)
	GetSalesDocumentsWithStatus(ctx context.Context, filters map[string]string) (*GetSalesDocumentResponse, error)
	GetSalesDocumentsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetSaleDocumentResponseBulk, error)
	DeleteDocument(ctx context.Context, filters map[string]string) error
	SavePurchaseDocument(ctx context.Context, filters map[string]string) (PurchaseDocImportReports, error)
}

type GetPaymentsBulkItem added in v1.14.0

type GetPaymentsBulkItem struct {
	Status       sharedCommon.StatusBulk `json:"status"`
	PaymentInfos []PaymentInfo           `json:"records"`
}

type GetPaymentsResponseBulk added in v1.14.0

type GetPaymentsResponseBulk struct {
	Status    sharedCommon.Status   `json:"status"`
	BulkItems []GetPaymentsBulkItem `json:"requests"`
}

type GetProjectStatusesResponse

type GetProjectStatusesResponse struct {
	Status          common2.Status  `json:"status"`
	ProjectStatuses []ProjectStatus `json:"records"`
}

type GetProjectsResponse

type GetProjectsResponse struct {
	Status   common2.Status `json:"status"`
	Projects []Project      `json:"records"`
}

type GetSaleDocumentBulkItem added in v1.7.5

type GetSaleDocumentBulkItem struct {
	Status        sharedCommon.StatusBulk `json:"status"`
	SaleDocuments []SaleDocument          `json:"records"`
}

type GetSaleDocumentResponseBulk added in v1.7.5

type GetSaleDocumentResponseBulk struct {
	Status    sharedCommon.Status       `json:"status"`
	BulkItems []GetSaleDocumentBulkItem `json:"requests"`
}

type GetSalesDocumentResponse

type GetSalesDocumentResponse struct {
	Status         sharedCommon.Status `json:"status"`
	SalesDocuments []SaleDocument      `json:"records"`
}

type GetSalesReport added in v1.14.0

type GetSalesReport struct {
	Status  common2.Status `json:"status"`
	Records []struct {
		ReportLink string `json:"reportLink"`
	}
}

type GetVatRatesBulkItem added in v1.14.0

type GetVatRatesBulkItem struct {
	Status   sharedCommon.StatusBulk `json:"status"`
	VatRates []VatRate               `json:"records"`
}

type GetVatRatesResponse added in v1.14.0

type GetVatRatesResponse struct {
	Status   sharedCommon.Status `json:"status"`
	VatRates []VatRate           `json:"records"`
}

GetVatRatesResponse ...

type GetVatRatesResponseBulk added in v1.14.0

type GetVatRatesResponseBulk struct {
	Status    sharedCommon.Status   `json:"status"`
	BulkItems []GetVatRatesBulkItem `json:"requests"`
}

type InvoiceRow

type InvoiceRow struct {
	RowID             string      `json:"rowID"`
	StableRowID       string      `json:"stableRowID"`
	ProductID         string      `json:"productID"`
	ItemName          string      `json:"itemName"`
	Barcode           string      `json:"barcode"`
	VatrateID         string      `json:"vatrateID"`
	Amount            string      `json:"amount"`
	Price             string      `json:"price"`
	Discount          string      `json:"discount"`
	BillingStartDate  string      `json:"billingStartDate"`
	BillingEndDate    string      `json:"billingEndDate"`
	Code              string      `json:"code"`
	Code2             string      `json:"code2"`
	FinalNetPrice     float64     `json:"finalNetPrice"`
	FinalPriceWithVAT float64     `json:"finalPriceWithVAT"`
	RowNetTotal       float64     `json:"rowNetTotal"`
	RowVAT            float64     `json:"rowVAT"`
	RowTotal          float64     `json:"rowTotal"`
	CampaignIDs       string      `json:"campaignIDs"`
	Jdoc              interface{} `json:"jdoc"`
}

type Manager

type Manager interface {
	ProjectManager
	DocumentManager
	VatRateManager
	AssignmentsManger
	ReportsManager
	//payment requests
	SavePayment(ctx context.Context, filters map[string]string) (int64, error)
	GetPayments(ctx context.Context, filters map[string]string) ([]PaymentInfo, error)
	GetPaymentsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetPaymentsResponseBulk, error)

	//shopping cart
	CalculateShoppingCart(ctx context.Context, filters map[string]string) (*ShoppingCartTotals, error)
}

type NetTotalsByTaxRate

type NetTotalsByTaxRate struct {
	VatrateID int     `json:"vatrateID"`
	Total     float64 `json:"total"`
}

type PaymentAttribute

type PaymentAttribute struct {
	AttributeName  string `json:"attributeName"`
	AttributeType  string `json:"attributeType"`
	AttributeValue string `json:"attributeValue"`
}

type PaymentInfo

type PaymentInfo struct {
	DocumentID             int    `json:"documentID"` // Invoice ID
	PaymentID              int    `json:"paymentID"`
	CustomerID             int    `json:"customerID"`
	TypeID                 string `json:"typeID"`
	BankTransactionID      int    `json:"bankTransactionID"`
	Type                   string `json:"type"` // CASH, TRANSFER, CARD, CREDIT, GIFTCARD, CHECK, TIP
	Date                   string `json:"date"`
	Sum                    string `json:"sum"`
	CardHolder             string `json:"cardHolder"`
	CardType               string `json:"cardType"`
	CardNumber             string `json:"cardNumber"`
	AuthorizationCode      string `json:"authorizationCode"`
	ReferenceNumber        string `json:"referenceNumber"`
	CurrencyRate           string `json:"currencyRate"`
	CashPaid               string `json:"cashPaid"`
	CashChange             string `json:"cashChange"`
	CurrencyCode           string `json:"currencyCode"` // EUR, USD
	Info                   string `json:"info"`         // Information about the payer or payment transaction
	Added                  uint64 `json:"added"`
	IsPrepayment           uint64 `json:"isPrepayment"`
	StoreCredit            uint64 `json:"storeCredit"`
	BankAccount            string `json:"bankAccount"`
	BankDocumentNumber     string `json:"bankDocumentNumber"`
	BankDate               string `json:"bankDate"`
	BankPayerAccount       string `json:"bankPayerAccount"`
	BankPayerName          string `json:"bankPayerName"`
	BankPayerCode          string `json:"bankPayerCode"`
	BankSum                string `json:"bankSum"`
	BankReferenceNumber    string `json:"bankReferenceNumber"`
	BankDescription        string `json:"bankDescription"`
	BankCurrency           string `json:"bankCurrency"`
	ArchivalNumber         string `json:"archivalNumber"`
	PaymentServiceProvider string `json:"paymentServiceProvider"`
	Aid                    string `json:"aid"`
	ApplicationLabel       string `json:"applicationLabel"`
	PinStatement           string `json:"pinStatement"`
	CryptogramType         string `json:"cryptogramType"`
	Cryptogram             string `json:"cryptogram"`
	ExpirationDate         string `json:"expirationDate"`
	EntryMethod            string `json:"entryMethod"`
	TransactionNumber      string `json:"transactionNumber"`
	TransactionId          string `json:"transactionId"`
	TransactionType        string `json:"transactionType"`
	TransactionTime        int64  `json:"transactionTime"`
	KlarnaPaymentID        string `json:"klarnaPaymentID"`
	CertificateBalance     string `json:"certificateBalance"`
	StatusCode             string `json:"statusCode"`
	StatusMessage          string `json:"statusMessage"`
	GiftCardVatRateID      int    `json:"giftCardVatRateID"`
	LastModified           uint64 `json:"lastModified"`
}

type PaymentStatus

type PaymentStatus string

type PaymentType

type PaymentType string

type PostSalesDocumentResponse

type PostSalesDocumentResponse struct {
	Status        sharedCommon.Status  `json:"status"`
	ImportReports SaleDocImportReports `json:"records"`
}

type Project

type Project struct {
	ProjectID    uint   `json:"projectID"`
	Name         string `json:"name"`
	CustomerID   uint   `json:"customerID"`
	CustomerName string `json:"customerName"`
	EmployeeID   uint   `json:"employeeID"`
	EmployeeName string `json:"employeeName"`
	TypeID       uint   `json:"typeID"`
	TypeName     string `json:"typeName"`
	StatusID     uint   `json:"statusID"`
	StatusName   string `json:"statusName"`
	StartDate    string `json:"startDate"`
	EndDate      string `json:"endDate"`
	Notes        string `json:"notes"`
	LastModified uint64 `json:"lastModified"`
}

type ProjectManager

type ProjectManager interface {
	GetProjects(ctx context.Context, filters map[string]string) ([]Project, error)
	GetProjectStatus(ctx context.Context, filters map[string]string) ([]ProjectStatus, error)
}

type ProjectStatus

type ProjectStatus struct {
	ProjectStatusID uint   `json:"projectStatusID"`
	Name            string `json:"name"`
	Finished        byte   `json:"finished"`
	Added           uint64 `json:"added"`
	LastModified    uint64 `json:"lastModified"`
}

type PurchaseDocImportReport

type PurchaseDocImportReport struct {
	InvoiceID    int     `json:"invoiceID"`
	CustomNumber string  `json:"customNumber"`
	Rounding     int     `json:"rounding"`
	Total        float64 `json:"total"`
}

type PurchaseDocImportReports

type PurchaseDocImportReports []PurchaseDocImportReport

type ReportsManager added in v1.14.0

type ReportsManager interface {
	GetSalesReport(ctx context.Context, filters map[string]string) (*GetSalesReport, error)
}

type SaleDocImportReport

type SaleDocImportReport struct {
	InvoiceID    int     `json:"invoiceID"`
	InvoiceNo    string  `json:"invoiceNo"`
	CustomNumber string  `json:"customNumber"`
	InvoiceLink  string  `json:"invoiceLink"`
	ReceiptLink  string  `json:"receiptLink"`
	Net          float64 `json:"net"`
	Vat          float64 `json:"vat"`
	Rounding     float64 `json:"rounding"`
	Total        float64 `json:"total"`
}

type SaleDocImportReports

type SaleDocImportReports []SaleDocImportReport

type SaleDocument

type SaleDocument struct {
	ID            int    `json:"id"`
	CurrencyRate  string `json:"currencyRate"`
	WarehouseID   int    `json:"warehouseID"`
	WarehouseName string `json:"warehouseName"`
	Number        string `json:"number"`
	Date          string `json:"date"`
	DeliveryDate  string `json:"deliveryDate"`
	Time          string `json:"time"`

	//Payer if invoice_client_is_payer = 1
	ClientID    int    `json:"clientID"`
	ClientEmail string `json:"clientEmail"`
	//Recipient if invoice_client_is_payer = 1
	ShipToID int `json:"shipToID"`
	//Recipient if invoice_client_is_payer = 0
	CustomerID int `json:"customerID"`
	//Payer if invoice_client_is_payer = 0
	PayerID int `json:"payerID"`

	AddressID                       int                 `json:"addressID"`
	Address                         string              `json:"address"`
	PayerAddressID                  int                 `json:"payerAddressID"`
	ShipToAddressID                 string              `json:"shipToAddressID"`
	ContactID                       int                 `json:"contactID"`
	EmployeeID                      int                 `json:"employeeID"`
	PaymentDays                     string              `json:"paymentDays"`
	Confirmed                       string              `json:"confirmed"`
	Notes                           string              `json:"notes"`
	InternalNotes                   string              `json:"internalNotes"`
	LastModified                    int                 `json:"lastModified"`
	PackingUnitsDescription         string              `json:"packingUnitsDescription"`
	InventoryTransactionDate        string              `json:"inventoryTransactionDate"`
	CurrencyCode                    string              `json:"currencyCode"`
	ContactName                     string              `json:"contactName"`
	ClientName                      string              `json:"clientName"`
	ClientCardNumber                string              `json:"clientCardNumber"`
	Type                            string              `json:"type"`
	InvoiceState                    string              `json:"invoiceState"`
	PaymentType                     string              `json:"paymentType"`
	BaseDocuments                   []BaseDocument      `json:"baseDocuments"`
	FollowUpDocuments               []BaseDocument      `json:"followUpDocuments"`
	NetTotal                        float64             `json:"netTotal"`
	VatTotal                        float64             `json:"vatTotal"`
	VatTotalsByTaxRates             VatTotalsByTaxRates `json:"vatTotalsByTaxRate"`
	Rounding                        float64             `json:"rounding"`
	Total                           float64             `json:"total"`
	Paid                            string              `json:"paid"`
	PrintDiscounts                  int                 `json:"printDiscounts"`
	ReferenceNumber                 string              `json:"referenceNumber"`
	CustomReferenceNumber           string              `json:"customReferenceNumber"`
	PaymentStatus                   string              `json:"paymentStatus"`
	Penalty                         string              `json:"penalty"`
	InvoiceLink                     string              `json:"invoiceLink"`
	EmployeeName                    string              `json:"employeeName"`
	TransportTypeName               string              `json:"transportTypeName"`
	ShipToName                      string              `json:"shipToName"`
	ShippingDate                    string              `json:"shippingDate"`
	InvoiceRows                     []InvoiceRow        `json:"rows"`
	Attributes                      []PaymentAttribute  `json:"attributes"`
	ExportInvoiceType               string              `json:"exportInvoiceType"`
	PointOfSaleID                   int                 `json:"pointOfSaleID"`
	PricelistID                     string              `json:"pricelistID"`
	PointOfSaleName                 string              `json:"pointOfSaleName"`
	ClientFactoringContractNumber   string              `json:"clientFactoringContractNumber"`
	ClientPaysViaFactoring          int                 `json:"clientPaysViaFactoring"`
	PayerName                       string              `json:"payerName"`
	PayerAddress                    string              `json:"payerAddress"`
	PayerFactoringContractNumber    string              `json:"payerFactoringContractNumber"`
	PayerPaysViaFactoring           string              `json:"payerPaysViaFactoring"`
	ShipToAddress                   string              `json:"shipToAddress"`
	ShipToContactID                 int                 `json:"shipToContactID"`
	ShipToContactName               string              `json:"shipToContactName"`
	ProjectID                       int                 `json:"projectID"`
	PreviousReturnsExist            int                 `json:"previousReturnsExist"`
	NetTotalsByTaxRate              VatTotalsByTaxRates `json:"netTotalsByTaxRate"`
	ExternalNetTotal                float64             `json:"externalNetTotal"`
	ExternalVatTotal                float64             `json:"externalVatTotal"`
	ExternalRounding                float64             `json:"externalRounding"`
	ExternalTotal                   float64             `json:"externalTotal"`
	PaymentTypeID                   int                 `json:"paymentTypeID"`
	TaxExemptCertificateNumber      string              `json:"taxExemptCertificateNumber"`
	PackerID                        int                 `json:"packerID"`
	TrackingNumber                  string              `json:"trackingNumber"`
	FulfillmentStatus               string              `json:"fulfillmentStatus"`
	Cost                            float64             `json:"cost"`
	ReserveGoods                    int                 `json:"reserveGoods"`
	ReserveGoodsUntilDate           string              `json:"reserveGoodsUntilDate"`
	DeliveryTypeID                  int                 `json:"deliveryTypeID"`
	DeliveryTypeName                string              `json:"deliveryTypeName"`
	TriangularTransaction           string              `json:"triangularTransaction"`
	PurchaseOrderDone               string              `json:"purchaseOrderDone"`
	TransactionTypeID               int                 `json:"transactionTypeID"`
	TransactionTypeName             string              `json:"transactionTypeName"`
	TransportTypeID                 int                 `json:"transportTypeID"`
	DeliveryTerms                   string              `json:"deliveryTerms"`
	EuInvoiceType                   string              `json:"euInvoiceType"`
	DeliveryTermsLocation           string              `json:"deliveryTermsLocation"`
	DeliveryOnlyWhenAllItemsInStock int                 `json:"deliveryOnlyWhenAllItemsInStock"`
	LastModifierUsername            string              `json:"lastModifierUsername"`
	Added                           int                 `json:"added"`
	ReceiptLink                     string              `json:"receiptLink"`
	AmountAddedToStoreCredit        json.Number         `json:"amountAddedToStoreCredit"`
	AmountPaidWithStoreCredit       json.Number         `json:"amountPaidWithStoreCredit"`
	ApplianceID                     int                 `json:"applianceID"`
	ApplianceReference              string              `json:"applianceReference"`
	AssignmentID                    int                 `json:"assignmentID"`
	VehicleMileage                  int                 `json:"vehicleMileage"`
}

type SaleDocumentsListingDataProvider added in v1.7.5

type SaleDocumentsListingDataProvider struct {
	// contains filtered or unexported fields
}

func NewSaleDocumentsListingDataProvider added in v1.7.5

func NewSaleDocumentsListingDataProvider(erplyClient Manager) *SaleDocumentsListingDataProvider

func (*SaleDocumentsListingDataProvider) Count added in v1.7.5

func (l *SaleDocumentsListingDataProvider) Count(ctx context.Context, filters map[string]interface{}) (int, error)

func (*SaleDocumentsListingDataProvider) Read added in v1.7.5

func (l *SaleDocumentsListingDataProvider) Read(ctx context.Context, bulkFilters []map[string]interface{}, callback func(item interface{})) error

type SavePurchaseDocumentResponse

type SavePurchaseDocumentResponse struct {
	Status        sharedCommon.Status      `json:"status"`
	ImportReports PurchaseDocImportReports `json:"records"`
}

type SaveVatRateBulkItem added in v1.13.1

type SaveVatRateBulkItem struct {
	Status  sharedCommon.StatusBulk `json:"status"`
	Records []SaveVatRateResult     `json:"records"`
}

type SaveVatRateComponentBulkItem added in v1.13.1

type SaveVatRateComponentBulkItem struct {
	Status  sharedCommon.StatusBulk      `json:"status"`
	Records []SaveVatRateComponentResult `json:"records"`
}

type SaveVatRateComponentResponseBulk added in v1.13.1

type SaveVatRateComponentResponseBulk struct {
	Status    sharedCommon.Status            `json:"status"`
	BulkItems []SaveVatRateComponentBulkItem `json:"requests"`
}

type SaveVatRateComponentResult added in v1.13.1

type SaveVatRateComponentResult struct {
	VatRateComponentID int `json:"vatRateComponentID"`
}

type SaveVatRateComponentResultResponse added in v1.13.1

type SaveVatRateComponentResultResponse struct {
	Status                     sharedCommon.Status          `json:"status"`
	SaveVatRateComponentResult []SaveVatRateComponentResult `json:"records"`
}

type SaveVatRateResponseBulk added in v1.13.1

type SaveVatRateResponseBulk struct {
	Status    sharedCommon.Status   `json:"status"`
	BulkItems []SaveVatRateBulkItem `json:"requests"`
}

type SaveVatRateResult added in v1.13.1

type SaveVatRateResult struct {
	VatRateID int `json:"vatRateID"`
}

type SaveVatRateResultResponse added in v1.13.1

type SaveVatRateResultResponse struct {
	Status            sharedCommon.Status `json:"status"`
	SaveVatRateResult []SaveVatRateResult `json:"records"`
}

type ShoppingCartProduct

type ShoppingCartProduct struct {
	ProductID            string  `json:"productID"`
	Amount               string  `json:"amount"`
	OriginalPrice        float64 `json:"originalPrice"`
	OriginalPriceWithVAT float64 `json:"originalPriceWithVAT"`
	FinalPrice           float64 `json:"finalPrice"`
	FinalPriceWithVAT    float64 `json:"finalPriceWithVAT"`
	RowNetTotal          float64 `json:"rowNetTotal"`
	RowTotal             float64 `json:"rowTotal"`
	Discount             float64 `json:"discount"`
}

type ShoppingCartTotals

type ShoppingCartTotals struct {
	Rows     []ShoppingCartProduct `json:"rows"`
	NetTotal float64               `json:"netTotal"`
	VATTotal float64               `json:"vatTotal"`
	Total    float64               `json:"total"`
}

type VatRate

type VatRate struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Rate   string `json:"rate"`
	Code   string `json:"code"`
	Active string `json:"active"`
	//Added        string `json:"added"`
	LastModified string `json:"lastModified"`
}

type VatRateManager

type VatRateManager interface {
	GetVatRates(ctx context.Context, filters map[string]string) (VatRates, error)
	GetVatRatesBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetVatRatesResponseBulk, error)
	SaveVatRate(ctx context.Context, filters map[string]string) (*SaveVatRateResult, error)
	SaveVatRateBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SaveVatRateResponseBulk, error)
	SaveVatRateComponent(ctx context.Context, filters map[string]string) (*SaveVatRateComponentResult, error)
	SaveVatRateComponentBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (SaveVatRateComponentResponseBulk, error)
}

type VatRates

type VatRates []VatRate

type VatTotalsByTaxRate

type VatTotalsByTaxRate struct {
	VatrateID int     `json:"vatrateID"`
	Total     float64 `json:"total"`
}

type VatTotalsByTaxRates

type VatTotalsByTaxRates []VatTotalsByTaxRate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL