)}
- {!estimatePrintHeader && table2Data?.OrderType === 'E' && (
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
{Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3727,7 +3733,7 @@ const PrintStyle1 = ({
Mobile : +91{' '}
{GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
}
- {table2Data?.OrderType === 'E' && (
+ {table2Data?.OrderType === 'E' && estimateTitle && (
)}
- {!estimatePrintHeader && table2Data?.OrderType === 'E' && (
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
{Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/EmpMaster/EmpMasterForm.jsx b/src/Pages/EmpMaster/EmpMasterForm.jsx
index 2ef020c..7005c09 100644
--- a/src/Pages/EmpMaster/EmpMasterForm.jsx
+++ b/src/Pages/EmpMaster/EmpMasterForm.jsx
@@ -33,8 +33,6 @@ import { getCommonAppPreference } from '../../Features/BrachLogin/BranchLogin.js
import { AiOutlineDownCircle, AiOutlineUpCircle } from 'react-icons/ai';
// import TextArea from 'antd/es/input/TextArea.js';
import CropUpload from '../../Components/Forms/CropUpload.jsx';
-import { isMobile } from 'react-device-detect';
-import Camera from '../../Components/MobileComponent/Camera.jsx';
const { Panel } = Collapse;
const { TextArea } = Input;
const subDirectory = import.meta.env.BASE_URL;
diff --git a/src/Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx b/src/Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx
index b12a4a7..4fafdba 100644
--- a/src/Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx
+++ b/src/Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx
@@ -96,7 +96,7 @@ const PaymentDetails = ({ formType }) => {
},
{
- name: 'PaymentDetails',
+ name: 'Payment Details',
link: `${subDirectory}setting/payment-details`,
},
{
diff --git a/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx b/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx
index 1135c62..ba1ed67 100644
--- a/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx
+++ b/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx
@@ -81,7 +81,7 @@ const PaymentDetailsList = () => {
},
{
- name: 'PaymentDetails',
+ name: 'Payment Details',
link: `${subDirectory}setting/payment-details`,
},
];
diff --git a/src/Pages/Preference/PreferenceList.jsx b/src/Pages/Preference/PreferenceList.jsx
index 7c039d0..4cbbe51 100644
--- a/src/Pages/Preference/PreferenceList.jsx
+++ b/src/Pages/Preference/PreferenceList.jsx
@@ -102,7 +102,10 @@ const PreferenceList = () => {
(k) => allSettingsMap[k]?.value === 'Y'
),
mobilea4: allSettingsMap['mobilea4']?.value === 'Y',
- estimateprintheader: allSettingsMap['estimateprintheader']?.value === 'Y',
+ estimateSettings: [
+ ...(allSettingsMap['estimateprintheader']?.value === 'Y' ? ['estimateprintheader'] : []),
+ ...(allSettingsMap['estimatetitle']?.value === 'Y' ? ['estimatetitle'] : []),
+ ],
scanlayout: allSettingsMap['scanlayout']?.value === 'Y',
verifyproduct: allSettingsMap['verifyproduct']?.value === 'Y',
customisedbillnumber: allSettingsMap['customisedbillnumber']?.value === 'Y',
@@ -304,7 +307,6 @@ const PreferenceList = () => {
tokenonly: values.tokenonly,
allproductindividualtoken: values.allproductindividualtoken,
mobilea4: values.mobilea4,
- estimateprintheader: values.estimateprintheader,
scanlayout: values.scanlayout,
verifyproduct: values.verifyproduct,
customisedbillnumber: values.customisedbillnumber,
@@ -321,6 +323,8 @@ const PreferenceList = () => {
dinein: values.enabledModules,
estimation: values.enabledModules,
parking: values.enabledFeatures,
+ estimateprintheader: values.estimateSettings,
+ estimatetitle: values.estimateSettings,
offer: values.enabledFeatures,
whatsapp: values.pdfSendOptions,
sms: values.pdfSendOptions,
@@ -653,8 +657,8 @@ const PreferenceList = () => {
-
{
'mobilea4',
'Prefer printing in A4/A5 on mobile?'
)}
- {renderCheckbox(
- 'estimateprintheader',
- 'Do you want to include a header when printing Estimate bills?'
- )}
+ {(allSettingsMap['estimateprintheader'] !== undefined ||
+ allSettingsMap['estimatetitle'] !== undefined) && (
+
+
+ {allSettingsMap['estimateprintheader'] !== undefined && (
+ Show shop header (Name, Address, GST)
+ )}
+ {allSettingsMap['estimatetitle'] !== undefined && (
+ Show “Estimate (R/W)” title
+ )}
+
+
+ )}
{
+ async function detectCamera() {
+ try {
+ const devices = await navigator.mediaDevices.enumerateDevices();
+ setHasCamera(devices.some(d => d.kind === "videoinput"));
+ } catch {
+ setHasCamera(false);
+ }
+ }
+ detectCamera();
+ }, []);
+
+ return hasCamera;
+}
\ No newline at end of file