arturas88/finvalda-sdk
A PHP SDK for integrating Finvalda accounting and business management services into Laravel applications. It provides a structured client for API authentication, data retrieval, and common Finvalda operations, simplifying financial system integration.
additionalCostCodes() and per-line additionalCost() let product teams support procurement cost allocation directly on purchase documents instead of hand-rolling raw Finvalda fields. This enables supplier invoice cost capture, freight/duty allocation, margin analysis, and inventory valuation workflows.purchaseUpdate() gives a spec-aligned correction path for purchase documents, but the product decision must treat corrections as destructive rebuilds, not ordinary edits. Any “edit purchase” UI should communicate that detail lines are deleted and re-added, affecting FIFO stock layers.Stock::purchaseOpFor() and assertNotSold() support pre-flight checks before corrections. PMs can design safer admin flows that warn or block when goods have been sold, rather than discovering failure late via error 4027.UpdateOperationClass correction cases. Those remain custom work or future roadmap items.PirkDok/PirkUzsDok purchase paths.UpdPrekeDetEil, or guaranteed success without a sold-stock check.4027 is a deletion-class error returned from an update call, and that op_rusis_pav values used by Stock::purchaseOpFor() are observed against a live system rather than specified in the API document.Executive summary: v3.4.0 expands the Finvalda SDK into purchase cost allocation and purchase correction workflows, reducing the need for brittle custom field mapping in procurement and inventory features. It enables landed-cost capture, per-line cost allocation, and safer correction prechecks. The main caveat is that purchase corrections are destructive and can fail late if stock has already been sold, so adoption should include explicit UX and workflow guardrails.
Engineering summary: the release adds validated additional-cost buckets, paired per-line allocation, a dedicated KoregPirkDok correction envelope, and a stock-operation lookup. It also adds 65 tests and keeps PHPStan level 5 clean. Teams should use assertNotSold() deliberately before corrections, treat 4027 as a possible update-time failure, and avoid assuming coverage for service lines or non-purchase correction operations.
Recommendation: adopt for purchase cost allocation and purchase correction use cases where the business can accept destructive correction semantics and a pre-flight sold-stock check. Defer service-line allocation and non-purchase correction workflows until the SDK exposes them or fund custom integration work.
How can I help you explore Laravel packages today?