Spaces:
Runtime error
Runtime error
Commit History
-
expiry date fix
f871046 -
unit price fix
392263a
-
self grn po item id issue
30d1376
-
feat(catalogues): integrate UOM master system with dynamic unit validation
- Remove hardcoded UnitOfMeasure enum from catalogue schema - Add uom_group_code field to Inventory schema for UOM group linking - Update CatalogueRef PostgreSQL model with uom_group_code column - Add field validators for unit and uom_group_code normalization - Update sync configuration to map uom_group_code field - Add database migration script for uom_group_code column with indexing - Include comprehensive integration test suite validating UOM functionality - Update projection list validation to support UOM fields - Maintain backward compatibility with existing catalogue data - Enable dynamic UOM validation against master system at service levelb8aa454
-
refactor: change supplier_id, client_id, and warehouse_id to UUID in models and migration
b561906
-
warehouse_id changes
9798804
-
feat(sync): Implement warehouse synchronization from MongoDB to PostgreSQL
- Added WarehouseSyncService for managing async sync operations. - Created WarehouseSyncHandler for handling warehouse data fetching and validation. - Introduced models for field mapping and required fields for warehouse data. - Developed service methods for upserting warehouse data into PostgreSQL. - Implemented async task queue and background workers for processing sync operations. - Updated warehouse service to trigger async sync on create, update, and delete operations. - Created SQL script for the new scm_warehouse_ref table in PostgreSQL. - Added migration scripts for updating existing warehouse documents in MongoDB. - Implemented tests for verifying warehouse sync functionality. - Updated documentation to reflect changes in MongoDB collection naming and sync operations.8d1fdf5
-
Refactor COUNT queries to use COUNT(1) for improved performance and consistency across various scripts and services.
- Updated TradeReturnService and TradeSalesService to clean filters before applying them to queries. - Enhanced SQL queries in migration scripts and verification scripts to utilize COUNT(1) instead of COUNT(*). - Added a new script for verifying trade invoice cleanup functionality, ensuring all constants and utility functions work as expected. - Adjusted various test cases to reflect the changes in COUNT queries and ensure accurate assertions.0766a99 -
merchant fixes
63f05fb
-
feat(catalogues/pricing): standardize pricing level keys to lowercase format
- Update pricing levels from uppercase (NCNF, CNF, Distributor, Salon) to lowercase (ncnf, cnf, distributor, retail) - Standardize inventory levels keys to match pricing level naming convention - Update catalogue models to reflect consistent lowercase key structure across all pricing and inventory tiers - Modify schemas and services in catalogues, merchants, taxonomy, and trade_sales modules - Update sync handlers and catalogue service to process lowercase pricing level keys - Standardize warehouse models and schemas for consistent data structure - Update all documentation, examples, and migration scripts to reflect new naming convention - Ensure backward compatibility through updated sync and service layer logic - This change improves API consistency and aligns with REST API best practices for key namingb3b8847
-
fix(stock,trade_sales): correct stored procedure calls and enhance shipment queries
- Change CALL to SELECT for apply_stock_movement function since it returns VOID - Add catalogue_id and uom fields to shipment order query for complete item details - Update GROUP BY clause to include catalogue_id and uom for proper aggregation - Remove misleading comment about missing catalogue_id in stock transaction - Add comprehensive stock management stored procedures documentation with idempotency checks and bulk movement support - Improve error handling in bulk stock movement operations with transaction rollback on failure47cf637
-
refactor(database): reorganize database scripts and examples into docs directory
feat(database): add migration scripts for pricing levels, inventory and PO optional fields docs(examples): add example scripts for verification, diagnostics and imports style(database): update SQL and Python scripts with consistent formatting chore: move existing scripts to docs directory for better organizationf24ee1d
-
refactor(database): consolidate shared database base and fix foreign key schema references
- Create centralized `app/core/database.py` with shared SQLAlchemy Base instance - Update all model files to use shared Base instead of individual instances - Fix foreign key references to include schema prefix (`trans.`) across all models: * Trade sales: order_id, shipment_id, po_item_id references * Inventory stock: ledger_id, adjustment_id references * Purchase orders: po_id references * Purchase receipts: po_id, grn_id, po_item_id, grn_item_id references - Update `app/sql.py` to import shared Base and register all models - Add comprehensive documentation for foreign key fixes and schema migration - Add migration scripts for pricing levels column and catalogue reference table - Add test suite for pricing levels sync and complete pricing flow validation - Reorganize documentation structure with implementation summaries and security guides - Resolves foreign key resolution errors caused by multiple Base instances and missing schema prefixescd357c6