<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AjaxController;
use App\Http\Controllers\AuthentificationController;
use App\Http\Controllers\DepotController;
use App\Http\Controllers\MatiereController;
use App\Http\Controllers\CategorieController;
use App\Http\Controllers\ProduitController;
use App\Http\Controllers\EmballageController;
use App\Http\Controllers\ApproemballageController;
use App\Http\Controllers\ConsignationController;
use App\Http\Controllers\VenteController;
use App\Http\Controllers\VenteclientController;
use App\Http\Controllers\ApprovisionnementController;
use App\Http\Controllers\PrestationController;
use App\Http\Controllers\CuisineController;
use App\Http\Controllers\UtilisationController;
use App\Http\Controllers\EmployeController;
use App\Http\Controllers\MagasinController;
use App\Http\Controllers\FournisseurController;
use App\Http\Controllers\SalaireController;
use App\Http\Controllers\InventaireController;
use App\Http\Controllers\TaxeController;
use App\Http\Controllers\RemiseController;
use App\Http\Controllers\SubventionController;
use App\Http\Controllers\TransfertController;
use App\Http\Controllers\TransfertboutiqueController;
use App\Http\Controllers\TransfertemballageController;
use App\Http\Controllers\DepenseController;
use App\Http\Controllers\RetouremballageController;
use App\Http\Controllers\ProductionController;
use App\Http\Controllers\LivraisonController;
use App\Http\Controllers\AppromatiereController;
use App\Http\Controllers\RetourappromatiereController;
use App\Http\Controllers\TransfertdepotController;
use App\Http\Controllers\RetourapproemballageController;
use App\Http\Controllers\RetourcommandeController;
use App\Http\Controllers\RetourcommandeclientController;
use App\Http\Controllers\ProformaController;
use App\Http\Controllers\DestockageController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::post('/invoicegenerate/{id}',[InvoiceController::class, "generateInvoice"])->name('invoicegenerate');
//AUTHENTIFICATION


Route::get('/',[AuthentificationController::class, "login"])->name('Login');
Route::post('/Deconnexion',[AuthentificationController::class, "deconnecter"])->name('Deconnexion');
Route::post('/loginPost',[AuthentificationController::class, "Connecter"])->name('loginPost');
Route::get('/forgot_password',[AuthentificationController::class, "pass"])->name('forgot_password');
Route::post('/forgot_passwordPost',[AuthentificationController::class, "verifier"])->name('forgot_passwordPost');
Route::get('/reset/{id}',[AuthentificationController::class, "reset"])->name('reset');
Route::post('/resetPost/{id}',[AuthentificationController::class, "resetpass"])->name('resetPost');
Route::get('/users/register',[AuthentificationController::class, "save"])->name('Register');
Route::post('/RegisterPost',[AuthentificationController::class, "enregistrer"])->name('RegisterPost');
Route::get('/utilisateurs/liste',[AuthentificationController::class, "liste"])->name('Liste_des_utilisateurs');
Route::get('/users/modification/{id}',[AuthentificationController::class, "modifier"])->name('modification');
Route::post('/modif_utilisateurPost/{id}',[AuthentificationController::class, "valider"])->name('modif_utilisateurPost');
Route::get('/change_password/{id}',[AuthentificationController::class, "voirpassword"])->name('change_password');
Route::post('/change_passwordPost/{id}',[AuthentificationController::class, "changer"])->name('change_passwordPost');
Route::get('/Users/{id}',[AuthentificationController::class, "VoirSuppression"])->name('Users');
Route::post('/SupprimerUserPost',[AuthentificationController::class, "supprimer"])->name('SupprimerUserPost');
Route::get('/accueil',[AuthentificationController::class, "accueil"])->name('accueil');

//GESTION  DES DEPOTS

Route::get('/depot/nouveau',[DepotController::class, "depot"])->name('nouveau-depot');
Route::get('/depot/modifier/{id}',[DepotController::class, "modifier"])->name('modifier-depot');
Route::post('/modifierdepotPost/{id}',[DepotController::class, "valider"])->name('modifierdepotPost');
Route::post('/depotPost',[DepotController::class, "enregistrer"])->name('depotPost');

//GESTION DES MATIERES PREMIERES

Route::get('/nouvelle-matiere',[MatiereController::class, "nouveau"])->name('nouvelle-matiere');
Route::post('/nouvellematierePost',[MatiereController::class, "enregistrer"])->name('nouvellematierePost');
Route::get('/liste-des-matieres-premieres',[MatiereController::class, "liste"])->name('liste-des-matieres-premieres');
Route::get('/modifier-matiere/{id}',[MatiereController::class, "modifier"])->name('modifier-matiere');
Route::post('/modifiermatierePost/{id}',[MatiereController::class, "modifierpost"])->name('modifiermatierePost');
Route::get('/Matiere/{id}',[MatiereController::class, "voir"])->name('Matiere');
Route::post('/supprimermatierePost',[MatiereController::class, "supprimer"])->name('supprimermatierePost');
Route::get('/liste-des-matieres',[MatiereController::class, "liste"])->name('liste-des-matieres');

Route::get('/inventaire-matiere-premiere',[MatiereController::class, "inventaire"])->name('inventaire-matiere-premiere');
Route::post('/inventaire-matiere-premierePost',[MatiereController::class, "inventairepost"])->name('inventaire-matiere-premierePost');
Route::get('/Invmatiere/{id}',[MatiereController::class, "voirinv"])->name('Invmatiere');
Route::post('/ValiderInventairematierePost',[MatiereController::class, "vdmatiere"])->name('ValiderInventairematierePost');
Route::post('/SupprimerInventairematierePost',[MatiereController::class, "supprimermatiere"])->name('SupprimerInventairematierePost');
Route::get('/Modifier-inventaire-matiere/{id}',[MatiereController::class, "modifierinv"])->name('Modifier-inventaire-matiere');
Route::post('/Modifier-inventaire-matierepost/{id}',[MatiereController::class, "valider_matiere"])->name('Modifier-inventaire-matierepost');

Route::get('/inventaire/detail_matiere/{id}',[MatiereController::class, "detailmatiere"])->name('detail_matiere');
Route::get('/Detailinvmatiere/{id}',[MatiereController::class, "voirdetailmatiere"])->name('Detailinvmatiere');
Route::post('/supprimerdetailmatiere',[MatiereController::class, "supprimerdetailmatiere"])->name('supprimerdetailmatiere');

//GESTION DES PRODUITS & CATEGORIES


Route::get('/categorie/categorie',[CategorieController::class, "nouveau"])->name('nouvelle_categorie');
Route::post('/nouvellecategoriePost',[CategorieController::class, "enregistrer"])->name('nouvellecategoriePost');
Route::get('/modifiercategorie/{id}',[CategorieController::class, "modifier"])->name('modifiercategorie');
Route::post('/modifiercategoriePost/{id}',[CategorieController::class, "valider"])->name('modifiercategoriePost');


Route::get('/produit/produit_fini',[ProduitController::class,"produit_fini"])->name('nouveau_produit_fini');
Route::post('/nouveauproduitfiniPost',[ProduitController::class,"enregistrer_produit_fini"])->name('nouveauproduitfiniPost');
Route::get('/modification-produit-fini/{id}',[ProduitController::class,"modifierpf"])->name('modification-produit-fini');
Route::post('/modifierpfPost/{id}',[ProduitController::class,"modifpf"])->name('modifierpfPost');
Route::get('/Produitfini/{id}',[ProduitController::class,"VoirSuppressionpf"])->name('Produitfini');
Route::post('/SupprimerpfPost',[ProduitController::class,"supprimerpf"])->name('SupprimerpfPost');

Route::get('/Produit/{id}',[ProduitController::class,"VoirSuppression"])->name('Produit');
Route::post('/SupprimerproduitPost',[ProduitController::class,"supprimer"])->name('SupprimerproduitPost');
Route::get('/listeproduitmagpdf22/{id}',[ProduitController::class,"listeproduitmagpdf22"])->name('listeproduitmagpdf22');

