Implement dynamic header and table color functionality

This commit is contained in:
Srinath 2026-03-04 16:49:00 +05:30
commit 6a0f23c752
67 changed files with 12543 additions and 5186 deletions

View File

@ -2607,6 +2607,7 @@ const ThemeSlice = createSlice({
'UnpaidBill', 'UnpaidBill',
'OverallBackground', 'OverallBackground',
'CreditCustomer', 'CreditCustomer',
'PreviousBillFetch'
]; ];
const bookingBillingOptionsArray = tempDic['BookingBilling'][1]; const bookingBillingOptionsArray = tempDic['BookingBilling'][1];
const sortedBillingOptions = desiredOrder const sortedBillingOptions = desiredOrder

View File

@ -12,6 +12,9 @@ import {
GlobalReorderProductDetails, GlobalReorderProductDetails,
PreferenceData, PreferenceData,
getConfigType, getConfigType,
changefocusStatusCust,
changeCombofocus,
GlobalfocusStatusCust,
} from '../../../../../Features/BookingScreen/BookingData/BookingData'; } from '../../../../../Features/BookingScreen/BookingData/BookingData';
import { ArrowRightOutlined } from '@ant-design/icons'; import { ArrowRightOutlined } from '@ant-design/icons';
import { Messages } from '../../../../../Components/Notifications/Messages'; import { Messages } from '../../../../../Components/Notifications/Messages';
@ -50,7 +53,7 @@ const BSBillingEditQuantity = (props) => {
const priceChangeInputRef = useRef(null); const priceChangeInputRef = useRef(null);
const reductionInputRef = useRef(null); const reductionInputRef = useRef(null);
const { setIndex = () => { } } = props; const { setIndex = () => {} } = props;
const [disableSubmitButton, setDisableSubmitButton] = useState(false); const [disableSubmitButton, setDisableSubmitButton] = useState(false);
const SessionData = useSelector(StoredSessionData); const SessionData = useSelector(StoredSessionData);
@ -66,13 +69,24 @@ const BSBillingEditQuantity = (props) => {
shallowEqual shallowEqual
); );
const overAllLimitPreferenece = const overAllLimitPreferenece = preferenceDatas?.[0]?.[
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( 'SettingDtlDetails'
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); ]?.find(
const itemWiseLimitPreferenece = (item) =>
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( item.SettingIdName?.toLowerCase() === 'overalllimit' &&
(item) => item.SettingIdName?.toLowerCase() === 'itemwiselimit' && item?.SettingValue === 'Y'); item?.SettingValue === 'Y'
const maxQtyLimit = itemWiseLimitPreferenece?.SettingCount || overAllLimitPreferenece?.SettingCount || null; );
const itemWiseLimitPreferenece = preferenceDatas?.[0]?.[
'SettingDtlDetails'
]?.find(
(item) =>
item.SettingIdName?.toLowerCase() === 'itemwiselimit' &&
item?.SettingValue === 'Y'
);
const maxQtyLimit =
itemWiseLimitPreferenece?.SettingCount ||
overAllLimitPreferenece?.SettingCount ||
null;
const preferenceOffer = const preferenceOffer =
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
(item) => item.SettingIdName === 'Offer' (item) => item.SettingIdName === 'Offer'
@ -86,7 +100,7 @@ const BSBillingEditQuantity = (props) => {
); );
console.log(preferenceshortcutkey, 'preferenceshortcutkey'); console.log(preferenceshortcutkey, 'preferenceshortcutkey');
const [PriceChangeaccess, setPriceChangeaccess] = useState(true); const [PriceChangeaccess, setPriceChangeaccess] = useState(true);
const selectStatuscust = useSelector(GlobalfocusStatusCust);
const [ConfigDataList, setConfigDataList] = useState([]); const [ConfigDataList, setConfigDataList] = useState([]);
const [messageType, setMessageType] = useState(null); const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null); const [messageData, setMessageData] = useState(null);
@ -115,7 +129,7 @@ const BSBillingEditQuantity = (props) => {
price: 'Price', price: 'Price',
quantity: 'qty', quantity: 'qty',
Parcel: 'Parcel', Parcel: 'Parcel',
weightAmount: 'weightAmount' weightAmount: 'weightAmount',
}; };
const [RadioBtnSelection, setRadioBtnSelection] = useState(() => { const [RadioBtnSelection, setRadioBtnSelection] = useState(() => {
if (props?.shortKeyMethod && SHORTKEY_TO_RADIO[props.shortKeyMethod]) { if (props?.shortKeyMethod && SHORTKEY_TO_RADIO[props.shortKeyMethod]) {
@ -343,7 +357,6 @@ const BSBillingEditQuantity = (props) => {
}; };
const calculateOverAllQty = (item, filterItems) => { const calculateOverAllQty = (item, filterItems) => {
if (!item) return 0; if (!item) return 0;
const totalUsedQty = const totalUsedQty =
@ -446,11 +459,18 @@ const BSBillingEditQuantity = (props) => {
); );
const editedProduct = CartOrderDetails[editedProductIndex]; const editedProduct = CartOrderDetails[editedProductIndex];
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if (
(overAllLimitPreferenece || itemWiseLimitPreferenece) &&
maxQtyLimit
) {
if (overAllLimitPreferenece) { if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails?.filter((_, index) => index !== editedProductIndex)); const calculatedOverAllQty = calculateOverAllQtyLimit(
if ((calculatedOverAllQty + editedQty) > maxQtyLimit) { CartOrderDetails?.filter((_, index) => index !== editedProductIndex)
setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); );
if (calculatedOverAllQty + editedQty > maxQtyLimit) {
setMessageData(
`Overall Quantity Limit Exceeds than ${maxQtyLimit}`
);
setMessageType('warning'); setMessageType('warning');
return; return;
} }
@ -722,11 +742,12 @@ const BSBillingEditQuantity = (props) => {
newPrice, newPrice,
overrideQty = null overrideQty = null
) => { ) => {
const editedQty = overrideQty !== null const editedQty =
? overrideQty overrideQty !== null
: props?.Productdata?.ScaleType !== 'weight' ? overrideQty
? parseInt(Quantity) : props?.Productdata?.ScaleType !== 'weight'
: props.Productdata.OrderQty; ? parseInt(Quantity)
: props.Productdata.OrderQty;
const addFirst = BillOrderPre === 'Y'; const addFirst = BillOrderPre === 'Y';
const isExistsInFreeProdList = FreeProdList?.find( const isExistsInFreeProdList = FreeProdList?.find(
(product) => (product) =>
@ -750,7 +771,7 @@ const BSBillingEditQuantity = (props) => {
return ( return (
cartItem?.InwardDtlId === editedProduct?.InwardDtlId && cartItem?.InwardDtlId === editedProduct?.InwardDtlId &&
cartItem?.OfferMessage?.[0]?.OfferId === cartItem?.OfferMessage?.[0]?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
cartItem?.OfferMode === editedProduct?.OfferMode && cartItem?.OfferMode === editedProduct?.OfferMode &&
cartItem?.BookingTypeName !== editedProduct?.BookingTypeName cartItem?.BookingTypeName !== editedProduct?.BookingTypeName
); );
@ -884,7 +905,7 @@ const BSBillingEditQuantity = (props) => {
cartItem?.InwardDtlId === editedProduct?.InwardDtlId && cartItem?.InwardDtlId === editedProduct?.InwardDtlId &&
cartItem?.OrderRate === editedProduct?.OrderRate && cartItem?.OrderRate === editedProduct?.OrderRate &&
cartItem?.BookingTypeName !== cartItem?.BookingTypeName !==
editedProduct?.BookingTypeName && editedProduct?.BookingTypeName &&
!cartItem?.OfferMode && !cartItem?.OfferMode &&
cartItem?.Offer === 0 cartItem?.Offer === 0
); );
@ -898,7 +919,7 @@ const BSBillingEditQuantity = (props) => {
cartItem?.InwardDtlId === editedProduct?.InwardDtlId && cartItem?.InwardDtlId === editedProduct?.InwardDtlId &&
cartItem?.OrderRate === editedProduct?.OrderRate && cartItem?.OrderRate === editedProduct?.OrderRate &&
cartItem?.BookingTypeName !== cartItem?.BookingTypeName !==
editedProduct?.BookingTypeName && editedProduct?.BookingTypeName &&
cartItem?.OfferMode === editedProduct?.OfferMode && cartItem?.OfferMode === editedProduct?.OfferMode &&
cartItem?.Offer > 0 cartItem?.Offer > 0
); );
@ -1031,7 +1052,7 @@ const BSBillingEditQuantity = (props) => {
) )
) && ) &&
product?.OfferId === product?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
product?.OfferMode === editedProduct?.OfferMode product?.OfferMode === editedProduct?.OfferMode
) { ) {
const freeQty = const freeQty =
@ -1064,7 +1085,7 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
offerProduct?.OfferMode === editedProduct?.OfferMode; offerProduct?.OfferMode === editedProduct?.OfferMode;
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
@ -1147,7 +1168,7 @@ const BSBillingEditQuantity = (props) => {
) )
) && ) &&
product?.OfferId === product?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
product?.OfferMode === editedProduct?.OfferMode product?.OfferMode === editedProduct?.OfferMode
) { ) {
return { return {
@ -1177,7 +1198,7 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
offerProduct?.OfferMode === editedProduct?.OfferMode; offerProduct?.OfferMode === editedProduct?.OfferMode;
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
@ -1364,7 +1385,7 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
offerProduct?.OfferMode === editedProduct?.OfferMode; offerProduct?.OfferMode === editedProduct?.OfferMode;
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
@ -1466,7 +1487,7 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
editedProduct?.OfferMessage?.[0]?.OfferId && editedProduct?.OfferMessage?.[0]?.OfferId &&
offerProduct?.OfferMode === editedProduct?.OfferMode; offerProduct?.OfferMode === editedProduct?.OfferMode;
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
@ -1620,7 +1641,7 @@ const BSBillingEditQuantity = (props) => {
) && ) &&
cartItem?.Offer && cartItem?.Offer &&
isFreeProductApplicable?.OfferId === isFreeProductApplicable?.OfferId ===
cartItem?.OfferMessage?.[0]?.OfferId cartItem?.OfferMessage?.[0]?.OfferId
); );
} }
); );
@ -1909,11 +1930,11 @@ const BSBillingEditQuantity = (props) => {
product?.ProdId === editedProduct?.ProdId && product?.ProdId === editedProduct?.ProdId &&
product?.InwardDtlId === editedProduct?.InwardDtlId && product?.InwardDtlId === editedProduct?.InwardDtlId &&
product?.OfferId === product?.OfferId ===
(sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) && otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) &&
product?.OfferMode === product?.OfferMode ===
(sameBookingTypeProduct?.OfferMode || (sameBookingTypeProduct?.OfferMode ||
otherBookingTypeProduct?.OfferMode) otherBookingTypeProduct?.OfferMode)
) { ) {
return { return {
...product, ...product,
@ -1947,11 +1968,11 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
(sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) && otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) &&
offerProduct?.OfferMode === offerProduct?.OfferMode ===
(sameBookingTypeProduct?.OfferMode || (sameBookingTypeProduct?.OfferMode ||
otherBookingTypeProduct?.OfferMode); otherBookingTypeProduct?.OfferMode);
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
// Get loyalty points from the matching free product // Get loyalty points from the matching free product
@ -2092,7 +2113,7 @@ const BSBillingEditQuantity = (props) => {
cartItem?.Offer > 0 && cartItem?.Offer > 0 &&
isFreeProductApplicable?.OfferMode === cartItem?.OfferMode && isFreeProductApplicable?.OfferMode === cartItem?.OfferMode &&
isFreeProductApplicable?.OfferId === isFreeProductApplicable?.OfferId ===
cartItem?.OfferMessage?.[0]?.OfferId cartItem?.OfferMessage?.[0]?.OfferId
); );
} }
); );
@ -2195,11 +2216,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.ProdId === otherBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
otherBookingTypeProduct.InwardDtlId && otherBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
otherBookingTypeProduct.BookingTypeName && otherBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
otherBookingTypeProduct.OrderRate && otherBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2270,12 +2291,12 @@ const BSBillingEditQuantity = (props) => {
product?.ProdId === editedProduct?.ProdId && product?.ProdId === editedProduct?.ProdId &&
product?.InwardDtlId === editedProduct?.InwardDtlId && product?.InwardDtlId === editedProduct?.InwardDtlId &&
product?.OfferId === product?.OfferId ===
(sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeFreeProduct?.OfferMessage?.[0] otherBookingTypeFreeProduct?.OfferMessage?.[0]
?.OfferId) && ?.OfferId) &&
product?.OfferMode === product?.OfferMode ===
(sameBookingTypeFreeProduct?.OfferMode || (sameBookingTypeFreeProduct?.OfferMode ||
otherBookingTypeFreeProduct?.OfferMode) otherBookingTypeFreeProduct?.OfferMode)
) { ) {
return { return {
...product, ...product,
@ -2309,13 +2330,13 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
(sameBookingTypeFreeProduct?.OfferMessage?.[0] (sameBookingTypeFreeProduct?.OfferMessage?.[0]
?.OfferId || ?.OfferId ||
otherBookingTypeFreeProduct?.OfferMessage?.[0] otherBookingTypeFreeProduct?.OfferMessage?.[0]
?.OfferId) && ?.OfferId) &&
offerProduct?.OfferMode === offerProduct?.OfferMode ===
(sameBookingTypeFreeProduct?.OfferMode || (sameBookingTypeFreeProduct?.OfferMode ||
otherBookingTypeFreeProduct?.OfferMode); otherBookingTypeFreeProduct?.OfferMode);
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
// Get loyalty points from the matching free product // Get loyalty points from the matching free product
@ -2397,11 +2418,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === sameBookingTypeProduct.ProdId && cartItem.ProdId === sameBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
sameBookingTypeProduct.InwardDtlId && sameBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
sameBookingTypeProduct.BookingTypeName && sameBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
sameBookingTypeProduct.OrderRate && sameBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2454,11 +2475,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === sameBookingTypeProduct.ProdId && cartItem.ProdId === sameBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
sameBookingTypeProduct.InwardDtlId && sameBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
sameBookingTypeProduct.BookingTypeName && sameBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
sameBookingTypeProduct.OrderRate && sameBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2547,11 +2568,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.ProdId === otherBookingTypeProduct.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
otherBookingTypeProduct.InwardDtlId && otherBookingTypeProduct.InwardDtlId &&
cartItem?.BookingTypeName === cartItem?.BookingTypeName ===
otherBookingTypeProduct.BookingTypeName && otherBookingTypeProduct.BookingTypeName &&
cartItem?.OrderRate === cartItem?.OrderRate ===
otherBookingTypeProduct.OrderRate && otherBookingTypeProduct.OrderRate &&
cartItem?.OfferMode && cartItem?.OfferMode &&
cartItem?.Offer > 0 cartItem?.Offer > 0
) { ) {
@ -2580,11 +2601,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.ProdId === otherBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
otherBookingTypeProduct.InwardDtlId && otherBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
otherBookingTypeProduct.BookingTypeName && otherBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
otherBookingTypeProduct.OrderRate && otherBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2614,11 +2635,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.ProdId === otherBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
otherBookingTypeProduct.InwardDtlId && otherBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
otherBookingTypeProduct.BookingTypeName && otherBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
otherBookingTypeProduct.OrderRate && otherBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2717,12 +2738,12 @@ const BSBillingEditQuantity = (props) => {
product?.ProdId === editedProduct?.ProdId && product?.ProdId === editedProduct?.ProdId &&
product?.InwardDtlId === editedProduct?.InwardDtlId && product?.InwardDtlId === editedProduct?.InwardDtlId &&
product?.OfferId === product?.OfferId ===
(sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeFreeProduct?.OfferMessage?.[0] otherBookingTypeFreeProduct?.OfferMessage?.[0]
?.OfferId) && ?.OfferId) &&
product?.OfferMode === product?.OfferMode ===
(sameBookingTypeFreeProduct?.OfferMode || (sameBookingTypeFreeProduct?.OfferMode ||
otherBookingTypeFreeProduct?.OfferMode) otherBookingTypeFreeProduct?.OfferMode)
) { ) {
return { return {
...product, ...product,
@ -2756,12 +2777,12 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
(sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeProduct?.OfferMessage?.[0] otherBookingTypeProduct?.OfferMessage?.[0]
?.OfferId) && ?.OfferId) &&
offerProduct?.OfferMode === offerProduct?.OfferMode ===
(sameBookingTypeProduct?.OfferMode || (sameBookingTypeProduct?.OfferMode ||
otherBookingTypeProduct?.OfferMode); otherBookingTypeProduct?.OfferMode);
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
// Get loyalty points from the matching free product // Get loyalty points from the matching free product
@ -2840,11 +2861,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === sameBookingTypeProduct.ProdId && cartItem.ProdId === sameBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
sameBookingTypeProduct.InwardDtlId && sameBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
sameBookingTypeProduct.BookingTypeName && sameBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
sameBookingTypeProduct.OrderRate && sameBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2903,11 +2924,11 @@ const BSBillingEditQuantity = (props) => {
if ( if (
cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.ProdId === otherBookingTypeProduct.ProdId &&
cartItem.InwardDtlId === cartItem.InwardDtlId ===
otherBookingTypeProduct.InwardDtlId && otherBookingTypeProduct.InwardDtlId &&
cartItem.BookingTypeName === cartItem.BookingTypeName ===
otherBookingTypeProduct.BookingTypeName && otherBookingTypeProduct.BookingTypeName &&
cartItem.OrderRate === cartItem.OrderRate ===
otherBookingTypeProduct.OrderRate && otherBookingTypeProduct.OrderRate &&
cartItem.OfferMode && cartItem.OfferMode &&
cartItem.Offer > 0 cartItem.Offer > 0
) { ) {
@ -2979,12 +3000,12 @@ const BSBillingEditQuantity = (props) => {
product?.ProdId === editedProduct?.ProdId && product?.ProdId === editedProduct?.ProdId &&
product?.InwardDtlId === editedProduct?.InwardDtlId && product?.InwardDtlId === editedProduct?.InwardDtlId &&
product?.OfferId === product?.OfferId ===
(sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeFreeProduct?.OfferMessage?.[0] otherBookingTypeFreeProduct?.OfferMessage?.[0]
?.OfferId) && ?.OfferId) &&
product?.OfferMode === product?.OfferMode ===
(sameBookingTypeFreeProduct?.OfferMode || (sameBookingTypeFreeProduct?.OfferMode ||
otherBookingTypeFreeProduct?.OfferMode) otherBookingTypeFreeProduct?.OfferMode)
) { ) {
return { return {
...product, ...product,
@ -3018,12 +3039,12 @@ const BSBillingEditQuantity = (props) => {
// Also check main offer conditions // Also check main offer conditions
const isMatchingOffer = const isMatchingOffer =
offerProduct?.OfferId === offerProduct?.OfferId ===
(sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId ||
otherBookingTypeProduct?.OfferMessage?.[0] otherBookingTypeProduct?.OfferMessage?.[0]
?.OfferId) && ?.OfferId) &&
offerProduct?.OfferMode === offerProduct?.OfferMode ===
(sameBookingTypeProduct?.OfferMode || (sameBookingTypeProduct?.OfferMode ||
otherBookingTypeProduct?.OfferMode); otherBookingTypeProduct?.OfferMode);
if (hasMatchingFreeProduct && isMatchingOffer) { if (hasMatchingFreeProduct && isMatchingOffer) {
// Get loyalty points from the matching free product // Get loyalty points from the matching free product
@ -3178,17 +3199,17 @@ const BSBillingEditQuantity = (props) => {
changeOrderCardDetails( changeOrderCardDetails(
CartOrderDetails?.map((i) => CartOrderDetails?.map((i) =>
i?.InwardDtlId == updatedProduct?.InwardDtlId && i?.InwardDtlId == updatedProduct?.InwardDtlId &&
i?.BookingTypeName == updatedProduct?.BookingTypeName && i?.BookingTypeName == updatedProduct?.BookingTypeName &&
i?.localId === updatedProduct?.localId i?.localId === updatedProduct?.localId
? { ? {
...updatedProduct, ...updatedProduct,
Offer: 0, Offer: 0,
OfferType: OfferType:
updatedProduct?.Type === 'C' updatedProduct?.Type === 'C'
? updatedProduct?.OfferType ? updatedProduct?.OfferType
: null, : null,
OfferMessage: null, OfferMessage: null,
} }
: i : i
) )
) )
@ -3224,10 +3245,10 @@ const BSBillingEditQuantity = (props) => {
((c?.OfferModeType && c?.OfferMode === 'B' ((c?.OfferModeType && c?.OfferMode === 'B'
? true ? true
: c?.OfferMode !== 'B') && : c?.OfferMode !== 'B') &&
c?.OfferMode !== 'P' && c?.OfferMode !== 'P' &&
c?.OfferMode !== 'C' && c?.OfferMode !== 'C' &&
c?.OfferMode !== 'O' && c?.OfferMode !== 'O' &&
c?.OfferMode !== 'L' c?.OfferMode !== 'L'
? true ? true
: c?.Offer === 0); : c?.Offer === 0);
@ -3481,16 +3502,21 @@ const BSBillingEditQuantity = (props) => {
); );
const editedProduct = { const editedProduct = {
...CartOrderDetails[editedProductIndex], ...CartOrderDetails[editedProductIndex],
OrderQty: qty OrderQty: qty,
}; };
await handleEditQuantity(editedProduct, editedProductIndex, editedProduct.OrderRate, qty); await handleEditQuantity(
editedProduct,
editedProductIndex,
editedProduct.OrderRate,
qty
);
props.handleEditQuantityCancel(); props.handleEditQuantityCancel();
setClearQuantity(false); setClearQuantity(false);
}; };
const isKg = const isKg =
props?.Productdata?.Size == 1 && props?.Productdata?.Size == 1 &&
["KG", "KGS"].includes(props?.Productdata?.UomName?.toUpperCase()); ['KG', 'KGS'].includes(props?.Productdata?.UomName?.toUpperCase());
return ( return (
<div className="BSBilling-EditQuantity-Modal"> <div className="BSBilling-EditQuantity-Modal">
@ -3589,23 +3615,30 @@ const BSBillingEditQuantity = (props) => {
Packing Packing
</button> </button>
{isKg && (<button {isKg && (
type="button" <button
className={ type="button"
RadioBtnSelection === 'weightAmount' className={
? 'SelecBtn weightAmount' RadioBtnSelection === 'weightAmount'
: 'ChangeBtn' ? 'SelecBtn weightAmount'
} : 'ChangeBtn'
onClick={() => onRadioBtnChange('weightAmount')} }
> onClick={() => onRadioBtnChange('weightAmount')}
Weight / Amount >
</button>)} Weight / Amount
</button>
)}
</div> </div>
{RadioBtnSelection == 'Quantity' && ( {RadioBtnSelection == 'Quantity' && (
<> <>
<div className="EditQuantity-Quantity"> <div
className="EditQuantity-Quantity"
onBlur={() => {
dispatch(changefocusStatusCust(!selectStatuscust));
dispatch(changeCombofocus(false));
}}
>
<label className="EditQuantity-itemname"> <label className="EditQuantity-itemname">
Item Quantity: Item Quantity:
</label> </label>
@ -3614,6 +3647,10 @@ const BSBillingEditQuantity = (props) => {
type="number" type="number"
value={Quantity} value={Quantity}
onChange={(e) => setQuantity(e.target.value)} onChange={(e) => setQuantity(e.target.value)}
onBlur={() => {
dispatch(changefocusStatusCust(!selectStatuscust));
dispatch(changeCombofocus(false));
}}
className="EditQuantity-Quantitybox" className="EditQuantity-Quantitybox"
/> />
<button <button
@ -3710,7 +3747,7 @@ const BSBillingEditQuantity = (props) => {
? `${parts[0]}.${parts.slice(1).join('')}` ? `${parts[0]}.${parts.slice(1).join('')}`
: cleanedValue; : cleanedValue;
}} }}
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false} // isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
/> />
</Form.Item> </Form.Item>
)} )}
@ -3773,7 +3810,7 @@ const BSBillingEditQuantity = (props) => {
? `${parts[0]}.${parts.slice(1).join('')}` ? `${parts[0]}.${parts.slice(1).join('')}`
: cleanedValue; : cleanedValue;
}} }}
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false} // isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
/> />
</Form.Item> </Form.Item>
{/* <input type="text" {/* <input type="text"
@ -3806,7 +3843,7 @@ const BSBillingEditQuantity = (props) => {
/> />
</> </>
)} )}
{(RadioBtnSelection == 'weightAmount') && isKg && ( {RadioBtnSelection == 'weightAmount' && isKg && (
<> <>
<WeightCalculatePrice <WeightCalculatePrice
CartOrderDetails={CartOrderDetails} CartOrderDetails={CartOrderDetails}
@ -3818,14 +3855,14 @@ const BSBillingEditQuantity = (props) => {
<div style={{ display: 'flex', justifyContent: 'flex-end' }}> <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
{((RadioBtnSelection == 'Price' && disableSubmitButton) || {((RadioBtnSelection == 'Price' && disableSubmitButton) ||
RadioBtnSelection == 'Quantity') && ( RadioBtnSelection == 'Quantity') && (
<Buttons <Buttons
buttonText="Submit" buttonText="Submit"
color="901D77" color="901D77"
htmlType htmlType
// handleSubmit={AddProductQuantity} // handleSubmit={AddProductQuantity}
icon={<ArrowRightOutlined />} icon={<ArrowRightOutlined />}
></Buttons> ></Buttons>
)} )}
</div> </div>
</Form> </Form>
</div> </div>

View File

@ -3859,7 +3859,8 @@ export default function BST1Payment() {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -4178,7 +4178,8 @@ const BSBillingTable2 = () => {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -301,7 +301,39 @@ const BsBill2 = () => {
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails); const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails);
if (calculatedOverAllQty + 1 > maxQtyLimit) { if (calculatedOverAllQty + 1 > maxQtyLimit) {
message.warning(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); message.warning(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
const inwardId = curr.InwardDtlId;
const qty = Number(curr.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
message.warning(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
return; return;
} }
} }

View File

@ -100,6 +100,11 @@ const BSBillingTable3 = () => {
setting?.SettingIdName?.toLowerCase() === 'decimal' && setting?.SettingIdName?.toLowerCase() === 'decimal' &&
setting?.SettingValue === 'Y' setting?.SettingValue === 'Y'
); );
const salesaskiosk = preferenceDatas?.[0]?.SettingDtlDetails?.find(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'salespageaskiosk' &&
setting?.SettingValue === 'Y'
);
const SessionData = useSelector(StoredSessionData); const SessionData = useSelector(StoredSessionData);
const BranchId = SessionData?.BranchId; const BranchId = SessionData?.BranchId;
const AppId = SessionData?.AppId; const AppId = SessionData?.AppId;
@ -366,8 +371,6 @@ const BSBillingTable3 = () => {
await dispatch(changeUnpaidData(false)); await dispatch(changeUnpaidData(false));
await dispatch(changeReorderHoldDetails({})); await dispatch(changeReorderHoldDetails({}));
await dispatch(changeReorderProductDetails([])); await dispatch(changeReorderProductDetails([]));
await dispatch(ChangeSelectedCustDisable(false));
await dispatch(changeSelectedOption(false));
await dispatch(changeBookingType(defaultBookingType || 'TakeAway')); await dispatch(changeBookingType(defaultBookingType || 'TakeAway'));
// await dispatch(changeholddata([])) // await dispatch(changeholddata([]))
await dispatch(changeOrderType()); await dispatch(changeOrderType());
@ -2357,7 +2360,7 @@ const BSBillingTable3 = () => {
fontSize: '16px', fontSize: '16px',
}} }}
> >
{tableData?.length > 0 ? ( {(tableData?.length > 0)? (
<Popconfirm <Popconfirm
title="Delete the items" title="Delete the items"
description="Are you sure you want to clear these items?" description="Are you sure you want to clear these items?"

View File

@ -215,6 +215,7 @@ import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx'; import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js'; import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
import CustomerMobileNumberModal from '../../BookingFunctionality/CustomerOTP.jsx';
const PaymentGatewayEmbedded = lazy( const PaymentGatewayEmbedded = lazy(
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx') () => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
); );
@ -269,6 +270,7 @@ const BSBillingTable3Pay = () => {
const previousOrderOfferDetails = useSelector( const previousOrderOfferDetails = useSelector(
GlobalPreviousOrderOfferDetails GlobalPreviousOrderOfferDetails
); );
const CustomerMobileNumber = useSelector(GlobalSelCustId, shallowEqual);
const AllPaymentOptions = useSelector(GlobalpaymentOptionData); const AllPaymentOptions = useSelector(GlobalpaymentOptionData);
const FreeProdList = useSelector(GlobalFreeProdList); const FreeProdList = useSelector(GlobalFreeProdList);
const offerAppliedProducts = useSelector( const offerAppliedProducts = useSelector(
@ -301,6 +303,7 @@ const BSBillingTable3Pay = () => {
const FontFamily = useSelector(GlobalSelectedFont); const FontFamily = useSelector(GlobalSelectedFont);
const GetCustId = useSelector(GlobalCustId); const GetCustId = useSelector(GlobalCustId);
const SelCustId = useSelector(GlobalSelCustId); const SelCustId = useSelector(GlobalSelCustId);
console.log(GetCustId, SelCustId, 'GetCustId, SelCustId');
const selOption = useSelector(GlobalSelOption); const selOption = useSelector(GlobalSelOption);
const SelectedTableDetails = useSelector(GlobalSelectedTableDetails); const SelectedTableDetails = useSelector(GlobalSelectedTableDetails);
const defaultBookingType = useSelector(GlobalDefaultBookingType); const defaultBookingType = useSelector(GlobalDefaultBookingType);
@ -378,6 +381,17 @@ const BSBillingTable3Pay = () => {
const [PrintOrderDetails, setPrintOrderDetails] = useState([]); const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
const OrderCardDetail = useSelector(GlobalOrderCardDetails); const OrderCardDetail = useSelector(GlobalOrderCardDetails);
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false); const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
const [CustomerOtpmodalopen, setCustomerOtpmodalopen] = useState(false);
const isOtpEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'kioskotp' &&
setting?.SettingValue === 'Y'
);
const salesaskiosk = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'salespageaskiosk' &&
setting?.SettingValue === 'Y'
);
console.log(OrderCardDetail, 'OrderCardDetail'); console.log(OrderCardDetail, 'OrderCardDetail');
//Total calculation //Total calculation
@ -707,6 +721,10 @@ const BSBillingTable3Pay = () => {
// dispatch(getPrintSelectionComponentData(Data1)).unwrap(); // dispatch(getPrintSelectionComponentData(Data1)).unwrap();
}, []); }, []);
useEffect(() => {
(!CustomerMobileNumber && isOtpEnabled && salesaskiosk) && setCustomerOtpmodalopen(true);
}, [PrintOrderDetails, CustomerMobileNumber]);
useEffect(() => { useEffect(() => {
const getPrintData = async () => { const getPrintData = async () => {
try { try {
@ -875,7 +893,7 @@ const BSBillingTable3Pay = () => {
//mohan end //mohan end
useEffect(() => { useEffect(() => {
if (OrderCardDetail?.length <= 0) { if (OrderCardDetail?.length <= 0 && !salesaskiosk) {
dispatch(changeCustomerID(null)); dispatch(changeCustomerID(null));
dispatch(changeSelectedCustId(null)); dispatch(changeSelectedCustId(null));
dispatch(changeSelectedOption(null)); dispatch(changeSelectedOption(null));
@ -1072,9 +1090,9 @@ const BSBillingTable3Pay = () => {
setDefaultPaymentMode([]); setDefaultPaymentMode([]);
} }
}; };
if (salesBillEdit) { // if (salesBillEdit) {
setDefaultPaymentOption(); setDefaultPaymentOption();
} // }
}, [defaultPaymentTrigger, salesBillEdit]); }, [defaultPaymentTrigger, salesBillEdit]);
const TokenPrint = async (index) => { const TokenPrint = async (index) => {
@ -3791,7 +3809,8 @@ const BSBillingTable3Pay = () => {
</div> </div>
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div
@ -4917,6 +4936,13 @@ const BSBillingTable3Pay = () => {
} }
/> />
)} )}
{(CustomerOtpmodalopen && isOtpEnabled && salesaskiosk) && (
<CustomerMobileNumberModal
open={CustomerOtpmodalopen}
HandleCloseModal={() => setCustomerOtpmodalopen(false)}
/>
)}
</> </>
</Suspense> </Suspense>
); );

View File

@ -3920,7 +3920,8 @@ const BSBilling4Payment = () => {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -198,14 +198,12 @@ import CardPopover from '../StandardTable/Utils/CardPopover.jsx';
import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx'; import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js'; import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
// Jsx Files // Jsx Files
const OtherServicePrintStyle1 = lazy( const OtherServicePrintStyle1 = lazy(
() => () =>
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx') import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
); );
const OtherServiceMobilePrint = lazy(
() => import('../../BookingFunctionality/OtherServiceMobilePrint.jsx')
);
const BSOtherServiceClaim = lazy( const BSOtherServiceClaim = lazy(
() => import('../../UtillComponents/BSOtherServiceClaim.jsx') () => import('../../UtillComponents/BSOtherServiceClaim.jsx')
); );
@ -4165,7 +4163,8 @@ const BSBillingTable5 = () => {
'' ''
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -2161,6 +2161,39 @@ const BsBill = () => {
setMessageType('warning'); setMessageType('warning');
return; return;
} }
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = TableData.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setMessageType('warning');
return;
}
} }
} }
const OtherOrderDatas = TableData?.filter( const OtherOrderDatas = TableData?.filter(

View File

@ -4152,7 +4152,8 @@ const BST6Payment = () => {
'' ''
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -3651,7 +3651,8 @@ const BSBilling7Payment = () => {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -11,17 +11,21 @@ import { InputField } from '../../../../../Components/Forms/InputField';
import { import {
GlobalOrderCardDetails, GlobalOrderCardDetails,
changeOrderCardDetails, changeOrderCardDetails,
changefocusStatusCust,
changeCombofocus,
GlobalfocusStatusCust,
} from '../../../../../Features/BookingScreen/BookingData/BookingData'; } from '../../../../../Features/BookingScreen/BookingData/BookingData';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { validateSafeInput } from '../../../../../Services/Others'; import { validateSafeInput } from '../../../../../Services/Others';
import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib'; import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
import "../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss" import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss';
const BSImeiDetails = (props) => { const BSImeiDetails = (props) => {
const formRef = useRef(null); const formRef = useRef(null);
const dispatch = useDispatch(); const dispatch = useDispatch();
const [messageType, setMessageType] = useState(null); const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null); const [messageData, setMessageData] = useState(null);
const CartOrderDetails = useSelector(GlobalOrderCardDetails); const CartOrderDetails = useSelector(GlobalOrderCardDetails);
const selectStatuscust = useSelector(GlobalfocusStatusCust);
const [DeviceDetailOpen, setDeviceDetailOpen] = useState(props.DeviceDetails); const [DeviceDetailOpen, setDeviceDetailOpen] = useState(props.DeviceDetails);
const [ProductDetail, setProductDetail] = useState(props.ProductDetail); const [ProductDetail, setProductDetail] = useState(props.ProductDetail);
const [RadioBtnSelection, setRadioBtnSelection] = useState('Serial'); const [RadioBtnSelection, setRadioBtnSelection] = useState('Serial');
@ -51,8 +55,8 @@ const BSImeiDetails = (props) => {
); );
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
description: productidentifier?.[0]?.Description || "", description: productidentifier?.[0]?.Description || '',
}) });
}, []); }, []);
const CloseDeviceDetailModal = () => { const CloseDeviceDetailModal = () => {
props.handleDeviceDetailClose(); props.handleDeviceDetailClose();
@ -72,8 +76,7 @@ const BSImeiDetails = (props) => {
} else { } else {
setSerialNumberList([...SerialNumberList, e]); setSerialNumberList([...SerialNumberList, e]);
} }
} } else {
else {
setMessageType('error'); setMessageType('error');
setMessageData('Already Selected '); setMessageData('Already Selected ');
} }
@ -94,7 +97,6 @@ const BSImeiDetails = (props) => {
setMessageData('you cant enter more than Order Qty'); setMessageData('you cant enter more than Order Qty');
} }
formRef.current?.resetFields(['SerialNumbertext', 'IMEINumbertext']); formRef.current?.resetFields(['SerialNumbertext', 'IMEINumbertext']);
}; };
const IMEINumberOnchange = (e) => { const IMEINumberOnchange = (e) => {
@ -139,8 +141,10 @@ const BSImeiDetails = (props) => {
setMessageType(null); setMessageType(null);
}, []); }, []);
const AddDeviceDetails = () => { const AddDeviceDetails = () => {
console.log(
console.log(formRef?.current?.getFieldsValue, "formRef?.current?.getFieldsValue") formRef?.current?.getFieldsValue,
'formRef?.current?.getFieldsValue'
);
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length); const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
// Create the new object array // Create the new object array
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => { const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
@ -165,17 +169,16 @@ const BSImeiDetails = (props) => {
cartItem // if the item is already in the cart, increase the quantity of the item cartItem // if the item is already in the cart, increase the quantity of the item
) => ) =>
cartItem.ProdId === ProductDetail.ProdId && cartItem.ProdId === ProductDetail.ProdId &&
cartItem.InwardDtlId === ProductDetail.InwardDtlId && cartItem.InwardDtlId === ProductDetail.InwardDtlId &&
cartItem?.OrderRate === ProductDetail?.OrderRate && cartItem?.OrderRate === ProductDetail?.OrderRate &&
cartItem?.BookingTypeName === ProductDetail?.BookingTypeName cartItem?.BookingTypeName === ProductDetail?.BookingTypeName
? { ...cartItem, ProductIdentifierDtls: IdentifyDetails } ? { ...cartItem, ProductIdentifierDtls: IdentifyDetails }
: cartItem // otherwise, return the cart item : cartItem // otherwise, return the cart item
) )
) )
); );
formRef?.current?.resetFields() formRef?.current?.resetFields();
CloseDeviceDetailModal(); CloseDeviceDetailModal();
}; };
console.log(ProductDetail, 'ProductDetaildevice'); console.log(ProductDetail, 'ProductDetaildevice');
return ( return (
@ -239,7 +242,7 @@ const BSImeiDetails = (props) => {
{RadioBtnSelection == 'Serial' && ( {RadioBtnSelection == 'Serial' && (
<div> <div>
<div className="SerialNumberColumn"> <div className="SerialNumberColumn">
{ProductDetail?.FullProductIdentifierDtls?.length > 0 && {ProductDetail?.FullProductIdentifierDtls?.length > 0 && (
<Form.Item name="SerialNumber"> <Form.Item name="SerialNumber">
<DropDowns <DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter( options={ProductDetail?.FullProductIdentifierDtls?.filter(
@ -260,35 +263,39 @@ const BSImeiDetails = (props) => {
onChangeFunction={(e) => SerialNumberOnchange(e)} onChangeFunction={(e) => SerialNumberOnchange(e)}
/> />
</Form.Item> </Form.Item>
)}
}
<Form.Item <Form.Item
name="SerialNumbertext" name="SerialNumbertext"
rules={[ rules={[
{ {
validator: async (_, value) => { validator: async (_, value) => {
await validateSafeInput(value); await validateSafeInput(value);
return Promise.resolve(); return Promise.resolve();
}, },
}, },
]} ]}
> >
<InputField <div
field="SerialNumbertext" onBlur={() => {
name="SerialNumbertext" dispatch(changefocusStatusCust(!selectStatuscust));
label="Serial Number" dispatch(changeCombofocus(false));
fieldState={true} }}
fieldApi={true} >
autocomplete="off" <InputField
type="text" field="SerialNumbertext"
// onKeyDown={(e) => { name="SerialNumbertext"
// if (['e', 'E', '+', '-', '.'].includes(e.key)) { label="Serial Number"
// e.preventDefault(); fieldState={true}
// } fieldApi={true}
// }} autocomplete="off"
/> type="text"
onBlur={() => {
dispatch(changefocusStatusCust(!selectStatuscust));
dispatch(changeCombofocus(false));
}}
/>
</div>
</Form.Item> </Form.Item>
<Buttons <Buttons
buttonText="Add" buttonText="Add"
@ -315,11 +322,10 @@ const BSImeiDetails = (props) => {
</div> </div>
)} )}
{RadioBtnSelection == 'IMEI' && ( {RadioBtnSelection == 'IMEI' && (
<div> <div>
<div className="SerialNumberColumn"> <div className="SerialNumberColumn">
{ProductDetail?.FullProductIdentifierDtls?.length > 0 && {ProductDetail?.FullProductIdentifierDtls?.length > 0 && (
<Form.Item name="IMEINumber"> <Form.Item name="IMEINumber">
<DropDowns <DropDowns
options={ProductDetail?.FullProductIdentifierDtls?.filter( options={ProductDetail?.FullProductIdentifierDtls?.filter(
@ -342,34 +348,40 @@ const BSImeiDetails = (props) => {
className="field-DropDown" className="field-DropDown"
onChangeFunction={(e) => IMEINumberOnchange(e)} onChangeFunction={(e) => IMEINumberOnchange(e)}
/> />
</Form.Item>} </Form.Item>
)}
<Form.Item <Form.Item
name="IMEINumbertext" name="IMEINumbertext"
rules={[ rules={[
{ {
validator: async (_, value) => { validator: async (_, value) => {
await validateSafeInput(value); await validateSafeInput(value);
return Promise.resolve(); return Promise.resolve();
}, },
}, },
]} ]}
> >
<InputField <div
field="IMEINumbertext" onBlur={() => {
name="IMEINumbertext" dispatch(changefocusStatusCust(!selectStatuscust));
label="IMEI Number" dispatch(changeCombofocus(false));
fieldState={true} }}
fieldApi={true} >
autocomplete="off" <InputField
type="text" field="IMEINumbertext"
// onKeyDown={(e) => { name="IMEINumbertext"
// if (['e', 'E', '+', '-', '.'].includes(e.key)) { label="IMEI Number"
// e.preventDefault(); fieldState={true}
// } fieldApi={true}
// }} autocomplete="off"
/> type="text"
onBlur={() => {
dispatch(changefocusStatusCust(!selectStatuscust));
dispatch(changeCombofocus(false));
}}
/>
</div>
</Form.Item> </Form.Item>
<Buttons <Buttons
buttonText="Add" buttonText="Add"
@ -395,12 +407,12 @@ const BSImeiDetails = (props) => {
</div> </div>
)} )}
<div style={{ display: "flex", marginTop: "10px" }}> <div style={{ display: 'flex', marginTop: '10px' }}>
<Form.Item name="description"> <Form.Item name="description">
<TextAreaInput <TextAreaInput
disabled={ disabled={
(IMEINumberList?.length === 0) && IMEINumberList?.length === 0 &&
(SerialNumberList?.length === 0) SerialNumberList?.length === 0
} }
autoComplete="off" autoComplete="off"
label={<label>Description..</label>} label={<label>Description..</label>}
@ -411,7 +423,6 @@ const BSImeiDetails = (props) => {
</div> </div>
</Form> </Form>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}> <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Buttons <Buttons
buttonText="Submit" buttonText="Submit"
@ -420,11 +431,11 @@ const BSImeiDetails = (props) => {
icon={<ArrowRightOutlined />} icon={<ArrowRightOutlined />}
></Buttons> ></Buttons>
</div> </div>
</div > </div>
} }
handleCancel={CloseDeviceDetailModal} handleCancel={CloseDeviceDetailModal}
/> />
</div > </div>
); );
}; };
export default BSImeiDetails; export default BSImeiDetails;

View File

@ -190,7 +190,7 @@ import {
getExpireProductsList, getExpireProductsList,
getLowStockAlertProductsList, getLowStockAlertProductsList,
} from '../../../../../Features/ProductPage/ProductPage.js'; } from '../../../../../Features/ProductPage/ProductPage.js';
// Jsx Files // Jsx Files
const CustomerOrders = lazy( const CustomerOrders = lazy(
() => import('../../BookingFunctionality/CustomerOrders.jsx') () => import('../../BookingFunctionality/CustomerOrders.jsx')
@ -198,13 +198,9 @@ const CustomerOrders = lazy(
const PaymentGatewayEmbedded = lazy( const PaymentGatewayEmbedded = lazy(
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx') () => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
); );
const MobileMultiPdfPrintTrigger = lazy( import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
() => import('../../UtillComponents/MobileMultiPdfPrintTrigger.jsx') import OtherServicePrintStyle1 from '../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx';
);
const OtherServicePrintStyle1 = lazy(
() =>
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
);
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx'; import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
const QrinScreen = lazy( const QrinScreen = lazy(
@ -215,9 +211,8 @@ const SMSShare = lazy(() => import('../../../../WhatsAppShare/SmsShare'));
const WhatsAppShare = lazy( const WhatsAppShare = lazy(
() => import('../../../../WhatsAppShare/whatsAppShare') () => import('../../../../WhatsAppShare/whatsAppShare')
); );
const TokensinglePrint = lazy(
() => import('../../../../paymentpdfPage/TokenOnlyPrints/TokeninsinglePrint') import TokensinglePrint from '../../../../paymentpdfPage/TokenOnlyPrints/TokeninsinglePrint';
);
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx'; import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
// Icons File // Icons File
@ -2840,7 +2835,10 @@ const StandardTablePayment = () => {
setPaybtnselected(PaymentOptionsModeId); setPaybtnselected(PaymentOptionsModeId);
setQrCode(false); setQrCode(false);
setUpinotSelected(false); setUpinotSelected(false);
if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { if (
holdCheckedSalesSetup ||
NavBarOptions?.some((e) => e?.OptionName == 'Hold')
) {
getHolddata(); getHolddata();
} }
setCurrentOrderNetAmount(0); setCurrentOrderNetAmount(0);
@ -3527,7 +3525,8 @@ const StandardTablePayment = () => {
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -4403,7 +4403,8 @@ const BSC1Payment = (props) => {
</> </>
)} )}
{/* Customer Orders */} {/* Customer Orders */}
{SelCustId && ( {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
.length === 1) && (
<Tooltip title="Customer Orders" isMobile={isMobile}> <Tooltip title="Customer Orders" isMobile={isMobile}>
{' '} {' '}
<div <div

View File

@ -721,7 +721,7 @@ export default function BSC1Search(props) {
WithoutTaxRate: WithoutTaxRate:
availableFreeQty * item.OrderRate - availableFreeQty * item.OrderRate -
(availableFreeQty * item.OrderRate * item.TaxPercentage) / (availableFreeQty * item.OrderRate * item.TaxPercentage) /
100, 100,
Offer: availableFreeQty * item.OrderRate, Offer: availableFreeQty * item.OrderRate,
}; };
@ -770,7 +770,7 @@ export default function BSC1Search(props) {
((existingPaidItem.OrderQty + excessQty) * ((existingPaidItem.OrderQty + excessQty) *
item.OrderRate * item.OrderRate *
item.TaxPercentage) / item.TaxPercentage) /
100, 100,
}; };
ModifiedData.push(mergedPaidItem); ModifiedData.push(mergedPaidItem);
@ -805,7 +805,7 @@ export default function BSC1Search(props) {
data?.InwardDtlId === item?.InwardDtlId && data?.InwardDtlId === item?.InwardDtlId &&
data?.ProdId === item?.ProdId && data?.ProdId === item?.ProdId &&
data?.OfferMessage?.[0]?.OfferId === data?.OfferMessage?.[0]?.OfferId ===
item?.OfferMessage?.[0]?.OfferId item?.OfferMessage?.[0]?.OfferId
); );
if (isAlreadyExists !== -1) { if (isAlreadyExists !== -1) {
@ -825,11 +825,11 @@ export default function BSC1Search(props) {
).toFixed(2), ).toFixed(2),
WithoutTaxRate: WithoutTaxRate:
(ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) *
item.OrderRate - item.OrderRate -
((ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * ((ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) *
item.OrderRate * item.OrderRate *
item.TaxPercentage) / item.TaxPercentage) /
100, 100,
Offer: Offer:
(ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) *
item.OrderRate, item.OrderRate,
@ -855,10 +855,10 @@ export default function BSC1Search(props) {
const appliedOfferAlreadyExists = AppliedOffers.findIndex( const appliedOfferAlreadyExists = AppliedOffers.findIndex(
(offer) => (offer) =>
offer?.FreeProductsList?.FreeProdId === offer?.FreeProductsList?.FreeProdId ===
matchingFreeProduct?.FreeProdId && matchingFreeProduct?.FreeProdId &&
offer?.TableName === matchingFreeProduct?.TableName && offer?.TableName === matchingFreeProduct?.TableName &&
offer?.TableUniqueName === offer?.TableUniqueName ===
matchingFreeProduct?.TableUniqueName && matchingFreeProduct?.TableUniqueName &&
offer?.OfferId === matchingFreeProduct?.OfferId && offer?.OfferId === matchingFreeProduct?.OfferId &&
offer?.OfferMode === matchingFreeProduct?.OfferMode && offer?.OfferMode === matchingFreeProduct?.OfferMode &&
offer?.FreeProductsList?.ProdVariantDetails?.[0] offer?.FreeProductsList?.ProdVariantDetails?.[0]
@ -1695,7 +1695,7 @@ export default function BSC1Search(props) {
<span <span
style={ style={
record.StockCount > 0 || record.StockCount > 0 ||
record.StockCount === 'Stock Not Maintained' record.StockCount === 'Stock Not Maintained'
? { color: '#000', cursor: 'pointer' } ? { color: '#000', cursor: 'pointer' }
: { color: '#f49898', cursor: 'not-allowed' } : { color: '#f49898', cursor: 'not-allowed' }
} }
@ -1725,7 +1725,7 @@ export default function BSC1Search(props) {
<span <span
style={ style={
record.StockCount > 0 || record.StockCount > 0 ||
record.StockCount === 'Stock Not Maintained' record.StockCount === 'Stock Not Maintained'
? { color: '#000', cursor: 'pointer' } ? { color: '#000', cursor: 'pointer' }
: { color: '#f49898', cursor: 'not-allowed' } : { color: '#f49898', cursor: 'not-allowed' }
} }
@ -1755,7 +1755,7 @@ export default function BSC1Search(props) {
<span <span
style={ style={
record.StockCount > 0 || record.StockCount > 0 ||
record.StockCount === 'Stock Not Maintained' record.StockCount === 'Stock Not Maintained'
? { color: '#000', cursor: 'pointer' } ? { color: '#000', cursor: 'pointer' }
: { color: '#f49898', cursor: 'not-allowed' } : { color: '#f49898', cursor: 'not-allowed' }
} }
@ -1919,11 +1919,11 @@ export default function BSC1Search(props) {
StockCount: StockCount:
qtydata?.ProductDetail?.[0]?.StockAvailable === 'Y' qtydata?.ProductDetail?.[0]?.StockAvailable === 'Y'
? returnVariantStock( ? returnVariantStock(
qtydata?.ProductDetail?.[QtyIndex]?.ProdId, qtydata?.ProductDetail?.[QtyIndex]?.ProdId,
item?.OverAllQty, item?.OverAllQty,
CartOrderDetails, CartOrderDetails,
item?.ProdVariantName item?.ProdVariantName
) )
: 'Stock Not Maintained', : 'Stock Not Maintained',
}); });
}); });
@ -1939,17 +1939,17 @@ export default function BSC1Search(props) {
'Batch No': item?.BatchRef, 'Batch No': item?.BatchRef,
StockCount: onePeiceFlow StockCount: onePeiceFlow
? returnCountStock( ? returnCountStock(
item?.ProdId, item?.ProdId,
item?.BalanceQty, item?.BalanceQty,
CartOrderDetails, CartOrderDetails,
item?.InwardDtlId item?.InwardDtlId
) * item?.NoOfPcs ) * item?.NoOfPcs
: returnCountStock( : returnCountStock(
item?.ProdId, item?.ProdId,
item?.BalanceQty, item?.BalanceQty,
CartOrderDetails, CartOrderDetails,
item?.InwardDtlId item?.InwardDtlId
), ),
'Stock Date': StockDate(item?.InwardDate), 'Stock Date': StockDate(item?.InwardDate),
Price: onePeiceFlow ? item?.OnePcsPrice : item?.SellPrice, Price: onePeiceFlow ? item?.OnePcsPrice : item?.SellPrice,
ExpDate: ExpDate:
@ -2003,13 +2003,13 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
VarientIndex VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
cartItem?.OrderRate === cartItem?.OrderRate ===
item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
VarientIndex VarientIndex
]?.StockDetails?.[0]?.SellPrice && ]?.StockDetails?.[0]?.SellPrice &&
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2018,9 +2018,9 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
VarientIndex VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
// (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice)
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2062,11 +2062,11 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[0]?.InwardDtlId && ?.StockDetails?.[0]?.InwardDtlId &&
cartItem?.OrderRate === cartItem?.OrderRate ===
item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[0]?.SellPrice && ?.StockDetails?.[0]?.SellPrice &&
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2075,9 +2075,9 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
VarientIndex VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
// (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice)
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2155,13 +2155,13 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
index.key index.key
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
cartItem?.OrderRate === cartItem?.OrderRate ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
index.key index.key
]?.StockDetails?.[0]?.SellPrice && ]?.StockDetails?.[0]?.SellPrice &&
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2169,11 +2169,11 @@ export default function BSC1Search(props) {
let Isincartonepc = CartOrderDetails?.filter( let Isincartonepc = CartOrderDetails?.filter(
(cartItem) => (cartItem) =>
cartItem?.ProdId === cartItem?.ProdId ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdId && qtydata?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
VarientIndex VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
// (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice)
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2237,11 +2237,11 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key] qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]
?.StockDetails?.[0]?.InwardDtlId && ?.StockDetails?.[0]?.InwardDtlId &&
cartItem?.OrderRate === cartItem?.OrderRate ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key] qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]
?.StockDetails?.[0]?.SellPrice && ?.StockDetails?.[0]?.SellPrice &&
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2250,9 +2250,9 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[
VarientIndex VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
// (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice)
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2327,15 +2327,15 @@ export default function BSC1Search(props) {
let Isincart = CartOrderDetails?.find( let Isincart = CartOrderDetails?.find(
(cartItem) => (cartItem) =>
cartItem?.ProdId === cartItem?.ProdId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
item?.VarientIndex item?.VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
cartItem?.OrderRate === cartItem?.OrderRate ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
item?.VarientIndex item?.VarientIndex
]?.StockDetails?.[0]?.SellPrice && ]?.StockDetails?.[0]?.SellPrice &&
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2343,11 +2343,11 @@ export default function BSC1Search(props) {
let Isincartonepc = CartOrderDetails?.filter( let Isincartonepc = CartOrderDetails?.filter(
(cartItem) => (cartItem) =>
cartItem?.ProdId === cartItem?.ProdId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
item?.VarientIndexs item?.VarientIndexs
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
// (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice)
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2425,15 +2425,15 @@ export default function BSC1Search(props) {
let Isincart = CartOrderDetails?.find( let Isincart = CartOrderDetails?.find(
(cartItem) => (cartItem) =>
cartItem?.ProdId === cartItem?.ProdId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
item?.VarientIndex item?.VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
cartItem?.OrderRate === cartItem?.OrderRate ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
item?.VarientIndex item?.VarientIndex
]?.StockDetails?.[0]?.SellPrice && ]?.StockDetails?.[0]?.SellPrice &&
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2441,11 +2441,11 @@ export default function BSC1Search(props) {
let Isincartonepc = CartOrderDetails?.filter( let Isincartonepc = CartOrderDetails?.filter(
(cartItem) => (cartItem) =>
cartItem?.ProdId === cartItem?.ProdId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId &&
cartItem?.InwardDtlId === cartItem?.InwardDtlId ===
qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[
item?.VarientIndex item?.VarientIndex
]?.StockDetails?.[0]?.InwardDtlId && ]?.StockDetails?.[0]?.InwardDtlId &&
// (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice)
!cartItem?.SalesId !cartItem?.SalesId
); );
@ -2565,7 +2565,7 @@ export default function BSC1Search(props) {
const isKgsProduct = const isKgsProduct =
(a?.ProductDetail?.[QtyIndex]?.UomName?.toLowerCase() === 'kgs' || (a?.ProductDetail?.[QtyIndex]?.UomName?.toLowerCase() === 'kgs' ||
a?.ProductDetail?.[QtyIndex]?.UomName?.toLowerCase() === a?.ProductDetail?.[QtyIndex]?.UomName?.toLowerCase() ===
'kg'?.toLowerCase()) && 'kg'?.toLowerCase()) &&
a?.ProductDetail?.[QtyIndex]?.Size === '1'; a?.ProductDetail?.[QtyIndex]?.Size === '1';
if ( if (
@ -2578,11 +2578,11 @@ export default function BSC1Search(props) {
parseFloat( parseFloat(
onePcs onePcs
? (a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ? (a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.OnePcsPrice / ?.StockDetails?.[stockIndex]?.OnePcsPrice /
1000) * 1000) *
(parseFloat(WeightScaleWeight) * 1000) (parseFloat(WeightScaleWeight) * 1000)
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.SellPrice / 1000 ?.StockDetails?.[stockIndex]?.SellPrice / 1000
) * ) *
(parseFloat(WeightScaleWeight) * 1000); (parseFloat(WeightScaleWeight) * 1000);
let data = { let data = {
@ -2638,9 +2638,9 @@ export default function BSC1Search(props) {
?.StockDetails?.[stockIndex]?.InwardId, ?.StockDetails?.[stockIndex]?.InwardId,
MRP: onePcs MRP: onePcs
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.OnePcsPrice ?.StockDetails?.[stockIndex]?.OnePcsPrice
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.MRP, ?.StockDetails?.[stockIndex]?.MRP,
FullProductIdentifierDtls: FullProductIdentifierDtls:
a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.ProductIdentifierDtls, ?.StockDetails?.[stockIndex]?.ProductIdentifierDtls,
@ -2748,19 +2748,19 @@ export default function BSC1Search(props) {
?.StockDetails?.[stockIndex]?.InwardId, ?.StockDetails?.[stockIndex]?.InwardId,
MRP: onePcs MRP: onePcs
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.OnePcsPrice ?.StockDetails?.[stockIndex]?.OnePcsPrice
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.MRP, ?.StockDetails?.[stockIndex]?.MRP,
OrderRate: onePcs OrderRate: onePcs
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.OnePcsPrice ?.StockDetails?.[stockIndex]?.OnePcsPrice
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.SellPrice, ?.StockDetails?.[stockIndex]?.SellPrice,
SellingPrice: onePcs SellingPrice: onePcs
? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.OnePcsPrice ?.StockDetails?.[stockIndex]?.OnePcsPrice
: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.SellPrice, ?.StockDetails?.[stockIndex]?.SellPrice,
SuppId: SuppId:
a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]
?.StockDetails?.[stockIndex]?.SuppId, ?.StockDetails?.[stockIndex]?.SuppId,
@ -2851,6 +2851,40 @@ export default function BSC1Search(props) {
setMessageType('warning'); setMessageType('warning');
return; return;
} }
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setMessageType('warning');
return;
}
} }
} }
@ -2944,15 +2978,15 @@ export default function BSC1Search(props) {
const isExistsInFreeProdList = hasOffer const isExistsInFreeProdList = hasOffer
? FreeProdList?.filter( ? FreeProdList?.filter(
(f) => (f) =>
f?.FreeProdId === item?.ProdId && f?.FreeProdId === item?.ProdId &&
f?.ProdVariantDetails?.some((variant) => f?.ProdVariantDetails?.some((variant) =>
variant?.StockDetails?.some( variant?.StockDetails?.some(
(stock) => stock?.FreeInwardDtlId === item?.InwardDtlId (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId
) )
) && ) &&
f?.RemainingQty > 0 f?.RemainingQty > 0
) )
: []; : [];
const calculateTaxAmounts = (qty, rate, taxPercentage) => { const calculateTaxAmounts = (qty, rate, taxPercentage) => {
@ -3019,10 +3053,10 @@ export default function BSC1Search(props) {
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
? true ? true
: cartItem?.OfferMode !== 'B') && : cartItem?.OfferMode !== 'B') &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'C' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' && cartItem?.OfferMode !== 'O' &&
cartItem?.OfferMode !== 'L' cartItem?.OfferMode !== 'L'
? true ? true
: cartItem?.Offer === 0) : cartItem?.Offer === 0)
); );
@ -3039,10 +3073,10 @@ export default function BSC1Search(props) {
(cartItem) => (cartItem) =>
itemMatchCondition(cartItem) && itemMatchCondition(cartItem) &&
(cartItem?.OfferMode !== 'B' && (cartItem?.OfferMode !== 'B' &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'C' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' && cartItem?.OfferMode !== 'O' &&
cartItem?.OfferMode !== 'L' cartItem?.OfferMode !== 'L'
? true ? true
: cartItem?.Offer === 0) : cartItem?.Offer === 0)
); );
@ -3056,10 +3090,10 @@ export default function BSC1Search(props) {
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
? true ? true
: cartItem?.OfferMode !== 'B') && : cartItem?.OfferMode !== 'B') &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'L' && cartItem?.OfferMode !== 'L' &&
cartItem?.OfferMode !== 'C' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' cartItem?.OfferMode !== 'O'
? true ? true
: cartItem?.Offer === 0) : cartItem?.Offer === 0)
) )
@ -3070,10 +3104,10 @@ export default function BSC1Search(props) {
!( !(
itemMatchCondition(cartItem) && itemMatchCondition(cartItem) &&
(cartItem?.OfferMode !== 'B' && (cartItem?.OfferMode !== 'B' &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'L' && cartItem?.OfferMode !== 'L' &&
cartItem?.OfferMode !== 'C' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' cartItem?.OfferMode !== 'O'
? true ? true
: cartItem?.Offer === 0) : cartItem?.Offer === 0)
) )
@ -3146,8 +3180,8 @@ export default function BSC1Search(props) {
isItemInCart, isItemInCart,
item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' item?.OtherProduct === 'Others' || item?.ScaleType === 'weight'
? ( ? (
(item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty)
)?.toFixed(3) )?.toFixed(3)
: null : null
); );
const updatedData = addFirst const updatedData = addFirst
@ -3274,9 +3308,9 @@ export default function BSC1Search(props) {
isItemInCartHold, isItemInCartHold,
item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' item?.OtherProduct === 'Others' || item?.ScaleType === 'weight'
? ( ? (
(item?.OrderQty || 0) + (item?.OrderQty || 0) +
parseFloat(isItemInCartHold?.OrderQty) parseFloat(isItemInCartHold?.OrderQty)
)?.toFixed(3) )?.toFixed(3)
: null : null
); );
const updatedData = addFirst const updatedData = addFirst
@ -3528,14 +3562,14 @@ export default function BSC1Search(props) {
updatedCartData = cartData.map((item, idx) => updatedCartData = cartData.map((item, idx) =>
idx === indexToCheck idx === indexToCheck
? { ? {
...item, ...item,
Offer: null, Offer: null,
OfferMessage: undefined, OfferMessage: undefined,
OfferMode: undefined, OfferMode: undefined,
OfferModeType: false, OfferModeType: false,
OfferType: undefined, OfferType: undefined,
OfferValue: null, OfferValue: null,
} }
: item : item
); );
} }
@ -3586,8 +3620,8 @@ export default function BSC1Search(props) {
...item, ...item,
Offer: Offer:
sameProduct || sameProduct ||
bestOffer?.OfferMode === 'I' || bestOffer?.OfferMode === 'I' ||
bestOffer?.OfferMode === 'Q' bestOffer?.OfferMode === 'Q'
? bestOffer?.OfferAmount || item.Offer ? bestOffer?.OfferAmount || item.Offer
: item.Offer || bestOffer?.OfferAmount, : item.Offer || bestOffer?.OfferAmount,
OfferType: item?.OfferType || bestOffer?.OfferType, OfferType: item?.OfferType || bestOffer?.OfferType,
@ -3604,10 +3638,10 @@ export default function BSC1Search(props) {
((c?.OfferModeType && c?.OfferMode === 'B' ((c?.OfferModeType && c?.OfferMode === 'B'
? true ? true
: c?.OfferMode !== 'B') && : c?.OfferMode !== 'B') &&
c?.OfferMode !== 'P' && c?.OfferMode !== 'P' &&
c?.OfferMode !== 'C' && c?.OfferMode !== 'C' &&
c?.OfferMode !== 'O' && c?.OfferMode !== 'O' &&
c?.OfferMode !== 'L' c?.OfferMode !== 'L'
? true ? true
: c?.Offer === 0); : c?.Offer === 0);
@ -3915,10 +3949,10 @@ export default function BSC1Search(props) {
return FreeProdList.map((f, i) => return FreeProdList.map((f, i) =>
i === index i === index
? { ? {
...existing, ...existing,
...newFreeProd, ...newFreeProd,
ProdVariantDetails: existing.ProdVariantDetails, ProdVariantDetails: existing.ProdVariantDetails,
} }
: f : f
); );
} else { } else {
@ -3988,7 +4022,7 @@ export default function BSC1Search(props) {
const cycleSize = buyQty + getQty; const cycleSize = buyQty + getQty;
const fullCycles = Math.floor( const fullCycles = Math.floor(
freeCartItem?.reduce((acc, fc) => acc + (fc?.OrderQty || 0), 0) / freeCartItem?.reduce((acc, fc) => acc + (fc?.OrderQty || 0), 0) /
cycleSize cycleSize
); );
const totalFreeQty = fullCycles * getQty; const totalFreeQty = fullCycles * getQty;
@ -4591,15 +4625,15 @@ export default function BSC1Search(props) {
{option.ProductDetail?.filter( {option.ProductDetail?.filter(
(item) => item.OnePcsAvailable == 'Y' (item) => item.OnePcsAvailable == 'Y'
).length !== 0 && ( ).length !== 0 && (
<GoTriangleRight <GoTriangleRight
style={{ style={{
fontSize: '25px', fontSize: '25px',
}} }}
onClick={() => { onClick={() => {
setOnePeiceFlow(true); setOnePeiceFlow(true);
}} }}
/> />
)} )}
</div> </div>
</div> </div>
), ),
@ -4633,7 +4667,7 @@ export default function BSC1Search(props) {
<FiSearch <FiSearch
className="BSC1Search-searchicon" className="BSC1Search-searchicon"
// onClick={() => OnfocusTrue()} // onClick={() => OnfocusTrue()}
/> />
</div> </div>
{ProductSearch?.length > 5 && {ProductSearch?.length > 5 &&
@ -4724,8 +4758,8 @@ export default function BSC1Search(props) {
<img <img
src={ src={
item?.ProdLogo && item?.ProdLogo &&
item?.ProdLogo != null && item?.ProdLogo != null &&
item?.ProdLogo != undefined item?.ProdLogo != undefined
? item?.ProdLogo ? item?.ProdLogo
: defaultimage : defaultimage
} }

View File

@ -2100,6 +2100,39 @@ const BSItemCard = (props) => {
setMessageType('warning'); setMessageType('warning');
return; return;
} }
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = Qty || 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log('Final InwardDtlId Qty Map:', inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setMessageType('warning');
return;
}
} }
} }

View File

@ -157,6 +157,7 @@ import { FaParking } from 'react-icons/fa';
import { isMobile } from 'react-device-detect'; import { isMobile } from 'react-device-detect';
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx'; import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss'; import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss';
import { RiFullscreenExitFill, RiFullscreenFill } from 'react-icons/ri';
const subDirectory = import.meta.env.ENV_BASE_URL; const subDirectory = import.meta.env.ENV_BASE_URL;
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL; const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
@ -263,6 +264,30 @@ const BSNavbar1 = (props) => {
setAccIsOpen(false); setAccIsOpen(false);
} }
}; };
const [isFullscreen, setIsFullscreen] = useState(false);
const handleFullscreen = useCallback(async () => {
if (!isFullscreen) {
try {
await document.documentElement.requestFullscreen();
setIsFullscreen(true);
} catch (error) {
console.error('Fullscreen error:', error);
}
} else {
try {
if (document.fullscreenElement) {
await document.exitFullscreen();
}
setIsFullscreen(false);
} catch (error) {
console.error('Exit fullscreen error:', error);
}
}
}, [isFullscreen]);
useEffect(() => { useEffect(() => {
if (!FeatureAddonData?.FeatureDtls?.length) return; if (!FeatureAddonData?.FeatureDtls?.length) return;
@ -967,6 +992,20 @@ const BSNavbar1 = (props) => {
{formattedDate} {formattedDate}
</div> </div>
</div> </div>
<Tooltip title={isFullscreen ? 'Exit Full Screen' : 'Full Screen'}>
<div
className={
isFullscreen
? 'BsNavbar1FullScreenExit'
: 'BsNavbar1FullScreen'
}
onClick={handleFullscreen}
>
{isFullscreen ? <RiFullscreenExitFill /> : <RiFullscreenFill />}
</div>
</Tooltip>
<TooltipWrapper title="User Profile" isMobile={isMobile}> <TooltipWrapper title="User Profile" isMobile={isMobile}>
<div className="UserProfile"> <div className="UserProfile">
<PozoUserIcon onClick={UserAcc} /> <PozoUserIcon onClick={UserAcc} />
@ -1168,7 +1207,7 @@ const BSNavbar1 = (props) => {
</div> </div>
} }
trigger="click" trigger="click"
placement="left" placement="left"
open={open} open={open}
onOpenChange={handleOpenChange} onOpenChange={handleOpenChange}
> >

View File

@ -98,7 +98,7 @@ import {
getUserProfile, getUserProfile,
userDataByUserId, userDataByUserId,
} from '../../../../Features/UserAccount/userData.js'; } from '../../../../Features/UserAccount/userData.js';
import { TbSettingsSearch } from 'react-icons/tb'; import { TbSettingsSearch } from 'react-icons/tb';
import { FaParking } from 'react-icons/fa'; import { FaParking } from 'react-icons/fa';
import BSNavBarUserInfo from './BSNavBarUserInfo'; import BSNavBarUserInfo from './BSNavBarUserInfo';
import { OtherServicesCardlistdata } from '../../../../Features/OtherServices/OtherServices.js'; import { OtherServicesCardlistdata } from '../../../../Features/OtherServices/OtherServices.js';
@ -128,8 +128,8 @@ const FeaturesFunctionalities = lazy(
const BSCustomerSelect = lazy( const BSCustomerSelect = lazy(
() => import('../UtillComponents/BSSelectCustomer.jsx') () => import('../UtillComponents/BSSelectCustomer.jsx')
); );
// Scss import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss';
import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss'; import { RiFullscreenExitFill, RiFullscreenFill } from 'react-icons/ri';
const subDirectory = import.meta.env.ENV_BASE_URL; const subDirectory = import.meta.env.ENV_BASE_URL;
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL; const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
@ -239,6 +239,27 @@ const BSNavbar2 = () => {
item.SettingIdName === 'VerifyProduct' && item?.SettingValue === 'Y' item.SettingIdName === 'VerifyProduct' && item?.SettingValue === 'Y'
); );
const [isFullscreen, setIsFullscreen] = useState(false);
const handleFullscreen = useCallback(async () => {
if (!isFullscreen) {
try {
await document.documentElement.requestFullscreen();
setIsFullscreen(true);
} catch (error) {
console.error('Fullscreen error:', error);
}
} else {
try {
if (document.fullscreenElement) {
await document.exitFullscreen();
}
setIsFullscreen(false);
} catch (error) {
console.error('Exit fullscreen error:', error);
}
}
}, [isFullscreen]);
useEffect(() => { useEffect(() => {
if (!FeatureAddonData?.FeatureDtls?.length) return; if (!FeatureAddonData?.FeatureDtls?.length) return;
@ -871,11 +892,10 @@ const BSNavbar2 = () => {
)} )}
</> </>
)} )}
<div className='Nav2BSNavBarWholeSale'> <div className="Nav2BSNavBarWholeSale">
{SalesMode?.SettingValue === 'Y' && !OtherServicesglobal && (
{SalesMode?.SettingValue === 'Y' && !OtherServicesglobal && ( <BSNavBarWholeSale />
<BSNavBarWholeSale /> )}
)}
</div> </div>
{!OtherServicesglobal && ScanLayoutScreen?.SettingValue === 'Y' && ( {!OtherServicesglobal && ScanLayoutScreen?.SettingValue === 'Y' && (
<BSScanTemplate /> <BSScanTemplate />
@ -1280,6 +1300,18 @@ const BSNavbar2 = () => {
</div> </div>
</> </>
)} )}
<Tooltip title={isFullscreen ? 'Exit Full Screen' : 'Full Screen'}>
<div
className={
isFullscreen ? 'BsNavbar1FullScreenExit' : 'BsNavbar1FullScreen'
}
onClick={handleFullscreen}
>
{isFullscreen ? <RiFullscreenExitFill /> : <RiFullscreenFill />}
</div>
</Tooltip>
{isMobile && ( {isMobile && (
<div <div
style={{ style={{

View File

@ -0,0 +1,482 @@
import { shallowEqual, useSelector } from 'react-redux';
import {
changeCustomerID,
ChangeSelectedCustDisable,
changeSelectedCustId,
changeSelectedOption,
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import { useCallback, useEffect, useState } from 'react';
import {
changeKioskCustomerMobileNo,
globalKioskCustomerMobileNo,
} from '../../../../Features/Kiosk/kiosk.js';
import { HiOutlineBackspace } from 'react-icons/hi';
import { useDispatch } from 'react-redux';
import { isIndianMobile } from '../../../../utils/calculations.js';
import { IoIosWarning } from 'react-icons/io';
import './CustomerOTP.scss';
import { Messages } from '../../../../Components/Notifications/Messages.jsx';
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
import {
checkLastOrderTimeLimit,
sendupiotp,
} from '../../../../Features/UpiDetails/UpiDetails.js';
import { StoredSessionData } from '../../../../Features/ThemeChange/ThemeChange.js';
import { getAddCustomerDetails, postAddCustomerDetails } from '../../../../Features/BookingScreen/Customer/addCustomer.js';
const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
const SettingDataSelector = useSelector(PreferenceData);
const CustomerMobileNumber = useSelector(globalKioskCustomerMobileNo);
const SessionData = useSelector(StoredSessionData, shallowEqual);
const dispatch = useDispatch();
const [number, setNumber] = useState(
CustomerMobileNumber ? CustomerMobileNumber : ''
);
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
const [canResend, setCanResend] = useState(true);
const [otpInput, setOtpInput] = useState(['', '', '', '']);
const [otpIndex, setOtpIndex] = useState(0);
const [otpSent, setOtpSent] = useState(false);
const [otpVerifed, setOtpVerified] = useState(false);
const [otpNumber, setOTPNumber] = useState(null);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(null);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const isOtpEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'kioskotp' &&
setting?.SettingValue === 'Y'
);
const isTimeLimitEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
(setting) =>
(setting?.SettingIdName?.toLowerCase() === 'hours' ||
setting?.SettingIdName?.toLowerCase() === 'minutes') &&
setting?.SettingValue === 'Y'
);
useEffect(() => {
isIndianMobile(number) && fetchCustomerDetails(number);
}, [number]);
useEffect(() => {
if (otpInput.every((input) => input !== '')) {
verifyOtp();
}
}, [otpInput]);
const fetchCustomerDetails = async (number) => {
const response = await dispatch(
getAddCustomerDetails({
MobileNo: number,
AppId: SessionData.AppId,
CompId: SessionData.CompId,
BranchId: SessionData.BranchId,
})
)?.unwrap();
if (response?.data?.statusCode === 1) {
console.log(
'response?.data?.CustomerId',
response?.data,
response?.data?.data?.[0]?.CustId
);
dispatch(changeCustomerID(response?.data?.data?.[0]?.CustId));
let custvalues = {
value: number,
label: response?.data?.data?.[0]?.CustName || number,
CustId: response?.data?.data?.[0]?.CustId,
...response?.data?.data?.[0],
};
// {value: '8428086416', label: 'mohan', CustId: 'CUST1-281-437-74', CustName: 'mohan', Address1: undefined, }
await dispatch(changeSelectedOption(custvalues));
await dispatch(changeSelectedCustId(response?.data?.data?.[0]?.CustId));
await dispatch(
ChangeSelectedCustDisable(true)
);
}else{
let postdata = {
"CustMobile":number,
"CustomerProfile": null,
"AppId": SessionData.AppId,
"CompId": SessionData.CompId,
"BranchId": SessionData.BranchId,
"CreatedBy": SessionData.UserId,
"InitialOutStanding": null,
"OfferType": "P",
"MarriedStatus": "N",
"CustomerAddressDtl": []
}
let response1 = await dispatch(postAddCustomerDetails(postdata)).unwrap();
if (response1?.data?.statusCode == 1) {
dispatch(changeSelectedOption(null));
dispatch(
changeCustomerID(
response1?.data?.CustomerDetails?.[
response1?.data?.CustomerDetails.length - 1
]
)
);
dispatch(
changeSelectedCustId(response1?.data?.CustomerDetails?.[0]?.CustId)
);
dispatch(
ChangeSelectedCustDisable(true)
);
} else{
setMessageData('Invalid mobile No.');
setMessageType('error');
setNumber('');
}
}
};
const setNumberFun = (newValue) => {
setNumber((prevNumber) => {
if (prevNumber.length < 10) {
return prevNumber + newValue;
}
return prevNumber;
});
};
const handleOtpNumber = (num) => {
if (otpIndex > 3) return;
const newOtp = [...otpInput];
newOtp[otpIndex] = num.toString();
setOtpInput(newOtp);
if (otpIndex < 3) {
setOtpIndex(otpIndex + 1);
}
};
const handleOtpBackspace = () => {
if (otpIndex < 0) return;
const newOtp = [...otpInput];
if (newOtp[otpIndex]) {
newOtp[otpIndex] = '';
} else if (otpIndex > 0) {
newOtp[otpIndex - 1] = '';
setOtpIndex(otpIndex - 1);
}
setOtpInput(newOtp);
};
const handleBackspace = () => {
setNumber((prevNumber) => prevNumber.slice(0, -1));
};
const checkLast30MinOrder = async (MobileNo) => {
const response = await dispatch(
checkLastOrderTimeLimit({
MobileNo,
AppId: SessionData.AppId,
CompId: SessionData.CompId,
BranchId: SessionData.BranchId,
})
)?.unwrap();
return response?.data;
};
const sendOTP = async () => {
const valid = isIndianMobile(number);
if (valid) {
if (isTimeLimitEnabled) {
const withinTimeLimit = await checkLast30MinOrder(number);
if (withinTimeLimit?.IsEligible === false) {
// setMessageData(withinTimeLimit?.response);
// setMessageType('warning');
setMaxLimitExceededMessage(withinTimeLimit?.response);
setMaxLimitExceeded(true);
await dispatch(changeSelectedOption(null));
await dispatch(changeSelectedCustId(null));
// Reset after 3 seconds
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2500);
return;
}
}
} else {
setMessageData('Please enter valid mobile No.');
setMessageType('warning');
return;
}
try {
setOtpIndex(0);
setOtpSent(true);
let response = await dispatch(
sendupiotp({
MobileNo: number,
CreatedBy: 0,
})
)?.unwrap();
if (response?.data?.statusCode == 1) {
setMessageData('OTP sent to your mobile number');
setMessageType('success');
setOTPNumber(response?.data?.OTP);
startResendTimer();
}
} catch (error) {
console.log(error);
}
};
const verifyOtp = () => {
const enteredOtp = otpInput.join('');
if (enteredOtp === otpNumber?.toString()) {
setMessageType('success');
setMessageData('OTP Verified Successfully');
setOtpSent(false);
setOtpInput(['', '', '', '']);
HandleCloseModal();
// setShowPaymentMethods(true);
setOtpVerified(true);
} else {
setMessageType('error');
setMessageData('Invalid OTP');
setOtpInput(['', '', '', '']);
setOtpIndex(0);
}
};
const onComplete = useCallback(() => {
setMessageData(null);
setMessageType(null);
}, []);
return (
<>
<Messages
messageType={messageType}
messageData={messageData}
onComplete={onComplete}
/>
<DefaultModal
open={open}
// handleCancel={HandleCloseModal}
footer={false}
width={900}
// {width > 768 ? 900 : 700}
children={
<div className="BSOTPpaymentModal-Master">
<h4 className="BSOTPTitlepayment">
{isOtpEnabled ? 'Enter Mobile Number To Order' : 'PAYMENT'}
</h4>
<div className="BSOTPpaymentModal_main">
{!otpSent && !otpVerifed && (
<>
<div className="BSOTPprompt">
{/* <p style={{ fontFamily: 'Poppins', fontWeight: '600' }}>
Get your order bill on your mobile <br />
via SMS / Whatsapp
</p> */}
</div>
<div
className={`BSOTPinputModal ${number ? 'green-border' : ''}`}
>
<input type="text" value={number} readOnly />
{number?.length === 10 && !isIndianMobile(number) && (
<div className="input-err">
Please Enter Valid Mobile Number
</div>
)}
</div>
{/* input boxxes */}
<div
className="BSOTPdailpad-main"
// style={{
// pointerEvents: selectedPaymentOption && 'none',
// opacity: selectedPaymentOption && '40%',
// }}
>
<div
className="BSOTPKiosk-dailpadModal"
// style={{ backgroundColor: getKioskLightColourdata }}
>
<div className="BSOTPKioskPayment-dailpad-1">
<p onClick={() => setNumberFun(1)}>1</p>
<p onClick={() => setNumberFun(2)}>2</p>
<p onClick={() => setNumberFun(3)}>3</p>
</div>
<div className="BSOTPKioskPayment-dailpad-2">
<p onClick={() => setNumberFun(4)}>4</p>
<p onClick={() => setNumberFun(5)}>5</p>
<p onClick={() => setNumberFun(6)}>6</p>
</div>
<div className="BSOTPKioskPayment-dailpad-3">
<p onClick={() => setNumberFun(7)}>7</p>
<p onClick={() => setNumberFun(8)}>8</p>
<p onClick={() => setNumberFun(9)}>9</p>
</div>
<div className="BSOTPKioskPayment-dailpad-4">
<p onClick={handleBackspace}>
<HiOutlineBackspace
size={30}
style={{ marginBottom: '-2px' }}
/>
</p>
<p onClick={() => setNumberFun(0)}>0</p>
<p style={{ background: 'none' }}></p>
</div>
</div>
</div>
{isOtpEnabled && (
<>
<button
className="BSOTPKioskOPTBTn"
// disabled={number?.length === 10}
onClick={() => sendOTP()}
>
Get OTP
</button>
</>
)}
</>
)}
{isOtpEnabled && otpSent && (
<div className="BSOTPotp-section">
<div style={{ fontFamily: 'Poppins', fontSize: '16px' }}>
Enter OTP
</div>
{/* Mobile Number + Edit */}
<div className="BSOTPotp-mobile-row">
<span className="BSOTPotp-mobile-number">{number}</span>
<button
className="BSOTPotp-edit-btn"
onClick={() => {
setOtpSent(false);
setOtpInput(['', '', '', '']);
}}
>
Edit
</button>
``{' '}
</div>
{/* 4 Digit OTP Input */}
<div className='optEnterResendOTP'>
<div className="BSOTPotp-input-container">
{otpInput.map((digit, index) => (
<input
key={index}
type="text"
value={digit}
className={`BSOTPotp-box ${index === otpIndex ? 'active' : ''}`}
onClick={() => setOtpIndex(index)}
readOnly
/>
))}
</div>
<div className="BSOTPotp-buttons">
{/* <button
className="verify-btn"
disabled={otpInput.join('').length !== 4}
onClick={verifyOtp}
>
Verify
</button> */}
<button
className="BSOTPresend-btn"
disabled={!canResend}
onClick={sendOTP}
>
{canResend ? 'Resend OTP' : `Resend in ${resendTimer}s`}
</button>
</div>
</div>
<div className="BSOTPKioskPayment-dailpad-main">
<div
className="BSOTPKiosk-dailpadModal"
// style={{ backgroundColor: getKioskLightColourdata }}
>
<div className="BSOTPKioskPayment-dailpad-1">
<p onClick={() => handleOtpNumber(1)}>1</p>
<p onClick={() => handleOtpNumber(2)}>2</p>
<p onClick={() => handleOtpNumber(3)}>3</p>
</div>
<div className="BSOTPKioskPayment-dailpad-2">
<p onClick={() => handleOtpNumber(4)}>4</p>
<p onClick={() => handleOtpNumber(5)}>5</p>
<p onClick={() => handleOtpNumber(6)}>6</p>
</div>
<div className="BSOTPKioskPayment-dailpad-3">
<p onClick={() => handleOtpNumber(7)}>7</p>
<p onClick={() => handleOtpNumber(8)}>8</p>
<p onClick={() => handleOtpNumber(9)}>9</p>
</div>
<div className="BSOTPKioskPayment-dailpad-4">
<p onClick={handleOtpBackspace}>
<HiOutlineBackspace size={30} />
</p>
<p onClick={() => handleOtpNumber(0)}>0</p>
<p style={{ background: 'none' }}></p>
</div>
</div>
</div>
{/* Buttons */}
</div>
)}
{/* {(!isOtpEnabled || (otpVerifed)) && <>
<p className="choiseTitle">Select Payment Method</p>
{console.log('selectedOption', selectedPaymentOption)}
<div
className="paymentChoise"
style={{
pointerEvents:
(!isIndianMobile(number) || selectedPaymentOption) &&
'none',
opacity:
(!isIndianMobile(number) || selectedPaymentOption) && '40%',
}}
>
{counterAvailability && (
<div
className="upi"
onClick={() => handlePaymentOption('Counter')}
>
<MdOutlinePayments size={50} opacity={0.5} />
<p style={{ fontSize: '12px', textAlign: 'center' }}>
PAY AT THE COUNTER
</p>
</div>
)}
{paymentOptionDetailsBusinessUpi && (
<div
className="upi"
onClick={() => handlePaymentOption('BU')}
>
<img src={UPI} alt="" width={60} />
<p> UPI</p>
</div>
)}
{!paymentOptionDetailsBusinessUpi && !counterAvailability && (
<div className="payment-error-msg">
Please Set Payment Options Contact Admin
</div>
)}
</div>
</>} */}
</div>
<div
className={`BSOTPItem3Warning ${maxLimitExceeded ? 'showing' : ''}`}
>
<p>
<IoIosWarning size={30} color="#b99400" />
{maxLimitExceededMessage}
</p>
</div>
</div>
}
/>
</>
);
};
export default CustomerMobileNumberModal;

View File

@ -0,0 +1,701 @@
.BSOTPpaymentModal_main {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
width: 100%;
height: 100%;
gap: 10px;
.BSOTPprompt {
width: 100%;
display: flex;
align-items: flex-start;
justify-content: flex-start;
text-align: left;
p {
text-align: left;
font-family: 'Gilroy';
font-weight: 700;
font-size: 26px;
}
}
.BSOTPKioskPayment-inputModal {
align-content: center;
align-items: center;
display: flex;
justify-content: center;
padding: 1rem 1rem;
flex-direction: column;
.input-err {
color: red;
font-size: 13px;
margin-top: 4px;
font-family: 'Poppins', sans-serif;
}
input {
width: 50vw;
height: 4rem;
padding: 0rem 1rem;
font-family: 'Gilroy', sans-serif;
font-size: 22px;
border: none;
letter-spacing: 1px;
font-weight: 500;
border: 1px solid rgba(0, 0, 0, 0.199);
border-radius: 8px;
}
}
.BSOTPKiosk-dailpadModal {
background-color: #e1eef1;
display: flex;
flex-direction: column;
row-gap: 16px;
padding: 10px 10px;
border-radius: 8px;
width: 60%;
@media (max-width: 768px) {
width: 100%;
}
}
.BSOTPpaymentChoise {
display: flex;
align-items: center;
justify-content: center;
column-gap: 3rem;
row-gap: 1rem;
.BSOTPupi {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
width: 110px;
height: 110px;
border: 1px solid rgba(0, 0, 0, 0.199);
border-radius: 8px;
cursor: pointer;
p {
font-weight: 500;
font-size: 16px;
}
}
}
.BSOTPchoiseTitle {
display: flex;
width: 100%;
align-items: flex-start;
padding: 1rem 2rem;
}
.BSOTPKioskPayment-dailpad-main {
display: flex;
flex-direction: column;
row-gap: 12px;
padding: 16px 0px;
align-items: center;
width: 100%;
overflow-x: hidden;
}
.BSOTPKioskPayment-dailpad-1,
.BSOTPKioskPayment-dailpad-2,
.BSOTPKioskPayment-dailpad-3 {
display: flex;
align-items: center;
justify-content: center;
column-gap: 1.5rem;
row-gap: 2rem;
p {
background-color: #fff;
padding: 10px 10px;
width: 25%;
text-align: center;
border-radius: 12px;
cursor: pointer;
font-family: 'Gilroy', sans-serif;
font-weight: 600;
font-size: 28px;
}
}
.BSOTPKioskPayment-dailpad-4 {
display: flex;
align-items: center;
justify-content: center;
flex-direction: row-reverse;
column-gap: 1.5rem;
p {
background-color: #fff;
padding: 10px 10px;
width: 25%;
text-align: center;
border-radius: 12px;
cursor: pointer;
font-family: 'Gilroy', sans-serif;
font-weight: 600;
font-size: 28px;
}
}
.ant-modal .ant-modal-content {
height: 90vh !important;
}
}
.BSOTPTitlepayment {
margin: 0;
color: rgba(0, 0, 0, 0.88);
font-weight: 600;
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
font-family: 'Barlow Condensed';
font-size: 24px !important;
}
.BSOTPpaymentCardMain {
display: flex;
align-items: flex-start;
width: 100%;
flex-direction: row;
justify-content: space-around;
background-color: #fff;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
padding: 1rem 1rem;
height: 45vh;
position: relative;
.ant-radio-wrapper .ant-radio-checked .ant-radio-inner {
background-color: var(--SELECTED_COLOR) !important;
border-color: var(--SELECTED_COLOR) !important;
}
.BSOTPcardChooice {
width: 40%;
display: flex;
flex-direction: column;
align-items: flex-start;
row-gap: 10px;
column-gap: 10px;
}
.BSOTPcardoption {
display: flex;
align-items: center;
justify-content: flex-start;
column-gap: 10px;
// box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
box-shadow:
rgba(0, 0, 0, 0.1) 0px 10px 36px 0px,
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
border-radius: 6px;
padding: 4px 14px;
cursor: pointer;
width: 95%;
img {
width: 30px;
height: 22px;
}
}
.BSOTPcardname {
font-size: 16px;
font-weight: 550;
}
.BSOTPcardname2 {
font-size: 11px;
font-weight: 550;
margin-top: -1px;
}
.BSOTPbankChooice {
width: 60%;
border-radius: 6px;
.searchbar {
display: flex;
padding: 1px 12px;
// border: 1px solid #1c1c1c;
// box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
box-shadow:
rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
border-radius: 6px;
align-items: center;
// border: 1px solid black;
}
input {
border: none;
outline: none;
padding: 1px 10px;
}
.titlechoose {
display: flex;
align-items: center;
font-size: 16px;
column-gap: 1rem;
padding-bottom: 9px;
border-bottom: 1px solid #1c1c1c;
}
.choosecardMain {
padding: 10px 10px;
margin-top: -1rem;
}
.bankname {
display: flex;
align-items: center;
column-gap: 10px;
font-size: 16px;
padding: 10px 10px;
font-weight: 500;
text-transform: capitalize;
}
}
.BSOTPbuttonOfpay {
position: absolute;
bottom: -60px;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
column-gap: 11rem;
padding: 1rem 4rem;
.inr {
font-size: 22px;
color: #4eb14e;
font-weight: 600;
}
.primary_Button {
display: flex;
align-items: center;
justify-content: center;
padding: 10px 16px;
cursor: pointer;
background-color: #4eb14e !important;
color: #fff;
border-radius: 6px;
}
}
}
.searchbar :focus {
.ant-input-outlined {
box-shadow: none;
}
}
.searchbar:focus-within {
.ant-input-outlined {
box-shadow: none;
}
}
.searchbar .ant-input-search .ant-input:focus {
background-color: #fff !important;
border: #fff !important;
}
.searchbar .ant-input-search .ant-input:focus {
border-color: #fff !important;
}
.paymentCardMain .ant-collapse {
width: 100%;
border: none;
// box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
box-shadow:
rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}
.paymentCardMain .ant-radio-group,
.ant-radio-wrapper span.ant-radio + * {
padding: 10px 10px;
}
.paymentCardMain .ant-modal .ant-modal-content {
padding: 54px 35px !important;
}
.paymentCardMain
.ant-collapse
.ant-collapse-item:last-child
> .ant-collapse-content {
overflow: scroll;
height: 26vh;
}
.paymentCardMain .ant-input-search .ant-input:hover,
.paymentCardMain .ant-input:hover {
border: none;
outline: none;
&:focus {
border: none;
outline: none;
}
}
@media (max-width: 768px) {
.BSOTPpaymentModal_main .BSOTPKiosk-dailpadModal {
padding: 2rem 0rem;
}
.BSOTPpaymentModal_main .BSOTPpaymentChoise {
column-gap: 1rem;
}
.BSOTPpaymentModal_main .BSOTPpaymentChoise .upi {
width: 100px;
}
.BSOTPpaymentModal_main .BSOTPbuttonOfpay {
width: max-content;
}
.BSOTPTitlepayment {
text-wrap: nowrap;
font-size: 19px !important;
}
}
.BSOTPpayment-modal {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: white;
width: 420px;
height: 540px;
border-radius: 12px;
box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
padding: 16px;
z-index: 10;
}
.BSOTPmodal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
// filter: blur(5px);
// pointer-events: none;
// user-select: none;
width: 70vw;
margin: 1rem 0;
font-family: 'Poppins';
font-weight: 500;
@media (max-width: 768px) {
width: 95vw;
}
}
.BSOTPpayment-modal {
position: fixed;
z-index: 1000;
top: 50%;
left: 0;
right: 0;
bottom: 0;
width: 100%;
border-radius: 0;
height: 100%;
backdrop-filter: blur(5px);
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
background-color: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
/* for Safari */
}
.BSOTPpaymentclose-btn {
width: max-content;
height: max-content;
border: none;
background-color: unset;
color: #ff0000;
cursor: pointer;
font-size: 20px;
padding: 4px;
}
.BSOTPpayment-frame {
width: 70vw;
height: 70vh;
@media (max-width: 768px) {
width: 95vw;
height: 80vh;
}
}
.BSOTPKioskOPTBTn {
width: 60%;
padding: 12px 16px;
font-size: 20px;
font-family: 'Poppins';
font-weight: 400;
border: none;
outline: none;
background-color: #000000;
color: #fff;
border-radius: 10px;
cursor: pointer;
@media (max-width: 768px) {
width: 100%;
}
}
.BSOTPotp-section {
text-align: center;
width: 100%;
.BSOTPotp-mobile-row {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
margin-bottom: 20px;
font-family: 'Poppins';
.BSOTPotp-mobile-number {
font-size: 20px;
font-weight: 600;
letter-spacing: 1px;
}
.BSOTPotp-edit-btn {
background: none;
border: none;
color: #007bff;
font-size: 14px;
cursor: pointer;
font-family: 'Poppins';
&:hover {
text-decoration: underline;
}
}
}
.BSOTPotp-input-container {
display: flex;
justify-content: center;
gap: 20px;
.BSOTP-otp-box {
width: 65px;
height: 65px;
font-size: 28px;
text-align: center;
border: 2px solid #ccc;
border-radius: 8px;
outline: none;
transition: 0.2s ease;
&:focus {
border-color: #28a745;
box-shadow: 0 0 6px rgba(40, 167, 69, 0.4);
}
}
.otp-box.active {
border: 2px solid #28a745;
}
}
.BSOTPotp-buttons {
display: flex;
justify-content: center;
gap: 20px;
button {
min-width: 140px;
padding: 12px 18px;
font-size: 16px;
font-weight: 500;
border-radius: 8px;
cursor: pointer;
transition: 0.2s ease;
font-family: 'Poppins', sans-serif !important;
display: flex;
align-items: center;
justify-content: center;
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
.verify-btn {
background-color: #28a745;
border: none;
color: #fff;
&:hover:not(:disabled) {
background-color: #218838;
}
}
.BSOTPresend-btn {
background-color: #ffc107;
border: none;
color: #000;
&:hover:not(:disabled) {
background-color: #e0a800;
}
}
}
}
.BSOTPItem3Warning {
position: fixed;
top: 0%;
left: 0%;
bottom: 0;
right: 0%;
background-color: #00000096;
z-index: 100;
font-family: 'Poppins';
font-size: 16px;
font-weight: 500;
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
flex-direction: column;
backdrop-filter: blur(4px);
/* Animation initial state */
opacity: 0;
visibility: hidden;
transition:
opacity 0.3s ease,
visibility 0.3s ease;
p {
display: flex;
box-shadow:
rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
align-items: center;
justify-content: center;
gap: 10px;
background-color: #fff;
padding: 15px 20px;
border-radius: 8px;
/* popup animation */
transform: scale(0.8);
transition: transform 0.3s ease;
}
}
/* When visible */
.BSOTPItem3Warning.showing {
opacity: 1;
visibility: visible;
p {
transform: scale(1);
}
}
.BSOTPinputModal {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.input-err {
font-family: 'Poppins', sans-serif;
font-size: 12px;
margin-top: 6px;
color: rgb(224, 0, 0);
}
input {
width: 60%;
outline: none;
font-family: 'Poppins', sans-serif;
font-weight: 600;
margin: 0;
text-align: center;
height: 45px;
border-radius: 6px;
border: 1px solid #333;
font-size: 20px;
@media (max-width: 768px) {
width: 100%;
}
}
}
.BSOTPdailpad-main {
display: flex;
flex-direction: column;
row-gap: 12px;
padding: 14px 0px;
align-items: center;
overflow-x: hidden;
width: 100%;
}
.BSOTPotp-box {
width: 55px;
height: 55px;
font-size: 24px;
text-align: center;
border: 2px solid #ccc;
border-radius: 8px;
outline: none;
transition: 0.2s ease;
font-family: 'Poppins';
font-weight: 500;
&:focus {
border-color: #28a745;
box-shadow: 0 0 6px rgba(40, 167, 69, 0.4);
}
}
.BSOTPotp-box.active {
border: 2px solid #28a745;
}
.BSOTPpaymentModal-Master {
scrollbar-width: thin;
height: 90vh;
overflow: auto;
}
.optEnterResendOTP {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}

View File

@ -136,8 +136,11 @@ const BSCustomerSelect = ({ TopName = null }) => {
); );
const BSLayout1Data = useSelector(getTemplateData); const BSLayout1Data = useSelector(getTemplateData);
const selOption = useSelector(GlobalSelOption); const selOption = useSelector(GlobalSelOption);
console.log(selOption, 'selOption');
const GetCustId = useSelector(GlobalCustId); const GetCustId = useSelector(GlobalCustId);
console.log(GetCustId, 'GetCustId');
const Custdisable = useSelector(GlobalSelectedCustDisable); const Custdisable = useSelector(GlobalSelectedCustDisable);
console.log(Custdisable, 'Custdisable');
const SessionData = useSelector(StoredSessionData); const SessionData = useSelector(StoredSessionData);
const OrderOfferDetails = useSelector( const OrderOfferDetails = useSelector(
GlobalOfferAppliedProducts, GlobalOfferAppliedProducts,

View File

@ -172,7 +172,7 @@ const CustomisedInvoiceChange = () => {
/> />
</Form.Item> </Form.Item>
<div className='fromlabelDate'> <div className='fromlabelDate'>
<label>From Date</label> <label>Bill Date</label>
<DatePicker <DatePicker
disabledDate={disablefutureDates} disabledDate={disablefutureDates}
format="DD-MMM-YYYY" format="DD-MMM-YYYY"

View File

@ -192,12 +192,25 @@ export const usePaymentOptions = ({ AppId, CompId, BranchId, UserId }) => {
) === undefined && ) === undefined &&
Pay_at_the_counter !== undefined; Pay_at_the_counter !== undefined;
if (UpiCondition) { let BusinessUPI = Formated_Payment_Details?.find((item) => item.OptionName == 'Business Upi')
if (UpiCondition || BusinessUPI) {
let UpiDetailsResponse = await dispatch( let UpiDetailsResponse = await dispatch(
getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'U' }) getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'U' })
).unwrap(); ).unwrap();
let BusinessUpi = await dispatch(
getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'BU' })
).unwrap();
let data = BusinessUpi?.data?.data
const hasNonUPI = Formated_Payment_Details
?.find(item => item.OptionName === 'Pay at the counter')
?.ModeDetails
?.every(e => e?.ModeName !== "UPI");
const hasChooseBusinessUpi = Formated_Payment_Details
?.find(item => item.OptionName === 'Business Upi')
?.ModeDetails
if ( if (
UpiDetailsResponse?.data?.statusCode === 0 && UpiDetailsResponse?.data?.statusCode === 0 && BusinessUpi?.data?.statusCode === 0 && BusinessUpi?.data?.data?.length === 0 &&
UpiDetailsResponse?.data?.data?.length === 0 UpiDetailsResponse?.data?.data?.length === 0
) { ) {
Formated_Payment_Details = Formated_Payment_Details.map((item) => { Formated_Payment_Details = Formated_Payment_Details.map((item) => {
@ -210,6 +223,62 @@ export const usePaymentOptions = ({ AppId, CompId, BranchId, UserId }) => {
return item; return item;
}); });
} }
else if (BusinessUpi?.data?.data?.length === 1 && hasNonUPI && hasChooseBusinessUpi) {
Formated_Payment_Details = Formated_Payment_Details.map((item) => {
if (item.OptionName === 'Pay at the counter') {
let reqDatfromBusinessUpi = BusinessUPI?.ModeDetails?.[0]
return {
...item,
ModeDetails: [
...item?.ModeDetails,
{
"PaymentOptionId": reqDatfromBusinessUpi?.PaymentOptionId,
"PaymentModeId": reqDatfromBusinessUpi?.PaymentModeId,
"ModeId": reqDatfromBusinessUpi?.ModeId,
"ModeName": "UPI",
"ModeDefault": "Y",
"ModeImage": "",
"PayOpt": null,
"CardType": null,
"MerchantUPIId": null,
"MerchantMobile": null,
"MerchantNumber": null,
"RefreshToken": null,
"Token": null,
"MerchantId": null,
"ActiveStatus": reqDatfromBusinessUpi?.ActiveStatus,
"CreatedBy": 0,
"CreatedDate": "2026-03-03T19:07:54.393",
"UpdatedBy": null,
"UpdatedDate": null,
"MethodDetails": []
}
],
};
}
// IMPORTANT: return other items unchanged
return item;
});
}
else if (UpiDetailsResponse?.data?.statusCode === 0 && UpiDetailsResponse?.data?.data?.length === 0) {
Formated_Payment_Details = Formated_Payment_Details.map((item) => {
if (item.OptionName === 'Pay at the counter') {
return {
...item,
ModeDetails: Pay_at_the_counter_witoutUPIMode,
};
}
return item;
});
}
////
} }
if ( if (

View File

@ -20,6 +20,15 @@ import {
GlobalprintSlNo, GlobalprintSlNo,
GlobalprinttermsAndConditions, GlobalprinttermsAndConditions,
GlobalPritdummyData, GlobalPritdummyData,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSignatureImage, GlobalSignatureImage,
GlobalthemeFormat, GlobalthemeFormat,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
@ -200,6 +209,72 @@ const DCPrintA4Style11 = ({
lastChunkRows > (!isMobile ? 10 : PageSize === 'A5' ? 5 : 14); lastChunkRows > (!isMobile ? 10 : PageSize === 'A5' ? 5 : 14);
console.log(lastChunkRows, shouldFooterBeOnNewPage, 'dataSourcedataSource'); console.log(lastChunkRows, shouldFooterBeOnNewPage, 'dataSourcedataSource');
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<div <div
style={{ style={{
@ -215,6 +290,7 @@ const DCPrintA4Style11 = ({
position: 'relative', position: 'relative',
width: '100%', width: '100%',
minHeight: isMobile ? '257mm' : '297mm', minHeight: isMobile ? '257mm' : '297mm',
...headerStyle,
}} }}
id={`DCPrintStyleA4`} id={`DCPrintStyleA4`}
> >
@ -248,6 +324,8 @@ const DCPrintA4Style11 = ({
alignItems: 'center', alignItems: 'center',
padding: '12px 0', padding: '12px 0',
borderBottom: '1px solid black', borderBottom: '1px solid black',
...headerStyle,
width: '100%',
}} }}
> >
{/* Logo Image */} {/* Logo Image */}
@ -583,6 +661,7 @@ const DCPrintA4Style11 = ({
style={{ style={{
width: '10%', width: '10%',
textAlign: 'center', textAlign: 'center',
...tableHeaderStyle,
}} }}
> >
S.No S.No
@ -593,25 +672,30 @@ const DCPrintA4Style11 = ({
style={{ style={{
width: '10%', width: '10%',
textAlign: 'center', textAlign: 'center',
...tableHeaderStyle,
}} }}
> >
S.No S.No
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th>Item</th> ? GlobalItem && (
: Item == true && <th>Item</th>} <th style={{ ...tableHeaderStyle }}>
{/* {GlobaldummyData Item
? GlobalHsnCode && <th style={{ width: '10%', textAlign: "center" }}>HSN</th> </th>
: HsnCode == true && ( )
<th style={{ width: '10%', textAlign: "center" }}>HSN</th> : Item == true && (
)} */} <th style={{ ...tableHeaderStyle }}>
Item
</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th <th
style={{ style={{
width: '10%', width: '10%',
textAlign: 'center', textAlign: 'center',
...tableHeaderStyle,
}} }}
> >
Qty Qty
@ -622,6 +706,7 @@ const DCPrintA4Style11 = ({
style={{ style={{
width: '10%', width: '10%',
textAlign: 'center', textAlign: 'center',
...tableHeaderStyle,
}} }}
> >
Qty Qty
@ -656,7 +741,22 @@ const DCPrintA4Style11 = ({
<tbody> <tbody>
{dataChunk?.map((item, index) => ( {dataChunk?.map((item, index) => (
<tr key={index}> <tr
key={index}
style={{
...(index % 2 !== 1 &&
rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 &&
rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<td style={{ textAlign: 'center' }}> <td style={{ textAlign: 'center' }}>
@ -1070,6 +1170,7 @@ const DCPrintA4Style11 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData
@ -1260,6 +1361,7 @@ const DCPrintA4Style11 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -23,6 +23,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData'; import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss';
@ -304,6 +313,72 @@ const DCPrintStyle10 = ({
const shouldFooterBeOnNewPage = const shouldFooterBeOnNewPage =
lastChunkRows > (!isMobile ? 15 : PageSize == 'A5' ? 5 : 10); lastChunkRows > (!isMobile ? 15 : PageSize == 'A5' ? 5 : 10);
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
{FormatTheme ? ( {FormatTheme ? (
@ -353,7 +428,7 @@ const DCPrintStyle10 = ({
width: '100%', width: '100%',
}} }}
> >
<div className="PrintStyle10-print"> <div className="PrintStyle10-print" style={{ ...headerStyle }}>
<div <div
className="ShopName" className="ShopName"
style={{ style={{
@ -591,40 +666,76 @@ const DCPrintStyle10 = ({
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<th style={{ width: '10px' }}>S.N</th> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.N
</th>
) )
: SLNO && <th style={{ width: '10px' }}>S.N</th>} : SLNO && (
<th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.N
</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalItem && ( ? GlobalItem && (
<th style={{ width: '10px' }}>Item</th> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
Item
</th>
) )
: Item && <th style={{ width: '10px' }}>Item</th>} : Item && (
<th
style={{ width: '10px', ...tableHeaderStyle }}
>
Item
</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
Qty Qty
</th> </th>
) )
: Quantity && ( : Quantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
Qty Qty
</th> </th>
)} )}
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th> : HsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th>}
{GlobaldummyData ? GlobalMRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th> : MRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th>}
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th> : Discount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th>}
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th> : Rate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th>}
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th>} */}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{dataChunk?.map((item, index) => { {dataChunk?.map((item, index) => {
return ( return (
<tr key={index}> <tr
key={index}
style={{
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<td <td
@ -782,6 +893,7 @@ const DCPrintStyle10 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -25,6 +25,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedTableBodyFontColor,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData'; import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
@ -287,6 +296,72 @@ const DCPrintStyle11 = ({
: 0; : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10); const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
{FormatTheme ? ( {FormatTheme ? (
@ -331,6 +406,7 @@ const DCPrintStyle11 = ({
padding: 0, padding: 0,
fontWeight: 600, fontWeight: 600,
textAlign: 'center', textAlign: 'center',
...headerStyle,
}} }}
> >
<div <div
@ -339,6 +415,7 @@ const DCPrintStyle11 = ({
margin: '2px 0 0 0', margin: '2px 0 0 0',
padding: 0, padding: 0,
fontWeight: 600, fontWeight: 600,
...headerStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData
@ -360,7 +437,7 @@ const DCPrintStyle11 = ({
width: '100%', width: '100%',
}} }}
> >
<div className="PrintStyle11-print"> <div className="PrintStyle11-print" style={{ ...headerStyle }}>
{base64Image ? ( {base64Image ? (
<img <img
className="PrintStyle11-BrandImage" className="PrintStyle11-BrandImage"
@ -584,40 +661,76 @@ const DCPrintStyle11 = ({
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.No
</th>
) )
: SLNO && <th style={{ width: '10px' }}>S.No</th>} : SLNO && (
<th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.No
</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalItem && ( ? GlobalItem && (
<th style={{ width: '10px' }}>Item</th> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
Item
</th>
) )
: Item && <th style={{ width: '10px' }}>Item</th>} : Item && (
<th
style={{ width: '10px', ...tableHeaderStyle }}
>
Item
</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
Qty Qty
</th> </th>
) )
: Quantity && ( : Quantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
Qty Qty
</th> </th>
)} )}
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th> : HsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th>}
{GlobaldummyData ? GlobalMRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th> : MRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th>}
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th> : Discount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th>}
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th> : Rate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th>}
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th>} */}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{dataChunk?.map((item, index) => { {dataChunk?.map((item, index) => {
return ( return (
<tr key={index}> <tr
key={index}
style={{
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td> ? GlobalSlNo && <td>{index + 1}</td>
: SLNO && ( : SLNO && (
@ -695,11 +808,6 @@ const DCPrintStyle11 = ({
{item?.Qty || item?.DispatchedQty} {item?.Qty || item?.DispatchedQty}
</td> </td>
)} )}
{/* {GlobaldummyData ? GlobalHsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td> : HsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td>}
{GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
{GlobaldummyData ? GlobalDiscount && <td style={{ textAlign: 'right' }}>{item.discount}</td> : Discount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
</tr> </tr>
); );
})} })}
@ -751,6 +859,7 @@ const DCPrintStyle11 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -26,6 +26,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData'; import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss';
@ -433,6 +442,72 @@ const DCPrintstyle12 = ({
await printDiv('DCPrintStyle12', style12, 'FontApply'); await printDiv('DCPrintStyle12', style12, 'FontApply');
}; };
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
{FormatTheme ? ( {FormatTheme ? (
@ -483,7 +558,10 @@ const DCPrintstyle12 = ({
width: '100%', width: '100%',
}} }}
> >
<div className="PrintStyle12-firstDiv"> <div
className="PrintStyle12-firstDiv"
style={{ ...headerStyle }}
>
<div style={{ display: 'flex', flexDirection: 'column' }}> <div style={{ display: 'flex', flexDirection: 'column' }}>
<div <div
style={{ style={{
@ -735,29 +813,61 @@ const DCPrintstyle12 = ({
<thead> <thead>
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <th>S.No</th> ? GlobalSlNo && (
: SLNO && <th>S.No</th>} <th style={{ ...tableHeaderStyle }}>S.No</th>
)
: SLNO && (
<th style={{ ...tableHeaderStyle }}>S.No</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th>Description</th> ? GlobalItem && (
: Item && <th>Des</th>} <th style={{ ...tableHeaderStyle }}>
Description
</th>
)
: Item && (
<th style={{ ...tableHeaderStyle }}>Des</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th style={{ textAlign: 'right' }}>Qty</th> <th
style={{
textAlign: 'right',
...tableHeaderStyle,
}}
>
Qty
</th>
) )
: Quantity && ( : Quantity && (
<th style={{ textAlign: 'right' }}>Qty</th> <th
style={{
textAlign: 'right',
...tableHeaderStyle,
}}
>
Qty
</th>
)} )}
{/* {GlobaldummyData ? GlobalMRP && <th style={{ textAlign: 'right' }}>MRP</th> : MRP && <th style={{ textAlign: 'right' }}>MRP</th>}
{GlobaldummyData ? GlobalRate && <th style={{ textAlign: "right" }}>Rate</th> : Rate && <th style={{ textAlign: "right" }}>Rate</th>}
{GlobaldummyData ? GlobalHsnCode && <th style={{ textAlign: "right" }}>HSN</th> : HsnCode && <th style={{ textAlign: "right" }}>HSN</th>}
{GlobaldummyData ? GlobalDiscount && <th style={{ textAlign: 'right' }}>(%)</th> : Discount && <th style={{ textAlign: 'right' }}>(%)</th>}
{GlobaldummyData ? GlobalAmount && <th style={{ textAlign: "right" }}>Amt</th> : Amount && <th style={{ textAlign: "right" }}>Amt</th>} */}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{dataChunk?.map((item, index) => { {dataChunk?.map((item, index) => {
return ( return (
<tr key={index}> <tr
key={index}
style={{
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<td style={{ textAlign: 'center' }}> <td style={{ textAlign: 'center' }}>
@ -841,11 +951,6 @@ const DCPrintstyle12 = ({
{item?.Qty || item?.DispatchedQty} {item?.Qty || item?.DispatchedQty}
</td> </td>
)} )}
{/* {GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
{GlobaldummyData ? GlobalHsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td> : HsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td>}
{GlobaldummyData ? GlobalDiscount && <td style={{ textAlign: 'right' }}>{item?.discount}</td> : Discount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
</tr> </tr>
); );
})} })}
@ -898,6 +1003,7 @@ const DCPrintstyle12 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -23,6 +23,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableBodyColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedFooterFontColor,
GlobalSelectedFooterColor,
GlobalRowType,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss';
import QRCode from 'react-qr-code'; import QRCode from 'react-qr-code';
@ -232,6 +241,70 @@ const DCPrintStyle3 = ({
lastChunkRows > (!isMobile ? 10 : PageSize == 'A5' ? 5 : 10); lastChunkRows > (!isMobile ? 10 : PageSize == 'A5' ? 5 : 10);
console.log(paginatedChunks, dataSource, 'dataSourcedataSource'); console.log(paginatedChunks, dataSource, 'dataSourcedataSource');
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
<div <div
@ -272,7 +345,7 @@ const DCPrintStyle3 = ({
width: '100%', width: '100%',
}} }}
> >
<div className="PrintStyle3-print"> <div className="PrintStyle3-print" style={{ ...headerStyle }}>
<div style={{ fontSize: '30px', fontweight: '900' }}> <div style={{ fontSize: '30px', fontweight: '900' }}>
{GlobaldummyData ? 'XYZ Shop' : BranchName} {GlobaldummyData ? 'XYZ Shop' : BranchName}
</div> </div>
@ -473,6 +546,7 @@ const DCPrintStyle3 = ({
width: '100%', width: '100%',
fontweight: '600', fontweight: '600',
gap: '0.2rem', gap: '0.2rem',
...tableHeaderStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData
@ -559,6 +633,11 @@ const DCPrintStyle3 = ({
justifyContent: 'space-between', justifyContent: 'space-between',
width: '100%', width: '100%',
gap: '0.2rem', gap: '0.2rem',
...(index % 2 !== 1 && rowtypeStyle === 'even'
? { ...tableBodyStyle }
: index % 2 === 1 && rowtypeStyle === 'odd'
? { ...tableBodyStyle }
: {}),
}} }}
> >
{GlobaldummyData {GlobaldummyData
@ -688,6 +767,7 @@ const DCPrintStyle3 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -17,19 +17,25 @@ import {
GlobalprintQrcodet, GlobalprintQrcodet,
GlobalPritdummyData, GlobalPritdummyData,
changeReprintDataFound, changeReprintDataFound,
GloabalFieldDetails,
GlobalprintSignature, GlobalprintSignature,
GlobalprinttermsAndConditions, GlobalprinttermsAndConditions,
GlobalSignatureImage, GlobalSignatureImage,
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import QRCode from 'react-qr-code'; import QRCode from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg'; import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect'; import { isMobile } from 'react-device-detect';
const DCPrintstyle4 = ({ const DCPrintstyle4 = ({
@ -219,6 +225,71 @@ const DCPrintstyle4 = ({
? paginatedChunks[paginatedChunks.length - 1].length ? paginatedChunks[paginatedChunks.length - 1].length
: 0; : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 11 : 20); const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 11 : 20);
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
<div <div
@ -261,7 +332,7 @@ const DCPrintstyle4 = ({
> >
<div <div
className="PrintStyle4-fistDiv" className="PrintStyle4-fistDiv"
style={{ flexDirection: 'column' }} style={{ flexDirection: 'column', ...headerStyle }}
> >
<div <div
style={{ style={{
@ -470,38 +541,69 @@ const DCPrintstyle4 = ({
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.No
</th>
) )
: SLNO && <th style={{ width: '10px' }}>S.No</th>} : SLNO && (
<th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.No
</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th>Item</th> ? GlobalItem && (
: Item && <th>Item</th>} <th style={{ ...tableHeaderStyle }}>Item</th>
)
: Item && (
<th style={{ ...tableHeaderStyle }}>Item</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
Qty Qty
</th> </th>
) )
: Quantity && ( : Quantity && (
<th <th
style={{ width: '30px', textAlign: 'right' }} style={{
width: '30px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
Qty Qty
</th> </th>
)} )}
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th> : HsnCode && <th style={{ width: '30px', textAlign: 'right' }}>HSN</th>}
{GlobaldummyData ? GlobalMRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th> : MRP && <th style={{ width: '30px', textAlign: 'right' }}>MRP</th>}
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th> : Discount && <th style={{ width: '30px', textAlign: 'right' }}>Dis </th>}
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th> : Rate && <th style={{ width: '40px', textAlign: 'right' }}>Rate</th>}
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount && <th style={{ width: '30px', textAlign: 'right' }}>Amt</th>} */}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{dataChunk?.map((item, index) => { {dataChunk?.map((item, index) => {
return ( return (
<tr key={index} style={{ gap: '0.2rem' }}> <tr
key={index}
style={{
gap: '0.2rem',
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td> ? GlobalSlNo && <td>{index + 1}</td>
: SLNO && ( : SLNO && (
@ -547,11 +649,6 @@ const DCPrintstyle4 = ({
{item?.Qty || item?.DispatchedQty} {item?.Qty || item?.DispatchedQty}
</td> </td>
)} )}
{/* {GlobaldummyData ? GlobalHsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td> : HsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td>}
{GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
{GlobaldummyData ? GlobalDiscount && <td style={{ textAlign: 'right' }}>{item.discount}</td> : Discount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount && <td style={{ textAlign: 'right' }}> {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
</tr> </tr>
); );
})} })}
@ -604,6 +701,7 @@ const DCPrintstyle4 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -24,6 +24,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedFooterFontColor,
GlobalSelectedFooterColor,
GlobalRowType,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData'; import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.scss';
@ -203,6 +212,74 @@ const DCPrintStyle5 = ({
: 0; : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 15 : 15); const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 15 : 15);
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find((obj) => obj.netAmtColor)?.netAmtColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
<div <div
@ -243,7 +320,7 @@ const DCPrintStyle5 = ({
width: '100%', width: '100%',
}} }}
> >
<div className="PrintStyle5-Head"> <div className="PrintStyle5-Head" style={{ ...headerStyle }}>
<div> <div>
<div <div
style={{ style={{
@ -458,6 +535,7 @@ const DCPrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)', fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '95%', width: '95%',
gap: '0.5rem', gap: '0.5rem',
...tableHeaderStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData
@ -502,10 +580,6 @@ const DCPrintStyle5 = ({
QTY QTY
</div> </div>
)} )}
{/* {GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right' }}>MRP</div> : MRP && <div style={{ width: '100%', textAlign: 'right' }}>MRP</div>}
{GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>RATE</div> : Rate && <div style={{ width: '100%', textAlign: 'right' }}>RATE</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>DIS </div> : Discount && <div style={{ width: '100%', textAlign: 'right' }}>DIS </div>}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }}> Amt </div> : Amount && <div style={{ width: '100%', textAlign: 'right' }}> AMT </div>} */}
</div> </div>
<hr className="hrline" /> <hr className="hrline" />
@ -521,6 +595,15 @@ const DCPrintStyle5 = ({
fontWeight: '600', fontWeight: '600',
width: '95%', width: '95%',
gap: '0.5rem', gap: '0.5rem',
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}} }}
> >
{GlobaldummyData {GlobaldummyData
@ -576,31 +659,6 @@ const DCPrintStyle5 = ({
item?.RequestVariantName}{' '} item?.RequestVariantName}{' '}
</span> </span>
)} )}
{/* <div>
{
(item?.Size || "1") +
(item?.SinglePc === "Y" ? "PCS" : item?.Type !== "C" ? item?.UomName : "COMBO") +
(item?.BrandName || "") +
(
item?.ProductIdentifierDtls?.filter(
(items) => items.SerialNumber && items.SerialNumber !== ""
)?.map((a, index) => <div key={`serial-${index}`}>{a.SerialNumber}</div>) || ""
) +
(
item?.ProductIdentifierDtls?.filter(
(item1) => item1.IMEI1 || item1.IMEI2
)?.map((item2, index) => {
const imei1 = item2.IMEI1 || "";
const imei2 = item2.IMEI2 || "";
return (
<div key={`imei-${index}`}>
{[imei1, imei2].filter(Boolean).join(",")}
</div>
);
}) || "") +
"-" + (GlobaldummyData ? (GlobalQuantity && item?.SalesQty) : item?.SalesQty)
}
</div> */}
</> </>
} }
</div> </div>
@ -617,9 +675,6 @@ const DCPrintStyle5 = ({
{item?.Qty || item?.DispatchedQty} {item?.Qty || item?.DispatchedQty}
</div> </div>
)} )}
{/* {GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div> : Rate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalAmount && <div style={{ width: "100%", textAlign: "right", }}>{item?.TotalAmt}</div> : Amount && <div style={{ width: "100%", textAlign: "right", }}> {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</div>} */}
</div> </div>
))} ))}
</> </>
@ -666,6 +721,7 @@ const DCPrintStyle5 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -24,6 +24,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedFooterFontColor,
GlobalSelectedFooterColor,
GlobalRowType,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData'; import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss';
@ -219,6 +228,72 @@ const DCPrintstyle6 = ({
: 0; : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 20 : 24); const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 20 : 24);
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
<div <div
@ -259,7 +334,7 @@ const DCPrintstyle6 = ({
width: '100%', width: '100%',
}} }}
> >
<div className="PrintStyle6-firstDiv"> <div className="PrintStyle6-firstDiv" style={{ ...headerStyle }}>
<div <div
className="P6HdBrnchName" className="P6HdBrnchName"
style={{ style={{
@ -470,28 +545,38 @@ const DCPrintstyle6 = ({
<div className="PrintStyle6-print-tableMaster"> <div className="PrintStyle6-print-tableMaster">
<table className="PrintStyle6-print-table"> <table className="PrintStyle6-print-table">
<thead> <thead>
<tr> <tr style={{ ...tableHeaderStyle }}>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
S.No
</th>
) )
: SLNO && ( : SLNO && (
<th <th
style={{ width: '10px', textAlign: 'left' }} style={{
width: '10px',
textAlign: 'left',
...tableHeaderStyle,
}}
> >
S.No S.No
</th> </th>
)} )}
{GlobaldummyData ? ( {GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && ( (GlobalItem || GlobalQuantity) && (
<th style={{ width: '10px' }}> <th
style={{ width: '10px', ...tableHeaderStyle }}
>
{GlobaldummyData {GlobaldummyData
? GlobalItem && 'ITEM /DES' ? GlobalItem && 'ITEM /DES'
: 'ITEM /DES'}{' '} : 'ITEM /DES'}{' '}
</th> </th>
) )
) : ( ) : (
<th style={{ width: '10px' }}> <th style={{ width: '10px', ...tableHeaderStyle }}>
{GlobaldummyData {GlobaldummyData
? GlobalItem && 'ITEM /DES' ? GlobalItem && 'ITEM /DES'
: Item && 'ITEM /DES'}{' '} : Item && 'ITEM /DES'}{' '}
@ -500,14 +585,22 @@ const DCPrintstyle6 = ({
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
QTY QTY
</th> </th>
) )
: Quantity && ( : Quantity && (
<th <th
style={{ width: '10px', textAlign: 'right' }} style={{
width: '10px',
textAlign: 'right',
...tableHeaderStyle,
}}
> >
QTY QTY
</th> </th>
@ -557,7 +650,20 @@ const DCPrintstyle6 = ({
<tbody> <tbody>
{dataChunk?.map((item, index) => { {dataChunk?.map((item, index) => {
return ( return (
<tr key={index}> <tr
key={index}
style={{
...(index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}),
}}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td> ? GlobalSlNo && <td>{index + 1}</td>
: SLNO && ( : SLNO && (
@ -749,6 +855,7 @@ const DCPrintstyle6 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -21,6 +21,15 @@ import {
Globalnotes, Globalnotes,
GlobalthemeFormat, GlobalthemeFormat,
GlobalBillName, GlobalBillName,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData'; import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.scss'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.scss';
@ -246,6 +255,73 @@ const DCPrintStyle7 = ({
: 0; : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10); const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
console.log(BranchName, 'paginatedChunks'); console.log(BranchName, 'paginatedChunks');
//
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(
GlobalSelectedPrintHeaderFontColor
);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(
GlobalSelectedTableHeaderFontColor
);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(
GlobalSelectedTableBodyFontColor
);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(
GlobalSelectedFooterFontColor
);
//
let printColors = DCPrintTemplateDtl?.PrintColors;
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(
(obj) => obj.tableHeaderColor
)?.tableHeaderColor;
const tableBodyColor = printColors?.find(
(obj) => obj.tableBodyColor
)?.tableBodyColor;
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
//
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
};
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
};
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
};
const rowtypeStyle = GlobaldummyData
? SelectedRowType
: tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
};
return ( return (
<> <>
<div <div
@ -287,7 +363,7 @@ const DCPrintStyle7 = ({
}} }}
> >
<hr class="star-line" /> <hr class="star-line" />
<div className="PrintStyle7-print"> <div className="PrintStyle7-print" style={{ ...headerStyle }}>
<div style={{ fontSize: '16px', fontWeight: '600' }}> <div style={{ fontSize: '16px', fontWeight: '600' }}>
{' '} {' '}
{GlobaldummyData ? 'XYZ Shop' : BranchName} {GlobaldummyData ? 'XYZ Shop' : BranchName}
@ -524,31 +600,71 @@ const DCPrintStyle7 = ({
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th> <th
style={{
width: '10px',
...tableHeaderStyle,
}}
>
S.No
</th>
) )
: SLNO == true && ( : SLNO == true && (
<th style={{ width: '10px' }}>S.No</th> <th
style={{
width: '10px',
...tableHeaderStyle,
}}
>
S.No
</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th>Item</th> ? GlobalItem && (
: Item == true && <th>Item</th>} <th style={{ ...tableHeaderStyle }}>Item</th>
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', }}>HSN</th> : HsnCode == true && <th style={{ width: '10px', }}>HSN</th>} */} )
: Item == true && (
<th style={{ ...tableHeaderStyle }}>Item</th>
)}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th> <th
style={{
width: '10px',
...tableHeaderStyle,
}}
>
Qty
</th>
) )
: Quantity == true && ( : Quantity == true && (
<th style={{ width: '10px' }}>Qty</th> <th
style={{
width: '10px',
...tableHeaderStyle,
}}
>
Qty
</th>
)} )}
{/* {GlobaldummyData ? GlobalMRP && <th style={{ width: '10px' }}>MRP</th> : MRP == true && <th style={{ width: '10px' }}>MRP</th>}
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px' }}>Rate</th> : Rate == true && <th style={{ width: '10px' }}>Rate</th>}
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px' }}>Dis </th> : Discount == true && <th style={{ width: '10px' }}>Dis </th>}
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount == true && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th>} */}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{dataChunk?.map((item, index) => ( {dataChunk?.map((item, index) => (
<tr key={index}> <tr
key={index}
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
...tableBodyStyle,
}
: index % 2 === 1 && rowtypeStyle === 'odd'
? {
...tableBodyStyle,
}
: {}
}
>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && ( ? GlobalSlNo && (
<td style={{ textAlign: 'center' }}> <td style={{ textAlign: 'center' }}>
@ -598,10 +714,6 @@ const DCPrintStyle7 = ({
{item?.Qty || item?.DispatchedQty} {item?.Qty || item?.DispatchedQty}
</td> </td>
)} )}
{/* {GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP == true && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate == true && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
{GlobaldummyData ? GlobalDiscount && <td>{item.discount}</td> : Discount == true && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount == true && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
</tr> </tr>
))} ))}
</tbody> </tbody>
@ -672,6 +784,7 @@ const DCPrintStyle7 = ({
? 'space-between' ? 'space-between'
: 'flex-end', : 'flex-end',
alignItems: 'center', alignItems: 'center',
...footerColorStyle,
}} }}
> >
{GlobaldummyData {GlobaldummyData

View File

@ -7,6 +7,7 @@ import moment from 'moment';
import DCPrintA4Style11 from './DCPrintTemplates/DCA4/DCPrintA4Style11'; import DCPrintA4Style11 from './DCPrintTemplates/DCA4/DCPrintA4Style11';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { GlobalDCPrintTemplate } from '../../Features/ThemeChange/ThemeChange'; import { GlobalDCPrintTemplate } from '../../Features/ThemeChange/ThemeChange';
import DCPrintStyle1 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle1';
import DCPrintstyle2 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle2'; import DCPrintstyle2 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle2';
import DCPrintStyle3 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle3'; import DCPrintStyle3 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle3';
import DCPrintstyle4 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle4'; import DCPrintstyle4 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle4';
@ -20,32 +21,13 @@ import DCPrintStyle11 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle11';
import DCPrintstyle12 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle12'; import DCPrintstyle12 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle12';
import DCPrintStyleA5 from './DCPrintTemplates/DCA4/DCPrintStyleA5'; import DCPrintStyleA5 from './DCPrintTemplates/DCA4/DCPrintStyleA5';
import DCA4Standard from './DCPrintTemplates/DCA4/DCA4Standard'; import DCA4Standard from './DCPrintTemplates/DCA4/DCA4Standard';
import DCPrintStyle1 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle1';
import DCInvicePrint from './DCPrintTemplates/DCThermalPrinter/DCInvicePrint'; import DCInvicePrint from './DCPrintTemplates/DCThermalPrinter/DCInvicePrint';
// const PrintStyles = ` const DeliveryPrint = ({
// @media print { PrintingData1,
// @page { DCprinterTemplateStyle,
// size: A4; DCPrintTemplateDtl,
// margin: 0; }) => {
// }
// body {
// margin: 1.6cm;
// }
// .Quo-Print-Body {
// padding: 20px;
// page-break-after: always;
// }
// .Quo-Print-Content {
// break-inside: avoid;
// }
// .no-print {
// display: none;
// }
// }
// `;
const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateDtl }) => {
const PrintingData = PrintingData1?.[0]; const PrintingData = PrintingData1?.[0];
console.log(PrintingData, 'PrintingData'); console.log(PrintingData, 'PrintingData');
const dispatch = useDispatch(); const dispatch = useDispatch();
@ -159,20 +141,29 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */} {/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */}
</div> </div>
<div className="Quo-Print-Qno"> <div className="Quo-Print-Qno">
{PrintingData?.[0]?.DCNo && <div className="Quo-Print-address"> {PrintingData?.[0]?.DCNo && (
Delivery Challan No: {PrintingData?.[0]?.DCNo} <div className="Quo-Print-address">
</div>} Delivery Challan No: {PrintingData?.[0]?.DCNo}
{PrintingData?.[0]?.RequestId && <div className="Quo-Print-address"> </div>
<strong>Ref No #:</strong> {PrintingData?.[0]?.RequestId} )}
</div>} {PrintingData?.[0]?.RequestId && (
{PrintingData?.[0]?.DCDate && <div className="Quo-Print-address"> <div className="Quo-Print-address">
Order Date:{' '} <strong>Ref No #:</strong>{' '}
{dateFormatChange1(PrintingData?.[0]?.DCDate)} {PrintingData?.[0]?.RequestId}
</div>} </div>
{PrintingData?.[0]?.RequestedDate && <div className="Quo-Print-address"> )}
<strong>Requested Date:{' '}</strong> {PrintingData?.[0]?.DCDate && (
{dateFormatChange1(PrintingData?.[0]?.RequestedDate)} <div className="Quo-Print-address">
</div>} Order Date:{' '}
{dateFormatChange1(PrintingData?.[0]?.DCDate)}
</div>
)}
{PrintingData?.[0]?.RequestedDate && (
<div className="Quo-Print-address">
<strong>Requested Date: </strong>
{dateFormatChange1(PrintingData?.[0]?.RequestedDate)}
</div>
)}
{PrintingData?.[0]?.ModeOfTransport && ( {PrintingData?.[0]?.ModeOfTransport && (
<div className="Quo-Print-address"> <div className="Quo-Print-address">
Transport Mode: {PrintingData?.[0]?.ModeOfTransport} Transport Mode: {PrintingData?.[0]?.ModeOfTransport}
@ -193,41 +184,66 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
Vehicle No: {PrintingData?.[0]?.VehicleNo} Vehicle No: {PrintingData?.[0]?.VehicleNo}
</div> </div>
)} )}
</div> </div>
</div> </div>
{PrintingData?.[0]?.ToBranchDtl?.length > 0 && <div className="Quo-Print-Header"> {PrintingData?.[0]?.ToBranchDtl?.length > 0 && (
<div> <div className="Quo-Print-Header">
<div style={{ marginBottom: '10px' }}><strong>Delivery To :</strong></div> <div>
<div className="Quo-Print-Company"> <div style={{ marginBottom: '10px' }}>
<div className="Quo-Print-Cname">{PrintingData?.[0]?.ToBranchDtl?.[0]?.BranchName}</div> <strong>Delivery To :</strong>
{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1 && <div className="Quo-Print-address">{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1}</div>} </div>
{(PrintingData?.[0]?.ToBranchDtl?.[0]?.City || PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist || PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip) && <div className="Quo-Print-address">{`${PrintingData?.[0]?.ToBranchDtl?.[0]?.City}, ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist} - ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip}`}</div>} <div className="Quo-Print-Company">
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN && <div className="Quo-Print-address">{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN}</div>} <div className="Quo-Print-Cname">
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */} {PrintingData?.[0]?.ToBranchDtl?.[0]?.BranchName}
</div>
{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1 && (
<div className="Quo-Print-address">
{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1}
</div>
)}
{(PrintingData?.[0]?.ToBranchDtl?.[0]?.City ||
PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist ||
PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip) && (
<div className="Quo-Print-address">{`${PrintingData?.[0]?.ToBranchDtl?.[0]?.City}, ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist} - ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip}`}</div>
)}
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN && (
<div className="Quo-Print-address">
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN}
</div>
)}
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */}
</div>
</div>
<div className="Quo-Print-Qno">
{PrintingData?.[0]?.DispatchId && (
<div className="Quo-Print-address">
<strong>Dispatch No #:</strong>{' '}
{PrintingData?.[0]?.DispatchId}
</div>
)}
{PrintingData?.[0]?.CreatedDate && (
<div className="Quo-Print-address">
<strong>Dispatch Date: </strong>
{dateFormatChange1(PrintingData?.[0]?.CreatedDate)}
</div>
)}
</div> </div>
</div> </div>
<div className="Quo-Print-Qno"> )}
{PrintingData?.[0]?.DispatchId && <div className="Quo-Print-address">
<strong>Dispatch No #:</strong> {PrintingData?.[0]?.DispatchId}
</div>}
{PrintingData?.[0]?.CreatedDate && <div className="Quo-Print-address">
<strong>Dispatch Date:{' '}</strong>
{dateFormatChange1(PrintingData?.[0]?.CreatedDate)}
</div>}
</div>
</div>}
<div className="Horizondal-line"></div> <div className="Horizondal-line"></div>
<div className="Quo-Print-Customer"> <div className="Quo-Print-Customer">
<div className="Quo-Print-Cname">Delivery Details</div> <div className="Quo-Print-Cname">Delivery Details</div>
{PrintingData?.[0]?.CustName && <div className="Quo-Print-address"> {PrintingData?.[0]?.CustName && (
Name: {PrintingData?.[0]?.CustName} <div className="Quo-Print-address">
</div>} Name: {PrintingData?.[0]?.CustName}
</div>
)}
{/* {PrintingData?.[0]?.CustMobile && ( */} {/* {PrintingData?.[0]?.CustMobile && ( */}
{PrintingData?.[0]?.CustMobile && <div className="Quo-Print-address"> {PrintingData?.[0]?.CustMobile && (
Mobile: {PrintingData?.[0]?.CustMobile} <div className="Quo-Print-address">
</div>} Mobile: {PrintingData?.[0]?.CustMobile}
</div>
)}
</div> </div>
</div> </div>
@ -270,12 +286,18 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
Variant: {item?.ProdVariantName} Variant: {item?.ProdVariantName}
</div> </div>
)} */} )} */}
{(item?.ProdVariantName || item?.RequestVariantName) && ( {(item?.ProdVariantName ||
(item?.RequestVariantName || item?.ProdVariantName) !== 'Variant 1' && item?.RequestVariantName) &&
<div style={{ fontSize: '0.9em', color: '#666' }}> (item?.RequestVariantName ||
Variant: {item?.RequestVariantName || item?.ProdVariantName} item?.ProdVariantName) !== 'Variant 1' && (
</div> <div
)} style={{ fontSize: '0.9em', color: '#666' }}
>
Variant:{' '}
{item?.RequestVariantName ||
item?.ProdVariantName}
</div>
)}
</td> </td>
<td <td
className="Quo-Print-TableData" className="Quo-Print-TableData"
@ -295,14 +317,12 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
</table> </table>
</div> </div>
</div> </div>
</div> </div>
))} ))}
</div> </div>
<div style={{ display: 'none' }}> <div style={{ display: 'none' }}>
{DCprinterTemplateStyle === 'Style 1' && ( {DCprinterTemplateStyle === 'Style 1' && (
<DCPrintStyle1 <DCPrintStyle1
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -318,11 +338,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 2' && ( {DCprinterTemplateStyle === 'Style 2' && (
@ -342,11 +362,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 3' && ( {DCprinterTemplateStyle === 'Style 3' && (
@ -366,16 +386,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 4' && ( {DCprinterTemplateStyle === 'Style 4' && (
<DCPrintstyle4 <DCPrintstyle4
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -391,16 +410,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 5' && ( {DCprinterTemplateStyle === 'Style 5' && (
<DCPrintStyle5 <DCPrintStyle5
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -416,11 +434,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 6' && ( {DCprinterTemplateStyle === 'Style 6' && (
@ -440,11 +458,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 7' && ( {DCprinterTemplateStyle === 'Style 7' && (
@ -458,18 +476,17 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
BranchName={BranchName} BranchName={BranchName}
BranchZip={BranchZip} BranchZip={BranchZip}
BranchDetails={BranchDetails} BranchDetails={BranchDetails}
// CashierName={CashierName} // CashierName={CashierName}
// totalQuantity={totalQuantity} // totalQuantity={totalQuantity}
// OrderDetailGST={OrderDetailGST} // OrderDetailGST={OrderDetailGST}
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 8' && ( {DCprinterTemplateStyle === 'Style 8' && (
@ -489,16 +506,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 9' && ( {DCprinterTemplateStyle === 'Style 9' && (
<DCPrintStyle9 <DCPrintStyle9
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -514,16 +530,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 10' && ( {DCprinterTemplateStyle === 'Style 10' && (
<DCPrintStyle10 <DCPrintStyle10
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -539,11 +554,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 11' && ( {DCprinterTemplateStyle === 'Style 11' && (
@ -563,16 +578,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'Style 12' && ( {DCprinterTemplateStyle === 'Style 12' && (
<DCPrintstyle12 <DCPrintstyle12
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -588,16 +602,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'A4' && ( {DCprinterTemplateStyle === 'A4' && (
<DCPrintA4Style11 <DCPrintA4Style11
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -613,16 +626,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'A5' && ( {DCprinterTemplateStyle === 'A5' && (
<DCPrintStyleA5 <DCPrintStyleA5
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -638,16 +650,15 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
{DCprinterTemplateStyle === 'A4Standard' && ( {DCprinterTemplateStyle === 'A4Standard' && (
<DCA4Standard <DCA4Standard
DCprinterTemplateStyle={DCprinterTemplateStyle} DCprinterTemplateStyle={DCprinterTemplateStyle}
DCPrintTemplateDtl={DCPrintTemplateDtl} DCPrintTemplateDtl={DCPrintTemplateDtl}
Date1={Date1} Date1={Date1}
@ -663,11 +674,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData?.[0]} table2Data={PrintingData?.[0]}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
// printDatas={printDatas} // printDatas={printDatas}
/> />
)} )}
@ -688,11 +699,11 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
// OrderDetailIGST={OrderDetailIGST} // OrderDetailIGST={OrderDetailIGST}
// OrderDetailVAT={OrderDetailVAT} // OrderDetailVAT={OrderDetailVAT}
table2Data={PrintingData} table2Data={PrintingData}
// totalQuantityFilter={totalQuantityFilter} // totalQuantityFilter={totalQuantityFilter}
// PaymentStatus={PaymentStatus} // PaymentStatus={PaymentStatus}
// PrintLogo={PrintLogo} // PrintLogo={PrintLogo}
// PrintGreeting={PrintGreeting} // PrintGreeting={PrintGreeting}
printDatas={DCPrintTemplateDtl} printDatas={DCPrintTemplateDtl}
/> />
)} )}
</div> </div>

View File

@ -35,6 +35,7 @@ const CardPage1 = (props) => {
const [QtyIndex, setQtyIndex] = useState(0); const [QtyIndex, setQtyIndex] = useState(0);
const [ConfigDataList, setConfigDataList] = useState([]); const [ConfigDataList, setConfigDataList] = useState([]);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const kioskTemplateData = props?.data; const kioskTemplateData = props?.data;
const SettingDataSelector = useSelector(settingDataSelector); const SettingDataSelector = useSelector(settingDataSelector);
const UomPrint = SettingDataSelector?.[0]?.SettingDtlDetails.filter( const UomPrint = SettingDataSelector?.[0]?.SettingDtlDetails.filter(
@ -60,20 +61,6 @@ const CardPage1 = (props) => {
//Card on click function //Card on click function
const CardOnClick = async (item, Parameter) => { const CardOnClick = async (item, Parameter) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setTimeout(() => {
setMaxLimitExceeded(false);
}, 2000);
return;
}
}
}
setOnePeiceFlow(Parameter === 'OnePeiceProduct'); setOnePeiceFlow(Parameter === 'OnePeiceProduct');
const transformedItem = { const transformedItem = {
@ -321,6 +308,61 @@ const CardPage1 = (props) => {
}; };
// add Product in cart state // add Product in cart state
const AddOrderDetails = (item) => { const AddOrderDetails = (item) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
}
}
const isItemInCart = KioskOrderDetails?.find( const isItemInCart = KioskOrderDetails?.find(
(cartItem) => (cartItem) =>
cartItem.ProdId === item.ProdId && cartItem.ProdId === item.ProdId &&
@ -792,7 +834,7 @@ const CardPage1 = (props) => {
/> />
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
</div> </div>

View File

@ -28,6 +28,7 @@ const CardPage2 = (props) => {
const BookingType = useSelector(GlobalBookingTypeKiosk); const BookingType = useSelector(GlobalBookingTypeKiosk);
const kioskTemplateData = props?.data; const kioskTemplateData = props?.data;
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const [openQuantity, setopenQuantity] = useState(false); const [openQuantity, setopenQuantity] = useState(false);
const [VariantOpen, setVariantOpen] = useState(false); const [VariantOpen, setVariantOpen] = useState(false);
const [onePeiceFlow, setOnePeiceFlow] = useState(false); const [onePeiceFlow, setOnePeiceFlow] = useState(false);
@ -59,20 +60,6 @@ const CardPage2 = (props) => {
//Card on click function //Card on click function
const CardOnClick = async (item, Parameter) => { const CardOnClick = async (item, Parameter) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setTimeout(() => {
setMaxLimitExceeded(false);
}, 2000);
return;
}
}
}
setOnePeiceFlow(Parameter === 'OnePeiceProduct'); setOnePeiceFlow(Parameter === 'OnePeiceProduct');
const transformedItem = { const transformedItem = {
@ -321,6 +308,61 @@ const CardPage2 = (props) => {
}; };
// add Product in cart state // add Product in cart state
const AddOrderDetails = (item) => { const AddOrderDetails = (item) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
}
}
const isItemInCart = KioskOrderDetails?.find( const isItemInCart = KioskOrderDetails?.find(
(cartItem) => (cartItem) =>
cartItem.ProdId === item.ProdId && cartItem.ProdId === item.ProdId &&
@ -601,7 +643,7 @@ const CardPage2 = (props) => {
)} )}
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
<Drawer <Drawer

View File

@ -27,6 +27,7 @@ const CardPage3 = (props) => {
const getKioskLightColourdata = useSelector(getKioskLightColour); const getKioskLightColourdata = useSelector(getKioskLightColour);
const BookingType = useSelector(GlobalBookingTypeKiosk); const BookingType = useSelector(GlobalBookingTypeKiosk);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const [openQuantity, setopenQuantity] = useState(false); const [openQuantity, setopenQuantity] = useState(false);
const [VariantOpen, setVariantOpen] = useState(false); const [VariantOpen, setVariantOpen] = useState(false);
const [onePeiceFlow, setOnePeiceFlow] = useState(false); const [onePeiceFlow, setOnePeiceFlow] = useState(false);
@ -58,19 +59,6 @@ const CardPage3 = (props) => {
}, []); }, []);
//Card on click function //Card on click function
const CardOnClick = async (item, Parameter) => { const CardOnClick = async (item, Parameter) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setTimeout(() => {
setMaxLimitExceeded(false);
}, 2000);
return;
}
}
}
setOnePeiceFlow(Parameter === 'OnePeiceProduct'); setOnePeiceFlow(Parameter === 'OnePeiceProduct');
const transformedItem = { const transformedItem = {
@ -318,6 +306,61 @@ const CardPage3 = (props) => {
}; };
// add Product in cart state // add Product in cart state
const AddOrderDetails = (item) => { const AddOrderDetails = (item) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
}
}
const isItemInCart = KioskOrderDetails?.find( const isItemInCart = KioskOrderDetails?.find(
(cartItem) => (cartItem) =>
cartItem.ProdId === item.ProdId && cartItem.ProdId === item.ProdId &&
@ -604,7 +647,7 @@ const CardPage3 = (props) => {
)} )}
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
<Drawer <Drawer

View File

@ -27,6 +27,7 @@ const CardPage4 = (props) => {
const getKioskLightColourdata = useSelector(getKioskLightColour); const getKioskLightColourdata = useSelector(getKioskLightColour);
const BookingType = useSelector(GlobalBookingTypeKiosk); const BookingType = useSelector(GlobalBookingTypeKiosk);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const [quantities, setQuantities] = useState({}); const [quantities, setQuantities] = useState({});
const [openQuantity, setopenQuantity] = useState(false); const [openQuantity, setopenQuantity] = useState(false);
const [VariantOpen, setVariantOpen] = useState(false); const [VariantOpen, setVariantOpen] = useState(false);
@ -89,19 +90,6 @@ const CardPage4 = (props) => {
//Card on click function //Card on click function
const CardOnClick = async (item, Parameter) => { const CardOnClick = async (item, Parameter) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setTimeout(() => {
setMaxLimitExceeded(false);
}, 2000);
return;
}
}
}
setOnePeiceFlow(Parameter === 'OnePeiceProduct'); setOnePeiceFlow(Parameter === 'OnePeiceProduct');
const transformedItem = { const transformedItem = {
@ -342,6 +330,61 @@ const CardPage4 = (props) => {
}; };
// add Product in cart state // add Product in cart state
const AddOrderDetails = (item) => { const AddOrderDetails = (item) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
}
}
const isItemInCart = KioskOrderDetails?.find( const isItemInCart = KioskOrderDetails?.find(
(cartItem) => (cartItem) =>
cartItem.ProdId === item.ProdId && cartItem.ProdId === item.ProdId &&
@ -625,7 +668,7 @@ const CardPage4 = (props) => {
)} )}
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
<Drawer <Drawer

View File

@ -37,6 +37,7 @@ const apiUrlToken = import.meta.env.ENV_API_URL_TOKEN;
const KioskBookingPage = () => { const KioskBookingPage = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const kioskTemplateData = useSelector(getKioskTemplateData); const kioskTemplateData = useSelector(getKioskTemplateData);
console.log(kioskTemplateData, 'kioskTemplateData');
const [devicePresent, setDevicePresent] = useState(false); const [devicePresent, setDevicePresent] = useState(false);
const [deviceAccess, setDeviceAccess] = useState(true); const [deviceAccess, setDeviceAccess] = useState(true);
const [deviceAddress, setDeviceAddress] = useState(null); const [deviceAddress, setDeviceAddress] = useState(null);

View File

@ -9,9 +9,11 @@ import { PreferenceData } from '../../../Features/BookingScreen/BookingData/Book
import { calculateOverAllQtyLimit } from '../../../utils/calculations'; import { calculateOverAllQtyLimit } from '../../../utils/calculations';
import { IoIosWarning } from 'react-icons/io'; import { IoIosWarning } from 'react-icons/io';
import { useState } from 'react'; import { useState } from 'react';
import { message } from 'antd';
const KisokOrderCart1 = (props) => { const KisokOrderCart1 = (props) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
const overAllLimitPreferenece = const overAllLimitPreferenece =
@ -45,10 +47,51 @@ const KisokOrderCart1 = (props) => {
if ((calculatedOverAllQty + 1) > maxQtyLimit) { if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true); setMaxLimitExceeded(true);
// Reset after 3 seconds // Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => { setTimeout(() => {
setMaxLimitExceeded(false); setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000); }, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return; return;
} }
} }
@ -209,13 +252,14 @@ const KisokOrderCart1 = (props) => {
remove remove
</div> </div>
</div> </div>
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
</p>
</div>
</div> </div>
))} ))}
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p>
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p>
</div>
</div> </div>
</div> </div>
); );

View File

@ -17,6 +17,7 @@ const KisokOrderCart2 = (props) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const overAllLimitPreferenece = const overAllLimitPreferenece =
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); (item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
@ -49,8 +50,50 @@ const KisokOrderCart2 = (props) => {
if ((calculatedOverAllQty + 1) > maxQtyLimit) { if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true); setMaxLimitExceeded(true);
// Reset after 3 seconds // Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => { setTimeout(() => {
setMaxLimitExceeded(false); setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000); }, 2000);
return; return;
} }
@ -232,7 +275,7 @@ const KisokOrderCart2 = (props) => {
</div> </div>
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
</div> </div>

View File

@ -19,6 +19,7 @@ const KisokOrderCart3 = (props) => {
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const getKioskDarkColourdata = useSelector(getKioskDarkColour); const getKioskDarkColourdata = useSelector(getKioskDarkColour);
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const overAllLimitPreferenece = const overAllLimitPreferenece =
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); (item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
@ -52,8 +53,50 @@ const KisokOrderCart3 = (props) => {
if ((calculatedOverAllQty + 1) > maxQtyLimit) { if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true); setMaxLimitExceeded(true);
// Reset after 3 seconds // Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => { setTimeout(() => {
setMaxLimitExceeded(false); setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000); }, 2000);
return; return;
} }
@ -245,7 +288,7 @@ const KisokOrderCart3 = (props) => {
</div> </div>
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
</div> </div>

View File

@ -27,6 +27,7 @@ const OrderView1 = (props) => {
: null; : null;
const dispatch = useDispatch(); const dispatch = useDispatch();
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const KioskOrderDetails = useSelector(GlobalKioskOrderDetails); const KioskOrderDetails = useSelector(GlobalKioskOrderDetails);
const getKioskLightColourdata = useSelector(getKioskLightColour); const getKioskLightColourdata = useSelector(getKioskLightColour);
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
@ -57,16 +58,56 @@ const OrderView1 = (props) => {
); );
}; };
const increase = async (item) => { const increase = async (item) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) { if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails); const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) { if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true); setMaxLimitExceeded(true);
// Reset after 3 seconds // Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => { setTimeout(() => {
setMaxLimitExceeded(false); setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000); }, 2000);
return; return;
} }
@ -258,13 +299,14 @@ const OrderView1 = (props) => {
remove remove
</div> </div>
</div> </div>
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
</p>
</div>
</div> </div>
))} ))}
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p>
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p>
</div>
</div> </div>
</div> </div>
<div <div

View File

@ -29,6 +29,7 @@ const KioskOrderView2 = (props) => {
: null; : null;
const dispatch = useDispatch(); const dispatch = useDispatch();
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const overAllLimitPreferenece = const overAllLimitPreferenece =
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
@ -73,8 +74,50 @@ const KioskOrderView2 = (props) => {
if ((calculatedOverAllQty + 1) > maxQtyLimit) { if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true); setMaxLimitExceeded(true);
// Reset after 3 seconds // Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => { setTimeout(() => {
setMaxLimitExceeded(false); setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000); }, 2000);
return; return;
} }
@ -339,7 +382,7 @@ const KioskOrderView2 = (props) => {
</div> </div>
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
</div> </div>

View File

@ -32,6 +32,7 @@ const KioskOrderView = (props) => {
const KioskOrderDetails = useSelector(GlobalKioskOrderDetails); const KioskOrderDetails = useSelector(GlobalKioskOrderDetails);
const getKioskLightColourdata = useSelector(getKioskLightColour); const getKioskLightColourdata = useSelector(getKioskLightColour);
const preferenceDatas = useSelector(PreferenceData); const preferenceDatas = useSelector(PreferenceData);
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false); const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
const overAllLimitPreferenece = const overAllLimitPreferenece =
preferenceDatas?.[0]?.['SettingDtlDetails']?.find( preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
@ -60,15 +61,56 @@ const KioskOrderView = (props) => {
); );
}; };
const increase = async (item) => { const increase = async (item) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) { if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails); const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) { if ((calculatedOverAllQty + 1) > maxQtyLimit) {
setMaxLimitExceeded(true); setMaxLimitExceeded(true);
// Reset after 3 seconds // Reset after 3 seconds
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
setTimeout(() => { setTimeout(() => {
setMaxLimitExceeded(false); setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000);
return;
}
} else if (itemWiseLimitPreferenece) {
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
const inwardId = curr?.InwardDtlId;
const qty = Number(curr?.OrderQty) || 0;
if (acc[inwardId]) {
acc[inwardId] += qty;
} else {
acc[inwardId] = qty;
}
return acc;
}, {});
const currentInwardId = item?.InwardDtlId;
const addQty = 1;
if (inwardQtyMap[currentInwardId]) {
inwardQtyMap[currentInwardId] += addQty;
} else {
inwardQtyMap[currentInwardId] = addQty;
}
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
const isExceeded = Object.values(inwardQtyMap).some(
(qty) => qty > maxQtyLimit
);
if (isExceeded) {
setMaxLimitExceeded(true);
// Reset after 3 seconds
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
setTimeout(() => {
setMaxLimitExceeded(false);
setMaxLimitExceededMessage(null);
}, 2000); }, 2000);
return; return;
} }
@ -331,7 +373,7 @@ const KioskOrderView = (props) => {
</div> </div>
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}> <div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
<p> <p>
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached <IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
</p> </p>
</div> </div>
</div> </div>

View File

@ -968,16 +968,6 @@ const KioskPayment = (props) => {
}; };
await dispatch(sendSms(postData)); await dispatch(sendSms(postData));
} }
const goFullScreen = () => {
const elem = document.documentElement;
if (!document.fullscreenElement) {
elem.requestFullscreen?.().catch((err) => {
console.log("Fullscreen error:", err);
});
}
};
goFullScreen();
clearAllStates(); clearAllStates();
} else { } else {
if ( if (
@ -1954,7 +1944,7 @@ const KioskPayment = (props) => {
open={open} open={open}
handleCancel={!selectedPaymentOption && HandleCloseModal} handleCancel={!selectedPaymentOption && HandleCloseModal}
footer={false} footer={false}
width={width > 768 ? 900 : 700} width={width > 768 ? 800 : 600}
children={ children={
showPaymentGatewayOptions ? ( showPaymentGatewayOptions ? (
<div className="paymentCardMain"> <div className="paymentCardMain">

View File

@ -560,4 +560,5 @@
} }
} }
} }
} }

View File

@ -31,6 +31,7 @@ import { DefaultModal } from '../../../Components/Modal/DefaultModal.jsx';
import { DropDowns } from '../../../Components/Forms/DropDown.jsx'; import { DropDowns } from '../../../Components/Forms/DropDown.jsx';
import { useAuth } from '../../../AuthContext.jsx'; import { useAuth } from '../../../AuthContext.jsx';
import { FeatureAddon } from '../../../Features/BookingScreen/BookingData/BookingData.js'; import { FeatureAddon } from '../../../Features/BookingScreen/BookingData/BookingData.js';
import "../../../Pages/openingStock/openingStockForm.scss"
const PaymentDetailsList = () => { const PaymentDetailsList = () => {
const { SadminuserAccess } = useAuth(); const { SadminuserAccess } = useAuth();

View File

@ -67,6 +67,7 @@ const PreferenceList = () => {
dashboard: allSettingsMap['dashboard']?.value === 'Y', dashboard: allSettingsMap['dashboard']?.value === 'Y',
shortcutkeys: allSettingsMap['shortcutkeys']?.value === 'Y', shortcutkeys: allSettingsMap['shortcutkeys']?.value === 'Y',
autoreceivestock: allSettingsMap['autoreceivestock']?.value === 'Y', autoreceivestock: allSettingsMap['autoreceivestock']?.value === 'Y',
salespageaskiosk: allSettingsMap['salespageaskiosk']?.value === 'Y',
kioskotp: allSettingsMap['kioskotp']?.value === 'Y', kioskotp: allSettingsMap['kioskotp']?.value === 'Y',
decimal: allSettingsMap['decimal']?.value === 'Y', decimal: allSettingsMap['decimal']?.value === 'Y',
enabledModules: [ enabledModules: [
@ -119,7 +120,7 @@ const PreferenceList = () => {
], ],
scanlayout: allSettingsMap['scanlayout']?.value === 'Y', scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y', verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
imeidetails:allSettingsMap['imeidetails']?.value === 'Y', imeidetails: allSettingsMap['imeidetails']?.value === 'Y',
customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y', customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y',
upiqr: allSettingsMap['upiqr']?.value === 'Y', upiqr: allSettingsMap['upiqr']?.value === 'Y',
lowstockreport: allSettingsMap['lowstockreport']?.value === 'Y', lowstockreport: allSettingsMap['lowstockreport']?.value === 'Y',
@ -308,6 +309,7 @@ const PreferenceList = () => {
dashboard: values.dashboard, dashboard: values.dashboard,
shortcutkeys: values.shortcutkeys, shortcutkeys: values.shortcutkeys,
autoreceivestock: values.autoreceivestock, autoreceivestock: values.autoreceivestock,
salespageaskiosk: values.salespageaskiosk,
kioskotp: values.kioskotp, kioskotp: values.kioskotp,
decimal: values.decimal, decimal: values.decimal,
searchfocus: values.searchfocus, searchfocus: values.searchfocus,
@ -323,7 +325,7 @@ const PreferenceList = () => {
mobilea4: values.mobilea4, mobilea4: values.mobilea4,
scanlayout: values.scanlayout, scanlayout: values.scanlayout,
verifyproduct: values.verifyproduct, verifyproduct: values.verifyproduct,
imeidetails:values.imeidetails, imeidetails: values.imeidetails,
customisedbillnumber: values.customisedbillnumber, customisedbillnumber: values.customisedbillnumber,
upiqr: values.upiqr, upiqr: values.upiqr,
lowstockreport: values.lowstockreport, lowstockreport: values.lowstockreport,
@ -512,6 +514,10 @@ const PreferenceList = () => {
{renderCheckbox( {renderCheckbox(
'decimal', 'decimal',
'Display values with 2 decimal places throughout the app?' 'Display values with 2 decimal places throughout the app?'
)}
{renderCheckbox(
'salespageaskiosk',
'Do you want to open sales page as kiosk layout?'
)} )}
{(allSettingsMap['onlineindividualslots'] !== undefined || {(allSettingsMap['onlineindividualslots'] !== undefined ||
allSettingsMap['allow individual booking'] !== undefined || allSettingsMap['allow individual booking'] !== undefined ||
@ -549,8 +555,12 @@ const PreferenceList = () => {
<> <>
<Form.Item name="kiosktimelimittype" label="How would you like to apply the time restriction?"> <Form.Item name="kiosktimelimittype" label="How would you like to apply the time restriction?">
<Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxtime: undefined })}> <Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxtime: undefined })}>
<Radio value="minutes">Minutes</Radio> {allSettingsMap['minutes'] !== undefined && (
<Radio value="hours">Hours</Radio> <Radio value="minutes">Minutes</Radio>
)}
{allSettingsMap['hours'] !== undefined && (
<Radio value="hours">Hours</Radio>
)}
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
@ -739,8 +749,12 @@ const PreferenceList = () => {
<> <>
<Form.Item name="quantityrestrictiontype" label="How would you like to apply the quantity restriction?"> <Form.Item name="quantityrestrictiontype" label="How would you like to apply the quantity restriction?">
<Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxquantity: undefined })}> <Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxquantity: undefined })}>
<Radio value="overall">Overall Order Quantity</Radio> {allSettingsMap['overalllimit'] !== undefined && (
<Radio value="itemwise">Item-wise Quantity</Radio> <Radio value="overall">Overall Order Quantity</Radio>
)}
{allSettingsMap['itemwiselimit'] !== undefined && (
<Radio value="itemwise">Item-wise Quantity</Radio>
)}
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>

View File

@ -166,7 +166,6 @@
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
justify-content: flex-end; justify-content: flex-end;
width: 100%;
margin-top: 1rem; margin-top: 1rem;
position: fixed; position: fixed;
bottom: 1.3rem; bottom: 1.3rem;

View File

@ -23,6 +23,7 @@ import {
} from '../../Features/UpiDetails/UpiDetails.js'; } from '../../Features/UpiDetails/UpiDetails.js';
import { changeBreadCrumb } from '../../Features/AppPage/CenterPage.js'; import { changeBreadCrumb } from '../../Features/AppPage/CenterPage.js';
import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx'; import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx';
import "../../Pages/openingStock/openingStockForm.scss"
const UpiDetailslist = () => { const UpiDetailslist = () => {
const navigateTo = useNavigate(); const navigateTo = useNavigate();

View File

@ -299,3 +299,12 @@
.purchase-entry-form { .purchase-entry-form {
width: 100%; width: 100%;
} }
.otpInput {
width: 2.5rem !important;
height: 2.5rem;
margin: 0 0.14rem;
font-size: 1rem;
text-align: center;
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.3);
}

View File

@ -144,7 +144,7 @@ input::-webkit-inner-spin-button {
justify-content: center; justify-content: center;
gap: 0.2rem; gap: 0.2rem;
background-color: #dbdbdb; background-color: #dbdbdb;
font-family: "Poppins", sans-serif; font-family: 'Poppins', sans-serif;
} }
.payment-div-0-userplus { .payment-div-0-userplus {
@ -243,6 +243,7 @@ input::-webkit-inner-spin-button {
background-color: var(--DEFAULT_SELECTED_COLOR); background-color: var(--DEFAULT_SELECTED_COLOR);
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
border: none;
height: 40px; height: 40px;
width: 75px; width: 75px;
border-radius: 7.2px; border-radius: 7.2px;
@ -251,17 +252,20 @@ input::-webkit-inner-spin-button {
display: flex; display: flex;
gap: 0.2rem; gap: 0.2rem;
align-items: center; align-items: center;
font-family: "Poppins"; font-family: 'Poppins';
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
text-transform: capitalize; text-transform: capitalize;
outline: none;
} }
.Btn-payment-mode { .Btn-payment-mode {
background-color: var(--SELECTED_COLOR); background-color: var(--SELECTED_COLOR);
font-size: 14px; font-size: 14px;
border: none;
font-weight: 500; font-weight: 500;
height: 40px; height: 40px;
outline: none;
width: 75px; width: 75px;
border-radius: 7.2px; border-radius: 7.2px;
color: #fff; color: #fff;
@ -269,8 +273,9 @@ input::-webkit-inner-spin-button {
display: flex; display: flex;
gap: 0.2rem; gap: 0.2rem;
align-items: center; align-items: center;
font-family: "Poppins"; font-family: 'Poppins';
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
text-transform: capitalize; text-transform: capitalize;
outline: none;
} }

View File

@ -205,8 +205,9 @@ input::-webkit-inner-spin-button {
.Btn-payment-mode { .Btn-payment-mode {
background-color: var(--SELECTED_COLOR); background-color: var(--SELECTED_COLOR);
font-size: 13px !important; font-size: 13px !important;
font-weight: 500; font-weight: 500;border: none;
height: 40px; height: 40px;
outline: none;
flex-grow: 1; flex-grow: 1;
flex: 1; flex: 1;
width: max-content !important; width: max-content !important;
@ -242,6 +243,7 @@ input::-webkit-inner-spin-button {
background-color: var(--DEFAULT_SELECTED_COLOR); background-color: var(--DEFAULT_SELECTED_COLOR);
font-size: 13px !important; font-size: 13px !important;
font-weight: 500; font-weight: 500;
outline: none;border: none;
height: 40px; height: 40px;
width: max-content !important; width: max-content !important;
flex: 1; flex: 1;

View File

@ -109,6 +109,7 @@
.Btn-payment-mode { .Btn-payment-mode {
background-color: var(--SELECTED_COLOR); background-color: var(--SELECTED_COLOR);
color: #ffffff; color: #ffffff;
outline: none;border: none;
font-size: 12px; font-size: 12px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -126,6 +127,8 @@
background-color: var(--DEFAULT_SELECTED_COLOR); background-color: var(--DEFAULT_SELECTED_COLOR);
color: rgb(255, 255, 255); color: rgb(255, 255, 255);
font-size: 12px; font-size: 12px;
outline: none;
border: none;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
flex-direction: row; flex-direction: row;

View File

@ -514,6 +514,7 @@
position: absolute; position: absolute;
z-index: 10; z-index: 10;
left: 6px; left: 6px;
background-color: unset !important;
} }
.custom-input { .custom-input {
padding: 10px 30px 10px 30px; padding: 10px 30px 10px 30px;
@ -522,3 +523,28 @@
top: 53%; top: 53%;
} }
} }
.BsNavbar1FullScreen {
background-color: #1292ee;
height: 28px;
width: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
cursor: pointer;
font-size: 18px;
color: #fff;
}
.BsNavbar1FullScreenExit {
background-color: #ef4444;
height: 28px;
width: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
color: #fff;
font-size: 18px;
cursor: pointer;
}

View File

@ -423,3 +423,29 @@
left: 11px; left: 11px;
top: 10px; top: 10px;
} }
.BsNavbar1FullScreen {
background-color: #1292ee;
height: 28px;
width: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
cursor: pointer;
font-size: 18px;
color: #fff;
}
.BsNavbar1FullScreenExit {
background-color: #ef4444;
height: 28px;
width: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
color: #fff;
font-size: 18px;
cursor: pointer;
}

View File

@ -30,6 +30,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
column-gap: 0.5rem; column-gap: 0.5rem;
margin-top: 10px;
} }
.defaultandCustomisedTheme { .defaultandCustomisedTheme {

View File

@ -27,8 +27,8 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
column-gap: 0.5rem; column-gap: 0.5rem;
margin-top: 10px;
} }
// Branch Login Design by Vicky // Branch Login Design by Vicky
.branchLoginMaster { .branchLoginMaster {