2026-01-27 18:27:29 +05:30
|
|
|
import React from 'react';
|
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
|
import Qrcode from '../../../../Images/Qrcode.png';
|
|
|
|
|
import {
|
|
|
|
|
extractLastNumber,
|
|
|
|
|
extractLastNumberOrderId,
|
|
|
|
|
} from '../../../../Services/Others';
|
|
|
|
|
import {
|
|
|
|
|
GlobalprintSlNo,
|
|
|
|
|
GlobalprintItem,
|
|
|
|
|
GlobalprintMRP,
|
|
|
|
|
GlobalprintDiscount,
|
|
|
|
|
GlobalprintQuantity,
|
|
|
|
|
GlobalprintRate,
|
|
|
|
|
GlobalprintAmount,
|
|
|
|
|
GlobalprintHsnCode,
|
|
|
|
|
GlobalprintQrcodet,
|
|
|
|
|
GlobalPritdummyData,
|
|
|
|
|
changeReprintDataFound,
|
|
|
|
|
GloabalFieldDetails,
|
|
|
|
|
GlobalprintSignature,
|
|
|
|
|
GlobalprinttermsAndConditions,
|
|
|
|
|
GlobalSignatureImage,
|
|
|
|
|
Globalnotes,
|
|
|
|
|
GlobalthemeFormat,
|
|
|
|
|
GlobalBillName,
|
|
|
|
|
GlobalprintCashierName,
|
|
|
|
|
GlobalprintLogo,
|
|
|
|
|
GlobalprintCredit,
|
2026-01-30 11:30:58 +05:30
|
|
|
GlobalprintTax,
|
2026-03-05 16:45:06 +05:30
|
|
|
GlobalSelectedPrintHeaderColor,
|
2026-03-04 16:30:34 +05:30
|
|
|
GlobalSelectedPrintHeaderFontColor,
|
|
|
|
|
GlobalSelectedTableHeaderColor,
|
|
|
|
|
GlobalSelectedTableHeaderFontColor,
|
|
|
|
|
GlobalSelectedTableBodyFontColor,
|
|
|
|
|
GlobalSelectedTableBodyColor,
|
|
|
|
|
GlobalRowType,
|
|
|
|
|
GlobalSelectedFooterColor,
|
|
|
|
|
GlobalSelectedFooterFontColor,
|
|
|
|
|
GlobalSelectedNetAmountColor,
|
|
|
|
|
GlobalSelectedNetAmountFontColor,
|
2026-01-27 18:27:29 +05:30
|
|
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
|
|
|
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss';
|
2026-02-03 13:45:31 +05:30
|
|
|
import {
|
|
|
|
|
GlobalUpiIDprint,
|
|
|
|
|
PreferenceData,
|
|
|
|
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
2026-01-27 18:27:29 +05:30
|
|
|
import QRCode from 'react-qr-code';
|
|
|
|
|
import signature from '../../../../Images/signatureimage.jpg';
|
|
|
|
|
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
|
|
|
|
|
import { isMobile } from 'react-device-detect';
|
|
|
|
|
import { settingDataSelector } from '../../../../Features/PreferenceMaster/PreferenceMaster';
|
|
|
|
|
import Logo from '../../../../Images/Logo.jpg';
|
|
|
|
|
|
|
|
|
|
const Printstyle4 = ({
|
|
|
|
|
index,
|
|
|
|
|
Date1,
|
|
|
|
|
base64Image,
|
|
|
|
|
totalQuantityFilter,
|
|
|
|
|
CashierName,
|
|
|
|
|
totalQuantity,
|
|
|
|
|
OrderDetailGST,
|
|
|
|
|
OrderDetailIGST,
|
|
|
|
|
OrderDetailVAT,
|
|
|
|
|
table2Data,
|
|
|
|
|
PaymentStatus,
|
|
|
|
|
PrintGreeting,
|
|
|
|
|
PrintLogo,
|
|
|
|
|
printDatas,
|
|
|
|
|
isPdf,
|
|
|
|
|
sportsAppPreference,
|
|
|
|
|
SalesModePref,
|
|
|
|
|
MembershipApplied = null,
|
|
|
|
|
}) => {
|
|
|
|
|
const dispatch = useDispatch();
|
|
|
|
|
const GlobalUpiID = useSelector(GlobalUpiIDprint);
|
|
|
|
|
const FieldDetails = useSelector(GloabalFieldDetails);
|
|
|
|
|
const SLNO = FieldDetails?.['Sl.No'];
|
|
|
|
|
const Item = FieldDetails?.['Item'];
|
|
|
|
|
const MRP = FieldDetails?.['MRP'];
|
|
|
|
|
const Discount = FieldDetails?.['Discount'];
|
2026-01-30 11:30:58 +05:30
|
|
|
const Tax = FieldDetails?.['Tax'];
|
2026-01-27 18:27:29 +05:30
|
|
|
const Quantity = FieldDetails?.['Quantity'];
|
|
|
|
|
const Rate = FieldDetails?.['Rate'];
|
|
|
|
|
const Amount = FieldDetails?.['Amount'];
|
|
|
|
|
const HsnCode = FieldDetails?.['HsnCode'];
|
|
|
|
|
const Qrcodet = FieldDetails?.['Qrcode'];
|
|
|
|
|
const CashierNameField = FieldDetails?.['CashierName'];
|
|
|
|
|
const LogoField = FieldDetails?.['Logo'];
|
|
|
|
|
const CreditDetails = FieldDetails?.['Credit details'];
|
|
|
|
|
const WeightasKg = FieldDetails?.['Weight'];
|
|
|
|
|
const GlobalSlNo = useSelector(GlobalprintSlNo);
|
|
|
|
|
const GlobalItem = useSelector(GlobalprintItem);
|
|
|
|
|
const GlobalMRP = useSelector(GlobalprintMRP);
|
|
|
|
|
const GlobalDiscount = useSelector(GlobalprintDiscount);
|
2026-01-30 11:30:58 +05:30
|
|
|
const GlobalTax = useSelector(GlobalprintTax);
|
2026-01-27 18:27:29 +05:30
|
|
|
const GlobalQuantity = useSelector(GlobalprintQuantity);
|
|
|
|
|
const GlobalRate = useSelector(GlobalprintRate);
|
|
|
|
|
const GlobalAmount = useSelector(GlobalprintAmount);
|
|
|
|
|
const GlobalHsnCode = useSelector(GlobalprintHsnCode);
|
|
|
|
|
const GlobalQrcodet = useSelector(GlobalprintQrcodet);
|
|
|
|
|
const GlobaldummyData = useSelector(GlobalPritdummyData);
|
2026-03-04 09:36:32 +05:30
|
|
|
console.log(GlobaldummyData, 'GlobaldummyData');
|
2026-01-27 18:27:29 +05:30
|
|
|
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 GlobalCashierName = useSelector(GlobalprintCashierName);
|
|
|
|
|
const GlobalLogo = useSelector(GlobalprintLogo);
|
|
|
|
|
const GlobalCredit = useSelector(GlobalprintCredit);
|
2026-03-05 16:45:06 +05:30
|
|
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
2026-03-09 12:45:29 +05:30
|
|
|
const SelectedHeaderFontColor = useSelector(
|
|
|
|
|
GlobalSelectedPrintHeaderFontColor
|
|
|
|
|
);
|
2026-03-05 16:45:06 +05:30
|
|
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
2026-03-09 12:45:29 +05:30
|
|
|
const SelectedTableHeaderFontColor = useSelector(
|
|
|
|
|
GlobalSelectedTableHeaderFontColor
|
|
|
|
|
);
|
2026-03-05 16:45:06 +05:30
|
|
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
2026-03-09 12:45:29 +05:30
|
|
|
const SelectedTableBodyFontColor = useSelector(
|
|
|
|
|
GlobalSelectedTableBodyFontColor
|
|
|
|
|
);
|
2026-03-05 16:45:06 +05:30
|
|
|
const SelectedRowType = useSelector(GlobalRowType);
|
|
|
|
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
2026-03-09 12:45:29 +05:30
|
|
|
const SelectedTableFooterFontColor = useSelector(
|
|
|
|
|
GlobalSelectedFooterFontColor
|
|
|
|
|
);
|
2026-03-05 16:45:06 +05:30
|
|
|
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
|
2026-03-09 12:45:29 +05:30
|
|
|
const SelectedNetAmountFontColor = useSelector(
|
|
|
|
|
GlobalSelectedNetAmountFontColor
|
|
|
|
|
);
|
2026-01-27 18:27:29 +05:30
|
|
|
const SettingData = useSelector(PreferenceData);
|
2026-03-05 16:45:06 +05:30
|
|
|
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
|
|
|
|
|
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
|
|
|
|
|
);
|
|
|
|
|
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
|
|
|
|
|
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
|
|
|
|
|
);
|
2026-01-30 11:30:58 +05:30
|
|
|
const totalGSTData = [
|
|
|
|
|
(OrderDetailGST || []).reduce(
|
|
|
|
|
(acc, item) => ({
|
|
|
|
|
WithOutTaxAmount: (acc.WithOutTaxAmount || 0) + item.WithOutTaxAmount,
|
|
|
|
|
TaxAmt: (acc.TaxAmt || 0) + item.TaxAmt,
|
|
|
|
|
TotalAmt: (acc.TotalAmt || 0) + item.TotalAmt,
|
|
|
|
|
CGST: (acc.CGST || 0) + item.CGST,
|
|
|
|
|
SGST: (acc.SGST || 0) + item.SGST,
|
|
|
|
|
}),
|
|
|
|
|
{}
|
|
|
|
|
),
|
|
|
|
|
];
|
|
|
|
|
console.log(table2Data, 'table2Data');
|
2026-03-04 09:36:32 +05:30
|
|
|
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
|
2026-02-26 11:44:46 +05:30
|
|
|
(i) => i.SettingIdName === 'PrintUom'
|
|
|
|
|
)?.[0];
|
2026-01-27 18:27:29 +05:30
|
|
|
const estimatePrintHeader =
|
|
|
|
|
SettingData?.[0]?.SettingDtlDetails?.find(
|
|
|
|
|
(setting) =>
|
|
|
|
|
setting?.SettingIdName?.toLowerCase() === 'estimateprintheader'
|
|
|
|
|
)?.SettingValue === 'Y';
|
2026-02-25 19:27:02 +05:30
|
|
|
const estimateTitle =
|
|
|
|
|
SettingData?.[0]?.SettingDtlDetails?.find(
|
2026-03-04 09:36:32 +05:30
|
|
|
(setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
|
2026-02-25 19:27:02 +05:30
|
|
|
)?.SettingValue === 'Y';
|
2026-01-27 18:27:29 +05:30
|
|
|
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'
|
|
|
|
|
);
|
|
|
|
|
const paymentTypeUPI = PaymentStatus?.find(
|
|
|
|
|
(ps) => ps.PaymentTypeName === 'UPI'
|
|
|
|
|
);
|
|
|
|
|
|
2026-03-04 16:30:34 +05:30
|
|
|
let printColors = printDatas?.PrintColors;
|
2026-03-09 12:45:29 +05:30
|
|
|
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 netAmtColor = printColors?.find((obj) => obj.netAmtColor)?.netAmtColor;
|
2026-01-27 18:27:29 +05:30
|
|
|
|
|
|
|
|
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'];
|
|
|
|
|
|
|
|
|
|
let PaymentStatusSuccess = PaymentStatus?.filter(
|
|
|
|
|
(ps) => ps.PaymentStatus === 'S'
|
|
|
|
|
);
|
2026-03-04 09:36:32 +05:30
|
|
|
const isEditedBill = PaymentStatus?.some((payment) => {
|
2026-02-04 18:10:12 +05:30
|
|
|
const type = payment?.AdjustmentType?.toLowerCase();
|
|
|
|
|
return (
|
|
|
|
|
(type === 'extra' || type === 'refund') &&
|
|
|
|
|
payment?.BeforeAdjustment != null &&
|
|
|
|
|
payment?.AfterAdjustment != null
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
const lastTransaction = PaymentStatus?.find(
|
|
|
|
|
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
|
2026-03-04 09:36:32 +05:30
|
|
|
);
|
2026-01-27 18:27:29 +05:30
|
|
|
const keysLength = Object.keys(table2Data ?? {}).length;
|
|
|
|
|
|
|
|
|
|
if (keysLength > 0) {
|
|
|
|
|
dispatch(changeReprintDataFound(true));
|
|
|
|
|
}
|
|
|
|
|
const PackageDetails = table2Data?.PackageDtl;
|
|
|
|
|
const currentDate = new Date();
|
|
|
|
|
const day = currentDate.getDate().toString().padStart(2, '0');
|
|
|
|
|
const monthNames = [
|
|
|
|
|
'Jan',
|
|
|
|
|
'Feb',
|
|
|
|
|
'Mar',
|
|
|
|
|
'Apr',
|
|
|
|
|
'May',
|
|
|
|
|
'Jun',
|
|
|
|
|
'Jul',
|
|
|
|
|
'Aug',
|
|
|
|
|
'Sep',
|
|
|
|
|
'Oct',
|
|
|
|
|
'Nov',
|
|
|
|
|
'Dec',
|
|
|
|
|
];
|
|
|
|
|
const monthIndex = currentDate.getMonth();
|
|
|
|
|
const year = currentDate.getFullYear().toString().slice(-2);
|
|
|
|
|
|
|
|
|
|
const formattedDate = `${day}-${monthNames[monthIndex]}-${year}`;
|
|
|
|
|
const TakeawayData = table2Data?.productDetails?.filter(
|
|
|
|
|
(item) => item.BookingTypeName?.toLowerCase() === 'takeaway'
|
|
|
|
|
);
|
2026-03-04 09:36:32 +05:30
|
|
|
console.log(TakeawayData, 'TakeawayData');
|
2026-01-27 18:27:29 +05:30
|
|
|
const DineInData = table2Data?.productDetails?.filter(
|
|
|
|
|
(item) => item.BookingTypeName?.toLowerCase() === 'dine in'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const TakeawayTotal = TakeawayData?.reduce(
|
|
|
|
|
(accumulator, currentValue) => accumulator + currentValue.TotalAmt,
|
|
|
|
|
0
|
|
|
|
|
);
|
|
|
|
|
const DineInTotal = DineInData?.reduce(
|
|
|
|
|
(accumulator, currentValue) => accumulator + currentValue.TotalAmt,
|
|
|
|
|
0
|
|
|
|
|
);
|
|
|
|
|
const aggregatedPayments = PaymentStatusSuccess?.reduce(
|
|
|
|
|
(acc, paymentdata) => {
|
|
|
|
|
const paymentType = paymentdata?.PaymentTypeName;
|
|
|
|
|
const amount = Number(paymentdata?.Amount);
|
|
|
|
|
|
|
|
|
|
if (acc[paymentType]) {
|
|
|
|
|
acc[paymentType] += amount;
|
|
|
|
|
} else {
|
|
|
|
|
acc[paymentType] = amount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return acc;
|
|
|
|
|
},
|
|
|
|
|
{}
|
|
|
|
|
);
|
|
|
|
|
const productsData = table2Data?.productDetails || [];
|
|
|
|
|
const offers = table2Data?.OrderOfferDetails || [];
|
|
|
|
|
|
|
|
|
|
let TotalOfferAmount = 0;
|
|
|
|
|
|
|
|
|
|
// Calculate SalesWiseOffers total amount
|
|
|
|
|
offers.forEach((offer) => {
|
|
|
|
|
if (offer.TableName === 'SalesWiseOffers') {
|
|
|
|
|
TotalOfferAmount += offer.OfferAmount;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const hasMappedOffer = offers.some((offer) =>
|
|
|
|
|
['ItemWiseOffers', 'BundleOffers', 'QuantityWiseOffers'].includes(
|
|
|
|
|
offer.TableName
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (hasMappedOffer) {
|
|
|
|
|
const productTotal = productsData?.reduce(
|
|
|
|
|
(acc, item) =>
|
|
|
|
|
acc + (item?.Type != 'C' ? item.OfferAmt : item.OfferValue || 0),
|
|
|
|
|
0
|
|
|
|
|
);
|
|
|
|
|
TotalOfferAmount += productTotal;
|
|
|
|
|
} else {
|
|
|
|
|
const Combothere = productsData?.filter((item) => item?.Type == 'C');
|
|
|
|
|
const CombothereTotal = Combothere?.reduce(
|
|
|
|
|
(acc, item) => acc + (item.OfferValue || 0),
|
|
|
|
|
0
|
|
|
|
|
);
|
|
|
|
|
TotalOfferAmount += CombothereTotal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const products = [
|
|
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 1',
|
|
|
|
|
Rate: 88.0,
|
|
|
|
|
SalesQty: 2,
|
|
|
|
|
MRP: 100,
|
|
|
|
|
TotalAmt: 176,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '01',
|
2026-02-04 18:10:12 +05:30
|
|
|
},
|
2026-01-27 18:27:29 +05:30
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 2',
|
|
|
|
|
Rate: 300.0,
|
|
|
|
|
SalesQty: 1,
|
|
|
|
|
MRP: 350,
|
|
|
|
|
TotalAmt: 300,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '02',
|
2026-02-04 18:10:12 +05:30
|
|
|
},
|
2026-01-27 18:27:29 +05:30
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 3',
|
|
|
|
|
Rate: 200.0,
|
|
|
|
|
SalesQty: 1,
|
|
|
|
|
MRP: 250,
|
|
|
|
|
TotalAmt: 200,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '03',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 4',
|
|
|
|
|
Rate: 30.0,
|
|
|
|
|
SalesQty: 1,
|
|
|
|
|
MRP: 50,
|
|
|
|
|
TotalAmt: 30,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '04',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 5',
|
|
|
|
|
Rate: 30.0,
|
|
|
|
|
SalesQty: 1,
|
|
|
|
|
MRP: 50,
|
|
|
|
|
TotalAmt: 30,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '05',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 6',
|
|
|
|
|
Rate: 130.0,
|
|
|
|
|
SalesQty: 1,
|
|
|
|
|
MRP: 150,
|
|
|
|
|
TotalAmt: 130,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '06',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
ProdName: 'ITEM 7',
|
|
|
|
|
Rate: 230.0,
|
|
|
|
|
SalesQty: 1,
|
|
|
|
|
MRP: 250,
|
|
|
|
|
TotalAmt: 230,
|
|
|
|
|
discount: 0,
|
|
|
|
|
HSN: '08',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const chunkSize = PageSize == 'A5' ? 10 : 16;
|
|
|
|
|
|
|
|
|
|
let dataSource = [];
|
|
|
|
|
|
|
|
|
|
if (GlobaldummyData || TakeawayData?.length > 0) {
|
|
|
|
|
dataSource = GlobaldummyData ? products : TakeawayData;
|
|
|
|
|
} else if (DineInData?.length > 0) {
|
|
|
|
|
dataSource = DineInData;
|
|
|
|
|
}
|
2026-03-09 17:13:55 +05:30
|
|
|
console.log(dataSource, 'dataSource');
|
2026-01-27 18:27:29 +05:30
|
|
|
// 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 > (PageSize == 'A5' ? 5 : 10);
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
console.log(paginatedChunks, 'paginatedChunks');
|
2026-03-04 16:30:34 +05:30
|
|
|
const headerStyle = {
|
|
|
|
|
backgroundColor: GlobaldummyData
|
|
|
|
|
? SelectedHeaderColor
|
|
|
|
|
: headerColor?.background,
|
|
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
|
|
|
|
};
|
2026-03-04 16:30:34 +05:30
|
|
|
const tableHeaderStyle = {
|
|
|
|
|
backgroundColor: GlobaldummyData
|
|
|
|
|
? SelectedTableHeaderColor
|
|
|
|
|
: tableHeaderColor?.background,
|
|
|
|
|
|
|
|
|
|
color: GlobaldummyData
|
|
|
|
|
? SelectedTableHeaderFontColor
|
|
|
|
|
: tableHeaderColor?.font,
|
2026-03-09 12:45:29 +05:30
|
|
|
};
|
2026-03-04 16:30:34 +05:30
|
|
|
const tableBodyStyle = {
|
|
|
|
|
backgroundColor: GlobaldummyData
|
|
|
|
|
? SelectedTableBodyColor
|
|
|
|
|
: tableBodyColor?.background,
|
2026-03-09 12:45:29 +05:30
|
|
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
|
|
|
|
};
|
|
|
|
|
const rowtypeStyle = GlobaldummyData
|
|
|
|
|
? SelectedRowType
|
|
|
|
|
: tableBodyColor?.rowType;
|
2026-03-04 16:30:34 +05:30
|
|
|
const footerColorStyle = {
|
|
|
|
|
backgroundColor: GlobaldummyData
|
|
|
|
|
? SelectedTableFooterColor
|
|
|
|
|
: footerColor?.background,
|
|
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
|
|
|
|
};
|
2026-03-04 16:30:34 +05:30
|
|
|
const netAmountStyle = {
|
|
|
|
|
backgroundColor: GlobaldummyData
|
|
|
|
|
? SelectedNetAmountColor
|
|
|
|
|
: netAmtColor?.background,
|
|
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
color: GlobaldummyData ? SelectedNetAmountFontColor : netAmtColor?.font,
|
|
|
|
|
};
|
2026-01-27 18:27:29 +05:30
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{FormatTheme ? (
|
|
|
|
|
<div
|
|
|
|
|
id={`PrintStyle4-${index}`}
|
|
|
|
|
className="PrintStyle4MasterDiv"
|
|
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
// fontFamily: "'Courier New', Courier, monospace",
|
|
|
|
|
fontFamily: 'Poppins',
|
2026-01-27 18:27:29 +05:30
|
|
|
position: 'relative',
|
|
|
|
|
width: '100%',
|
|
|
|
|
minHeight: isMobile ? '' : PageSize == 'A5' ? '210mm' : '297mm',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{paginatedChunks.map((dataChunk, chunkIndex) => (
|
|
|
|
|
<div
|
|
|
|
|
className={
|
|
|
|
|
isMobile
|
|
|
|
|
? `container pdf-page`
|
|
|
|
|
: `container print-chunk${chunkIndex > 0 ? ' print-page-break' : ''}`
|
|
|
|
|
}
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
justifyContent:
|
|
|
|
|
chunkIndex === paginatedChunks.length - 1 &&
|
2026-03-09 12:45:29 +05:30
|
|
|
!shouldFooterBeOnNewPage &&
|
|
|
|
|
FormatTheme
|
2026-01-27 18:27:29 +05:30
|
|
|
? 'space-between'
|
|
|
|
|
: '',
|
|
|
|
|
height: isMobile
|
|
|
|
|
? '295mm'
|
|
|
|
|
: FormatTheme
|
|
|
|
|
? PageSize == 'A5'
|
|
|
|
|
? '170mm'
|
|
|
|
|
: '257mm'
|
|
|
|
|
: '',
|
|
|
|
|
}}
|
|
|
|
|
key={chunkIndex}
|
|
|
|
|
>
|
|
|
|
|
{/* <div className="header" style={{ position: isMobile ? "" : GlobaldummyData ? "absolute" : "fixed", top: 0, width: "100%" }}> */}
|
|
|
|
|
<div
|
|
|
|
|
className="header"
|
|
|
|
|
style={{
|
|
|
|
|
position: isMobile
|
|
|
|
|
? ''
|
|
|
|
|
: GlobaldummyData
|
|
|
|
|
? 'absolute'
|
|
|
|
|
: isPdf
|
|
|
|
|
? 'static'
|
|
|
|
|
: 'fixed',
|
|
|
|
|
top: 0,
|
|
|
|
|
width: '100%',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-fistDiv"
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{ flexDirection: 'column', ...headerStyle }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData && GlobalLogo ? (
|
|
|
|
|
<img
|
|
|
|
|
className="PrintStyle2-BrandImage"
|
|
|
|
|
src={Logo}
|
|
|
|
|
alt="image"
|
|
|
|
|
/>
|
|
|
|
|
) : null}
|
|
|
|
|
{base64Image &&
|
2026-03-09 12:45:29 +05:30
|
|
|
(PrintLogo?.SettingValue === 'Y' || LogoField) ? (
|
2026-01-27 18:27:29 +05:30
|
|
|
<img
|
|
|
|
|
className="PrintStyle2-BrandImage"
|
|
|
|
|
src={base64Image}
|
|
|
|
|
alt="image"
|
|
|
|
|
width={100}
|
|
|
|
|
/>
|
|
|
|
|
) : null}
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '20px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
width: '100%',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}{' '}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
fontWeight: 600,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? 'BranchAddress, Town- 635XXX City - State'
|
|
|
|
|
: (table2Data?.AddressDetails?.[0]?.Address1 || '') +
|
2026-03-09 12:45:29 +05:30
|
|
|
(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
|
|
|
|
|
: '')}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontWeight: 600, fontSize: '14px' }}>
|
2026-01-27 18:27:29 +05:30
|
|
|
{' '}
|
|
|
|
|
Mobile : +91{' '}
|
|
|
|
|
{GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-SecondDiv"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
borderTop: '1px dashed #333',
|
|
|
|
|
paddingTop: '5px',
|
|
|
|
|
fontSize: '14px',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
}}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
|
|
|
|
Dt: {GlobaldummyData ? formattedDate : Date1}
|
2026-03-09 12:45:29 +05:30
|
|
|
{SalesModePref?.SettingValue == 'Y' && (
|
|
|
|
|
<div style={{ fontWeight: '600' }}>
|
|
|
|
|
{' '}
|
|
|
|
|
Name :{' '}
|
|
|
|
|
{table2Data?.SalesMode == 'R'
|
|
|
|
|
? Retailshortname?.Comments
|
|
|
|
|
: Wholesaleshortname?.Comments}{' '}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
</div>
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
2026-01-27 18:27:29 +05:30
|
|
|
Bill No :
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '51'
|
|
|
|
|
: table2Data?.OrderId &&
|
2026-03-09 12:45:29 +05:30
|
|
|
extractLastNumberOrderId(
|
|
|
|
|
table2Data?.OrderId,
|
|
|
|
|
table2Data?.FYStatus
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{/* <div>{GlobaldummyData ? formattedDate : Date1}</div> */}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
|
2026-02-25 19:27:02 +05:30
|
|
|
{table2Data?.OrderType === 'E' && estimateTitle && (
|
2026-01-27 18:27:29 +05:30
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ textTransform: 'uppercase', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
Estimate{' '}
|
2026-03-03 09:56:17 +05:30
|
|
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
|
|
|
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ textTransform: 'uppercase', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? 'Cash Bill'
|
2026-03-09 12:45:29 +05:30
|
|
|
: BillName ||
|
|
|
|
|
(PaymentStatusSuccess?.length === 1
|
|
|
|
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
|
|
|
|
: ' Bill')}{' '}
|
2026-03-03 09:56:17 +05:30
|
|
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
|
|
|
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<hr className="PrintStyle4-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{ marginTop: GlobaldummyData ? '9rem' : '0rem' }}
|
|
|
|
|
className="print-body"
|
|
|
|
|
>
|
|
|
|
|
{(TakeawayData?.length > 0 || GlobaldummyData) && (
|
|
|
|
|
<>
|
2026-03-04 09:36:32 +05:30
|
|
|
{takeAwayPreference && (
|
2026-02-25 19:27:02 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '100%',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: '500',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
TakeAway
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
<div className="PrintStyle4-print-tableMaster">
|
|
|
|
|
<table className="PrintStyle4-print-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSlNo && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
#
|
|
|
|
|
</th>
|
|
|
|
|
)
|
|
|
|
|
: SLNO && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
#
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
2026-03-09 12:45:29 +05:30
|
|
|
? GlobalItem && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
|
|
|
|
)
|
|
|
|
|
: Item && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Quantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: HsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
marginRight: '4px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
marginRight: '4px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '40px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{dataChunk?.map((item, index) => {
|
2026-03-04 09:36:32 +05:30
|
|
|
const identifiers =
|
|
|
|
|
item?.ProductIdentifierDtls ?? [];
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
const serials = identifiers
|
2026-03-04 09:36:32 +05:30
|
|
|
.filter((d) => d.SerialNumber)
|
|
|
|
|
.map((d) => d.SerialNumber);
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
const imeis = identifiers
|
2026-03-04 09:36:32 +05:30
|
|
|
.filter((d) => d.IMEI1 || d.IMEI2)
|
|
|
|
|
.map((d) =>
|
|
|
|
|
[d.IMEI1, d.IMEI2].filter(Boolean).join(', ')
|
|
|
|
|
);
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
const descriptions = identifiers
|
2026-03-04 09:36:32 +05:30
|
|
|
.filter((d) => d.Description)
|
|
|
|
|
.map((d) => d.Description);
|
2026-03-09 17:13:55 +05:30
|
|
|
console.log(
|
|
|
|
|
descriptions,
|
|
|
|
|
identifiers,
|
|
|
|
|
'descriptions'
|
|
|
|
|
);
|
2026-03-04 09:36:32 +05:30
|
|
|
const packageList =
|
|
|
|
|
PackageDetails?.filter(
|
|
|
|
|
(pkg) => pkg.ProdId === item.ProdId
|
|
|
|
|
) ?? [];
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-01-27 18:27:29 +05:30
|
|
|
return (
|
2026-03-09 12:45:29 +05:30
|
|
|
<tr
|
|
|
|
|
key={index}
|
2026-03-05 16:45:06 +05:30
|
|
|
style={
|
2026-03-09 12:45:29 +05:30
|
|
|
index % 2 !== 1 && rowtypeStyle === 'even'
|
2026-03-05 16:45:06 +05:30
|
|
|
? {
|
2026-03-09 12:45:29 +05:30
|
|
|
...tableBodyStyle,
|
2026-03-05 16:45:06 +05:30
|
|
|
}
|
2026-03-09 12:45:29 +05:30
|
|
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
|
|
|
|
? {
|
|
|
|
|
...tableBodyStyle,
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
: {}
|
2026-03-09 12:45:29 +05:30
|
|
|
}
|
|
|
|
|
>
|
2026-03-03 09:56:17 +05:30
|
|
|
{/* SL NO */}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSlNo && <td>{index + 1}</td>
|
2026-03-04 09:36:32 +05:30
|
|
|
: SLNO && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td>
|
|
|
|
|
{chunkIndex * chunkSize + index + 1}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
{/* ITEM COLUMN */}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalItem && <td>{item?.ProdName}</td>
|
|
|
|
|
: Item && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
padding: '10px 5px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{/* Product Name */}
|
|
|
|
|
<div>{item?.ProdName}</div>
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* Package OR Size */}
|
|
|
|
|
{packageList.length > 0 ? (
|
|
|
|
|
<div>
|
|
|
|
|
{packageList.map((pkg, i) => (
|
|
|
|
|
<div key={i}>
|
|
|
|
|
{pkg.ParcelCount} PCS{' '}
|
|
|
|
|
{pkg.ParcelQty} PACK (
|
|
|
|
|
{pkg.ParcelType})
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{UomPrint?.SettingValue === 'Y'
|
|
|
|
|
? (item?.Size || '1') +
|
|
|
|
|
(item?.SinglePc === 'Y'
|
|
|
|
|
? ' PCS'
|
|
|
|
|
: item?.Type !== 'C'
|
|
|
|
|
? ` ${item?.UomName}`
|
|
|
|
|
: ' COMBO')
|
|
|
|
|
: ''}
|
|
|
|
|
{item?.BrandName || ''}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* Serials */}
|
|
|
|
|
{serials.map((s, i) => (
|
|
|
|
|
<div key={`serial-${i}`}>{s}</div>
|
|
|
|
|
))}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* IMEIs */}
|
|
|
|
|
{imeis.map((iVal, i) => (
|
|
|
|
|
<div key={`imei-${i}`}>{iVal}</div>
|
|
|
|
|
))}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* Description from first identifier */}
|
|
|
|
|
{descriptions[0] && (
|
|
|
|
|
<div>{descriptions[0]}</div>
|
|
|
|
|
)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
{/* Quantity */}
|
2026-03-04 09:36:32 +05:30
|
|
|
{(GlobaldummyData
|
|
|
|
|
? GlobalQuantity
|
|
|
|
|
: Quantity) && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
{/* HSN */}
|
2026-03-04 09:36:32 +05:30
|
|
|
{(GlobaldummyData
|
|
|
|
|
? GlobalHsnCode
|
|
|
|
|
: HsnCode) && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
{/* MRP */}
|
|
|
|
|
{(GlobaldummyData ? GlobalMRP : MRP) && (
|
2026-03-04 09:36:32 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SinglePc === 'Y'
|
|
|
|
|
? item?.Rate
|
|
|
|
|
: item?.MRP}
|
2026-03-03 09:56:17 +05:30
|
|
|
</td>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{/* Discount */}
|
2026-03-04 09:36:32 +05:30
|
|
|
{(GlobaldummyData
|
|
|
|
|
? GlobalDiscount
|
|
|
|
|
: Discount) && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.OfferAmt || item?.DiscountAmt || 0
|
|
|
|
|
: item?.OfferValue ||
|
|
|
|
|
item?.DiscountAmt ||
|
|
|
|
|
0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
|
|
|
|
{/* Rate */}
|
|
|
|
|
{(GlobaldummyData ? GlobalRate : Rate) && (
|
2026-03-04 09:36:32 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
2026-03-03 09:56:17 +05:30
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{/* Amount */}
|
|
|
|
|
{(GlobaldummyData ? GlobalAmount : Amount) && (
|
2026-03-04 09:36:32 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? (item?.TotalAmt || 0) -
|
2026-03-09 12:45:29 +05:30
|
|
|
(item?.OfferAmt || 0)
|
2026-03-04 09:36:32 +05:30
|
|
|
: (item?.TotalAmt || 0) -
|
2026-03-09 12:45:29 +05:30
|
|
|
(item?.OfferValue || 0)}
|
2026-03-03 09:56:17 +05:30
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{DineInData?.length > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '100%',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dine In
|
|
|
|
|
</div>
|
|
|
|
|
<div className="PrintStyle4-print-tableMaster">
|
|
|
|
|
<table className="PrintStyle4-print-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSlNo && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
#
|
|
|
|
|
</th>
|
|
|
|
|
)
|
|
|
|
|
: SLNO && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
#
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
2026-03-09 12:45:29 +05:30
|
|
|
? GlobalItem && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
|
|
|
|
)
|
|
|
|
|
: Item && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Quantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)
|
|
|
|
|
: HsnCode && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{dataChunk?.map((item, index) => {
|
|
|
|
|
return (
|
2026-03-09 12:45:29 +05:30
|
|
|
<tr
|
|
|
|
|
key={index}
|
2026-03-05 16:45:06 +05:30
|
|
|
style={
|
2026-03-09 12:45:29 +05:30
|
|
|
index % 2 !== 1 && rowtypeStyle === 'even'
|
2026-03-05 16:45:06 +05:30
|
|
|
? {
|
2026-03-09 12:45:29 +05:30
|
|
|
...tableBodyStyle,
|
2026-03-05 16:45:06 +05:30
|
|
|
}
|
2026-03-09 12:45:29 +05:30
|
|
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
|
|
|
|
? {
|
|
|
|
|
...tableBodyStyle,
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
: {}
|
2026-03-09 12:45:29 +05:30
|
|
|
}
|
|
|
|
|
>
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSlNo && <td>{index + 1}</td>
|
|
|
|
|
: SLNO && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td>
|
|
|
|
|
{chunkIndex * chunkSize + index + 1}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalItem && <td>{item?.ProdName}</td>
|
|
|
|
|
: Item && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>{item?.ProdName}</div>
|
|
|
|
|
{UomPrint?.SettingValue === 'Y' && (
|
|
|
|
|
<div>
|
|
|
|
|
({item?.Size ? item?.Size : '1'}{' '}
|
|
|
|
|
{item?.SinglePc == 'Y'
|
|
|
|
|
? 'PCS'
|
|
|
|
|
: item?.Type != 'C'
|
|
|
|
|
? item?.UomName
|
|
|
|
|
: 'COMBO'}
|
|
|
|
|
)
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Quantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: HsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.MRP}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SinglePc === 'Y'
|
|
|
|
|
? item?.Rate
|
|
|
|
|
: item?.MRP}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item.discount}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.OfferAmt ||
|
|
|
|
|
item?.DiscountAmt ||
|
|
|
|
|
0
|
|
|
|
|
: item?.OfferValue ||
|
|
|
|
|
item?.DiscountAmt ||
|
|
|
|
|
0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalTax && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.ProdTaxPercentage || 0}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-30 11:30:58 +05:30
|
|
|
: Tax &&
|
2026-03-09 12:45:29 +05:30
|
|
|
table2Data?.OrderType !== 'E' && (
|
|
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.ProdTaxPercentage || 0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.TotalAmt}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{' '}
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.TotalAmt -
|
|
|
|
|
(item?.OfferAmt || 0)
|
|
|
|
|
: item?.TotalAmt -
|
|
|
|
|
(item?.OfferValue || 0)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
<hr className="PrintStyle4-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{chunkIndex === paginatedChunks.length - 1 &&
|
|
|
|
|
!shouldFooterBeOnNewPage &&
|
|
|
|
|
FormatTheme && (
|
|
|
|
|
<>
|
|
|
|
|
{DineInData?.length > 0 && TakeawayData?.length > 0 && (
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
Takeaway: {Number(TakeawayTotal).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
Dine In: {Number(DineInTotal).toFixed(2)}{' '}
|
|
|
|
|
</div>
|
|
|
|
|
<hr className="PrintStyle3-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<div className="PrintStyle4-ThirdDivMaster">
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
|
|
|
|
className="print2subTotal"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: 500,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
padding: '5px 0',
|
2026-03-09 12:45:29 +05:30
|
|
|
...netAmountStyle,
|
2026-01-30 11:30:58 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{' '}
|
|
|
|
|
<div>Sub Total</div>
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
className="print2subTotal"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '8px',
|
|
|
|
|
fontWeight: 400,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
padding: '5px 40px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div style={{ display: 'flex', gap: '10px' }}>
|
|
|
|
|
<div> ITEM :</div>
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData ? '1,066' : productsData?.length}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
|
|
|
|
<div style={{ display: 'flex', gap: '10px' }}>
|
|
|
|
|
<div> QTY :</div>
|
|
|
|
|
<div>
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
2026-03-04 09:36:32 +05:30
|
|
|
: Number(
|
2026-03-09 12:45:29 +05:30
|
|
|
productsData?.reduce(
|
|
|
|
|
(a, b) => a + b.SalesQty,
|
|
|
|
|
0
|
|
|
|
|
)
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{((totalGSTData?.length > 0 &&
|
|
|
|
|
totalGSTData?.[0]?.TaxAmt > 0) ||
|
2026-01-27 18:27:29 +05:30
|
|
|
(OrderDetailIGST?.length > 0 &&
|
|
|
|
|
OrderDetailIGST?.[0]?.TaxAmt > 0) ||
|
|
|
|
|
(OrderDetailVAT?.length > 0 &&
|
|
|
|
|
OrderDetailVAT?.[0]?.TaxAmt > 0)) &&
|
|
|
|
|
table2Data?.NetAmount !== 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
--------- GST Breakup Details -----------
|
|
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{totalGSTData?.length > 0 &&
|
|
|
|
|
totalGSTData?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<div>
|
|
|
|
|
{totalGSTData?.map((item) => (
|
|
|
|
|
<div
|
|
|
|
|
key={item?.TaxPercentage}
|
|
|
|
|
style={{ fontFamily: 'Poppins' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>Taxable Amount</div>
|
|
|
|
|
<div>
|
|
|
|
|
{(
|
|
|
|
|
Number(
|
|
|
|
|
table2Data?.NetAmount
|
|
|
|
|
).toFixed(2) -
|
|
|
|
|
Number(item.CGST).toFixed(2) -
|
|
|
|
|
Number(item.SGST).toFixed(2)
|
|
|
|
|
)?.toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>CGST</div>
|
|
|
|
|
<div>
|
|
|
|
|
{Number(item.CGST).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>SGST</div>
|
|
|
|
|
<div>
|
|
|
|
|
{Number(item.SGST).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '16px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
color: '#000',
|
|
|
|
|
marginTop: '10px',
|
|
|
|
|
padding: '4px 0',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>Total Amount</div>
|
|
|
|
|
<div>
|
|
|
|
|
{Number(
|
|
|
|
|
table2Data?.NetAmount
|
|
|
|
|
).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
marginTop: '5px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
Rupees in words:{' '}
|
|
|
|
|
{(() => {
|
|
|
|
|
const num = Number(
|
|
|
|
|
table2Data?.NetAmount
|
|
|
|
|
);
|
|
|
|
|
const ones = [
|
|
|
|
|
'',
|
|
|
|
|
'one',
|
|
|
|
|
'two',
|
|
|
|
|
'three',
|
|
|
|
|
'four',
|
|
|
|
|
'five',
|
|
|
|
|
'six',
|
|
|
|
|
'seven',
|
|
|
|
|
'eight',
|
|
|
|
|
'nine',
|
|
|
|
|
'ten',
|
|
|
|
|
'eleven',
|
|
|
|
|
'twelve',
|
|
|
|
|
'thirteen',
|
|
|
|
|
'fourteen',
|
|
|
|
|
'fifteen',
|
|
|
|
|
'sixteen',
|
|
|
|
|
'seventeen',
|
|
|
|
|
'eighteen',
|
|
|
|
|
'nineteen',
|
|
|
|
|
];
|
|
|
|
|
const tens = [
|
|
|
|
|
'',
|
|
|
|
|
'',
|
|
|
|
|
'twenty',
|
|
|
|
|
'thirty',
|
|
|
|
|
'forty',
|
|
|
|
|
'fifty',
|
|
|
|
|
'sixty',
|
|
|
|
|
'seventy',
|
|
|
|
|
'eighty',
|
|
|
|
|
'ninety',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if (num < 20) return ones[num];
|
|
|
|
|
if (num < 100)
|
|
|
|
|
return (
|
|
|
|
|
tens[Math.floor(num / 10)] +
|
|
|
|
|
(num % 10
|
|
|
|
|
? ' ' + ones[num % 10]
|
|
|
|
|
: '')
|
|
|
|
|
);
|
|
|
|
|
if (num < 1000)
|
|
|
|
|
return (
|
|
|
|
|
ones[Math.floor(num / 100)] +
|
|
|
|
|
' hundred' +
|
|
|
|
|
(num % 100
|
|
|
|
|
? ' ' +
|
2026-03-09 12:45:29 +05:30
|
|
|
(num % 100 < 20
|
|
|
|
|
? ones[num % 100]
|
|
|
|
|
: tens[
|
|
|
|
|
Math.floor(
|
|
|
|
|
(num % 100) / 10
|
|
|
|
|
)
|
|
|
|
|
] +
|
|
|
|
|
(num % 10
|
|
|
|
|
? ' ' +
|
|
|
|
|
ones[num % 10]
|
|
|
|
|
: ''))
|
2026-01-30 11:30:58 +05:30
|
|
|
: '')
|
|
|
|
|
);
|
|
|
|
|
return num.toString();
|
|
|
|
|
})()}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
))}
|
2026-01-30 11:30:58 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{OrderDetailIGST?.length > 0 &&
|
|
|
|
|
OrderDetailIGST?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
border: '0.01px dashed black',
|
|
|
|
|
margin: '10px 0 5px 10px',
|
|
|
|
|
width: '90%',
|
|
|
|
|
}}
|
|
|
|
|
></div>
|
|
|
|
|
<table style={{ width: '90%' }}>
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
></td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Taxable Amount
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
IGST
|
2026-01-27 18:27:29 +05:30
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Total Amount
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{OrderDetailIGST?.map((item) => (
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.TaxPercentage || 0}%
|
|
|
|
|
</td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(
|
|
|
|
|
item.WithOutTaxAmount
|
|
|
|
|
).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TaxAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TotalAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
))}
|
|
|
|
|
</table>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{OrderDetailVAT?.length > 0 &&
|
|
|
|
|
OrderDetailVAT?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
border: '0.01px dashed black',
|
|
|
|
|
margin: '10px 0 5px 10px',
|
|
|
|
|
width: '90%',
|
|
|
|
|
}}
|
|
|
|
|
></div>
|
|
|
|
|
<table style={{ width: '90%' }}>
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
></td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Taxable Amount
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
VAT
|
2026-01-27 18:27:29 +05:30
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Total Amount
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{OrderDetailVAT?.map((item) => (
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.TaxPercentage || 0}%
|
|
|
|
|
</td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(
|
|
|
|
|
item.WithOutTaxAmount
|
|
|
|
|
).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TaxAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TotalAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
))}
|
|
|
|
|
</table>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
padding: 0,
|
2026-01-30 11:30:58 +05:30
|
|
|
fontSize: '12px',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontWeight: '600',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontFamily: ' Poppins',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? 'Cash'
|
|
|
|
|
: PaymentStatusSuccess?.length === 1
|
|
|
|
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
|
|
|
|
: ''}{' '}
|
|
|
|
|
Payment :
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
/-{' '}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-04 18:10:12 +05:30
|
|
|
{isEditedBill && lastTransaction && (
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
marginTop: '2px',
|
|
|
|
|
paddingTop: '2px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
2026-03-04 09:36:32 +05:30
|
|
|
width: '90%',
|
2026-02-04 18:10:12 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ color: '#000', fontWeight: 600 }}>
|
|
|
|
|
Bill Gross Amount
|
|
|
|
|
</span>
|
|
|
|
|
<strong>
|
|
|
|
|
{(lastTransaction?.BeforeAdjustment || 0).toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}
|
|
|
|
|
</strong>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
2026-02-04 18:10:12 +05:30
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontWeight: 600,
|
|
|
|
|
color:
|
|
|
|
|
lastTransaction?.AdjustmentType === 'REFUND'
|
|
|
|
|
? '#000'
|
|
|
|
|
: '#000',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
<span>{'Adjustment Amount'}</span>
|
|
|
|
|
<span>
|
2026-03-04 09:36:32 +05:30
|
|
|
{lastTransaction?.AdjustmentType === 'REFUND'
|
|
|
|
|
? '-'
|
|
|
|
|
: '+'}
|
|
|
|
|
{Math.abs(
|
|
|
|
|
(lastTransaction?.BeforeAdjustment ?? 0) -
|
2026-03-09 12:45:29 +05:30
|
|
|
(lastTransaction?.AfterAdjustment ?? 0)
|
2026-03-04 09:36:32 +05:30
|
|
|
).toFixed(2)}
|
2026-02-04 18:10:12 +05:30
|
|
|
</span>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
marginTop: '4px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ color: '#000', fontWeight: 600 }}>
|
|
|
|
|
Net Bill Amount
|
|
|
|
|
</span>
|
|
|
|
|
<strong>
|
|
|
|
|
{(lastTransaction?.AfterAdjustment || 0).toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}
|
|
|
|
|
</strong>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-02-04 18:10:12 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalCredit && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
lineHeight: '14px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<h6>Advance Amount:</h6>
|
|
|
|
|
<h6>Opening Balance:</h6>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-02-04 18:10:12 +05:30
|
|
|
: CreditDetails &&
|
2026-03-09 12:45:29 +05:30
|
|
|
table2Data?.CustomerDetails?.length > 0 && (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
lineHeight: '14px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{(() => {
|
|
|
|
|
const c = table2Data.CustomerDetails[0];
|
|
|
|
|
const items = [];
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
PaymentStatusSuccess?.[0]?.PaymentTypeName ===
|
|
|
|
|
'Credit'
|
|
|
|
|
) {
|
|
|
|
|
if (c.OldCreditBal !== 0) {
|
|
|
|
|
items.push({
|
|
|
|
|
label:
|
|
|
|
|
c.OldCreditBal > 0
|
|
|
|
|
? 'Advance Amount'
|
|
|
|
|
: 'Opening Balance',
|
|
|
|
|
value: Math.abs(c.OldCreditBal).toFixed(2),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-04 19:16:18 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
if (c.CurrentCreditBal !== 0) {
|
2026-01-27 18:27:29 +05:30
|
|
|
items.push({
|
|
|
|
|
label:
|
2026-03-09 12:45:29 +05:30
|
|
|
c.CurrentCreditBal > 0
|
|
|
|
|
? 'Current Advance Amount'
|
|
|
|
|
: 'Current Balance Amount',
|
|
|
|
|
value: Math.abs(c.CurrentCreditBal).toFixed(
|
|
|
|
|
2
|
|
|
|
|
),
|
2026-01-27 18:27:29 +05:30
|
|
|
});
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
return items.map((i, idx) => (
|
|
|
|
|
<p
|
|
|
|
|
key={idx}
|
|
|
|
|
style={{
|
|
|
|
|
display: 'grid',
|
|
|
|
|
gridTemplateColumns: '4fr 1fr 1fr',
|
|
|
|
|
// gridTemplateColumns: "auto auto auto",
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ textAlign: 'left' }}>
|
|
|
|
|
{i.label}
|
|
|
|
|
</span>
|
|
|
|
|
<span style={{ textAlign: 'center' }}>:</span>
|
|
|
|
|
<span style={{ textAlign: 'right' }}>
|
|
|
|
|
{i.value}
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
));
|
|
|
|
|
})()}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
{/* <hr className="PrintStyle4-print-dottline" /> */}
|
|
|
|
|
<div className="PrintStyle4-FourthDiv">
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQrcodet && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
className="PrintStyle4-BrandImage"
|
|
|
|
|
src={GlobaldummyData ? Qrcode : ''}
|
|
|
|
|
alt="image"
|
|
|
|
|
/>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
Scan to Pay{' '}
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
₹
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2026-03-05 16:45:06 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
)
|
2026-03-05 16:45:06 +05:30
|
|
|
: Qrcodet &&
|
2026-03-09 12:45:29 +05:30
|
|
|
paymentTypeUPI && (
|
|
|
|
|
<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: '10px' }}>
|
|
|
|
|
Scan to Pay{' '}
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
₹
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2026-03-05 16:45:06 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div style={{}}>
|
|
|
|
|
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
2026-01-27 18:27:29 +05:30
|
|
|
YOUR ORDER NO:
|
|
|
|
|
{table2Data?.SalesId &&
|
|
|
|
|
extractLastNumber(table2Data?.SalesId)}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="PrintStyle4-FourthP">
|
2026-03-04 09:36:32 +05:30
|
|
|
{PaymentStatusSuccess?.length > 1 &&
|
|
|
|
|
!isEditedBill && (
|
|
|
|
|
<>
|
|
|
|
|
{/* <p>Split Payment:</p> */}
|
|
|
|
|
{Object.keys(aggregatedPayments).map(
|
|
|
|
|
(paymentType) => (
|
|
|
|
|
<div
|
|
|
|
|
key={paymentType}
|
|
|
|
|
style={{
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{paymentType}:{' '}
|
|
|
|
|
{aggregatedPayments[paymentType].toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData && GlobalCashierName && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
{' '}
|
|
|
|
|
Cashier : Cashier Name
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{CashierName &&
|
|
|
|
|
CashierName !== undefined &&
|
|
|
|
|
CashierName !== null &&
|
|
|
|
|
!GlobaldummyData &&
|
|
|
|
|
CashierNameField && (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSmallwordings"
|
|
|
|
|
style={{ fontWeight: '600' }}
|
|
|
|
|
>
|
|
|
|
|
Cashier : {CashierName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{GlobaldummyData && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
{' '}
|
|
|
|
|
Customer : Customer Name
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{table2Data?.CustSuppName &&
|
|
|
|
|
table2Data?.CustSuppName !== undefined &&
|
|
|
|
|
table2Data?.CustSuppName !== null &&
|
|
|
|
|
!GlobaldummyData && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
Customer : {table2Data?.CustSuppName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{table2Data?.BookingTypeName == 'Dine In' &&
|
|
|
|
|
table2Data?.SalesTableLinkDetails?.[0]
|
|
|
|
|
?.WaiterName && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
Captain :{' '}
|
|
|
|
|
{
|
|
|
|
|
table2Data?.SalesTableLinkDetails?.[0]
|
|
|
|
|
?.WaiterName
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{sportsAppPreference && MembershipApplied && (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
width: '100%',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
paddingTop: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
className="page-footerA4Style11"
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: 'auto',
|
|
|
|
|
pageBreakBefore: 'avoid',
|
|
|
|
|
pageBreakInside: 'avoid',
|
|
|
|
|
minHeight: 'auto',
|
2026-03-09 12:45:29 +05:30
|
|
|
...footerColorStyle,
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalIsnotes && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
padding: '0rem 1rem',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Notes : 10 days Return policy
|
|
|
|
|
</p>
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<hr className="PrintA4Style11-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Notestext && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
<p style={{ padding: '0rem 1rem' }}>
|
|
|
|
|
{Notestext}
|
|
|
|
|
</p>
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<hr className="PrintA4Style11-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '90%',
|
|
|
|
|
padding: '0 1rem',
|
|
|
|
|
justifyContent: GlobaltermsAndConditions
|
|
|
|
|
? 'space-between'
|
|
|
|
|
: 'flex-end',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobaltermsAndConditions && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
margin: '8px 0',
|
|
|
|
|
padding: '8px',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
width: '100%',
|
2026-03-05 16:45:06 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Terms & Conditions
|
|
|
|
|
</p>
|
|
|
|
|
<ol
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
paddingLeft: '18px',
|
|
|
|
|
margin: 0,
|
|
|
|
|
lineHeight: '1',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<li>
|
|
|
|
|
Once goods are sold, they are not
|
|
|
|
|
exchangeable or refundable.
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
Please check the product before leaving
|
|
|
|
|
the counter.
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: TermsnAdCondition == true &&
|
2026-03-09 12:45:29 +05:30
|
|
|
TermsAndConditions?.length > 0 && (
|
|
|
|
|
<div
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
margin: '8px 0',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
width: '100%',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'flex-start',
|
2026-03-05 16:45:06 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<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>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSignature && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
|
paddingBottom: '1rem',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Signature
|
|
|
|
|
</p>
|
|
|
|
|
<img
|
|
|
|
|
style={{ width: '70px', height: '40px' }}
|
|
|
|
|
src={
|
|
|
|
|
GlobalSignatureImages
|
|
|
|
|
? GlobalSignatureImages
|
|
|
|
|
: signature
|
|
|
|
|
}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Signature == true && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
marginTop: '1rem',
|
|
|
|
|
paddingBottom: '1rem',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Signature
|
|
|
|
|
</p>
|
|
|
|
|
<img
|
|
|
|
|
style={{ width: '100px', height: '60px' }}
|
|
|
|
|
src={SignatureImg}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{PrintGreeting?.SettingValue === 'Y' && (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ fontWeight: '600', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
Thank You Visit Again
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
|
|
|
|
|
{shouldFooterBeOnNewPage && FormatTheme && (
|
|
|
|
|
<div
|
|
|
|
|
className="print-page"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
minHeight: PageSize == 'A5' ? '200mm' : '260mm',
|
|
|
|
|
justifyContent: 'flex-end',
|
|
|
|
|
pageBreakBefore: 'always',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
className="page-footerA4Style11"
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: 'auto',
|
|
|
|
|
pageBreakBefore: 'avoid',
|
|
|
|
|
pageBreakInside: 'avoid',
|
|
|
|
|
minHeight: 'auto',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<>
|
|
|
|
|
{DineInData?.length > 0 && TakeawayData?.length > 0 && (
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
Takeaway: {Number(TakeawayTotal).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
<div>Dine In: {Number(DineInTotal).toFixed(2)} </div>
|
|
|
|
|
<hr className="PrintStyle3-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<div className="PrintStyle4-ThirdDivMaster">
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
|
|
|
|
className="print2subTotal"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
padding: '5px 0',
|
2026-03-09 12:45:29 +05:30
|
|
|
...netAmountStyle,
|
2026-01-30 11:30:58 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>Sub Total</div>
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
className="print2subTotal"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '8px',
|
|
|
|
|
fontWeight: 400,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
padding: '5px 40px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div style={{ display: 'flex', gap: '10px' }}>
|
|
|
|
|
<div> ITEM :</div>
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData ? '1,066' : productsData?.length}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
|
|
|
|
<div style={{ display: 'flex', gap: '10px' }}>
|
|
|
|
|
<div> QTY :</div>
|
|
|
|
|
<div>
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
2026-03-04 09:36:32 +05:30
|
|
|
: Number(
|
2026-03-09 12:45:29 +05:30
|
|
|
productsData?.reduce(
|
|
|
|
|
(a, b) => a + b.SalesQty,
|
|
|
|
|
0
|
|
|
|
|
)
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{((totalGSTData?.length > 0 &&
|
|
|
|
|
totalGSTData?.[0]?.TaxAmt > 0) ||
|
2026-01-27 18:27:29 +05:30
|
|
|
(OrderDetailIGST?.length > 0 &&
|
|
|
|
|
OrderDetailIGST?.[0]?.TaxAmt > 0) ||
|
|
|
|
|
(OrderDetailVAT?.length > 0 &&
|
|
|
|
|
OrderDetailVAT?.[0]?.TaxAmt > 0)) &&
|
|
|
|
|
table2Data?.NetAmount !== 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
--------- GST Breakup Details -----------
|
|
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{totalGSTData?.length > 0 &&
|
|
|
|
|
totalGSTData?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<div>
|
|
|
|
|
{totalGSTData?.map((item) => (
|
|
|
|
|
<div
|
|
|
|
|
key={item?.TaxPercentage}
|
|
|
|
|
style={{ fontFamily: 'Poppins' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>Taxable Amount</div>
|
|
|
|
|
<div>
|
|
|
|
|
{(
|
|
|
|
|
Number(
|
|
|
|
|
table2Data?.NetAmount
|
|
|
|
|
).toFixed(2) -
|
|
|
|
|
Number(item.CGST).toFixed(2) -
|
|
|
|
|
Number(item.SGST).toFixed(2)
|
|
|
|
|
)?.toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>CGST</div>
|
|
|
|
|
<div>
|
|
|
|
|
{Number(item.CGST).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>SGST</div>
|
|
|
|
|
<div>
|
|
|
|
|
{Number(item.SGST).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '20px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
// color: '#e30c0c',
|
|
|
|
|
color: '#000',
|
|
|
|
|
marginTop: '10px',
|
|
|
|
|
padding: '4px 0',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>Total Amount</div>
|
|
|
|
|
<div>
|
|
|
|
|
{Number(
|
|
|
|
|
table2Data?.NetAmount
|
|
|
|
|
).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
Rupees in words:{' '}
|
|
|
|
|
{(() => {
|
|
|
|
|
const num = Number(
|
|
|
|
|
table2Data?.NetAmount
|
|
|
|
|
);
|
|
|
|
|
const ones = [
|
|
|
|
|
'',
|
|
|
|
|
'one',
|
|
|
|
|
'two',
|
|
|
|
|
'three',
|
|
|
|
|
'four',
|
|
|
|
|
'five',
|
|
|
|
|
'six',
|
|
|
|
|
'seven',
|
|
|
|
|
'eight',
|
|
|
|
|
'nine',
|
|
|
|
|
'ten',
|
|
|
|
|
'eleven',
|
|
|
|
|
'twelve',
|
|
|
|
|
'thirteen',
|
|
|
|
|
'fourteen',
|
|
|
|
|
'fifteen',
|
|
|
|
|
'sixteen',
|
|
|
|
|
'seventeen',
|
|
|
|
|
'eighteen',
|
|
|
|
|
'nineteen',
|
|
|
|
|
];
|
|
|
|
|
const tens = [
|
|
|
|
|
'',
|
|
|
|
|
'',
|
|
|
|
|
'twenty',
|
|
|
|
|
'thirty',
|
|
|
|
|
'forty',
|
|
|
|
|
'fifty',
|
|
|
|
|
'sixty',
|
|
|
|
|
'seventy',
|
|
|
|
|
'eighty',
|
|
|
|
|
'ninety',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if (num < 20) return ones[num];
|
|
|
|
|
if (num < 100)
|
|
|
|
|
return (
|
|
|
|
|
tens[Math.floor(num / 10)] +
|
|
|
|
|
(num % 10
|
|
|
|
|
? ' ' + ones[num % 10]
|
|
|
|
|
: '')
|
|
|
|
|
);
|
|
|
|
|
if (num < 1000)
|
|
|
|
|
return (
|
|
|
|
|
ones[Math.floor(num / 100)] +
|
|
|
|
|
' hundred' +
|
|
|
|
|
(num % 100
|
|
|
|
|
? ' ' +
|
2026-03-09 12:45:29 +05:30
|
|
|
(num % 100 < 20
|
|
|
|
|
? ones[num % 100]
|
|
|
|
|
: tens[
|
|
|
|
|
Math.floor(
|
|
|
|
|
(num % 100) / 10
|
|
|
|
|
)
|
|
|
|
|
] +
|
|
|
|
|
(num % 10
|
|
|
|
|
? ' ' + ones[num % 10]
|
|
|
|
|
: ''))
|
2026-01-30 11:30:58 +05:30
|
|
|
: '')
|
|
|
|
|
);
|
|
|
|
|
return num.toString();
|
|
|
|
|
})()}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
))}
|
2026-01-30 11:30:58 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{OrderDetailIGST?.length > 0 &&
|
|
|
|
|
OrderDetailIGST?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
border: '0.01px dashed black',
|
|
|
|
|
margin: '10px 0 5px 10px',
|
|
|
|
|
width: '90%',
|
|
|
|
|
}}
|
|
|
|
|
></div>
|
|
|
|
|
<table style={{ width: '90%' }}>
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
></td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Taxable Amount
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
IGST
|
2026-01-27 18:27:29 +05:30
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Total Amount
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{OrderDetailIGST?.map((item) => (
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.TaxPercentage || 0}%
|
|
|
|
|
</td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(
|
|
|
|
|
item.WithOutTaxAmount
|
|
|
|
|
).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TaxAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TotalAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
))}
|
|
|
|
|
</table>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{OrderDetailVAT?.length > 0 &&
|
|
|
|
|
OrderDetailVAT?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
border: '0.01px dashed black',
|
|
|
|
|
margin: '10px 0 5px 10px',
|
|
|
|
|
width: '90%',
|
|
|
|
|
}}
|
|
|
|
|
></div>
|
|
|
|
|
<table style={{ width: '90%' }}>
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
></td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Taxable Amount
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
VAT
|
2026-01-27 18:27:29 +05:30
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Total Amount
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{OrderDetailVAT?.map((item) => (
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.TaxPercentage || 0}%
|
|
|
|
|
</td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(
|
|
|
|
|
item.WithOutTaxAmount
|
|
|
|
|
).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TaxAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TotalAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
))}
|
|
|
|
|
</table>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
padding: 0,
|
2026-01-30 11:30:58 +05:30
|
|
|
fontSize: '12px',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontWeight: '600',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontFamily: ' Poppins',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? 'Cash'
|
|
|
|
|
: PaymentStatusSuccess?.length === 1
|
|
|
|
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
|
|
|
|
: ''}{' '}
|
|
|
|
|
Payment :
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
/-{' '}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-04 18:10:12 +05:30
|
|
|
{isEditedBill && lastTransaction && (
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
marginTop: '2px',
|
|
|
|
|
paddingTop: '2px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
2026-03-04 09:36:32 +05:30
|
|
|
width: '90%',
|
2026-02-04 18:10:12 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ color: '#000', fontWeight: 600 }}>
|
|
|
|
|
Bill Gross Amount
|
|
|
|
|
</span>
|
|
|
|
|
<strong>
|
|
|
|
|
{(lastTransaction?.BeforeAdjustment || 0).toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}
|
|
|
|
|
</strong>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
2026-02-04 19:16:18 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
2026-02-04 18:10:12 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontWeight: 600,
|
|
|
|
|
color:
|
|
|
|
|
lastTransaction?.AdjustmentType === 'REFUND'
|
|
|
|
|
? '#000'
|
|
|
|
|
: '#000',
|
2026-02-04 19:16:18 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
<span>{'Adjustment Amount'}</span>
|
|
|
|
|
<span>
|
2026-03-04 09:36:32 +05:30
|
|
|
{lastTransaction?.AdjustmentType === 'REFUND'
|
|
|
|
|
? '-'
|
|
|
|
|
: '+'}
|
|
|
|
|
{Math.abs(
|
|
|
|
|
(lastTransaction?.BeforeAdjustment ?? 0) -
|
2026-03-09 12:45:29 +05:30
|
|
|
(lastTransaction?.AfterAdjustment ?? 0)
|
2026-03-04 09:36:32 +05:30
|
|
|
).toFixed(2)}
|
2026-02-04 18:10:12 +05:30
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
marginTop: '4px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ color: '#000', fontWeight: 600 }}>
|
|
|
|
|
Net Bill Amount
|
|
|
|
|
</span>
|
|
|
|
|
<strong>
|
|
|
|
|
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
|
|
|
|
|
</strong>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-02-04 18:10:12 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalCredit && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
lineHeight: '14px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<h6>Advance Amount:</h6>
|
|
|
|
|
<h6>Opening Balance:</h6>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-02-04 18:10:12 +05:30
|
|
|
: CreditDetails &&
|
2026-03-09 12:45:29 +05:30
|
|
|
table2Data?.CustomerDetails?.length > 0 && (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
lineHeight: '14px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{(() => {
|
|
|
|
|
const c = table2Data.CustomerDetails[0];
|
|
|
|
|
const items = [];
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
PaymentStatusSuccess?.[0]?.PaymentTypeName ===
|
|
|
|
|
'Credit'
|
|
|
|
|
) {
|
|
|
|
|
if (c.OldCreditBal !== 0) {
|
|
|
|
|
items.push({
|
|
|
|
|
label:
|
|
|
|
|
c.OldCreditBal > 0
|
|
|
|
|
? 'Advance Amount'
|
|
|
|
|
: 'Opening Balance',
|
|
|
|
|
value: Math.abs(c.OldCreditBal).toFixed(2),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-04 19:16:18 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
if (c.CurrentCreditBal !== 0) {
|
2026-01-27 18:27:29 +05:30
|
|
|
items.push({
|
|
|
|
|
label:
|
2026-03-09 12:45:29 +05:30
|
|
|
c.CurrentCreditBal > 0
|
|
|
|
|
? 'Current Advance Amount'
|
|
|
|
|
: 'Current Balance Amount',
|
|
|
|
|
value: Math.abs(c.CurrentCreditBal).toFixed(2),
|
2026-01-27 18:27:29 +05:30
|
|
|
});
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
return items.map((i, idx) => (
|
|
|
|
|
<p
|
|
|
|
|
key={idx}
|
|
|
|
|
style={{
|
|
|
|
|
display: 'grid',
|
|
|
|
|
gridTemplateColumns: '4fr 1fr 1fr',
|
|
|
|
|
// gridTemplateColumns: "auto auto auto",
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ textAlign: 'left' }}>
|
|
|
|
|
{i.label}
|
|
|
|
|
</span>
|
|
|
|
|
<span style={{ textAlign: 'center' }}>:</span>
|
|
|
|
|
<span style={{ textAlign: 'right' }}>
|
|
|
|
|
{i.value}
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
));
|
|
|
|
|
})()}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
<hr className="PrintStyle4-print-dottline" />
|
|
|
|
|
<div className="PrintStyle4-FourthDiv">
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQrcodet && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
className="PrintStyle4-BrandImage"
|
|
|
|
|
src={GlobaldummyData ? Qrcode : ''}
|
|
|
|
|
alt="image"
|
|
|
|
|
/>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
Scan to Pay{' '}
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
₹
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
2026-03-05 16:45:06 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Qrcodet &&
|
2026-03-09 12:45:29 +05:30
|
|
|
paymentTypeUPI && (
|
|
|
|
|
<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: '10px' }}>
|
|
|
|
|
Scan to Pay{' '}
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
₹
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
2026-03-05 16:45:06 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<div style={{}}>
|
|
|
|
|
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
2026-01-27 18:27:29 +05:30
|
|
|
YOUR ORDER NO:
|
|
|
|
|
{table2Data?.SalesId &&
|
|
|
|
|
extractLastNumber(table2Data?.SalesId)}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="PrintStyle4-FourthP">
|
2026-03-04 09:36:32 +05:30
|
|
|
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
2026-01-27 18:27:29 +05:30
|
|
|
<>
|
|
|
|
|
{/* <p>Split Payment:</p> */}
|
|
|
|
|
{Object.keys(aggregatedPayments).map(
|
|
|
|
|
(paymentType) => (
|
|
|
|
|
<div
|
|
|
|
|
key={paymentType}
|
|
|
|
|
style={{
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{paymentType}:{' '}
|
|
|
|
|
{aggregatedPayments[paymentType].toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{GlobaldummyData && GlobalCashierName && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
{' '}
|
|
|
|
|
Cashier : Cashier Name
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{CashierName &&
|
|
|
|
|
CashierName !== undefined &&
|
|
|
|
|
CashierName !== null &&
|
|
|
|
|
!GlobaldummyData &&
|
|
|
|
|
CashierNameField && (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSmallwordings"
|
|
|
|
|
style={{ fontWeight: '600' }}
|
|
|
|
|
>
|
|
|
|
|
Cashier : {CashierName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{GlobaldummyData && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
{' '}
|
|
|
|
|
Customer : Customer Name
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{table2Data?.CustSuppName &&
|
|
|
|
|
table2Data?.CustSuppName !== undefined &&
|
|
|
|
|
table2Data?.CustSuppName !== null &&
|
|
|
|
|
!GlobaldummyData && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
Customer : {table2Data?.CustSuppName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{table2Data?.BookingTypeName == 'Dine In' &&
|
|
|
|
|
table2Data?.SalesTableLinkDetails?.[0]
|
|
|
|
|
?.WaiterName && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
Captain :{' '}
|
|
|
|
|
{
|
|
|
|
|
table2Data?.SalesTableLinkDetails?.[0]
|
|
|
|
|
?.WaiterName
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{sportsAppPreference && MembershipApplied && (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
width: '100%',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
paddingTop: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
className="page-footerA4Style11"
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: 'auto',
|
|
|
|
|
pageBreakBefore: 'avoid',
|
|
|
|
|
pageBreakInside: 'avoid',
|
|
|
|
|
minHeight: 'auto',
|
2026-03-09 12:45:29 +05:30
|
|
|
...footerColorStyle,
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalIsnotes && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
padding: '0rem 1rem',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Notes : 10 days Return policy
|
|
|
|
|
</p>
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<hr className="PrintA4Style11-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Notestext && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
<p style={{ padding: '0rem 1rem' }}>
|
|
|
|
|
{Notestext}
|
|
|
|
|
</p>
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<hr className="PrintA4Style11-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '90%',
|
|
|
|
|
padding: '0 1rem',
|
|
|
|
|
justifyContent: GlobaltermsAndConditions
|
|
|
|
|
? 'space-between'
|
|
|
|
|
: 'flex-end',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobaltermsAndConditions && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-02-04 18:10:12 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
margin: '8px 0',
|
|
|
|
|
padding: '8px',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
width: '100%',
|
2026-02-04 18:10:12 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Terms & Conditions
|
|
|
|
|
</p>
|
|
|
|
|
<ol
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
paddingLeft: '18px',
|
|
|
|
|
margin: 0,
|
|
|
|
|
lineHeight: '1',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<li>
|
|
|
|
|
Once goods are sold, they are not
|
|
|
|
|
exchangeable or refundable.
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
Please check the product before leaving the
|
|
|
|
|
counter.
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
: TermsnAdCondition == true &&
|
|
|
|
|
TermsAndConditions?.length > 0 && (
|
|
|
|
|
<div
|
2026-02-04 18:10:12 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
margin: '8px 0',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
width: '100%',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'flex-start',
|
2026-02-04 18:10:12 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<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>
|
|
|
|
|
)}
|
2026-03-05 16:45:06 +05:30
|
|
|
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSignature && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
|
paddingBottom: '1rem',
|
2026-03-05 16:45:06 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Signature
|
|
|
|
|
</p>
|
|
|
|
|
<img
|
|
|
|
|
style={{ width: '70px', height: '40px' }}
|
|
|
|
|
src={
|
|
|
|
|
GlobalSignatureImages
|
|
|
|
|
? GlobalSignatureImages
|
|
|
|
|
: signature
|
|
|
|
|
}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Signature == true && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
marginTop: '1rem',
|
|
|
|
|
paddingBottom: '1rem',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Signature
|
|
|
|
|
</p>
|
|
|
|
|
<img
|
|
|
|
|
style={{ width: '100px', height: '60px' }}
|
|
|
|
|
src={SignatureImg}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{PrintGreeting?.SettingValue === 'Y' && (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ fontWeight: '600', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
Thank You Visit Again
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
id={`PrintStyle4-${index}`}
|
|
|
|
|
className="PrintStyle4MasterDiv"
|
2026-01-30 11:30:58 +05:30
|
|
|
// style={{ fontFamily: "'Courier New', Courier, monospace" }}
|
|
|
|
|
style={{ fontFamily: 'Poppins' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-fistDiv"
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{ flexDirection: 'column', ...headerStyle }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-03-04 16:30:34 +05:30
|
|
|
{GlobaldummyData && GlobalLogo ? (
|
2026-01-27 18:27:29 +05:30
|
|
|
<img
|
|
|
|
|
className="PrintStyle2-BrandImage"
|
|
|
|
|
src={Logo}
|
|
|
|
|
alt="image"
|
|
|
|
|
/>
|
2026-03-04 16:30:34 +05:30
|
|
|
) : null}
|
|
|
|
|
{base64Image &&
|
2026-03-09 12:45:29 +05:30
|
|
|
(PrintLogo?.SettingValue === 'Y' || LogoField) ? (
|
2026-01-27 18:27:29 +05:30
|
|
|
<img
|
|
|
|
|
className="PrintStyle2-BrandImage"
|
|
|
|
|
src={GlobaldummyData ? Logo : base64Image}
|
|
|
|
|
alt="image"
|
|
|
|
|
width={100}
|
|
|
|
|
/>
|
2026-03-05 16:45:06 +05:30
|
|
|
) : null}
|
2026-01-27 18:27:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
fontSize: '16px',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontWeight: '600',
|
|
|
|
|
width: '100%',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
color: '#000',
|
|
|
|
|
lineHeight: '1',
|
|
|
|
|
letterSpacing: '-0.5px',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '500',
|
|
|
|
|
fontSize: '10px',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? 'BranchAddress, Town- 635XXX City - State'
|
|
|
|
|
: (table2Data?.AddressDetails?.[0]?.Address1 || '') +
|
2026-03-09 12:45:29 +05:30
|
|
|
(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
|
|
|
|
|
: '')}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontWeight: '500', fontSize: '10px' }}>
|
2026-01-27 18:27:29 +05:30
|
|
|
{' '}
|
|
|
|
|
Mobile : +91{' '}
|
|
|
|
|
{GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{/* <div>
|
|
|
|
|
<h6>{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrMobile}</h6>
|
|
|
|
|
|
|
|
|
|
</div> */}
|
|
|
|
|
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-SecondDiv"
|
|
|
|
|
style={{
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
borderTop: '1px dashed #333',
|
|
|
|
|
paddingTop: '1px',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-03-03 09:56:17 +05:30
|
|
|
<div>
|
|
|
|
|
Dt: {GlobaldummyData ? formattedDate : Date1}
|
2026-03-09 12:45:29 +05:30
|
|
|
{SalesModePref?.SettingValue == 'Y' && (
|
|
|
|
|
<div style={{ fontWeight: '600' }}>
|
|
|
|
|
{' '}
|
|
|
|
|
Name :{' '}
|
|
|
|
|
{table2Data?.SalesMode == 'R'
|
|
|
|
|
? Retailshortname?.Comments
|
|
|
|
|
: Wholesaleshortname?.Comments}{' '}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
</div>
|
|
|
|
|
|
2026-01-27 18:27:29 +05:30
|
|
|
<div>
|
|
|
|
|
Bill No :
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '51'
|
|
|
|
|
: table2Data?.OrderId &&
|
2026-03-09 12:45:29 +05:30
|
|
|
extractLastNumberOrderId(
|
|
|
|
|
table2Data?.OrderId,
|
|
|
|
|
table2Data?.FYStatus
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
|
2026-02-25 19:27:02 +05:30
|
|
|
{table2Data?.OrderType === 'E' && estimateTitle && (
|
2026-01-27 18:27:29 +05:30
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ textTransform: 'uppercase', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
Estimate{' '}
|
2026-03-03 09:56:17 +05:30
|
|
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
|
|
|
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ textTransform: 'uppercase', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalBilltext
|
|
|
|
|
? GlobalBilltext
|
|
|
|
|
: 'Cash' + ' Bill'
|
2026-03-09 12:45:29 +05:30
|
|
|
: BillName ||
|
|
|
|
|
(PaymentStatusSuccess?.length === 1
|
2026-01-27 18:27:29 +05:30
|
|
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
|
2026-03-09 12:45:29 +05:30
|
|
|
: ' Bill')}{' '}
|
2026-03-03 09:56:17 +05:30
|
|
|
{/* {SalesModePref?.SettingValue == 'Y' &&
|
|
|
|
|
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<hr className="PrintStyle4-print-dottline" />
|
|
|
|
|
{(TakeawayData?.length > 0 || GlobaldummyData) && (
|
|
|
|
|
<>
|
2026-03-04 09:36:32 +05:30
|
|
|
{takeAwayPreference && (
|
2026-02-25 19:27:02 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '100%',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Take Away
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
<div className="PrintStyle4-print-tableMaster">
|
|
|
|
|
<table className="PrintStyle4-print-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
{GlobaldummyData
|
2026-03-09 12:45:29 +05:30
|
|
|
? GlobalSlNo && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle, width: '10px' }}>
|
|
|
|
|
#
|
|
|
|
|
</th>
|
|
|
|
|
)
|
|
|
|
|
: SLNO && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle, width: '10px' }}>
|
|
|
|
|
#
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
2026-03-09 12:45:29 +05:30
|
|
|
? GlobalItem && (
|
|
|
|
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
|
|
|
|
)
|
|
|
|
|
: Item && <th style={{ ...tableHeaderStyle }}>Item</th>}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Quantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: HsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '25px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
{/* {GlobaldummyData
|
|
|
|
|
? GlobalTax && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
GST
|
|
|
|
|
</th>
|
|
|
|
|
)
|
|
|
|
|
: Tax == true &&
|
|
|
|
|
table2Data?.OrderType !== 'E' && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
GST
|
|
|
|
|
</th>
|
|
|
|
|
)} */}
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
2026-03-09 17:13:55 +05:30
|
|
|
paddingLeft: '4px',
|
2026-03-09 12:45:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-02-04 18:10:12 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
2026-03-09 17:13:55 +05:30
|
|
|
paddingLeft: '4px',
|
2026-03-09 12:45:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-02-04 18:10:12 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
...tableHeaderStyle,
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{(GlobaldummyData ? products : TakeawayData)?.map(
|
|
|
|
|
(item, index) => {
|
|
|
|
|
return (
|
2026-03-09 12:45:29 +05:30
|
|
|
<tr
|
|
|
|
|
key={index}
|
2026-03-05 16:45:06 +05:30
|
|
|
style={
|
2026-03-09 12:45:29 +05:30
|
|
|
index % 2 !== 1 && rowtypeStyle === 'even'
|
2026-03-05 16:45:06 +05:30
|
|
|
? {
|
2026-03-09 12:45:29 +05:30
|
|
|
...tableBodyStyle,
|
2026-03-05 16:45:06 +05:30
|
|
|
}
|
2026-03-09 12:45:29 +05:30
|
|
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
|
|
|
|
? {
|
|
|
|
|
...tableBodyStyle,
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
: {}
|
2026-03-09 12:45:29 +05:30
|
|
|
}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSlNo && <td>{index + 1}</td>
|
|
|
|
|
: SLNO && <td>{index + 1}</td>}
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalItem && <td>{item?.ProdName}</td>
|
|
|
|
|
: Item && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>{item?.ProdName}</div>
|
|
|
|
|
|
|
|
|
|
{/* Serial Numbers */}
|
|
|
|
|
{item?.ProductIdentifierDtls?.filter(
|
|
|
|
|
(d) => d.SerialNumber
|
|
|
|
|
)?.map((d, i) => (
|
|
|
|
|
<div key={`serial-${i}`}>
|
|
|
|
|
{d.SerialNumber}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* IMEI Numbers */}
|
|
|
|
|
{item?.ProductIdentifierDtls?.filter(
|
|
|
|
|
(d) => d.IMEI1 || d.IMEI2
|
|
|
|
|
)?.map((d, i) => (
|
|
|
|
|
<div key={`imei-${i}`}>
|
|
|
|
|
{[d.IMEI1, d.IMEI2]
|
|
|
|
|
.filter(Boolean)
|
|
|
|
|
.join(', ')}
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
))}
|
|
|
|
|
|
|
|
|
|
{/* Description from first identifier */}
|
2026-03-09 17:13:55 +05:30
|
|
|
{item?.ProductIdentifierDtls?.length > 0 &&
|
|
|
|
|
item.ProductIdentifierDtls?.[0]
|
|
|
|
|
?.Description && (
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
item.ProductIdentifierDtls?.[0]
|
|
|
|
|
?.Description
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-03-09 12:45:29 +05:30
|
|
|
</td>
|
|
|
|
|
)}
|
2026-02-26 11:44:46 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
{/* Package Details */}
|
|
|
|
|
{PackageDetails?.filter(
|
|
|
|
|
(pkg) => pkg.ProdId === item.ProdId
|
|
|
|
|
).length > 0 ? (
|
|
|
|
|
<div>
|
|
|
|
|
{PackageDetails?.filter(
|
|
|
|
|
(pkg) => pkg.ProdId === item.ProdId
|
|
|
|
|
)?.map((pkg, index) => (
|
|
|
|
|
<div key={index}>
|
|
|
|
|
{pkg.ParcelCount} PCS{' '}
|
|
|
|
|
{pkg.ParcelQty} PACK (
|
|
|
|
|
{pkg.ParcelType})
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* Serial */}
|
|
|
|
|
{item?.ProductIdentifierDtls?.filter(
|
|
|
|
|
(d) => d.SerialNumber
|
|
|
|
|
)?.map((d, i) => (
|
|
|
|
|
<div key={`serial-${i}`}>
|
|
|
|
|
{d.SerialNumber}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
{/* IMEI */}
|
|
|
|
|
{item?.ProductIdentifierDtls?.filter(
|
|
|
|
|
(d) => d.IMEI1 || d.IMEI2
|
|
|
|
|
)?.map((d, i) => (
|
|
|
|
|
<div key={`imei-${i}`}>
|
|
|
|
|
{[d.IMEI1, d.IMEI2]
|
|
|
|
|
.filter(Boolean)
|
|
|
|
|
.join(', ')}
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
))}
|
|
|
|
|
|
|
|
|
|
{/* Description from first identifier */}
|
2026-03-09 17:13:55 +05:30
|
|
|
{item?.ProductIdentifierDtls?.length >
|
|
|
|
|
0 &&
|
|
|
|
|
item.ProductIdentifierDtls?.[0]
|
|
|
|
|
?.Description && (
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
item
|
|
|
|
|
.ProductIdentifierDtls?.[0]
|
|
|
|
|
?.Description
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-03-09 12:45:29 +05:30
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{UomPrint?.SettingValue === 'Y' && (
|
|
|
|
|
<>
|
|
|
|
|
({item?.Size || '1'}){' '}
|
|
|
|
|
{item?.SinglePc === 'Y'
|
|
|
|
|
? 'PCS'
|
|
|
|
|
: item?.Type !== 'C'
|
|
|
|
|
? item?.UomName
|
|
|
|
|
: 'COMBO'}{' '}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{item?.BrandName || ''}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Quantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-03-04 09:36:32 +05:30
|
|
|
: HsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-03-04 09:36:32 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.MRP}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-03-04 09:36:32 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.SinglePc === 'Y'
|
|
|
|
|
? item?.Rate
|
|
|
|
|
: item?.MRP}
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalTax && (
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
style={{
|
|
|
|
|
color: '#000',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
GST:{' '}
|
|
|
|
|
</span>{' '}
|
|
|
|
|
{item?.ProdTaxPercentage || 0}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
|
|
|
|
: Tax == true &&
|
|
|
|
|
table2Data?.OrderType !== 'E' && (
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{/* <span style={{ color: '#e30c0c' }}> */}
|
|
|
|
|
<span
|
|
|
|
|
style={{
|
|
|
|
|
color: '#000',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
GST:{' '}
|
|
|
|
|
</span>{' '}
|
|
|
|
|
{item?.ProdTaxPercentage || 0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item.discount}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.OfferAmt || item?.DiscountAmt || 0
|
|
|
|
|
: item?.OfferValue ||
|
|
|
|
|
item?.DiscountAmt ||
|
|
|
|
|
0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.TotalAmt}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{' '}
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.TotalAmt - (item?.OfferAmt || 0)
|
|
|
|
|
: item?.TotalAmt -
|
|
|
|
|
(item?.OfferValue || 0)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
)}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2026-03-03 09:56:17 +05:30
|
|
|
|
2026-01-27 18:27:29 +05:30
|
|
|
{DineInData?.length > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '100%',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Dine In
|
|
|
|
|
</div>
|
|
|
|
|
<div className="PrintStyle4-print-tableMaster">
|
|
|
|
|
<table className="PrintStyle4-print-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
{GlobaldummyData
|
2026-01-30 11:30:58 +05:30
|
|
|
? GlobalSlNo && <th style={{ width: '10px' }}>#</th>
|
|
|
|
|
: SLNO && <th style={{ width: '10px' }}>#</th>}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalItem && <th>Item</th>
|
|
|
|
|
: Item && <th>Item</th>}
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Quantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Qty
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: HsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
HSN
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'center' }}>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
MRP
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Dis{' '}
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
{/* {GlobaldummyData
|
|
|
|
|
? GlobalTax && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
width: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
GST
|
|
|
|
|
</th>
|
|
|
|
|
)
|
|
|
|
|
: Tax == true &&
|
|
|
|
|
table2Data?.OrderType !== 'E' && (
|
|
|
|
|
<th
|
|
|
|
|
style={{
|
|
|
|
|
width: '30px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
GST
|
|
|
|
|
</th>
|
|
|
|
|
)} */}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Rate
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<th style={{ width: '10px', textAlign: 'right' }}>
|
|
|
|
|
Amt
|
|
|
|
|
</th>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{(GlobaldummyData ? products : DineInData)?.map(
|
|
|
|
|
(item, index) => {
|
|
|
|
|
return (
|
2026-03-09 12:45:29 +05:30
|
|
|
<tr
|
|
|
|
|
key={index}
|
2026-03-05 16:45:06 +05:30
|
|
|
style={
|
2026-03-09 12:45:29 +05:30
|
|
|
index % 2 !== 1 && rowtypeStyle === 'even'
|
2026-03-05 16:45:06 +05:30
|
|
|
? {
|
2026-03-09 12:45:29 +05:30
|
|
|
...tableBodyStyle,
|
2026-03-05 16:45:06 +05:30
|
|
|
}
|
2026-03-09 12:45:29 +05:30
|
|
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
|
|
|
|
? {
|
|
|
|
|
...tableBodyStyle,
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
: {}
|
2026-03-09 12:45:29 +05:30
|
|
|
}
|
|
|
|
|
>
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSlNo && <td>{index + 1}</td>
|
|
|
|
|
: SLNO && <td>{index + 1}</td>}
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalItem && <td>{item?.ProdName}</td>
|
|
|
|
|
: Item && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>{item?.ProdName}</div>
|
|
|
|
|
{(
|
|
|
|
|
(item?.ProductIdentifierDtls?.length > 0
|
|
|
|
|
? item?.ProductIdentifierDtls.filter(
|
|
|
|
|
(items) => items.SerialNumber
|
|
|
|
|
)
|
|
|
|
|
.map(
|
|
|
|
|
(a, index) => ` ${a.SerialNumber}`
|
|
|
|
|
)
|
|
|
|
|
.join('')
|
|
|
|
|
: '') +
|
2026-03-09 17:13:55 +05:30
|
|
|
(item?.ProductIdentifierDtls?.length > 0
|
|
|
|
|
? item?.ProductIdentifierDtls.filter(
|
|
|
|
|
(item1) =>
|
|
|
|
|
item1.IMEI1 || item1.IMEI2
|
|
|
|
|
)
|
|
|
|
|
.map((item2) => {
|
|
|
|
|
const imei1 = item2.IMEI1 || '';
|
|
|
|
|
const imei2 = item2.IMEI2 || '';
|
|
|
|
|
return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
|
|
|
|
|
})
|
|
|
|
|
.join('')
|
|
|
|
|
: '') +
|
|
|
|
|
(item?.ProductIdentifierDtls?.length >
|
|
|
|
|
0 &&
|
|
|
|
|
item.ProductIdentifierDtls?.[0]
|
|
|
|
|
?.Description) && (
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
item.ProductIdentifierDtls?.[0]
|
|
|
|
|
?.Description
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-03-09 12:45:29 +05:30
|
|
|
).trim()}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQuantity && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
2026-03-04 09:36:32 +05:30
|
|
|
<div>
|
|
|
|
|
({item?.Size ? item?.Size : '1'}{' '}
|
|
|
|
|
{item?.SinglePc == 'Y'
|
|
|
|
|
? 'PCS'
|
|
|
|
|
: item?.Type != 'C'
|
|
|
|
|
? item?.UomName
|
|
|
|
|
: 'COMBO'}
|
|
|
|
|
)
|
|
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
</td>
|
|
|
|
|
)
|
|
|
|
|
: Quantity && (
|
|
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SalesQty}
|
|
|
|
|
{UomPrint?.SettingValue === 'Y' && (
|
|
|
|
|
<div>
|
|
|
|
|
({item?.Size ? item?.Size : '1'}{' '}
|
|
|
|
|
{item?.SinglePc == 'Y'
|
|
|
|
|
? 'PCS'
|
|
|
|
|
: item?.Type != 'C'
|
|
|
|
|
? item?.UomName
|
|
|
|
|
: 'COMBO'}
|
|
|
|
|
)
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalHsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: HsnCode && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.HSN}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalMRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.MRP}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: MRP && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.SinglePc === 'Y'
|
|
|
|
|
? item?.Rate
|
|
|
|
|
: item?.MRP}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalDiscount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item.discount}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Discount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.OfferAmt || item?.DiscountAmt || 0
|
|
|
|
|
: item?.OfferValue ||
|
|
|
|
|
item?.DiscountAmt ||
|
|
|
|
|
0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-30 11:30:58 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalTax && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.ProdTaxPercentage || 0}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-30 11:30:58 +05:30
|
|
|
: Tax == true &&
|
2026-03-09 12:45:29 +05:30
|
|
|
table2Data?.OrderType !== 'E' && (
|
|
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.ProdTaxPercentage || 0}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalRate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Rate && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.Rate}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalAmount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{item?.TotalAmt}
|
|
|
|
|
</td>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Amount && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<td style={{ textAlign: 'right' }}>
|
|
|
|
|
{' '}
|
|
|
|
|
{item?.Type !== 'C'
|
|
|
|
|
? item?.TotalAmt - (item?.OfferAmt || 0)
|
|
|
|
|
: item?.TotalAmt -
|
|
|
|
|
(item?.OfferValue || 0)}
|
|
|
|
|
</td>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</tr>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
)}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{DineInData?.length > 0 && TakeawayData?.length > 0 && (
|
2026-01-30 11:30:58 +05:30
|
|
|
<>
|
|
|
|
|
<hr className="PrintStyle4-print-dottline" />
|
|
|
|
|
<div>
|
|
|
|
|
<div>Takeaway: {Number(TakeawayTotal).toFixed(2)}</div>
|
|
|
|
|
<div>Dine In: {Number(DineInTotal).toFixed(2)} </div>
|
|
|
|
|
<hr className="PrintStyle3-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
2026-01-27 18:27:29 +05:30
|
|
|
)}
|
|
|
|
|
<div className="PrintStyle4-ThirdDivMaster">
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
|
|
|
|
className="print2subTotal"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
fontWeight: 500,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
padding: '5px 0',
|
2026-03-09 12:45:29 +05:30
|
|
|
...netAmountStyle,
|
2026-01-30 11:30:58 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>Sub Total</div>
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
2026-03-04 09:36:32 +05:30
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
2026-03-03 09:56:17 +05:30
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
</div>
|
|
|
|
|
|
2026-03-03 09:56:17 +05:30
|
|
|
<div
|
|
|
|
|
className="print2subTotal"
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '8px',
|
|
|
|
|
fontWeight: 400,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
padding: '5px 40px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div style={{ display: 'flex', gap: '10px' }}>
|
2026-03-03 09:56:17 +05:30
|
|
|
<div> ITEM :</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div>{GlobaldummyData ? '1,066' : productsData?.length}</div>
|
2026-03-03 09:56:17 +05:30
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div style={{ display: 'flex', gap: '10px' }}>
|
2026-03-03 09:56:17 +05:30
|
|
|
<div> QTY :</div>
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(productsData?.reduce((a, b) => a + b.SalesQty, 0))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{((totalGSTData?.length > 0 && totalGSTData?.[0]?.TaxAmt > 0) ||
|
2026-01-27 18:27:29 +05:30
|
|
|
(OrderDetailIGST?.length > 0 &&
|
|
|
|
|
OrderDetailIGST?.[0]?.TaxAmt > 0) ||
|
|
|
|
|
(OrderDetailVAT?.length > 0 &&
|
|
|
|
|
OrderDetailVAT?.[0]?.TaxAmt > 0)) &&
|
|
|
|
|
table2Data?.NetAmount !== 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
{/* --------- GST Breakup Details ----------- */}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-01-30 11:30:58 +05:30
|
|
|
{totalGSTData?.length > 0 &&
|
|
|
|
|
totalGSTData?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<div>
|
|
|
|
|
{totalGSTData?.map((item) => (
|
|
|
|
|
<div
|
|
|
|
|
key={item?.TaxPercentage}
|
|
|
|
|
style={{ fontFamily: 'Poppins' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>Taxable Amount</div>
|
|
|
|
|
<div>
|
|
|
|
|
{(
|
|
|
|
|
Number(table2Data?.NetAmount).toFixed(2) -
|
|
|
|
|
Number(item.CGST).toFixed(2) -
|
|
|
|
|
Number(item.SGST).toFixed(2)
|
|
|
|
|
)?.toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>CGST</div>
|
|
|
|
|
<div>{Number(item.CGST).toFixed(2)}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '11px',
|
|
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
<div>SGST</div>
|
|
|
|
|
<div>{Number(item.SGST).toFixed(2)}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontSize: '16px',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
borderBottom: '1px dashed #000',
|
|
|
|
|
color: '#000',
|
|
|
|
|
marginTop: '10px',
|
|
|
|
|
padding: '4px 0',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div>Total Amount</div>
|
|
|
|
|
<div>
|
2026-03-09 12:45:29 +05:30
|
|
|
<span style={{ fontFamily: 'Poppins' }}>
|
2026-01-30 11:30:58 +05:30
|
|
|
₹
|
|
|
|
|
</span>
|
|
|
|
|
{Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-01-30 11:30:58 +05:30
|
|
|
marginTop: '5px',
|
|
|
|
|
fontFamily: 'Poppins',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontSize: '10px',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
Rupees in words:{' '}
|
|
|
|
|
{(() => {
|
|
|
|
|
const num = Number(table2Data?.NetAmount);
|
|
|
|
|
const ones = [
|
|
|
|
|
'',
|
|
|
|
|
'one',
|
|
|
|
|
'two',
|
|
|
|
|
'three',
|
|
|
|
|
'four',
|
|
|
|
|
'five',
|
|
|
|
|
'six',
|
|
|
|
|
'seven',
|
|
|
|
|
'eight',
|
|
|
|
|
'nine',
|
|
|
|
|
'ten',
|
|
|
|
|
'eleven',
|
|
|
|
|
'twelve',
|
|
|
|
|
'thirteen',
|
|
|
|
|
'fourteen',
|
|
|
|
|
'fifteen',
|
|
|
|
|
'sixteen',
|
|
|
|
|
'seventeen',
|
|
|
|
|
'eighteen',
|
|
|
|
|
'nineteen',
|
|
|
|
|
];
|
|
|
|
|
const tens = [
|
|
|
|
|
'',
|
|
|
|
|
'',
|
|
|
|
|
'twenty',
|
|
|
|
|
'thirty',
|
|
|
|
|
'forty',
|
|
|
|
|
'fifty',
|
|
|
|
|
'sixty',
|
|
|
|
|
'seventy',
|
|
|
|
|
'eighty',
|
|
|
|
|
'ninety',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
if (num < 20) return ones[num];
|
|
|
|
|
if (num < 100)
|
|
|
|
|
return (
|
|
|
|
|
tens[Math.floor(num / 10)] +
|
|
|
|
|
(num % 10 ? ' ' + ones[num % 10] : '')
|
|
|
|
|
);
|
|
|
|
|
if (num < 1000)
|
|
|
|
|
return (
|
|
|
|
|
ones[Math.floor(num / 100)] +
|
|
|
|
|
' hundred' +
|
|
|
|
|
(num % 100
|
|
|
|
|
? ' ' +
|
2026-03-09 12:45:29 +05:30
|
|
|
(num % 100 < 20
|
|
|
|
|
? ones[num % 100]
|
|
|
|
|
: tens[
|
|
|
|
|
Math.floor((num % 100) / 10)
|
|
|
|
|
] +
|
|
|
|
|
(num % 10
|
|
|
|
|
? ' ' + ones[num % 10]
|
|
|
|
|
: ''))
|
2026-01-30 11:30:58 +05:30
|
|
|
: '')
|
|
|
|
|
);
|
|
|
|
|
return num.toString();
|
|
|
|
|
})()}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
))}
|
2026-01-30 11:30:58 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{OrderDetailIGST?.length > 0 &&
|
|
|
|
|
OrderDetailIGST?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
border: '0.01px dashed black',
|
|
|
|
|
margin: '10px 0 5px 10px',
|
|
|
|
|
width: '90%',
|
|
|
|
|
}}
|
|
|
|
|
></div>
|
|
|
|
|
<table style={{ width: '90%' }}>
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
></td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Taxable Amount
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
IGST
|
2026-01-27 18:27:29 +05:30
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Total Amount
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{OrderDetailIGST?.map((item) => (
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.TaxPercentage || 0}%
|
|
|
|
|
</td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.WithOutTaxAmount).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TaxAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TotalAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
))}
|
|
|
|
|
</table>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{OrderDetailVAT?.length > 0 &&
|
|
|
|
|
OrderDetailVAT?.[0]?.TaxAmt > 0 && (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
border: '0.01px dashed black',
|
|
|
|
|
margin: '10px 0 5px 10px',
|
|
|
|
|
width: '90%',
|
|
|
|
|
}}
|
|
|
|
|
></div>
|
|
|
|
|
<table style={{ width: '90%' }}>
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
></td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Taxable Amount
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-01-30 11:30:58 +05:30
|
|
|
VAT
|
2026-01-27 18:27:29 +05:30
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontWeight: '600',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Total Amount
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{OrderDetailVAT?.map((item) => (
|
|
|
|
|
<tr>
|
2026-01-30 11:30:58 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'right',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{item?.TaxPercentage || 0}%
|
|
|
|
|
</td>
|
2026-01-27 18:27:29 +05:30
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.WithOutTaxAmount).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TaxAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{Number(item.TotalAmt).toFixed(2)}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
))}
|
|
|
|
|
</table>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: '5px',
|
|
|
|
|
padding: 0,
|
2026-01-30 11:30:58 +05:30
|
|
|
fontSize: '12px',
|
2026-01-27 18:27:29 +05:30
|
|
|
fontWeight: '600',
|
2026-01-30 11:30:58 +05:30
|
|
|
fontFamily: ' Poppins',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? 'Cash'
|
|
|
|
|
: PaymentStatusSuccess?.length === 1
|
|
|
|
|
? PaymentStatusSuccess?.[0]?.PaymentTypeName
|
|
|
|
|
: ''}{' '}
|
|
|
|
|
Payment :
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
/-{' '}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-02-04 18:10:12 +05:30
|
|
|
{isEditedBill && lastTransaction && (
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
marginTop: '2px',
|
|
|
|
|
paddingTop: '2px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
borderTop: '1px dashed #000',
|
|
|
|
|
}}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '10px',
|
2026-03-04 09:36:32 +05:30
|
|
|
width: '90%',
|
2026-02-04 18:10:12 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{ display: 'flex', justifyContent: 'space-between' }}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ color: '#000', fontWeight: 600 }}>
|
|
|
|
|
Bill Gross Amount
|
|
|
|
|
</span>
|
|
|
|
|
<strong>
|
|
|
|
|
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
|
|
|
|
|
</strong>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
2026-02-04 18:10:12 +05:30
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
fontWeight: 600,
|
|
|
|
|
color:
|
|
|
|
|
lastTransaction?.AdjustmentType === 'REFUND'
|
|
|
|
|
? '#000'
|
|
|
|
|
: '#000',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-02-04 18:10:12 +05:30
|
|
|
<span>{'Adjustment Amount'}</span>
|
|
|
|
|
<span>
|
|
|
|
|
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
|
2026-03-04 09:36:32 +05:30
|
|
|
{Math.abs(
|
|
|
|
|
(lastTransaction?.BeforeAdjustment ?? 0) -
|
2026-03-09 12:45:29 +05:30
|
|
|
(lastTransaction?.AfterAdjustment ?? 0)
|
2026-03-04 09:36:32 +05:30
|
|
|
).toFixed(2)}
|
2026-02-04 18:10:12 +05:30
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-03-04 09:36:32 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
|
marginTop: '4px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ color: '#000', fontWeight: 600 }}>
|
|
|
|
|
Net Bill Amount
|
|
|
|
|
</span>
|
|
|
|
|
<strong>
|
|
|
|
|
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
|
|
|
|
|
</strong>
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-02-04 18:10:12 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalCredit && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
lineHeight: '14px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<h6>Advance Amount:</h6>
|
|
|
|
|
<h6>Opening Balance:</h6>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: CreditDetails &&
|
2026-03-09 12:45:29 +05:30
|
|
|
table2Data?.CustomerDetails?.length > 0 && (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'space-evenly',
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
lineHeight: '14px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{(() => {
|
|
|
|
|
const c = table2Data.CustomerDetails[0];
|
|
|
|
|
const items = [];
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
|
|
|
|
|
) {
|
|
|
|
|
if (c.OldCreditBal !== 0) {
|
|
|
|
|
items.push({
|
|
|
|
|
label:
|
|
|
|
|
c.OldCreditBal > 0
|
|
|
|
|
? 'Advance Amount'
|
|
|
|
|
: 'Opening Balance',
|
|
|
|
|
value: Math.abs(c.OldCreditBal).toFixed(2),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
if (c.CurrentCreditBal !== 0) {
|
2026-01-27 18:27:29 +05:30
|
|
|
items.push({
|
|
|
|
|
label:
|
2026-03-09 12:45:29 +05:30
|
|
|
c.CurrentCreditBal > 0
|
|
|
|
|
? 'Current Advance Amount'
|
|
|
|
|
: 'Current Balance Amount',
|
|
|
|
|
value: Math.abs(c.CurrentCreditBal).toFixed(2),
|
2026-01-27 18:27:29 +05:30
|
|
|
});
|
|
|
|
|
}
|
2026-03-05 16:45:06 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
return items.map((i, idx) => (
|
|
|
|
|
<p
|
|
|
|
|
key={idx}
|
|
|
|
|
style={{
|
|
|
|
|
display: 'grid',
|
|
|
|
|
gridTemplateColumns: '4fr 1fr 1fr',
|
|
|
|
|
// gridTemplateColumns: "auto auto auto",
|
|
|
|
|
margin: 0,
|
|
|
|
|
padding: 0,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<span style={{ textAlign: 'left' }}>{i.label}</span>
|
|
|
|
|
<span style={{ textAlign: 'center' }}>:</span>
|
|
|
|
|
<span style={{ textAlign: 'right' }}>{i.value}</span>
|
|
|
|
|
</p>
|
|
|
|
|
));
|
|
|
|
|
})()}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
<hr className="PrintStyle4-print-dottline" />
|
|
|
|
|
<div className="PrintStyle4-FourthDiv">
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalQrcodet && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
className="PrintStyle4-BrandImage"
|
|
|
|
|
src={GlobaldummyData ? Qrcode : ''}
|
|
|
|
|
alt="image"
|
|
|
|
|
/>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>Scan to Pay </div>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
₹
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Qrcodet &&
|
2026-03-09 12:45:29 +05:30
|
|
|
paymentTypeUPI && (
|
|
|
|
|
<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: '10px' }}>Scan to Pay </div>
|
|
|
|
|
<div style={{ fontSize: '10px' }}>
|
|
|
|
|
₹
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? '1,066'
|
|
|
|
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
|
|
|
</div>
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
2026-03-09 12:45:29 +05:30
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<div style={{}}>
|
|
|
|
|
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
2026-01-30 11:30:58 +05:30
|
|
|
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
2026-01-27 18:27:29 +05:30
|
|
|
YOUR ORDER NO:
|
|
|
|
|
{table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="PrintStyle4-FourthP">
|
2026-03-04 09:36:32 +05:30
|
|
|
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
2026-01-27 18:27:29 +05:30
|
|
|
<>
|
|
|
|
|
{/* <p>Split Payment:</p> */}
|
|
|
|
|
{Object.keys(aggregatedPayments).map((paymentType) => (
|
|
|
|
|
<div
|
|
|
|
|
key={paymentType}
|
|
|
|
|
style={{ margin: 0, padding: 0, fontSize: '12px' }}
|
|
|
|
|
>
|
|
|
|
|
{paymentType}:{' '}
|
|
|
|
|
{aggregatedPayments[paymentType].toFixed(2)}
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2026-02-04 18:10:12 +05:30
|
|
|
|
2026-01-27 18:27:29 +05:30
|
|
|
{GlobaldummyData && GlobalCashierName && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
{' '}
|
|
|
|
|
Cashier : Cashier Name
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{CashierName &&
|
|
|
|
|
CashierName !== undefined &&
|
|
|
|
|
CashierName !== null &&
|
|
|
|
|
!GlobaldummyData &&
|
|
|
|
|
CashierNameField && (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSmallwordings"
|
|
|
|
|
style={{ fontWeight: '600' }}
|
|
|
|
|
>
|
|
|
|
|
Cashier : {CashierName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{GlobaldummyData && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
{' '}
|
|
|
|
|
Customer : Customer Name
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{table2Data?.CustSuppName &&
|
|
|
|
|
table2Data?.CustSuppName !== undefined &&
|
|
|
|
|
table2Data?.CustSuppName !== null &&
|
|
|
|
|
!GlobaldummyData && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
Customer : {table2Data?.CustSuppName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{table2Data?.BookingTypeName == 'Dine In' &&
|
|
|
|
|
table2Data?.SalesTableLinkDetails?.[0]?.WaiterName && (
|
|
|
|
|
<div className="PrintStyle4-FourthSmallwordings">
|
|
|
|
|
Captain :{' '}
|
|
|
|
|
{table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{sportsAppPreference && MembershipApplied && (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
width: '100%',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
paddingTop: '10px',
|
|
|
|
|
}}
|
|
|
|
|
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
className="page-footerA4Style11"
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: 'auto',
|
|
|
|
|
pageBreakBefore: 'avoid',
|
|
|
|
|
pageBreakInside: 'avoid',
|
|
|
|
|
minHeight: 'auto',
|
2026-03-09 12:45:29 +05:30
|
|
|
...footerColorStyle,
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalIsnotes && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
<p style={{ padding: '0rem 1rem', fontSize: '10px' }}>
|
|
|
|
|
Notes : 10 days Return policy
|
|
|
|
|
</p>
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<hr className="PrintA4Style11-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Notestext && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div>
|
|
|
|
|
<p style={{ padding: '0rem 1rem' }}>{Notestext}</p>
|
2026-01-27 18:27:29 +05:30
|
|
|
|
2026-03-09 12:45:29 +05:30
|
|
|
<hr className="PrintA4Style11-print-dottline" />
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
|
|
|
|
''
|
|
|
|
|
) : (
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
width: '90%',
|
|
|
|
|
padding: '0 1rem',
|
|
|
|
|
justifyContent: GlobaltermsAndConditions
|
|
|
|
|
? 'space-between'
|
|
|
|
|
: 'flex-end',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobaltermsAndConditions && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
margin: '8px 0',
|
|
|
|
|
padding: '8px',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
width: '100%',
|
2026-03-05 16:45:06 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Terms & Conditions
|
|
|
|
|
</p>
|
|
|
|
|
<ol
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '12px',
|
|
|
|
|
paddingLeft: '18px',
|
|
|
|
|
margin: 0,
|
|
|
|
|
lineHeight: '1',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<li>
|
|
|
|
|
Once goods are sold, they are not exchangeable or
|
|
|
|
|
refundable.
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
Please check the product before leaving the counter.
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: TermsnAdCondition == true &&
|
2026-03-09 12:45:29 +05:30
|
|
|
TermsAndConditions?.length > 0 && (
|
|
|
|
|
<div
|
2026-03-05 16:45:06 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
margin: '8px 0',
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
width: '100%',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'flex-start',
|
2026-03-05 16:45:06 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<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>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
|
|
|
|
|
{GlobaldummyData
|
|
|
|
|
? GlobalSignature && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
|
paddingBottom: '1rem',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Signature
|
|
|
|
|
</p>
|
|
|
|
|
<img
|
|
|
|
|
style={{ width: '70px', height: '40px' }}
|
|
|
|
|
src={
|
|
|
|
|
GlobalSignatureImages
|
|
|
|
|
? GlobalSignatureImages
|
|
|
|
|
: signature
|
|
|
|
|
}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
2026-01-27 18:27:29 +05:30
|
|
|
: Signature == true && (
|
2026-03-09 12:45:29 +05:30
|
|
|
<div
|
2026-01-27 18:27:29 +05:30
|
|
|
style={{
|
2026-03-09 12:45:29 +05:30
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
marginTop: '1rem',
|
|
|
|
|
paddingBottom: '1rem',
|
2026-01-27 18:27:29 +05:30
|
|
|
}}
|
|
|
|
|
>
|
2026-03-09 12:45:29 +05:30
|
|
|
<p
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: '13px',
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
marginBottom: '6px',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Signature
|
|
|
|
|
</p>
|
|
|
|
|
<img
|
|
|
|
|
style={{ width: '100px', height: '60px' }}
|
|
|
|
|
src={SignatureImg}
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2026-01-27 18:27:29 +05:30
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{PrintGreeting?.SettingValue === 'Y' && (
|
|
|
|
|
<div
|
|
|
|
|
className="PrintStyle4-FourthSpan"
|
2026-01-30 11:30:58 +05:30
|
|
|
style={{ fontWeight: '600', fontSize: '12px' }}
|
2026-01-27 18:27:29 +05:30
|
|
|
>
|
|
|
|
|
Thank You Visit Again
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Printstyle4;
|