Route::get('/nouveauProduit',[ProduitController::class,"voirproduit"])->name('nouveauProduit');
Route::post('/nouveauproduitPost',[ProduitController::class,"enregistrer"])->name('nouveauproduitPost');
Route::get('/liste-des-produits',[ProduitController::class,"liste"])->name('liste-des-produits');
Route::get('/stock-cuisine',[ProduitController::class,"liste2"])->name('stock-cuisine');
Route::get('/stock-resto',[ProduitController::class,"liste3"])->name('stock-resto');
Route::get('/stock-resto-boisson',[ProduitController::class,"liste33"])->name('stock-resto-boisson');
Route::post('/stock-resto-boisson-pdf',[ProduitController::class,"liste333"])->name('stock-resto-boisson-pdf');
Route::get('/stock',[ProduitController::class,"listee"])->name('stock');
Route::post('/recherche-situation',[ProduitController::class,"listeerech"])->name('recherche-situation');
Route::get('/stockPDF',[ProduitController::class,"listeee"])->name('stockPDF');
Route::get('/detail-appro-produit/{id}',[ProduitController::class,"consulter2"])->name('detail-appro-produit');
Route::get('/detail-mouvement-magasin/{id}',[ProduitController::class,"consulter3"])->name('detail-mouvement-magasin');
Route::get('/detail-mouvement-magasin2/{id}',[ProduitController::class,"consulter33"])->name('detail-mouvement-magasin2');
Route::get('/detail-mouvement-cuisine/{id}',[ProduitController::class,"consulter4"])->name('detail-mouvement-cuisine');
Route::get('/detail-mouvement-resto/{id}',[ProduitController::class,"consulter5"])->name('detail-mouvement-resto');
Route::get('/detail-appro-cuisine/{id}',[ProduitController::class,"consulter22"])->name('detail-appro-cuisine');
Route::get('/detail-appro-resto/{id}',[ProduitController::class,"consulter23"])->name('detail-appro-resto');
Route::get('/detail-utilisation-cuisine/{id}',[ProduitController::class,"consulter222"])->name('detail-utilisation-cuisine');
Route::get('/modifierproduit/{id}',[ProduitController::class,"modif"])->name('modifierproduit');
Route::post('/modifierproduitPost/{id}',[ProduitController::class,"update"])->name('modifierproduitPost');
Route::post('/rechercheapproPost',[ProduitController::class,"recherche"])->name('rechercheapproPost');
Route::get('/liste_appro_recherchePDF',[ProduitController::class,"liste4"])->name('liste_appro_recherchePDF');
Route::get('/vente-par-produit',[ProduitController::class,"vp"])->name('vente-par-produit');
Route::post('/vente-par-produitPost',[ProduitController::class,"vp2"])->name('vente-par-produitPost');
Route::get('/vente-par-produitPDF',[ProduitController::class,"venteparpropdf"])->name('vente-par-produitPDF');
Route::get('/vente_par_produit_rechPDF',[ProduitController::class,"vp3"])->name('vente_par_produit_rechPDF');
Route::post('/magasinPost',[ProduitController::class,"magasinPost"])->name('magasinPost');
Route::post('/mouvementPost',[ProduitController::class,"mouvementPost"])->name('mouvementPost');
Route::get('/mouvementPDF',[ProduitController::class,"mouvementPDF"])->name('mouvementPDF');
Route::get('/mouvement-magasin-recherche',[ProduitController::class,"magasinpostpdf"])->name('mouvement-magasin-recherche');
Route::post('/transfererappro',[ApprovisionnementController::class,"transferer"])->name('transfererappro');

//CHARGER PRODUIT
Route::get('/chargerProduit',[ProduitController::class,"chargerproduit"])->name('chargerProduit');
Route::post('/chargerproduitPost',[ProduitController::class,"chargerproduitpost"])->name('chargerproduitPost');
//CHARGER STOCK
Route::get('/chargerStock',[ProduitController::class,"chargerstock"])->name('chargerStock');
Route::post('/chargerstockPost',[ProduitController::class,"chargerstockpost"])->name('chargerstockPost');

//GESTION DES EMBALLAGES
Route::get('/emballage/nouveau',[EmballageController::class,"nouveau"])->name('nouvel-emballage');
Route::get('/emballage/modifier/{id}',[EmballageController::class,"modifier"])->name('modifier-emballage');
Route::post('/nouvelemballagePost',[EmballageController::class,"enregistrer"])->name('nouvelemballagePost');
Route::post('/memballagePost/{id}',[EmballageController::class,"mpost"])->name('memballagePost');
Route::get('/Emballage/{id}',[EmballageController::class,"VoirSuppression"])->name('Emballage');
Route::post('/SupprimeremballagePost',[EmballageController::class,"supprimer"])->name('SupprimeremballagePost');
Route::get('/emballage/liste',[EmballageController::class,"liste"])->name('liste-emballage');
Route::get('/emballage/emballage-produit/{id}',[EmballageController::class,"embp"])->name('emballage-produit');
Route::post('/emballageproduitpost/{id}',[EmballageController::class,"embpost"])->name('emballageproduitpost');
Route::get('/Ligneembpro/{id}',[EmballageController::class,"voirligne"])->name('Ligneembpro');
Route::get('/approemballage/nouveau',[ApproemballageController::class,"nouveau"])->name('appro-emballage');
Route::post('/emballageapproPost',[ApproemballageController::class,"enregistrer"])->name('emballageapproPost');
Route::get('/approemballage/liste',[ApproemballageController::class,"listedesappro"])->name('liste-des-appro');
Route::get('/validerapproemballage/{id}',[ApproemballageController::class,"voirvalider"])->name('validerapproemballage');
Route::post('/validerapproemballagePost',[ApproemballageController::class,"valider"])->name('validerapproemballagePost');
Route::get('/consultation_appro_emballage/{id}',[ApproemballageController::class,"consulter"])->name('consultation_appro_emballage');

Route::get('/factureapproemballage/{id}',[ApproemballageController::class,"factureappro"])->name('factureapproemballage');
Route::post('/SupprimerapproemballagePost',[ApproemballageController::class,"supprimer"])->name('SupprimerapproemballagePost');
Route::post('/Suppligneembpro',[ApproemballageController::class,"suppembp"])->name('Suppligneembpro');
Route::post('/AnnulerapproemballagePost',[ApproemballageController::class,"annuler"])->name('AnnulerapproemballagePost');

Route::get('/inventaire-emballage',[ApproemballageController::class,"inventaire"])->name('inventaire-emballage');
Route::post('/inventaire-emballagePost',[ApproemballageController::class,"inventairepost"])->name('inventaire-emballagePost');
Route::get('/Invemballage/{id}',[ApproemballageController::class,"voirinv"])->name('Invemballage');
Route::post('/ValiderInventaireemballagePost',[ApproemballageController::class,"vdemballage"])->name('ValiderInventaireemballagePost');
Route::post('/SupprimerInventaireemballagePost',[ApproemballageController::class,"supprimeremballage"])->name('SupprimerInventaireemballagePost');
Route::get('/Modifier-inventaire-emballage/{id}',[ApproemballageController::class,"modifierinv"])->name('Modifier-inventaire-emballage');
Route::post('/Modifier-inventaire-emballagepost/{id}',[ApproemballageController::class,"valider_emballage"])->name('Modifier-inventaire-emballagepost');

Route::get('/inventaire/detail_emballage/{id}',[EmballageController::class, "detailemballage"])->name('detail_emballage');
Route::get('/Detailinvemballage/{id}',[EmballageController::class, "voirdetailemballage"])->name('Detailinvemballage');
Route::post('/supprimerdetailemballage',[EmballageController::class, "supprimerdetailemballage"])->name('supprimerdetailemballage');


//GESTION DE LA VENTE


Route::get('/Detailvente/{id}',[VenteController::class, "voirsuppresion"])->name('Detailvente');
Route::get('/Detailventeclient/{id}',[VenteController::class, "voirsuppresiondetail"])->name('Detailventeclient');
Route::post('/SupprimerdetailPost',[VenteController::class, "supprimerdetail"])->name('SupprimerdetailPost');
Route::post('/SupprimerdetailclientPost',[VenteclientController::class, "supprimerdetail"])->name('SupprimerdetailclientPost');
Route::get('/Annulervente/{id}',[VenteController::class, "voirannuler"])->name('Annulervente');
Route::post('/AnnulerventePost',[VenteController::class, "annuler"])->name('AnnulerventePost');
Route::get('/detail-cloture/{id}',[VenteController::class, "detailcloture"])->name('detailcloture');
Route::get('/Vente/{id}',[VenteController::class, "VoirSuppressionvente"])->name('Vente');
Route::post('/SupprimerventePost',[VenteController::class, "supprimervente"])->name('SupprimerventePost');
Route::get('/vente',[VenteController::class, "vente"])->name('vente');
Route::get('/nouvelleVente',[VenteController::class, "vente"])->name('nouvelleVente');
Route::get('/listeVente',[VenteController::class, "listevente"])->name('listeVente');
Route::get('/toutes-les-ventes',[VenteController::class, "listevente23"])->name('toutes-les-ventes');
Route::post('/toutes-les-ventes-rech',[VenteController::class, "listevente233"])->name('toutes-les-ventes-rech');
Route::get('/toutes-les-ventes-pdf',[VenteController::class, "listevente233PDF"])->name('toutes-les-ventes-pdf');
Route::get('/liste-des-ventes-de-la-journee',[VenteController::class, "listevente2"])->name('liste-des-ventes-de-la-journee');
Route::get('/vente_annulee',[VenteController::class, "listeventeannulee"])->name('listeventeannulee');
Route::get('/factureVente/{id}',[VenteController::class, "facturevente"])->name('factureVente');
Route::post('/ventePost',[VenteController::class, "enregistrer"])->name('ventePost');
Route::get('/Validervente/{id}',[VenteController::class, "voirvalider"])->name('Validervente');
Route::post('/ValiderventePot',[VenteController::class, "valider"])->name('ValiderventePot');
Route::get('/ligne-vente/{id}',[VenteController::class, "consulter"])->name('ligne-vente');
Route::get('/tableaudebord',[VenteController::class, "tb"])->name('tableaudebord');
Route::get('/listeVentePDF',[VenteController::class, "liste3"])->name('listeVentePDF');
Route::post('/rechercheventePost',[VenteController::class, "recherche"])->name('rechercheventePost');
Route::get('/liste_venterechPDF',[VenteController::class, "liste4"])->name('liste_venterechPDF');
Route::get('/Supprimervente/{id}',[VenteController::class, "voirsup"])->name('Supprimervente');
Route::post('/SupprimerventePot',[VenteController::class, "sup"])->name('SupprimerventePot');
Route::post('/ModifierventePot/{id}',[VenteController::class, "modifventev"])->name('ModifierventePot');

Route::get('/modifiervente__/{id}',[VenteController::class, "modifvente3"])->name('modifiervente3');
Route::post('/ModifierventePot_/{id}',[VenteController::class, "modifventev2"])->name('ModifierventePot_');

Route::post('/Cloturervente',[VenteController::class, "cloturer"])->name('Cloturervente');
Route::get('/liste-transaction-personnel',[VenteController::class, "listetransactionpersonnel"])->name('liste-transaction-personnel');
Route::post('/transaPost',[VenteController::class, "transaPost"])->name('transaPost');
Route::get('/facturetransa',[VenteController::class, "facturetransa"])->name('facturetransa');
Route::get('/facturetransa2',[VenteController::class, "facturetransa2"])->name('facturetransa2');
Route::post('/liste-recherche-ventes-jour',[VenteController::class, "rechventePost"])->name('liste-recherche-ventes-jour');
Route::get('/rechventePDF',[VenteController::class, "rechventePDF"])->name('rechventePDF');
Route::post('/rechcloturees',[VenteController::class, "rechcloturees"])->name('rechcloturees');
Route::get('/ventejourpdf',[VenteController::class, "ventejourpdf"])->name('ventejourpdf');
Route::get('/modifiervente/{id}',[VenteController::class, "modifvente"])->name('modifiervente');
Route::get('/modifiervente_/{id}',[VenteController::class, "modifvente2"])->name('modifiervente2');
Route::get('/modifierventeclient/{id}',[VenteController::class, "modifvente"])->name('modifierventeclient');
Route::post('/modifventePost/{id}',[VenteController::class, "modifventev"])->name('modifventePost');
Route::post('/modifventeclientPost/{id}',[VenteController::class, "modifventev"])->name('modifventeclientPost');

Route::get('/vente-code',[VenteController::class, "ventecode"])->name('vente-code');
Route::post('/vente-code-post',[VenteController::class, "enregistrer2"])->name('vente-code-post');

Route::get('/recherche-facture',[VenteController::class, "listevente234"])->name('recherche-facture');
Route::post('/recherche-facture2',[VenteController::class, "listevente235"])->name('recherche-facture2');
Route::get('/recherche-facture-client',[VenteclientController::class,"listevente234"])->name('recherche-facture-client');
Route::post('/recherche-facture-client2',[VenteclientController::class,"listevente235"])->name('recherche-facture-client2');
Route::post('/AnnulerventeclientPost',[VenteclientController::class,"annuler"])->name('AnnulerventeclientPost');
Route::get('/toutes-les-ventes-client',[VenteclientController::class,"listevente23"])->name('toutes-les-ventes-client');
Route::post('/toutes-les-ventes-rech-client',[VenteclientController::class,"listevente233"])->name('toutes-les-ventes-rech-client');
Route::get('/toutes-les-ventes-client-pdf',[VenteclientController::class,"listevente233PDF"])->name('toutes-les-ventes-client-pdf');
//CLOTURER LES VENTES
Route::get('/liste-des-ventes-cloturees',[VenteController::class,"listecloture"])->name('liste-des-ventes-cloturees');
Route::get('/Validercloture/{id}',[VenteController::class,"voirvaliderclo"])->name('Validercloture');
Route::get('/fichecloture/{id}',[VenteController::class,"fichecloture"])->name('fichecloture');
Route::post('/ValidercloturePost',[VenteController::class,"validerclo"])->name('ValidercloturePost');

Route::get('/voircloture/{id}',[VenteController::class,"voircloture"])->name('voircloture');
Route::post('/vdversementPost',[VenteController::class,"validercloture"])->name('vdversementPost');

Route::get('/validerversement/{id}',[VenteController::class,"validervers"])->name('validerversement'); 
Route::post('/nouveauversementPost/{id}',[VenteController::class,"enregistrervers"])->name('nouveauversementPost');
Route::get('/vente/liste_versement',[VenteController::class,"listevers"])->name('liste-des-versements');
Route::get('/Versement/{id}',[VenteController::class,"VoirSuppressionvers"])->name('Versement');
Route::post('/SupprimerversementPost',[VenteController::class,"supprimervers"])->name('SupprimerversementPost');

Route::get('/vente/valider_versement_gerant',[VenteController::class,"validerversgerant"])->name('versement_gerant'); 
Route::post('/nouveauversementgerantPost',[VenteController::class,"enregistrerversgerant"])->name('nouveauversementgerantPost');
Route::get('/Gerant/{id}',[VenteController::class,"VoirSuppressionversgerant"])->name('Gerant');
Route::post('/SupprimerversementgerantPost',[VenteController::class,"supprimerversgerant"])->name('SupprimerversementgerantPost');

Route::post('/versement-par-magasin',[VenteController::class,"vpm"])->name('versement-par-magasin'); 

Route::get('/vente-code',[VenteController::class,"ventecode"])->name('vente-code');
Route::post('/vente-code-post',[VenteController::class,"enregistrer2"])->name('vente-code-post');
Route::post('/vente-code2',[AjaxController::class, "ajax"])->name('vente-code2');
Route::post('/ventepostbc',[VenteController::class, "enregistrer_bc"])->name('ventepostbc');


//IMPRIMABLE AJOUTES
Route::get('/parrepas',[VenteController::class, "parrepas"])->name('parrepas');
Route::get('/billetage',[VenteController::class, "billetage"])->name('billetage');
Route::post('/billetage-recherche',[VenteController::class, "billetagerecherche"])->name('billetage-recherche');
Route::get('/billetage-pdf',[VenteController::class, "billetagepdf"])->name('billetage-pdf');
Route::post('/parrepaspdf',[VenteController::class, "parrepaspdf"])->name('parrepaspdf');
Route::get('/parproduitfini',[ProduitController::class, "parproduitfini"])->name('parproduitfini');
Route::post('/parproduitfinipdf', [ProduitController::class, "parproduitfinipdf"])->name('parproduitfinipdf');

//GESTION DES APPRO 
Route::get('/appro/nouveau',[ApprovisionnementController::class, "nouveau"])->name('nouveau_appro');
Route::get('/appro/modifier/{id}',[ApprovisionnementController::class, "modifappro"])->name('modifier_appro');
Route::get('/appro/liste',[ApprovisionnementController::class, "listedesappro"])->name('liste-des-achatsfou');
Route::post('/nouveau_approPost',[ApprovisionnementController::class, "enregistrer"])->name('nouveau_approPost');
Route::get('/validerappro/{id}',[ApprovisionnementController::class, "voirvalider"])->name('validerappro');
Route::post('/validerapproPost',[ApprovisionnementController::class, "valider"])->name('validerapproPost');
Route::get('/consultation_appro/{id}',[ApprovisionnementController::class, "consulter"])->name('consultation_appro');
Route::get('/fournisseur_appro/{id}',[ApprovisionnementController::class, "achatfou"])->name('fournisseur_appro');
Route::post('/rechercheapproPost',[ApprovisionnementController::class, "recherche"])->name('rechercheapproPost');
Route::get('/factureappro/{id}',[ApprovisionnementController::class, "factureappro"])->name('factureappro');
Route::post('/SupprimerapproPost',[ApprovisionnementController::class, "supprimer"])->name('SupprimerapproPost');
Route::post('/AnnulerapproPost',[ApprovisionnementController::class, "annuler"])->name('AnnulerapproPost');
Route::get('/Detailappro/{id}',[ApprovisionnementController::class, "voirdetail"])->name('Detailappro');
Route::post('/AnnulerdetailapproPost',[ApprovisionnementController::class, "annulerdetail"])->name('AnnulerdetailapproPost');


