diff --git a/backend/lcfs/db/migrations/versions/2024-12-04-23-00_8491890dd688.py b/backend/lcfs/db/migrations/versions/2024-12-04-23-00_8491890dd688.py new file mode 100644 index 000000000..d12c0a57a --- /dev/null +++ b/backend/lcfs/db/migrations/versions/2024-12-04-23-00_8491890dd688.py @@ -0,0 +1,57 @@ +"""Data Fixes + +Revision ID: 8491890dd688 +Revises: aeaa26f5cdd5 +Create Date: 2024-12-04 23:00:10.708533 + +""" + +from alembic import op +from sqlalchemy import update + +from lcfs.db.models import FuelType, AllocationTransactionType +from lcfs.db.models.fuel.FuelType import QuantityUnitsEnum + +# revision identifiers, used by Alembic. +revision = "8491890dd688" +down_revision = "aeaa26f5cdd5" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.execute( + update(FuelType) + .where(FuelType.fuel_type_id == 6) + .values(units=QuantityUnitsEnum.Kilograms) + ) + + op.execute( + update(FuelType).where(FuelType.fuel_type_id == 20).values(fossil_derived=False) + ) + + # Update 'type' and 'description' in allocation_transaction_type where allocation_transaction_type_id = 2 + op.execute( + update(AllocationTransactionType) + .where(AllocationTransactionType.allocation_transaction_type_id == 2) + .values( + type="Allocated to", + description="Fuel allocated to another supplier under an allocation agreement", + ) + ) + + # Update 'type' and 'description' in allocation_transaction_type where allocation_transaction_type_id = 1 + op.execute( + update(AllocationTransactionType) + .where(AllocationTransactionType.allocation_transaction_type_id == 1) + .values( + type="Allocated from", + description="Fuel allocated from another supplier under an allocation agreement", + ) + ) + # ### end Alembic commands ### + + +def downgrade() -> None: + pass diff --git a/backend/lcfs/db/seeders/common/allocation_agreement_seeder.py b/backend/lcfs/db/seeders/common/allocation_agreement_seeder.py index e78fc2bbc..e48a57227 100644 --- a/backend/lcfs/db/seeders/common/allocation_agreement_seeder.py +++ b/backend/lcfs/db/seeders/common/allocation_agreement_seeder.py @@ -18,15 +18,15 @@ async def seed_allocation_transaction_types(session): allocation_transaction_types_to_seed = [ { "allocation_transaction_type_id": 1, - "type": "Purchased", - "description": "Fuel purchased under an allocation agreement", + "type": "Allocated from", + "description": "Fuel allocated from another supplier under an allocation agreement", "display_order": 1, "effective_date": datetime.strptime("2012-01-01", "%Y-%m-%d").date(), }, { "allocation_transaction_type_id": 2, - "type": "Sold", - "description": "Fuel sold under an allocation agreement", + "type": "Allocated to", + "description": "Fuel allocated to another supplier under an allocation agreement", "display_order": 2, "effective_date": datetime.strptime("2012-01-01", "%Y-%m-%d").date(), }, diff --git a/backend/lcfs/db/seeders/common/seed_fuel_data.json b/backend/lcfs/db/seeders/common/seed_fuel_data.json index af194e535..bc4bf1d87 100644 --- a/backend/lcfs/db/seeders/common/seed_fuel_data.json +++ b/backend/lcfs/db/seeders/common/seed_fuel_data.json @@ -83,7 +83,7 @@ "provision_1_id": 2, "provision_2_id": 3, "default_carbon_intensity": 123.96, - "units": "kWh", + "units": "kg", "unrecognized": false }, { diff --git a/frontend/src/assets/locales/en/allocationAgreement.json b/frontend/src/assets/locales/en/allocationAgreement.json index cb01bb29a..1da1af078 100644 --- a/frontend/src/assets/locales/en/allocationAgreement.json +++ b/frontend/src/assets/locales/en/allocationAgreement.json @@ -4,7 +4,7 @@ "addAllocationAgreementRowsTitle": "Allocation agreements (e.g., allocating responsibility for fuel)", "allocationAgreementSubtitle": "Enter allocation agreement details below", "allocationAgreementColLabels": { - "transaction": "Transaction", + "transaction": "Responsibility", "transactionPartner": "Legal name of transaction partner", "postalAddress": "Address for service", "transactionPartnerEmail": "Email", diff --git a/frontend/src/assets/locales/en/transfer.json b/frontend/src/assets/locales/en/transfer.json index f0e5ffc25..14ba125bd 100644 --- a/frontend/src/assets/locales/en/transfer.json +++ b/frontend/src/assets/locales/en/transfer.json @@ -51,7 +51,7 @@ "loadingText": "Loading transfer...", "processingText": "Processing transfer...", "detailsLabel": "Transfer Details (required)", - "fairMarketText": "The fair market value of any consideration, in CAD", + "fairMarketText": "The fair market value of any consideration, in $CAD", "totalValueText": " per compliance unit for a total value of ", "saLabel": "Signing Authority Declaration", "saConfirmation": "I confirm that records evidencing each matter reported under section 18 of the Low Carbon Fuel (General) Regulation are available on request.",