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