diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx
index 073cbf6..af7eb6a 100644
--- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx
+++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx
@@ -102,15 +102,33 @@ const BSBillingEditQuantity = (props) => {
const SettingDataSelector = useSelector(PreferenceData);
const OrderType = useSelector(GlobalOrderType);
const [BillOrderPre, setBillOrderPre] = useState(null);
- const [RadioBtnSelection, setRadioBtnSelection] = useState(
- props?.shortKeyMethod == 'price'
- ? 'Price'
- : ItemData?.ScaleType !== 'weight'
- ? 'Quantity'
- : PriceChangeaccess
- ? 'Price'
- : 'Parcel'
- );
+ const SHORTKEY_TO_RADIO = {
+ price: 'Price',
+ quantity: 'qty',
+ Parcel: 'Parcel',
+ weightAmount: 'weightAmount'
+};
+const [RadioBtnSelection, setRadioBtnSelection] = useState(() => {
+ if (props?.shortKeyMethod && SHORTKEY_TO_RADIO[props.shortKeyMethod]) {
+ return SHORTKEY_TO_RADIO[props.shortKeyMethod];
+ }
+ if (ItemData?.ScaleType !== 'weight') {
+ return 'Quantity';
+ }
+ if (PriceChangeaccess) {
+ return 'Price';
+ }
+ return 'Parcel';
+});
+ // const [RadioBtnSelection, setRadioBtnSelection] = useState(
+ // props?.shortKeyMethod == 'price'
+ // ? 'Price'
+ // : ItemData?.ScaleType !== 'weight'
+ // ? 'Quantity'
+ // : PriceChangeaccess
+ // ? 'Price'
+ // : 'Parcel'
+ // );
const [PercentageSelection, setPercentageSelection] = useState('Fixed');
const [RadioDetails, setRadioDetails] = useState(false);
const [editedPrice, setEditedPrice] = useState(0);
@@ -3552,13 +3570,13 @@ const BSBillingEditQuantity = (props) => {
{isKg && ()}
@@ -3766,7 +3784,7 @@ const BSBillingEditQuantity = (props) => {
/>
>
)}
- {RadioBtnSelection == 'AddWeight' && (
+ {RadioBtnSelection == 'weightAmount' && (
<>