71 lines
2.5 KiB
Python
71 lines
2.5 KiB
Python
"""
|
|
Billing Business Logic Admin
|
|
|
|
NOTE: Most billing models are registered in modules/billing/admin.py
|
|
with full workflow functionality. This file contains legacy/minimal registrations.
|
|
"""
|
|
from django.contrib import admin
|
|
from django.contrib import messages
|
|
from django.utils.html import format_html
|
|
from unfold.admin import ModelAdmin
|
|
from igny8_core.admin.base import AccountAdminMixin, Igny8ModelAdmin
|
|
# NOTE: Most billing models are now registered in modules/billing/admin.py
|
|
# This file is kept for reference but all registrations are commented out
|
|
# to avoid AlreadyRegistered errors
|
|
|
|
# from .models import (
|
|
# CreditCostConfig,
|
|
# AccountPaymentMethod,
|
|
# Invoice,
|
|
# Payment,
|
|
# CreditPackage,
|
|
# PaymentMethodConfig,
|
|
# )
|
|
|
|
|
|
# CreditCostConfig - DUPLICATE - Registered in modules/billing/admin.py with better features
|
|
# Commenting out to avoid conflicts
|
|
# @admin.register(CreditCostConfig)
|
|
# class CreditCostConfigAdmin(admin.ModelAdmin):
|
|
# ...existing implementation...
|
|
|
|
|
|
# Invoice - DUPLICATE - Registered in modules/billing/admin.py
|
|
# Commenting out to avoid conflicts
|
|
# @admin.register(Invoice)
|
|
# class InvoiceAdmin(AccountAdminMixin, admin.ModelAdmin):
|
|
# ...existing implementation...
|
|
|
|
|
|
# Payment - DUPLICATE - Registered in modules/billing/admin.py with full approval workflow
|
|
# Commenting out to avoid conflicts
|
|
# @admin.register(Payment)
|
|
# class PaymentAdmin(AccountAdminMixin, admin.ModelAdmin):
|
|
# ...existing implementation...
|
|
|
|
|
|
# CreditPackage - DUPLICATE - Registered in modules/billing/admin.py
|
|
# Commenting out to avoid conflicts
|
|
# @admin.register(CreditPackage)
|
|
# class CreditPackageAdmin(admin.ModelAdmin):
|
|
# ...existing implementation...
|
|
|
|
|
|
# AccountPaymentMethod - DUPLICATE - Registered in modules/billing/admin.py with AccountAdminMixin
|
|
# Commenting out to avoid AlreadyRegistered error
|
|
# The version in modules/billing/admin.py is preferred as it includes AccountAdminMixin
|
|
|
|
# from import_export.admin import ExportMixin
|
|
# from import_export import resources
|
|
#
|
|
# class AccountPaymentMethodResource(resources.ModelResource):
|
|
# """Resource class for exporting Account Payment Methods"""
|
|
# class Meta:
|
|
# model = AccountPaymentMethod
|
|
# fields = ('id', 'display_name', 'type', 'account__name', 'is_default',
|
|
# 'is_enabled', 'is_verified', 'country_code', 'created_at')
|
|
# export_order = fields
|
|
#
|
|
# @admin.register(AccountPaymentMethod)
|
|
# class AccountPaymentMethodAdmin(ExportMixin, Igny8ModelAdmin):
|
|
# ... (see modules/billing/admin.py for active registration) |