diff --git a/src/Features/BookingScreen/Customer/addCustomer.js b/src/Features/BookingScreen/Customer/addCustomer.js index ff16a92..de7c3fd 100644 --- a/src/Features/BookingScreen/Customer/addCustomer.js +++ b/src/Features/BookingScreen/Customer/addCustomer.js @@ -79,17 +79,23 @@ export const getRePrintReason = createAsyncThunk( export const ReprintDetails = createAsyncThunk( "addCustomer/ReprintDetails", async (data) => { - const { AppId, CompId, BranchId, OrderFromDate, OrderToDate, OrderId } = data || {}; + const { AppId, CompId, BranchId, OrderFromDate, OrderToDate, OrderId,PageNumber } = data || {}; if (OrderId && !OrderFromDate && !OrderToDate) { return await axiosRetailInstanceData.get( `/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&OrderId=${OrderId}&pageNumber=${data.PageNumber}&Type=${data.Type}` ); } - if (OrderFromDate && OrderToDate) { + if (OrderFromDate && OrderToDate && PageNumber) { return await axiosRetailInstanceData.get( `/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&orderFromDate=${OrderFromDate}&orderToDate=${OrderToDate} &pageNumber=${data.PageNumber}&Type=${data.Type}` ); - } else { + } + else if(OrderFromDate && OrderToDate ) { + return await axiosRetailInstanceData.get( + `/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&orderFromDate=${OrderFromDate}&orderToDate=${OrderToDate}&Type=${data.Type}` + ); + } + else { return await axiosRetailInstanceData.get( `/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&pageNumber=${data.PageNumber}&Type=${data.Type}` );