Merge pull request 'Fix #317 Reports Intent Print changes' (#318) from Capacitorcookies into main

Reviewed-on: Pozomind/pozo-retail-app#318
This commit is contained in:
karthikalakshmi 2026-03-27 09:48:54 +05:30
commit 6d9c132012
5 changed files with 26 additions and 29 deletions

View File

@ -56,11 +56,6 @@ const addAuthHeader = async (config) => {
let encryptedLoginType =
getSession('LoginType')
console.log(
'encryptedLoginType',
encryptedLoginType,
TokendecryptedValuesFun(encryptedMobileno)
);
// let Mobileno = encryptedUserId && encryptedLoginType != "Kiosk" ? TokendecryptedValuesFun(encryptedMobileno) : '1000000001';
let Mobileno = encryptedUserId

View File

@ -18,14 +18,14 @@ function RedirectApps() {
const SessionId = encryptedValuesUrlFun(getSession('SessionId'));
// const AuthToken = sessionStorage.getItem('auth');
if (sessionStorage.getItem('BranchId') !== null) {
if (getSession('BranchId') !== null) {
clearSession('BranchId');
}
if (sessionStorage.getItem('AppId') !== null) {
if (getSession('AppId') !== null) {
clearSession('AppId');
}
if (sessionStorage.getItem('hasRefreshed') !== null) {
sessionStorage.removeItem('hasRefreshed');
if (getSession('hasRefreshed') !== null) {
clearSession('hasRefreshed');
}
const param = {
MN: MobileNo,

View File

@ -41,6 +41,7 @@ const DateWiseReport = () => {
getSession('AppType')?.toLowerCase() == 'wholesale' ? true : false;
const [OrderFromDate, setOrderFromDate] = useState();
const [OrderToDate, setOrderToDate] = useState();
const sessionuserid = getSession('UserId')
const [UserId, setUserId] = useState(
UserRole != 'Employee' ? 0 : getSession('UserId')
);
@ -63,7 +64,7 @@ const DateWiseReport = () => {
setting?.SettingIdName?.toLowerCase() === 'mobilea4' &&
setting?.SettingValue === 'Y'
);
console.log(MobileA4Print, 'MobileA4PrintMobileA4Print');
console.log(MobileA4Print,SettingDataSelector, 'MobileA4PrintMobileA4Print');
useEffect(() => {
if (dataSource?.length > 0) {
@ -368,7 +369,7 @@ const DateWiseReport = () => {
}, []);
const getPreference = async () => {
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: UserId };
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: sessionuserid };
const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -545,12 +546,12 @@ const DateWiseReport = () => {
let TokenData = '';
let FooterPrint = '';
if (isMobile) {
if (MobileA4Print) {
ReportMobilePDFPrint({
printId: 'RePrint',
printStyle: style,
});
} else {
// if (MobileA4Print) {
// ReportMobilePDFPrint({
// printId: 'RePrint',
// printStyle: style,
// });
// } else {
var textEncoded = encodeURI(receiptText);
var TypeCheck = 'PrintReceipt';
var scheme = 'pozoprinter';
@ -578,7 +579,7 @@ const DateWiseReport = () => {
FooterPrint +
'HasFooterTextE' +
';end;';
}
// }
} else {
await printDiv('RePrint', style);
}

View File

@ -69,6 +69,7 @@ const ItemWiseReport = () => {
const BranchId = getSession('BranchId');
const AppId = getSession('AppId');
const UserRole = getSession('UserType');
const sessionuserid = getSession('UserId')
const [UserId, setUserId] = useState(
UserRole != 'Employee' ? 0 : getSession('UserId')
);
@ -79,7 +80,7 @@ const ItemWiseReport = () => {
setting?.SettingIdName?.toLowerCase() === 'mobilea4' &&
setting?.SettingValue === 'Y'
);
console.log(MobileA4Print,SettingDataSelector, 'MobileA4PrintMobileA4Print')
useEffect(() => {
getPreference();
}, []);
@ -210,7 +211,7 @@ const ItemWiseReport = () => {
}
}, [apiCall]);
const getPreference = async () => {
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: UserId };
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: sessionuserid };
const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -310,12 +311,12 @@ const ItemWiseReport = () => {
};
const Print = async () => {
if (isMobile) {
if (MobileA4Print) {
ReportMobilePDFPrint({
printId: 'RePrint',
printStyle: style,
});
} else {
// if (MobileA4Print) {
// ReportMobilePDFPrint({
// printId: 'RePrint',
// printStyle: style,
// });
// } else {
let LogoImage = '';
let TokenData = '';
let FooterPrint = '';
@ -346,7 +347,7 @@ const ItemWiseReport = () => {
FooterPrint +
'HasFooterTextE' +
';end;';
}
// }
} else {
await printDiv('RePrint', style);
}

View File

@ -705,7 +705,7 @@
color: #fff;
top: 0;
}
.optionnew:selection {
.optionnew::selection {
background-color: #ff4d4f;
}
.ovrly-icos {