' Copyright (C) 2025  P4pillon.org
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU Affero General Public License as
' published by the Free Software Foundation, either version 3 of the
' License, or (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU Affero General Public License for more details.
'
' You should have received a copy of the GNU Affero General Public License
' along with this program.  If not, see <https://www.gnu.org/licenses/>.
Public Class Facturation_Choix_TP

    Private Sub Facturation_Choix_TP_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If COMPTOIR_MAIN.AMC_NumAMC_TextBox.Text = "" Or COMPTOIR_MAIN.CheckBox_Facturation_AMC.Checked = False Then
            Button_Facturation_TP.Enabled = False
        End If
        If COMPTOIR_MAIN.FS_Papier = True Then
            Button_Facturation_AMO.Enabled = False
            Button_Facturation_HTP.Enabled = False
            Button_Facturation_TP.Enabled = False
        End If
    End Sub
    Private Sub Button_Facturation_TP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Facturation_TP.Click
        CurrentFactureVitale.TP_AMO = True
        CurrentFactureVitale.TP_AMC = True
        Me.Dispose()
    End Sub

    Private Sub Button_Facturation_HTP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Facturation_HTP.Click
        CurrentFactureVitale.TP_AMO = False
        CurrentFactureVitale.TP_AMC = False
        Me.Dispose()
    End Sub

    Private Sub Button_Facturation_FSPapier_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Facturation_FSPapier.Click
        COMPTOIR_MAIN.FS_Papier = True
        Me.Dispose()
    End Sub

    Private Sub Button_Facturation_AMO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Facturation_AMO.Click
        CurrentFactureVitale.TP_AMO = True
        CurrentFactureVitale.TP_AMC = False
        Me.Dispose()
    End Sub


End Class