diff --git a/README.md b/README.md
deleted file mode 100644
index a1f2377..0000000
--- a/README.md
+++ /dev/null
@@ -1,2556 +0,0 @@
-# POZO Retail Web to Andriod by using capcitor package
-
-A short description of what the project does.
-
----
-
-## 📦 Prerequisites
-
-Make sure you have the following installed:
-
-- Node.js (v20+ recommended)
-- npm or yarn
-
----
-
-## 🔧 Required Changes Before Running the App
-
-Before running the application, make the following updates:
-
-### 1️⃣ Update Vite Config
-Open the file:
-
-
-// this is ProtecedRoute.jsx make sure need to cmd or add some thng like this before changing react to capcitor
-import { useEffect, useState } from 'react';
-import { Routes, Route, useNavigate } from 'react-router-dom';
-import { useDispatch } from 'react-redux';
-import {
- getEmpAccesData,
- GenerateLogout,
- getSAdminUserAccesData,
- PricingAppPricingName,
- checkSession,
- getCompBranchData,
- getCommonAppPreference,
- changeWarehouse,
-} from './Features/BrachLogin/BranchLogin.js';
-import { clearSession, getSession, sessionStore } from './Services/Others';
-import {
- FeatureAddon,
- GlobalFeatAddOnData,
-} from './Features/BookingScreen/BookingData/BookingData.js';
-import { Suspense } from 'react';
-import { gettableData } from './Features/PreferenceMaster/PreferenceMaster.js';
-import { useSelector } from 'react-redux';
-import { useTemplate } from './utils/useTemplate.js';
-
-const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
-const subDirectory = import.meta.env.BASE_URL;
-
-const ProtectedRoutes = ({ routesConfig }) => {
- // useTemplate(
- // getSession('CompId'),
- // getSession('BranchId'),
- // getSession('AppId')
- // );
- sessionStore('AppId', 2);
- sessionStore('BranchId', 791);
- sessionStore('AppName', 'Bakery');
- sessionStore('CompId', 657);
- sessionStore('MobileNo', '8888888888');
- sessionStore('UserType', 'Admin');
- sessionStore('UserId', 286);
- sessionStore('userName', 'Karthiga');
-
- sessionStore(
- 'auth','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiODg4ODg4ODg4OCIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLXJldGFpbC1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLWNvbW1vbi1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLXNtcy1lbWFpbC10ZW1wbGF0ZS1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLWNvbW1vbi1hcGkiXSwiZXhwIjoxNzc0NjM3OTA5LCJpc3MiOiJodHRwczovL2FwaS5wb3pvLmRldi9Kd3RUb2tlbiJ9.TWDS0cuHGIDW_16EH2RS4z2B-wnuuPmMNd_lre505qY'
- );
- const navigate = useNavigate();
- const dispatch = useDispatch();
- const UserType = getSession('UserType');
- const [hasRedirected, setHasRedirected] = useState(false);
- const AppId = getSession('AppId');
- const CompId = getSession('CompId');
- const BranchId = getSession('BranchId');
- const UserId = getSession('UserId');
- const sessionId = getSession('SessionId');
- const Warehouse = getSession('Warehouse');
- const [accessCheckComplete, setAccessCheckComplete] = useState(false);
- const FeatureAddonData = useSelector(GlobalFeatAddOnData);
- useTemplate(657, 791, 2);
-
- useEffect(() => {
- getApplicationPreference();
- }, []);
- //sri
- // useEffect(() => {
- // if (Warehouse) {
- // dispatch(changeWarehouse(true));
- // }
- // }, [Warehouse]);
- const getApplicationPreference = async () => {
- await dispatch(getCommonAppPreference(AppId)).unwrap();
- };
-
- const getEmpAccess = async () => {
- let data = {
- UserId: UserId,
- AppId: AppId,
- CompId: CompId,
- BranchId: BranchId,
- };
-
- const response = await dispatch(getEmpAccesData(data)).unwrap();
- if (response?.data?.statusCode === 1) {
- return response?.data?.data?.[0]?.EmpAccessDetails;
- }
- return null;
- };
-
- const getSadminUserAccess = async () => {
- let data = {
- UserId: UserId,
- AppId: AppId,
- };
- const response = await dispatch(getSAdminUserAccesData(data)).unwrap();
- if (response?.data?.statusCode === 1) {
- return response?.data?.data?.[0]?.AppMenuAccessDetails;
- }
- return null;
- };
-
- const Dinein = async () => {
- if (AppId && CompId && BranchId) {
- let DineinData = {
- AppId: AppId,
- CompId: CompId,
- BranchId: BranchId,
- UserId: UserId,
- };
- const response = await dispatch(gettableData(DineinData)).unwrap();
- if (response?.data?.statusCode === 1) {
- const SettingValueData = response?.data?.data
- ?.find((e) => e.AppId === AppId)
- ?.SettingDtlDetails?.some(
- (e) => e.SettingIdName === 'DineIn' && e.SettingValue === 'Y'
- );
- const EstimateValueData = response?.data?.data
- ?.find((e) => e.AppId === AppId)
- ?.SettingDtlDetails?.some(
- (e) => e.SettingIdName === 'Estimation' && e.SettingValue === 'Y'
- );
- return (SettingValueData, EstimateValueData);
- }
- }
- };
-
- const checkAccess = async (empAccess) => {
- if (!empAccess) return false;
- let DineinData,
- EstimateData = await Dinein();
- switch (empAccess) {
- case 'Dine In':
- case 'KOT':
- return !!DineinData;
- case 'Estimate':
- return !!EstimateData;
- default:
- return false; // Restrict access if no valid match found
- }
- };
-
- const getPricingName = async () => {
- if (!AppId || !UserId) return;
- const data = {
- appId: AppId,
- userId: UserId,
- };
- try {
- const response = await dispatch(PricingAppPricingName(data)).unwrap();
- const responseData = response?.data;
- const pricingData = responseData?.data;
- const hasAdvance = pricingData?.some(
- (item) => item.PricingName === 'Premium'
- );
- const hasProOrAdvance =
- hasAdvance ||
- pricingData.some((item) => item.PricingName === 'Customized');
- return (hasAdvance, hasProOrAdvance);
- } catch (error) {
- console.error('Error fetching pricing name:', error);
- }
- };
-
- const checkPlanAccess = async (empAccess, featureAddonData) => {
- if (!empAccess) return false;
- let Advance,
- ProORAdvance = await getPricingName();
- switch (empAccess) {
- case 'Product Catalogue':
- return (
- ProORAdvance ||
- featureAddonData?.some(
- (item) => item?.FeatureAddonName?.toLowerCase() === 'catalog'
- )
- );
- case 'Sales Setup':
- case 'Print Setup':
- return (
- Advance ||
- featureAddonData?.some(
- (item) =>
- item?.FeatureAddonName?.toLowerCase() === 'customized template'
- )
- );
- case 'Kiosk Setup':
- case 'Kiosk Sales':
- return featureAddonData?.some(
- (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales'
- );
- default:
- return false; // Restrict access if no valid match found
- }
- };
-
- const checkEmpAccess = async (empAccess, currentPath) => {
- if (!empAccess) return false;
- const Access = await getEmpAccess();
- let accessType;
- if (currentPath.endsWith('/new')) {
- accessType = 'AddAccess';
- } else if (currentPath.endsWith('/update')) {
- accessType = 'UpdateAccess';
- } else {
- accessType = 'ReadAccess';
- }
- // const config = Access?.find(config =>
- // config.ConfigName === empAccess && config[accessType] === 'Y'
- // );
- const config = Access?.find(
- (config) =>
- (config.ConfigName === empAccess && config[accessType] === 'Y') ||
- (currentPath.includes('supplier-master') &&
- (config.ConfigName === 'Supplier' ||
- config.ConfigName === 'Seller') &&
- config[accessType] === 'Y')
- );
-
- return !!config;
- };
-
- const checkSuperAdminUserAccess = async (empAccess, currentPath) => {
- console.log('empAccessData1', empAccess, currentPath);
- if (!empAccess) return false;
- const Access = await getSadminUserAccess();
- let accessType;
- if (currentPath.endsWith('/new')) {
- accessType = 'AddAccess';
- } else if (currentPath.endsWith('/update')) {
- accessType = 'UpdateAccess';
- } else {
- accessType = 'ReadAccess';
- }
- console.log('empAccessData2', Access, accessType);
- // const config = Access?.find(config =>
- // config.MenuName === empAccess && config[accessType] === 'Y'
- // );
- const config = Access?.find(
- (config) =>
- (config.MenuName === empAccess && config[accessType] === 'Y') ||
- (currentPath.includes('supplier-master') &&
- (config.MenuName === 'Supplier' || config.MenuName === 'Seller') &&
- config[accessType] === 'Y')
- );
- console.log('empAccessData3', config);
-
- return !!config;
- };
-
- const getEmpAccessFromChildren = (route, currentPath) => {
- if (route.path === currentPath) {
- return route.empAccess || null;
- }
-
- if (route.children) {
- for (const child of route.children) {
- const childPath = `${route.path}/${child.path}`;
- if (childPath === currentPath) {
- return child.empAccess || null;
- }
- }
- }
-
- return null;
- };
-
- const getEmpAccessDataFromChildren = (route, currentPath) => {
- if (route.path === currentPath) {
- return route.access || null;
- }
- if (route.children) {
- for (const child of route.children) {
- const childPath = `${route.path}/${child.path}`;
- if (childPath === currentPath) {
- return child.access || null;
- }
- }
- }
- return null;
- };
-
- const fetchBranchData = async () => {
- const response = await dispatch(
- getCompBranchData({ CompId: CompId, AppId: AppId })
- ).unwrap();
- if (response?.data?.statusCode === 1) {
- if (response?.data?.data?.length == 1) {
- navigate(`${subDirectory}`);
- } else {
- navigate(`${subDirectory}app-page/branch-login`);
- }
- }
- };
-
-
- const Logout = async () => {
- const status = 'N'; // replace with your actual status
- const res = await dispatch(GenerateLogout({ UserId, status })).unwrap();
- if (res?.data?.statusCode === 1) {
- sessionStorage.clear();
- window.location.replace(`${commonUrl}`);
- }
- };
-
- const renderRoutes = (routes) => {
- return routes.map(({ path, component: Component, children }) => {
- const fullPath = `${path}`;
-
- if (!Component) {
- console.error(`Component not found for path: ${fullPath}`);
- return null;
- }
-
- if (children) {
- return (
- }>
- {children.map(({ path: childPath, component: ChildComponent }) => {
- if (!ChildComponent) {
- console.error(
- `Child component not found for path: ${childPath}`
- );
- return null;
- }
- return (
- }
- />
- );
- })}
-
- );
- }
-
- return } />;
- });
- };
-
- return (
- }>
- {renderRoutes(routesConfig)}
-
- );
-};
-
-export default ProtectedRoutes;
-/// Routes config
-import React from 'react';
-import { lazy } from 'react';
-const CommonMaster = lazy(
- () => import('./Pages/CommonMaster/CommonMaster.jsx')
-);
-const ConfigType = lazy(() => import('./Pages/ConfigType/ConfigTypeForm.jsx'));
-const AdminTax = lazy(() => import('./Pages/AdminTax/AdminTaxForm.jsx'));
-const ProductForm = lazy(() => import('./Pages/Product/ProductForm.jsx'));
-const Sport_ProductForm = lazy(
- () => import('./Pages/Product/SportsMaster.jsx')
-);
-const ShiftMasterList = lazy(
- () => import('./Pages/ShiftMaster/ShiftMasterList.jsx')
-);
-const ShiftMasterForm = lazy(
- () => import('./Pages/ShiftMaster/ShiftMasterForm.jsx')
-);
-const EmployeeMasterList = lazy(
- () => import('./Pages/EmpMaster/EmpMasterList.jsx')
-);
-const EmployeeMasterForm = lazy(
- () => import('./Pages/EmpMaster/EmpMasterForm.jsx')
-);
-
-const SupplierMasterList = lazy(
- () => import('./Pages/SupplierMaster/SupplierMasterList.jsx')
-);
-const SupplierMasterForm = lazy(
- () => import('./Pages/SupplierMaster/SupplierMasterForm.jsx')
-);
-
-const ComponentMasterForm = lazy(
- () => import('./Pages/UiComponentPage/ComponentForm.jsx')
-);
-const ComponentMasterList = lazy(
- () => import('./Pages/UiComponentPage/ComponentList.jsx')
-);
-
-const CustomerForm = lazy(
- () => import('./Pages/CustomerMaster/CustMasterForm.jsx')
-);
-const CustomerMasterList = lazy(
- () => import('./Pages/CustomerMaster/CustMasterList.jsx')
-);
-
-const DateWiseReport = lazy(
- () => import('./Pages/Reports/DateWiseReport/DateWiseReport.jsx')
-);
-
-const ItemWiseReport = lazy(
- () => import('./Pages/Reports/ItemWiseReport/ItemWiseReport.jsx')
-);
-
-const Reprint = lazy(
- () =>
- import('./Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx')
-);
-
-const BookingSelectionPage = lazy(
- () => import('./Pages/BookingScreen/Components/MainPage/MainPage.jsx')
-);
-
-const PrintSelectionPage = lazy(
- () => import('./Pages/BookingScreen/Components/PrintMainPage/MainPage.jsx')
-);
-const KioskMainPage = lazy(
- () => import('./Pages/BookingScreen/Components/Kiosk/KioskMainPage.jsx')
-);
-
-const BookingPage = lazy(() => import('./Pages/BookingScreen/BookingPage.jsx'));
-
-const StockForm = lazy(() => import('./Pages/StockMaster/StockForm.jsx'));
-
-const StockList = lazy(() => import('./Pages/StockMaster/StockList.jsx'));
-
-const DiningMasterList = lazy(() => import('./Pages/Dining/DiningList.jsx'));
-
-const DiningMasterForm = lazy(() => import('./Pages/Dining/DiningForm.jsx'));
-
-const TableBooking = lazy(
- () => import('./Pages/Tablebooking/TableBooking.jsx')
-);
-
-const ComboMaster = lazy(() => import('./Pages/ComboPack/ComboMaster.jsx'));
-
-const ComboList = lazy(() => import('./Pages/ComboPack/ComboMasterlist.jsx'));
-const EmpAccessForm = lazy(() => import('./Pages/EmpAccess/EmpAccessForm.jsx'));
-const EmpAccessList = lazy(() => import('./Pages/EmpAccess/EmpAccessList.jsx'));
-
-const EmpScreenAccessList = lazy(
- () => import('./Pages/EmpScreenAccess/EmpScreenAccessList.jsx')
-);
-const EmpScreenRightsAccess = lazy(
- () => import('./Pages/EmpScreenAccess/EmpScreenRightsAccess.jsx')
-);
-
-const PreferenceList = lazy(
- () => import('./Pages/Preference/PreferenceList.jsx')
-);
-
-const PaymentOptions = lazy(
- () => import('./Pages/Payment/PaymentOptions/PaymentOptions.jsx')
-);
-const PaymentDetails = lazy(
- () => import('./Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx')
-);
-const PaymentDetailsList = lazy(
- () => import('./Pages/Payment/PaymentDetails/PaymentDetailsList.jsx')
-);
-const PaymentReceivedRetail = lazy(
- () =>
- import('./Pages/Payment/PaymentReceivedRetail/PaymentReceivedRetail.jsx')
-);
-
-const ExtraChargesList = lazy(
- () => import('./Pages/ExtraCharges/ExtraChargesList.jsx')
-);
-
-const BranchLogin = lazy(() => import('./Pages/BranchLogin/BranchLogin.jsx'));
-const BackToBranchLogin = lazy(
- () => import('./Pages/BranchLogin/BackToBranchLogin.jsx')
-);
-const Logout = lazy(() => import('./Pages/Logout.jsx'));
-
-const BacktoLogin = lazy(() => import('./Pages/BranchLogin/BacktoLogin.jsx'));
-
-const StockPriceUpdate = lazy(
- () => import('./Pages/StockPriceUpdate/StockPriceUpdate.jsx')
-);
-
-const ProductCatalogueList = lazy(
- () => import('./Pages/ProductCatlogue/ProductcatlogueList.jsx')
-);
-
-const KOT = lazy(() => import('./Pages/Reports/KOT/kot.jsx'));
-
-const CustomerKOTDisplay = lazy(
- () => import('./Pages/Reports/KOT/CustomerKOTDisplay.jsx')
-);
-
-const RedirectApps = lazy(() => import('./Pages/RedirectApps.jsx'));
-
-const WSTransaction = lazy(
- () => import('./Pages/WholeSaleTransaction/WSSalesTransaction.jsx')
-);
-
-const LedgerReport = lazy(
- () => import('./Pages/Reports/LedgerReport/LedgerReport.jsx')
-);
-const PaymentDetailsPage = lazy(
- () =>
- import('./Pages/BookingScreen/Components/BookingFunctionality/PaymentDetailsPage.jsx')
-);
-
-const CreditCustomerPrint = lazy(
- () =>
- import('./Pages/BookingScreen/Components/BookingFunctionality/CreditDownloadpage.jsx')
-);
-
-const Cancellation = lazy(
- () => import('./Pages/CancelReschedule/Cancellation.jsx')
-);
-
-const ChangePaymentmode = lazy(
- () => import('./Pages/CancelReschedule/ChangePaymentmode.jsx')
-);
-
-const CancellationList = lazy(
- () => import('./Pages/CancelReschedule/CancellationList.jsx')
-);
-
-const CancelApplicableProd = lazy(
- () => import('./Pages/CancelReschedule/CancelApplicableProd.jsx')
-);
-
-const CancellationListPending = lazy(
- () => import('./Pages/CancelReschedule/CancelPendingPayment.jsx')
-);
-
-const AndroidApp = lazy(() => import('./Pages/AndroidApp/AndroidApp.jsx'));
-
-const EstimateItemWiseReport = lazy(
- () => import('./Pages/Reports/Estimate/EstimateItemWiseReport.jsx')
-);
-
-const EstimateDateWiseReport = lazy(
- () => import('./Pages/Reports/Estimate/EstimateDateWiseReport.jsx')
-);
-
-const OfferForm = lazy(() => import('./Pages/Offer/Offer/OfferFormNew.jsx'));
-
-const OfferList = lazy(() => import('./Pages/Offer/Offer/OfferListNew.jsx'));
-
-const ItemWise = lazy(() => import('./Pages/Offer/ItemOffer/ItemWiseForm.jsx'));
-const SalesWiseForm = lazy(
- () => import('./Pages/Offer/SalesOffer/SalesWiseForm.jsx')
-);
-const SalesWiseList = lazy(
- () => import('./Pages/Offer/SalesOffer/SalesWiseList.jsx')
-);
-
-const QuantityWise = lazy(
- () => import('./Pages/Offer/QuantityOffer/QuantityWiseForm.jsx')
-);
-
-const BuyOneGetOneForm = lazy(
- () => import('./Pages/Offer/BuyOneGetOneOffer/BuyOneGetOneForm.jsx')
-);
-
-const LoyaltyPointsList = lazy(
- () => import('./Pages/Offer/LoyaltyPoints/LoyaltyPointsList.jsx')
-);
-
-const BundleOfferForm = lazy(
- () => import('./Pages/Offer/BundleOffer/BundleOfferForm.jsx')
-);
-const BundleOfferList = lazy(
- () => import('./Pages/Offer/BundleOffer/BundleOfferList.jsx')
-);
-const CouponWiseOfferlist = lazy(
- () => import('./Pages/Offer/CouponOffer/CouponWiseOfferlist.jsx')
-);
-
-const PromocodeList = lazy(
- () => import('./Pages/Offer/PromoCode/PromocodeList.jsx')
-);
-
-const OfferCodeList = lazy(
- () => import('./Pages/Offer/OfferCode/OfferCodeList.jsx')
-);
-
-const PricingPage = lazy(
- () =>
- import('./Pages/BookingScreen/Components/UtillComponents/PricingPage.jsx')
-);
-
-const PurchaseOrder = lazy(
- () => import('./Pages/PurchaseOrder/PurchaseOrder.jsx')
-);
-
-const PurchaseOrderMail = lazy(
- () => import('./Pages/PurchaseOrder/PurchaseOrderMail.jsx')
-);
-
-const PurchaseOrderList = lazy(
- () => import('./Pages/PurchaseOrder/PurchaseOrderList.jsx')
-);
-
-const StockReceivedList = lazy(
- () => import('./Pages/StockTransfer/StockReceivedList.jsx')
-);
-
-const GstInvoiceSetUpForm = lazy(
- () => import('./Pages/GstInvoiceSetup/GstInvoiceSetUpForm.jsx')
-);
-
-const gstInvoiceSetUpList = lazy(
- () => import('./Pages/GstInvoiceSetup/GstInvoiceSetupList.jsx')
-);
-
-const StockinHand = lazy(() => import('./Pages/StockinHand/StockinHand.jsx'));
-
-const PurchaseReturn = lazy(
- () => import('./Pages/PurchaseReturn/purchaseReturn.jsx')
-);
-
-const PurchaseReturnget = lazy(
- () => import('./Pages/PurchaseReturn/PurchaseReturnGet.jsx')
-);
-
-const KioskBookingPage = lazy(
- () => import('./Pages/Kiosk/KioskBookingPage.jsx')
-);
-
-const KioskBookingReceipt = lazy(
- () => import('./Pages/Kiosk/PaymentGateway/PaymentGatewayReceipt.jsx')
-);
-
-const KioskComponentList = lazy(
- () => import('./Pages/KioskComponent/KioskComponentList.jsx')
-);
-
-const CustomerDisplay = lazy(
- () => import('./Pages/CustomerDisplay/CustomerDisplay.jsx')
-);
-
-const PurchaseQuotationForm = lazy(
- () => import('./Pages/PurchaseQuotation/PurchaseQuotationForm.jsx')
-);
-
-const DeliveryChallanForm = lazy(
- () => import('./Pages/DeliveryChallan/Deliverychallan.jsx')
-);
-
-const DeliveryChallanList = lazy(
- () => import('./Pages/DeliveryChallan/DeliverychallanList.jsx')
-);
-
-const ComboOfferMaster = lazy(
- () => import('./Pages/Offer/ComboOfferPack/ComboOfferForm.jsx')
-);
-
-const PaymentDeviceForm = lazy(
- () => import('./Pages/Payment/PaymentDevice/PaymentDeviceForm.jsx')
-);
-const PaymentFailedDetailsList = lazy(
- () =>
- import('./Pages/Payment/PaymentFailedDetails/PaymentFailedDetailsList.jsx')
-);
-
-const CounterCategoryMappingForm = lazy(
- () => import('./Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx')
-);
-
-const ImageBulkUpload = lazy(
- () => import('./Pages/ImageBulkUpload/ImageBulkUpload.jsx')
-);
-
-const WholesaleBookingPage = lazy(
- () => import('./Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.jsx')
-);
-
-const WholeSaleProductList = lazy(
- () => import('./Pages/Wholesale/ProductList.jsx')
-);
-
-const ProductEntry = lazy(() => import('./Pages/Wholesale/ProductEntry.jsx'));
-
-const ProductEntryList = lazy(
- () => import('./Pages/Wholesale/ProductEntryList.jsx')
-);
-const ItemEntry = lazy(
- () => import('./Pages/Wholesale/ItemEntry/ItemEntry.jsx')
-);
-
-const WsPreorder = lazy(
- () => import('./Pages/Wholesalespreorder/WholesalePreorderList.jsx')
-);
-
-const WsPreorderForm = lazy(
- () => import('./Pages/Wholesalespreorder/WholesalePreorderForm.jsx')
-);
-
-const ExtraChrgesList = lazy(
- () => import('./Pages/Wholesale/ItemEntry/ExtraChrgesList.jsx')
-);
-
-const SalesBillCancel = lazy(
- () => import('./Pages/SalesRemoval/SalesBillCancelList.jsx')
-);
-
-const WholeSaleAbstract = lazy(
- () => import('./Pages/WholeSaleAbstract/WholeSaleAbstract.jsx')
-);
-
-const WholeSaleSellerAbstract = lazy(
- () => import('./Pages/WholeSaleAbstract/WholeSaleSellerAbstract.jsx')
-);
-
-const PaymentReceived = lazy(
- () => import('./Pages/WholeSaleTransaction/PaymentReceived.jsx')
-);
-
-const WholeSaleSalesReport = lazy(
- () => import('./Pages/WholeSaleReport/WholeSalesSalesReport.jsx')
-);
-
-const WholeSalePurchaseReport = lazy(
- () => import('./Pages/WholeSaleReport/WholeSalePurchaseReport.jsx')
-);
-const WholeSalePaymentPurchaseReport = lazy(
- () =>
- import('./Pages/WholesalePaymentReport/WholeSalePaymentPurchaseReport.jsx')
-);
-
-const WholeSalePaymentSalesReport = lazy(
- () =>
- import('./Pages/WholesalePaymentReport/WholeSalePaymementSaleReport.jsx')
-);
-
-const SpeechLanguagesList = lazy(
- () => import('./Pages/SpeechLanguages/SpeechLanguagesList.jsx')
-);
-
-const LegderList = lazy(
- () => import('./Pages/WholeSaleLedger/WholeSaleLedger.jsx')
-);
-
-const SellerMasterTran = lazy(
- () => import('./Pages/WholeSaleTransaction/SellerMasterTransaction.jsx')
-);
-
-const TicketForm = lazy(() => import('./Pages/Ticket/TicketForm.jsx'));
-
-const ThemeCreation = lazy(
- () => import('./Pages/BookingScreen/Components/ThemeCreation/ThemeList.jsx')
-);
-
-const ThemeSelection = lazy(
- () =>
- import('./Pages/BookingScreen/Components/ThemeCreation/ThemePreview.jsx')
-);
-
-const BarcodeTemplateSetup = lazy(
- () => import('./Pages/BarcodeSetup/BarcodeTemplateSetup.jsx')
-);
-
-const BarcodeComponentList = lazy(
- () => import('./Pages/BarcodeComponent/BarcodeComponentList.jsx')
-);
-
-const StoreRecipelist = lazy(
- () => import('./Pages/StoreKitchen/StoreRecipe/StoreRecipelist.jsx')
-);
-
-const StoreRecipeform = lazy(
- () => import('./Pages/StoreKitchen/StoreRecipe/StoreRecipeform.jsx')
-);
-
-const Storekitchenlist = lazy(
- () => import('./Pages/StoreKitchen/StoretoKitchen/StoretoKitchenlist.jsx')
-);
-
-const StoreKitchenform = lazy(
- () => import('./Pages/StoreKitchen/StoretoKitchen/Storetokitchenform.jsx')
-);
-import { getSession, sessionStore } from './Services/Others';
-import axios from 'axios';
-const KitchenFinishlist = lazy(
- () => import('./Pages/StoreKitchen/StoreKitchenFinish/KitchenFinishlist.jsx')
-);
-const KitechenFinishform = lazy(
- () => import('./Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx')
-);
-
-const FreeProductList = lazy(
- () => import('./Pages/FreeProducts/FreeProduct/FreeProductList.jsx')
-);
-
-const FreePurchaseEnteryForm = lazy(
- () =>
- import('./Pages/FreeProducts/FreePurchase/FreePurchaseEntery/FreePurchaseEnteryForm.jsx')
-);
-const FreePurchaseEnteryList = lazy(
- () =>
- import('./Pages/FreeProducts/FreePurchase/FreePurchaseEntery/FreePurchaseEnteryList.jsx')
-);
-
-const FreePurchaseOrderList = lazy(
- () =>
- import('./Pages/FreeProducts/FreePurchase/FreePurchaseOrder/FreePurchaseOrderList.jsx')
-);
-const FreePurchaseOrderForm = lazy(
- () =>
- import('./Pages/FreeProducts/FreePurchase/FreePurchaseOrder/FreePurchaseOrderForm.jsx')
-);
-
-const FreePurchaseReturnList = lazy(
- () =>
- import('./Pages/FreeProducts/FreePurchase/FreePurchaseReturn/FreePurchaseReturnList.jsx')
-);
-const FreePurchaseReturnForm = lazy(
- () =>
- import('./Pages/FreeProducts/FreePurchase/FreePurchaseReturn/FreePurchaseReturnForm.jsx')
-);
-const CommonForm = lazy(
- () => import('./Pages/Offer/LoyaltyPoints/CommonForm.jsx')
-);
-
-const ReprintReasonReportList = lazy(
- () =>
- import('./Pages/Reports/ReprintReasonReport/ReprintReasonReportList.jsx')
-);
-
-const RevenueItemWiseReport = lazy(
- () => import('./Pages/Reports/Revenue/RevenueItemWiseReport.jsx')
-);
-
-const LinkUrlCreate = lazy(
- () => import('./Pages/paymentpdfPage/LinkUrlCreate.jsx')
-);
-
-const SupplierProductMapping = lazy(
- () => import('./Pages/SupplierProductMapping/SupplierProductMapping.jsx')
-);
-
-const RedirectUserProfile = lazy(
- () => import('./Pages/RedirectUserProfile.jsx')
-);
-
-const RelieveRequestForm = lazy(
- () => import('./Pages/EmpMaster/EmpRelieve.jsx')
-);
-
-const PurchaseQuotationList = lazy(
- () => import('./Pages/PurchaseQuotation/PurchaseQuotationList.jsx')
-);
-
-const ExchangeAndReplacementList = lazy(
- () => import('./Pages/ExchangeAndReplacement/ExchangeAndReplacementList.jsx')
-);
-const ExchangeAndReplacementForm = lazy(
- () => import('./Pages/ExchangeAndReplacement/ExchangeAndReplacementForm.jsx')
-);
-
-const ExchangeReturnMapForm = lazy(
- () => import('./Pages/ExchangeReturnMap/ExchangeReturnMapForm.jsx')
-);
-const ExchangeReturnMapList = lazy(
- () => import('./Pages/ExchangeReturnMap/ExchangeReturnMapList.jsx')
-);
-
-const OtherServicesForm = lazy(
- () => import('./Pages/OtherServices/OtherServicesForm.jsx')
-);
-const OtherServicesList = lazy(
- () => import('./Pages/OtherServices/OtherServicesList.jsx')
-);
-const EmpCommisionOrIncentiveForm = lazy(
- () =>
- import('./Pages/EmpCommissionOrIncentive/EmpCommisionOrIncentiveForm.jsx')
-);
-
-const EmpCommisionOrIncentiveList = lazy(
- () =>
- import('./Pages/EmpCommissionOrIncentive/EmpCommisionOrIncentiveList.jsx')
-);
-
-const SalesBillProductsReturnList = lazy(
- () => import('./Pages/CancelReschedule/SalesBillProductReturnList.jsx')
-);
-
-const SalesBillProductsReturn = lazy(
- () => import('./Pages/CancelReschedule/SalesBillProductsReturn.jsx')
-);
-
-const DeliveryChallanToInvoiceForm = lazy(
- () =>
- import('./Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx')
-);
-
-const DeliveryChallanToInvoiceList = lazy(
- () =>
- import('./Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceList.jsx')
-);
-
-const TipAmountSettlementList = lazy(
- () =>
- import('./Pages/Reports/TipAmountSettlement/TipAmountSettlementList.jsx')
-);
-
-const EmployeeSettlement = lazy(
- () => import('./Pages/Reports/EmployeeSettlement/EmployeeSettlement.jsx')
-);
-const Settlement = lazy(
- () => import('./Pages/Reports/TipAmountSettlement/Settlement.jsx')
-);
-const PublicQrCode = lazy(() => import('./Pages/Reports/PublicQrCode.jsx'));
-
-const TableMapping = lazy(
- () => import('./Pages/TableMapping/TableMapping.jsx')
-);
-const TableMAppingList = lazy(
- () => import('./Pages/TableMapping/TableMAppingList.jsx')
-);
-
-const PurchaseOrderReport = lazy(
- () => import('./Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx')
-);
-
-const SalesOrder = lazy(() => import('./Pages/SalesOrder/SalesOrder.jsx'));
-
-const LoyaltyBased = lazy(
- () => import('./Pages/Offer/LoyaltyBased/LoyaltyBased.jsx')
-);
-const LoyaltyBasedList = lazy(
- () => import('./Pages/Offer/LoyaltyBased/LoyaltyBasedList.jsx')
-);
-const CodeBase = lazy(() => import('./Pages/Offer/CodeBase/CodeBase.jsx'));
-const CodeBaseList = lazy(
- () => import('./Pages/Offer/CodeBase/CodeBaseList.jsx')
-);
-
-const TurboAddForm = lazy(() => import('./Pages/Product/TurboAddForm.jsx'));
-
-const ProductMaster = lazy(() => import('./Pages/Product/ProductMaster.jsx'));
-
-const GatewayMasterConfiguration = lazy(
- () =>
- import('./Pages/GatewayMasterConfiguration/GatewayMasterConfiguration.jsx')
-);
-const GatewayMasterConfigurationList = lazy(
- () =>
- import('./Pages/GatewayMasterConfiguration/GatewayMasterConfigurationList.jsx')
-);
-
-const MembershipForm = lazy(
- () => import('./Pages/Membership/MembershipForm.jsx')
-);
-const MembershipList = lazy(
- () => import('./Pages/Membership/MembershipList.jsx')
-);
-const SlotManagementForm = lazy(
- () => import('./Pages/SlotManagement/SlotManagement.jsx')
-);
-const SlotManagementList = lazy(
- () => import('./Pages/SlotManagement/SlotManagementList.jsx')
-);
-
-const BookingReScedule = lazy(
- () => import('./Pages/CancelReschedule/BookingReScedule.jsx')
-);
-const BookingReSceduleList = lazy(
- () => import('./Pages/CancelReschedule/BookingReSceduleList.jsx')
-);
-
-const MembershipReport = lazy(
- () => import('./Pages/Reports/Membership/MembershipReport.jsx')
-);
-const OpeningStock = lazy(
- () => import('./Pages/openingStock/openingstockForm.jsx')
-);
-const OpeningStockList = lazy(
- () => import('./Pages/openingStock/OpeningStockList.jsx')
-);
-
-const StockAdjustment = lazy(
- () => import('./Pages/StockAdjustment/StockAdjustment.jsx')
-);
-const StockAdjustmentList = lazy(
- () => import('./Pages/StockAdjustment/StockAdjustmentList.jsx')
-);
-const TopSellingProducts = lazy(
- () => import('./Pages/DashBoard/TopSellingProductsChart.jsx')
-);
-
-const AutomatedReorder = lazy(
- () => import('./Pages/Automated Reorder/AutomatedReorder.jsx')
-);
-const AutomatedReorderList = lazy(
- () => import('./Pages/Automated Reorder/AutomatedReorderList.jsx')
-);
-
-const CustomerPurchaseConfirm = lazy(
- () =>
- import('./Pages/PurchaseOrder/CustomerPurchaseConfirm/CustomerPurchaseConfirm.jsx')
-);
-
-const MenuQRCode = lazy(
- () => import('./Pages/Reports/MenuQRCode/MenuQRCode.jsx')
-);
-
-const PurchaseLink = lazy(
- () => import('./Pages/PurchaseOrder/CustomerPurchaseConfirm/PurchaseLink.jsx')
-);
-const RackForm = lazy(() => import('./Pages/Rack/RackForm.jsx'));
-const RackList = lazy(() => import('./Pages/Rack/RackList.jsx'));
-
-const CreateTransfer = lazy(
- () => import('./Pages/StockTransfer/CreateTransfer.jsx')
-);
-const Dispatch = lazy(() => import('./Pages/StockTransfer/Dispatch.jsx'));
-const StockTransferList = lazy(
- () => import('./Pages/StockTransfer/TransferList.jsx')
-);
-
-const ComboLayout3 = lazy(
- () => import('./Pages/BookingScreen/Template/ComboLayout3/ComboLayout3.jsx')
-);
-
-const Productcatlogue = lazy(
- () => import('./Pages/ProductCatlogue/Productcatalogue.jsx')
-);
-
-const subDirectory = import.meta.env.BASE_URL;
-const apiCommonUrl = import.meta.env.ENV_API_URL_COMMON;
-
-const initSession = () => {
- sessionStore('AppId', 2);
- sessionStore('BranchId', 791);
- sessionStore('AppName', 'Bakery');
- sessionStore('CompId', 657);
- sessionStore('MobileNo', '8888888888');
- sessionStore('UserType', 'Admin');
- sessionStore('UserId', 286);
- sessionStore('userName', 'Karthiga');
-
- sessionStore(
- 'auth','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiODg4ODg4ODg4OCIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLXJldGFpbC1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLWNvbW1vbi1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLXNtcy1lbWFpbC10ZW1wbGF0ZS1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLWNvbW1vbi1hcGkiXSwiZXhwIjoxNzc0NjM3OTA5LCJpc3MiOiJodHRwczovL2FwaS5wb3pvLmRldi9Kd3RUb2tlbiJ9.TWDS0cuHGIDW_16EH2RS4z2B-wnuuPmMNd_lre505qY'
- );
-};
-
-const getAppType = async () => {
- // 🔥 If already stored, don't call API again
- const storedType = getSession('AppType');
- if (storedType) {
- return storedType === 'Wholesale';
- }
-
- const AppId = getSession('AppId');
- if (!AppId) return null;
-
- const response = await axios.get(
- `${apiCommonUrl}/application?AppId=${AppId}`
- );
-
- const subCategoryName =
- response?.data?.data?.[0]?.SubCategoryName?.toLowerCase();
-
- const isWholesale = subCategoryName === 'wholesale';
-
- sessionStore('AppType', isWholesale ? 'Wholesale' : 'Sale');
-
- return isWholesale;
-};
-
-const fetchComponent = async () => {
- try {
- initSession();
-
- const isWholesale = await getAppType();
- if (isWholesale === null) return null;
-
- return isWholesale
- ? import('./Pages/AppPage/WholesaleAppPage.jsx')
- : import('./Pages/AppPage/AppPage.jsx');
- } catch (err) {
- console.error('API call failed:', err);
- return null;
- }
-};
-const fetchHomeComponent = async () => {
- try {
- initSession();
-
- const isWholesale = await getAppType();
- if (isWholesale === null) return null;
-
- return isWholesale
- ? import('./Pages/DashBoard/WholesaleDashboard.jsx')
- : import('./Pages/DashBoard/RetailDashboard.jsx');
- } catch (err) {
- console.error('API call failed:', err);
- return null;
- }
-};
-
-export const routesConfig = [
- { path: `${subDirectory}customer-display`, component: CustomerDisplay },
- { path: `${subDirectory}PricingPage`, component: PricingPage },
- {
- path: `${subDirectory}android-app`,
- component: AndroidApp,
- empAccess: 'Android App',
- },
- { path: `${subDirectory}purchaseordermail`, component: PurchaseOrderMail },
- {
- path: `${subDirectory}viewbill`,
- component: LinkUrlCreate,
- empAccess: 'View Bill',
- },
- // writed b=y sree
- // {
- // path: `${subDirectory}MenuQRCode`,
- // component: CustomerMenuPage,
- // },
- {
- path: `${subDirectory}purchaseconfirm`,
- component: CustomerPurchaseConfirm,
- },
- {
- path: `${subDirectory}viewpurchaseorder`,
- component: PurchaseLink,
- },
- {
- path: `${subDirectory}combolayout3`,
- component: ComboLayout3,
- },
-
- {
- path: `${subDirectory}`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [
- {
- path: '/',
- component: React.lazy(() =>
- fetchHomeComponent().then((module) => ({ default: module.default }))
- ),
- },
- { path: `relieve-request`, component: RelieveRequestForm },
- { path: 'branch-login', component: BranchLogin },
- { path: 'branch-all', component: BackToBranchLogin },
- { path: 'back-to-login', component: BacktoLogin },
- { path: 'logout', component: Logout },
- { path: 'redirect-apps', component: RedirectApps },
- { path: 'redirect-userprofile', component: RedirectUserProfile },
- // { path: 'transaction', component: WSTransaction }
- ],
- },
- {
- path: `${subDirectory}qrprint`,
- component: CreditCustomerPrint,
- empAccess: 'Public',
- },
- { path: `${subDirectory}sales`, component: BookingPage, empAccess: 'Sales' },
- {
- path: `${subDirectory}wholesales`,
- component: WholesaleBookingPage,
- empAccess: 'Whole Sales',
- },
- {
- path: `${subDirectory}kiosksales`,
- component: KioskBookingPage,
- empAccess: 'Kiosk Sales',
- },
- {
- path: `${subDirectory}kiosk-receipt`,
- component: KioskBookingReceipt,
- empAccess: 'Public',
- },
- {
- path: `${subDirectory}payment-page`,
- component: PaymentDetailsPage,
- empAccess: 'Public',
- },
- { path: `${subDirectory}reprint`, component: Reprint },
- {
- path: `${subDirectory}transaction`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [
- { path: 'sales', component: WSTransaction, empAccess: 'Sales' },
- { path: 'payment-received', component: PaymentReceived },
- { path: 'seller-payment', component: SellerMasterTran },
- ],
- },
- {
- path: `${subDirectory}kitchen`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [
- { path: 'kot', component: KOT, empAccess: 'KOT' },
- {
- path: 'kot-display',
- component: CustomerKOTDisplay,
- empAccess: 'KOT Display',
- },
- ],
- },
- {
- path: `${subDirectory}report`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [
- {
- path: 'PublicQrCode',
- component: PublicQrCode,
- empAccess: 'SelfBooking QR Code',
- },
- {
- path: 'MenuQRCode',
- component: MenuQRCode,
- empAccess: 'MenuQRCode',
- },
- // {
- // path: 'tipamountsettlementlist',
- // component: TipAmountSettlementList,
- // empAccess: 'Tips',
- // },
- // {
- // path: 'EmployeeSettlement',
- // component: EmployeeSettlement,
- // empAccess: 'Incentive',
- // },
- {
- path: 'Settlement',
- component: Settlement,
- empAccess: 'Settlement',
- },
-
- {
- path: 'datewisereport',
- component: DateWiseReport,
- empAccess: 'Daily Sales',
- },
- {
- path: 'itemwisereport',
- component: ItemWiseReport,
- empAccess: 'By Item',
- },
- {
- path: 'top-selling-products',
- component: TopSellingProducts,
- empAccess: 'Top Selling Products',
- },
- {
- path: 'estimateitemwisereport',
- component: EstimateItemWiseReport,
- empAccess: 'By Item',
- },
- {
- path: 'estimatedatewisereport',
- component: EstimateDateWiseReport,
- empAccess: 'Daily Sales',
- },
- { path: 'ledgerreport', component: LedgerReport, empAccess: 'Ledger' },
- { path: 'ledger', component: LegderList, empAccess: 'Ledger' },
- {
- path: 'stock-in-hand',
- component: StockinHand,
- empAccess: 'Stock Inhand',
- },
- {
- path: 'abstract',
- component: WholeSaleAbstract,
- empAccess: 'Abstract For Sales',
- },
- {
- path: 'sellerabstract',
- component: WholeSaleSellerAbstract,
- empAccess: 'Abstract For Purchase',
- },
- {
- path: 'salesreport',
- component: WholeSaleSalesReport,
- empAccess: 'Daily Sales',
- },
- {
- path: 'purchasereport',
- component: WholeSalePurchaseReport,
- empAccess: 'Purchase',
- },
- {
- path: 'paymentpurchasereport',
- component: WholeSalePaymentPurchaseReport,
- empAccess: 'Purchase Payment',
- },
- {
- path: 'paymentsalesreport',
- component: WholeSalePaymentSalesReport,
- empAccess: 'Sales Payment',
- },
- {
- path: 'reprintreasonreport',
- component: ReprintReasonReportList,
- empAccess: 'Reprint Details',
- },
- {
- path: 'membership',
- component: MembershipReport,
- empAccess: 'Membership Report',
- },
- {
- path: 'revenueitemWisereport',
- component: RevenueItemWiseReport,
- empAccess: 'Gross Margin',
- },
-
- {
- path: 'PurchaseOrderReport',
- component: PurchaseOrderReport,
- empAccess: 'Purchase',
- },
- ],
- },
- {
- path: `${subDirectory}setting`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [
- {
- path: 'common-master',
- component: CommonMaster,
- empAccess: 'Common Master',
- },
- {
- path: 'other-services',
- component: OtherServicesList,
- empAccess: 'OtherServices',
- },
- {
- path: 'other-services/new',
- component: (props) => ,
- empAccess: 'OtherServices',
- },
- {
- path: 'other-services/update',
- component: (props) => ,
- empAccess: 'OtherServices',
- },
- {
- path: 'config-type',
- component: ConfigType,
- access: 'Super Admin',
- empAccess: 'Config Type',
- },
- {
- path: 'languages',
- component: SpeechLanguagesList,
- access: 'Super Admin',
- empAccess: 'Languages',
- },
- {
- path: 'preference',
- component: PreferenceList,
- empAccess: 'Preference',
- },
- {
- path: 'price-change',
- component: StockPriceUpdate,
- empAccess: 'Price Change',
- },
- {
- path: 'extra-charges',
- component: ExtraChargesList,
- empAccess: 'Extra Charges',
- },
- {
- path: 'Exchange-Return-policy',
- component: ExchangeAndReplacementList,
- empAccess: 'Exchange / Return',
- },
- {
- path: 'Exchange-Return-policy/new',
- component: (props) => (
-
- ),
- empAccess: 'Exchange / Return',
- },
- {
- path: 'exchange-return-mapping',
- component: ExchangeReturnMapList,
- empAccess: 'Rules Mapping',
- },
- {
- path: 'exchange-return-mapping/new',
- component: (props) => (
-
- ),
- empAccess: 'Rules Mapping',
- },
-
- {
- path: 'product-catalogue-list',
- component: ProductCatalogueList,
- empAccess: 'Product Catalogue',
- },
- {
- path: 'product-catalogue',
- component: Productcatlogue,
- empAccess: 'Product Catalogue',
- },
- { path: 'admin-tax', component: AdminTax, empAccess: 'Tax' },
- {
- path: 'create-ticket',
- component: TicketForm,
- empAccess: 'Create Ticket',
- },
- {
- path: 'payment-options',
- component: PaymentOptions,
- empAccess: 'Payment Options',
- },
- {
- path: 'payment-received-retail',
- component: PaymentReceivedRetail,
- empAccess: 'Payment Updates',
- },
- {
- path: 'payment-device-access',
- component: PaymentDeviceForm,
- empAccess: 'Payment Device Access',
- },
- {
- path: 'counter-category-mapping',
- component: CounterCategoryMappingForm,
- empAccess: 'Counter Mapping',
- },
-
- {
- path: 'wholesale-product-master',
- component: WholeSaleProductList,
- empAccess: 'Product',
- },
- {
- path: 'product-entry',
- component: ProductEntryList,
- empAccess: 'Product Entry',
- },
- {
- path: 'product',
- component: ProductMaster,
- empAccess: 'Product Entry',
- },
-
- {
- path: 'product-entry/new',
- component: (props) => ,
- empAccess: 'Product Entry',
- },
- {
- path: 'wholesale-extracharges/new',
- component: ItemEntry,
- empAccess: 'Extra Charges',
- },
- {
- path: 'wholesale-extracharges',
- component: ExtraChrgesList,
- empAccess: 'Extra Charges',
- },
- {
- path: 'membership-master/list',
- component: MembershipList,
- empAccess: 'Membership',
- },
- {
- path: 'membership-master/new',
- component: (props) => ,
- empAccess: 'Membership',
- },
- {
- path: 'membership-master/update',
- component: (props) => ,
- empAccess: 'Membership',
- },
-
- {
- path: 'opening-stock/new',
- component: OpeningStock,
- empAccess: 'Opening Stock',
- },
- {
- path: 'opening-stock',
- component: OpeningStockList,
- empAccess: 'Opening Stock',
- },
- {
- path: 'stock-adjustment',
- component: StockAdjustment,
- empAccess: 'Stock Adjustment',
- },
- {
- path: 'stock-adjustment-list',
- component: StockAdjustmentList,
- empAccess: 'Stock Adjustment',
- },
- {
- path: 'product-master',
- component: ProductMaster,
- empAccess: 'Add Product',
- },
- {
- path: 'product-master/combo',
- component: ProductMaster,
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'product-master/new',
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'products-master/new',
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'products-master/update',
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'product-master/update',
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'product-master/turbo-add',
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'image-bulk-upload',
- component: ImageBulkUpload,
- empAccess: 'Image Upload',
- },
- {
- path: 'rack-master',
- component: RackList,
- empAccess: 'Add Rack',
- },
- {
- path: 'rack-master/new',
- component: (props) => ,
- empAccess: 'Add Rack',
- },
- {
- path: 'rack-master/update',
- component: (props) => ,
- empAccess: 'Add Rack',
- },
- {
- path: 'slot-management',
- component: (props) => ,
- empAccess: 'Slot Management',
- },
- {
- path: 'slot-management-list',
- component: (props) => ,
- empAccess: 'Slot Management',
- },
- {
- path: 'productBased-offer',
- component: OfferList,
- empAccess: 'Product Based',
- },
-
- {
- path: 'productBased-offer/new',
- component: (props) => ,
- empAccess: 'Product Based',
- },
- {
- path: 'productBased-offer/update',
- component: (props) => ,
- empAccess: 'Product Based',
- },
- {
- path: 'code-base',
- component: CodeBaseList,
- empAccess: 'Code Based',
- },
- {
- path: 'code-base/new',
- component: (props) => ,
- empAccess: 'Code Based',
- },
- {
- path: 'code-base/new',
- component: (props) => ,
- empAccess: 'Code Based',
- },
-
- { path: 'item-wise', component: ItemWise, empAccess: 'Item Wise Offer' },
- {
- path: 'quantity-wise',
- component: QuantityWise,
- empAccess: 'Quantity Wise Offer',
- },
- {
- path: 'buyone-getone',
- component: BuyOneGetOneForm,
- empAccess: 'Buy X and Get X or Y',
- },
-
- {
- path: 'sales-wise',
- component: SalesWiseList,
- empAccess: 'Sales Wise Offer',
- },
- {
- path: 'sales-wise/new',
- component: (props) => ,
- empAccess: 'Sales Wise Offer',
- },
- {
- path: 'sales-wise/update',
- component: (props) => ,
- empAccess: 'Sales Wise Offer',
- },
-
- {
- path: 'loyalty-point',
- component: LoyaltyPointsList,
- empAccess: 'Loyalty Cards',
- },
- {
- path: 'loyalty-based',
- // component: LoyaltyBased,
- component: LoyaltyBasedList,
- empAccess: 'Loyalty Points',
- },
- {
- path: 'loyalty-based/new',
- component: (props) => ,
- empAccess: 'Loyalty Points',
- },
- {
- path: 'loyalty-based/update',
- component: (props) => ,
- empAccess: 'Loyalty Points',
- },
-
- {
- path: 'loyalty-point/new',
- component: (props) => (
-
- ),
- empAccess: 'Loyalty Cards',
- },
- {
- path: 'loyalty-point/update',
- component: (props) => (
-
- ),
- empAccess: 'Loyalty Cards',
- },
- // { path: 'loyalty-point/new', component: (props) => , empAccess: "Loyalty Cards" },
- // { path: 'loyalty-point/update', component: (props) => , empAccess: "Loyalty Cards" },
-
- {
- path: 'bundle-offer',
- component: BundleOfferList,
- empAccess: 'Bundle Offer',
- },
- {
- path: 'bundle-offer/new',
- component: (props) => ,
- empAccess: 'Bundle Offer',
- },
- {
- path: 'bundle-offer/update',
- component: (props) => ,
- empAccess: 'Bundle Offer',
- },
-
- {
- path: 'coupon',
- component: CouponWiseOfferlist,
- empAccess: 'Coupon Wise Offer',
- },
- {
- path: 'coupon/new',
- component: (props) => (
-
- ),
- empAccess: 'Coupon Wise Offer',
- },
- {
- path: 'coupon/update',
- component: (props) => (
-
- ),
- empAccess: 'Coupon Wise Offer',
- },
- // { path: 'coupon/new', component: (props) => , empAccess: "Coupon Wise Offer" },
- // { path: 'coupon/update', component: (props) => , empAccess: "Coupon Wise Offer" },
-
- { path: 'promo-code', component: PromocodeList, empAccess: 'Promo Code' },
- {
- path: 'promo-code/new',
- component: (props) => (
-
- ),
- empAccess: 'Promo Code',
- },
- {
- path: 'promo-code/update',
- component: (props) => (
-
- ),
- empAccess: 'Promo Code',
- },
- // { path: 'promo-code/new', component: (props) => , empAccess: "Promo Code" },
- // { path: 'promo-code/update', component: (props) => , empAccess: "Promo Code" },
-
- { path: 'offer-code', component: OfferCodeList, empAccess: 'Offer Code' },
- {
- path: 'offer-code/new',
- component: (props) => (
-
- ),
- empAccess: 'Offer Code',
- },
- {
- path: 'offer-code/update',
- component: (props) => (
-
- ),
- empAccess: 'Offer Code',
- },
- // { path: 'offer-code/new', component: (props) => , empAccess: "Offer Code" },
- // { path: 'offer-code/update', component: (props) => , empAccess: "Offer Code" },
-
- {
- path: 'customer-master',
- component: CustomerMasterList,
- empAccess: 'Customer',
- },
- {
- path: 'customer-master/new',
- component: (props) => ,
- empAccess: 'Customer',
- },
- {
- path: 'customer-master/update',
- component: (props) => ,
- empAccess: 'Customer',
- },
- {
- path: 'automated-reorder',
- component: AutomatedReorderList,
- empAccess: 'Automated Reorder',
- },
- {
- path: 'automated-reorder/new',
- component: (props) => ,
- empAccess: 'Automated Reorder',
- },
- {
- path: 'automated-reorder/update',
- component: (props) => ,
- empAccess: 'Automated Reorder',
- },
- {
- path: 'purchase-entry',
- component: StockList,
- empAccess: 'Product Receipt',
- },
- {
- path: 'purchase-entry/new',
- component: (props) => ,
- empAccess: 'Product Receipt',
- },
- {
- path: 'purchase-entry/update',
- component: (props) => ,
- empAccess: 'Product Receipt',
- },
-
- {
- path: 'receive-stocks',
- component: StockReceivedList,
- empAccess: 'Purchase Order',
- },
- {
- path: 'gst-invoice-setup/new',
- component: (props) => ,
- empAccess: 'Gst Invoice Setup',
- },
- {
- path: 'gst-invoice-setup/update',
- component: (props) => (
-
- ),
- empAccess: 'Gst Invoice Setup',
- },
- {
- path: 'gst-invoice-setup',
- component: gstInvoiceSetUpList,
- empAccess: 'Gst Invoice Setup',
- },
- {
- path: 'purchase-order',
- component: PurchaseOrderList,
- empAccess: 'Purchase Order',
- },
- {
- path: 'purchase-order/new',
- component: (props) => ,
- empAccess: 'Purchase Order',
- },
-
- {
- path: 'purchase-return/list',
- component: PurchaseReturnget,
- empAccess: 'Product Return',
- },
- {
- path: 'purchaseconfirm',
- component: CustomerPurchaseConfirm,
- // empAccess: 'View Bill',
- },
- {
- path: 'purchase-return',
- component: PurchaseReturn,
- empAccess: 'Product Return',
- },
- //free Products
- {
- path: 'free-product-master',
- component: FreeProductList,
- empAccess: 'Add Product',
- },
-
- {
- path: 'free-purchase-entry',
- component: FreePurchaseEnteryList,
- empAccess: 'Purchase Entry',
- },
- {
- path: 'free-purchase-entry/new',
- component: (props) => (
-
- ),
- empAccess: 'Purchase Entry',
- },
- {
- path: 'free-purchase-entry/update',
- component: (props) => (
-
- ),
- empAccess: 'Purchase Entry',
- },
-
- {
- path: 'free-purchase-order',
- component: FreePurchaseOrderList,
- empAccess: 'Purchase Order',
- },
- {
- path: 'free-purchase-order/new',
- component: (props) => (
-
- ),
- empAccess: 'Purchase Order',
- },
-
- {
- path: 'free-purchase-return',
- component: FreePurchaseReturnList,
- empAccess: 'Purchase Return',
- },
- {
- path: 'free-purchase-return/new',
- component: FreePurchaseReturnForm,
- empAccess: 'Purchase Return',
- },
- //free Products
- {
- path: 'sales-quotation',
- component: PurchaseQuotationForm,
- empAccess: 'Sales Quotation',
- },
- {
- path: 'sales-quotation/list',
- component: PurchaseQuotationList,
- empAccess: 'Sales Quotation',
- },
- {
- path: 'sales-order',
- component: SalesOrder,
- empAccess: 'Sales Order',
- },
- // { path: 'delivery-challan',
- // component: DeliveryChallanList,
- // empAccess: 'Delivery Challan'
- // },
- {
- path: 'delivery-challan/list',
- component: DeliveryChallanList,
- empAccess: 'Delivery Challan',
- },
- {
- path: 'delivery-challan',
- component: DeliveryChallanForm,
- empAccess: 'Delivery Challan',
- },
- {
- path: 'delivery-challan-to-invoice/list',
- component: DeliveryChallanToInvoiceList,
- empAccess: 'DC to Invoice',
- },
- {
- path: 'delivery-challan-to-invoice',
- component: DeliveryChallanToInvoiceForm,
- empAccess: 'DC to Invoice',
- },
-
- { path: 'shift-master', component: ShiftMasterList, empAccess: 'Shift' },
- {
- path: 'shift-master/new',
- component: (props) => ,
- empAccess: 'Shift',
- },
- {
- path: 'shift-master/update',
- component: (props) => ,
- empAccess: 'Shift',
- },
-
- {
- path: 'employee-master',
- component: EmployeeMasterList,
- empAccess: 'Add Employee',
- },
- {
- path: 'employee-master/new',
- component: (props) => ,
- empAccess: 'Add Employee',
- },
- {
- path: 'employee-master/update',
- component: (props) => ,
- empAccess: 'Add Employee',
- },
- {
- path: 'commission-or-incentive-master',
- component: EmpCommisionOrIncentiveList,
- empAccess: 'Incentive',
- },
- {
- path: 'commission-or-incentive-master/new',
- component: (props) => (
-
- ),
- empAccess: 'Incentive',
- },
- {
- path: 'commission-or-incentive-master/update',
- component: (props) => (
-
- ),
- empAccess: 'Incentive',
- },
- {
- path: 'supplier-master',
- component: SupplierMasterList,
- empAccess: 'Add Supplier',
- },
- {
- path: 'supplier-master/new',
- component: (props) => ,
- empAccess: 'Add Supplier',
- },
- {
- path: 'supplier-master/update',
- component: (props) => ,
- empAccess: 'Add Supplier',
- },
- {
- path: 'stock-transfer',
- component: CreateTransfer,
- empAccess: 'Create Transfer',
- },
- {
- path: 'stock-dispatch',
- component: Dispatch,
- empAccess: 'Dispatch',
- },
- {
- path: 'stock-transferlist',
- component: StockTransferList,
- empAccess: 'Create Transfer',
- },
- {
- path: 'supplierproductmapping-master',
- component: SupplierProductMapping,
- empAccess: 'Product Mapping',
- },
- // { path: 'supplier-master/new', component: (props) => , empAccess: "Supplier" },
- // { path: 'supplier-master/update', component: (props) => , empAccess: "Supplier" },
-
- {
- path: 'dinein-master',
- component: DiningMasterList,
- empAccess: 'Dine In',
- },
- {
- path: 'dinein-master/new',
- component: (props) => ,
- empAccess: 'Dine In',
- },
- {
- path: 'dinein-master/edit',
- component: (props) => ,
- empAccess: 'Dine In',
- },
-
- {
- path: 'combo-master',
- component: ComboList,
- empAccess: 'Add Product',
- },
- {
- path: 'combo-master/new',
- component: (props) => ,
- empAccess: 'Add Product',
- },
- {
- path: 'combo-master/update',
- component: (props) => ,
- empAccess: 'Add Product',
- },
-
- {
- path: 'combo-offer-master',
- component: ComboOfferMaster,
- empAccess: 'Combo Price',
- },
-
- {
- path: 'payment-details',
- component: PaymentDetailsList,
- empAccess: 'Payment Details',
- },
- {
- path: 'payment-details/new',
- component: (props) => ,
- empAccess: 'Payment Details',
- },
- {
- path: 'payment-details/update',
- component: (props) => ,
- empAccess: 'Payment Details',
- },
-
- {
- path: 'payment-failed-details',
- component: PaymentFailedDetailsList,
- empAccess: 'Payment Failed Details',
- },
- {
- path: 'TableMapping/update',
- component: (props) => ,
- empAccess: 'Table Mapping',
- },
- {
- path: 'TableMapping',
- component: TableMAppingList,
- empAccess: 'Table Mapping',
- },
- {
- path: 'employee-access',
- component: EmpAccessList,
- empAccess: 'Employee Access',
- },
- {
- path: 'employee-access/new',
- component: (props) => ,
- empAccess: 'Employee Access',
- },
- {
- path: 'employee-access/update',
- component: (props) => ,
- empAccess: 'Employee Access',
- },
- {
- path: 'employee-screenrights',
- component: EmpScreenAccessList,
- empAccess: 'Employee Screen Rights',
- },
- {
- path: 'employee-screenrights/new',
- component: (props) => (
-
- ),
- empAccess: 'Employee Screen Rights',
- },
- {
- path: 'employee-screenrights/update',
- component: (props) => (
-
- ),
- empAccess: 'Employee Screen Rights',
- },
-
- {
- path: 'cancel-reschedule-rules',
- component: CancellationList,
- empAccess: 'Cancel / Reschedule',
- },
- {
- path: 'cancel-reschedule-rules/new',
- component: (props) => ,
- empAccess: 'Cancel / Reschedule',
- },
- {
- path: 'cancel-reschedule-rules/update',
- component: (props) => ,
- empAccess: 'Cancel / Reschedule',
- },
-
- {
- path: 'cancel-applicable-product',
- component: CancelApplicableProd,
- empAccess: 'Cancel Applicable Products',
- },
- {
- path: 'cancel-paymentchange',
- component: ChangePaymentmode,
- empAccess: 'Payment Mode Change',
- },
- {
- path: 'cancel-pendingpayment',
- component: CancellationListPending,
- empAccess: 'Cancel Unpaid Order',
- },
- {
- path: 'sales-bill-cancel',
- component: SalesBillCancel,
- empAccess: 'Sales Entry Cancel',
- },
- {
- path: 'sales-bill-product-return/list',
- component: SalesBillProductsReturnList,
- empAccess: 'Sales Product Return',
- },
- {
- path: 'sales-bill-product-return',
- component: SalesBillProductsReturn,
- empAccess: 'Sales Product Return',
- },
- {
- path: 'booking-reschedule',
- component: BookingReScedule,
- empAccess: 'Booking Reschedule',
- },
- {
- path: 'booking-reschedule/list',
- component: BookingReSceduleList,
- empAccess: 'Booking Reschedule',
- },
-
- {
- path: 'wholesale-preorder',
- component: WsPreorder,
- empAccess: 'Preorder',
- },
- {
- path: 'wholesale-preorder/new',
- component: (props) => ,
- empAccess: 'Preorder',
- },
- {
- path: 'wholesale-preorder/update',
- component: (props) => ,
- empAccess: 'Preorder',
- },
-
- {
- path: 'custom-product',
- component: StoreRecipelist,
- empAccess: 'Bill Of Material',
- },
- {
- path: 'custom-product/new',
- component: (props) => ,
- empAccess: 'Bill Of Material',
- },
- {
- path: 'custom-product/update',
- component: (props) => ,
- empAccess: 'Bill Of Material',
- },
-
- {
- path: 'store-to-production',
- component: Storekitchenlist,
- empAccess: 'Material Issue',
- },
- {
- path: 'store-to-production/new',
- component: (props) => ,
- empAccess: 'Material Issue',
- },
- {
- path: 'store-to-production/update',
- component: (props) => ,
- empAccess: 'Material Issue',
- },
-
- {
- path: 'ready-for-sale',
- component: KitchenFinishlist,
- empAccess: 'Finished Goods',
- },
- {
- path: 'ready-for-sale/new',
- component: (props) => ,
- empAccess: 'Finished Goods',
- },
- {
- path: 'ready-for-sale/update',
- component: (props) => ,
- empAccess: 'Finished Goods',
- },
-
- {
- path: 'gateway-master-configuration/new',
- component: (props) => (
-
- ),
- empAccess: 'Gateway Master Configuration',
- },
- {
- path: 'gateway-master-configuration/update',
- component: (props) => (
-
- ),
- empAccess: 'Gateway Master Configuration',
- },
- {
- path: 'gateway-master-configuration/list',
- component: GatewayMasterConfigurationList,
- empAccess: 'Gateway Master Configuration',
- },
- ],
- },
- {
- path: `${subDirectory}sales`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [{ path: 'dine-in', component: TableBooking }],
- empAccess: 'Sales Entry',
- },
- {
- path: `${subDirectory}saleslayouts`,
- component: React.lazy(() =>
- fetchComponent().then((module) => ({ default: module.default }))
- ),
- children: [
- {
- path: 'sales-selection',
- component: BookingSelectionPage,
- empAccess: 'Sales Screen',
- },
- {
- path: 'print-selection',
- component: PrintSelectionPage,
- empAccess: 'Print Forms',
- },
- {
- path: 'kiosk-selection',
- component: KioskMainPage,
- empAccess: 'Kiosk Screen',
- },
- {
- path: `barcode-qr-selection`,
- component: BarcodeTemplateSetup,
- empAccess: 'Barcode / QR',
- },
- {
- path: 'kiosk-component',
- component: KioskComponentList,
- access: 'Super Admin',
- empAccess: 'Kiosk Component',
- },
- {
- path: 'component-master',
- component: ComponentMasterList,
- access: 'Super Admin',
- empAccess: 'Component Master',
- },
- {
- path: 'barcode-master',
- component: BarcodeComponentList,
- access: 'Super Admin',
- empAccess: 'Barcode Component',
- },
- {
- path: 'component-master/new',
- component: (props) => ,
- access: 'Super Admin',
- empAccess: 'Component Master',
- },
- {
- path: 'component-master/update',
- component: (props) => (
-
- ),
- access: 'Super Admin',
- empAccess: 'Component Master',
- },
- {
- path: 'theme-creation',
- component: ThemeCreation,
- access: 'Super Admin',
- empAccess: 'Theme Creation',
- },
- {
- path: 'themeselection/new',
- component: (props) => ,
- access: 'Super Admin',
- empAccess: 'Theme Creation',
- },
- {
- path: 'themeselection/update',
- component: (props) => ,
- access: 'Super Admin',
- empAccess: 'Theme Creation',
- },
- ],
- },
-];
-// this is vite file
-import { defineConfig } from "vite";
-import react from "@vitejs/plugin-react";
-
-export default defineConfig(({ mode }) => {
- const isProd = mode === "production";
-
- return {
- plugins: [react()],
-
- base: isProd ? "/apps/retail/" : "/", //for capcitor base: isProd ? "/" : "/",
-
- envDir: "src",
- envPrefix: "ENV_",
-
- server: {
- host: true, // 🔥 auto detect your IP
- port: process.env.PORT || 3015,
- },
-
- build: {
- minify: "esbuild",
- esbuild: {
- drop: isProd ? ["console", "debugger"] : [],
- },
- },
- };
-});
-/// android xml file ;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//pathfile android\app\src\main\res\xml\file_paths.xml
-
-
-
-
-
-///package.json
-
-{
- "name": "retail-application",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
- "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
- "preview": "vite preview",
- "format": "prettier --write ."
- },
- "dependencies": {
- "@ant-design/plots": "^2.6.8",
- "@capacitor-community/file-opener": "^8.0.0",
- "@capacitor-community/speech-recognition": "^7.0.1",
- "@capacitor-mlkit/barcode-scanning": "^8.0.1",
- "@capacitor/android": "^8.3.0",
- "@capacitor/app": "^8.0.1",
- "@capacitor/cli": "^8.3.0",
- "@capacitor/core": "^8.3.0",
- "@capacitor/filesystem": "^8.1.2",
- "@dnd-kit/core": "^6.3.1",
- "@dnd-kit/sortable": "^10.0.0",
- "@emotion/react": "^11.11.4",
- "@emotion/styled": "^11.11.5",
- "@mui/material": "^5.15.18",
- "@react-google-maps/api": "^2.20.8",
- "@reduxjs/toolkit": "^1.9.5",
- "@tanstack/react-query": "^5.90.11",
- "@tanstack/react-query-devtools": "^5.91.1",
- "@tanstack/react-virtual": "^3.13.18",
- "@types/node": "^25.5.0",
- "@vitejs/plugin-legacy": "^8.0.1",
- "@zxing/library": "^0.21.3",
- "antd": "^5.17.4",
- "antd-img-crop": "^4.22.0",
- "aos": "^2.3.4",
- "apexcharts": "^5.10.4",
- "axios": "^1.13.6",
- "browser-image-compression": "^2.0.2",
- "classnames": "^2.5.1",
- "cropperjs": "^1.6.2",
- "crypto-js": "^4.1.1",
- "date-fns": "^4.1.0",
- "devtools-detect": "^4.0.2",
- "exceljs": "^4.4.0",
- "file-saver": "^2.0.5",
- "history": "^5.3.0",
- "html2canvas": "^1.4.1",
- "html2pdf": "^0.0.11",
- "html5-qrcode": "^2.3.8",
- "jquery": "^3.7.1",
- "js-cookie": "^3.0.5",
- "jsbarcode": "^3.11.6",
- "jspdf": "^4.2.1",
- "lucide": "^0.577.0",
- "lucide-react": "^0.536.0",
- "moment": "^2.30.1",
- "number-to-words": "^1.2.4",
- "pdf-lib": "^1.17.1",
- "qr-scanner": "^1.4.2",
- "qrcode": "^1.5.3",
- "qrcode.react": "^4.2.0",
- "react": "^18.3.1",
- "react-apexcharts": "^2.1.0",
- "react-beautiful-dnd": "^13.1.1",
- "react-color": "^2.19.3",
- "react-countup": "^6.5.3",
- "react-device-detect": "^2.2.3",
- "react-dom": "^18.3.1",
- "react-icons": "^4.12.0",
- "react-image-crop": "^11.0.10",
- "react-qr-code": "^2.0.13",
- "react-redux": "^8.1.2",
- "react-router-dom": "^6.23.1",
- "react-select": "^5.8.0",
- "react-signature-canvas": "^1.0.7",
- "react-speech-recognition": "^3.10.0",
- "react-timer-hook": "^3.0.7",
- "react-transition-group": "^4.4.5",
- "recharts": "^3.5.0",
- "string-similarity": "^4.0.4",
- "tesseract.js": "^6.0.0",
- "universal-cookie": "^8.0.1",
- "webfontloader": "^1.6.28",
- "zustand": "^5.0.8"
- },
- "devDependencies": {
- "@types/react": "^18.3.3",
- "@types/react-dom": "^18.3.0",
- "@vitejs/plugin-react": "^6.0.1",
- "esbuild": "^0.27.4",
- "eslint": "^8.57.0",
- "eslint-plugin-react": "^7.34.2",
- "eslint-plugin-react-hooks": "^4.6.2",
- "eslint-plugin-react-refresh": "^0.4.7",
- "prettier": "^3.5.3",
- "rollup-plugin-obfuscator": "^1.1.0",
- "sass": "^1.98.0",
- "terser": "^5.31.3",
- "vite": "^8.0.0",
- "vite-plugin-obfuscator": "^1.0.5",
- "vite-plugin-remove-console": "^2.2.0"
- }
-}
-
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
index 73d2bef..29e537b 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
@@ -175,6 +175,21 @@ const Printstyle4 = ({
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'estimateprintheader'
)?.SettingValue === 'Y';
+ const estimatebrname =
+ SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'estimatebrname'
+ )?.SettingValue === 'Y';
+ const estimatebraddress =
+ SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'estimatebraddress'
+ )?.SettingValue === 'Y';
+ const estimatebrphone =
+ SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) =>
+ setting?.SettingIdName?.toLowerCase() === 'estimatebrphone'
+ )?.SettingValue === 'Y';
const estimateTitle =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
@@ -473,8 +488,8 @@ const Printstyle4 = ({
flexDirection: 'column',
justifyContent:
chunkIndex === paginatedChunks.length - 1 &&
- !shouldFooterBeOnNewPage &&
- FormatTheme
+ !shouldFooterBeOnNewPage &&
+ FormatTheme
? 'space-between'
: '',
height: isMobile
@@ -524,7 +539,7 @@ const Printstyle4 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -606,10 +621,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
{/* {GlobaldummyData ? formattedDate : Date1}
*/}
@@ -635,9 +650,9 @@ const Printstyle4 = ({
{GlobaldummyData
? 'Cash Bill'
: BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}{' '}
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
@@ -672,172 +687,172 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
- #
- |
- )
+
+ #
+ |
+ )
: SLNO && (
-
- #
- |
- )}
+
+ #
+ |
+ )}
{GlobaldummyData
? GlobalItem && (
- Item |
- )
+ Item |
+ )
: Item && (
- Item |
- )}
+ Item |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- {WeightasKg ? 'Qty/Kg' : 'Qty'}
- |
- )}
+
+ {WeightasKg ? 'Qty/Kg' : 'Qty'}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -874,12 +889,12 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: {}
}
>
@@ -887,84 +902,84 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{/* ITEM COLUMN */}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {/* Product Name */}
- {item?.ProdName}
+ |
+ {/* Product Name */}
+ {item?.ProdName}
- {/* Package OR Size */}
- {packageList.length > 0 ? (
-
- {packageList.map((pkg, i) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y'
- ? (item?.Size || '1') +
- (item?.SinglePc === 'Y'
- ? ' PCS'
- : item?.Type !== 'C'
- ? ` ${item?.UomName}`
- : ' COMBO')
- : ''}
- {item?.BrandName || ''}
-
- )}
+ {/* Package OR Size */}
+ {packageList.length > 0 ? (
+
+ {packageList.map((pkg, i) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+
+ ))}
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y'
+ ? (item?.Size || '1') +
+ (item?.SinglePc === 'Y'
+ ? ' PCS'
+ : item?.Type !== 'C'
+ ? ` ${item?.UomName}`
+ : ' COMBO')
+ : ''}
+ {item?.BrandName || ''}
+
+ )}
- {/* Serials */}
- {serials.map((s, i) => (
- {s}
- ))}
+ {/* Serials */}
+ {serials.map((s, i) => (
+ {s}
+ ))}
- {/* IMEIs */}
- {imeis.map((iVal, i) => (
- {iVal}
- ))}
+ {/* IMEIs */}
+ {imeis.map((iVal, i) => (
+ {iVal}
+ ))}
- {/* Description from first identifier */}
- {descriptions[0] && (
- {descriptions[0]}
- )}
- |
- )}
+ {/* Description from first identifier */}
+ {descriptions[0] && (
+ {descriptions[0]}
+ )}
+
+ )}
{/* Quantity */}
{(GlobaldummyData
? GlobalQuantity
: Quantity) && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{/* HSN */}
{(GlobaldummyData
? GlobalHsnCode
: HsnCode) && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{/* MRP */}
{(GlobaldummyData ? GlobalMRP : MRP) && (
@@ -979,16 +994,16 @@ const Printstyle4 = ({
{(GlobaldummyData
? GlobalDiscount
: Discount) && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt ||
+ |
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
item?.DiscountAmt / item?.SalesQty ||
0
- : item?.OfferValue ||
+ : item?.OfferValue ||
item?.DiscountAmt / item?.SalesQty ||
0}
- |
- )}
+
+ )}
{/* Rate */}
{(GlobaldummyData ? GlobalRate : Rate) && (
@@ -1002,9 +1017,9 @@ const Printstyle4 = ({
{item?.Type !== 'C'
? (item?.TotalAmt || 0) -
- (item?.OfferAmt || 0)
+ (item?.OfferAmt || 0)
: (item?.TotalAmt || 0) -
- (item?.OfferValue || 0)}
+ (item?.OfferValue || 0)}
|
)}
@@ -1033,170 +1048,170 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
- #
- |
- )
+
+ #
+ |
+ )
: SLNO && (
-
- #
- |
- )}
+
+ #
+ |
+ )}
{GlobaldummyData
? GlobalItem && (
- Item |
- )
+ Item |
+ )
: Item && (
- Item |
- )}
+ Item |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -1207,138 +1222,138 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: {}
}
>
{GlobaldummyData
? GlobalSlNo && {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {UomPrint?.SettingValue === 'Y' && (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- )}
- |
- )}
+
+ {item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+ |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
- |
- )
+
+ {item?.SalesQty}
+ |
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt ||
- item?.DiscountAmt /
- item?.SalesQty ||
- 0
- : item?.OfferValue ||
- item?.DiscountAmt /
- item?.SalesQty ||
- 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt /
+ item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt /
+ item?.SalesQty ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt -
- (item?.OfferAmt || 0)
- : item?.TotalAmt -
- (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt -
+ (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
})}
@@ -1392,11 +1407,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -1583,17 +1598,17 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' +
- ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' +
+ ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -1866,7 +1881,7 @@ const Printstyle4 = ({
: '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -1892,83 +1907,83 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ 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),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
items.push({
label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(
- 2
- ),
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
});
}
+ }
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(
+ 2
+ ),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
@@ -1976,59 +1991,59 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
- Scan to Pay{' '}
-
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
+
+

