PageSourceSearch

https://app.faturaentegrator.com/build/assets/Create-COXS6nnv.js

js faturaentegrator.com collected 2026-10-02 06:28:27 UTC 5,446 bytes, 1 lines download raw bytes

1import{N as u,h as Y,T as w,a7 as m,o as f,c as y,w as k,a as n,u as t,d as D,k as M,p as i,g as $}from"./app-CYNoT_ID.js";import{_ as U}from"./AppLayout-0KUXnBrL.js";import{_ as h}from"./BackButton-CjYz515K.js";import C from"./Customer-B082zLfU.js";import I from"./CashSale-CLPgbSzq.js";import N from"./Lines-fRc7xaXG.js";import A from"./Waybill-5MEZlKa_.js";import T from"./CreateActions-D53IOhW5.js";import g from"./DateAndMoney-BkjDHDpB.js";import B from"./ReturnReferences-DVSnEz0y.js";import{_ as E}from"./InternetSale-DtnfkR9Z.js";import{c as R,e as x}from"./alert-CbeNZ2oI.js";import"./MdrDropdownItem-elsDYuhc.js";import"./index-CAQE5BTT.js";import"./MdrFormField-DWdKEIM-.js";import"./MdrTooltip-ceTFmLy5.js";import"./AdversimentButton-DWIUt58-.js";import"./BaseButton-CRWMo2sy.js";import"./MdrBadge-CnlcUitt.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DangerButton-B-xpchm5.js";import"./MdrDivider-jqGobdRb.js";import"./index-CxB3AMOc.js";import"./PrimaryButton-kAbnd1CF.js";import"./MdrCheckboxField-DSaxRJwK.js";import"./MdrModal-DF5RTr_s.js";import"./axios-kWnrZMey.js";import"./CardLayout-CPcb-H-A.js";import"./Spinner-CEVugD7H.js";import"./CustomerForm-CF7H-wz6.js";import"./MdrSelect-DjzHXeEA.js";import"./ExemptionReasonSelect-B4fIL_rV.js";import"./WithholdingTaxCodeSelect-DGhF9Ezb.js";import"./withholdingTax-DNa89dOf.js";import"./SecondaryButton-Biaws3C-.js";import"./IntegrationsDropdown-qz8luFGM.js";import"./MdrToggle-wL9dRSrs.js";import"./MdrRadio-CN7c4-n7.js";const ke={__name:"Create",setup(z){var c;const o=u.page.props.defaultSettings,s=u.page.props.waybillId,l=u.page.props.prefill||{},d=Y(()=>o!=null&&o.shipment_company_tax_number?{company_title:o.shipment_company_title,company_tax_number:o.shipment_company_tax_number}:{company_title:"",company_tax_number:""}),b={id:null,name:"",description:null,quantity:1,sku:"",unit:"C62",unit_price:0,discount_type:null,discount:0,discount_total:0,tax_rate:0,tax_total:0,tax_excluded_total:0,grand_total:0,extra_tax_total:0,extra_taxes:[]},e=w({type:l.type||"SATIS",profile:l.profile||null,billing_references:l.billing_references||[{invoice_no:"",invoice_date:"",note:""}],workflow_status:"processing",predraft_id:null,currency:l.currency||"TRY",currency_rate:l.currency_rate||1,issue_date:l.issue_date||m().format("YYYY-MM-DD"),issue_time:l.issue_time||m().format("HH:mm"),waybill_number:l.waybill_number||"",waybill_date:l.waybill_date||"",sale_channel_id:null,mobile_device_id:null,invoice_integration_id:l.invoice_integration_id||null,cash_sale:l.cash_sale??!0,payment_date:l.payment_date||m().format("YYYY-MM-DD"),due_date:m().format("YYYY-MM-DD"),description:l.description||(o==null?void 0:o.invoice_description)||"",customer:{id:"",tax_number:"",tax_office:"",title:"",name:"",surname:"",phone:"",email:"",address:"",city:"",district:"",country:"TÜRKİYE",postcode:"",type:"company",iban:"",...l.customer||{}},lines:(c=l.lines)!=null&&c.length?l.lines:[b],is_internet_sale:!!(o!=null&&o.is_internet_sale),internet_sale:{web_address:o==null?void 0:o.internet_sale_web_address,payment_method:(o==null?void 0:o.internet_sale_payment_method)||"credit_or_debit",payment_platform:o==null?void 0:o.internet_sale_payment_platform,payment_date:m().format("YYYY-MM-DD")},digital_sales:(o==null?void 0:o.digital_sales)??!1,is_need_shipment:!!(o!=null&&o.is_internet_sale),shipment:{company_title:d.value.company_title,company_tax_number:d.value.company_tax_number,courier_name:o==null?void 0:o.shipment_courier_name,courier_tax_number:o==null?void 0:o.shipment_courier_tax_number,delivery_date:m().format("YYYY-MM-DD")}}),V=()=>{e.lines.find(a=>a.tax_rate===0&&!a.exemption_code)?R({message:"İstisna kodu eklenmemiş 0 oranlı ürün bulunmaktadır. Devam etmek istiyor musunuz?",onConfirm:()=>{p()}}):p()},p=()=>{e.post(s?route("waybill.invoice",s):route("invoice.store"),{onError:()=>{e.errors.api_error?x({message:e.errors.api_error}):console.log(e.errors),e.errors["customer.id"]&&x({message:"Müşteri bulunamadı."})}})},v=()=>{e.workflow_status="predraft",e.predraft_id=Math.floor(Math.random()*1e9),p()};return(_,a)=>(f(),y(U,{title:"Faturalar",size:"max-w-full"},{default:k(()=>[n(h,{link:t(s)?_.route("waybill.show",t(s)):_.route("invoice.index")},null,8,["link"]),D("form",{onSubmit:M(V,["prevent"]),class:"grid grid-cols-1 xl:grid-cols-8 gap-4 mt-2"},[n(C,{class:"xl:col-span-8",modelValue:t(e),"onUpdate:modelValue":a[0]||(a[0]=r=>i(e)?e.value=r:null)},null,8,["modelValue"]),n(g,{class:"xl:col-span-4",modelValue:t(e),"onUpdate:modelValue":a[1]||(a[1]=r=>i(e)?e.value=r:null)},null,8,["modelValue"]),n(I,{class:"xl:col-span-2",modelValue:t(e),"onUpdate:modelValue":a[2]||(a[2]=r=>i(e)?e.value=r:null)},null,8,["modelValue"]),n(A,{class:"xl:col-span-2",modelValue:t(e),"onUpdate:modelValue":a[3]||(a[3]=r=>i(e)?e.value=r:null)},null,8,["modelValue"]),t(e).type==="IADE"?(f(),y(B,{key:0,class:"xl:col-span-8",modelValue:t(e),"onUpdate:modelValue":a[4]||(a[4]=r=>i(e)?e.value=r:null)},null,8,["modelValue"])):$("",!0),n(N,{class:"xl:col-span-8",modelValue:t(e),"onUpdate:modelValue":a[5]||(a[5]=r=>i(e)?e.value=r:null)},null,8,["modelValue"]),n(E,{class:"xl:col-span-8",modelValue:t(e),"onUpdate:modelValue":a[6]||(a[6]=r=>i(e)?e.value=r:null)},null,8,["modelValue"]),n(T,{class:"xl:col-span-8",modelValue:t(e),"onUpdate:modelValue":a[7]||(a[7]=r=>i(e)?e.value=r:null),onCreateDraft:v},null,8,["modelValue"])],32)]),_:1}))}};export{ke 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.