Spaces:
Runtime error
Runtime error
Commit History
-
expiry date fix
f871046 -
unit price fix
392263a
-
self grn po item id issue
30d1376
-
feat: fixed adding and updaing taxonomies
d249b90
-
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
-
feat: Implement Trade Relationships Module with CRUD operations and supplier discovery
- Added service layer for trade relationships including create, read, update, delete, and status management functionalities. - Introduced supplier discovery feature to find eligible suppliers based on buyer criteria. - Created migration script to set up the database schema, including table creation, indexes, and sample data. - Developed comprehensive documentation for the Trade Relationships module, detailing API endpoints, usage examples, and business rules.8d7611f
-
warehouse_id changes
9798804 -
clean up
5ea6287 -
clean up
ddfe596
-
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
-
feat: Implement Trade Returns Database Schema and E2E Testing
- Created SQL schema for trade returns including tables for returns, return items, and status logs. - Added custom ENUM types for return classification and status. - Implemented validation constraints for return processes. - Developed comprehensive end-to-end tests for the trade returns workflow covering creation, dispatch, receipt, QC, acceptance, and eligibility checks for CN/DN. - Documented logger and error handling patterns for consistent logging across modules.c0b58c9
-
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 -
docs: update merchant type naming conventions to lowercase
- Update NCNF merchant type references to use lowercase `ncnf` throughout documentation - Standardize merchant code examples to reflect lowercase type prefixes - Update API response examples to show correct lowercase merchant type values - Correct enum references in error handling and testing documentation - Update merchant type mapping and default values to use consistent lowercase naming - Align all documentation with implemented lowercase merchant type constants - Improve consistency across merchant type architecture, city code enhancement, and optional fields documentation43bf20b -
merchant fixes
63f05fb -
docs(taxonomy): standardize NCNF label formatting across documentation
- Update merchant type label from "National cnf" to "NCNF" in defaults and router - Standardize NCNF description to use acronym consistently - Update KYC workflow documentation to use "NCNF" terminology - Correct example scripts to reference "NCNF" instead of "National cnf" - Update implementation summary to use standardized NCNF naming - Fix test merchant schema to use "NCNF" label - Improves consistency and readability across all documentation and examples6bffc2f
-
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
-
docs(examples): replace hardcoded merchant IDs with UUID constants
- Replace all hardcoded 'company_cuatro_beauty_ltd' strings with standardized UUID '01234567-89ab-cdef-0123-456789abcdef' across example scripts - Add CUATRO_BEAUTY_UUID constant in create_hierarchy.py for consistent merchant ID reference - Update PostgreSQL queries in check_postgres_duplicates.py to use UUID format - Update MongoDB queries in check_taxonomy_data.py and clean_and_verify_sync.py to use UUID format - Update catalogue creation scripts to reference UUID-based merchant identifiers - Ensure consistency across all test and example files for merchant identification - Improves maintainability and aligns with UUID-based merchant identification system115b0fb
-
chore(stock_adjustment): complete master-detail migration and finalize service layer
- Migrate stock adjustment system from legacy single-table to master-detail architecture - Rewrite service layer to use scm_stock_adjustment_master and scm_stock_adjustment_details tables - Add StockAdjustmentSessionResponse schema for complete session retrieval with all line items - Update router endpoints to support session-based operations and individual line item access - Add new GET /inventory/adjustments/{id}/session endpoint for retrieving complete adjustment sessions - Implement projection list support in list endpoint for performance optimization - Add auto-generated adjustment numbers (ADJ-YYYY-MM-NNN format) and financial value tracking - Reorganize documentation files to examples directory following project structure - Add comprehensive cleanup documentation and test suite for migration verification - Ensure backward compatibility while establishing new master-detail patterns396325c
-
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