whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> //home/qbizpnmr/arif.umairtax.com/public/CreditFooter-Zo_UCGyx.js
import{u as C,a as b,t as S,Z as V,aa as N,j as e,C as f,by as d,cx as r,cy as j,cz as _,E as w,ap as F,bx as M,cA as g,bC as p,bq as P}from"./bundle.OlIVtvc7.js";function k(v){var m,h,x,o;const[n]=C(),{handleChange:u,errors:a}=v,c=b(),t=S(),[s]=V(N);return e.jsxs(e.Fragment,{children:[e.jsxs(f,{className:"col-span-12 lg:col-span-6 xl:col-span-4 h-max shadow-sm",style:{borderColor:c.$24},children:[e.jsx(d,{leftSide:n("credit_date"),children:e.jsx(r,{type:"date",onValueChange:l=>u("date",l),value:(s==null?void 0:s.date)||"",errorMessage:a==null?void 0:a.errors.date})}),e.jsx(d,{leftSide:n("valid_until"),children:e.jsx(r,{type:"date",onValueChange:l=>u("due_date",l),value:(s==null?void 0:s.due_date)||"",errorMessage:a==null?void 0:a.errors.due_date})}),e.jsx(d,{leftSide:n("partial"),children:e.jsx(j,{value:(s==null?void 0:s.partial)||"",onValueChange:l=>u("partial",parseFloat(l)),changeOverride:!0,errorMessage:a==null?void 0:a.errors.partial})}),s&&s.partial>0&&e.jsx(d,{leftSide:n("partial_due_date"),children:e.jsx(r,{type:"date",onValueChange:l=>u("partial_due_date",l),value:(s==null?void 0:s.partial_due_date)||"",errorMessage:a==null?void 0:a.errors.partial_due_date})}),s&&((m=t==null?void 0:t.custom_fields)==null?void 0:m.invoice1)&&e.jsx(_,{field:"credit1",defaultValue:(s==null?void 0:s.custom_value1)||"",value:t.custom_fields.invoice1,onValueChange:l=>u("custom_value1",String(l))}),s&&((h=t==null?void 0:t.custom_fields)==null?void 0:h.invoice2)&&e.jsx(_,{field:"credit2",defaultValue:(s==null?void 0:s.custom_value2)||"",value:t.custom_fields.invoice2,onValueChange:l=>u("custom_value2",String(l))})]}),e.jsxs(f,{className:"col-span-12 lg:col-span-6 xl:col-span-4 h-max shadow-sm",style:{borderColor:c.$24},children:[e.jsx(d,{leftSide:n("credit_number"),children:e.jsx(r,{id:"number",onValueChange:l=>u("number",l),value:(s==null?void 0:s.number)||"",errorMessage:a==null?void 0:a.errors.number})}),e.jsx(d,{leftSide:n("po_number_short"),children:e.jsx(r,{id:"po_number",onValueChange:l=>u("po_number",l),value:(s==null?void 0:s.po_number)||"",errorMessage:a==null?void 0:a.errors.po_number})}),e.jsx(d,{leftSide:n("discount"),children:e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("div",{className:"w-full lg:w-1/2",children:e.jsxs(w,{onValueChange:l=>u("is_amount_discount",JSON.parse(l)),value:s==null?void 0:s.is_amount_discount.toString(),errorMessage:a==null?void 0:a.errors.is_amount_discount,customSelector:!0,dismissable:!1,children:[e.jsx("option",{value:"false",children:n("percent")}),e.jsx("option",{value:"true",children:n("amount")})]})}),e.jsx("div",{className:"w-full lg:w-1/2",children:e.jsx(j,{value:(s==null?void 0:s.discount)||"",onValueChange:l=>u("discount",parseFloat(l)),errorMessage:a==null?void 0:a.errors.discount})})]})}),s&&((x=t==null?void 0:t.custom_fields)==null?void 0:x.invoice3)&&e.jsx(_,{field:"credit3",defaultValue:(s==null?void 0:s.custom_value3)||"",value:t.custom_fields.invoice3,onValueChange:l=>u("custom_value3",String(l))}),s&&((o=t==null?void 0:t.custom_fields)==null?void 0:o.invoice4)&&e.jsx(_,{field:"credit4",defaultValue:(s==null?void 0:s.custom_value4)||"",value:t.custom_fields.invoice4,onValueChange:l=>u("custom_value4",String(l))})]})]})}function A(v){const[n]=C(),u=b(),{handleChange:a,isDefaultTerms:c,isDefaultFooter:t,setIsDefaultFooter:s,setIsDefaultTerms:m}=v,{isAdmin:h,isOwner:x}=F(),[o]=V(N),l=[n("public_notes"),n("private_notes"),n("terms"),n("footer"),...h||x?[n("custom_fields")]:[]];return e.jsx(f,{className:"col-span-12 xl:col-span-8 shadow-sm h-max",style:{borderColor:u.$24},children:e.jsxs(M,{tabs:l,withoutVerticalMargin:!0,withHorizontalPadding:!0,horizontalPaddingWidth:"1.5rem",fullRightPadding:!0,children:[e.jsx("div",{className:"mb-4 px-6",children:e.jsx(g,{value:(o==null?void 0:o.public_notes)||"",onChange:i=>a("public_notes",i)})}),e.jsx("div",{className:"mb-4 px-6",children:e.jsx(g,{value:(o==null?void 0:o.private_notes)||"",onChange:i=>a("private_notes",i)})}),e.jsxs("div",{className:"px-6",children:[e.jsx(g,{value:(o==null?void 0:o.terms)||"",onChange:i=>a("terms",i)}),e.jsx(d,{className:"mt-4",leftSide:e.jsx(p,{checked:c,onValueChange:i=>m(i)}),noExternalPadding:!0,noVerticalPadding:!0,children:e.jsx("span",{className:"font-medium",children:n("save_as_default_terms")})})]}),e.jsxs("div",{className:"px-6",children:[e.jsx(g,{value:(o==null?void 0:o.footer)||"",onChange:i=>a("footer",i)}),e.jsx(d,{className:"mt-4",leftSide:e.jsx(p,{checked:t,onValueChange:i=>s(i)}),noExternalPadding:!0,noVerticalPadding:!0,children:e.jsx("span",{className:"font-medium",children:n("save_as_default_footer")})})]}),e.jsxs("div",{className:"my-4 px-6",children:[e.jsxs("span",{className:"text-sm",children:[n("custom_fields")," "]}),e.jsxs(P,{to:"/settings/custom_fields/invoices",className:"capitalize",children:[n("click_here"),"."]})]})]})})}export{k as C,A as a};
Copyright ©2021 || Defacer Indonesia