+
+ Scan to Pay{' '}
- )
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
+
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
- Scan to Pay{' '}
-
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
- )}
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
+
+ )}
)}
@@ -2140,28 +2155,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -2181,137 +2196,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
+
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving
- the counter.
-
-
-
- )
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
+
+ -
+ Please check the product before leaving
+ the counter.
+
+
+
+ )
: TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
0 && (
+
+
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
-
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
+
-
- Signature
-
-

-
- )
+ Signature
+
+

+
+ )
: Signature == true && (
-
+
-
- Signature
-
-

-
- )}
+ Signature
+
+

+
+ )}
)}
@@ -2386,11 +2401,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -2577,16 +2592,16 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -2859,7 +2874,7 @@ const Printstyle4 = ({
: '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -2883,81 +2898,81 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ 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),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
items.push({
label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
});
}
+ }
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{/*
*/}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2966,55 +2981,55 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
- Scan to Pay{' '}
-
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
+
+

+
+ Scan to Pay{' '}
- )
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
- Scan to Pay{' '}
-
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
- )}
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )}
)}
@@ -3121,28 +3136,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -3162,137 +3177,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
+
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving the
- counter.
-
-
-
- )
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
+
+ -
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
: TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
0 && (
+
+
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
-
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
+
-
- Signature
-
-

-
- )
+ Signature
+
+

