from django.urls import path
from . import views

app_name = 'invoices'

urlpatterns = [
    # Quote step for process instances
    path('instance/<int:instance_id>/step/<int:step_id>/quote/', views.quote_step, name='quote_step'),
    path('instance/<int:instance_id>/step/<int:step_id>/quote/create/', views.create_quote, name='create_quote'),
    
    # Quote preview step (step 2)
    path('instance/<int:instance_id>/step/<int:step_id>/quote-preview/', views.quote_preview_step, name='quote_preview_step'),
    path('instance/<int:instance_id>/step/<int:step_id>/approve/', views.approve_quote, name='approve_quote'),
    
    # Quote payments step (step 3)
    path('instance/<int:instance_id>/step/<int:step_id>/payments/', views.quote_payment_step, name='quote_payment_step'),
    path('instance/<int:instance_id>/step/<int:step_id>/payments/add/', views.add_quote_payment, name='add_quote_payment'),
    path('instance/<int:instance_id>/step/<int:step_id>/payments/<int:payment_id>/delete/', views.delete_quote_payment, name='delete_quote_payment'),

    # Quote print
    path('instance/<int:instance_id>/quote/print/', views.quote_print, name='quote_print'),

    # Final invoice (step 7?) and print
    path('instance/<int:instance_id>/step/<int:step_id>/final-invoice/', views.final_invoice_step, name='final_invoice_step'),
    path('instance/<int:instance_id>/final-invoice/print/', views.final_invoice_print, name='final_invoice_print'),
    path('instance/<int:instance_id>/step/<int:step_id>/final-invoice/special/add/', views.add_special_charge, name='add_special_charge'),
    path('instance/<int:instance_id>/step/<int:step_id>/final-invoice/special/<int:item_id>/delete/', views.delete_special_charge, name='delete_special_charge'),
    path('instance/<int:instance_id>/step/<int:step_id>/final-invoice/approve/', views.approve_final_invoice, name='approve_final_invoice'),

    # Final settlement payments (step 8?)
    path('instance/<int:instance_id>/step/<int:step_id>/final-settlement/', views.final_settlement_step, name='final_settlement_step'),
    path('instance/<int:instance_id>/step/<int:step_id>/final-settlement/add/', views.add_final_payment, name='add_final_payment'),
    path('instance/<int:instance_id>/step/<int:step_id>/final-settlement/<int:payment_id>/delete/', views.delete_final_payment, name='delete_final_payment'),
]
