import{g as _,K as x}from"./primevue-CfIk0_DY.js";import{s as t}from"./index-BxIwIJfy.js";import{M as V}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as v}from"./NumeroChip-QCXXOqUM.js";import{I as d}from"./InfoBulle-R_p1ZfIR.js";import{C as r}from"./ComboDynamique-BzWI4ISP.js";import{i as D,b as F,k as g,l as C,d as e,v as o,j as $}from"./vue-core-Di3IuVqe.js";import"./cjs-helpers-psZwOBky.js";import"./vue-cal-DKMVGERa.js";import"./moment-BeHQNF8T.js";import"./usePagerDetail-BeqYPv-1.js";import"./DataGrid-CoMfrBJA.js";import"./useAgGridConfig-Dp3DkgaV.js";const h={class:"md-form-grid"},w={class:"flex items-end md-col-full",style:{gap:"8px"}},U={class:"field",style:{flex:"1","min-width":"0"}},y={class:"field"},I={class:"flex items-center mb-1",style:{gap:"6px"}},A={class:"field"},N={class:"flex items-center mb-1",style:{gap:"6px"}},k={class:"field"},z={class:"field"},B={class:"flex items-center mb-1",style:{gap:"6px"}},R={class:"field"},T={class:"flex items-center mb-1",style:{gap:"6px"}},X={__name:"FamillesImmobilisations",props:["ndoc","embedded"],setup(u){const p={list:()=>`${t.lienApi}/Famille_immo/${t.db}`,getOne:m=>`${t.lienApi}/unFamille_immo/${t.db}/${m}`,add:()=>`${t.lienApi}/AjouterEtRenvoyerFamille_immo/${t.db}`,save:m=>`${t.lienApi}/enregistrerFamille_immo/${t.db}/${m}`,remove:m=>`${t.lienApi}/supprimerFamille_immo/${t.db}/${m}`},c={excelFileName:"Familles immobilisations",excelSheetName:"Familles immobilisations",columnWidths:{Libellé:300,Taux:100,Durée:100,"Compte immo":130,"Compte amort.":130,"Compte dotation":130}};return(m,a)=>{const b=_,n=x,f=D("maxlen-db");return F(),g(V,{"page-id":2009,"tab-id":"FamillesImmobilisations","id-field":"IDFamille_immo",resource:p,grid:c,embedded:u.embedded,ndoc:u.ndoc,variant:"drawer","drawer-width":"640px",title:"Famille d'immobilisation","entity-label":"une famille d'immobilisation","empty-icon":"pi pi-building","delete-message":"Voulez-vous vraiment supprimer cette famille d'immobilisation ?"},{form:C(({entete:l,modeModification:s})=>[e("div",h,[e("div",w,[o(v,{value:l.IDFamille_immo},null,8,["value"]),e("div",U,[a[0]||(a[0]=e("label",{for:"inputFocus",class:"block mb-1"},"Libellé",-1)),$(o(b,{size:"small",id:"inputFocus",modelValue:l.libelle_fam_immo,"onUpdate:modelValue":i=>l.libelle_fam_immo=i,disabled:!s,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[f,"famille_immo.libelle_fam_immo"]])])]),e("div",y,[e("div",I,[a[1]||(a[1]=e("label",{for:"tauxDefaut"},"Taux par défaut (%)",-1)),o(d,{text:"Taux d'amortissement appliqué par défaut aux immobilisations de cette famille."})]),o(n,{size:"small",locale:"fr-FR",id:"tauxDefaut",modelValue:l.taux_defaut,"onUpdate:modelValue":i=>l.taux_defaut=i,disabled:!s,class:"w-full",mode:"decimal",minFractionDigits:2,maxFractionDigits:6,min:0,max:100},null,8,["modelValue","onUpdate:modelValue","disabled"])]),e("div",A,[e("div",N,[a[2]||(a[2]=e("label",{for:"dureeDefaut"},"Durée par défaut (années)",-1)),o(d,{text:"Durée d'amortissement en années servant de base au calcul des dotations."})]),o(n,{size:"small",locale:"fr-FR",id:"dureeDefaut",modelValue:l.duree_defaut,"onUpdate:modelValue":i=>l.duree_defaut=i,disabled:!s,class:"w-full",mode:"decimal",minFractionDigits:0,maxFractionDigits:2,min:0,max:100},null,8,["modelValue","onUpdate:modelValue","disabled"])]),e("div",k,[a[3]||(a[3]=e("label",{for:"compteImmoDefaut",class:"block mb-1"},"Compte immobilisation",-1)),o(r,{id:"compteImmoDefaut",placeholder:"Compte immobilisation",disabled:!s,table:"compte",modelValue:l.compte_immo_defaut,"onUpdate:modelValue":i=>l.compte_immo_defaut=i,class:"w-full"},null,8,["disabled","modelValue","onUpdate:modelValue"])]),e("div",z,[e("div",B,[a[4]||(a[4]=e("label",{for:"compteAmortDefaut"},"Compte amortissement",-1)),o(d,{text:"Compte d'<b>amortissements cumulés</b> (classe 28) crédité lors des dotations."})]),o(r,{id:"compteAmortDefaut",placeholder:"Compte amortissement",disabled:!s,table:"compte",modelValue:l.compte_amort_defaut,"onUpdate:modelValue":i=>l.compte_amort_defaut=i,class:"w-full"},null,8,["disabled","modelValue","onUpdate:modelValue"])]),e("div",R,[e("div",T,[a[5]||(a[5]=e("label",{for:"compteDotDefaut"},"Compte dotation",-1)),o(d,{text:"Compte de charge (classe 619) débité par la <b>dotation aux amortissements</b> de l'exercice."})]),o(r,{id:"compteDotDefaut",placeholder:"Compte dotation",disabled:!s,table:"compte",modelValue:l.compte_dotation_defaut,"onUpdate:modelValue":i=>l.compte_dotation_defaut=i,class:"w-full"},null,8,["disabled","modelValue","onUpdate:modelValue"])])])]),_:1},8,["embedded","ndoc"])}}};export{X as default};
