PageSourceSearch

https://podologischerverein.at/assets/edit.nXvCQ-ZB.js

js podologischerverein.at collected 2026-10-07 23:15:57 UTC 17,569 bytes, 1 lines download raw bytes

1import{u as C}from"./invoiceUtils.CNWaXXw6.js";import{r as N,N as U,c as m,o as d,b as i,l as p,a as _,d as c,j as f,w as V,v as P,e as v,n as g,t as y,X as B,a0 as I,a7 as H,_ as Y,a9 as G,a$ as F,ah as j,ab as K,i as q}from"./client.Cmz7yBj0.js";import{V as z}from"./vue-scrollto.CKg7bVKp.js";import{_ as x,b as X,a as J}from"./sidebar.D01WDWoD.js";import{_ as Q,c as W}from"./email.Ux9YyJd2.js";import{_ as Z}from"./fileLockedDialog.VGhFHqI3.js";import{_ as $}from"./history.CBjEjJ_E.js";import{_ as ee}from"./commentsAndArchive.OQ83Wt2l.js";import{_ as oe}from"./discount_margin.DkRgbEIx.js";import{_ as se}from"./positionsv2_groups.D-AgBYFN.js";import{_ as te}from"./datepicker.DksYr_Hw.js";import{_ as ie}from"./textarea.eiE4eMns.js";import"./saveDialog.DNBvyg_z.js";import"./duration.DmTa0AAQ.js";import"./weekday.DEptUFfL.js";import"./utc.BVZhDIrF.js";import"./tabs.kLUPZtPw.js";import"./table.DmLbNJe2.js";import"./isNull.DQJeWbQo.js";import"./galleryBrowserDialog3.DElIw7hs.js";import"./asyncbrowser.D69F8QUN.js";import"./browser.B4gWkp8I.js";import"./image-webp.C596FTYG.js";import"./editor.DMg-cG1P.js";import"./editor-tiptap.CYVzBzUu.js";import"./colorpicker.Bck4UvD2.js";import"./difference.CGPmKMqZ.js";const ne={class:"cms-admincenter-invoice invoice"},le={class:"row cards-title",ref:"cardmain"},re={class:"col-md-12 col-xs-12"},ce={class:"row cards-main"},de={class:"col-md-12 col-xs-12"},ae={class:"cms-card-card"},me={key:0,class:"cms-card-title"},ue={key:1,class:"cms-card-title"},_e={key:0,class:"material-icons"},pe={key:1,class:"material-icons"},ve={class:"cms-card-content"},fe={class:"cms-card-inner"},he={class:"cms-form-form"},Ce={class:"cms-input-group cms-input-multiselect"},ge={key:0,class:"cms-input-group cms-input-multiselect"},ye={class:"cms-form-group horizontal"},Ee={class:"cms-form-group horizontal"},be={class:"row cards-main"},Me={class:"col-xs-12 col-md-12"},De={slot:"actions"},Ae={class:"row cards-main"},Se={class:"col-xs-12 col-md-12"},Re={class:"cms-invoice-dialog-content"},Oe={class:"cms-form-form"},Te={class:"cms-input-group cms-input-multiselect"},Le={class:"cms-invoice-dialog-actions"};function ke(o,e,n,l,s,r){const u=N("multiselect"),a=B,b=ie,h=te,M=I,D=se,A=oe,S=ee,R=Q,O=$,T=H,L=Z,k=x,w=U("tippy");return d(),m("div",ne,[i("div",le,[i("div",re,[i("div",{class:"cms-card-card",style:f(r.GET_COLORS)},[...e[27]||(e[27]=[i("div",{class:"cms-card-title"},"Rechnungen",-1)])],4)])],512),i("div",ce,[i("div",de,[i("div",ae,[i("div",{class:"cms-card-header",style:f(r.GET_COLORS2)},[s.myModel._id?(d(),m("div",me,"Rechnung bearbeiten")):(d(),m("div",ue,"Rechnung erstellen")),e[29]||(e[29]=i("div",{class:"cms-spacer"},null,-1)),s.myModel._id?V((d(),m("div",{key:2,class:"cms-btn-icon round",onClick:e[0]||(e[0]=t=>s.locked=!s.locked)},[s.locked?(d(),m("i",_e,"lock")):(d(),m("i",pe,"lock_open"))])),[[w,{text:"Beleg entsperren / sperren"}],[P,!s.READ_ONLY]]):_("",!0),i("div",{class:"cms-btn-icon round",onClick:e[1]||(e[1]=(...t)=>r.closeDoc&&r.closeDoc(...t))},[...e[28]||(e[28]=[i("i",{class:"material-icons"},"close",-1)])])],4),i("div",ve,[i("div",fe,[i("div",he,[i("div",Ce,[e[30]||(e[30]=i("label",{class:"typo__label"},"Rechnungsempfänger",-1)),c(u,{modelValue:s.myModel.receiver,"onUpdate:modelValue":e[2]||(e[2]=t=>s.myModel.receiver=t),options:r.availableCustomers.map(t=>t==null?void 0:t._id),placeholder:"Rechnungsempfänger auswählen","custom-label":r.customLabel,disabled:s.locked,loading:s.isLoadingUsers,onSearchChange:o.debouncedAsyncFindCustomer,onSelect:r.onSelectCustomer,onOpen:e[3]||(e[3]=t=>s.isSelectingCustomer=!0),onClose:e[4]||(e[4]=t=>s.isSelectingCustomer=!1)},null,8,["modelValue","options","custom-label","disabled","loading","onSearchChange","onSelect"])]),r.itemsContact.length?(d(),m("div",ge,[e[31]||(e[31]=i("label",{class:"typo__label"},"Kontaktperson",-1)),c(u,{modelValue:s.myModel.contact,"onUpdate:modelValue":e[5]||(e[5]=t=>s.myModel.contact=t),options:r.itemsContact.map(t=>t==null?void 0:t._id),placeholder:"Kontaktperson auswählen","custom-label":r.customLabel,onOpen:e[6]||(e[6]=t=>
1s.isSelectingContact=!0),onClose:e[7]||(e[7]=t=>s.isSelectingContact=!1),disabled:s.locked},{option:v(t=>[i("div",{class:g(["option-wrapper",{"default-option":r.isDefaultContact(t.option)}])},[i("span",null,y(r.customLabel(t.option)),1)],2)]),singleLabel:v(t=>[i("span",{class:g({"default-option":r.isDefaultContact(t.option)})},y(r.customLabel(t.option)),3)]),_:1},8,["modelValue","options","custom-label","disabled"])])):_("",!0),c(a,{modelValue:s.myModel.title,"onUpdate:modelValue":e[8]||(e[8]=t=>s.myModel.title=t),label:"Titel",disabled:s.READ_ONLY},null,8,["modelValue","disabled"]),c(b,{modelValue:s.myModel.desc,"onUpdate:modelValue":e[9]||(e[9]=t=>s.myModel.desc=t),label:"Betreff",disabled:s.READ_ONLY},null,8,["modelValue","disabled"]),i("div",ye,[c(h,{modelValue:s.myModel.date,"onUpdate:modelValue":e[10]||(e[10]=t=>s.myModel.date=t),label:"Rechnungsdatum",disabled:s.locked||s.READ_ONLY||!!s.myModel.invoice_id,onlyDate:!0},null,8,["modelValue","disabled"]),c(a,{modelValue:s.myModel.invoice_id,"onUpdate:modelValue":e[11]||(e[11]=t=>s.myModel.invoice_id=t),label:"Rechungsnummer",disabled:"disabled"},null,8,["modelValue"])]),c(h,{modelValue:s.myModel.delivery_date,"onUpdate:modelValue":e[12]||(e[12]=t=>s.myModel.delivery_date=t),label:"Lieferdatum",disabled:s.locked,onlyDate:!0},null,8,["modelValue","disabled"]),i("div",Ee,[c(M,{modelValue:s.myModel.isSpecimen,"onUpdate:modelValue":e[13]||(e[13]=t=>s.myModel.isSpecimen=t),label:"Muster"},null,8,["modelValue"]),c(a,{modelValue:s.myModel.vatrate,"onUpdate:modelValue":e[14]||(e[14]=t=>s.myModel.vatrate=t),modelModifiers:{number:!0},label:"Steuersatz ( in %)",disabled:s.locked},null,8,["modelValue","disabled"])])]),(d(),p(D,{model:s.myModel,type:"offer","onChange::mask":r.onChangePositions,key:s.myModel._id,withGroups:!1,disabled:s.READ_ONLY,doShowPartsList:s.showPartsList,ref:"invoicePos"},null,8,["model","onChange::mask","disabled","doShowPartsList"]))]),i("div",{class:"cms-card-actions",style:f(r.GET_COLORS3)},[e[33]||(e[33]=i("div",{class:"cms-spacer"},null,-1)),i("div",{class:"cms-btn-icon icon-right",onClick:e[15]||(e[15]=t=>r.save())},[...e[32]||(e[32]=[i("div",{class:"label"},"speichern",-1),i("i",{class:"material-icons"},"save",-1)])])],4)])])])]),i("div",be,[i("div",Me,[c(A,{model:s.myModel,color:r.BACKGROUND_COLOR,onScrollToTop:r.scrollToTop},null,8,["model","color","onScrollToTop"]),c(S,{files:s.myModel.files,comment:s.myModel.comment,quicknote:s.myModel.quicknote,"onInput::text":e[17]||(e[17]=t=>s.myModel.comment=t),"onInput::quicknote":e[18]||(e[18]=t=>s.myModel.quicknote=t),"onInput::files":e[19]||(e[19]=t=>{s.myModel.files=t}),onScrollToTop:r.scrollToTop,color:r.BACKGROUND_COLOR},{default:v(()=>[i("template",De,[e[35]||(e[35]=i("div",{class:"cms-spacer"},null,-1)),i("div",{class:"cms-btn-icon icon-right",onClick:e[16]||(e[16]=t=>r.save())},[...e[34]||(e[34]=[i("div",{class:"label"},"speichern",-1),i("i",{class:"material-icons"},"save ",-1)])])])]),_:1},8,["files","comment","quicknote","onScrollToTop","color"])])]),i("div",Ae,[i("div",Se,[c(R,{model:s.myModel,color:r.BACKGROUND_COLOR,type:"invoice",onScrollToTop:r.scrollToTop},null,8,["model","color","onScrollToTop"]),o.auth_isAdmin?(d(),p(O,{key:0,model:s.myModel,color:r.BACKGROUND_COLOR,onScrollToTop:r.scrollToTop},null,8,["model","color","onScrollToTop"])):_("",!0)])]),s.showDialog?(d(),p(T,{key:0,modal:!0,showHeader:!0,controls:!1,onClose:e[23]||(e[23]=t=>s.showDialog=!1),ref:"dialog",wrapperClass:{"cms-invoice-dialog":!0}},{body:v(()=>[e[40]||(e[40]=i("div",{class:"cms-invoice-dialog-header"},[i("div",{class:"cms-invoice-dialog-icon"},[i("div",{class:"cms-btn-icon round"},[i("i",{class:"material-icons"},"report")])]),i("div",{class:"cms-invoice-dialog-title"},"Beleg konvertieren")],-1)),i("div",Re,[i("div",Oe,[i("div",Te,[e[36]||(e[36]=i("label",{class:"typo__label"},"Beleg konvertieren in",-1)),c(u,{modelValue:s.convertTo,"onUpdate:modelValue":e[20]||(e[20]=t=>s.convertTo=t),options:s.availableConvertTo,placeholder:"Belegtyp auswählen",label:"value","allow-empty":!1},null,8,["modelValue","options"])])])]),i("div",Le,[i("div",{class:"cms-btn-icon icon-left",onClick:e[21]||(e[21]=(...t)=>r.convert&&r.convert(...t))},[...e[37]||(e[37]=[i("i",{class:"material-icons"},"check",-1),i("div",{class:"label"},"Beleg konvertieren",-1)])]),e[39]||(e[39]=i("div",{class:"cms-spacer"},null,-1)),i("div",{class:"cms-btn-icon icon-right",onClick:e[22]||(e[22]=t=>s.showDialog=!1)},[...e[38]||(e[38]=[i("div",{class:"label"},"abbrechen",-1),i("i",{class:"material-icons"},"cancel",-1)])])])]),_:1},512)):_("",!0),s.showFileLockDialog?(d(),p(L,{key:1,model:s.myModel,onOpen:e[24]||(e[24]=t=>s.showFileLockDialog=!1)},null,8,["model"])):_("",!0),c(k,{onPrint:r.print,onSave:r.save,onClose:r.closeDoc,onCopy:e[25]||(e[25]=t=>s.showDialog=!0),ref:"sidebar",hasChanged:r.hasChanged>0,showSave:!s.READ_ONLY,showCopy:!!s.myModel._id&&!s.READ_ONLY,showPartsList:!0,"onToggle::partlist":e[26]||(e[26]=t=>s.showPartsList=!s.showPartsList),showClose:!0},null,8,["onPrint","onSave","onClose","hasChanged","showSave","showCopy"])])}const we={props:{type:{type:String,default:"invoice"}},beforeRouteLeave:J,beforeRouteUpdate:X,components:{multiselect:G},data(){return{myModel:{title:"",items:[],type:"invoice",status:"open",images:[],netto:0,vat:0,brutto:0,discount:0,shipping:0,receiver:!1,date:"",delivery_date:"",desc:"",vatrate:20,discountrate:0,version:2},baseModel:{title:"",items:[],type:"invoice",status:"open",images:[],netto:0,vat:0,brutto:0,discount:0,shipping:0,receiver:!1,date:"",delivery_date:"",desc:"",discountrate:0,vatrate:20,version:2,currPos:{showAddNewPos:!1,currPos:!1,selectedGroup:!1,editCurrPos:!1}
1},locked:!1,isCreating:!1,isLoadingUsers:!1,showDialog:!1,asyncUsers:[],availableConvertTo:[{key:"template",value:"Vorlage"},{key:"offer",value:"Angebot"},{key:"order",value:"Auftrag"},{key:"invoice",value:"Rechnung"}],convertTo:{key:"offer",value:"Angebot"},autosaveEnabled:!0,currPos:{price:"",discount:0,images:[]},isSelectingCustomer:!1,isSelectingContact:!1,showPartsList:!1,discount:{docalcdiscount:!1,discounted_netto:"",discounted_brutto:"",discountrate:0,tmp_netto:0,tmp_brutto:0,discount_brutto_focused:!1,discount_netto_focused:!1,discount_rate_focused:!1},addNewPos:!1,editCurrPos:!1,currPosIdx:0,no_single_price_mode:!1,didSetNew:!0,showFileLockDialog:!1,READ_ONLY:!1}},created(){this.model&&(this.myModel=this.model),this.model||(this.locked=!1),this.myModel.invoice_id&&(this.locked=!0),this.myModel.files||(this.myModel.files=[]),this.myModel.comment||(this.myModel.comment=""),this.debouncedAsyncFindCustomer=q(this.asyncFindCustomer,1e3),this.$nextTick(()=>{this.$store.commit("invoice/RESET_MODEL_VALUE_CHANGED_COUNT","invoice")})},mounted(){(this.FILE_IS_READONLY_BY_CURR_USER||this.$store.getters["admincenter/FILE_IS_READONLY_BY_CURR_USER_AND_TAB"](this.model))&&(this.showFileLockDialog=!0,this.READ_ONLY=!0)},methods:{closeDoc(){this.$router.replace({path:this.ADMINCENTER_URL+"/accounting/invoice/browse"})},onSelectCustomer(){this.myModel.address=!1,this.myModel.contact=!1},print(){var o="/api/v0/invoice/print/"+this.myModel._id+"?filename="+this.myModel.desc+"&mode="+this.SELECTED_MODE+"target=_blank";window.open(o,"_blank")},save(o,e){if(this.$refs.invoicePos.editCurrPos||this.$refs.invoicePos.showAddNewPos)return this.$notify({content:"Bitte schließen Sie zuerst die Positionsmaske.",type:"error"});if(!this.receiver)return this.$notify({content:"kein Empfänger - Beleg wird nicht gespeichert",type:"error"});if(console.log(this.myModel.items),!this.myModel.items.length)return this.$notify({content:"keine Positionen - Beleg wird nicht gespeichert",type:"error"});this.didSetNew=!1,this.myModel._id?this.$store.dispatch("invoice/update",this.myModel).then(n=>{this.$notify({content:"gespeichert"}),this.$store.commit("invoice/RESET_MODEL_VALUE_CHANGED_COUNT","invoice"),o&&o()},n=>
1{this.$notify({content:n.message||n,type:"error"})}):this.$store.dispatch("invoice/create",this.myModel).then(n=>{this.myModel=n,this.$nextTick(()=>{this.$store.commit("invoice/RESET_MODEL_VALUE_CHANGED_COUNT","invoice"),this.$router.replace({path:this.ADMINCENTER_URL+"/accounting/invoice/edit/"+n._id}),o&&o()})},n=>{this.$notify({content:n.message||n,type:"error"})})},onChangePositions(o){this.myModel.items=o.model.items,this.myModel.groups=o.model.groups,this.save()},scrollToTop(){z.scrollTo(this.$refs.cardmain)},formatDate(o){return K(o).format("DD/MM/YYYY HH:mm")},asyncFindCustomer(o){this.isLoadingCustomer=!0,this.$store.dispatch("invoice/SEARCH_CUSTOMER",{text:o}).then(e=>{this.isLoadingCustomer=!1},e=>{console.log("ERR!!",e)})},convert:W,customLabel(o){let e=this.availableCustomers.find(l=>l._id===o);e||(e=this.availableAddresses.find(l=>l._id===o)),e||(e=this.availableContacts.find(l=>l._id===o));let n=C(e);return e&&e.account_locked&&(n="🔒 "+n),n},customLabelAddress(o){if(o==="__same_as_receiver__")return"→ wie Rechnungsempfänger";let e=this.availableAddresses.find(n=>n._id===o);return C(e)},isDefaultContact(o){var n;const e=this.availableCustomers.find(l=>l._id===this.myModel.receiver);return e&&((n=e.userData)==null?void 0:n.default_contact)===o}},computed:{hasChanged(){return this.$store.getters["invoice/GET_MODEL_VALUE_CHANGED_COUNT"]("invoice")},availableCustomers(){let o=this.$store.state.invoice.items.customer.concat(this.SEARCH_CACHE_CUSTOMER);this.isSelectingCustomer&&(o=o.filter(n=>!n.account_locked));const e=new Map;return o.forEach(n=>{e.set(n._id,n)}),Array.from(e.values())},availableContacts(){let o=this.$store.state.invoice.items.contact.concat(this.SEARCH_CACHE_CONTACT);const e=new Map;return o.forEach(n=>{e.set(n._id,n)}),Array.from(e.values())},availableAddresses(){if(!this.myModel.receiver)return[];var o=this.availableCustomers.find(s=>s._id===this.myModel.receiver);if(!o)return[];for(var e=[{_id:"__same_as_receiver__",_isSameAsReceiver:!0,userData:o.userData}],n=0;n<o.userData.addresses.length;n++){var l=this.$store.getters["invoice/ADDRESS_BY_ID"](o.userData.addresses[n]);l?e.push(l):console.log("nox")}return e},SEARCH_CACHE_CUSTOMER(){return this.$store.getters["invoice/SEARCH_CACHE_CUSTOMER"]},SEARCH_CACHE_ADDRESS(){return this.$store.getters["invoice/SEARCH_CACHE_ADDRESS"]},SEARCH_CACHE_CONTACT(){return this.$store.getters["invoice/SEARCH_CACHE_CONTACT"]},FILE_IS_READONLY_BY_CURR_USER(){return this.$store.getters["admincenter/FILE_IS_READONLY_BY_CURR_USER"](this.myModel)},itemsUsers(){return j(this.$store.state.auth.models,o=>o.userData&&o.userData.customer_id)},MODULE_TEMPLATES_ENABLED(){return this.$store.getters["invoice/MODULE_TEMPLATES_ENABLED"]},table_label(){return this.$store.state.config.components.invoice.table_label||"Artikelnr."},SELECTED_MODE(){return this.myModel.pdf_no_single_price_mode?"nga":!1},GET_COLORS(o){return{"background-color":this.$store.getters["invoice/COLORS"]("invoice_background"),color:this.$store.getters["invoice/COLORS"]("invoice_foreground")}},GET_COLORS2(){return{"border-bottom":"4px solid "+this.$store.getters["invoice/COLORS"]("invoice_background")}},GET_COLORS3(){return{"border-top":"4px solid "+this.$store.getters["invoice/COLORS"]("invoice_background")}},BACKGROUND_COLOR(){return this.$store.getters["invoice/COLORS"]("invoice_background")},itemsContact(){var s,r,u;if(!this.myModel.receiver)return[];var o=this.availableCustomers.find(a=>a._id===this.myModel.receiver);if(!o||!((s=o.userData)!=null&&s.contacts))return[];for(var e=[],n=0;n<((u=(r=o.userData)==null?void 0:r.contacts)==null?void 0:u.length);n++){var l=this.$store.getters["invoice/CONTACT_BY_ID"](o.userData.contacts[n]);console.log("FFS",l),l?e.push(l):console.log("nox")}return this.isSelectingContact&&(e=e.filter(a=>!a.account_locked||a._id===this.myModel.contact)),e},model(){return this.$store.getters["invoice/byId"](this.$route.params.id)},receiver:{get(){return this.$store.getters["invoice/CUSTOMER_BY_ID"](this.myModel.receiver)||!1},set(o){this.myModel.receiver=o._id}},contact:{get(){return this.receiver?this.$store.getters["invoice/CONTACT_BY_ID"](this.myModel.contact)||this.$store.getters["invoice/CONTACT_BY_ID"](this.receiver.userData.default_contact):!1},set(o){o?this.myModel.contact=o._id:this.myModel.contact=!1}}},watch:{discount(o){this.debouncedCalcDiscount()},myModel:{deep:!0,handler(o,e){const n=E(o,e);
1console.log("Changed values:",n),!(!(e!=null&&e._id)&&(o!=null&&o._id))&&this.$store.commit("invoice/INCREMENT_MODEL_VALUE_CHANGED_COUNT","invoice")}},model(){this.model?this.myModel=this.model:(this.myModel=F(this.baseModel),this.didSetNew=!0),this.myModel.notifications||(this.myModel.notifications=[])},"myModel.discountrate"(o){this.discount.discountrate=o},"myModel.netto"(o){this.discount.tmp_netto=o,this.discount.discounted_netto=o},"myModel.brutto"(o){this.discount.tmp_brutto=o,this.discount.discounted_brutto=o}},asyncData({store:o,route:{params:{id:e}}}){var n={qry:{type:"invoice"}};return e&&(n.id=e),Promise.all([o.dispatch("invoice/getPageDataInvoiceEdit",n)])}};function E(o,e){const n={};return Object.keys(o).forEach(l=>{if(!e.hasOwnProperty(l))n[l]={old:o[l],new:void 0};else if(o[l]!==null&&e[l]!==null&&typeof o[l]=="object"&&typeof e[l]=="object"){const s=E(o[l],e[l]);Object.keys(s).length>0&&(n[l]=s)}else o[l]!==e[l]&&(n[l]={old:o[l],new:e[l]})}),Object.keys(e).forEach(l=>{o.hasOwnProperty(l)||(n[l]={old:void 0,new:e[l]})}),n}const lo=Y(we,[["render",ke],["__scopeId","data-v-e886139c"]]);export{lo as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.