/*! For license information please see 13.3533d0ec.chunk.js.LICENSE.txt */
(this.webpackJsonpvegas=this.webpackJsonpvegas||[]).push([[13],{236:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));c(3);var s=c(308),i=c(309),a=c(5);const n=Object(s.a)((e=>({root:{width:"100%","& > * + *":{marginTop:e.spacing(2)}}})));function o(e){const t=n();return Object(a.jsx)("div",{className:t.root,children:Object(a.jsx)(i.a,{color:null!==e&&void 0!==e&&e.color?null===e||void 0===e?void 0:e.color:"secondary"})})}},250:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var s=c(249),i=c(76),a=c.n(i);function n(e){let{data:t}=e;return a()(t).isValid()?Object(s.a)(t,"dd-mm-yyyy"):t}},265:function(e,t,c){},362:function(e,t,c){"use strict";t.a=c.p+"static/media/logo2.0cf45c1c.png"},631:function(e,t,c){"use strict";c.r(t);var s=c(3),i=c(9),a=c(13),n=c(27),o=c(19),l=c(14),d=c(26),r=c(151),j=c(465);const b=j.a.div`
  border: 1px solid black;
`,u=j.a.p`
  margin: 0;
  color: #004f8c;
  font-size: 12px;
  max-width: 100%;
`,x=j.a.p`
  margin: 0;
  color: #004f8c;
  font-size: 12px;
  max-width: 50%;
`,m=j.a.h6`
  color: #004f8c;
  font-weight: 600;
  margin: 0;
`,h=j.a.h5`
  color: #004f8c;
  font-weight: 600;
  margin: 0;
`,O=j.a.div`
  flex: 0.6;
  border: 1px solid black;
`,p=j.a.div`
  flex: 0.4;
  border: 1px solid black;
`,v=j.a.h6`
  color: white;
  background-color: #004f8c;
  font-weight: 500;
  text-align: center;
  margin: 0;
  border: 1px solid black;
`,_=j.a.span`
  display: flex;
  padding: 0px;
`,g=j.a.p`
  margin: 0;
  flex: 0.3;
  font-size: 12px;
  font-weight: 600;
`,f=j.a.p`
  margin: 0;
  flex: 0.7;
  font-size: 12px;
`,y=j.a.table`
  border: 1px solid black;
  font-size: 12px;
  text-align: center;
  padding: 0;
  margin: 0;
`,N=j.a.thead`
  border: 1px solid black;
`,q=j.a.tbody`
  border: 1px solid black;
`,S=j.a.tr`
border: 1px solid black
padding:0
`,w=j.a.th`
  border: 1px solid black;
`,T=j.a.td`
  border: 1px solid black;
`,C=j.a.div`
  flex: 0.5;
  border: 1px solid black;
  padding: 10px;
  margin: 0;
  display flex;
  flex-direction:column;
  align-items:center;
`,A=j.a.div`
  flex: 0.5;
  border: 1px solid black;
`;j.a.p`
  color: black;
  background-color: lightgray;
  font-weight: 600;
  text-align: center;
  margin: 0;
  border-bottom: 1px solid black;
  font-size: 14px;
  padding: 4px;
`;var k=c(362),I=(c(265),c(281)),D=c.n(I),Q=c(250),F=c(5),G=c(386);var R=Object(l.b)((e=>({login:e.login,quotation:e.quotation,cols:e.cols.cols,customer:e.customer.customer,rows:e.rows.rows,company:e.company.company})))((function(e){var t;let{customer:c,data:a,...n}=e;const[o,l]=Object(s.useState)(!1),[d,r]=Object(s.useState)([]),[j,I]=Object(s.useState)([]),R=()=>{l(!o)};return Object(s.useEffect)((()=>{var e;null===c||void 0===c||c.map((e=>{a.customer_id==e.id&&r(e)})),null===(e=n.company)||void 0===e||e.map((e=>{a.company_id==e.id&&I(e)}))}),[]),Object(F.jsxs)("div",{className:"quotation",children:[Object(F.jsx)(i.a,{className:"btn-info p-1 mr-2",onClick:()=>{R()},children:Object(F.jsx)("i",{className:"fa fa-eye","aria-hidden":"true"})}),Object(F.jsxs)(i.t,{className:"modal-info modal-lg",isOpen:o,toggle:R,backdrop:"static",children:[Object(F.jsx)(i.w,{toggle:R,children:"View Quotation"}),Object(F.jsx)(i.u,{children:Object(F.jsxs)(b,{id:"QuotationPrint",className:"test",children:[Object(F.jsxs)("div",{className:"d-flex justify-content-between p-1",children:[Object(F.jsxs)("div",{children:[Object(F.jsxs)("div",{className:"",children:[Object(F.jsx)(m,{children:null===j||void 0===j?void 0:j.name}),"VEGA CALIBRATION AND VALIDATION SERVICES LLP"===j.name&&Object(F.jsx)(u,{className:"ml-5 pl-5",children:"(An ISO 9001:2015 Certified Company)"})]}),Object(F.jsxs)("div",{children:[Object(F.jsx)(x,{className:"space-line",children:null===j||void 0===j?void 0:j.address}),Object(F.jsxs)(u,{children:["Phone No : ",null===j||void 0===j?void 0:j.phone]}),Object(F.jsx)(u,{children:"Email ID : support@vegacalibrations.com"}),Object(F.jsx)(u,{children:"Website : www.vegacalibrations.com"})]})]}),Object(F.jsxs)("div",{className:"d-flex flex-column justify-content-center",children:[Object(F.jsx)(h,{className:"text-center",children:"ESTIMATE"}),Object(F.jsx)("div",{children:Object(F.jsx)("img",{src:k.a,alt:"logo",height:"100px",width:"220px"})})]})]}),Object(F.jsxs)("div",{className:"d-flex w-100",children:[c.map((e=>{var t,c,s;if(a.customer_id==e.id)return Object(F.jsxs)(O,{children:[Object(F.jsx)(v,{className:"client-h6",children:"CLIENT DETAILS"}),Object(F.jsxs)("div",{className:"p-1",children:[Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Kind Attn."}),Object(F.jsx)(f,{children:e.name})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Company Name"}),Object(F.jsx)(f,{children:null===e||void 0===e||null===(t=e.company)||void 0===t?void 0:t.name})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Company Address"}),Object(F.jsx)(f,{children:null===e||void 0===e||null===(c=e.company)||void 0===c?void 0:c.address})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Phone"}),Object(F.jsx)(f,{children:null===e||void 0===e||null===(s=e.company)||void 0===s?void 0:s.phone})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Client Email Id"}),Object(F.jsx)(f,{children:e.email})]})]})]},e.id)})),Object(F.jsxs)(p,{children:[Object(F.jsx)(v,{className:"client-h6",children:"VEGA QUOTATION DETAILS"}),Object(F.jsxs)("div",{className:"p-1",children:[Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Quote No."}),Object(F.jsx)(f,{children:a.quotation_no})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Quote Date"}),Object(F.jsx)(f,{children:Object(F.jsx)(Q.a,{data:a.quotation_date})})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Quote Valid Till"}),Object(F.jsx)(f,{children:a.quotation_valid_till})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"GSTIN"}),Object(F.jsx)(f,{children:a.gstin})]})]})]})]}),Object(F.jsxs)(y,{className:"table table-sm",children:[Object(F.jsx)(N,{className:"client-h6",children:Object(F.jsxs)(S,{children:[Object(F.jsx)(w,{children:"Sr. No"}),Object(F.jsx)(w,{children:"Description Of Items"}),Object(F.jsx)(w,{children:"Model/Specifications"}),Object(F.jsx)(w,{children:"Qty"}),Object(F.jsx)(w,{children:"Units"}),Object(F.jsx)(w,{children:"Unit Price (INR)"}),Object(F.jsx)(w,{children:"Total Amount ( INR)"})]})}),Object(F.jsx)(q,{children:null===(t=a.quotation_details)||void 0===t?void 0:t.map(((e,t)=>Object(F.jsxs)(S,{children:[Object(F.jsx)(T,{children:t+1}),Object(F.jsx)(T,{children:e.desc}),Object(F.jsx)(T,{children:e.specs}),Object(F.jsx)(T,{children:e.qty}),Object(F.jsx)(T,{children:e.units}),Object(F.jsx)(T,{children:e.unit_price}),Object(F.jsx)(T,{width:"100",className:"text-right",children:parseFloat(e.total_amount).toFixed(2)})," "]},t)))})]}),"With Calculation"===(null===a||void 0===a?void 0:a.quotation_type)&&Object(F.jsxs)(F.Fragment,{children:[Object(F.jsxs)("div",{className:"d-flex",children:[Object(F.jsxs)(C,{children:[Object(F.jsx)("div",{style:{color:"#4A469B",fontSize:"13px",fontWeight:"600"},children:null===j||void 0===j?void 0:j.name}),Object(F.jsx)("div",{children:" Signature"}),Object(F.jsx)("div",{className:"font-weight-bold f-12",children:"Authorised Signatory"})]}),Object(F.jsx)(A,{children:Object(F.jsx)("div",{className:"",children:Object(F.jsxs)(y,{className:"table table-sm",children:[Object(F.jsx)(N,{className:"vega-p",children:Object(F.jsxs)(S,{children:[Object(F.jsx)(w,{className:"",children:"TOTAL NET AMOUNT (INR)"}),Object(F.jsxs)(w,{className:"text-right p-1",width:"100",children:[" ",Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",null===a||void 0===a?void 0:a.net_amount]})]})}),Object(F.jsxs)(q,{children:[Object(F.jsxs)("tr",{className:"text-right",children:[Object(F.jsxs)("td",{className:"test-r font-weight-bold",children:[Object(F.jsx)("span",{children:"Add : CGST @"}),Object(F.jsx)("span",{className:"ml-3 mr-3",children:"9.00%"})]}),Object(F.jsxs)("td",{className:"font-weight-bold",children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",null===a||void 0===a?void 0:a.cgst]})]}),Object(F.jsxs)("tr",{className:"text-right border-0",children:[Object(F.jsxs)("td",{className:"test-r font-weight-bold",children:[Object(F.jsxs)("span",{children:["Add : ",a.gst_type," @"]}),Object(F.jsx)("span",{className:"ml-3 mr-3",children:"9.00%"})]}),Object(F.jsxs)("td",{className:"font-weight-bold",children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",a.gst]})]}),Object(F.jsxs)(S,{className:"light-blue",children:[Object(F.jsx)(w,{style:{border:"1px solid black"},children:"TOTAL TAX AMOUNT (INR)"}),Object(F.jsxs)(w,{className:"text-right",style:{border:"1px solid black"},children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",null===a||void 0===a?void 0:a.total_tax_amount]})]}),Object(F.jsxs)(S,{children:[Object(F.jsx)(w,{className:"p-1",children:"TOTAL ORDER AMOUNT (INR)"}),Object(F.jsxs)(w,{className:"text-right p-1",children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",a.total_order_amount]})]})]})]})})})]}),Object(F.jsxs)("div",{className:"test f-12 font-weight-bold p-1 pl-2",children:[Object(F.jsx)("span",{children:"Amount Chargeable (In Words) :"}),Object(F.jsxs)("span",{className:"ml-3",children:[G.toWords(a.total_order_amount)," Only"]})]})]}),"Without Calculation"===(null===a||void 0===a?void 0:a.quotation_type)&&Object(F.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center test",children:[Object(F.jsx)("div",{style:{color:"#4A469B",fontSize:"13px",fontWeight:"600"},children:null===j||void 0===j?void 0:j.name}),Object(F.jsx)("div",{children:" Signature"}),Object(F.jsx)("div",{className:"font-weight-bold f-12",children:"Authorised Signatory"})]}),Object(F.jsxs)("div",{children:[Object(F.jsx)("p",{className:"f-12 font-weight-bold test text-center vega-gray p-0 m-0",children:"TERMS AND CONDITIONS"}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"1. Calibration will be performed after confirmation of PO. Our Quotation Reference No. must appear on your Commercial Work Order (PO) or Delivery Challan"}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"2. The charges quoted are net. Presently GST 18% is applicable extra on above charges. However taxes as applicable at the time of providing services shall be payable by yourselves."}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"3. We shall submit to you our calibration and validation reports giving NABL traceability certificate reference"})]}),Object(F.jsxs)("div",{children:[Object(F.jsx)("p",{className:"f-12 font-weight-bold test text-center vega-gray p-0 m-0",children:"PAYMENT TERMS"}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"1. 100% Payment to be made advance against Proforma Invoice."}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"2. Reports will be delivered on receipt of payment"})]}),Object(F.jsx)("div",{className:"f-12 font-weight-bold test text-center vega-gray p-0 m-0",children:"LOOKING FORWARD FOR YOUR BUSINESS WITH US"})]})}),Object(F.jsxs)(i.v,{children:[Object(F.jsx)(i.a,{className:"btn-warning",onClick:R,children:"Cancel"}),Object(F.jsx)(i.a,{className:"btn-danger",onClick:()=>{console.log("print"),D()({printable:"QuotationPrint",type:"html",css:"../CaseMaster/CoolRoom/FinalReport/FinalReport.css",scanStyles:!0,targetStyles:"[*]",font_size:"8pt",maxWidth:1080,base64:!0,honorMarginPadding:!1})},children:"Print"})]})]})]})})),E=c(386);var W=Object(l.b)((e=>({login:e.login,quotation:e.quotation,cols:e.cols.cols,customer:e.customer.customer,rows:e.rows.rows,company:e.company.company})))((function(e){var t,c,a,n,o,l;let{toggle:d,data:r,customer:j,...I}=e;const[G,R]=Object(s.useState)([]),[W,P]=Object(s.useState)([]);return Object(s.useEffect)((()=>{var e;j.map((e=>{r.customer_id==e.id&&R(e)})),null===(e=I.company)||void 0===e||e.map((e=>{r.company_id==e.id&&P(e)}))}),[]),Object(F.jsxs)("div",{className:"quotation",children:[Object(F.jsxs)(b,{id:"QuotationPrint",className:"test",children:[Object(F.jsxs)("div",{className:"d-flex justify-content-between p-1",children:[Object(F.jsxs)("div",{children:[Object(F.jsxs)("div",{className:"text-center",children:[Object(F.jsx)(m,{children:null===W||void 0===W?void 0:W.name}),"VEGA CALIBRATION AND VALIDATION SERVICES LLP"===W.name&&Object(F.jsx)(u,{children:"(An ISO 9001:2015 Certified Company)"})]}),Object(F.jsxs)("div",{children:[Object(F.jsx)(x,{className:"space-line",children:null===W||void 0===W?void 0:W.address}),Object(F.jsxs)(u,{children:["Phone No : ",null===W||void 0===W?void 0:W.phone]}),Object(F.jsx)(u,{children:"Email ID : support@vegacalibrations.com"}),Object(F.jsx)(u,{children:"Website : www.vegacalibrations.com"})]})]}),Object(F.jsxs)("div",{className:"d-flex flex-column justify-content-center",children:[Object(F.jsx)(h,{className:"text-center",children:"ESTIMATE"}),Object(F.jsx)("div",{children:Object(F.jsx)("img",{src:k.a,alt:"logo",height:"100px",width:"220px"})})]})]}),Object(F.jsxs)("div",{className:"d-flex w-100",children:[j.map((e=>{var t,c,s;if(r.customer_id==e.id)return Object(F.jsxs)(O,{children:[Object(F.jsx)(v,{className:"client-h6",children:"CLIENT DETAILS"}),Object(F.jsxs)("div",{className:"p-1",children:[Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Kind Attn."}),Object(F.jsx)(f,{children:e.name})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Company Name"}),Object(F.jsx)(f,{children:null===e||void 0===e||null===(t=e.company)||void 0===t?void 0:t.name})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Company Address"}),Object(F.jsx)(f,{children:null===e||void 0===e||null===(c=e.company)||void 0===c?void 0:c.address})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Phone"}),Object(F.jsx)(f,{children:null===e||void 0===e||null===(s=e.company)||void 0===s?void 0:s.phone})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Client Email Id"}),Object(F.jsx)(f,{children:e.email})]})]})]},e.id)})),Object(F.jsxs)(p,{children:[Object(F.jsx)(v,{className:"client-h6",children:"VEGA QUOTATION DETAILS"}),Object(F.jsxs)("div",{className:"p-1",children:[Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Quote No."}),Object(F.jsx)(f,{children:r.quotation_no})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Quote Date"}),Object(F.jsx)(f,{children:Object(F.jsx)(Q.a,{data:r.quotation_date})})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"Quote Valid Till"}),Object(F.jsx)(f,{children:r.quotation_valid_till})]}),Object(F.jsxs)(_,{children:[Object(F.jsx)(g,{children:"GSTIN"}),Object(F.jsx)(f,{children:r.gstin})]})]})]})]}),Object(F.jsxs)(y,{className:"table table-sm",children:[Object(F.jsx)(N,{className:"client-h6",children:Object(F.jsxs)(S,{children:[Object(F.jsx)(w,{children:"Sr. No"}),Object(F.jsx)(w,{children:"Description Of Items"}),Object(F.jsx)(w,{children:"Model/Specifications"}),Object(F.jsx)(w,{children:"Qty"}),Object(F.jsx)(w,{children:"Units"}),Object(F.jsx)(w,{children:"Unit Price (INR)"}),Object(F.jsx)(w,{children:"Total Amount ( INR)"})]})}),Object(F.jsx)(q,{children:null===(t=r.details)||void 0===t?void 0:t.map(((e,t)=>Object(F.jsxs)(S,{children:[Object(F.jsx)(T,{children:t+1}),Object(F.jsx)(T,{children:e.desc}),Object(F.jsx)(T,{children:e.specs}),Object(F.jsx)(T,{children:e.qty}),Object(F.jsx)(T,{children:e.units}),Object(F.jsx)(T,{children:e.unit_price}),Object(F.jsx)(T,{width:"100",className:"text-right",children:parseFloat(e.total_amount).toFixed(2)})]},t)))})]}),"With Calculation"===(null===r||void 0===r?void 0:r.type_of_quotation)&&Object(F.jsxs)(F.Fragment,{children:[Object(F.jsxs)("div",{className:"d-flex",children:[Object(F.jsxs)(C,{children:[Object(F.jsx)("div",{style:{color:"#4A469B",fontSize:"13px",fontWeight:"600"},children:null===W||void 0===W?void 0:W.name}),Object(F.jsx)("div",{children:" Signature"}),Object(F.jsx)("div",{className:"font-weight-bold f-12",children:"Authorised Signatory"})]}),Object(F.jsx)(A,{children:Object(F.jsx)("div",{className:"",children:Object(F.jsxs)(y,{className:"table table-sm",children:[Object(F.jsx)(N,{className:"vega-p",children:Object(F.jsxs)(S,{children:[Object(F.jsx)(w,{className:"",children:"TOTAL NET AMOUNT (INR)"}),Object(F.jsxs)(w,{className:"text-right p-1",width:"100",children:[" ",Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",parseFloat(null===(c=r.details)||void 0===c?void 0:c.reduce((function(e,t){return e+t.total_amount}),0)).toFixed(2)]})]})}),Object(F.jsxs)(q,{children:[Object(F.jsxs)("tr",{className:"text-right",children:[Object(F.jsxs)("td",{className:"test-r font-weight-bold",children:[Object(F.jsx)("span",{children:"Add : CGST @"}),Object(F.jsx)("span",{className:"ml-3 mr-3",children:"9.00%"})]}),Object(F.jsxs)("td",{className:"font-weight-bold",children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",parseFloat(null===(a=r.details)||void 0===a?void 0:a.reduce((function(e,t){return e+t.cgst}),0)).toFixed(2)]})]}),Object(F.jsxs)("tr",{className:"text-right border-0",children:[Object(F.jsxs)("td",{className:"test-r font-weight-bold",children:[Object(F.jsxs)("span",{children:["Add : ",r.gst_type," @"]}),Object(F.jsx)("span",{className:"ml-3 mr-3",children:"9.00%"})]}),Object(F.jsxs)("td",{className:"font-weight-bold",children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",parseFloat(null===(n=r.details)||void 0===n?void 0:n.reduce((function(e,t){return e+t.sgst}),0)).toFixed(2)]})]}),Object(F.jsxs)(S,{className:"light-blue",children:[Object(F.jsx)(w,{style:{border:"1px solid black"},children:"TOTAL TAX AMOUNT (INR)"}),Object(F.jsxs)(w,{className:"text-right",style:{border:"1px solid black"},children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",parseFloat(null===(o=r.details)||void 0===o?void 0:o.reduce((function(e,t){return e+t.tax_amount}),0)).toFixed(2)]})]}),Object(F.jsxs)(S,{children:[Object(F.jsx)(w,{className:"p-1",children:"TOTAL ORDER AMOUNT (INR)"}),Object(F.jsxs)(w,{className:"text-right p-1",children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",parseFloat(null===(l=r.details)||void 0===l?void 0:l.reduce((function(e,t){return e+t.order_amount}),0)).toFixed(2)]})]})]})]})})})]}),Object(F.jsxs)("div",{className:"test f-12 font-weight-bold p-1 pl-2",children:[Object(F.jsx)("span",{children:"Amount Chargeable (In Words) :"}),Object(F.jsxs)("span",{className:"ml-3",children:[E.toWords(r.total_order_amount)," Only"]})," "]})]}),"Without Calculation"===(null===r||void 0===r?void 0:r.type_of_quotation)&&Object(F.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center test",children:[Object(F.jsx)("div",{style:{color:"#4A469B",fontSize:"13px",fontWeight:"600"},children:null===W||void 0===W?void 0:W.name}),Object(F.jsx)("div",{children:" Signature"}),Object(F.jsx)("div",{className:"font-weight-bold f-12",children:"Authorised Signatory"})]}),Object(F.jsxs)("div",{children:[Object(F.jsx)("p",{className:"f-12 font-weight-bold test text-center vega-gray p-0 m-0",children:"TERMS AND CONDITIONS"}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"1. Calibration will be performed after confirmation of PO. Our Quotation Reference No. must appear on your Commercial Work Order (PO) or Delivery Challan"}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"2. The charges quoted are net. Presently GST 18% is applicable extra on above charges. However taxes as applicable at the time of providing services shall be payable by yourselves."}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"3. We shall submit to you our calibration and validation reports giving NABL traceability certificate reference"})]}),Object(F.jsxs)("div",{children:[Object(F.jsx)("p",{className:"f-12 font-weight-bold test text-center vega-gray p-0 m-0",children:"PAYMENT TERMS"}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"1. 100% Payment to be made advance against Proforma Invoice."}),Object(F.jsx)("p",{className:"test p-1 m-0 f-10",children:"2. Reports will be delivered on receipt of payment"})]}),Object(F.jsx)("div",{className:"f-12 font-weight-bold test text-center vega-gray p-0 m-0",children:"LOOKING FORWARD FOR YOUR BUSINESS WITH US"})]}),Object(F.jsxs)(i.v,{children:[Object(F.jsx)(i.a,{className:"btn-warning",onClick:d,children:"Cancel"}),Object(F.jsx)(i.a,{className:"btn-danger",onClick:()=>{D()({printable:"QuotationPrint",type:"html",css:"../CaseMaster/CoolRoom/FinalReport/FinalReport.css",scanStyles:!0,targetStyles:"[*]",font_size:"8pt",maxWidth:1080,honorMarginPadding:!1})},children:"Print"})]})]})})),P=c(236);var $=Object(l.b)((e=>({login:e.login,quotation:e.quotation,cols:e.cols.cols,customer:e.customer.customer,rows:e.rows.rows,company:e.company.company})),(e=>({onCompanyGetData:t=>e(d.f(t)),onCustomerGetData:t=>e(d.g(t)),onRowsGetData:t=>e(d.jb(t)),onColsGetData:t=>e(d.e(t)),onQuotationGetData:t=>e(d.eb(t)),onDeleteQuotation:(t,c)=>e(d.s(t,c)),onPostQuotationData:(t,c,s,i,a)=>e(d.W(t,c,s,i,a)),onUpdateQuotationData:(t,c,s,i)=>e(d.Bb(t,c,s,i)),quotationEditGetData:t=>e(d.db(t))})))((function(e){var t,c,l,d,j,b;let u={token:`${null===(t=e.login)||void 0===t||null===(c=t.login)||void 0===c?void 0:c.token}`,id:e.data.id};const[x,m]=Object(s.useState)(!1),h=()=>{m(!x)};return Object(F.jsxs)("div",{children:[Object(F.jsx)(i.a,{className:"btn-warning p-1",onClick:()=>{h()},children:Object(F.jsx)("i",{className:"fa fa-edit","aria-hidden":"true"})}),Object(F.jsxs)(i.t,{className:"modal-info modal-lg",isOpen:x,toggle:h,backdrop:"static",children:[Object(F.jsx)(i.w,{toggle:h,children:"Add New Quotation"}),Object(F.jsx)(i.u,{children:Object(F.jsx)(a.e,{initialValues:{customer_id:e.data.customer_id,company_id:e.data.company_id,user_id:null===(l=e.login)||void 0===l||null===(d=l.login)||void 0===d?void 0:d.user.id,quotation_no:e.data.quotation_no,type_of_quotation:e.data.quotation_type,quotation_date:e.data.quotation_date,quotation_valid_till:e.data.quotation_valid_till,gstin:e.data.gstin,net_amount:e.data.net_amount,cgst:e.data.cgst,gst:e.data.gst,total_tax_amount:e.data.total_tax_amount,total_order_amount:e.data.total_order_amount,is_approved:e.data.is_approved,details:null===(j=e.data)||void 0===j?void 0:j.quotation_details,gst_type:null===(b=e.data)||void 0===b?void 0:b.gst_type},validationSchema:o.a().shape({customer_id:o.c().required("required"),company_id:o.c().required("required"),quotation_no:o.c().required("required"),quotation_date:o.c().required("required"),quotation_valid_till:o.c().required("required"),type_of_quotation:o.c().required("required"),gstin:o.c().required("required")}),onSubmit:(t,c)=>{let{setSubmitting:s}=c,i={customer_id:t.customer_id,company_id:t.company_id,user_id:t.user_id,quotation_no:t.quotation_no,quotation_type:t.type_of_quotation,quotation_date:t.quotation_date,gstin:t.gstin,quotation_valid_till:t.quotation_valid_till,net_amount:t.net_amount,cgst:t.cgst,gst:t.gst,total_tax_amount:t.total_tax_amount,total_order_amount:t.total_order_amount,gst_type:t.gst_type,products:t.details};e.onUpdateQuotationData(u,i,h,s),s(!0)},children:t=>{var c,s;return Object(F.jsxs)(a.d,{children:[Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"customer_id",children:"Select Customer"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"customer_id",id:"customer_id",placeholder:"Select Customer",className:"form-control"+(t.errors.customer_id&&t.touched.customer_id?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Customer"}),null===(c=e.customer)||void 0===c?void 0:c.map((e=>Object(F.jsx)("option",{value:e.id,children:e.name})))]}),Object(F.jsx)(a.a,{name:"customer_id",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"company_id",children:"Select Company"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"company_id",id:"company_id",placeholder:"Select Company",className:"form-control"+(t.errors.company_id&&t.touched.company_id?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Company"}),null===(s=e.company)||void 0===s?void 0:s.filter((e=>1==e.internal)).map((e=>Object(F.jsx)("option",{value:e.id,children:e.name})))]}),Object(F.jsx)(a.a,{name:"company_id",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"type_of_quotation",children:"Select Quotation Type"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"type_of_quotation",id:"type_of_quotation",placeholder:"Select Quotation Type",className:"form-control"+(t.errors.type_of_quotation&&t.touched.type_of_quotation?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Quotation Type"}),Object(F.jsx)("option",{value:"With Calculation",children:"With Calculation"}),Object(F.jsx)("option",{value:"Without Calculation",children:"Without Calculation"})]}),Object(F.jsx)(a.a,{name:"type_of_quotation",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_no",children:"Quotation No"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"text",name:"quotation_no",id:"quotation_no",placeholder:"Enter Quotation No",className:"form-control"+(t.errors.quotation_no&&t.touched.quotation_no?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_no",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_date",children:"Quotation Date"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"date",name:"quotation_date",id:"quotation_date",placeholder:"Enter Quotation No",className:"form-control"+(t.errors.quotation_date&&t.touched.quotation_date?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_date",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_valid_till",children:"Quotation Valid Till"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"date",name:"quotation_valid_till",id:"quotation_valid_till",placeholder:"Enter Quotation Valid Till",className:"form-control"+(t.errors.quotation_valid_till&&t.touched.quotation_valid_till?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_valid_till",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"gstin",children:"GSTIN"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"text",name:"gstin",id:"gstin",placeholder:"Enter GSTIN",className:"form-control"+(t.errors.gstin&&t.touched.gstin?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"gstin",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"gst_type",children:"Select Gst Type"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"gst_type",id:"gst_type",placeholder:"",className:"form-control"+(t.errors.gst_type&&t.touched.gst_type?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Gst Type"}),Object(F.jsx)("option",{value:"SGST",children:"SGST"}),Object(F.jsx)("option",{value:"IGST",children:"IGST"})]}),Object(F.jsx)(a.a,{name:"gst_type",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsx)(i.F,{children:Object(F.jsx)(i.h,{md:12,children:Object(F.jsx)(a.c,{name:"details",render:e=>{var c,s,o,l;return Object(F.jsxs)("div",{children:[Object(F.jsx)(i.F,{children:Object(F.jsx)(i.h,{md:10,children:Object(F.jsx)(i.n,{children:Object(F.jsx)(i.p,{children:Object(F.jsx)(i.q,{addonType:"append",children:Object(F.jsx)(i.a,{block:!0,className:"btn-success",onClick:()=>{for(let c=1;c<=t.values.row;c++)e.push({desc:"",specs:"",qty:"",units:"",unit_price:"",total_amount:"",cgst:"",sgst:"",tax_amount:"",order_amount:""})},children:"Add Rows"})})})})})}),Object(F.jsx)("div",{style:{overflow:"scroll"},children:Object(F.jsxs)(i.I,{size:"sm",className:"text-center f-12",children:[Object(F.jsx)("thead",{children:Object(F.jsxs)("tr",{children:[Object(F.jsx)("th",{children:"Sr no"}),Object(F.jsx)("th",{children:"Description Of Items"}),Object(F.jsx)("th",{children:"Model/Specifications"}),Object(F.jsx)("th",{children:"Qty"}),Object(F.jsx)("th",{children:"Units"}),Object(F.jsx)("th",{children:"Unit Price (INR)"}),Object(F.jsx)("th",{children:"Total Amount(INR)"}),Object(F.jsx)("th",{children:"Delete"})]})}),Object(F.jsxs)("tbody",{className:"text-center",children:[console.log("values",null===t||void 0===t||null===(c=t.values)||void 0===c?void 0:c.details),null===t||void 0===t||null===(s=t.values)||void 0===s||null===(o=s.details)||void 0===o?void 0:o.map(((t,c)=>{var s=Number(t.unit_price)*Number(t.qty),o=9*s/100,l=9*s/100;t.total_amount=s,t.sgst=l,t.cgst=o;var d=l+o;return t.tax_amount=d,t.order_amount=d+s,Object(F.jsxs)("tr",{className:"text-center",children:[Object(F.jsx)("td",{children:c+1}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.desc`,id:"desc",style:{width:"150px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.specs`,id:`details.${c}.specs`})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"number",name:`details.${c}.qty`,id:`details.${c}.qty`,min:"1",style:{width:"80px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.units`,id:`details.${c}.units`,style:{width:"100px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.unit_price`,id:`details.${c}.unit_price`})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.total_amount`,id:`details.${c}.total_amount`})}),Object(F.jsx)("td",{children:Object(F.jsx)(i.a,{color:"danger p-1",size:"sm",onClick:()=>e.remove(c),children:Object(F.jsx)("i",{className:"fa fa-trash"})})})]},c)})),"With Calculation"===(null===(l=t.values)||void 0===l?void 0:l.type_of_quotation)&&Object(F.jsxs)(F.Fragment,{children:[Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Total Net Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.net_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.total_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Add : CGST @ 9.00%"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.cgst=parseFloat(t.values.details.reduce((function(e,t){return e+t.cgst}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsxs)("td",{children:["Add : ",t.values.gst_type," @ 9.00%"]}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.gst=parseFloat(t.values.details.reduce((function(e,t){return e+t.sgst}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Total Tax Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.total_tax_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.tax_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{style:{width:"200px"},children:"Total Order Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.total_order_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.order_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]})]})]})]})})]})}})})}),Object(F.jsxs)(i.F,{style:{justifyContent:"center"},children:[Object(F.jsx)(i.h,{md:4,children:Object(F.jsx)(i.a,{type:"reset",color:"danger",block:!0,children:Object(F.jsx)("b",{children:"Reset"})})}),Object(F.jsx)(i.h,{md:4,children:Object(F.jsx)(i.a,{type:"submit",disabled:t.isSubmitting,color:"primary",block:!0,children:"Submit"})})]})]})}})})]})]})}));var U=Object(l.b)((e=>({login:e.login,quotation:e.quotation,cols:e.cols.cols,customer:e.customer.customer,rows:e.rows.rows,company:e.company.company})),(e=>({onCompanyGetData:t=>e(d.f(t)),onCustomerGetData:t=>e(d.g(t)),onRowsGetData:t=>e(d.jb(t)),onColsGetData:t=>e(d.e(t)),onQuotationGetData:t=>e(d.eb(t)),onDeleteQuotation:(t,c)=>e(d.s(t,c)),onPostQuotationData:(t,c,s,i,a)=>e(d.W(t,c,s,i,a)),onUpdateQuotationData:(t,c,s,i)=>e(d.Bb(t,c,s,i)),quotationEditGetData:t=>e(d.db(t))})))((function(e){var t,c,l,d,j,b;let u={token:`${null===(t=e.login)||void 0===t||null===(c=t.login)||void 0===c?void 0:c.token}`};const[x,m]=Object(s.useState)(!1),[h,O]=Object(s.useState)(!1),p=()=>{m(!1),O(!h)};return console.log("showPdf",x),Object(F.jsxs)("div",{children:[Object(F.jsx)(i.a,{className:"btn-success p-1 mr-2",onClick:()=>{p()},children:Object(F.jsx)("i",{className:"fa fa-angle-double-right","aria-hidden":"true"})}),Object(F.jsxs)(i.t,{className:"modal-info modal-lg",isOpen:h,toggle:p,backdrop:"static",children:[Object(F.jsx)(i.w,{toggle:p,children:"Add New Quotation"}),Object(F.jsx)(i.u,{children:Object(F.jsx)(a.e,{initialValues:{customer_id:e.data.customer_id,company_id:e.data.company_id,user_id:null===(l=e.login)||void 0===l||null===(d=l.login)||void 0===d||null===(j=d.user)||void 0===j?void 0:j.id,quotation_no:e.data.quotation_no,type_of_quotation:"",quotation_date:e.data.quotation_date,quotation_valid_till:e.data.quotation_valid_till,gstin:e.data.gstin,net_amount:"",cgst:"",gst:"",total_tax_amount:"",total_order_amount:"",is_approved:"",row:"",details:[],gst_type:null===(b=e.data)||void 0===b?void 0:b.gst_type},onSubmit:(t,c)=>{let{setSubmitting:s}=c;console.log("values in Quotation:",t);let i={customer_id:t.customer_id,company_id:t.company_id,user_id:t.user_id,quotation_no:t.quotation_no,quotation_type:t.type_of_quotation,quotation_date:t.quotation_date,gstin:t.gstin,quotation_valid_till:t.quotation_valid_till,net_amount:t.net_amount,cgst:t.cgst,gst:t.gst,total_tax_amount:t.total_tax_amount,total_order_amount:t.total_order_amount,products:t.details,gst_type:t.gst_type};console.log("Data of Quotation:",i),e.onPostQuotationData(u,i,p,m,s),s(!0)},validationSchema:o.a().shape({customer_id:o.c().required("required"),company_id:o.c().required("required"),quotation_no:o.c().required("required"),quotation_date:o.c().required("required"),quotation_valid_till:o.c().required("required"),type_of_quotation:o.c().required("required"),gstin:o.c().required("required"),gst_type:o.c().required("required")}),children:t=>{var c,s;return x?Object(F.jsx)(W,{toggle:p,data:t.values,customer:e.customer}):Object(F.jsxs)(a.d,{children:[Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"customer_id",children:"Select Customer"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"customer_id",id:"customer_id",placeholder:"Select Customer",className:"form-control"+(t.errors.customer_id&&t.touched.customer_id?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Customer"}),null===(c=e.customer)||void 0===c?void 0:c.map((e=>Object(F.jsx)("option",{value:e.id,children:e.name})))]}),Object(F.jsx)(a.a,{name:"customer_id",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"company_id",children:"Select Company"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"company_id",id:"company_id",placeholder:"Select Company",className:"form-control"+(t.errors.company_id&&t.touched.company_id?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Company"}),null===(s=e.company)||void 0===s?void 0:s.filter((e=>1==e.internal)).map((e=>Object(F.jsx)("option",{value:e.id,children:e.name})))]}),Object(F.jsx)(a.a,{name:"company_id",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"type_of_quotation",children:"Select Quotation Type"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"type_of_quotation",id:"type_of_quotation",placeholder:"Select Quotation Type",className:"form-control"+(t.errors.type_of_quotation&&t.touched.type_of_quotation?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Quotation Type"}),Object(F.jsx)("option",{value:"With Calculation",children:"With Calculation"}),Object(F.jsx)("option",{value:"Without Calculation",children:"Without Calculation"})]}),Object(F.jsx)(a.a,{name:"type_of_quotation",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_no",children:"Quotation No"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"text",name:"quotation_no",id:"quotation_no",placeholder:"Enter Quotation No",className:"form-control"+(t.errors.quotation_no&&t.touched.quotation_no?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_no",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_date",children:"Quotation Date"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"date",name:"quotation_date",id:"quotation_date",placeholder:"Enter Quotation No",className:"form-control"+(t.errors.quotation_date&&t.touched.quotation_date?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_date",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_valid_till",children:"Quotation Valid Till"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"date",name:"quotation_valid_till",id:"quotation_valid_till",placeholder:"Enter Quotation Valid Till",className:"form-control"+(t.errors.quotation_valid_till&&t.touched.quotation_valid_till?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_valid_till",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"gstin",children:"GSTIN"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"text",name:"gstin",id:"gstin",placeholder:"Enter GSTIN",className:"form-control"+(t.errors.gstin&&t.touched.gstin?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"gstin",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"gst_type",children:"Select Gst Type"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"gst_type",id:"gst_type",placeholder:"",className:"form-control"+(t.errors.gst_type&&t.touched.gst_type?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Gst Type"}),Object(F.jsx)("option",{value:"SGST",children:"SGST"}),Object(F.jsx)("option",{value:"IGST",children:"IGST"})]}),Object(F.jsx)(a.a,{name:"gst_type",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsx)(i.F,{className:"form-group",children:Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"row",children:"Add Table Rows"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"number",name:"row",id:"row",placeholder:"Enter Table rows",className:"form-control"+(t.errors.row&&t.touched.row?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"row",component:"div",className:"invalid-feedback"})]})]})}),Object(F.jsx)(i.F,{children:Object(F.jsx)(i.h,{md:12,children:Object(F.jsx)(a.c,{name:"details",render:e=>{var c,s,o,l;return Object(F.jsxs)("div",{children:[Object(F.jsx)(i.F,{children:Object(F.jsx)(i.h,{md:10,children:Object(F.jsx)(i.n,{children:Object(F.jsx)(i.p,{children:Object(F.jsx)(i.q,{addonType:"append",children:Object(F.jsx)(i.a,{block:!0,className:"btn-success",onClick:()=>{for(let c=1;c<=t.values.row;c++)e.push({desc:"",specs:"",qty:"",units:"",unit_price:"",total_amount:"",cgst:"",sgst:"",tax_amount:"",order_amount:""})},children:"Add Rows"})})})})})}),Object(F.jsx)("div",{style:{overflow:"scroll"},children:Object(F.jsxs)(i.I,{size:"sm",className:"text-center f-12",children:[Object(F.jsx)("thead",{children:Object(F.jsxs)("tr",{children:[Object(F.jsx)("th",{children:"Sr no"}),Object(F.jsx)("th",{children:"Description Of Items"}),Object(F.jsx)("th",{children:"Model/Specifications"}),Object(F.jsx)("th",{children:"Qty"}),Object(F.jsx)("th",{children:"Units"}),Object(F.jsx)("th",{children:"Unit Price (INR)"}),Object(F.jsx)("th",{children:"Total Amount(INR)"}),Object(F.jsx)("th",{children:"Delete"})]})}),Object(F.jsxs)("tbody",{className:"text-center",children:[console.log("values",null===t||void 0===t||null===(c=t.values)||void 0===c?void 0:c.details),null===t||void 0===t||null===(s=t.values)||void 0===s||null===(o=s.details)||void 0===o?void 0:o.map(((t,c)=>{var s=Number(t.unit_price)*Number(t.qty),o=9*s/100,l=9*s/100;t.total_amount=s,t.sgst=l,t.cgst=o;var d=l+o;return t.tax_amount=d,t.order_amount=d+s,Object(F.jsxs)("tr",{className:"text-center",children:[Object(F.jsx)("td",{children:c+1}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.desc`,id:"desc",style:{width:"150px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.specs`,id:`details.${c}.specs`})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"number",name:`details.${c}.qty`,id:`details.${c}.qty`,min:"1",style:{width:"80px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.units`,id:`details.${c}.units`,style:{width:"100px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.unit_price`,id:`details.${c}.unit_price`})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.total_amount`,id:`details.${c}.total_amount`})}),Object(F.jsx)("td",{children:Object(F.jsx)(i.a,{color:"danger p-1",size:"sm",onClick:()=>e.remove(c),children:Object(F.jsx)("i",{className:"fa fa-trash"})})})]},c)})),"With Calculation"===(null===(l=t.values)||void 0===l?void 0:l.type_of_quotation)&&Object(F.jsxs)(F.Fragment,{children:[Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Total Net Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.net_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.total_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Add : CGST @ 9.00%"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.cgst=parseFloat(t.values.details.reduce((function(e,t){return e+t.cgst}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsxs)("td",{children:["Add : ",t.values.gst_type," @ 9.00%"]}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.gst=parseFloat(t.values.details.reduce((function(e,t){return e+t.sgst}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Total Tax Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.total_tax_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.tax_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{style:{width:"200px"},children:"Total Order Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.total_order_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.order_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]})]})]})]})})]})}})})}),Object(F.jsxs)(i.F,{style:{justifyContent:"center"},children:[Object(F.jsx)(i.h,{md:4,children:Object(F.jsx)(i.a,{type:"reset",color:"danger",block:!0,children:Object(F.jsx)("b",{children:"Reset"})})}),Object(F.jsx)(i.h,{md:4,children:Object(F.jsx)(i.a,{type:"submit",disabled:t.isSubmitting,color:"primary",block:!0,children:"Submit"})})]})]})}})})]})]})}));var L=Object(l.b)((e=>({login:e.login,quotation:e.quotation,cols:e.cols.cols,customer:e.customer.customer,rows:e.rows.rows,company:e.company.company})),(e=>({onCompanyGetData:t=>e(d.f(t)),onCustomerGetData:t=>e(d.g(t)),onRowsGetData:t=>e(d.jb(t)),onColsGetData:t=>e(d.e(t)),onQuotationGetData:t=>e(d.eb(t)),onDeleteQuotation:(t,c)=>e(d.s(t,c)),onPostQuotationData:(t,c,s,i,a)=>e(d.W(t,c,s,i,a)),onUpdateQuotationData:(t,c,s,i)=>e(d.Bb(t,c,s,i)),quotationEditGetData:t=>e(d.db(t))})))((function(e){var t,c;let{data:s,...a}=e,n={token:`${null===(t=a.login)||void 0===t||null===(c=t.login)||void 0===c?void 0:c.token}`,id:s.id};return Object(F.jsx)("div",{children:Object(F.jsx)(i.a,{className:"p-1 mr-2",onClick:()=>{(()=>{let e={customer_id:s.customer_id,company_id:s.company_id,user_id:s.user_id,quotation_no:s.quotation_no,quotation_type:s.quotation_type,quotation_date:s.quotation_date,gstin:s.gstin,quotation_valid_till:s.quotation_valid_till,net_amount:s.net_amount,cgst:s.cgst,gst:s.gst,total_tax_amount:s.total_tax_amount,total_order_amount:s.total_order_amount,is_approved:1,products:s.quotation_details};console.log("Data of InvoicePaid:",e),a.onUpdateQuotationData(n,e)})()},children:Object(F.jsx)("i",{className:"fa fa-check-square","aria-hidden":"true"})})})}));t.default=Object(l.b)((e=>({login:e.login,quotation:e.quotation,cols:e.cols.cols,customer:e.customer.customer,rows:e.rows.rows,company:e.company.company})),(e=>({onCompanyGetData:t=>e(d.f(t)),onCustomerGetData:t=>e(d.g(t)),onRowsGetData:t=>e(d.jb(t)),onColsGetData:t=>e(d.e(t)),onQuotationGetData:t=>e(d.eb(t)),onDeleteQuotation:(t,c)=>e(d.s(t,c)),onPostQuotationData:(t,c,s,i,a)=>e(d.W(t,c,s,i,a)),onUpdateQuotationData:(t,c,s,i)=>e(d.Bb(t,c,s,i)),quotationEditGetData:t=>e(d.db(t))})))((function(e){var t,c,l,d,j,b,u,x,m,h,O,p;let v={token:`${null===(t=e.login)||void 0===t||null===(c=t.login)||void 0===c?void 0:c.token}`};const[_,g]=Object(s.useState)(!1);Object(s.useEffect)((()=>{e.onCompanyGetData(v),e.onQuotationGetData(v),e.onRowsGetData(v),e.onCustomerGetData(v),e.onColsGetData(v)}),[]);const[f,y]=Object(s.useState)({pageSize:10,pageIndex:0,items:null!==(l=e.quotation)&&void 0!==l&&l.isLoading?[]:null===(d=e.quotation)||void 0===d?void 0:d.quotation}),[N,q]=Object(s.useState)(!1),S=()=>{g(!1),q(!N)};return Object(F.jsxs)(i.b,{children:[Object(F.jsxs)(i.e,{className:"bg-warning text-white",children:[Object(F.jsxs)("div",{className:"",children:[Object(F.jsx)("strong",{children:"Quotation"}),Object(F.jsx)(i.a,{className:"btn-success float-right",onClick:()=>{S()},children:"Create Quotation"})]}),Object(F.jsxs)(i.t,{className:"modal-info modal-lg",isOpen:N,toggle:S,backdrop:"static",children:[Object(F.jsx)(i.w,{toggle:S,children:"Add New Quotation"}),Object(F.jsx)(i.u,{children:Object(F.jsx)(a.e,{initialValues:{customer_id:"",company_id:"",user_id:null===(j=e.login)||void 0===j||null===(b=j.login)||void 0===b||null===(u=b.user)||void 0===u?void 0:u.id,quotation_no:"",type_of_quotation:"",quotation_date:"",quotation_valid_till:"",gstin:"",net_amount:"",cgst:"",gst:"",gst_type:"",total_tax_amount:"",total_order_amount:"",is_approved:"",row:"",details:[]},onSubmit:(t,c)=>{let{setSubmitting:s}=c,i={customer_id:t.customer_id,company_id:t.company_id,user_id:t.user_id,quotation_no:t.quotation_no,quotation_type:t.type_of_quotation,quotation_date:t.quotation_date,gstin:t.gstin,quotation_valid_till:t.quotation_valid_till,net_amount:t.net_amount,cgst:t.cgst,gst:t.gst,total_tax_amount:t.total_tax_amount,total_order_amount:t.total_order_amount,gst_type:t.gst_type,products:t.details};e.onPostQuotationData(v,i,S,g,s),s(!0)},validationSchema:o.a().shape({customer_id:o.c().required("required"),company_id:o.c().required("required"),quotation_no:o.c().required("required"),quotation_date:o.c().required("required"),quotation_valid_till:o.c().required("required"),type_of_quotation:o.c().required("required"),gstin:o.c().required("required"),gst_type:o.c().required("required")}),children:t=>{var c,s;return _?Object(F.jsx)(W,{toggle:S,data:t.values,customer:e.customer}):Object(F.jsxs)(a.d,{children:[Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"customer_id",children:"Select Customer"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"customer_id",id:"customer_id",placeholder:"Select Customer",className:"form-control"+(t.errors.customer_id&&t.touched.customer_id?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Customer"}),null===(c=e.customer)||void 0===c?void 0:c.map((e=>Object(F.jsx)("option",{value:e.id,children:e.name})))]}),Object(F.jsx)(a.a,{name:"customer_id",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"company_id",children:"Select Company"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"company_id",id:"company_id",placeholder:"Select Company",className:"form-control"+(t.errors.company_id&&t.touched.company_id?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Company"}),null===(s=e.company)||void 0===s?void 0:s.filter((e=>1==e.internal)).map((e=>Object(F.jsx)("option",{value:e.id,children:e.name})))]}),Object(F.jsx)(a.a,{name:"company_id",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"type_of_quotation",children:"Select Quotation Type"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"type_of_quotation",id:"type_of_quotation",placeholder:"Select Quotation Type",className:"form-control"+(t.errors.type_of_quotation&&t.touched.type_of_quotation?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Quotation Type"}),Object(F.jsx)("option",{value:"With Calculation",children:"With Calculation"}),Object(F.jsx)("option",{value:"Without Calculation",children:"Without Calculation"})]}),Object(F.jsx)(a.a,{name:"type_of_quotation",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_no",children:"Quotation No"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"text",name:"quotation_no",id:"quotation_no",placeholder:"Enter Quotation No",className:"form-control"+(t.errors.quotation_no&&t.touched.quotation_no?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_no",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_date",children:"Quotation Date"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"date",name:"quotation_date",id:"quotation_date",placeholder:"Enter Quotation No",className:"form-control"+(t.errors.quotation_date&&t.touched.quotation_date?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_date",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"quotation_valid_till",children:"Quotation Valid Till"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"date",name:"quotation_valid_till",id:"quotation_valid_till",placeholder:"Enter Quotation Valid Till",className:"form-control"+(t.errors.quotation_valid_till&&t.touched.quotation_valid_till?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"quotation_valid_till",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsxs)(i.F,{className:"form-group",children:[Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"gstin",children:"GSTIN"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"text",name:"gstin",id:"gstin",placeholder:"Enter GSTIN",className:"form-control"+(t.errors.gstin&&t.touched.gstin?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"gstin",component:"div",className:"invalid-feedback"})]})]}),Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"gst_type",children:"Select Gst Type"}),Object(F.jsxs)(i.p,{children:[Object(F.jsxs)(a.b,{component:r.a,type:"select",name:"gst_type",id:"gst_type",placeholder:"",className:"form-control"+(t.errors.gst_type&&t.touched.gst_type?" is-invalid":""),children:[Object(F.jsx)("option",{value:"",children:"Select Gst Type"}),Object(F.jsx)("option",{value:"SGST",children:"SGST"}),Object(F.jsx)("option",{value:"IGST",children:"IGST"})]}),Object(F.jsx)(a.a,{name:"gst_type",component:"div",className:"invalid-feedback"})]})]})]}),Object(F.jsx)(i.F,{className:"form-group",children:Object(F.jsxs)(i.h,{md:6,children:[Object(F.jsx)(i.s,{for:"row",children:"Add Table Rows"}),Object(F.jsxs)(i.p,{children:[Object(F.jsx)(a.b,{component:n.a,type:"number",name:"row",id:"row",placeholder:"Enter Table rows",className:"form-control"+(t.errors.row&&t.touched.row?" is-invalid":"")}),Object(F.jsx)(a.a,{name:"row",component:"div",className:"invalid-feedback"})]})]})}),Object(F.jsx)(i.F,{children:Object(F.jsx)(i.h,{md:12,children:Object(F.jsx)(a.c,{name:"details",render:e=>{var c,s,o,l;return Object(F.jsxs)("div",{children:[Object(F.jsx)(i.F,{children:Object(F.jsx)(i.h,{md:10,children:Object(F.jsx)(i.n,{children:Object(F.jsx)(i.p,{children:Object(F.jsx)(i.q,{addonType:"append",children:Object(F.jsx)(i.a,{block:!0,className:"btn-success",onClick:()=>{for(let c=1;c<=t.values.row;c++)e.push({desc:"",specs:"",qty:"",units:"",unit_price:"",total_amount:"",cgst:"",sgst:"",tax_amount:"",order_amount:""})},children:"Add Rows"})})})})})}),Object(F.jsx)("div",{style:{overflow:"scroll"},children:Object(F.jsxs)(i.I,{size:"sm",className:"text-center f-12",children:[Object(F.jsx)("thead",{children:Object(F.jsxs)("tr",{children:[Object(F.jsx)("th",{children:"Sr no"}),Object(F.jsx)("th",{children:"Description Of Items"}),Object(F.jsx)("th",{children:"Model/Specifications"}),Object(F.jsx)("th",{children:"Qty"}),Object(F.jsx)("th",{children:"Units"}),Object(F.jsx)("th",{children:"Unit Price (INR)"}),Object(F.jsx)("th",{children:"Total Amount(INR)"}),Object(F.jsx)("th",{children:"Delete"})]})}),Object(F.jsxs)("tbody",{className:"text-center",children:[console.log("values",null===t||void 0===t||null===(c=t.values)||void 0===c?void 0:c.details),null===t||void 0===t||null===(s=t.values)||void 0===s||null===(o=s.details)||void 0===o?void 0:o.map(((t,c)=>{var s=Number(t.unit_price)*Number(t.qty),o=9*s/100,l=9*s/100;t.total_amount=s,t.sgst=l,t.cgst=o;var d=l+o;return t.tax_amount=d,t.order_amount=d+s,Object(F.jsxs)("tr",{className:"text-center",children:[Object(F.jsx)("td",{children:c+1}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.desc`,id:"desc",style:{width:"150px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.specs`,id:`details.${c}.specs`})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"number",name:`details.${c}.qty`,id:`details.${c}.qty`,min:"1",style:{width:"80px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.units`,id:`details.${c}.units`,style:{width:"100px"}})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.unit_price`,id:`details.${c}.unit_price`})}),Object(F.jsx)("td",{children:Object(F.jsx)(a.b,{component:n.a,type:"text",name:`details.${c}.total_amount`,id:`details.${c}.total_amount`})}),Object(F.jsx)("td",{children:Object(F.jsx)(i.a,{color:"danger p-1",size:"sm",onClick:()=>e.remove(c),children:Object(F.jsx)("i",{className:"fa fa-trash"})})})]},c)})),"With Calculation"===(null===(l=t.values)||void 0===l?void 0:l.type_of_quotation)&&Object(F.jsxs)(F.Fragment,{children:[Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Total Net Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.net_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.total_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Add : CGST @ 9.00%"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.cgst=parseFloat(t.values.details.reduce((function(e,t){return e+t.cgst}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsxs)("td",{children:["Add : ",t.values.gst_type," @ 9.00%"]}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.gst=parseFloat(t.values.details.reduce((function(e,t){return e+t.sgst}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{children:"Total Tax Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.total_tax_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.tax_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]}),Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{}),Object(F.jsx)("td",{style:{width:"200px"},children:"Total Order Amount"}),Object(F.jsxs)("td",{children:[Object(F.jsx)("i",{className:"fa fa-rupee-sign"})," ",t.values.total_order_amount=parseFloat(t.values.details.reduce((function(e,t){return e+t.order_amount}),0)).toFixed(2)]}),Object(F.jsx)("td",{})]})]})]})]})})]})}})})}),Object(F.jsxs)(i.F,{style:{justifyContent:"center"},children:[Object(F.jsx)(i.h,{md:4,children:Object(F.jsx)(i.a,{type:"reset",color:"danger",block:!0,children:Object(F.jsx)("b",{children:"Reset"})})}),Object(F.jsx)(i.h,{md:4,children:Object(F.jsx)(i.a,{type:"submit",disabled:t.isSubmitting,color:"primary",block:!0,children:"Submit"})})]})]})}})})]})]}),Object(F.jsx)(i.c,{children:Object(F.jsxs)("table",{className:"table table-sm text-center",style:{fontSize:"12px"},children:[Object(F.jsx)("thead",{children:Object(F.jsxs)("tr",{children:[Object(F.jsx)("th",{scope:"col",children:"Quote No"}),Object(F.jsx)("th",{scope:"col",children:"Kind Attn"}),Object(F.jsx)("th",{scope:"col",children:"Company Name"}),Object(F.jsx)("th",{scope:"col",children:"Quote Date"}),Object(F.jsx)("th",{scope:"col",children:"Quote Valid Till"}),Object(F.jsx)("th",{scope:"col",children:"Quote Type"}),Object(F.jsx)("th",{scope:"col",children:"Approved"}),Object(F.jsx)("th",{scope:"col",children:"Action"})]})}),Object(F.jsx)("tbody",{style:{textTransform:"uppercase"},children:null!==(x=e.quotation)&&void 0!==x&&x.isLoading?Object(F.jsx)("tr",{children:Object(F.jsx)("td",{colSpan:18,children:Object(F.jsx)(P.a,{color:"primary"})})}):(null===(m=e.quotation)||void 0===m||null===(h=m.quotation)||void 0===h?void 0:h.length)>0?null===(O=e.quotation)||void 0===O||null===(p=O.quotation)||void 0===p?void 0:p.slice(f.pageIndex*f.pageSize,f.pageIndex*f.pageSize+f.pageSize).map(((t,c)=>{var s,a;return Object(F.jsxs)("tr",{children:[Object(F.jsx)("td",{children:t.quotation_no}),Object(F.jsx)("td",{children:null===(s=t.customer)||void 0===s?void 0:s.name}),Object(F.jsx)("td",{children:null===(a=t.company)||void 0===a?void 0:a.name}),Object(F.jsx)("td",{children:t.quotation_date}),Object(F.jsx)("td",{children:t.quotation_valid_till}),Object(F.jsx)("td",{children:t.quotation_type}),Object(F.jsx)("td",{children:0==t.is_approved?"No":"Yes"}),Object(F.jsxs)("td",{className:"d-flex justify-content-center",children:[Object(F.jsx)(L,{data:t}),Object(F.jsx)(U,{data:t}),Object(F.jsx)(R,{data:t,customer:t.customer}),Object(F.jsx)($,{data:t}),Object(F.jsx)(i.a,{className:"btn-danger ml-2 p-1",onClick:()=>{window.confirm("Are you sure you wish to delete this Quotation?")&&e.onDeleteQuotation(v,t.id)},children:Object(F.jsx)("i",{className:"fa fa-trash-alt ",value:t.id,"aria-hidden":"true"})})]})]},c)})):Object(F.jsx)("tr",{children:Object(F.jsx)("td",{colSpan:3,children:"No Quotation"})})}),Object(F.jsx)("nav",{children:Object(F.jsxs)(i.C,{children:[Object(F.jsx)(i.D,{children:Object(F.jsx)(i.E,{previous:!0,tag:"button",onClick:e=>{y((e=>({...f,pageIndex:e.pageIndex>0?e.pageIndex-1:0})))},children:"Back"})}),Object(F.jsx)(i.D,{children:Object(F.jsx)(i.E,{next:!0,tag:"button",onClick:e=>{y((e=>({...f,pageIndex:e.pageIndex<Math.ceil(e.items.length/e.pageSize)?e.pageIndex+1:e.pageIndex})))},children:"Next"})})]})})]})})]})}))}}]);
//# sourceMappingURL=13.3533d0ec.chunk.js.map