//GESTION DES PRESTATIONS 
Route::get('/prestation/nouveau',[PrestationController::class, "nouveau"])->name('prestation');
Route::get('/prestations/liste',[PrestationController::class, "listedesprestation"])->name('liste-des-prestations');
Route::post('/prestationPost',[PrestationController::class, "enregistrer"])->name('prestationPost');
Route::get('/Prestation/{id}',[PrestationController::class, "voirvalider"])->name('Prestation');
Route::get('/LignePrestation/{id}',[PrestationController::class, "VoirSuppressiondetail"])->name('LignePrestation');
Route::post('/validerprestationPost',[PrestationController::class, "valider"])->name('validerprestationPost');
Route::get('/consultation_prestation/{id}',[PrestationController::class, "consulter"])->name('consultation_prestation');
Route::get('/client_prestation/{id}',[PrestationController::class, "prestcli"])->name('client_prestation');
Route::post('/rechercheprestationPost',[PrestationController::class, "recherche"])->name('rechercheprestationPost');
Route::get('/factureprestation/{id}',[PrestationController::class, "factureprestation"])->name('factureprestation');
Route::post('/SupprimerprestationPost',[PrestationController::class, "supprimer"])->name('SupprimerprestationPost');
Route::post('/AnnulerprestationPost',[PrestationController::class, "annuler"])->name('AnnulerprestationPost');
Route::get('/Detailprestation/{id}',[PrestationController::class, "voirdetail"])->name('Detailprestation');
Route::post('/AnnulerdetailprestationPost',[PrestationController::class, "annulerdetail"])->name('AnnulerdetailprestationPost');
Route::get('/paiement-facture/{id}',[PrestationController::class, "paiement"])->name('paiement-facture');
Route::get('/recu-de-paiement-facture/{id}',[PrestationController::class, "recu"])->name('facturepaieprestation');
Route::post('/ajout-paiement-facture/{id}',[PrestationController::class, "enregistrer3"])->name('ajout-paiement-facture');
Route::get('/Paieprestation/{id}',[PrestationController::class, "voirpaie"])->name('Prestation');
Route::post('/SupprimerpaieprestationPost',[PrestationController::class, "supppaie"])->name('SupprimerpaieprestationPost');
Route::post('/Supprimerdetailprestation',[PrestationController::class, "suppdetail"])->name('Supprimerdetailprestation');
//GESTION DES APPRO CUISINE
/*Route::get('/cuisine/nouveau','CuisineController::class,nouveau')->name('nouveau_appro_cuisine');
Route::post('/nouveau_approcuisinePost','CuisineController::class,enregistrer')->name('nouveau_approcuisinePost');
Route::get('/validerapprocuisine/{id}','CuisineController::class,voirvalider')->name('validerapprocuisine');
Route::post('/validerapprocuisinePost','CuisineController::class,valider')->name('validerapprocuisinePost');
Route::get('/Consultation/{id}','CuisineController::class,consulter')->name('Consultation');*/

/*/GESTION DES APPRO CUISINE
Route::get('/cuisine/nouveau','CuisineController::class,nouveau')->name('nouveau_appro_cuisine');
Route::post('/nouveau_approcuisinePost','CuisineController::class,enregistrer')->name('nouveau_approcuisinePost');
Route::get('/validerapprocuisine/{id}','CuisineController::class,voirvalider')->name('validerapprocuisine');
Route::post('/validerapprocuisinePost','CuisineController::class,valider')->name('validerapprocuisinePost');
Route::get('/Consultation/{id}','CuisineController::class,consulter')->name('Consultation');
Route::post('/SupprimerapprocuiPost','CuisineController::class,supprimer')->name('SupprimerapprocuiPost');


//GESTION DES UTILISATIONS 
Route::get('/utilisation/nouveau','UtilisationController::class,nouveau')->name('nouvelle_utilisation');
Route::post('/nouvelle_utilisationPost','UtilisationController::class,enregistrer')->name('nouvelle_utilisationPost');
Route::get('/validerutilisation/{id}','UtilisationController::class,voirvalider')->name('validerutilisation');
Route::post('/validerutilisationPost','UtilisationController::class,valider')->name('validerutilisationPost');
Route::get('/consultation_utilisation/{id}','UtilisationController::class,consulter')->name('consultation_utilisation');
Route::post('/SupprimerutilisationPost','UtilisationController::class,supprimer')->name('SupprimerutilisationPost');


Route::get('/utilisation/utilisation_ingredient','UtilisationController::class,ingredient')->name('utilisation_ingredient');
Route::post('/nouvelle_utilisationingredientPost','UtilisationController::class,enregistrer_ingredient')->name('nouvelle_utilisationingredientPost');
Route::get('/validerutilisationingredient/{id}','UtilisationController::class,voirvalideringredient')->name('validerutilisationingredient');
Route::post('/validerutilisationingredientPost','UtilisationController::class,valideringredient')->name('validerutilisationingredientPost');
Route::post('/SupprimerutilisationingredientPost','UtilisationController::class,supprimeringredient')->name('SupprimerutilisationingredientPost');
*/
//GESTION DES EMPLOYES
Route::get('/employes/nouveau',[EmployeController::class, "employe"])->name('nouvel_employe');
Route::get('/employes/modifier/{id}',[EmployeController::class, "modifier"])->name('modifier_employe');
Route::get('/employes/absence/{id}',[EmployeController::class, "absence"])->name('absence_employe');
Route::get('/Absence/{id}',[EmployeController::class, "voirabsence"])->name('Absence');
Route::post('/nouveau_employePost',[EmployeController::class, "enregistrer"])->name('nouveau_employePost');
Route::post('/memployePost/{id}',[EmployeController::class, "valider"])->name('memployePost');
Route::post('/supprimerabsence',[EmployeController::class, "supprimerabsence"])->name('supprimerabsence');
Route::post('/absencePost/{id}',[EmployeController::class, "enregistrer_absence"])->name('absencePost');
Route::get('/employes/liste',[EmployeController::class, "liste"])->name('liste_des_employes');
Route::get('/employes/avance/{id}',[EmployeController::class, "avance"])->name('avance_employe');
Route::get('/Avance/{id}',[EmployeController::class, "voiravance"])->name('Avance');
Route::post('/avancePost/{id}',[EmployeController::class, "enregistrer_avance"])->name('avancePost');
Route::post('/supprimeravance',[EmployeController::class, "supprimeravance"])->name('supprimeravance');


//GESTION DES MAGASINS
Route::get('/magasin/nouveau',[MagasinController::class,"magasin"])->name('nouveau-magasin');
Route::get('/magasin/modifier/{id}',[MagasinController::class,"modifier"])->name('modifier-magasin');
Route::post('/modifiermagasinPost/{id}',[MagasinController::class,"valider"])->name('modifiermagasinPost');
Route::post('/nouveau_magasinPost',[MagasinController::class,"enregistrer"])->name('nouveau_magasinPost');
Route::get('/magasin/liste',[MagasinController::class,"liste"])->name('liste_des_magasins');
Route::get('/magasin/modifier-logo/{id}',[MagasinController::class,"modifierlogo"])->name('modifier-magasin-logo');
Route::post('/modifiermagasinlogoPost/{id}',[MagasinController::class,"validerlogo"])->name('modifiermagasinlogoPost');
Route::get('/stock-general-magasin',[MagasinController::class,"stockmagasin"])->name('stock-general-magasin');
Route::get('/situation-stock-magasin',[MagasinController::class,"listee"])->name('situation-stock-magasin');
Route::get('/situation-stock-magasinPDF',[MagasinController::class,"listeee"])->name('situation-stock-magasinPDF');
Route::get('/detail-mouvement-magasin-general/{id}',[MagasinController::class,"consulter3"])->name('detail-mouvement-magasin-general');
Route::get('/detail-mouvement-depot/{id}',[MagasinController::class,"consulter33"])->name('detail-mouvement-depot');
Route::post('/magasingeneralPost',[MagasinController::class,"magasinPost"])->name('magasingeneralPost');
Route::get('/magasingeneralpdfPost',[MagasinController::class,"magasinpostpdf"])->name('magasingeneralpdfPost');
Route::post('/mouvementproduitPost',[MagasinController::class,"mouvementPost"])->name('mouvementproduitPost');

Route::get('/mouvementproduitPDF',[MagasinController::class,"mouvementPDF"])->name('mouvementproduitPDF');

//GESTION DES FOURNISSEURS
Route::get('/fournisseurs/nouveau',[FournisseurController::class, "fournisseur"])->name('nouveau-fournisseur');
Route::post('/nouveau_fouPost',[FournisseurController::class, "enregistrer"])->name('nouveau_fouPost');
Route::get('/liste_des_fournisseurs',[FournisseurController::class, "liste"])->name('liste_des_fournisseurs');
Route::get('/Fournisseur/{id}',[FournisseurController::class, "VoirSuppression"])->name('Fournisseur');
Route::post('/SupprimerfournisseurPost',[FournisseurController::class, "supprimer"])->name('SupprimerfournisseurPost');
Route::get('/fournisseurs/modifier/{id}',[FournisseurController::class, "modifier"])->name('modifier-fournisseur');
Route::post('/fournisseurs/modifier-post/{id}',[FournisseurController::class, "valider"])->name('modifier-fournisseur-post');


//PAIEMENTS FOU
Route::get('/paiementfou/{id}',[FournisseurController::class, "pf"])->name('paiementfou');
Route::post('/paiementfouPost',[FournisseurController::class, "enregistrer3"])->name('paiementfouPost');
Route::get('/facturepaie/{id}',[FournisseurController::class, "facturepaie"])->name('facturepaie');
Route::get('/Paiefou/{id}',[FournisseurController::class, "voirpaie"])->name('Paiefou');
Route::post('/ValiderpaiefouPost',[FournisseurController::class, "vdpaie"])->name('ValiderpaiefouPost');
Route::post('/SupprimerpaiefouPost',[FournisseurController::class, "supprimerpaie"])->name('SupprimerpaiefouPost');