+
+ )
: Signature == true && (
-
+
-
- Signature
-
-

-
- )}
+ Signature
+
+

+
+ )}
)}
@@ -3339,7 +3354,7 @@ const Printstyle4 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
) : null}
-
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
-
+ }
-
-
- {' '}
- Mobile : +91{' '}
- {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
-
+ (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
+ : '')}
+
}
+ {estimatebrphone && (
+
+ {' '}
+ Mobile : +91{' '}
+ {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
+
+ )}
)}
{/*
@@ -3429,10 +3446,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
@@ -3459,9 +3476,9 @@ const Printstyle4 = ({
? GlobalBilltext
: 'Cash' + ' Bill'
: BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}{' '}
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
@@ -3490,112 +3507,112 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
- #
- |
- )
+
+ #
+ |
+ )
: SLNO && (
-
- #
- |
- )}
+
+ #
+ |
+ )}
{GlobaldummyData
? GlobalItem && (
- Item |
- )
+ Item |
+ )
: Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -3677,12 +3694,12 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: {}
}
>
@@ -3692,240 +3709,240 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
+ |
+ {item?.ProdName}
- {/* Serial Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
+ {/* Serial Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
+
+ ))}
+
+ {/* IMEI Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
+
+ {/* Description from first identifier */}
+ {item?.ProductIdentifierDtls?.length > 0 &&
+ item.ProductIdentifierDtls?.[0]
+ ?.Description && (
+
+ {
+ item.ProductIdentifierDtls?.[0]
+ ?.Description
+ }
- ))}
-
- {/* IMEI Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
-
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.length > 0 &&
- item.ProductIdentifierDtls?.[0]
- ?.Description && (
-
- {
- item.ProductIdentifierDtls?.[0]
- ?.Description
- }
-
- )}
- |
- )}
+ )}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
+ |
+ {item?.SalesQty}
-
- {/* Package Details */}
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- ).length > 0 ? (
-
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- )?.map((pkg, index) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
+
+ {/* Package Details */}
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ ).length > 0 ? (
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ )?.map((pkg, index) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+
+ ))}
+
+ {/* Serial */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
+
+ ))}
+
+ {/* IMEI */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
+
+ {/* Description from first identifier */}
+ {item?.ProductIdentifierDtls?.length >
+ 0 &&
+ item.ProductIdentifierDtls?.[0]
+ ?.Description && (
+
+ {
+ item
+ .ProductIdentifierDtls?.[0]
+ ?.Description
+ }
- ))}
-
- {/* Serial */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
-
- {/* IMEI */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
-
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.length >
- 0 &&
- item.ProductIdentifierDtls?.[0]
- ?.Description && (
-
- {
- item
- .ProductIdentifierDtls?.[0]
- ?.Description
- }
-
- )}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y' && (
- <>
- ({item?.Size || '1'}){' '}
- {item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'}{' '}
- >
)}
- {item?.BrandName || ''}
-
- )}
-
- |
- )
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y' && (
+ <>
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}{' '}
+ >
+ )}
+ {item?.BrandName || ''}
+
+ )}
+
+
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- {GlobaldummyData
- ? GlobalTax && (
- |
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )
- : Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {/* */}
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )}
-
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ {GlobaldummyData
+ ? GlobalTax && (
+ |
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {/* */}
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt ||
- item?.DiscountAmt / item?.SalesQty ||
- 0
- : item?.OfferValue ||
- item?.DiscountAmt / item?.SalesQty ||
- 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt -
- (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
}
@@ -3959,48 +3976,48 @@ const Printstyle4 = ({
: Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -4056,12 +4073,12 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
- ...tableBodyStyle,
- }
+ ...tableBodyStyle,
+ }
: {}
}
>
@@ -4071,53 +4088,68 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {(
- (item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) => items.SerialNumber
- )
- .map(
- (a, index) => ` ${a.SerialNumber}`
- )
- .join('')
- : '') +
- (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) && (
-
- {
- item.ProductIdentifierDtls?.[0]
- ?.Description
- }
-
+ |
+ {item?.ProdName}
+ {(
+ (item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) => items.SerialNumber
)
- )?.trim()}
- |
- )}
+ .map(
+ (a, index) => ` ${a.SerialNumber}`
+ )
+ .join('')
+ : '') +
+ (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) && (
+
+ {
+ item.ProductIdentifierDtls?.[0]
+ ?.Description
+ }
+
+ )
+ )?.trim()}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
+ |
+ {item?.SalesQty}
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ |
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+ {UomPrint?.SettingValue === 'Y' && (
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@@ -4127,103 +4159,88 @@ const Printstyle4 = ({
: 'COMBO'}
)
- |
- )
- : Quantity && (
-
- {item?.SalesQty}
- {UomPrint?.SettingValue === 'Y' && (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- )}
- |
- )}
+ )}
+
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt ||
- item?.DiscountAmt / item?.SalesQty ||
- 0
- : item?.OfferValue ||
- item?.DiscountAmt / item?.SalesQty ||
- 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt -
- (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
}
@@ -4443,14 +4460,14 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor((num % 100) / 10)
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor((num % 100) / 10)
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -4712,7 +4729,7 @@ const Printstyle4 = ({
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -4735,79 +4752,79 @@ const Printstyle4 = ({
)}
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ 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),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
items.push({
label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
});
}
+ }
- return items.map((i, idx) => (
-
- {i.label}
- :
- {i.value}
-
- ));
- })()}
-
- )}
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+ {i.label}
+ :
+ {i.value}
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
@@ -4815,51 +4832,51 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
+
+

