- Updated CustomersPage.vue to use decimalString for standard discount percent. - Enhanced IncomingInvoicesPage.vue to format item quantities, unit prices, and tax rates using decimalString. - Improved ItemsPage.vue with new supplier price management and decimal formatting for prices. - Modified OrganizationSetupPage.vue to use a dropdown for default tax rates and ensure numeric input for payment days. - Updated OutgoingInvoicesPage.vue to apply decimal formatting for customer discounts and item details. - Enhanced PriceImportsPage.vue to include additional fields in the import format. - Improved PriceRulesPage.vue to use decimal input for markup percentages. - Updated QuotesPage.vue to apply decimal formatting for customer discounts and item details. - Enhanced SuppliersPage.vue to use decimal input for standard discount percent. - Added a new SQL migration to set default unit for items to 'Stck'. - Introduced format.ts for centralized decimal and currency formatting utilities.
Company Tool
Mehrprojekt-Struktur für eine firmeninterne Software mit Rust-Backend, PostgreSQL, Webfrontend und klassischem Desktopclient.
Projekte
backend/: Rust-Backend mit PostgreSQL-Anbindung und WebSocket-Kommunikationweb-frontend/: Browserbasiertes Frontend mit Vue 3, Vite und TypeScriptdesktop-client/: Nativer Client für Linux, Windows und macOS mit egui/eframeshared-protocol/: Gemeinsame Rust-Typen für Socket-Nachrichten
Kommunikation
Das Backend stellt einen WebSocket unter ws://localhost:8080/ws bereit. Die
Verbindung beginnt mit einem hello-Handshake. Danach werden fachliche
Nachrichten als AES-256-GCM-verschlüsselte Envelopes übertragen.
PostgreSQL starten
Ausführliche Installationsschritte stehen in INSTALL.md. Betriebsnotizen zu Schlüsseln, E-Mail, Backup und TLS stehen in BETRIEB.md.
cp .env.example .env
docker compose up -d postgres
Backend starten
cargo run -p companytool-backend
Kommunikation testen
In einem Terminal Backend starten, dann in einem zweiten Terminal:
COMMUNICATION_TEST_MODE=1 cargo run -p companytool-backend
node scripts/communication-test.mjs
Optional gegen eine andere URL:
node scripts/communication-test.mjs ws://localhost:8080/ws
Der Test öffnet zwei Clients, führt den verschlüsselten Handshake aus, entschlüsselt Snapshots, sendet eine verschlüsselte Ping-Nachricht und prüft, ob beide Clients ein verschlüsseltes Pong-Event erhalten.
Webfrontend starten
cd web-frontend
npm install
npm run dev
Desktopclient starten
cargo run -p companytool-desktop-client
Mit explizitem Backend:
cargo run -p companytool-desktop-client -- --api-url http://127.0.0.1:8080 --ws-url ws://127.0.0.1:8080/ws