//Route::get('/detailsfou/{id}','VenteController::class,detail2')->name('detailsfou');
//Route::get('/liste_situation_fouPDF','FournisseurController::class,liste3')->name('liste_situation_fouPDF');
//PAIEMENTS CLIENT
Route::get('/paiementcli',[VenteController::class, "pc"])->name('paiementcli');
Route::get('/liste-des-paiements',[VenteController::class, "listev"])->name('liste-des-paiements');
Route::get('/liste-des-paiements-pdf',[VenteController::class, "listevpdf"])->name('liste-des-paiements-pdf');
Route::post('/liste-des-paiements-rech',[VenteController::class, "rechpaie"])->name('liste-des-paiements-rech');
Route::post('/paiementcliPost',[VenteController::class, "enregistrer3"])->name('paiementcliPost');
Route::get('/situation_hopital',[VenteController::class, "transaction"])->name('situation_hopital');
Route::get('/facture-paiement-hopital/{id}',[VenteController::class, "factureph"])->name('facture-paiement-hopital');
//SOLDE
Route::get('/journal-de-caisse',[VenteController::class, "solde"])->name('journal-de-caisse');
Route::get('/caisse-depense',[FournisseurController::class,"solde"])->name('caisse-depense');
Route::get('/caisse',[ApprovisionnementController::class,"voir"])->name('caisse');
Route::post('/nouveausoldePost',[ApprovisionnementController::class,"enregistrer3"])->name('nouveausoldePost');
Route::get('/banque',[VenteController::class, "banque"])->name('banque');
Route::get('/bilan',[VenteController::class, "bilan"])->name('bilan');
Route::get('/Depense/{id}',[ApprovisionnementController::class,"voirdep"])->name('Depense');
Route::post('/supprimerdepensePost',[ApprovisionnementController::class,"suppdep"])->name('supprimerdepensePost');
Route::post('/validerdepensePost',[ApprovisionnementController::class,"validerdep"])->name('validerdepensePost');
Route::post('/annulerdepensePost',[ApprovisionnementController::class,"annulerdep"])->name('annulerdepensePost');

//GESTION DES SALAIRES RecuController
Route::get('/nouveau-salaire/{id}',[SalaireController::class,"ajouter"])->name('nouveau-salaire');
Route::get('/nouveau-salaire-permanent/{id}',[SalaireController::class,"ajouter2"])->name('nouveau-salaire-permanent');
Route::post('/salairePost/{id}',[SalaireController::class,"generer"])->name('salairePost');
Route::post('/salaire2Post/{id}',[SalaireController::class,"generer2"])->name('salaire2Post');
Route::get('/salaires/liste/{id}',[SalaireController::class,"liste"])->name('liste-des-salaires');
Route::get('/salaires/liste-journalier',[SalaireController::class,"listejourn"])->name('liste-des-salaires-journalier');
Route::get('/salaires/liste-permanent',[SalaireController::class,"listeperm"])->name('liste-des-salaires-permanent');
Route::get('/Salaire/{id}',[SalaireController::class,"VoirSuppression"])->name('Salaire');
Route::post('/SupprimerSalairePost',[SalaireController::class,"Supprimer"])->name('SupprimerSalairePost');
Route::get('/bulletin-paie-journalier/{id}',[SalaireController::class,"voirRecuSalaire"])->name('bulletin-paie-journalier');
Route::get('/bulletin-paie-permanent/{id}',[SalaireController::class,"voirRecuSalaire2"])->name('bulletin-paie-permanent');

Route::post('/historique-paiement-journalier',[SalaireController::class,"listejourn2"])->name('historique-paiement-journalier');
Route::post('/historique-paiement-permanent',[SalaireController::class,"listeperm2"])->name('historique-paiement-permanent');
//GESTION DES INVENTAIRES

Route::get('/inventaire/inventaire_magasin',[InventaireController::class, "inventairemagasin"])->name('inventaire_magasin');
Route::post('/inventairemagasinPost',[InventaireController::class, "enregistrermagasin"])->name('inventairemagasinPost');
Route::get('/modifier_inventaire_magasin/{id}',[InventaireController::class, "modif_magasin"])->name('modifier_inventaire_magasin');
Route::post('/modifier_inventaire_magasinPost/{id}',[InventaireController::class, "valider_magasin"])->name('modifier_inventaire_magasinPost');
Route::get('/Inventaire_magasin/{id}',[InventaireController::class, "VoirSuppressionmagasin"])->name('Inventaire_magasin');
Route::post('/SupprimerInventairemagasinPost',[InventaireController::class, "Supprimermagasin"])->name('SupprimerInventairemagasinPost');
Route::post('/ValiderInventairemagasinPost',[InventaireController::class, "vdmagasin"])->name('ValiderInventairemagasinPost');
Route::get('/detail_magasin/{id}',[InventaireController::class, "detailmagasin"])->name('detail_magasin');
Route::get('/Inventaire_detail_magasin/{id}',[InventaireController::class, "VoirSuppressiondetailmagasin"])->name('Inventaire_detail_magasin');
Route::post('/SupprimerDetailInventairemagasinPost',[InventaireController::class, "Supprimerdetailmagasin"])->name('SupprimerDetailInventairemagasinPost');
Route::get('/fichemagasin/{id}',[InventaireController::class, "fichemag"])->name('fichemagasin');
Route::get('/ajuster/{id}',[InventaireController::class, "nouveauajust"])->name('ajuster-stock');
Route::post('/ajustPost',[InventaireController::class, "ajuster"])->name('ajustPost');

Route::get('/inventaire/recherche-inv-magasin',[InventaireController::class, "rinventairemagasin"])->name('rinventairemagasin');
Route::post('/rinventairemagasinPost',[InventaireController::class, "rinventairemagasinpost"])->name('rinventairemagasinPost');
Route::get('/rinventairemagasinpdf',[InventaireController::class, "rinventairemagasinpdf"])->name('rinventairemagasinpdf');

//INVENTAIRE GENERAL
Route::get('/inventaire/inventaire-general',[InventaireController::class, "inventairegeneral"])->name('inventaire-general');
Route::post('/inventairegeneralPost',[InventaireController::class, "enregistrergeneral"])->name('inventairegeneralPost');
Route::get('/fichemagasingeneral/{id}',[InventaireController::class, "fichegene"])->name('fichemagasingeneral');
Route::get('/detail_general/{id}',[InventaireController::class, "detailgeneral"])->name('detail_general');
Route::get('/voirdetailgeneral/{id}',[InventaireController::class, "voirdetailgeneral"])->name('voirdetailgeneral');
Route::get('/Invgeneral/{id}',[InventaireController::class, "voirinvgeneral"])->name('Invgeneral');
Route::get('/modifier_inventaire_general/{id}',[InventaireController::class, "modif_general"])->name('modifier_inventaire_general');
Route::post('/modifier_inventaire_generalPost/{id}',[InventaireController::class, "valider_general"])->name('modifier_inventaire_generalPost');
Route::post('/ValiderInventairegeneralPost',[InventaireController::class, "vdgeneral"])->name('ValiderInventairegeneralPost');
Route::post('/SupprimerInventairegeneralPost',[InventaireController::class, "Supprimergeneral"])->name('SupprimerInventairegeneralPost');
Route::post('/SupprimerDetailInventairegeneralPost',[InventaireController::class, "Supprimerdetailgeneral"])->name('SupprimerDetailInventairegeneralPost');



//VALIDER AJUST
Route::get('/validerajust/{id}',[InventaireController::class, "voirajust"])->name('validerajust');
Route::post('/validerajustPost',[InventaireController::class, "valider"])->name('validerajustPost');

/*Route::get('/inventaire/inventaire_cuisine',[InventaireController::class, "inventairecuisine"])->name('inventaire_cuisine');
Route::post('/inventairecuisinePost',[InventaireController::class, "enregistrercuisine"])->name('inventairecuisinePost');
Route::get('/modifier_inventaire_cuisine/{id}',[InventaireController::class, "modif_cuisine"])->name('modifier_inventaire_cuisine');
Route::post('/modifier_inventaire_cuisinePost/{id}','InventaireController::class,valider_cuisine')->name('modifier_inventaire_cuisinePost');
Route::get('/Inventaire_cuisine/{id}','InventaireController::class,VoirSuppressioncuisine')->name('Inventaire_cuisine');
Route::post('/SupprimerInventairecuisinePost','InventaireController::class,Supprimercuisine')->name('SupprimerInventairecuisinePost');
Route::get('/detail_cuisine/{id}','InventaireController::class,detailcuisine')->name('detail_cuisine');
Route::get('/ajout_inv_cuisine/{id}','InventaireController::class,ajoutcuisine')->name('ajout_inv_cuisine');
Route::post('/ajout_inventaire_cuisinePost/{id}','InventaireController::class,ajout_ligne_cuisine')->name('ajout_inventaire_cuisinePost');
Route::get('/Inventaire_detail_cuisine/{id}','InventaireController::class,VoirSuppressiondetailcuisine')->name('Inventaire_detail_cuisine');
Route::post('/SupprimerDetailInventairecuisinePost','InventaireController::class,Supprimerdetailcuisine')->name('SupprimerDetailInventairecuisinePost');

Route::get('/inventaire/inventaire_resto','InventaireController::class,inventaireresto')->name('inventaire_resto');
Route::post('/inventairerestoPost','InventaireController::class,enregistrerresto')->name('inventairerestoPost');
Route::get('/modifier_inventaire_resto/{id}','InventaireController::class,modif_resto')->name('modifier_inventaire_resto');
Route::post('/modifier_inventaire_restoPost/{id}','InventaireController::class,valider_resto')->name('modifier_inventaire_restoPost');
Route::get('/Inventaire_resto/{id}','InventaireController::class,VoirSuppressionresto')->name('Inventaire_resto');
Route::post('/SupprimerInventairerestoPost','InventaireController::class,Supprimerresto')->name('SupprimerInventairerestoPost');
Route::get('/detail_resto/{id}','InventaireController::class,detailresto')->name('detail_resto');
Route::get('/ajout_inv_resto/{id}','InventaireController::class,ajoutresto')->name('ajout_inv_resto');
Route::post('/ajout_inventaire_restoPost/{id}','InventaireController::class,ajout_ligne_resto')->name('ajout_inventaire_restoPost');
Route::get('/Inventaire_detail_resto/{id}','InventaireController::class,VoirSuppressiondetailresto')->name('Inventaire_detail_resto');
Route::post('/SupprimerDetailInventairerestoPost','InventaireController::class,Supprimerdetailresto')->name('SupprimerDetailInventairerestoPost');
*/

