import{g as b,H as f}from"./primevue-CfIk0_DY.js";import{s as e}from"./index-BxIwIJfy.js";import{M as _}from"./MasterDetailReferentiel-c0KTUzyB.js";import{N as v}from"./NumeroChip-QCXXOqUM.js";import{C as x}from"./ComboDynamique-BzWI4ISP.js";import{i as C,b as V,k as $,l as g,d as l,v as d,j as h}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 w={class:"md-form-grid"},y={class:"flex items-end md-col-full",style:{gap:"8px"}},I={class:"field",style:{flex:"1","min-width":"0"}},D={class:"field"},N={class:"field flex items-end",style:{"padding-bottom":"4px"}},O={__name:"Caisse",props:["ndoc","embedded"],setup(m){const c={list:()=>`${e.lienApi}/caisse/${e.db}`,getOne:i=>`${e.lienApi}/uncaisse/${e.db}/${i}`,add:()=>`${e.lienApi}/AjouterEtRenvoyerCaisse/${e.db}`,save:i=>`${e.lienApi}/enregistrerCaisse/${e.db}/${i}`,remove:i=>`${e.lienApi}/supprimerCaisse/${e.db}/${i}`},r={excelFileName:"Caisses",excelSheetName:"Caisses",documentNumberFields:["ndoc"],excludedColumns:["ndoc","IDcaisse"],columnWidths:{libelle:300}};return(i,a)=>{const n=b,p=f,u=C("maxlen-db");return V(),$(_,{"page-id":220,"tab-id":"caisse","id-field":"IDcaisse",resource:c,grid:r,embedded:m.embedded,ndoc:m.ndoc,variant:"drawer","drawer-width":"560px",title:"Caisse","entity-label":"une caisse","empty-icon":"pi pi-wallet","delete-message":"Voulez-vous vraiment supprimer cette caisse ?"},{form:g(({entete:s,modeModification:t})=>[l("div",w,[l("div",y,[d(v,{value:s.IDcaisse},null,8,["value"]),l("div",I,[a[0]||(a[0]=l("label",{for:"inputFocus",class:"block mb-1"},"Libellé",-1)),h(d(n,{size:"small",id:"inputFocus",modelValue:s.libelle,"onUpdate:modelValue":o=>s.libelle=o,disabled:!t,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"]),[[u,"caisse.libelle"]])])]),l("div",D,[a[1]||(a[1]=l("label",{for:"code_comptable",class:"block mb-1"},"Code comptable",-1)),d(x,{id:"code_comptable",modelValue:s.code_comptable,"onUpdate:modelValue":o=>s.code_comptable=o,placeholder:"Code comptable",table:"compte",disabled:!t,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","disabled"])]),l("div",N,[d(p,{modelValue:s.Inactif,"onUpdate:modelValue":o=>s.Inactif=o,binary:"",inputId:"caisse_inactif",disabled:!t},null,8,["modelValue","onUpdate:modelValue","disabled"]),a[2]||(a[2]=l("label",{for:"caisse_inactif",style:{"margin-left":"8px"}},"Inactif",-1))])])]),_:1},8,["embedded","ndoc"])}}};export{O as default};