+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
- )
+
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
- )}
+
+ )}
)}
@@ -4957,21 +4974,21 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
+ )}
)}
@@ -4991,136 +5008,136 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
+
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not exchangeable or
- refundable.
-
- -
- Please check the product before leaving the counter.
-
-
-
- )
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not exchangeable or
+ refundable.
+
+ -
+ Please check the product before leaving the counter.
+
+
+
+ )
: TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
0 && (
+
+
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
-
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
+
-
- Signature
-
-

-
- )
+ Signature
+
+

+
+ )
: Signature == true && (
-
+
-
- Signature
-
-

-
- )}
+ Signature
+
+

+
+ )}
)}
diff --git a/src/Pages/Preference/PreferenceList.jsx b/src/Pages/Preference/PreferenceList.jsx
index c5e08cd..4db346b 100644
--- a/src/Pages/Preference/PreferenceList.jsx
+++ b/src/Pages/Preference/PreferenceList.jsx
@@ -1,4 +1,4 @@
-import { useCallback, useEffect, useRef, useState } from 'react';
+import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Form, Checkbox, Radio, Divider, InputNumber } from 'antd';
import { ArrowRightOutlined } from '@ant-design/icons';
@@ -30,6 +30,7 @@ const PreferenceList = ({ setting = false }) => {
const { SadminuserAccess, featureaddDetails } = useAuth();
const dispatch = useDispatch();
const formRef = useRef();
+ const prevEstimateRef = useRef([]);
const CompId = getSession('CompId');
const BranchId = getSession('BranchId');
const AppId = getSession('AppId');
@@ -157,6 +158,10 @@ const PreferenceList = ({ setting = false }) => {
...(allSettingsMap['estimatetitle']?.value === 'Y'
? ['estimatetitle']
: []),
+ ...(allSettingsMap['estimatebrname']?.value === 'Y' ? ['estimatebrname'] : []),
+ ...(allSettingsMap['estimatebraddress']?.value === 'Y' ? ['estimatebraddress'] : []),
+ ...(allSettingsMap['estimatebrphone']?.value === 'Y' ? ['estimatebrphone'] : []),
+
],
scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
@@ -207,9 +212,9 @@ const PreferenceList = ({ setting = false }) => {
}
};
}, []);
- useEffect(()=>{
+ useEffect(() => {
fetchTableData();
- },[selectedUserId])
+ }, [selectedUserId])
useEffect(() => {
if (settingsList) {
@@ -217,6 +222,8 @@ const PreferenceList = ({ setting = false }) => {
setInitialValues(built);
console.log(built, 'built');
formRef.current?.setFieldsValue(built);
+ prevEstimateRef.current = built.estimateSettings ?? [];
+
}
}, [settingsList]);
@@ -311,7 +318,7 @@ const PreferenceList = ({ setting = false }) => {
};
const fetchTableData = async () => {
- const res = await dispatch(gettableData({ CompId, BranchId, AppId,UserId:selectedUserId })).unwrap();
+ const res = await dispatch(gettableData({ CompId, BranchId, AppId, UserId: selectedUserId })).unwrap();
const data = { CompId, BranchId, AppId, UserId: selectedUserId };
// const res = await dispatch(getPreferenceData(data)).unwrap();
if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) {
@@ -405,8 +412,15 @@ const PreferenceList = ({ setting = false }) => {
dinein: values.enabledModules,
estimation: values.enabledModules,
parking: values.enabledFeatures,
+ // estimateprintheader: values.estimateSettings,
+ // estimatebrname: values.estimatebrname,
+ // estimatebraddress: values.estimatebraddress,
+ // estimatebrphone: values.estimatebrphone,
estimateprintheader: values.estimateSettings,
estimatetitle: values.estimateSettings,
+ estimatebrname: values.estimateSettings,
+ estimatebraddress: values.estimateSettings,
+ estimatebrphone: values.estimateSettings,
offer: values.enabledFeatures,
whatsapp: values.pdfSendOptions,
sms: values.pdfSendOptions,
@@ -481,51 +495,51 @@ const PreferenceList = ({ setting = false }) => {
};
useEffect(() => {
- if (userDropDown?.length > 0 && !formRef.current?.getFieldValue("userId")) {
- const adminUser = userDropDown.find(
- (user) => user.UserTypeName === "Admin"
- );
+ if (userDropDown?.length > 0 && !formRef.current?.getFieldValue("userId")) {
+ const adminUser = userDropDown.find(
+ (user) => user.UserTypeName === "Admin"
+ );
- if (adminUser) {
- formRef.current?.setFieldsValue({
- userId: adminUser.UserId
- });
+ if (adminUser) {
+ formRef.current?.setFieldsValue({
+ userId: adminUser.UserId
+ });
+ }
}
- }
-}, [userDropDown]);
+ }, [userDropDown]);
const UserDropDownChange = (value) => {
let user = userDropDown?.find((item) => item?.UserId === value);
- setSelectedUserId(user?.UserId)
+ setSelectedUserId(user?.UserId)
formRef.current?.setFieldsValue({
userId: value,
});
};
-const userDropData = async () => {
- const data ={
- branchId:BranchId,
- compId:CompId,
- appId:AppId
- }
- const gettinguserDropDown = await dispatch(getBranchUsers(data)).unwrap();
- // const gettinguserDropDown = await dispatch(UserDataBasedOnBranchId(BranchId)).unwrap();
+ const userDropData = async () => {
+ const data = {
+ branchId: BranchId,
+ compId: CompId,
+ appId: AppId
+ }
+ const gettinguserDropDown = await dispatch(getBranchUsers(data)).unwrap();
+ // const gettinguserDropDown = await dispatch(UserDataBasedOnBranchId(BranchId)).unwrap();
- if (gettinguserDropDown?.data?.statusCode === 1) {
- const finaluserDropDown = gettinguserDropDown?.data?.data?.filter((value) => value.ActiveStatus === "A");
- setUserDropDown(finaluserDropDown);
+ if (gettinguserDropDown?.data?.statusCode === 1) {
+ const finaluserDropDown = gettinguserDropDown?.data?.data?.filter((value) => value.ActiveStatus === "A");
+ setUserDropDown(finaluserDropDown);
- if (UserType === 'Employee') {
- setSelectedUserId(UserId);
- } else {
- const adminUser = finaluserDropDown.find(
- (user) => user.UserTypeName === "Admin"
- );
- if (adminUser) {
- setSelectedUserId(adminUser.UserId);
+ if (UserType === 'Employee') {
+ setSelectedUserId(UserId);
+ } else {
+ const adminUser = finaluserDropDown.find(
+ (user) => user.UserTypeName === "Admin"
+ );
+ if (adminUser) {
+ setSelectedUserId(adminUser.UserId);
+ }
}
}
- }
-};
+ };
const renderCheckbox = (name, label) =>
allSettingsMap[name] !== undefined && (
@@ -533,6 +547,53 @@ const userDropData = async () => {
Yes
);
+ const ESTIMATE_PRINT_SETTINGS = [
+ {
+ key: 'estimateprintheader',
+ label: 'Show shop header',
+ children: [
+ { key: 'estimatebrname', label: 'name' },
+ { key: 'estimatebraddress', label: 'address' },
+ { key: 'estimatebrphone', label: 'phone number' },
+ ],
+ },
+ {
+ key: 'estimatetitle',
+ label: 'Show "Estimate" title',
+ children: [],
+ },
+ ];
+ const handleEstimateChange = (checkedValues) => {
+ const prev = prevEstimateRef.current;
+ let updated = [...checkedValues];
+
+ ESTIMATE_PRINT_SETTINGS.forEach(({ key, children }) => {
+ if (!children.length) return;
+
+ const childKeys = children
+ .filter((c) => allSettingsMap[c.key] !== undefined)
+ .map((c) => c.key);
+
+ const parentJustChecked = checkedValues.includes(key) && !prev.includes(key);
+
+ // Parent just checked → add all children
+ if (parentJustChecked) {
+ updated = [...new Set([...updated, ...childKeys])];
+ }
+
+ // Calculate AFTER updated may have changed above ✅
+ const anyChildChecked = childKeys.some((c) => updated.includes(c));
+
+ // All children removed → remove parent
+ if (updated.includes(key) && !anyChildChecked) { // ✅ uses variable, no duplicate
+ updated = updated.filter((v) => v !== key);
+ }
+ });
+
+ prevEstimateRef.current = updated;
+ formRef.current?.setFieldValue('estimateSettings', updated);
+ };
+
return (
<>
@@ -621,7 +682,7 @@ const userDropData = async () => {
initialValues={initialValues}
className="preferences-list"
>
- {(UserType === 'Admin' || UserType === 'Super Admin' || UserType === 'Super Admin User')&& (
+ {(UserType === 'Admin' || UserType === 'Super Admin' || UserType === 'Super Admin User') && (
{
'mobilea4',
'Prefer printing in A4/A5 on mobile?'
)}
- {(allSettingsMap['estimateprintheader'] !== undefined ||
- allSettingsMap['estimatetitle'] !== undefined) && (
-
-
- {allSettingsMap['estimateprintheader'] !== undefined && (
-
- Show shop header (Name, Address, GST)
-
- )}
- {allSettingsMap['estimatetitle'] !== undefined && (
-
- Show “Estimate (R/W)” title
-
- )}
-
-
- )}
+ {ESTIMATE_PRINT_SETTINGS.some(({ key }) => allSettingsMap[key] !== undefined) && (
+
+ {({ getFieldValue }) => (
+
+ handleEstimateChange(vals, formRef)}>
+ {ESTIMATE_PRINT_SETTINGS
+ .filter(({ key }) => allSettingsMap[key] !== undefined)
+ .map(({ key, label, children }) => (
+
+ {label}
+
+ {children.length > 0 &&
+ getFieldValue('estimateSettings')?.includes(key) &&
+ children
+ .filter((child) => allSettingsMap[child.key] !== undefined)
+ .map((child) => (
+
+ {child.label}
+
+ ))}
+
+ ))}
+
+
+ )}
+
+ )}