//GESTION DES TAXES

Route::get('/taxes/nouveau-taxe',[TaxeController::class, "nouveau"])->name('nouveau-taxe');
Route::post('/nouveautaxePost',[TaxeController::class, "enregistrer"])->name('nouveautaxePost');
Route::get('/modifiertaxe/{id}',[TaxeController::class, "modifier"])->name('modifiertaxe');
Route::post('/modifiertaxePost/{id}',[TaxeController::class, "valider"])->name('modifiertaxePost');
Route::get('/Taxe/{id}',[TaxeController::class, "VoirSuppression"])->name('Taxe');
Route::post('/SupprimertaxePost',[TaxeController::class, "supprimer"])->name('SupprimertaxePost');


/*Route::get('/ticket/vente_ticket','TaxeController::class,venteticket')->name('vente_ticket');
Route::post('/nouveauventeticketPost','TaxeController::class,enregistrer_vente')->name('nouveauventeticketPost');
Route::get('/Detail-vente/{id}','TaxeController::class,detail')->name('Detail-vente');
Route::get('/Detailticket/{id}','TaxeController::class,VoirSuppressionventeticket')->name('Detailticket');
Route::post('/SupprimerventeticketPost','TaxeController::class,supprimerventeticket')->name('SupprimerventeticketPost');*/


//GESTION DES REMISES
Route::get('/remise/nouvelle-remise',[RemiseController::class, "nouveau"])->name('nouvelle-remise');
Route::post('/nouvelleremisePost',[RemiseController::class, "enregistrer"])->name('nouvelleremisePost');
Route::get('/Remise/{id}',[RemiseController::class, "Voirremise"])->name('Remise');
Route::post('/SupprimerremisePost',[RemiseController::class, "supprimer"])->name('SupprimerremisePost');
Route::post('/ValiderremisePost',[RemiseController::class, "upd"])->name('ValiderremisePost');
Route::post('/AnnulerremisePost',[RemiseController::class, "ann"])->name('AnnulerremisePost');


/*//GESTION DES SUBVENTIONS

Route::get('/subvention/nouveau_subvention','SubventionController::class,nouveau')->name('nouveau_subvention');
Route::post('/nouveausubventionPost','SubventionController::class,enregistrer')->name('nouveausubventionPost');
Route::get('/modifiersubvention/{id}','SubventionController::class,modifier')->name('modifiersubvention');
Route::post('/modifiersubventionPost/{id}','SubventionController::class,valider')->name('modifiersubventionPost');
Route::get('/Subvention/{id}','SubventionController::class,VoirSuppression')->name('Subvention');
Route::post('/SupprimersubventionPost','SubventionController::class,supprimer')->name('SupprimersubventionPost');*/


//GESTION DES CLIENTS EXTERNES

Route::get('/client_externe/nouveau_client',[VenteclientController::class, "nouveau"])->name('nouveau_client');
Route::post('/nouveauclientPost',[VenteclientController::class, "enregistrerclient"])->name('nouveauclientPost');
Route::get('/modifierclient/{id}',[VenteclientController::class, "modifier"])->name('modifierclient');
Route::post('/modifierclientPost/{id}',[VenteclientController::class, "modifierclientpost"])->name('modifierclientPost');
Route::get('/Client/{id}',[VenteclientController::class, "VoirSuppressionclient"])->name('Client');
Route::post('/SupprimerclientPost',[VenteclientController::class, "supprimerclient"])->name('SupprimerclientPost');

Route::get('/client_externe/vente',[VenteclientController::class, "vente"])->name('vente_client');
Route::get('/client_externe/modifiervente/{id}',[VenteclientController::class, "vente2"])->name('modifier_vente_client');
Route::post('/modifierventeclientpost/{id}',[VenteclientController::class, "modifventev"])->name('modifierventeclientpost');

Route::get('/client_externe/modifiervente_/{id}',[VenteclientController::class, "modifier3"])->name('modifier_vente_client_');
Route::post('/modifierventeclientpost_/{id}',[VenteclientController::class, "modifventev2"])->name('modifierventeclientpost_');
Route::post('/nouveauventeclientPost',[VenteclientController::class, "enregistrer"])->name('nouveauventeclientPost');
Route::get('/client_externe/liste',[VenteclientController::class, "liste"])->name('liste_des_ventes_client'); 
Route::get('/Venteclient/{id}',[VenteclientController::class, "VoirSuppression"])->name('Venteclient');
Route::post('/SupprimerventeclientPost',[VenteclientController::class, "supprimer"])->name('SupprimerventeclientPost');
Route::get('/Validerventeclient/{id}',[VenteclientController::class, "voirvalider"])->name('Validerventeclient');
Route::post('/ValiderventeclientPot',[VenteclientController::class, "valider"])->name('ValiderventeclientPot');
Route::get('/ligne-vente-client/{id}',[VenteclientController::class, "consulter"])->name('ligne-vente-client');
Route::get('/bordereaudelivraison/{id}',[VenteclientController::class, "facturevente"])->name('factureVenteclient');
Route::get('/bordereaudelivraison_/{id}',[VenteclientController::class, "facturevente3"])->name('factureVenteclient2');
Route::get('/factureventeclient/{id}',[VenteclientController::class, "facturevente2"])->name('factureclient');
Route::get('/factureventeclient21/{id}',[VenteclientController::class, "facturevente21"])->name('factureclient21');
Route::get('/vente_client_externe/{id}',[VenteclientController::class, "venteclient"])->name('vente_client_externe');
Route::post('/liste-rech',[VenteclientController::class, "listerech"])->name('liste-rech');
Route::get('/listerechpdf',[VenteclientController::class, "listerechpdf"])->name('listerechpdf');
Route::get('/listerechpdf2',[VenteclientController::class, "listerechpdf2"])->name('listerechpdf2');

Route::get('/paiementclient/{id}',[VenteclientController::class, "pclient"])->name('paiementclient');
Route::get('/soldeini/{id}',[VenteclientController::class, "pclient2"])->name('soldeini');
Route::get('/client_externe/liste_paiement',[VenteclientController::class, "listepaiement"])->name('liste_des_paiements');
Route::post('/paiementclientexternePost',[VenteclientController::class, "enregistrer3"])->name('paiementclientexternePost');
Route::post('/soldepaimentPost',[VenteclientController::class, "enregistrer4"])->name('soldepaimentPost');
Route::get('/facturepaieclientexterne/{id}',[VenteclientController::class, "facturepaie"])->name('facturepaieclientexterne');
Route::get('/Paiementexterne/{id}',[VenteclientController::class, "VoirSuppressionpaie"])->name('Paiementexterne');
Route::post('/SupprimerpaiementclientPost',[VenteclientController::class, "supprimerpaie"])->name('SupprimerpaiementclientPost');
Route::post('/ValiderpaiementclientPost',[VenteclientController::class, "validerpaie"])->name('ValiderpaiementclientPost');
Route::get('/Soldepaiment/{id}',[VenteclientController::class, "Voirsoldepaiment"])->name('Soldepaiment');
Route::post('/SupprimersoldepaimentPost',[VenteclientController::class, "supprimersoldepaiment"])->name('SupprimersoldepaimentPost');
Route::post('/ValidersoldepaimentPost',[VenteclientController::class, "validersoldepaiment"])->name('ValidersoldepaimentPost');


Route::get('/facturepaiefinale/{id}',[VenteclientController::class, "facturepaiefinale"])->name('facturepaiefinale');
Route::get('/facturepaiefinale2/{id}',[VenteclientController::class, "facturepaiefinale2"])->name('facturepaiefinale2');


//FACTURE GLOBALE
Route::get('/client_externe/facture-globale',[VenteclientController::class, "fg"])->name('facture-globale');
Route::post('/fgPost',[VenteclientController::class, "fgpost"])->name('fgPost');
Route::get('/factureglobalepdf/{id}',[VenteclientController::class, "factureglobalepdf"])->name('factureglobalepdf');
//Supprimer facture globale
Route::get('/Ventecli/{id}',[VenteclientController::class, "VoirSupp"])->name('Ventecli');
Route::post('/SupprimerventecliPost',[VenteclientController::class, "supp"])->name('SupprimerventecliPost');
Route::get('/client_externe/creance',[VenteclientController::class, "creance"])->name('creance');
Route::post('/creance-rech',[VenteclientController::class, "creancerech"])->name('creance-rech');

