Documentation
¶
Index ¶
- Constants
- type AssignmentsManger
- type BaseDocument
- type Client
- func (cli *Client) CalculateShoppingCart(ctx context.Context, filters map[string]string) (*ShoppingCartTotals, error)
- func (cli *Client) DeleteDocument(ctx context.Context, filters map[string]string) error
- func (cli *Client) GetPayments(ctx context.Context, filters map[string]string) ([]PaymentInfo, error)
- func (cli *Client) GetProjectStatus(ctx context.Context, filters map[string]string) ([]ProjectStatus, error)
- func (cli *Client) GetProjects(ctx context.Context, filters map[string]string) ([]Project, error)
- func (cli *Client) GetSalesDocuments(ctx context.Context, filters map[string]string) ([]SaleDocument, error)
- func (cli *Client) GetSalesDocumentsBulk(ctx context.Context, bulkFilters []map[string]interface{}, ...) (GetSaleDocumentResponseBulk, error)
- func (cli *Client) GetVatRates(ctx context.Context, filters map[string]string) (VatRates, error)
- func (cli *Client) SaveAssignment(ctx context.Context, filters map[string]string) (int64, error)
- func (cli *Client) SavePayment(ctx context.Context, filters map[string]string) (int64, error)
- func (cli *Client) SavePurchaseDocument(ctx context.Context, filters map[string]string) (PurchaseDocImportReports, error)
- func (cli *Client) SaveSalesDocument(ctx context.Context, filters map[string]string) (SaleDocImportReports, error)
- func (cli *Client) SaveVatRate(ctx context.Context, filters map[string]string) (*SaveVatRateResult, error)
- func (cli *Client) SaveVatRateBulk(ctx context.Context, bulkRequest []map[string]interface{}, ...) (SaveVatRateResponseBulk, error)
- func (cli *Client) SaveVatRateComponent(ctx context.Context, filters map[string]string) (*SaveVatRateComponentResult, error)
- func (cli *Client) SaveVatRateComponentBulk(ctx context.Context, bulkRequest []map[string]interface{}, ...) (SaveVatRateComponentResponseBulk, error)
- type DocumentManager
- type GetProjectStatusesResponse
- type GetProjectsResponse
- type GetSaleDocumentBulkItem
- type GetSaleDocumentResponseBulk
- type GetSalesDocumentResponse
- type InvoiceRow
- type Manager
- type NetTotalsByTaxRate
- type PaymentAttribute
- type PaymentInfo
- type PaymentStatus
- type PaymentType
- type PostSalesDocumentResponse
- type Project
- type ProjectManager
- type ProjectStatus
- type PurchaseDocImportReport
- type PurchaseDocImportReports
- type SaleDocImportReport
- type SaleDocImportReports
- type SaleDocument
- type SaleDocumentsListingDataProvider
- type SavePurchaseDocumentResponse
- type SaveVatRateBulkItem
- type SaveVatRateComponentBulkItem
- type SaveVatRateComponentResponseBulk
- type SaveVatRateComponentResult
- type SaveVatRateComponentResultResponse
- type SaveVatRateResponseBulk
- type SaveVatRateResult
- type SaveVatRateResultResponse
- type ShoppingCartProduct
- type ShoppingCartTotals
- type VatRate
- type VatRateManager
- type VatRates
- type VatTotalsByTaxRate
- type VatTotalsByTaxRates
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 BaseDocument ¶
type Client ¶
func (*Client) CalculateShoppingCart ¶
func (*Client) DeleteDocument ¶
func (*Client) GetPayments ¶
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 ¶
GetProjects will list projects according to specified filters.
func (*Client) GetSalesDocuments ¶
func (*Client) GetSalesDocumentsBulk ¶ added in v1.7.5
func (*Client) GetVatRates ¶
GetVatRatesByVatRateID ...
func (*Client) SaveAssignment ¶ added in v1.9.0
GetVatRatesByVatRateID ...
func (*Client) SavePayment ¶
func (*Client) SavePurchaseDocument ¶
func (*Client) SaveSalesDocument ¶
func (*Client) SaveVatRate ¶ added in v1.13.1
func (*Client) SaveVatRateBulk ¶ added in v1.13.1
func (*Client) SaveVatRateComponent ¶ added in v1.13.1
func (*Client) SaveVatRateComponentBulk ¶ added in v1.13.1
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)
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 GetProjectStatusesResponse ¶
type GetProjectStatusesResponse struct {
Status common2.Status `json:"status"`
ProjectStatuses []ProjectStatus `json:"records"`
}
type GetProjectsResponse ¶
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 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
//payment requests
SavePayment(ctx context.Context, filters map[string]string) (int64, error)
GetPayments(ctx context.Context, filters map[string]string) ([]PaymentInfo, error)
//shopping cart
CalculateShoppingCart(ctx context.Context, filters map[string]string) (*ShoppingCartTotals, error)
}
type NetTotalsByTaxRate ¶
type PaymentAttribute ¶
type PaymentInfo ¶
type PaymentInfo struct {
DocumentID int `json:"documentID"` // Invoice ID
Type string `json:"type"` // CASH, TRANSFER, CARD, CREDIT, GIFTCARD, CHECK, TIP
Date string `json:"date"`
Sum string `json:"sum"`
CurrencyCode string `json:"currencyCode"` // EUR, USD
Info string `json:"info"` // Information about the payer or payment transaction
Added uint64 `json:"added"`
}
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 ProjectStatus ¶
type PurchaseDocImportReport ¶
type PurchaseDocImportReports ¶
type PurchaseDocImportReports []PurchaseDocImportReport
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"`
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"`
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"`
}
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
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 VatRateManager ¶
type VatRateManager interface {
GetVatRates(ctx context.Context, filters map[string]string) (VatRates, 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 VatTotalsByTaxRate ¶
type VatTotalsByTaxRates ¶
type VatTotalsByTaxRates []VatTotalsByTaxRate
Click to show internal directories.
Click to hide internal directories.