documents

package
v1.27.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 6 Imported by: ? modules, 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(client *common.Client) *Client

func (*Client) GetPurchaseDocuments

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

func (*Client) GetPurchaseDocumentsBulk

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

func (*Client) GetPurchaseDocumentsWithStatus added in v1.22.0

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

type DocumentStatus

type DocumentStatus string
const (
	Pending           DocumentStatus = "PENDING"
	PartiallyReceived DocumentStatus = "PARTIALLY_RECEIVED"
	Received          DocumentStatus = "RECEIVED"
	Ready             DocumentStatus = "READY"
)

type GetPurchaseDocumentBulkItem

type GetPurchaseDocumentBulkItem struct {
	Status            sharedCommon.StatusBulk `json:"status"`
	PurchaseDocuments []PurchaseDocument      `json:"records"`
}

type GetPurchaseDocumentResponseBulk

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

type GetPurchaseDocumentsResponse

type GetPurchaseDocumentsResponse struct {
	Status            sharedCommon.Status `json:"status"`
	PurchaseDocuments []PurchaseDocument  `json:"records"`
}

type ListingDataProvider

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

func NewListingDataProvider

func NewListingDataProvider(erplyClient Manager) *ListingDataProvider

func (*ListingDataProvider) Count

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

func (*ListingDataProvider) Read

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

type Manager

type Manager interface {
	GetPurchaseDocuments(ctx context.Context, filters map[string]string) ([]PurchaseDocument, error)
	GetPurchaseDocumentsWithStatus(ctx context.Context, filters map[string]string) (GetPurchaseDocumentsResponse, error)
	GetPurchaseDocumentsBulk(ctx context.Context, bulkRequest []map[string]interface{}, baseFilters map[string]string) (GetPurchaseDocumentResponseBulk, error)
}

type PurchaseDocument

type PurchaseDocument struct {
	ID                       int                          `json:"id"`
	Type                     PurchaseOrderType            `json:"type"`
	Status                   DocumentStatus               `json:"status"`
	CurrencyCode             string                       `json:"currencyCode"`
	CurrencyRate             json.Number                  `json:"currencyRate"`
	WarehouseID              int                          `json:"warehouseID"`
	WarehouseName            string                       `json:"warehouseName"`
	Number                   string                       `json:"number"`
	RegNumber                string                       `json:"regnumber"`
	Date                     string                       `json:"date"`
	InventoryTransactionDate string                       `json:"inventoryTransactionDate,omitempty"`
	Time                     string                       `json:"time"`
	SupplierID               int                          `json:"supplierID"`
	SupplierName             string                       `json:"supplierName"`
	SupplierGroupID          int                          `json:"supplierGroupID"`
	AddressID                int                          `json:"addressID"`
	Address                  string                       `json:"address"`
	ContactID                int                          `json:"contactID"`
	ContactName              string                       `json:"contactName"`
	EmployeeID               int                          `json:"employeeID"`
	EmployeeName             string                       `json:"employeeName"`
	SupplierID2              int                          `json:"supplierID2"`
	SupplierName2            string                       `json:"supplierName2"`
	StateID                  int                          `json:"stateID"`
	PaymentDays              int                          `json:"paymentDays"`
	Paid                     json.Number                  `json:"paid"`
	TransactionTypeID        int                          `json:"transactionTypeID"`
	TransportTypeID          int                          `json:"transportTypeID"`
	DeliveryTermsID          int                          `json:"deliveryTermsID"`
	DeliveryTermsLocation    string                       `json:"deliveryTermsLocation"`
	TriangularTransaction    int                          `json:"triangularTransaction"`
	ProjectID                int                          `json:"projectID"`
	Confirmed                int                          `json:"confirmed"`
	ReferenceNumber          string                       `json:"referenceNumber"`
	Notes                    string                       `json:"notes"`
	Rounding                 float64                      `json:"rounding"`
	NetTotal                 float64                      `json:"netTotal"`
	VatTotal                 float64                      `json:"vatTotal"`
	Total                    float64                      `json:"total"`
	NetTotalsByTaxRate       []VatRate                    `json:"netTotalsByTaxRate"`
	VatTotalsByTaxRate       []VatRate                    `json:"vatTotalsByTaxRate"`
	InvoiceLink              string                       `json:"invoiceLink"`
	ShipDate                 string                       `json:"shipDate"`
	Cost                     float64                      `json:"cost"`
	NetTotalForAccounting    json.Number                  `json:"netTotalForAccounting"`
	TotalForAccounting       json.Number                  `json:"totalForAccounting"`
	BaseToDocuments          []ReferencedPurchaseDocument `json:"baseToDocuments"`
	BaseDocuments            []ReferencedPurchaseDocument `json:"baseDocuments"`
	LastModified             int64                        `json:"lastModified"`
	Rows                     []PurchaseDocumentRow        `json:"rows"`
	Attributes               []sharedCommon.ObjAttribute  `json:"attributes"`
}

type PurchaseDocumentRow

type PurchaseDocumentRow struct {
	ProductID        int         `json:"productID"`
	ServiceID        int         `json:"serviceID"`
	ItemName         string      `json:"itemName"`
	Code             string      `json:"code"`
	Code2            string      `json:"code2"`
	VatrateID        int         `json:"vatrateID"`
	Amount           json.Number `json:"amount"`
	Price            json.Number `json:"price"`
	Discount         json.Number `json:"discount"`
	DeliveryDate     string      `json:"deliveryDate"`
	UnitCost         json.Number `json:"unitCost"`
	CostTotal        float64     `json:"costTotal"`
	PackageID        int         `json:"packageID"`
	AmountOfPackages json.Number `json:"amountOfPackages"`
	AmountInPackage  json.Number `json:"amountInPackage"`
	PackageType      string      `json:"packageType"`
	PackageTypeID    int         `json:"packageTypeID"`
}

type PurchaseOrderType

type PurchaseOrderType string
const (
	PurchaseOrder          PurchaseOrderType = "PRCORDER"
	PurchaseInvoiceWaybill PurchaseOrderType = "PRCINVOICE"
	PurchaseReceipt        PurchaseOrderType = "CASHPRCINVOICE"
	PurchaseReturn         PurchaseOrderType = "PRCRETURN"
	PurchaseWaybill        PurchaseOrderType = "PRCWAYBILL"
	PurchaseInvoice        PurchaseOrderType = "PRCINVOICEONLY"
)

type ReferencedPurchaseDocument

type ReferencedPurchaseDocument struct {
	ID        int               `json:"id"`
	Number    string            `json:"number"`
	RegNumber string            `json:"regnumber"`
	Type      PurchaseOrderType `json:"type"`
	Date      string            `json:"date"`
}

type VatRate

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

Jump to

Keyboard shortcuts

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