//GESTION DES TRANSFERTS 
Route::get('/transfert/nouveau',[TransfertController::class,"transfert"])->name('nouveau_transfert');
Route::get('/transfert/liste-des-transferts',[TransfertController::class,"liste"])->name('liste-des-transferts');
Route::post('/nouveau_transfertPost',[TransfertController::class,"enregistrer"])->name('nouveau_transfertPost');
Route::get('/validertransfert/{id}',[TransfertController::class,"voirvalider"])->name('validertransfert');
Route::post('/validertransferteffecuePost',[TransfertController::class,"valider"])->name('validertransferteffecuePost');
Route::get('/consultation_transfert/{id}',[TransfertController::class,"detail"])->name('consultation_transfert');
Route::post('/SupprimertransfertPost',[TransfertController::class,"supprimer"])->name('SupprimertransfertPost');
Route::get('/liste_transfert',[TransfertController::class,"liste1"])->name('liste_transfert');
Route::get('/liste_transfert_recu',[TransfertController::class,"liste2"])->name('liste_transfert_recu');

Route::get('/etat-transfert', [TransfertController::class, 'index'])->name('etat.transfert');
Route::post('/etat-transfert/resultat', [TransfertController::class, 'resultat'])->name('etat.transfert.resultat');
Route::post('/etat-transfert/pdf', [TransfertController::class, 'exportPdf'])->name('etat.transfert.pdf');


//GESTION DES TRANSFERTS ENTRE MAGASINS DE Vente
Route::get('/transfert/nouveau_transfert_boutique',[TransfertboutiqueController::class, "transfert"])->name('nouveau_transfert_boutique');
Route::post('/nouveau_transfertboutiquePost',[TransfertboutiqueController::class, "enregistrer"])->name('nouveau_transfertboutiquePost');
Route::get('/validertransfertboutique/{id}',[TransfertboutiqueController::class, "voirvalider"])->name('validertransfertboutique');
Route::post('/validertransferteffecueboutiquePost',[TransfertboutiqueController::class, "valider1"])->name('validertransferteffecueboutiquePost');
Route::post('/validertransfertrecuboutiquePost',[TransfertboutiqueController::class, "valider2"])->name('validertransfertrecuboutiquePost');
Route::get('/consultation_transfert_boutique/{id}',[TransfertboutiqueController::class, "detail"])->name('consultation_transfert_boutique');
Route::post('/SupprimertransfertboutiquePost',[TransfertboutiqueController::class, "supprimer"])->name('SupprimertransfertboutiquePost');
Route::get('/liste_transfert_boutique',[TransfertboutiqueController::class, "liste1"])->name('liste_transfert_boutique');
Route::get('/liste_transfert_recu_boutique',[TransfertboutiqueController::class, "liste2"])->name('liste_transfert_recu_boutique');
Route::post('/annulertransfertrecuboutiquePost',[TransfertboutiqueController::class, "annuler"])->name('annulertransfertrecuboutiquePost');
Route::get('/transfertboutique/tous-les-transferts',[TransfertboutiqueController::class, "listetransfert"])->name('liste-transfert-boutique');


//GESTION DES TRANSFERTS D'EMBALLAGE
Route::get('/transfertemballage/nouveau',[TransfertemballageController::class, "nouveau"])->name('nouveau-transfert-emballage');
Route::post('/nouveautransfertemballagePost',[TransfertemballageController::class, "enregistrer"])->name('nouveautransfertemballagePost');
Route::get('/validertransfertemballage/{id}',[TransfertemballageController::class, "voirvalider"])->name('validertransfertemballage');
Route::post('/validertransfertemballagePost',[TransfertemballageController::class, "valider"])->name('validertransfertemballagePost');
Route::get('/consultation-transfert-emballage/{id}',[TransfertemballageController::class, "detail"])->name('consultation-transfert-emballage');
Route::post('/SupprimertransfertemballagePost',[TransfertemballageController::class, "supprimer"])->name('SupprimertransfertemballagePost');
Route::get('/liste_transfert',[TransfertemballageController::class, "liste1"])->name('liste_transfert');
Route::get('/liste_transfert_recu',[TransfertemballageController::class, "liste2"])->name('liste_transfert_recu');

//GESTION DES RETOURS D'EMBALLAGE
Route::get('/retouremballage/nouveau',[RetouremballageController::class, "nouveau"])->name('nouveau-retour-emballage');
Route::post('/nouveauretouremballagePost',[RetouremballageController::class, "enregistrer"])->name('nouveauretouremballagePost');
Route::get('/validerretouremballage/{id}',[RetouremballageController::class, "voirvalider"])->name('validerretouremballage');
Route::post('/validerretouremballagePost',[RetouremballageController::class, "valider"])->name('validerretouremballagePost');
Route::get('/consultation-retour-emballage/{id}',[RetouremballageController::class, "detail"])->name('consultation-retour-emballage');
Route::post('/SupprimerretouremballagePost',[RetouremballageController::class, "supprimer"])->name('SupprimerretouremballagePost');
Route::get('/liste_transfert',[RetouremballageController::class, "liste1"])->name('liste_transfert');
Route::get('/liste_transfert_recu',[RetouremballageController::class, "liste2"])->name('liste_transfert_recu');

//EMBALLAGE ET RETOUR CONSIGNATION CLIENT 
Route::get('/transfertemballage/listecli',[TransfertemballageController::class, "listecli"])->name('liste-consi-client');

//DEVIS

Route::get('/devis',[VenteController::class, "devis"])->name('devis');
Route::get('/facturedevis/{id}',[VenteController::class, "facturedevis"])->name('facturedevis');
Route::post('/devisPost',[VenteController::class, "devispost"])->name('devisPost');

//GESTION DES DEPENSES
Route::get('/depense/nouveau',[DepenseController::class, "voir"])->name('depense');
Route::post('/depensePost',[DepenseController::class, "enregistrer3"])->name('depensePost');
Route::get('/Depense/{id}',[DepenseController::class, "voirdep"])->name('Depense');
Route::post('/supprimerdepPost',[DepenseController::class, "suppdep"])->name('supprimerdepPost');
Route::post('/recherche-caisse-depense',[DepenseController::class, "rechdepensepost"])->name('recherche-caisse-depense');

Route::get('/historique-par-caissier',[VenteController::class,"listevente323"])->name('historique-par-caissier');
Route::post('/historique-par-caissier-rech',[VenteController::class,"listevente324"])->name('historique-par-caissier-rech');
Route::get('/historique-par-caissier-pdf',[VenteController::class,"listevente325"])->name('historique-par-caissier-pdf');

//GESTION DES TYPES DE DEPENSES
Route::get('/typedepense/nouveau',[DepenseController::class, "typedep"])->name('typededepense');
Route::post('/typedepensePost',[DepenseController::class,"enregistrertypedep"])->name('typedepensePost');

Route::get('/typedepense/modifier/{id}',[DepenseController::class,"mtypedep"])->name('modifier-typededepense');
Route::post('/mtypedepensePost/{id}',[DepenseController::class,"mtypedepost"])->name('mtypedepensePost');

//Route::get('/Depense/{id}','DepenseController::class,voirdep')->name('Depense');

//GESTION PRODUCTION
Route::get('/production/nouveau',[ProductionController::class, "nouveau"])->name('production');
Route::get('/production/modifier/{id}',[ProductionController::class, "voirmodif"])->name('modifier-production');
Route::post('/productionPost',[ProductionController::class, "enregistrer"])->name('productionPost');
Route::post('/mproductionPost/{id}',[ProductionController::class, "validermodif"])->name('mproductionPost');
Route::get('/production/detail/{id}',[ProductionController::class, "consulter"])->name('ligne-production');
Route::get('/validerprod/{id}',[ProductionController::class, "voirvalider"])->name('validerprod');
Route::post('/validerprodPost',[ProductionController::class, "valider"])->name('validerprodPost');
Route::get('/detail-production/{id}',[ProductionController::class, "consulter"])->name('detail-production');
Route::get('/Supprimerproduction/{id}',[ProductionController::class, "voirproduction"])->name('Supprimerproduction');
Route::post('/SupprimerproductionPost',[ProductionController::class, "supprod"])->name('SupprimerproductionPost');
Route::get('/Annulerproduction/{id}',[ProductionController::class, "voirprod"])->name('Annulerproduction');
Route::post('/AnnulerproductionPost',[ProductionController::class, "annuler"])->name('AnnulerproductionPost');
Route::get('/modifproduction/{id}',[ProductionController::class, "voirmodif"])->name('modifproduction');
Route::post('/modifproductionPost/{id}',[ProductionController::class, "validermodif"])->name('modifproductionPost');
Route::get('/Supprimerligneproduction/{id}',[ProductionController::class, "voirligne"])->name('Supprimerligneproduction');
Route::post('/SupprimerligneproductionPost',[ProductionController::class, "suppligne"])->name('SupprimerligneproductionPost');

