Merge pull request 'Printstyle 4 design changed for user requirement' (#275) from branchloginissueandprint into main
Reviewed-on: Pozomind/pozo-retail-app#275
This commit is contained in:
commit
8e974bd2eb
|
|
@ -471,6 +471,8 @@ const initialState = {
|
||||||
notes: false,
|
notes: false,
|
||||||
SignatureImage: '',
|
SignatureImage: '',
|
||||||
BillName: '',
|
BillName: '',
|
||||||
|
BillNolabel: '',
|
||||||
|
Totallabel: '',
|
||||||
SelectedHeaderColour: false,
|
SelectedHeaderColour: false,
|
||||||
SelectedTableHeaderColour: false,
|
SelectedTableHeaderColour: false,
|
||||||
SelectedTableBodyColour: false,
|
SelectedTableBodyColour: false,
|
||||||
|
|
@ -2165,6 +2167,13 @@ const ThemeSlice = createSlice({
|
||||||
changeBillName: (state, action) => {
|
changeBillName: (state, action) => {
|
||||||
state.BillName = action?.payload;
|
state.BillName = action?.payload;
|
||||||
},
|
},
|
||||||
|
changeBillNolabel: (state, action) => {
|
||||||
|
state.BillNolabel = action?.payload;
|
||||||
|
},
|
||||||
|
changetotallabel: (state, action) => {
|
||||||
|
state.Totallabel = action?.payload;
|
||||||
|
},
|
||||||
|
|
||||||
changeSelectedHeaderColor: (state, action) => {
|
changeSelectedHeaderColor: (state, action) => {
|
||||||
state.SelectedHeaderColor = action?.payload?.background;
|
state.SelectedHeaderColor = action?.payload?.background;
|
||||||
state.SelectedHeaderFontColor = action?.payload?.font;
|
state.SelectedHeaderFontColor = action?.payload?.font;
|
||||||
|
|
@ -2397,7 +2406,6 @@ const ThemeSlice = createSlice({
|
||||||
getPrintSelectionComponentData.fulfilled,
|
getPrintSelectionComponentData.fulfilled,
|
||||||
(state, action) => {
|
(state, action) => {
|
||||||
if (action?.payload?.data?.statusCode === 1) {
|
if (action?.payload?.data?.statusCode === 1) {
|
||||||
|
|
||||||
state.PrintTemplate =
|
state.PrintTemplate =
|
||||||
action?.payload?.data?.data?.[0]?.ComponentDetails?.find(
|
action?.payload?.data?.data?.[0]?.ComponentDetails?.find(
|
||||||
(item) =>
|
(item) =>
|
||||||
|
|
@ -2744,6 +2752,8 @@ export const {
|
||||||
changeReprintDataFound,
|
changeReprintDataFound,
|
||||||
changePricingAppPricingName,
|
changePricingAppPricingName,
|
||||||
changeBillName,
|
changeBillName,
|
||||||
|
changeBillNolabel,
|
||||||
|
changetotallabel,
|
||||||
changetemplateData,
|
changetemplateData,
|
||||||
changeSessionData,
|
changeSessionData,
|
||||||
changeThemeCreation,
|
changeThemeCreation,
|
||||||
|
|
@ -2799,6 +2809,8 @@ export const GlobalSelectedNetAmountColour = (state) => state.theme?.SelectedNet
|
||||||
export const Globalnotes = (state) => state.theme?.notes;
|
export const Globalnotes = (state) => state.theme?.notes;
|
||||||
export const GlobalSignatureImage = (state) => state.theme?.SignatureImage;
|
export const GlobalSignatureImage = (state) => state.theme?.SignatureImage;
|
||||||
export const GlobalBillName = (state) => state.theme?.BillName;
|
export const GlobalBillName = (state) => state.theme?.BillName;
|
||||||
|
export const GlobalBillNolabel = (state) => state.theme?.BillNolabel;
|
||||||
|
export const GlobalTotallabel = (state) => state.theme?.Totallabel;
|
||||||
export const GlobalSelectedPrintHeaderColor = (state) =>
|
export const GlobalSelectedPrintHeaderColor = (state) =>
|
||||||
state.theme?.SelectedHeaderColor;
|
state.theme?.SelectedHeaderColor;
|
||||||
export const GlobalSelectedPrintHeaderFontColor = (state) =>
|
export const GlobalSelectedPrintHeaderFontColor = (state) =>
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,8 @@ import {
|
||||||
changeSelectedTableBodyColour,
|
changeSelectedTableBodyColour,
|
||||||
changeSelectedFooterColour,
|
changeSelectedFooterColour,
|
||||||
changeSelectedNetAmountColour,
|
changeSelectedNetAmountColour,
|
||||||
|
changeBillNolabel,
|
||||||
|
changetotallabel,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import '../../../../Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss';
|
import '../../../../Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss';
|
||||||
import { useAuth } from '../../../../AuthContext.jsx';
|
import { useAuth } from '../../../../AuthContext.jsx';
|
||||||
|
|
@ -152,6 +154,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
const [selectedSizeCheckList, setSelectedSizeCheckList] = useState([]);
|
const [selectedSizeCheckList, setSelectedSizeCheckList] = useState([]);
|
||||||
const [sizeOptionData, setSizeOptionData] = useState([]);
|
const [sizeOptionData, setSizeOptionData] = useState([]);
|
||||||
|
|
||||||
|
console.log(sizeOptionData, "sizeOptionData")
|
||||||
const [styleData, setStyleData] = useState([]);
|
const [styleData, setStyleData] = useState([]);
|
||||||
|
|
||||||
const [checkedList, setCheckedList] = useState([]);
|
const [checkedList, setCheckedList] = useState([]);
|
||||||
|
|
@ -163,6 +166,9 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
const [PrintType, setPrintType] = useState(true);
|
const [PrintType, setPrintType] = useState(true);
|
||||||
const [PageSize, setPageSize] = useState('3inch');
|
const [PageSize, setPageSize] = useState('3inch');
|
||||||
const [isFooterChecking, setisFooterChecking] = useState(false);
|
const [isFooterChecking, setisFooterChecking] = useState(false);
|
||||||
|
const [isbillnoLabel, setisbillnoLabel] = useState(false);
|
||||||
|
const [istotalLabel, setistotalLabel] = useState(false);
|
||||||
|
|
||||||
const [isBillName, setisBillName] = useState(false);
|
const [isBillName, setisBillName] = useState(false);
|
||||||
const [isTermscondChecking, setisTermscondChecking] = useState(false);
|
const [isTermscondChecking, setisTermscondChecking] = useState(false);
|
||||||
const [isSignatureChecking, setisSignatureChecking] = useState(false);
|
const [isSignatureChecking, setisSignatureChecking] = useState(false);
|
||||||
|
|
@ -183,6 +189,8 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
const [previewTitle, setPreviewTitle] = useState('');
|
const [previewTitle, setPreviewTitle] = useState('');
|
||||||
const [Notes, setNote] = useState('');
|
const [Notes, setNote] = useState('');
|
||||||
const [BillName, setBillName] = useState('');
|
const [BillName, setBillName] = useState('');
|
||||||
|
const [BillNolabel, setBillNolabel] = useState('');
|
||||||
|
const [totalLabel, settotalLabel] = useState('');
|
||||||
const [openColorModal, setOpenColorModal] = useState(false);
|
const [openColorModal, setOpenColorModal] = useState(false);
|
||||||
const [bgColor, setBgColor] = useState('#ffffff');
|
const [bgColor, setBgColor] = useState('#ffffff');
|
||||||
const [fontColor, setFontColor] = useState('#000000');
|
const [fontColor, setFontColor] = useState('#000000');
|
||||||
|
|
@ -394,6 +402,12 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
let CheckBillnamename = sizeCheckList?.find(
|
let CheckBillnamename = sizeCheckList?.find(
|
||||||
(item) => item.ConfigName?.toLowerCase() == 'billname'
|
(item) => item.ConfigName?.toLowerCase() == 'billname'
|
||||||
);
|
);
|
||||||
|
let CheckBillnolable = sizeCheckList?.find(
|
||||||
|
(item) => item.ConfigName?.toLowerCase() == 'billnolabel'
|
||||||
|
);
|
||||||
|
let CheckTotallable = sizeCheckList?.find(
|
||||||
|
(item) => item.ConfigName?.toLowerCase() == 'total label'
|
||||||
|
);
|
||||||
let Checktermdcondition = sizeCheckList?.find(
|
let Checktermdcondition = sizeCheckList?.find(
|
||||||
(item) => item.ConfigName?.toLowerCase() == 'terms&conditions'
|
(item) => item.ConfigName?.toLowerCase() == 'terms&conditions'
|
||||||
);
|
);
|
||||||
|
|
@ -403,6 +417,8 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
let headerColour = sizeCheckList?.find(
|
let headerColour = sizeCheckList?.find(
|
||||||
(item) => item.ConfigName?.toLowerCase() == 'header colour'
|
(item) => item.ConfigName?.toLowerCase() == 'header colour'
|
||||||
);
|
);
|
||||||
|
setistotalLabel(checkedList?.includes(CheckTotallable?.ConfigId))
|
||||||
|
setisbillnoLabel(checkedList?.includes(CheckBillnolable?.ConfigId))
|
||||||
setisFooterChecking(checkedList?.includes(Checkfootername?.ConfigId));
|
setisFooterChecking(checkedList?.includes(Checkfootername?.ConfigId));
|
||||||
setisBillName(checkedList?.includes(CheckBillnamename?.ConfigId));
|
setisBillName(checkedList?.includes(CheckBillnamename?.ConfigId));
|
||||||
setisTermscondChecking(
|
setisTermscondChecking(
|
||||||
|
|
@ -544,6 +560,8 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
Signature: item.Signature,
|
Signature: item.Signature,
|
||||||
PrintType: item.PrintType,
|
PrintType: item.PrintType,
|
||||||
PrintHdrName: item.PrintHdrName,
|
PrintHdrName: item.PrintHdrName,
|
||||||
|
PrintDocLabel: item.PrintDocLabel,
|
||||||
|
PrintTotalLabel:item.PrintTotalLabel,
|
||||||
// legacy fields are filled from the array so older code still works
|
// legacy fields are filled from the array so older code still works
|
||||||
PrintHdrColor:
|
PrintHdrColor:
|
||||||
item.PrintHdrColor ||
|
item.PrintHdrColor ||
|
||||||
|
|
@ -632,6 +650,8 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
PrintTypeId,
|
PrintTypeId,
|
||||||
PrintHdrColor,
|
PrintHdrColor,
|
||||||
PrintColors,
|
PrintColors,
|
||||||
|
PrintDocLabel,
|
||||||
|
PrintTotalLabel
|
||||||
} = row;
|
} = row;
|
||||||
if (index >= 4) setShowMore(true);
|
if (index >= 4) setShowMore(true);
|
||||||
if (index <= 4) setShowMore(false);
|
if (index <= 4) setShowMore(false);
|
||||||
|
|
@ -644,6 +664,8 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
setPageSize(PageSize);
|
setPageSize(PageSize);
|
||||||
setNote(Notes);
|
setNote(Notes);
|
||||||
setBillName(PrintHdrName);
|
setBillName(PrintHdrName);
|
||||||
|
setBillNolabel(PrintDocLabel);
|
||||||
|
settotalLabel(PrintTotalLabel);
|
||||||
setEdit(true);
|
setEdit(true);
|
||||||
// load existing header color, falling back to array
|
// load existing header color, falling back to array
|
||||||
setSelectedColour(
|
setSelectedColour(
|
||||||
|
|
@ -702,6 +724,9 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
dispatch(changeNotes(helperFunction('Notes')));
|
dispatch(changeNotes(helperFunction('Notes')));
|
||||||
dispatch(changeSignatureImage(Signature));
|
dispatch(changeSignatureImage(Signature));
|
||||||
dispatch(changeBillName(PrintHdrName));
|
dispatch(changeBillName(PrintHdrName));
|
||||||
|
dispatch(changeBillNolabel(PrintDocLabel));
|
||||||
|
dispatch(changetotallabel(PrintTotalLabel));
|
||||||
|
|
||||||
// derive color objects; prefer the legacy fields but fall back to the PrintColors array
|
// derive color objects; prefer the legacy fields but fall back to the PrintColors array
|
||||||
const hdr = getColor(PrintColors, 'headerColor');
|
const hdr = getColor(PrintColors, 'headerColor');
|
||||||
const tblHdr = getColor(PrintColors, 'tableHeaderColor');
|
const tblHdr = getColor(PrintColors, 'tableHeaderColor');
|
||||||
|
|
@ -1033,6 +1058,8 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
Notes: Notes,
|
Notes: Notes,
|
||||||
PageSize: PageSize,
|
PageSize: PageSize,
|
||||||
PrintHdrName: BillName,
|
PrintHdrName: BillName,
|
||||||
|
PrintDocLabel: BillNolabel,
|
||||||
|
PrintTotalLabel:totalLabel,
|
||||||
PrintType: PrintType ? 'S' : 'C',
|
PrintType: PrintType ? 'S' : 'C',
|
||||||
PrintTypeId: segmentValue,
|
PrintTypeId: segmentValue,
|
||||||
// Header color (background) and font
|
// Header color (background) and font
|
||||||
|
|
@ -1113,6 +1140,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onfinish = async (values) => {
|
const onfinish = async (values) => {
|
||||||
|
|
||||||
if (!templateEdit && sizeOptionData?.length == 0) {
|
if (!templateEdit && sizeOptionData?.length == 0) {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Please Setup the Screen');
|
setMessageData('Please Setup the Screen');
|
||||||
|
|
@ -1177,6 +1205,9 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
...(item?.Notes ? { Notes: item.Notes } : {}),
|
...(item?.Notes ? { Notes: item.Notes } : {}),
|
||||||
...(item?.PageSize ? { PageSize: item.PageSize } : {}),
|
...(item?.PageSize ? { PageSize: item.PageSize } : {}),
|
||||||
...(item?.PrintHdrName ? { PrintHdrName: item.PrintHdrName } : {}),
|
...(item?.PrintHdrName ? { PrintHdrName: item.PrintHdrName } : {}),
|
||||||
|
...(item?.PrintDocLabel ? { PrintDocLabel: item.PrintDocLabel } : {}),
|
||||||
|
...(item?.PrintTotalLabel ? { PrintTotalLabel: item.PrintTotalLabel } : {}),
|
||||||
|
|
||||||
...(item?.Signature ? { Signature: item?.Signature } : {}),
|
...(item?.Signature ? { Signature: item?.Signature } : {}),
|
||||||
PrintType: item?.PrintType,
|
PrintType: item?.PrintType,
|
||||||
})
|
})
|
||||||
|
|
@ -1670,8 +1701,6 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{
|
|
||||||
<div style={{ marginTop: '1rem' }}>
|
<div style={{ marginTop: '1rem' }}>
|
||||||
<Title level={5} style={{ marginBottom: 12 }}>
|
<Title level={5} style={{ marginBottom: 12 }}>
|
||||||
BillName
|
BillName
|
||||||
|
|
@ -1686,6 +1715,38 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{isbillnoLabel &&
|
||||||
|
<div style={{ marginTop: '1rem' }}>
|
||||||
|
<Title level={5} style={{ marginBottom: 12 }}>
|
||||||
|
BillNo Label
|
||||||
|
</Title>
|
||||||
|
<InputField
|
||||||
|
isOnChange={BillNolabel}
|
||||||
|
label={<label> Bill No Label</label>}
|
||||||
|
value={BillNolabel}
|
||||||
|
onChange={(e) => {
|
||||||
|
setBillNolabel(e.target.value);
|
||||||
|
dispatch(changeBillNolabel(e.target.value));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
{istotalLabel &&
|
||||||
|
<div style={{ marginTop: '1rem' }}>
|
||||||
|
<Title level={5} style={{ marginBottom: 12 }}>
|
||||||
|
Total Label
|
||||||
|
</Title>
|
||||||
|
<InputField
|
||||||
|
isOnChange={totalLabel}
|
||||||
|
label={<label> Total Label</label>}
|
||||||
|
value={totalLabel}
|
||||||
|
onChange={(e) => {
|
||||||
|
settotalLabel(e.target.value);
|
||||||
|
dispatch(changetotallabel(e.target.value));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{isTermscondChecking && (
|
{isTermscondChecking && (
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ const Printstyle4 = ({
|
||||||
SalesModePref,
|
SalesModePref,
|
||||||
MembershipApplied = null,
|
MembershipApplied = null,
|
||||||
}) => {
|
}) => {
|
||||||
|
console.log(printDatas, 'printDatas')
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const GlobalUpiID = useSelector(GlobalUpiIDprint);
|
const GlobalUpiID = useSelector(GlobalUpiIDprint);
|
||||||
const FieldDetails = useSelector(GloabalFieldDetails);
|
const FieldDetails = useSelector(GloabalFieldDetails);
|
||||||
|
|
@ -88,7 +89,13 @@ const Printstyle4 = ({
|
||||||
const CashierNameField = FieldDetails?.['CashierName'];
|
const CashierNameField = FieldDetails?.['CashierName'];
|
||||||
const LogoField = FieldDetails?.['Logo'];
|
const LogoField = FieldDetails?.['Logo'];
|
||||||
const CreditDetails = FieldDetails?.['Credit details'];
|
const CreditDetails = FieldDetails?.['Credit details'];
|
||||||
|
const orderNo = FieldDetails?.['Order No'];
|
||||||
|
const paymentTypelabel = FieldDetails?.['Payment Type Label'];
|
||||||
const WeightasKg = FieldDetails?.['Weight'];
|
const WeightasKg = FieldDetails?.['Weight'];
|
||||||
|
const BillLabel=FieldDetails?.['BillNoLabel']
|
||||||
|
const Total_Label=FieldDetails?.['Total Label']
|
||||||
|
const BillNoLabel = (printDatas?.PrintDocLabel && BillLabel) ? printDatas?.PrintDocLabel : "Bill No";
|
||||||
|
const TotalLabel = (printDatas?.PrintTotalLabel && Total_Label) ? printDatas?.PrintTotalLabel : "SUB TOTAL";
|
||||||
const GlobalSlNo = useSelector(GlobalprintSlNo);
|
const GlobalSlNo = useSelector(GlobalprintSlNo);
|
||||||
const GlobalItem = useSelector(GlobalprintItem);
|
const GlobalItem = useSelector(GlobalprintItem);
|
||||||
const GlobalMRP = useSelector(GlobalprintMRP);
|
const GlobalMRP = useSelector(GlobalprintMRP);
|
||||||
|
|
@ -587,7 +594,7 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
<div style={{ fontSize: '12px', fontWeight: '500' }}>
|
||||||
Bill No :
|
{BillNoLabel}:
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? '51'
|
? '51'
|
||||||
: table2Data?.OrderId &&
|
: table2Data?.OrderId &&
|
||||||
|
|
@ -1347,29 +1354,6 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="PrintStyle4-ThirdDivMaster">
|
<div className="PrintStyle4-ThirdDivMaster">
|
||||||
<div
|
|
||||||
className="print2subTotal"
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
fontSize: '12px',
|
|
||||||
fontWeight: 500,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
borderBottom: '1px dashed #000',
|
|
||||||
borderTop: '1px dashed #000',
|
|
||||||
padding: '5px 0',
|
|
||||||
...netAmountStyle,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{' '}
|
|
||||||
<div>Sub Total</div>
|
|
||||||
<div>
|
|
||||||
{GlobaldummyData
|
|
||||||
? '1,066'
|
|
||||||
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
className="print2subTotal"
|
className="print2subTotal"
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -1404,6 +1388,30 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
className="print2subTotal"
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 500,
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
borderBottom: '1px dashed #000',
|
||||||
|
borderTop: '1px dashed #000',
|
||||||
|
padding: '5px 0',
|
||||||
|
...netAmountStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{' '}
|
||||||
|
<div>{TotalLabel}</div>
|
||||||
|
<div>
|
||||||
|
{GlobaldummyData
|
||||||
|
? '1,066'
|
||||||
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -1765,7 +1773,7 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
{paymentTypelabel && <div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-evenly',
|
justifyContent: 'space-evenly',
|
||||||
|
|
@ -1792,7 +1800,7 @@ const Printstyle4 = ({
|
||||||
: Number(table2Data?.NetAmount).toFixed(2)}
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||||
/-{' '}
|
/-{' '}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>}
|
||||||
{isEditedBill && lastTransaction && (
|
{isEditedBill && lastTransaction && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -2014,11 +2022,11 @@ const Printstyle4 = ({
|
||||||
|
|
||||||
<div style={{}}>
|
<div style={{}}>
|
||||||
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
||||||
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
{orderNo && <div style={{ fontSize: '12px', fontWeight: '600' }}>
|
||||||
YOUR ORDER NO:
|
YOUR ORDER NO:
|
||||||
{table2Data?.SalesId &&
|
{table2Data?.SalesId &&
|
||||||
extractLastNumber(table2Data?.SalesId)}
|
extractLastNumber(table2Data?.SalesId)}
|
||||||
</div>
|
</div>}
|
||||||
<div className="PrintStyle4-FourthP">
|
<div className="PrintStyle4-FourthP">
|
||||||
{PaymentStatusSuccess?.length > 1 &&
|
{PaymentStatusSuccess?.length > 1 &&
|
||||||
!isEditedBill && (
|
!isEditedBill && (
|
||||||
|
|
@ -2338,28 +2346,6 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="PrintStyle4-ThirdDivMaster">
|
<div className="PrintStyle4-ThirdDivMaster">
|
||||||
<div
|
|
||||||
className="print2subTotal"
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
fontSize: '12px',
|
|
||||||
fontWeight: '600',
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
borderBottom: '1px dashed #000',
|
|
||||||
borderTop: '1px dashed #000',
|
|
||||||
padding: '5px 0',
|
|
||||||
...netAmountStyle,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div>Sub Total</div>
|
|
||||||
<div>
|
|
||||||
{GlobaldummyData
|
|
||||||
? '1,066'
|
|
||||||
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
className="print2subTotal"
|
className="print2subTotal"
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -2394,6 +2380,29 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
className="print2subTotal"
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: '600',
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
borderBottom: '1px dashed #000',
|
||||||
|
borderTop: '1px dashed #000',
|
||||||
|
padding: '5px 0',
|
||||||
|
...netAmountStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>{TotalLabel}</div>
|
||||||
|
<div>
|
||||||
|
{GlobaldummyData
|
||||||
|
? '1,066'
|
||||||
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -2755,7 +2764,7 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
{paymentTypelabel && <div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-evenly',
|
justifyContent: 'space-evenly',
|
||||||
|
|
@ -2782,7 +2791,7 @@ const Printstyle4 = ({
|
||||||
: Number(table2Data?.NetAmount).toFixed(2)}
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||||
/-{' '}
|
/-{' '}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>}
|
||||||
{isEditedBill && lastTransaction && (
|
{isEditedBill && lastTransaction && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -2995,11 +3004,11 @@ const Printstyle4 = ({
|
||||||
)}
|
)}
|
||||||
<div style={{}}>
|
<div style={{}}>
|
||||||
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
||||||
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
{orderNo && <div style={{ fontSize: '12px', fontWeight: '600' }}>
|
||||||
YOUR ORDER NO:
|
YOUR ORDER NO:
|
||||||
{table2Data?.SalesId &&
|
{table2Data?.SalesId &&
|
||||||
extractLastNumber(table2Data?.SalesId)}
|
extractLastNumber(table2Data?.SalesId)}
|
||||||
</div>
|
</div>}
|
||||||
<div className="PrintStyle4-FourthP">
|
<div className="PrintStyle4-FourthP">
|
||||||
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
||||||
<>
|
<>
|
||||||
|
|
@ -3399,7 +3408,7 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
Bill No :
|
{BillNoLabel}:
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? '51'
|
? '51'
|
||||||
: table2Data?.OrderId &&
|
: table2Data?.OrderId &&
|
||||||
|
|
@ -4215,29 +4224,6 @@ const Printstyle4 = ({
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<div className="PrintStyle4-ThirdDivMaster">
|
<div className="PrintStyle4-ThirdDivMaster">
|
||||||
<div
|
|
||||||
className="print2subTotal"
|
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
fontSize: '12px',
|
|
||||||
fontWeight: 500,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
borderBottom: '1px dashed #000',
|
|
||||||
borderTop: '1px dashed #000',
|
|
||||||
padding: '5px 0',
|
|
||||||
...netAmountStyle,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div>Sub Total</div>
|
|
||||||
<div>
|
|
||||||
{GlobaldummyData
|
|
||||||
? '1,066'
|
|
||||||
: Number(table2Data?.NetAmount).toFixed(2)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="print2subTotal"
|
className="print2subTotal"
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -4265,6 +4251,30 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
className="print2subTotal"
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 500,
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
borderBottom: '1px dashed #000',
|
||||||
|
borderTop: '1px dashed #000',
|
||||||
|
padding: '5px 0',
|
||||||
|
...netAmountStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>{TotalLabel}</div>
|
||||||
|
<div>
|
||||||
|
{GlobaldummyData
|
||||||
|
? '1,066'
|
||||||
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
|
||||||
|
|
@ -4610,7 +4620,7 @@ const Printstyle4 = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
{paymentTypelabel && <div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-evenly',
|
justifyContent: 'space-evenly',
|
||||||
|
|
@ -4637,7 +4647,7 @@ const Printstyle4 = ({
|
||||||
: Number(table2Data?.NetAmount).toFixed(2)}
|
: Number(table2Data?.NetAmount).toFixed(2)}
|
||||||
/-{' '}
|
/-{' '}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>}
|
||||||
{isEditedBill && lastTransaction && (
|
{isEditedBill && lastTransaction && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -4836,10 +4846,10 @@ const Printstyle4 = ({
|
||||||
)}
|
)}
|
||||||
<div style={{}}>
|
<div style={{}}>
|
||||||
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
{/* <div className='PrintStyle4-FourthSmallwordings'>Scan to Pay</div> */}
|
||||||
<div style={{ fontSize: '12px', fontWeight: '600' }}>
|
{orderNo && <div style={{ fontSize: '12px', fontWeight: '600' }}>
|
||||||
YOUR ORDER NO:
|
YOUR ORDER NO:
|
||||||
{table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
|
{table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
|
||||||
</div>
|
</div>}
|
||||||
<div className="PrintStyle4-FourthP">
|
<div className="PrintStyle4-FourthP">
|
||||||
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -593,8 +593,8 @@ const PaymentPdfBooking = ({
|
||||||
{TakeawayTotalOfferAmt > 0 && (
|
{TakeawayTotalOfferAmt > 0 && (
|
||||||
<td className="Re-print-body-Rate">
|
<td className="Re-print-body-Rate">
|
||||||
{item?.Type !== 'C'
|
{item?.Type !== 'C'
|
||||||
? (item?.OfferAmt || item?.DiscountAmt || 0)
|
? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
|
||||||
: (item?.OfferValue || item?.DiscountAmt || 0)}
|
: (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{table2Data?.OrderType !== 'E' ? (
|
{table2Data?.OrderType !== 'E' ? (
|
||||||
|
|
@ -676,8 +676,8 @@ const PaymentPdfBooking = ({
|
||||||
{DineinTotalOfferAmt > 0 && (
|
{DineinTotalOfferAmt > 0 && (
|
||||||
<td className="Re-print-body-Rate">
|
<td className="Re-print-body-Rate">
|
||||||
{item?.Type !== 'C'
|
{item?.Type !== 'C'
|
||||||
? (item?.OfferAmt || item?.DiscountAmt || 0)
|
? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
|
||||||
: (item?.OfferValue || item?.DiscountAmt || 0)}
|
: (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{table2Data?.OrderType !== 'E' ? (
|
{table2Data?.OrderType !== 'E' ? (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue