Android_Retail/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle11.jsx

2590 lines
110 KiB
JavaScript

import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import QRcode from '../../../Images/QRcode.png';
import Logo from '../../../Images/Logo.jpg';
import {
extractLastNumber,
extractLastNumberOrderId,
} from '../../../Services/Others';
import {
GlobalprintSlNo,
GlobalprintItem,
GlobalprintMRP,
GlobalprintDiscount,
GlobalprintQuantity,
GlobalprintRate,
GlobalprintAmount,
GlobalprintHsnCode,
GlobalprintQrcodet,
GlobalPritdummyData,
GloabalFieldDetails,
changeReprintDataFound,
GlobalprintSignature,
GlobalprinttermsAndConditions,
GlobalSignatureImage,
Globalnotes,
GlobalthemeFormat,
GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
import QRCode from 'react-qr-code';
import signature from '../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
const PurchaseOrdStyle11 = ({
index,
ExtraChargeTotal,
Date1,
base64Image,
totalQuantityFilter,
BranchCity,
BranchZip,
CashierName,
totalQuantity,
OrderDetailGST,
OrderDetailIGST,
OrderDetailVAT,
table2Data,
PaymentStatus,
PrintGreeting,
printDatas,
}) => {
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
// const FieldDetails = useSelector(GloabalFieldDetails);
const FieldDetails = printDatas?.FieldDetails?.reduce((acc, item) => {
acc[item.ConfigName] = true;
return acc;
}, {});
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
const MRP = FieldDetails?.['MRP'];
const Discount = FieldDetails?.['Discount'];
const Quantity = FieldDetails?.['Quantity'];
const Rate = FieldDetails?.['Rate'];
const Amount = FieldDetails?.['Amount'];
const HsnCode = FieldDetails?.['HsnCode'];
const Qrcodet = FieldDetails?.['Qrcode'];
const GlobalSlNo = useSelector(GlobalprintSlNo);
const GlobalItem = useSelector(GlobalprintItem);
const GlobalMRP = useSelector(GlobalprintMRP);
const GlobalDiscount = useSelector(GlobalprintDiscount);
const GlobalQuantity = useSelector(GlobalprintQuantity);
const GlobalRate = useSelector(GlobalprintRate);
const GlobalAmount = useSelector(GlobalprintAmount);
const GlobalHsnCode = useSelector(GlobalprintHsnCode);
const GlobalQrcodet = useSelector(GlobalprintQrcodet);
const GlobaldummyData = useSelector(GlobalPritdummyData);
const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
const GlobalIsnotes = useSelector(Globalnotes);
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
const GlobalBilltext = useSelector(GlobalBillName);
const appPreferences = useSelector(ApplicationPreferences);
const bookingTypePreference = appPreferences?.find(
(preference) => preference?.PreferredCatName === 'Booking Type'
)?.PreferenceCatDetails;
const dinePreference = bookingTypePreference?.find(
(type) =>
type?.PreferredSubCatName?.toLowerCase() === 'dine in' &&
type?.PreferredStatus === 'Y'
);
const takeAwayPreference = bookingTypePreference?.find(
(type) =>
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
type?.PreferredStatus === 'Y'
);
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
let Notestext = printDatas?.Notes;
let BillName = printDatas?.PrintHdrName;
let FormatTheme = printDatas?.PrintType == 'S' ? true : false;
let PageSize = printDatas?.PageSize;
const Signature = FieldDetails?.['signature'];
const TermsnAdCondition = FieldDetails?.['terms&conditions'];
const keysLength = Object.keys(table2Data ?? {}).length;
let PaymentStatusSuccess = PaymentStatus?.filter(
(ps) => ps.PaymentStatus === 'S'
);
if (keysLength > 0) {
dispatch(changeReprintDataFound(true));
}
const productsData = table2Data?.productDetails || [];
const chunkSize = isMobile ? 10 : PageSize == 'A5' ? 8 : 11;
let dataSource = [];
if (GlobaldummyData || productsData?.length > 0) {
dataSource = GlobaldummyData ? productsData : productsData;
} else {
dataSource = productsData;
}
// Paginate the data
const paginatedChunks = [];
for (let i = 0; i < dataSource.length; i += chunkSize) {
paginatedChunks.push(dataSource.slice(i, i + chunkSize));
}
const lastChunkRows =
paginatedChunks.length > 0
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage =
lastChunkRows > (isMobile ? 10 : PageSize == 'A5' ? 5 : 10);
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return (
<>
{FormatTheme ? (
<div
className="PrintStyle11MasterDiv"
id={`PrintStyle11`}
style={{
fontFamily: "'Courier New', Courier, monospace",
position: 'relative',
width: '100%',
minHeight: isMobile
? PageSize === 'A5'
? '210mm'
: '297mm'
: 'auto',
}}
>
{paginatedChunks.map((dataChunk, chunkIndex) => (
// <div className={`container print-chunk${chunkIndex > 0 ? ' print-page-break' : ''}`} style={{ display: "flex", flexDirection: "column", justifyContent: ((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme ? "space-between" : "", height: FormatTheme ? PageSize == "A5" ? '170mm' : "257mm" : "", }} key={chunkIndex}>
<div
className={
isMobile
? `invoice-wrapper container pdf-page`
: `container print-chunk${chunkIndex > 0 ? ' print-page-break' : ''}`
}
style={{
display: 'flex',
flexDirection: 'column',
justifyContent:
chunkIndex === paginatedChunks.length - 1 &&
shouldFooterBeOnNewPage &&
FormatTheme
? 'space-between'
: '',
height: FormatTheme
? PageSize == 'A5'
? '170mm'
: isMobile
? '257mm'
: '257mm'
: '',
}}
key={chunkIndex}
>
{/* <div className="header" style={{ position: GlobaldummyData ? "absolute" : "fixed", top: 0, width: "100%" }}> */}
<div
className="header"
style={{
position: isMobile
? GlobaldummyData
? 'absolute'
: 'fixed'
: '',
top: 0,
width: '100%',
}}
>
<div className="PrintStyle11-print" style={{ ...headerStyle }}>
{base64Image ? (
<img
className="PrintStyle11-BrandImage"
src={GlobaldummyData ? Logo : base64Image}
alt="image"
style={{ width: '40px', height: '40px' }}
/>
) : null}
<div>
<div
style={{
fontWeight: '600',
// fontFamily: "Lemon",
fontSize: 'clamp(1rem, 2.5vw, 2.5rem)',
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
</div>
{/* <div style={{ fontWeight: '600', fontFamily: 'monospace', fontSize: 'clamp(0.5rem, 2.5vw, 1.5rem)' }}>
Save green | Save nature
</div> */}
</div>
</div>
<hr style={{ margin: '0.1rem 0rem' }} />
<div className="PrintStyle11-print-SecondDiv">
<div style={{ fontSize: '12px', fontWeight: '600' }}>
{GlobaldummyData
? 'BranchAddress, Town- 635XXX City - State'
: (table2Data?.AddressDetails?.[0]?.Address1 || '') +
(table2Data?.AddressDetails?.[0]?.City
? (table2Data?.AddressDetails?.[0]?.Address1 &&
table2Data?.AddressDetails?.[0]?.City
? '-'
: '') + table2Data?.AddressDetails?.[0]?.City
: '') +
(table2Data?.AddressDetails?.[0]?.Zip
? (table2Data?.AddressDetails?.[0]?.City &&
table2Data?.AddressDetails?.[0]?.Zip
? '-'
: '') + table2Data?.AddressDetails?.[0]?.Zip
: '')}
</div>
<div style={{ fontSize: '11px', fontWeight: '600' }}>
{' '}
MOBILE NO :{table2Data?.BrMobile}
</div>
</div>
<hr style={{ margin: '0.1rem 0rem' }} />
<div
style={{
margin: '0rem 0.5rem',
display: 'flex',
justifyContent: 'center',
fontWeight: '600',
textTransform: 'capitalize',
}}
className="PrintStyle11-print-BillNO"
>
{GlobaldummyData
? 'CASH'
: BillName
? BillName
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName
: ''}{' '}
</div>
<div
style={{
margin: '0rem 0.5rem',
fontSize: '14px',
fontWeight: '600',
}}
className="PrintA4Style11-print-BillNO"
>
Bill No :{' '}
{GlobaldummyData
? '553'
: table2Data?.OrderId &&
extractLastNumberOrderId(
table2Data?.OrderId,
table2Data?.FYStatus
)}
</div>
<hr className="PrintStyle11-print-dottline" />
</div>
<div
style={{ marginTop: GlobaldummyData ? '9rem' : '0rem' }}
className="print-body"
>
{
<>
{/* {takeAwayPreference && <div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center", fontSize: "12px", fontWeight: "600" }}>Take Away</div>} */}
<table className="PrintStyle11-print-table">
<thead>
<tr style={{ ...tableHeaderStyle }}>
{SLNO && (
<th style={{ width: '10px', ...tableHeaderStyle }}>
SL.NO
</th>
)}
{Item && (
<th style={{ width: '10px', ...tableHeaderStyle }}>
Item
</th>
)}
{Quantity && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Qty
</th>
)}
{HsnCode && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
HSN
</th>
)}
{MRP && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
MRP
</th>
)}
{Discount && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Dis{' '}
</th>
)}
{Rate && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Rate
</th>
)}
{Amount && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Amt
</th>
)}
</tr>
</thead>
<tbody>
{dataSource?.map((item, index) => {
return (
<tr
key={index}
style={{
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{SLNO && <td>{index + 1}</td>}
{Item && (
<td
style={{
display: 'flex',
flexDirection: 'column',
}}
>
<div>{item?.ProdName}</div>
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
? item?.UomName
: 'COMBO'}
)
{item?.BrandName !== null
? item?.BrandName
: ''}
&nbsp;
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
items.SerialNumber == '' ||
items.SerialNumber == null
)
)?.map((a) => {
return (
<div key={a.SerialNumber}>
{a.SerialNumber}
</div>
);
})
: ''}{' '}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(item1) =>
item1.IMEI1 !== '' ||
item1.IMEI2 !== ''
)?.map((item2, idx) => {
const imei1 = item2.IMEI1 || '';
const imei2 = item2.IMEI2 || '';
return (
<div key={idx}>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
</div>
);
})
: ''}
</div>
</td>
)}
{Quantity && (
<td style={{ textAlign: 'right' }}>
{item?.SalesQty}
</td>
)}
{HsnCode && (
<td style={{ textAlign: 'right' }}>
{item?.HSN}
</td>
)}
{MRP && (
<td style={{ textAlign: 'right' }}>
{item?.SinglePc === 'Y'
? item?.Rate
: item?.MRP}
</td>
)}
{Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
</td>
)}
{Rate && (
<td style={{ textAlign: 'right' }}>
{item?.Rate}
</td>
)}
{Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
</td>
)}
</tr>
);
})}
</tbody>
</table>
</>
}
</div>
{chunkIndex === paginatedChunks.length - 1 &&
!shouldFooterBeOnNewPage &&
FormatTheme && (
<>
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-ThirdDiv">
<div>
<div className="PrintStyle11-print-ThirdDivSub">
<div
style={{ display: 'flex', flexDirection: 'column' }}
></div>
<div
style={{
textAlign: 'right',
display: 'flex',
flexDirection: 'column',
fontSize: '13px',
fontWeight: '500',
}}
></div>
</div>
</div>
</div>
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-ThirdDiv2">
<div style={{ width: '45%', padding: '0rem 8rem' }}>
<div
className="PrintStyle11-print-TotalGST"
style={{
fontSize: 'clamp(0.8rem, 2.5vw, 1.4rem)',
fontWeight: '600',
}}
>
<div>
{((OrderDetailGST?.length > 0 &&
OrderDetailGST?.[0]?.TaxAmt > 0) ||
(OrderDetailIGST?.length > 0 &&
OrderDetailIGST?.[0]?.TaxAmt > 0) ||
(OrderDetailVAT?.length > 0 &&
OrderDetailVAT?.[0]?.TaxAmt > 0)) && (
<>
<hr style={{ margin: '0.5rem 0rem' }} />
<div>
<p
style={{
margin: 0,
padding: 0,
fontSize: '15px',
textAlign: 'center',
fontWeight: '600',
}}
>
--------- GST Breakup Details -----------
</p>
{OrderDetailGST?.length > 0 &&
OrderDetailGST?.[0]?.TaxAmt > 0 && (
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
CGST (
{OrderDetailGST?.[0]
?.TaxPercentage / 2}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
SGST (
{OrderDetailGST?.[0]
?.TaxPercentage / 2}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
Total Amount
</td>
</tr>
{OrderDetailGST?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(
item.WithOutTaxAmount
).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.CGST).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.SGST).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
)}
{OrderDetailIGST?.length > 0 &&
OrderDetailIGST?.[0]?.TaxAmt > 0 && (
<>
<div
style={{
border: '0.01px dashed black',
width: '90%',
}}
></div>
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
IGST (
{
OrderDetailIGST?.[0]
?.TaxPercentage
}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Total Amount
</td>
</tr>
{OrderDetailIGST?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(
item.WithOutTaxAmount
).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TaxAmt).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TotalAmt).toFixed(
2
)}
</td>
</tr>
))}
</table>
</>
)}
{OrderDetailVAT?.length > 0 &&
OrderDetailVAT?.[0]?.TaxAmt > 0 && (
<>
<div
style={{
border: '0.01px dashed black',
width: '90%',
}}
></div>
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
VAT (
{
OrderDetailVAT?.[0]
?.TaxPercentage
}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Total Amount
</td>
</tr>
{OrderDetailVAT?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(
item.WithOutTaxAmount
).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TaxAmt).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TotalAmt).toFixed(
2
)}
</td>
</tr>
))}
</table>
</>
)}
</div>
<hr className="PrintStyle11-print-dottline" />
</>
)}
</div>
</div>
</div>
</div>
<div
style={{
display: 'flex',
justifyContent: 'space-between',
width: '92%',
}}
>
<div
style={{
margin: '0.5rem 0.5rem',
display: 'flex',
flexDirection: 'column',
gap: '0.5rem',
fontWeight: '600',
}}
>
{GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
{' '}
Cashier : Cashier Name
</div>
)}
{CashierName &&
CashierName !== undefined &&
CashierName !== null &&
!GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
Cashier : {CashierName}
</div>
)}
{GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
{' '}
Customer : Customer Name
</div>
)}
{table2Data?.CustSuppName &&
table2Data?.CustSuppName !== undefined &&
table2Data?.CustSuppName !== null &&
!GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
Customer : {table2Data?.CustSuppName}
</div>
)}
<div
className="PrintStyle11-print-InfoDivsub"
style={{ textTransform: 'capitalize' }}
>
{Date1}
</div>
</div>
{GlobaldummyData
? GlobalQrcodet && (
<div className="PrintStyle11-ThirdSubDiv1">
<img
className="PrintStyle11-QRcode"
src={QRcode}
alt="QRcode"
/>
<div>Scan to Pay </div>
<div style={{ fontWeight: '600' }}>
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)
? Number(table2Data?.NetAmount).toFixed(2)
: 0}
</div>
</div>
)
: Qrcodet &&
table2Data?.PaymentTypeName == 'UPI' && (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<QRCode
value={`upi://pay?pa=${GlobalUpiID}&pn=Merchant&am=${table2Data?.NetAmount}&cu=INR`}
size={80}
/>
<div style={{ fontSize: '13px' }}>
Scan to Pay{' '}
</div>
<div
style={{ fontSize: '14px', fontWeight: '600' }}
>
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)}
</div>
</div>
)}
</div>
<hr className="PrintStyle11-print-dottline" />
<div
className="page-footerA4Style11"
style={{
marginTop: 'auto',
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
}}
>
{Notestext && (
<div>
<p style={{ padding: '0rem 1rem' }}>{Notestext}</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '95%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
...footerColorStyle,
}}
>
{TermsnAdCondition == true && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{Signature == true && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{ width: '100px', height: '60px' }}
src={SignatureImg}
alt=""
/>
</div>
)}
</div>
</div>
{PrintGreeting?.SettingValue === 'Y' && (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
gap: '0.5rem',
}}
>
<div style={{ fontSize: '13px', fontWeight: '600' }}>
Thank You{' '}
</div>
</div>
)}
</>
)}
</div>
))}
{shouldFooterBeOnNewPage && FormatTheme && (
<div
className="print-page"
style={{
display: 'flex',
flexDirection: 'column',
minHeight: PageSize == 'A5' ? '200mm' : '297mm',
justifyContent: 'flex-end',
pageBreakBefore: 'always',
}}
>
<div
className="page-footerA4Style11"
style={{
marginTop: 'auto',
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
}}
>
<>
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-ThirdDiv">
<div>
<div className="PrintStyle11-print-ThirdDivSub">
<div
style={{ display: 'flex', flexDirection: 'column' }}
></div>
<div
style={{
textAlign: 'right',
display: 'flex',
flexDirection: 'column',
fontSize: '13px',
fontWeight: '500',
}}
></div>
</div>
{DineInData?.length > 0 &&
TakeawayData?.length > 0 &&
takeAwayPreference && (
<div
style={{
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
}}
>
TakeAway :{Number(TakeawayTotal).toFixed(2)}/-
</div>
)}
{DineInData?.length > 0 &&
TakeawayData?.length > 0 &&
dinePreference && (
<div
style={{
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
}}
>
DineIn :{Number(DineInTotal).toFixed(2)}/-
</div>
)}
{/* <div style={{ textAlign: 'right', fontWeight: '600', fontSize: '18px' }}>Amount :{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}/-</div> */}
</div>
</div>
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-ThirdDiv2">
<div style={{ width: '45%', padding: '0rem 8rem' }}>
<div
className="PrintStyle11-print-TotalGST"
style={{
fontSize: 'clamp(0.8rem, 2.5vw, 1.4rem)',
fontWeight: '600',
}}
>
<div>
{((OrderDetailGST?.length > 0 &&
OrderDetailGST?.[0]?.TaxAmt > 0) ||
(OrderDetailIGST?.length > 0 &&
OrderDetailIGST?.[0]?.TaxAmt > 0) ||
(OrderDetailVAT?.length > 0 &&
OrderDetailVAT?.[0]?.TaxAmt > 0)) && (
<>
<hr style={{ margin: '0.5rem 0rem' }} />
<div>
<p
style={{
margin: 0,
padding: 0,
fontSize: '15px',
textAlign: 'center',
fontWeight: '600',
}}
>
--------- GST Breakup Details -----------
</p>
{OrderDetailGST?.length > 0 &&
OrderDetailGST?.[0]?.TaxAmt > 0 && (
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
CGST (
{OrderDetailGST?.[0]?.TaxPercentage /
2}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
SGST (
{OrderDetailGST?.[0]?.TaxPercentage /
2}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
Total Amount
</td>
</tr>
{OrderDetailGST?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(
item.WithOutTaxAmount
).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.CGST).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.SGST).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
)}
{OrderDetailIGST?.length > 0 &&
OrderDetailIGST?.[0]?.TaxAmt > 0 && (
<>
<div
style={{
border: '0.01px dashed black',
width: '90%',
}}
></div>
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
IGST (
{
OrderDetailIGST?.[0]
?.TaxPercentage
}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Total Amount
</td>
</tr>
{OrderDetailIGST?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(
item.WithOutTaxAmount
).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TaxAmt).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
</>
)}
{OrderDetailVAT?.length > 0 &&
OrderDetailVAT?.[0]?.TaxAmt > 0 && (
<>
<div
style={{
border: '0.01px dashed black',
width: '90%',
}}
></div>
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
VAT (
{OrderDetailVAT?.[0]?.TaxPercentage}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Total Amount
</td>
</tr>
{OrderDetailVAT?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(
item.WithOutTaxAmount
).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TaxAmt).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
</>
)}
</div>
<hr className="PrintStyle11-print-dottline" />
</>
)}
</div>
</div>
</div>
</div>
<div
style={{
display: 'flex',
justifyContent: 'space-evenly',
marginTop: '5px',
}}
>
<div
style={{
marginTop: '5px',
padding: 0,
fontSize: '17px',
fontWeight: '600',
}}
>
{PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName
: 'Split'}{' '}
&nbsp;Payment : &nbsp;
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)}
/-{' '}
</div>
</div>
<div
style={{
display: 'flex',
justifyContent: 'space-between',
width: '92%',
}}
>
<div
style={{
margin: '0.5rem 0.5rem',
display: 'flex',
flexDirection: 'column',
gap: '0.5rem',
fontWeight: '600',
}}
>
{GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
{' '}
Cashier : Cashier Name
</div>
)}
{CashierName &&
CashierName !== undefined &&
CashierName !== null &&
!GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
Cashier : {CashierName}
</div>
)}
{GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
{' '}
Customer : Customer Name
</div>
)}
{table2Data?.CustSuppName &&
table2Data?.CustSuppName !== undefined &&
table2Data?.CustSuppName !== null &&
!GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
Customer : {table2Data?.CustSuppName}
</div>
)}
<div
className="PrintStyle11-print-InfoDivsub"
style={{ textTransform: 'capitalize' }}
>
{Date1}
</div>
</div>
{GlobaldummyData
? GlobalQrcodet && (
<div className="PrintStyle11-ThirdSubDiv1">
<img
className="PrintStyle11-QRcode"
src={QRcode}
alt="QRcode"
/>
<div>Scan to Pay </div>
<div style={{ fontWeight: '600' }}>
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)
? Number(table2Data?.NetAmount).toFixed(2)
: 0}
</div>
</div>
)
: Qrcodet &&
table2Data?.PaymentTypeName == 'UPI' && (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<QRCode
value={`upi://pay?pa=${GlobalUpiID}&pn=Merchant&am=${table2Data?.NetAmount}&cu=INR`}
size={80}
/>
<div style={{ fontSize: '13px' }}>Scan to Pay </div>
<div
style={{ fontSize: '14px', fontWeight: '600' }}
>
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)}
</div>
</div>
)}
</div>
<hr className="PrintStyle11-print-dottline" />
<div
className="page-footerA4Style11"
style={{
marginTop: 'auto',
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
}}
>
{Notestext && (
<div>
<p style={{ padding: '0rem 1rem' }}>{Notestext}</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '95%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
...footerColorStyle,
}}
>
{TermsnAdCondition == true && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{Signature == true && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{ width: '100px', height: '60px' }}
src={SignatureImg}
alt=""
/>
</div>
)}
</div>
</div>
{PrintGreeting?.SettingValue === 'Y' && (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
gap: '0.5rem',
}}
>
<div style={{ fontSize: '13px', fontWeight: '600' }}>
Thank You{' '}
</div>
</div>
)}
</>
</div>
</div>
)}
</div>
) : (
<div
className="PrintStyle11MasterDiv"
id={`PrintStyle11`}
style={{ fontFamily: "'Courier New', Courier, monospace" }}
>
<div className="PrintStyle11-print" style={{ ...headerStyle }}>
{base64Image ? (
<img
className="PrintStyle11-BrandImage"
src={GlobaldummyData ? Logo : base64Image}
alt="image"
style={{ width: '40px', height: '40px' }}
/>
) : null}
<div>
<div
style={{
fontWeight: '600',
// fontFamily: "Lemon",
fontSize: 'clamp(1rem, 2.5vw, 2.5rem)',
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
</div>
{/* <div style={{ fontWeight: '600', fontFamily: 'monospace', fontSize: 'clamp(0.5rem, 2.5vw, 1.5rem)' }}>
Save green | Save nature
</div> */}
</div>
</div>
<hr style={{ margin: '0.1rem 0rem' }} />
<div className="PrintStyle11-print-SecondDiv">
<div style={{ fontSize: '12px', fontWeight: '600' }}>
{GlobaldummyData
? 'BranchAddress, Town- 635XXX City - State'
: (table2Data?.AddressDetails?.[0]?.Address1 || '') +
(table2Data?.AddressDetails?.[0]?.City
? (table2Data?.AddressDetails?.[0]?.Address1 &&
table2Data?.AddressDetails?.[0]?.City
? '-'
: '') + table2Data?.AddressDetails?.[0]?.City
: '') +
(table2Data?.AddressDetails?.[0]?.Zip
? (table2Data?.AddressDetails?.[0]?.City &&
table2Data?.AddressDetails?.[0]?.Zip
? '-'
: '') + table2Data?.AddressDetails?.[0]?.Zip
: '')}
</div>
<div style={{ fontSize: '11px', fontWeight: '600' }}>
{' '}
MOBILE NO :{table2Data?.BrMobile}
</div>
</div>
<hr style={{ margin: '0.1rem 0rem' }} />
<div
style={{
margin: '0rem 0.5rem',
display: 'flex',
justifyContent: 'center',
fontWeight: '600',
textTransform: 'capitalize',
}}
className="PrintStyle11-print-BillNO"
>
{GlobaldummyData
? GlobalBilltext
? GlobalBilltext
: 'Cash' + ' Bill'
: BillName
? BillName
: PaymentStatusSuccess?.length === 1
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
: ''}
</div>
<div
style={{
margin: '0rem 0.5rem',
fontSize: '14px',
fontWeight: '600',
}}
className="PrintA4Style11-print-BillNO"
>
Bill No :{' '}
{GlobaldummyData
? '553'
: table2Data?.OrderId &&
extractLastNumberOrderId(
table2Data?.OrderId,
table2Data?.FYStatus
)}
</div>
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-tableMaster">
{
<>
{
<div
style={{
display: 'flex',
width: '100%',
justifyContent: 'center',
alignItems: 'center',
fontSize: '12px',
fontWeight: '600',
}}
>
Take Away
</div>
}
<table className="PrintStyle11-print-table">
<thead>
<tr style={{ ...tableHeaderStyle }}>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px', ...tableHeaderStyle }}>
SL.NO
</th>
)
: SLNO && (
<th style={{ width: '10px', ...tableHeaderStyle }}>
SL.NO
</th>
)}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px', ...tableHeaderStyle }}>
Item
</th>
)
: Item && (
<th style={{ width: '10px', ...tableHeaderStyle }}>
Item
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Qty
</th>
)
: Quantity && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Qty
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
HSN
</th>
)
: HsnCode && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
MRP
</th>
)
: MRP && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Rate
</th>
)
: Rate && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Amt
</th>
)
: Amount && (
<th
style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Amt
</th>
)}
</tr>
</thead>
<tbody>
{dataSource?.map((item, index) => {
return (
<tr
key={index}
style={{
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{SLNO && <td>{index + 1}</td>}
{Item && (
<td
style={{
display: 'flex',
flexDirection: 'column',
}}
>
<div>{item?.ProdName}</div>
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
? item?.UomName
: 'COMBO'}
)
{item?.BrandName !== null
? item?.BrandName
: ''}
&nbsp;
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls?.filter(
(items) =>
!(
items.SerialNumber == '' ||
items.SerialNumber == null
)
)?.map((a, idx) => {
return (
<div key={a.SerialNumber}>
{a.SerialNumber}
</div>
);
})
: ''}{' '}
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(item1) =>
item1.IMEI1 !== '' || item1.IMEI2 !== ''
)?.map((item2, idx) => {
const imei1 = item2.IMEI1 || '';
const imei2 = item2.IMEI2 || '';
return (
<div>
{[imei1, imei2]
.filter(Boolean)
.join(',')}
</div>
);
})
: ''}
</div>
</td>
)}
{Quantity && (
<td style={{ textAlign: 'right' }}>
{item?.SalesQty}
</td>
)}
{HsnCode && (
<td style={{ textAlign: 'right' }}>{item?.HSN}</td>
)}
{MRP && (
<td style={{ textAlign: 'right' }}>
{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
</td>
)}
{Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
</td>
)}
{Rate && (
<td style={{ textAlign: 'right' }}>{item?.Rate}</td>
)}
{Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
</td>
)}
</tr>
);
})}
</tbody>
</table>
</>
}
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-ThirdDiv">
<div>
<div className="PrintStyle11-print-ThirdDivSub">
<div style={{ display: 'flex', flexDirection: 'column' }}>
{/* <div style={{ fontSize: "15px", fontWeight: '600' }}>Qty</div>
<div style={{ fontSize: "15px", fontWeight: '600' }}>Items</div> */}
{/* <div>SUB TOTAL</div>
<div>ROUND OFF</div> */}
</div>
<div
style={{
textAlign: 'right',
display: 'flex',
flexDirection: 'column',
fontSize: '13px',
fontWeight: '500',
}}
>
{/* <div>{GlobaldummyData ? '9' : calculatedTotalQuantity}</div>
<div>{GlobaldummyData ? '8' : totalQuantityFilter?.length}</div> */}
{/* <div>{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount) ? Number(table2Data?.NetAmount) : 0}</div> */}
{/* <div>{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}</div> */}
</div>
</div>
</div>
</div>
<hr className="PrintStyle11-print-dottline" />
<div className="PrintStyle11-print-ThirdDiv2">
<div style={{ width: '45%', padding: '0rem 8rem' }}>
<div
className="PrintStyle11-print-TotalGST"
style={{
fontSize: 'clamp(0.8rem, 2.5vw, 1.4rem)',
fontWeight: '600',
}}
>
<div>
{((OrderDetailGST?.length > 0 &&
OrderDetailGST?.[0]?.TaxAmt > 0) ||
(OrderDetailIGST?.length > 0 &&
OrderDetailIGST?.[0]?.TaxAmt > 0) ||
(OrderDetailVAT?.length > 0 &&
OrderDetailVAT?.[0]?.TaxAmt > 0)) && (
<>
<hr style={{ margin: '0.5rem 0rem' }} />
<div>
<p
style={{
margin: 0,
padding: 0,
fontSize: '15px',
textAlign: 'center',
fontWeight: '600',
}}
>
--------- GST Breakup Details -----------
</p>
{OrderDetailGST?.length > 0 &&
OrderDetailGST?.[0]?.TaxAmt > 0 && (
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
CGST (
{OrderDetailGST?.[0]?.TaxPercentage / 2}%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
SGST (
{OrderDetailGST?.[0]?.TaxPercentage / 2}%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
Total Amount
</td>
</tr>
{OrderDetailGST?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.WithOutTaxAmount).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.CGST).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.SGST).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
fontWeight: '500',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
)}
{OrderDetailIGST?.length > 0 &&
OrderDetailIGST?.[0]?.TaxAmt > 0 && (
<>
<div
style={{
border: '0.01px dashed black',
width: '90%',
}}
></div>
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
IGST (
{OrderDetailIGST?.[0]?.TaxPercentage}%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Total Amount
</td>
</tr>
{OrderDetailIGST?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.WithOutTaxAmount).toFixed(
2
)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TaxAmt).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
</>
)}
{OrderDetailVAT?.length > 0 &&
OrderDetailVAT?.[0]?.TaxAmt > 0 && (
<>
<div
style={{
border: '0.01px dashed black',
width: '90%',
}}
></div>
<table style={{ width: '90%' }}>
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Taxable Amount
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
VAT ({OrderDetailVAT?.[0]?.TaxPercentage}
%)
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
Total Amount
</td>
</tr>
{OrderDetailVAT?.map((item) => (
<tr>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.WithOutTaxAmount).toFixed(
2
)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TaxAmt).toFixed(2)}
</td>
<td
style={{
fontSize: '13px',
textAlign: 'center',
}}
>
{Number(item.TotalAmt).toFixed(2)}
</td>
</tr>
))}
</table>
</>
)}
</div>
<hr className="PrintStyle11-print-dottline" />
</>
)}
</div>
</div>
</div>
</div>
<div
style={{
display: 'flex',
justifyContent: 'space-between',
width: '92%',
}}
>
<div
style={{
margin: '0.5rem 0.5rem',
display: 'flex',
flexDirection: 'column',
gap: '0.5rem',
fontWeight: '600',
}}
>
{GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
{' '}
Cashier : Cashier Name
</div>
)}
{GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
{' '}
Customer : Customer Name
</div>
)}
{table2Data?.CustSuppName &&
table2Data?.CustSuppName !== undefined &&
table2Data?.CustSuppName !== null &&
!GlobaldummyData && (
<div className="PrintStyle11-print-InfoDivsub">
Customer : {table2Data?.CustSuppName}
</div>
)}
<div
className="PrintStyle11-print-InfoDivsub"
style={{ textTransform: 'capitalize' }}
>
{Date1}
</div>
{/* <div className='PrintStyle11-print-InfoDivsub' style={{ display: "flex", alignItems: "center", justifyContent: "center" }} >YOUR ORDER NO: {table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}</div> */}
</div>
{GlobaldummyData
? GlobalQrcodet && (
<div className="PrintStyle11-ThirdSubDiv1">
<img
className="PrintStyle11-QRcode"
src={QRcode}
alt="QRcode"
/>
<div>Scan to Pay </div>
<div style={{ fontWeight: '600' }}>
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)
? Number(table2Data?.NetAmount).toFixed(2)
: 0}
</div>
</div>
)
: Qrcodet &&
table2Data?.PaymentTypeName == 'UPI' && (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<QRCode
value={`upi://pay?pa=${GlobalUpiID}&pn=Merchant&am=${table2Data?.NetAmount}&cu=INR`}
size={80}
/>
<div style={{ fontSize: '13px' }}>Scan to Pay </div>
<div style={{ fontSize: '14px', fontWeight: '600' }}>
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)}
</div>
</div>
)}
</div>
<hr className="PrintStyle11-print-dottline" />
<div
className="page-footerA4Style11"
style={{
marginTop: 'auto',
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
}}
>
{Notestext && (
<div>
<p style={{ padding: '0rem 1rem' }}>{Notestext}</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '95%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
...footerColorStyle,
}}
>
{TermsnAdCondition == true && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{Signature == ture && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{ width: '100px', height: '60px' }}
src={SignatureImg}
alt=""
/>
</div>
)}
</div>
</div>
{PrintGreeting?.SettingValue === 'Y' && (
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
gap: '0.5rem',
}}
>
{/* <div style={{ fontSize: "13px" }}>Terms & Condition</div>
<div style={{ fontSize: "9px" }}>Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy</div> */}
<div style={{ fontSize: '13px', fontWeight: '600' }}>
Thank You
</div>
</div>
)}
</div>
</div>
)}
</>
);
};
export default PurchaseOrdStyle11;