//GESTION DES LIVRAISONS

Route::get('/livraison/{id}',[LivraisonController::class, "livraison"])->name('livraison');
Route::post('/livraisonPost',[LivraisonController::class, "livraisonpost"])->name('livraisonPost');
Route::get('/Livraison/{id}',[LivraisonController::class, "voirlivraison"])->name('Livraison');
Route::post('/SupprimerlivraisonPost',[LivraisonController::class, "supprimerlivraison"])->name('SupprimerlivraisonPost');
Route::get('/detail-livraison/{id}',[LivraisonController::class, "detaillivraison"])->name('detail-livraison');
Route::get('/bordereau-livraison/{id}',[LivraisonController::class, "facturelivraison"])->name('bordereau-livraison');

//GESTION APPRO Matiere

Route::get('/appromatiere/nouveau',[AppromatiereController::class, "nouveau"])->name('appro-matiere');
Route::post('/matiereapproPost',[AppromatiereController::class, "enregistrer"])->name('matiereapproPost');
Route::get('/appromatiere/liste',[AppromatiereController::class, "listedesappro"])->name('liste-des-appro');
Route::get('/validerappromatiere/{id}',[AppromatiereController::class, "voirvalider"])->name('validerappromatiere');
Route::post('/validerappromatierePost',[AppromatiereController::class, "valider"])->name('validerappromatierePost');
Route::post('/annulerappromatierePost',[AppromatiereController::class, "annuler"])->name('annulerappromatierePost');
Route::get('/consultation_appro_matiere/{id}',[AppromatiereController::class, "consulter"])->name('consultation_appro_matiere');
Route::get('/factureappromatiere/{id}',[AppromatiereController::class, "factureappro"])->name('factureappromatiere');
Route::post('/SupprimerappromatierePost',[AppromatiereController::class, "supprimer"])->name('SupprimerappromatierePost');


//GESTION DES RETOUR APPRO MATIERE
Route::get('/retourappromatiere/nouveau',[RetourappromatiereController::class, "nouveau"])->name('retourappromatiere');
Route::post('/retourappromatierepost',[RetourappromatiereController::class, "enregistrer"])->name('retourappromatierepost');
Route::get('/Retourappromatiere/{id}',[RetourappromatiereController::class, "voir"])->name('Retourappromatiere');
Route::get('/detailretourmatiere/{id}',[RetourappromatiereController::class, "detail"])->name('detailretourmatiere');
Route::post('/supprimerretourappromatiere',[RetourappromatiereController::class, "supprimer"])->name('supprimerretourappromatiere');
Route::post('/validerretourappromatiere',[RetourappromatiereController::class, "valider"])->name('validerretourappromatiere');
Route::post('/annulerretourappromatiere',[RetourappromatiereController::class, "annuler"])->name('annulerretourappromatiere');


//GESTION DES RETOUR APPRO EMBALLAGE
Route::get('/retourapproemballage/nouveau',[RetourapproemballageController::class, "nouveau"])->name('retourapproemballage');
Route::post('/retourapproemballagepost',[RetourapproemballageController::class, "enregistrer"])->name('retourapproemballagepost');
Route::get('/Retourapproemballage/{id}',[RetourapproemballageController::class, "voir"])->name('Retourapproemballage');
Route::get('/detailretouremballage/{id}',[RetourapproemballageController::class, "detail"])->name('detailretouremballage');
Route::post('/supprimerretourapproemballagee',[RetourapproemballageController::class, "supprimer"])->name('supprimerretourapproemballage');
Route::post('/validerretourapproemballage',[RetourapproemballageController::class, "valider"])->name('validerretourapproemballage');
Route::post('/annulerretourapproemballage',[RetourapproemballageController::class, "annuler"])->name('annulerretourapproemballage');


Route::get('/historiquebenef',[VenteclientController::class,"historiquebenef"])->name('historiquebenef');
Route::post('/historiquebenef2',[VenteclientController::class,"historiquebenef2"])->name('historiquebenef2');


//TRANSFERT DEPOT DEPOT

Route::get('/transfertdepotdepot/nouveau',[TransfertdepotController::class, "depotdepot"])->name('depot-depot');
Route::get('/transfertdepotdepot/liste',[TransfertdepotController::class, "listedepotdepot"])->name('depot-liste');
Route::post('/depotdepotPost',[TransfertdepotController::class, "depotdepotpost"])->name('depotdepotPost');
Route::get('/voirtransfertdepot/{id}',[TransfertdepotController::class, "voirtransfert"])->name('voirtransfertdepot');
Route::post('/validertransfertdepotdepotPost',[TransfertdepotController::class, "validerdepdep"])->name('validertransfertdepotdepotPost');
Route::post('/annulertransfertdepotdepotPost',[TransfertdepotController::class, "annulerdepdep"])->name('annulertransfertdepotdepotPost');
Route::post('/SupprimertransfertdepotdepotPost',[TransfertdepotController::class, "supprimerdepdep"])->name('SupprimertransfertdepotdepotPost');
Route::get('/transfertdepotdepot/transfert-vers-depot',[TransfertdepotController::class, "versdep"])->name('transfert-vers-depot');
Route::post('/transfertdepotdepotPost',[TransfertdepotController::class, "versdeppost"])->name('transfertdepotdepotPost');

//GESTION DES RETOURS

Route::get('/Retour/nouveau',[RetourcommandeController::class, "retourcommande"])->name('nouveau-retour');
Route::post('/retourcommandePost',[RetourcommandeController::class, "enregistrer"])->name('retourcommandePost');
Route::get('/ligne-retour/{id}',[RetourcommandeController::class, "detail"])->name('ligne-retour');
Route::get('/Retour/{id}',[RetourcommandeController::class, "voir"])->name('Retour');
Route::post('/SupprimerretourPost',[RetourcommandeController::class, "supprimer"])->name('SupprimerretourPost');
Route::post('/ValiderretourPost',[RetourcommandeController::class, "valider"])->name('ValiderretourPost');

//GESTION DES RETOURS CLIENTS

Route::get('/Retourclient/nouveau-retour-client',[RetourcommandeclientController::class, "retourcommandeclient"])->name('nouveau-retour-client');
Route::post('/retourcommandeclientPost',[RetourcommandeclientController::class, "enregistrer"])->name('retourcommandeclientPost');
Route::get('/ligne-retour-client/{id}',[RetourcommandeclientController::class, "detail"])->name('ligne-retour-client');
Route::get('/Retourclient/{id}',[RetourcommandeclientController::class, "voir"])->name('Retourclient');
Route::post('/SupprimerretourclientPost',[RetourcommandeclientController::class, "supprimer"])->name('SupprimerretourclientPost');
Route::post('/ValiderretourclientPost',[RetourcommandeclientController::class, "valider"])->name('ValiderretourclientPost');
Route::get('/remboursement',[RetourcommandeclientController::class, "rembourser"])->name('remboursement');
Route::get('/Remb/{id}',[RetourcommandeclientController::class, "voirremb"])->name('Remb');
Route::post('/SupprimerrembPost',[RetourcommandeclientController::class, "supprimerremb"])->name('SupprimerrembPost');
Route::post('/ValiderrembPost',[RetourcommandeclientController::class, "validerremb"])->name('ValiderrembPost');
Route::post('/remboursementPost',[RetourcommandeclientController::class, "enregistrer3"])->name('remboursementPost');

//GEt nucompte where compte :ajax
Route::get('info_compte/{search}', 'VenteController@get_product');

//PROFORMAA

Route::get('/proforma',[ProformaController::class, "nouveau"])->name('proforma');

Route::get('/modifierproforma/{id}',[ProformaController::class, "modifier"])->name('modifierproforma');
Route::post('/modifierproformapost/{id}',[ProformaController::class, "modifierproformapost"])->name('modifierproformapost');

Route::post('/proformaPost',[ProformaController::class, "enregistrer"])->name('proformaPost');
Route::get('/liste-des-proforma',[ProformaController::class, "liste"])->name('liste-des-proforma');
Route::get('/Proformav/{id}',[ProformaController::class, "voir"])->name('Proformav');
Route::post('/SupprimerproformaPost',[ProformaController::class, "supprimer"])->name('SupprimerproformaPost');
Route::get('/ligne-proforma/{id}',[ProformaController::class, "consulter"])->name('ligne-proforma');
Route::get('/facture-proforma/{id}',[ProformaController::class, "facture"])->name('facture-proforma');
Route::post('/transformerenfacture',[ProformaController::class, "transformerenfacture"])->name('transformerenfacture');
Route::post('/transformerenfacture_',[ProformaController::class, "transformerenfacture2"])->name('transformerenfacture_');

// GESTION DU DESTOCKAGE


Route::get('/nouveau-destockage',[DestockageController::class, "nouveau"])->name('nouveau-destockage');
Route::post('/destockagepost',[DestockageController::class, "enregistrer"])->name('destockagepost');
Route::get('/Destockage/{id}',[DestockageController::class, "voir"])->name('Destockage');
Route::post('/Supprimerdestockagepost',[DestockageController::class, "supprimer"])->name('Supprimerdestockagepost');
Route::post('/Validerdestockagepost',[DestockageController::class, "valider"])->name('Validerdestockagepost');

