diff --git a/src/Pages/BookingScreen/Components/UtillComponents/MultipleSearch.jsx b/src/Pages/BookingScreen/Components/UtillComponents/MultipleSearch.jsx index ace6660..a7cfc90 100644 --- a/src/Pages/BookingScreen/Components/UtillComponents/MultipleSearch.jsx +++ b/src/Pages/BookingScreen/Components/UtillComponents/MultipleSearch.jsx @@ -1,126 +1,125 @@ import React, { useEffect, useState } from "react"; import { getSession } from "../../../../Services/Others"; import { useDispatch } from "react-redux"; -import { getmultipleSearch, PostProductSearch } from "../../../../Features/BookingScreen/BookingData/BookingData"; +import { + getmultipleSearch, + PostProductSearch, +} from "../../../../Features/BookingScreen/BookingData/BookingData"; import Buttons from "../../../../Components/Forms/Buttons"; - const MultipleSearch = ({ close }) => { - const CompId = getSession("CompId"); - const BranchId = getSession("BranchId"); - const AppId = getSession("AppId"); - const dispatch = useDispatch(); + const CompId = getSession("CompId"); + const BranchId = getSession("BranchId"); + const AppId = getSession("AppId"); + const dispatch = useDispatch(); + const options = [ + { label: "Product Name", value: "ProdName" }, + { label: "Product Variant Name", value: "ProdVariantName" }, + // { label: "Product ID", value: "ProdId" }, + { label: "One Piece QR", value: "OnePcQR" }, + { label: "QR Code", value: "QrCode" }, + { label: "Product Name Code", value: "ProdNameCode" }, + { label: "Category Name", value: "CategoryName" }, + { label: "Sub Category Name", value: "SubCategoryName" }, + { label: "Brand Name", value: "BrandName" }, + ]; - const options = [ - { label: "Product Name", value: "ProdName" }, - { label: "Product Variant Name", value: "ProdVariantName" }, - // { label: "Product ID", value: "ProdId" }, - { label: "One Piece QR", value: "OnePcQR" }, - { label: "QR Code", value: "QrCode" }, - { label: "Product Name Code", value: "ProdNameCode" }, - { label: "Category Name", value: "CategoryName" }, - { label: "Sub Category Name", value: "SubCategoryName" }, - { label: "Brand Name", value: "BrandName" }, - ]; + const [selectedValues, setSelectedValues] = useState([]); + console.log(selectedValues, "selectedValuesselectedValues"); + useEffect(() => { + GetmultipleSearchData(); + }, []); - const [selectedValues, setSelectedValues] = useState([]); - console.log(selectedValues, 'selectedValuesselectedValues'); + const postMultipleSearch = async () => { + if (selectedValues.length === 0) { + alert("Please select at least one option!"); + return; + } + const data = { + CompId: CompId, + BranchId: BranchId, + AppId: AppId, + SearchTerms: selectedValues, + }; + try { + const response = await dispatch(PostProductSearch(data)).unwrap(); + console.log("Search Response:", response); + if (response?.data?.statusCode == 1) { + setSelectedValues(""); + close(false); + } + } catch (error) { + console.error("Search Error:", error); + } + }; - useEffect(() => { - GetmultipleSearchData(); - }, []); - - - const postMultipleSearch = async () => { - if (selectedValues.length === 0) { - alert("Please select at least one option!"); - return; - } - const data = { - CompId: CompId, - BranchId: BranchId, - AppId: AppId, - SearchTerms: selectedValues, - }; - try { - const response = await dispatch(PostProductSearch(data)).unwrap(); - console.log("Search Response:", response); - if (response?.data?.statusCode == 1) { - setSelectedValues('') - close(false); - } - } catch (error) { - console.error("Search Error:", error); - } + const GetmultipleSearchData = async () => { + const data = { + AppId, + CompId, + BranchId, }; + try { + const response = await dispatch(getmultipleSearch(data)).unwrap(); - const GetmultipleSearchData = async () => { - const data = { - AppId, - CompId, - BranchId, - }; + if (response?.data?.statusCode === 1) { + const selected = + response?.data?.data?.[0]?.SearchTermDtl?.map( + (item) => item?.SearchTerm, + ) || []; - try { - const response = await dispatch(getmultipleSearch(data)).unwrap(); + setSelectedValues(selected); + } + } catch (error) { + console.error("Get Search Terms Error:", error); + } + }; - if (response?.data?.statusCode === 1) { - const selected = response?.data?.data?.[0]?.SearchTermDtl?.map( - (item) => item?.SearchTerm - ) || []; - - setSelectedValues(selected); - } - } catch (error) { - console.error("Get Search Terms Error:", error); - } - }; - - return ( - <> -
- {options.map((item) => ( - - ))} - -
-
- } - /> -
- - - ); + return ( + <> +
+ {options.map((item) => ( + + ))} +
+
+ +
+ + ); }; export default MultipleSearch; diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx index fc9e823..2ddd7f9 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx @@ -1,11 +1,11 @@ -import React from 'react'; -import { useSelector } from 'react-redux'; -import { GlobalPritdummyData } from '../../../../Features/ThemeChange/ThemeChange'; -import { isMobile } from 'react-device-detect'; -import { extractLastNumberOrderId } from '../../../../Services/Others'; -import moment from 'moment'; -import { settingDataSelector } from '../../../../Features/PreferenceMaster/PreferenceMaster'; -import { PreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData'; +import React from "react"; +import { useSelector } from "react-redux"; +import { GlobalPritdummyData } from "../../../../Features/ThemeChange/ThemeChange"; +import { isMobile } from "react-device-detect"; +import { extractLastNumberOrderId } from "../../../../Services/Others"; +import moment from "moment"; +import { settingDataSelector } from "../../../../Features/PreferenceMaster/PreferenceMaster"; +import { PreferenceData } from "../../../../Features/BookingScreen/BookingData/BookingData"; const TaxInvoice = ({ index, @@ -25,138 +25,138 @@ const TaxInvoice = ({ const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' - )?.SettingValue === 'Y'; + setting?.SettingIdName?.toLowerCase() === "estimateprintheader", + )?.SettingValue === "Y"; let BillName = printDatas?.PrintHdrName; - let companyColour = printDatas?.PrintHdrColor ?? '#00000'; + let companyColour = printDatas?.PrintHdrColor ?? "#00000"; // Function to convert number to words const numberToWords = (num) => { const a = [ - '', - 'One', - 'Two', - 'Three', - 'Four', - 'Five', - 'Six', - 'Seven', - 'Eight', - 'Nine', - 'Ten', - 'Eleven', - 'Twelve', - 'Thirteen', - 'Fourteen', - 'Fifteen', - 'Sixteen', - 'Seventeen', - 'Eighteen', - 'Nineteen', + "", + "One", + "Two", + "Three", + "Four", + "Five", + "Six", + "Seven", + "Eight", + "Nine", + "Ten", + "Eleven", + "Twelve", + "Thirteen", + "Fourteen", + "Fifteen", + "Sixteen", + "Seventeen", + "Eighteen", + "Nineteen", ]; const b = [ - '', - '', - 'Twenty', - 'Thirty', - 'Forty', - 'Fifty', - 'Sixty', - 'Seventy', - 'Eighty', - 'Ninety', + "", + "", + "Twenty", + "Thirty", + "Forty", + "Fifty", + "Sixty", + "Seventy", + "Eighty", + "Ninety", ]; - if (num === 0) return 'Zero'; + if (num === 0) return "Zero"; if (num < 20) return a[num]; if (num < 100) - return b[Math.floor(num / 10)] + (num % 10 ? ' ' + a[num % 10] : ''); + return b[Math.floor(num / 10)] + (num % 10 ? " " + a[num % 10] : ""); if (num < 1000) return ( a[Math.floor(num / 100)] + - ' Hundred' + - (num % 100 ? ' and ' + numberToWords(num % 100) : '') + " Hundred" + + (num % 100 ? " and " + numberToWords(num % 100) : "") ); if (num < 100000) return ( numberToWords(Math.floor(num / 1000)) + - ' Thousand' + - (num % 1000 ? ' ' + numberToWords(num % 1000) : '') + " Thousand" + + (num % 1000 ? " " + numberToWords(num % 1000) : "") ); if (num < 10000000) return ( numberToWords(Math.floor(num / 100000)) + - ' Lakh' + - (num % 100000 ? ' ' + numberToWords(num % 100000) : '') + " Lakh" + + (num % 100000 ? " " + numberToWords(num % 100000) : "") ); if (num < 1000000000) return ( numberToWords(Math.floor(num / 10000000)) + - ' Crore' + - (num % 10000000 ? ' ' + numberToWords(num % 10000000) : '') + " Crore" + + (num % 10000000 ? " " + numberToWords(num % 10000000) : "") ); - return 'Number too large'; + return "Number too large"; }; // Helper to format date as 7-Aug-2025 function formatDateToDDMMMYYYY(dateStr) { - console.log(dateStr, 'dateStrdateStr'); - if (!dateStr) return ''; + console.log(dateStr, "dateStrdateStr"); + if (!dateStr) return ""; const date = new Date(dateStr); if (isNaN(date)) return dateStr; // fallback if invalid date const day = date.getDate(); - const month = date.toLocaleString('en-US', { month: 'short' }); + const month = date.toLocaleString("en-US", { month: "short" }); const year = date.getFullYear(); return `${day}-${month}-${year}`; } function removeTimeFromDate(dateStr) { - if (!dateStr) return ''; + if (!dateStr) return ""; // Split on ":" — first part will be "DD-MM-YYYY" - const parts = dateStr.split(':'); + const parts = dateStr.split(":"); return parts[0] || dateStr; } console.log( Date1, - moment(Date1).format('DD-MMM-YYYY'), - 'datadatadatadatadatadata' + moment(Date1).format("DD-MMM-YYYY"), + "datadatadatadatadatadata", ); // Extract data from table2Data - mapping from A4Standard structure const invoiceData = { // Company Details - mapped from A4Standard - companyName: table2Data?.CompName || table2Data?.BrName || '', - companyspecname: table2Data?.AppSpecificName || '', + companyName: table2Data?.CompName || table2Data?.BrName || "", + companyspecname: table2Data?.AppSpecificName || "", companyAddress: { - address1: table2Data?.AddressDetails?.[0]?.Address1 || '', - address2: table2Data?.AddressDetails?.[0]?.Address2 || '', - city: table2Data?.AddressDetails?.[0]?.City || '', - state: table2Data?.AddressDetails?.[0]?.State || '', - zip: table2Data?.AddressDetails?.[0]?.Zip || '', + address1: table2Data?.AddressDetails?.[0]?.Address1 || "", + address2: table2Data?.AddressDetails?.[0]?.Address2 || "", + city: table2Data?.AddressDetails?.[0]?.City || "", + state: table2Data?.AddressDetails?.[0]?.State || "", + zip: table2Data?.AddressDetails?.[0]?.Zip || "", }, - companyGSTIN: table2Data?.CompGSTIN || table2Data?.BrGSTIN || '', - companyEmail: table2Data?.CompanyEmail || table2Data?.BrEmail || '', - companyMobile: table2Data?.BrMobile || '', - companyMobile2: table2Data?.BrMobile2 || '', + companyGSTIN: table2Data?.CompGSTIN || table2Data?.BrGSTIN || "", + companyEmail: table2Data?.CompanyEmail || table2Data?.BrEmail || "", + companyMobile: table2Data?.BrMobile || "", + companyMobile2: table2Data?.BrMobile2 || "", // Invoice Details - mapped from A4Standard invoiceNo: table2Data?.OrderId ? extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus) - : '', - invoiceDate: moment(Date1).format('DD-MMM-YYYY'), + : "", + invoiceDate: moment(Date1).format("DD-MMM-YYYY"), // Customer Details - mapped from A4Standard CustomerDetails array customerName: table2Data?.CustomerDetails?.[0]?.CustSuppName || table2Data?.CustSuppName || - '', + "", customerMobile: - table2Data?.CustomerDetails?.[0]?.MobileNo || table2Data?.MobileNo || '', + table2Data?.CustomerDetails?.[0]?.MobileNo || table2Data?.MobileNo || "", customerGSTIN: table2Data?.CustomerDetails?.[0]?.CustGSTNo || table2Data?.CustGSTIN || - '', + "", customerAddress: { - address1: table2Data?.CustomerDetails?.[0]?.Address1 || '', - address2: table2Data?.CustomerDetails?.[0]?.Address2 || '', - state: table2Data?.CustomerDetails?.[0]?.State || '', + address1: table2Data?.CustomerDetails?.[0]?.Address1 || "", + address2: table2Data?.CustomerDetails?.[0]?.Address2 || "", + state: table2Data?.CustomerDetails?.[0]?.State || "", }, // Product Details - mapped from A4Standard productDetails @@ -167,7 +167,7 @@ const TaxInvoice = ({ taxAmount: Number(OrderDetailGST), grandTotal: Number(table2Data?.NetAmount || table2Data?.GrandTotal), totalBillAmount: Number( - table2Data?.BillAmount || table2Data?.NetAmount || 0 + table2Data?.BillAmount || table2Data?.NetAmount || 0, ), // Bank Details - mapped from A4Standard bankDetails: table2Data?.BankDetails?.[0] || null, @@ -176,31 +176,31 @@ const TaxInvoice = ({ let PageSize = printDatas?.PageSize; const TakeawayData = table2Data?.productDetails?.filter( - (item) => item.BookingTypeName?.toLowerCase() === 'takeaway' + (item) => item.BookingTypeName?.toLowerCase() === "takeaway", ); const DineInData = table2Data?.productDetails?.filter( - (item) => item.BookingTypeName?.toLowerCase() === 'dine in' + (item) => item.BookingTypeName?.toLowerCase() === "dine in", ); let PaymentStatusSuccess = PaymentStatus?.filter( - (ps) => ps.PaymentStatus === 'S' + (ps) => ps.PaymentStatus === "S", ); // Calculate GST/IGST totals const cgstTotal = OrderDetailGST && OrderDetailGST.length > 0 ? Number( - OrderDetailGST?.reduce((sum, item) => sum + (item.CGST || 0), 0) + OrderDetailGST?.reduce((sum, item) => sum + (item.CGST || 0), 0), )?.toFixed(2) : 0; const sgstTotal = OrderDetailGST && OrderDetailGST.length > 0 ? Number( - OrderDetailGST?.reduce((sum, item) => sum + (item.SGST || 0), 0) + OrderDetailGST?.reduce((sum, item) => sum + (item.SGST || 0), 0), )?.toFixed(2) : 0; const igstTotal = OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( - OrderDetailIGST?.reduce((sum, item) => sum + (item.TaxAmt || 0), 0) + OrderDetailIGST?.reduce((sum, item) => sum + (item.TaxAmt || 0), 0), )?.toFixed(2) : 0; @@ -217,39 +217,39 @@ const TaxInvoice = ({ cgstTotal, sgstTotal, igstTotal, - 'roundoff vaules' + "roundoff vaules", ); function RoundOffFun(amount) { const roundedAmount = Math.round(amount); const roundOffValue = parseFloat((roundedAmount - amount).toFixed(2)); // const symbol = roundOffValue > 0 ? '+' : ''; // Add "+" symbol for positive values ${symbol} console.log( - 'Rounded Amount:', + "Rounded Amount:", roundedAmount, - 'Round Off Value:', - roundOffValue + "Round Off Value:", + roundOffValue, ); return `${roundOffValue.toFixed(2)}`; } - console.log('=== DEBUG INFO ==='); - console.log('table2Data?.productDetails:', table2Data?.productDetails); - console.log('GlobaldummyData:', GlobaldummyData); - console.log('TakeawayData:', TakeawayData); - console.log('DineInData:', DineInData); - console.log('PageSize:', PageSize); + console.log("=== DEBUG INFO ==="); + console.log("table2Data?.productDetails:", table2Data?.productDetails); + console.log("GlobaldummyData:", GlobaldummyData); + console.log("TakeawayData:", TakeawayData); + console.log("DineInData:", DineInData); + console.log("PageSize:", PageSize); // Allow up to 10 items per page const chunkSize = - table2Data?.OrderType !== 'E' + table2Data?.OrderType !== "E" ? isMobile ? 7 - : PageSize == 'A5' + : PageSize == "A5" ? 9 : 8 : isMobile ? 10 - : PageSize == 'A5' + : PageSize == "A5" ? 12 : 11; let dataSource = []; @@ -263,12 +263,12 @@ const TaxInvoice = ({ } console.log( - 'Final DataSource:', + "Final DataSource:", dataSource, - 'Length:', + "Length:", dataSource.length, - 'ChunkSize:', - chunkSize + "ChunkSize:", + chunkSize, ); const paginatedChunks = []; @@ -296,24 +296,24 @@ const TaxInvoice = ({ paginatedChunks.push([]); // Empty chunk for footer-only page } console.log( - 'Paginated Chunks:', + "Paginated Chunks:", paginatedChunks.length, - 'Chunks:', - paginatedChunks.map((chunk, i) => `Chunk ${i}: ${chunk.length} items`) + "Chunks:", + paginatedChunks.map((chunk, i) => `Chunk ${i}: ${chunk.length} items`), ); - console.log('Should footer be on new page:', shouldFooterBeOnNewPage); + console.log("Should footer be on new page:", shouldFooterBeOnNewPage); return (
{paginatedChunks?.map((dataChunk, chunkIndex) => ( @@ -322,16 +322,16 @@ const TaxInvoice = ({ className={ isMobile ? `invoice-wrapper container pdf-page` - : `invoice-wrapper container print-chunk${chunkIndex > 0 ? ' print-page-break' : ''}` + : `invoice-wrapper container print-chunk${chunkIndex > 0 ? " print-page-break" : ""}` } style={{ - display: 'flex', - flexDirection: 'column', + display: "flex", + flexDirection: "column", // justifyContent: ((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) ? "space-between" : "", - height: isMobile ? '275mm' : PageSize == 'A5' ? '130mm' : '245mm', - marginBottom: '0', + height: isMobile ? "275mm" : PageSize == "A5" ? "130mm" : "245mm", + marginBottom: "0", pageBreakAfter: - chunkIndex < paginatedChunks.length - 1 ? 'always' : 'auto', + chunkIndex < paginatedChunks.length - 1 ? "always" : "auto", }} > {renderInvoiceContent(dataChunk, chunkIndex)} @@ -343,7 +343,7 @@ const TaxInvoice = ({ function renderInvoiceContent(dataChunk, chunkIndex) { console.log( `Rendering page ${chunkIndex + 1}, chunk has ${dataChunk.length} items:`, - dataChunk + dataChunk, ); const isFirstPage = chunkIndex === 0; @@ -355,7 +355,7 @@ const TaxInvoice = ({ paginatedChunks.length - 1 - (shouldFooterBeOnNewPage ? 1 : 0); const shouldShowTaxDetails = isLastDataChunk && dataChunk.length > 0; console.log( - `Page ${chunkIndex + 1}: isFirstPage=${isFirstPage}, isLastPage=${isLastPage}, isFooterOnlyPage=${isFooterOnlyPage},datachunkslength=${dataChunk.length}` + `Page ${chunkIndex + 1}: isFirstPage=${isFirstPage}, isLastPage=${isLastPage}, isFooterOnlyPage=${isFooterOnlyPage},datachunkslength=${dataChunk.length}`, ); return ( @@ -365,26 +365,26 @@ const TaxInvoice = ({ <>
-

- {table2Data?.OrderType === 'E' - ? 'Estimate' +

+ {table2Data?.OrderType === "E" + ? "Estimate" : BillName ? BillName - : 'TAX INVOICE'} + : "TAX INVOICE"}

-
- {ReprintType == 'Duplicate' - ? '(DUPLICATE FOR RECIPIENT)' - : '(ORIGINAL FOR RECIPIENT)'} +
+ {ReprintType == "Duplicate" + ? "(DUPLICATE FOR RECIPIENT)" + : "(ORIGINAL FOR RECIPIENT)"}
@@ -392,54 +392,54 @@ const TaxInvoice = ({ )} {/* Main Container - Always show */} -
+
{/* Top Section - Company and Invoice Details - Only on first page */} {isFirstPage && ( -
+
{/* Left - Company Details */}
- {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( - '' + {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( + "" ) : (
{invoiceData.companyName}
-
+
{invoiceData.companyspecname}
{invoiceData.companyAddress.address1}
{invoiceData.companyAddress.address2}
- {invoiceData.companyAddress.city}{' '} + {invoiceData.companyAddress.city}{" "} {invoiceData.companyAddress.zip ? ` - ${invoiceData.companyAddress.zip}` - : ''} + : ""}
{invoiceData.companyAddress.state}
{invoiceData.companyGSTIN && ( -
+
GSTIN/UIN: {invoiceData.companyGSTIN}
)} @@ -452,7 +452,7 @@ const TaxInvoice = ({ Mobile: +91 {invoiceData.companyMobile} {invoiceData.companyMobile2 ? `, ${invoiceData.companyMobile2}` - : ''} + : ""}
)}
@@ -460,16 +460,16 @@ const TaxInvoice = ({ {/* Buyer Details */}
-
Buyer (Bill to)
-
+
Buyer (Bill to)
+
{invoiceData.customerName}
{invoiceData.customerAddress.address1 && ( @@ -481,11 +481,12 @@ const TaxInvoice = ({ {invoiceData.customerMobile && (
Mobile: {invoiceData.customerMobile}
)} - {(invoiceData.customerGSTIN && table2Data?.OrderType !== 'E') && ( -
- GSTIN/UIN: {invoiceData.customerGSTIN} -
- )} + {invoiceData.customerGSTIN && + table2Data?.OrderType !== "E" && ( +
+ GSTIN/UIN: {invoiceData.customerGSTIN} +
+ )} {invoiceData.customerAddress.state && (
State Name: {invoiceData.customerAddress.state}
)} @@ -493,29 +494,29 @@ const TaxInvoice = ({
{/* Right - Invoice Details */} -
+
{/* Invoice No and Date */}
-
Invoice No.
-
+
Invoice No.
+
{invoiceData.invoiceNo}
Dated
-
+
{invoiceData.invoiceDate}
@@ -524,31 +525,31 @@ const TaxInvoice = ({ {/* Delivery Note and Payment Terms */}
-
Delivery Note
+
Delivery Note
-
Mode/Terms of Payment
+
Mode/Terms of Payment
@@ -556,31 +557,31 @@ const TaxInvoice = ({ {/* Reference and Other References */}
-
Reference No. & Date
+
Reference No. & Date
-
Other References
+
Other References
@@ -588,60 +589,60 @@ const TaxInvoice = ({ {/* Buyer's Order */}
-
Buyer's Order No.
+
Buyer's Order No.
-
Dated
+
Dated
{/* Dispatch Details */}
-
Dispatch Doc No.
+
Dispatch Doc No.
-
Delivery Note Date
+
Delivery Note Date
@@ -649,26 +650,26 @@ const TaxInvoice = ({ {/* Dispatched through and Destination */}
-
Dispatched through
+
Dispatched through
-
+
Destination
@@ -678,12 +679,12 @@ const TaxInvoice = ({ {/* Terms of Delivery */}
-
Terms of Delivery
+
Terms of Delivery
@@ -694,15 +695,15 @@ const TaxInvoice = ({ {!isFirstPage && (
-

- {isFooterOnlyPage ? 'Tax Invoice' : 'Tax Invoice '} +

+ {isFooterOnlyPage ? "Tax Invoice" : "Tax Invoice "}

-
+
Invoice No: {invoiceData.invoiceNo}
@@ -713,67 +714,67 @@ const TaxInvoice = ({
{/* Table Header */}
SL.No
Description of Goods
HSN/SAC
Quantity
Rate
{/*
per
*/} -
+
Amount
@@ -785,102 +786,102 @@ const TaxInvoice = ({
{chunkIndex * chunkSize + index + 1}
- {item.ProdName || 'Product Name'} + {item.ProdName || "Product Name"}
{item.BrandName && (
- {item.BrandName}{' '} + {item.BrandName}{" "}
)} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( (items) => - items.SerialNumber && items.SerialNumber !== '' + items.SerialNumber && items.SerialNumber !== "", )?.map((a, i) => (
{a.SerialNumber}
)) - : ''} + : ""} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( - (id) => id.IMEI1 !== '' || id.IMEI2 !== '' + (id) => id.IMEI1 !== "" || id.IMEI2 !== "", )?.map((id, i) => { - const imei1 = id.IMEI1 || ''; - const imei2 = id.IMEI2 || ''; + const imei1 = id.IMEI1 || ""; + const imei2 = id.IMEI2 || ""; return (
- {[imei1, imei2].filter(Boolean).join(',')} + {[imei1, imei2].filter(Boolean).join(",")}
); }) - : ''} + : ""}
- {item.HSN || ''} + {item.HSN || ""}
- {item.SalesQty || 1} {item.UomName || 'NOS'} + {item.SalesQty || 1} {item.UomName || "NOS"}
{Number( - table2Data?.OrderType !== 'E' + table2Data?.OrderType !== "E" ? item.Rate - item.ProdTaxAmt - : item.Rate || 0 - ).toLocaleString('en-IN', { + : item.Rate || 0, + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, })} @@ -888,17 +889,17 @@ const TaxInvoice = ({ {/*
{item.UomName || 'NOS'}
*/}
{Number( - table2Data?.OrderType !== 'E' + table2Data?.OrderType !== "E" ? item.WithoutTaxRate - : item.TotalAmt || 0 - ).toLocaleString('en-IN', { + : item.TotalAmt || 0, + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, })} @@ -911,150 +912,150 @@ const TaxInvoice = ({ {/* Total without tax amount */}
-
+
-
-
-
+
+
+
{/*
*/}
- ₹{' '} + ₹{" "} {Number( - table2Data?.OrderType !== 'E' + table2Data?.OrderType !== "E" ? invoiceData?.totalBillAmount - : invoiceData?.grandTotal - ).toLocaleString('en-IN', { + : invoiceData?.grandTotal, + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
- {table2Data?.OrderType !== 'E' && ( + {table2Data?.OrderType !== "E" && ( <> {/* CGST */} {OrderDetailGST && OrderDetailGST.length > 0 && ( <>
CGST
{/*
*/}
{OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
{/* SGST */}
SGST
{/*
*/}
{OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.SGST || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
@@ -1063,54 +1064,54 @@ const TaxInvoice = ({ {OrderDetailIGST && OrderDetailIGST.length > 0 && (
IGST
{/*
*/}
{OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
)} @@ -1119,34 +1120,34 @@ const TaxInvoice = ({ {/* Rounding Off */}
-
+
ROUNDING OFF
-
-
-
+
+
+
{/*
*/} -
+
{RoundOffFun( - table2Data?.OrderType !== 'E' + table2Data?.OrderType !== "E" ? roundOffValue - : roundOffEstimateValue + : roundOffEstimateValue, )}
@@ -1156,61 +1157,61 @@ const TaxInvoice = ({
 
 
 
 
 
{/*
 
*/}
 
@@ -1219,60 +1220,60 @@ const TaxInvoice = ({ {/* Total */}
-
+
Total
-
+
{totalQuantity || invoiceData.productDetails?.reduce( (sum, item) => sum + (item.SalesQty || 0), - 0 + 0, ) || - 0}{' '} + 0}{" "} NOS
-
+
{/*
*/}
- ₹{' '} + ₹{" "} {Number(invoiceData.grandTotal).toLocaleString( - 'en-IN', + "en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, - } + }, )}
@@ -1283,71 +1284,71 @@ const TaxInvoice = ({ // Show empty row when no data
-
No items to display
-
-
-
-
-
+
-
@@ -1362,83 +1363,83 @@ const TaxInvoice = ({ {/* Amount in Words */}
-
+
Amount Chargeable (in words)
-
+
INR {numberToWords(Math.floor(invoiceData.grandTotal))} Only

E. & O.E

- {table2Data?.OrderType !== 'E' && ( + {table2Data?.OrderType !== "E" && ( <> {/* Tax Breakdown Table */} -
+
{OrderDetailGST && OrderDetailGST.length > 0 ? ( <> {/* Tax Table Header - Main Headers */}
HSN/SAC
Taxable Value
CGST
SGST/UTGST
Tax Amount
@@ -1447,64 +1448,64 @@ const TaxInvoice = ({ {/* Tax Table Sub-Headers */}
Rate
Amount
Rate
Amount
@@ -1513,94 +1514,94 @@ const TaxInvoice = ({
- {taxItem.HSN || ''} + {taxItem.HSN || ""}
{Number( - taxItem.WithOutTaxAmount || 0 - ).toLocaleString('en-IN', { + taxItem.WithOutTaxAmount || 0, + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
{taxItem.TaxPercentage - ? taxItem.TaxPercentage / 2 + '%' - : '0%'} + ? taxItem.TaxPercentage / 2 + "%" + : "0%"}
{Number(taxItem.CGST || 0).toLocaleString( - 'en-IN', + "en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, - } + }, )}
{taxItem.TaxPercentage - ? taxItem.TaxPercentage / 2 + '%' - : '0%'} + ? taxItem.TaxPercentage / 2 + "%" + : "0%"}
{Number(taxItem.SGST || 0).toLocaleString( - 'en-IN', + "en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, - } + }, )}
-
+
{Number( - (taxItem.CGST || 0) + (taxItem.SGST || 0) - ).toLocaleString('en-IN', { + (taxItem.CGST || 0) + (taxItem.SGST || 0), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, })} @@ -1609,27 +1610,27 @@ const TaxInvoice = ({ ))}
Total
{OrderDetailGST && OrderDetailGST.length > 0 @@ -1637,81 +1638,81 @@ const TaxInvoice = ({ OrderDetailGST?.reduce( (sum, item) => sum + (item.WithOutTaxAmount || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
{OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
{OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.SGST || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
{OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0) + (item.SGST || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
@@ -1720,41 +1721,41 @@ const TaxInvoice = ({ {/* Tax Table Header - Main Headers */}
HSN/SAC
Taxable Value
IGST
Tax Amount
@@ -1762,47 +1763,47 @@ const TaxInvoice = ({ {/* Tax Table Sub-Headers */}
Rate
Amount
{/* Tax Table Rows - Dynamic from OrderDetailGST */} @@ -1810,97 +1811,97 @@ const TaxInvoice = ({
- {taxItem.HSN || ''} + {taxItem.HSN || ""}
{Number( - taxItem.WithOutTaxAmount || 0 - ).toLocaleString('en-IN', { + taxItem.WithOutTaxAmount || 0, + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
{taxItem.TaxPercentage - ? taxItem.TaxPercentage + '%' - : '0%'} + ? taxItem.TaxPercentage + "%" + : "0%"}
{Number(taxItem.TaxAmt || 0).toLocaleString( - 'en-IN', + "en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, - } + }, )}
-
+
{Number(taxItem.TaxAmt || 0).toLocaleString( - 'en-IN', + "en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, - } + }, )}
- ))}{' '} + ))}{" "}
Total
{OrderDetailIGST && OrderDetailIGST.length > 0 @@ -1908,55 +1909,55 @@ const TaxInvoice = ({ OrderDetailIGST?.reduce( (sum, item) => sum + (item.WithOutTaxAmount || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
{OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
{OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0 - ) - ).toLocaleString('en-IN', { + 0, + ), + ).toLocaleString("en-IN", { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : '0.00'} + : "0.00"}
@@ -1965,50 +1966,50 @@ const TaxInvoice = ({ {/* Tax Table Header - Main Headers */}
HSN/SAC
Taxable Value
CGST
SGST/UTGST
Tax Amount
@@ -2017,199 +2018,199 @@ const TaxInvoice = ({ {/* Tax Table Sub-Headers */}
Rate
Amount
Rate
Amount
-
0.00
0%
0.00
0%
0.00
-
+
0.00
{/* Tax Table Total */}
Total
- {'0.00'} + {"0.00"}
- {'0.00'} + {"0.00"}
- {'0.00'} + {"0.00"}
- {'0.00'} + {"0.00"}
@@ -2219,31 +2220,31 @@ const TaxInvoice = ({ {/* Tax Amount in Words */}
- Tax Amount (in words):{' '} - - INR{' '} + Tax Amount (in words):{" "} + + INR{" "} {numberToWords( Math.floor( invoiceData.taxAmount || OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0) + (item.SGST || 0), - 0 + 0, ) || Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0 - ) + 0, + ), ) || - 0 - ) - )}{' '} + 0, + ), + )}{" "} Only
@@ -2252,29 +2253,33 @@ const TaxInvoice = ({ )} {/* Bank Details and Signature */}
- {/* Declaration */}
Declaration @@ -2286,73 +2291,73 @@ const TaxInvoice = ({
- {/* Signature Section */}
{/* Bank Details */}
- {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( - '' + {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( + "" ) : ( -
+
Company's Bank Details
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( - '' + {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( + "" ) : (
A/c Holder's Name: - - {' '} + + {" "} {invoiceData.companyName}
Bank Name: - - {' '} - {invoiceData.bankDetails?.BankName || ''} + + {" "} + {invoiceData.bankDetails?.BankName || ""}
- A/c No.:{' '} - - {invoiceData.bankDetails?.AccountNo || ''} + A/c No.:{" "} + + {invoiceData.bankDetails?.AccountNo || ""}
- Branch & IFS Code:{' '} - - {invoiceData.bankDetails?.BankBranch || ''} &{' '} - {invoiceData.bankDetails?.IFSCCode || ''} + Branch & IFS Code:{" "} + + {invoiceData.bankDetails?.BankBranch || ""} &{" "} + {invoiceData.bankDetails?.IFSCCode || ""}
{invoiceData.bankDetails?.SWIFTCode && (
- + SWIFT Code: - - {' '} - {invoiceData.bankDetails?.SWIFTCode || ''} + + {" "} + {invoiceData.bankDetails?.SWIFTCode || ""}
)} @@ -2361,21 +2366,21 @@ const TaxInvoice = ({
- {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( - '' + {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( + "" ) : (
for {invoiceData.companyName} @@ -2383,28 +2388,28 @@ const TaxInvoice = ({ )}
{/*
DD
@@ -2412,7 +2417,7 @@ const TaxInvoice = ({
ELECTRONICS
*/}
-
+
Authorised Signatory
@@ -2427,9 +2432,9 @@ const TaxInvoice = ({ {isLastPage && (
This is a Computer Generated Invoice
diff --git a/src/Pages/Preference/PreferenceList.jsx b/src/Pages/Preference/PreferenceList.jsx index a966c06..06142d0 100644 --- a/src/Pages/Preference/PreferenceList.jsx +++ b/src/Pages/Preference/PreferenceList.jsx @@ -750,7 +750,16 @@ const PreferenceList = () => { {renderCheckbox('scanlayout', 'Do you Want Scan Layout Page?')}
-
+ +
+
+
{ icon={} />
-
-
+
); diff --git a/src/Pages/Preference/PreferenceList.scss b/src/Pages/Preference/PreferenceList.scss index a99d800..4f7302a 100644 --- a/src/Pages/Preference/PreferenceList.scss +++ b/src/Pages/Preference/PreferenceList.scss @@ -1,12 +1,12 @@ .preferences-list { - max-height: 84vh; + max-height: 75vh; overflow-y: auto; background: #fff; width: 100%; scrollbar-width: thin; scroll-behavior: smooth; border-radius: 12px; - padding-bottom: 4rem; + padding-bottom: 3rem; .preference-headers { font-size: 1.2rem; @@ -41,7 +41,7 @@ } .ant-form-item { - margin-bottom: 1.2rem; + margin-bottom: 1rem; } .ant-checkbox-wrapper, @@ -49,11 +49,6 @@ margin-right: 1rem; } - .ant-btn { - margin-top: 2rem; - float: right; - } - // Optional: Scrollbar for long modals &::-webkit-scrollbar { width: 6px; @@ -89,7 +84,7 @@ padding: 10px 0; > div { - font-family: 'Poppins'; + font-family: "Poppins"; font-weight: 400; font-size: 14px; margin: 4px 0; @@ -154,3 +149,13 @@ } } } +.PreferencesBTN { + display: flex; + align-items: flex-start; + justify-content: flex-end; + width: 100%; + margin-top: 1rem; + .primary_Button { + width: 200px !important; + } +} diff --git a/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss b/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss index 481d7cb..1014ca4 100644 --- a/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss +++ b/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss @@ -325,7 +325,7 @@ } .CategoryHorizontalNew { - padding: 1rem 1rem; + padding: 10px 10px; font-family: 'Inter', sans-serif; display: flex; align-items: center; diff --git a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss index 4e4645d..02b1696 100644 --- a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss +++ b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss @@ -116,7 +116,7 @@ .CustomerActions { display: flex; align-items: center; - gap: 0.1rem; + gap: 0.3rem; .RiVerifiedBadgeFill { transition: all 0.2s ease-in-out; diff --git a/src/Styles/Reports/KOT/kot.scss b/src/Styles/Reports/KOT/kot.scss index 4aa8107..fe9faa2 100644 --- a/src/Styles/Reports/KOT/kot.scss +++ b/src/Styles/Reports/KOT/kot.scss @@ -71,7 +71,7 @@ .kot-date { display: flex; font-size: 14px; - font-family: 'Gilroy'; + font-family: "Gilroy"; font-weight: 500; border-radius: 5px; color: #212529 !important; @@ -122,7 +122,7 @@ right: 0; } .ant-segmented-item-label { - font-family: 'Poppins'; + font-family: "Poppins"; font-size: 12px !important; } .ant-segmented-item-selected { @@ -134,9 +134,7 @@ } } -.kot-search-dev - :where(.css-dev-only-do-not-override-2i2tap).ant-segmented - .ant-segmented-group { +.kot-search-dev :where(.css-dev-only-do-not-override-2i2tap).ant-segmented .ant-segmented-group { position: relative; display: flex; //srinath @@ -149,9 +147,7 @@ rgba(0, 0, 0, 0.3) 0px 3px 7px -3px; } -.kot-search-dev - :where(.css-dev-only-do-not-override-2i2tap).ant-segmented - .ant-segmented-item-selected { +.kot-search-dev :where(.css-dev-only-do-not-override-2i2tap).ant-segmented .ant-segmented-item-selected { background-color: #ffffff; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03), @@ -168,6 +164,13 @@ margin: 12px 0 12px 0; height: 70vh; overflow: scroll; + + .ant-table-thead { + background-color: #2c88ee !important; + } + .ant-table-cell { + padding: 6px !important; + } @media (max-width: 768px) { height: 60vh; scrollbar-width: thin; @@ -179,7 +182,7 @@ } table { tbody { - font-family: 'Poppins'; + font-family: "Poppins"; > tr:nth-child(even) { background-color: #b4b4b4; } @@ -221,7 +224,7 @@ transition: all 0.2s ease; min-width: 70px; text-align: center; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; color: #fff; -webkit-text-stroke-width: 0.1px;