Closed BerglundDaniel closed 8 months ago
The overall change involves a transition from using separate debits
and credits
fields to a unified fraction
field with an accompanying type
field to indicate whether the entry is a debit or a credit. This refactoring affects the way product account cost centers are represented in the database and initialized in the code, streamlining the accounting process by consolidating the two fields into one with a type indicator.
File Path | Change Summary |
---|---|
api/src/firstrun.py |
Altered create_shop_accounts_cost_centers function to initialize ProductAccountsCostCenters with fraction and type instead of debits and credits . |
api/src/.../0024_account_cost_center.sql |
Modified webshop_product_accounting table schema, replacing debits and credits with fraction (numeric) and type (enum). |
api/src/shop/models.py |
Updated ProductAccountsCostCenters class, replacing debits and credits with fraction (numeric) and type (enum), and adding constants DEBIT and CREDIT . |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?
Summary by CodeRabbit
Refactor
debits
andcredits
into a singlefraction
field and adding atype
field to distinguish between DEBIT and CREDIT.Database Changes
webshop_product_accounting
table schema to reflect the new accounting structure.Bug Fixes